[U-Boot] [PATCH 09/10] 85xx: Add eSDHC support for 8536 DS

Andy Fleming afleming at freescale.com
Thu Oct 30 23:35:38 CET 2008


Signed-off-by: Andy Fleming <afleming at freescale.com>
---
 board/freescale/mpc8536ds/mpc8536ds.c |   12 ++++++++++++
 cpu/mpc85xx/cpu.c                     |   16 +++++++++++++++-
 include/configs/MPC8536DS.h           |   14 ++++++++++++++
 3 files changed, 41 insertions(+), 1 deletions(-)

diff --git a/board/freescale/mpc8536ds/mpc8536ds.c b/board/freescale/mpc8536ds/mpc8536ds.c
index 4944288..42f5c70 100644
--- a/board/freescale/mpc8536ds/mpc8536ds.c
+++ b/board/freescale/mpc8536ds/mpc8536ds.c
@@ -43,6 +43,18 @@
 
 phys_size_t fixed_sdram(void);
 
+int board_early_init_f (void)
+{
+	volatile u32 *pmuxcr = (u32 *)(CONFIG_SYS_IMMR + 0xe0060);
+	u32 val;
+
+	val = *pmuxcr;
+	val |= 0x60000000;
+	*pmuxcr = val;
+
+	return 0;
+}
+
 int checkboard (void)
 {
 	printf ("Board: MPC8536DS, System ID: 0x%02x, "
diff --git a/cpu/mpc85xx/cpu.c b/cpu/mpc85xx/cpu.c
index c780687..910c804 100644
--- a/cpu/mpc85xx/cpu.c
+++ b/cpu/mpc85xx/cpu.c
@@ -30,6 +30,7 @@
 #include <watchdog.h>
 #include <command.h>
 #include <tsec.h>
+#include <fsl_esdhc.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 
@@ -384,8 +385,21 @@ void upmconfig (uint upm, uint * table, uint size)
 int cpu_eth_init(bd_t *bis)
 {
 #if defined(CONFIG_TSEC_ENET) || defined(CONFIG_MPC85xx_FEC)
-	tsec_standard_init(bis);
+	return tsec_standard_init(bis);
+#else
+	return 0;
 #endif
+}
 
+/*
+ * Initializes on-chip MMC controllers.
+ * to override, implement board_mmc_init()
+ */
+int cpu_mmc_init(bd_t *bis)
+{
+#ifdef CONFIG_FSL_ESDHC
+	return fsl_esdhc_mmc_init(bis);
+#else
 	return 0;
+#endif
 }
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index 1038790..f7354d0 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -72,6 +72,8 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 #define CONFIG_BTB			/* toggle branch predition */
 #define CONFIG_ADDR_STREAMING		/* toggle addr streaming */
 
+#define CONFIG_BOARD_EARLY_INIT_F	1	/* Call board_pre_init */
+
 #define CONFIG_ENABLE_36BIT_PHYS	1
 
 #define CONFIG_SYS_MEMTEST_START	0x00000000	/* memtest works on */
@@ -469,6 +471,18 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 
 #undef CONFIG_WATCHDOG			/* watchdog disabled */
 
+#define CONFIG_MMC     1
+
+#ifdef CONFIG_MMC
+#define CONFIG_FSL_ESDHC
+#define CFG_FSL_ESDHC_ADDR	CONFIG_SYS_MPC85xx_ESDHC_ADDR
+#define CONFIG_CMD_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_CMD_EXT2
+#define CONFIG_CMD_FAT
+#define CONFIG_DOS_PARTITION
+#endif
+
 /*
  * Miscellaneous configurable options
  */
-- 
1.5.4.GIT



More information about the U-Boot mailing list