summaryrefslogtreecommitdiff
path: root/board/freescale/mpc837xerdb
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2009-06-10 00:25:30 +0400
committerWolfgang Denk <wd@denx.de>2009-07-16 22:25:34 +0200
commitc9646ed758804fa1fa6c1425369a4eee5d618b1d (patch)
tree9e07d46150d356b65fafb897580a073d0a77444b /board/freescale/mpc837xerdb
parentb33433a63fe08c9e723ea15a7c7c7143bf527c6d (diff)
downloadu-boot-c9646ed758804fa1fa6c1425369a4eee5d618b1d.tar.gz
mpc83xx: MPC837XERDB: Add support for FSL eSDHC
This patch adds support for eSDHC on MPC837XERDB boards. The WP switch doesn't seem to work on RDB boards though, the WP pin is always asserted (can see the pin state when it's in GPIO mode). FSL DR USB and FSL eSDHC are mutually exclusive because of pins multiplexing, so user should specify 'esdhc' or 'dr_usb' options in the hwconfig environment variable to choose between the devices. p.s. Now we're very close to a monitor len limit (196 bytes left using gcc-4.2.0), so also increase the monitor len by one sector (64 KB). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Kim Phillips <kim.phillips@freescale.com>
Diffstat (limited to 'board/freescale/mpc837xerdb')
-rw-r--r--board/freescale/mpc837xerdb/mpc837xerdb.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/board/freescale/mpc837xerdb/mpc837xerdb.c b/board/freescale/mpc837xerdb/mpc837xerdb.c
index a4a1927df8..c5c2e40833 100644
--- a/board/freescale/mpc837xerdb/mpc837xerdb.c
+++ b/board/freescale/mpc837xerdb/mpc837xerdb.c
@@ -13,12 +13,14 @@
*/
#include <common.h>
+#include <hwconfig.h>
#include <i2c.h>
#include <asm/io.h>
#include <asm/fsl_serdes.h>
#include <fdt_support.h>
#include <spd_sdram.h>
#include <vsc7385.h>
+#include <fsl_esdhc.h>
#if defined(CONFIG_SYS_DRAM_TEST)
int
@@ -166,6 +168,21 @@ int board_early_init_f(void)
return 0;
}
+#ifdef CONFIG_FSL_ESDHC
+int board_mmc_init(bd_t *bd)
+{
+ struct immap __iomem *im = (struct immap __iomem *)CONFIG_SYS_IMMR;
+
+ if (!hwconfig("esdhc"))
+ return 0;
+
+ clrsetbits_be32(&im->sysconf.sicrl, SICRL_USB_B, SICRL_USB_B_SD);
+ clrsetbits_be32(&im->sysconf.sicrh, SICRH_SPI, SICRH_SPI_SD);
+
+ return fsl_esdhc_mmc_init(bd);
+}
+#endif
+
/*
* Miscellaneous late-boot configurations
*
@@ -195,5 +212,6 @@ void ft_board_setup(void *blob, bd_t *bd)
#endif
ft_cpu_setup(blob, bd);
fdt_fixup_dr_usb(blob, bd);
+ fdt_fixup_esdhc(blob, bd);
}
#endif /* CONFIG_OF_BOARD_SETUP */