Revert "Remove SDRAM manufacturer name code"
authork <k@anon-33-233.vpn.ipredator.se>
Sun, 2 Apr 2017 01:18:39 +0000 (02:18 +0100)
committerk <k@anon-33-233.vpn.ipredator.se>
Sun, 2 Apr 2017 01:18:39 +0000 (02:18 +0100)
This reverts commit 163137d96961f6d80fa365407fec044db622e237.

sdram.c

diff --git a/sdram.c b/sdram.c
index 0d34893..7cea7b6 100644 (file)
--- a/sdram.c
+++ b/sdram.c
@@ -54,6 +54,25 @@ extern uint32_t g_CPUID;
 \r
 uint32_t g_RAMSize = RAM_SIZE_UNKNOWN;\r
 \r
+static const char* lpddr2_manufacturer_name(uint32_t mr) {\r
+       switch (mr) {\r
+       case 1:\r
+               return "Samsung";\r
+       case 2:\r
+               return "Qimonda";\r
+       case 3:\r
+               return "Elpida";\r
+       case 4:\r
+               return "Etron";\r
+       case 5:\r
+               return "Nanya";\r
+       case 6:\r
+               return "Hynix";\r
+       default:\r
+               return "Unknown";\r
+       }\r
+}\r
+\r
 #define MR8_DENSITY_SHIFT      0x2\r
 #define MR8_DENSITY_MASK       (0xF << 0x2)\r
 \r
@@ -530,10 +549,10 @@ void sdram_init() {
 \r
        g_RAMSize = lpddr2_size(bc);\r
 \r
-       logf("SDRAM Type: %s LPDDR2 (BC=0x%X, vendor %d)\n",\r
+       logf("SDRAM Type: %s %s LPDDR2 (BC=0x%X)\n",\r
+            lpddr2_manufacturer_name(vendor_id),\r
             size_to_string[g_RAMSize],\r
-            bc,\r
-            vendor_id);\r
+            bc);\r
 \r
        if (g_RAMSize == RAM_SIZE_UNKNOWN)\r
                panic("unknown ram size (MR8 response was 0x%X)", bc);\r
This page took 0.025024 seconds and 4 git commands to generate.