i2c: spd: Extend SPD memory types
authorMichal Simek <michal.simek@xilinx.com>
Mon, 15 Feb 2016 10:58:37 +0000 (11:58 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 22 Feb 2016 15:21:12 +0000 (16:21 +0100)
Decode DDR, DDR3 and DDR4 memories.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
cmd/i2c.c

index b3bb64408fe18af0c2a754ed653384bd55dee880..18ce789d7edd916bd704e776b70afedaa3b446d7 100644 (file)
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
@@ -1141,7 +1141,7 @@ static void decode_bits (u_char const b, char const *str[], int const do_once)
  */
 static int do_sdram (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 {
-       enum { unknown, EDO, SDRAM, DDR2 } type;
+       enum { unknown, EDO, SDRAM, DDR, DDR2, DDR3, DDR4 } type;
 
        uint    chip;
        u_char  data[128];
@@ -1228,10 +1228,22 @@ static int do_sdram (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
                type = SDRAM;
                puts ("SDRAM\n");
                break;
+       case 7:
+               type = DDR;
+               puts("DDR\n");
+               break;
        case 8:
                type = DDR2;
                puts ("DDR2\n");
                break;
+       case 11:
+               type = DDR3;
+               puts("DDR3\n");
+               break;
+       case 12:
+               type = DDR4;
+               puts("DDR4\n");
+               break;
        default:
                type = unknown;
                puts ("unknown\n");