Move DIMM_MAP_LOGICAL to Kconfig.
authorPatrick Georgi <patrick@georgi-clan.de>
Thu, 18 Nov 2010 11:36:16 +0000 (11:36 +0000)
committerPatrick Georgi <patrick.georgi@coresystems.de>
Thu, 18 Nov 2010 11:36:16 +0000 (11:36 +0000)
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Acked-by: Patrick Georgi <patrick@georgi-clan.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6089 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

src/mainboard/dell/s1850/Kconfig
src/mainboard/dell/s1850/romstage.c
src/mainboard/intel/jarrell/Kconfig
src/mainboard/intel/jarrell/romstage.c
src/northbridge/intel/e7520/Kconfig
src/northbridge/intel/e7520/raminit.c
src/northbridge/intel/e7525/Kconfig
src/northbridge/intel/e7525/raminit.c
src/northbridge/intel/i3100/Kconfig
src/northbridge/intel/i3100/raminit.c

index 22cdf7ed5bdb3cdd3de32b6d6cc6a56d77f14c46..4185dfcb9c23bdfa84aeb8d673258aa859818946 100644 (file)
@@ -46,4 +46,8 @@ config IRQ_SLOT_COUNT
        int
        default 9
 
+config DIMM_MAP_LOGICAL
+       hex
+       default 0x2841
+
 endif # BOARD_DELL_S1850
index 6ebf88cb0b3e01ba4a5724532e110f8dca4a17d2..a935ffc13d1477fdfc09534d9aab92817bae3f6d 100644 (file)
@@ -37,9 +37,6 @@ static inline int spd_read_byte(unsigned device, unsigned address)
        return smbus_read_byte(device, address);
 }
 
-/* this is very highly mainboard dependent, related to wiring */
-/* from factory BIOS via lspci */
-#define DIMM_MAP_LOGICAL 0x2841
 #include "northbridge/intel/e7520/raminit.c"
 #include "lib/generic_sdram.c"
 
index f6c701d485d6174b137659d2f94e259e82f05d5c..2ac8ea3c13cdb90174a207d2bf8f172004fb3b76 100644 (file)
@@ -43,4 +43,8 @@ config MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID
        hex
        default 0x1079
 
+config DIMM_MAP_LOGICAL
+       hex
+       default 0x0124
+
 endif # BOARD_INTEL_JARRELL
index 0220ec8faba5cdb48321af96cd33bc3d7b689141..530c22ae2493984b8531451ead5e69b16cd406da 100644 (file)
@@ -29,8 +29,6 @@
 #define DEVPRES_CONFIG  (DEVPRES_D1F0 | DEVPRES_D2F0 | DEVPRES_D6F0)
 #define DEVPRES1_CONFIG (DEVPRES1_D0F1 | DEVPRES1_D8F0)
 
-#define DIMM_MAP_LOGICAL 0x0124
-
 static inline int spd_read_byte(unsigned device, unsigned address)
 {
        return smbus_read_byte(device, address);
index 426db8b12fbb462ec27264e6f1bd8e9dc737531e..ef2b7f65fe2b6fe3a28aa25fea7b809e94138880 100644 (file)
@@ -1,3 +1,9 @@
 config NORTHBRIDGE_INTEL_E7520
        bool
 
+if NORTHBRIDGE_INTEL_E7520
+config DIMM_MAP_LOGICAL
+       hex
+       default 0x1248
+
+endif
index 235ce44f2b1dac0fa3f3f4875c3795d472e2a38d..6eed1964e9ef82bf0ec068cabf6c006ef8e20e1e 100644 (file)
@@ -1078,12 +1078,8 @@ static void sdram_enable(int controllers, const struct mem_controller *ctrl)
        print_debug("Starting SDRAM Enable\n");
 
        /* 0x80 */
-#ifdef DIMM_MAP_LOGICAL
        pci_write_config32(PCI_DEV(0, 0x00, 0), DRM,
-               0x00210000 | DIMM_MAP_LOGICAL);
-#else
-       pci_write_config32(PCI_DEV(0, 0x00, 0), DRM, 0x00211248);
-#endif
+               0x00210000 | CONFIG_DIMM_MAP_LOGICAL);
        /* set dram type and Front Side Bus freq. */
        drc = spd_set_dram_controller_mode(ctrl, mask);
        if( drc == 0) {
index d8bff2225b09f8539e6e97ad886844b61ff7049e..04e3d8b6198095ded115f1ebc89b1353c27a91ca 100644 (file)
@@ -1,3 +1,9 @@
 config NORTHBRIDGE_INTEL_E7525
        bool
 
+if NORTHBRIDGE_INTEL_E7525
+config DIMM_MAP_LOGICAL
+       hex
+       default 0x1248
+
+endif
index b482bb9fec2272a171df24dbbbd5942cb3135e36..aabe8cfba50971b74080099856c81372892a873d 100644 (file)
@@ -1055,12 +1055,8 @@ static void sdram_enable(int controllers, const struct mem_controller *ctrl)
        print_debug("Starting SDRAM Enable\n");
 
        /* 0x80 */
-#ifdef DIMM_MAP_LOGICAL
        pci_write_config32(ctrl->f0, DRM,
-               0x00210000 | DIMM_MAP_LOGICAL);
-#else
-       pci_write_config32(ctrl->f0, DRM, 0x00211248);
-#endif
+               0x00210000 | CONFIG_DIMM_MAP_LOGICAL);
        /* set dram type and Front Side Bus freq. */
        drc = spd_set_dram_controller_mode(ctrl, mask);
        if( drc == 0) {
index a85162310e8484c884f3ae0f3d660cca728aa886..079004bda965cd377b1e09e5e4a51f08ba4485d4 100644 (file)
@@ -1,3 +1,9 @@
 config NORTHBRIDGE_INTEL_I3100
        bool
 
+if NORTHBRIDGE_INTEL_I3100
+config DIMM_MAP_LOGICAL
+       hex
+       default 0x1248
+
+endif
index 5afddb7d9e0557845ae4a240184e2459e219d99c..86e610feb3e4ade319d5c7f929a46f362a9947f3 100644 (file)
@@ -973,12 +973,8 @@ static void sdram_enable(int controllers, const struct mem_controller *ctrl)
        print_debug("Starting SDRAM Enable\n");
 
        /* 0x80 */
-#ifdef DIMM_MAP_LOGICAL
        pci_write_config32(ctrl->f0, DRM,
-               0x00410000 | DIMM_MAP_LOGICAL);
-#else
-       pci_write_config32(ctrl->f0, DRM, 0x00411248);
-#endif
+               0x00410000 | CONFIG_DIMM_MAP_LOGICAL);
        /* set dram type and Front Side Bus freq. */
        drc = spd_set_dram_controller_mode(ctrl, mask);
        if( drc == 0) {