On 3/27/11 5:36 AM, Keith Hui wrote:
Adds support for initializing registered SDRAM modules on Intel 440BX northbridge.

Signed-off-by: Keith Hui <[email protected]>

Index: src/northbridge/intel/i440bx/raminit.c
===================================================================
--- src/northbridge/intel/i440bx/raminit.c    (revision 6460)
+++ src/northbridge/intel/i440bx/raminit.c    (working copy)

+ /* Set DRAMC[4:3] to proper memory type (EDO/SDRAM/Registered SDRAM). */
+
+    if ((edosd & 0x84) == 0x84) {
+        edosd = 0x10; // Registered SDRAM
+    } else {
+        // Clear [4:3] in case it's EDO.
+        edosd &= 0x07;
+//    } else if (edosd & 0x02) {
Besides being commented out, this piece of code would never be executed, as there already is an else case.
Also, modifying edosd in place is semi nice.

Please clean this up before committing. Maybe consider using switch/case?

Looks good otherwise.
+//        edosd |= 0x00;
+        if (edosd & 0x04) {
+            edosd |= 0x08; // SDRAM
+        }
     }
+    // Keep only [4:3].
     edosd &= 0x18;

     /* edosd is now in the form needed for DRAMC[4:3]. */


--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to