]> git.sur5r.net Git - u-boot/commitdiff
powerpc/mpc8xxx: Add SPD EEPROM address for single controller 2 slots
authorYork Sun <yorksun@freescale.com>
Fri, 26 Aug 2011 18:32:41 +0000 (11:32 -0700)
committerKumar Gala <galak@kernel.crashing.org>
Fri, 30 Sep 2011 00:01:06 +0000 (19:01 -0500)
The two slots on the same controller have different addresses.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/cpu/mpc8xxx/ddr/main.c

index 249fd7dfb36086bd59bc278663564408819d49f5..5699b0c2cc9a287ce7f4dc287b6a292ef40c32ad 100644 (file)
@@ -34,14 +34,17 @@ extern void fsl_ddr_set_memctl_regs(const fsl_ddr_cfg_regs_t *regs,
 u8 spd_i2c_addr[CONFIG_NUM_DDR_CONTROLLERS][CONFIG_DIMM_SLOTS_PER_CTLR] = {
        [0][0] = SPD_EEPROM_ADDRESS,
 };
-#endif
-#if (CONFIG_NUM_DDR_CONTROLLERS == 2) && (CONFIG_DIMM_SLOTS_PER_CTLR == 1)
+#elif (CONFIG_NUM_DDR_CONTROLLERS == 1) && (CONFIG_DIMM_SLOTS_PER_CTLR == 2)
+u8 spd_i2c_addr[CONFIG_NUM_DDR_CONTROLLERS][CONFIG_DIMM_SLOTS_PER_CTLR] = {
+       [0][0] = SPD_EEPROM_ADDRESS1,   /* controller 1 */
+       [0][1] = SPD_EEPROM_ADDRESS2,   /* controller 1 */
+};
+#elif (CONFIG_NUM_DDR_CONTROLLERS == 2) && (CONFIG_DIMM_SLOTS_PER_CTLR == 1)
 u8 spd_i2c_addr[CONFIG_NUM_DDR_CONTROLLERS][CONFIG_DIMM_SLOTS_PER_CTLR] = {
        [0][0] = SPD_EEPROM_ADDRESS1,   /* controller 1 */
        [1][0] = SPD_EEPROM_ADDRESS2,   /* controller 2 */
 };
-#endif
-#if (CONFIG_NUM_DDR_CONTROLLERS == 2) && (CONFIG_DIMM_SLOTS_PER_CTLR == 2)
+#elif (CONFIG_NUM_DDR_CONTROLLERS == 2) && (CONFIG_DIMM_SLOTS_PER_CTLR == 2)
 u8 spd_i2c_addr[CONFIG_NUM_DDR_CONTROLLERS][CONFIG_DIMM_SLOTS_PER_CTLR] = {
        [0][0] = SPD_EEPROM_ADDRESS1,   /* controller 1 */
        [0][1] = SPD_EEPROM_ADDRESS2,   /* controller 1 */