summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2008-07-10 15:32:32 +0200
committerStefan Roese <sr@denx.de>2008-07-11 13:18:13 +0200
commit08250eb2edbd96514d049602d9e134110ac3185f (patch)
treed464cbb4d2b51906e848c3c8445d202441200d15
parent1740c1bf40e3c6d03ac16c29943fdd9fc1e87038 (diff)
downloadu-boot-imx-08250eb2edbd96514d049602d9e134110ac3185f.zip
u-boot-imx-08250eb2edbd96514d049602d9e134110ac3185f.tar.gz
u-boot-imx-08250eb2edbd96514d049602d9e134110ac3185f.tar.bz2
ppc4xx: Fix merge problems in 44x_spd_ddr2.c
Signed-off-by: Stefan Roese <sr@denx.de>
-rw-r--r--cpu/ppc4xx/44x_spd_ddr2.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/cpu/ppc4xx/44x_spd_ddr2.c b/cpu/ppc4xx/44x_spd_ddr2.c
index d7f20a1..65dd5d9 100644
--- a/cpu/ppc4xx/44x_spd_ddr2.c
+++ b/cpu/ppc4xx/44x_spd_ddr2.c
@@ -50,12 +50,19 @@
#include "ecc.h"
+#if defined(CONFIG_SDRAM_PPC4xx_IBM_DDR2)
+
+#define PPC4xx_IBM_DDR2_DUMP_REGISTER(mnemonic) \
+ do { \
+ u32 data; \
+ mfsdram(SDRAM_##mnemonic, data); \
+ printf("%20s[%02x] = 0x%08X\n", \
+ "SDRAM_" #mnemonic, SDRAM_##mnemonic, data); \
+ } while (0)
+
static void ppc4xx_ibm_ddr2_register_dump(void);
-#if defined(CONFIG_SPD_EEPROM) && \
- (defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
- defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
- defined(CONFIG_460SX))
+#if defined(CONFIG_SPD_EEPROM)
/*-----------------------------------------------------------------------------+
* Defines
@@ -2948,7 +2955,8 @@ static void test(void)
}
#endif
-#elif defined(CONFIG_405EX)
+#else /* CONFIG_SPD_EEPROM */
+
/*-----------------------------------------------------------------------------
* Function: initdram
* Description: Configures the PPC405EX(r) DDR1/DDR2 SDRAM memory
@@ -3068,19 +3076,11 @@ phys_size_t initdram(int board_type)
return (CFG_MBYTES_SDRAM << 20);
}
-#endif /* defined(CONFIG_SPD_EEPROM) && defined(CONFIG_440SP) || ... */
+#endif /* CONFIG_SPD_EEPROM */
static void ppc4xx_ibm_ddr2_register_dump(void)
{
-#if defined(DEBUG) && defined(CONFIG_SDRAM_PPC4xx_IBM_DDR2)
-#define PPC4xx_IBM_DDR2_DUMP_REGISTER(mnemonic) \
- do { \
- u32 data; \
- mfsdram(SDRAM_##mnemonic, data); \
- printf("%20s[%02x] = 0x%08X\n", \
- "SDRAM_" #mnemonic, SDRAM_##mnemonic, data); \
- } while (0)
-
+#if defined(DEBUG)
printf("\nPPC4xx IBM DDR2 Register Dump:\n");
#if (defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
@@ -3159,4 +3159,7 @@ static void ppc4xx_ibm_ddr2_register_dump(void)
PPC4xx_IBM_DDR2_DUMP_REGISTER(RID);
PPC4xx_IBM_DDR2_DUMP_REGISTER(FCSR);
PPC4xx_IBM_DDR2_DUMP_REGISTER(RTSR);
-#endif /* defined(DEBUG) && defined(CONFIG_SDRAM_PPC4xx_IBM_DDR2) */
+#endif /* defined(DEBUG) */
+}
+
+#endif /* CONFIG_SDRAM_PPC4xx_IBM_DDR2 */