diff options
author | Anselm Busse <anselm.busse@outlook.com> | 2019-07-31 17:30:28 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-08-12 07:24:29 -0400 |
commit | 2800bb155b57b5e6a25e4bbc1e30e9032a03f197 (patch) | |
tree | add3c663451ddd1d46346f94f1125bcc33813991 /board/overo/common.c | |
parent | 490e6d68597dc41d6d2a767927652470b19c2bd9 (diff) | |
download | u-boot-2800bb155b57b5e6a25e4bbc1e30e9032a03f197.tar.gz |
ARM: omap3: overo: Fix MMC init for SPL
The SPL for the Overo board does not initialise the MMC. Hence, it
cannot load the main boot loader from the SD card susequently. This
patch moves the initialisation code for the MMC so it gets included in
the SPL.
[trini: Add missing header]
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/overo/common.c')
-rw-r--r-- | board/overo/common.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/board/overo/common.c b/board/overo/common.c index fc02d66d53..2c4f412e5d 100644 --- a/board/overo/common.c +++ b/board/overo/common.c @@ -17,6 +17,7 @@ #include <asm/arch/mux.h> #include <asm/arch/sys_proto.h> #include <asm/gpio.h> +#include <asm/omap_mmc.h> #include <asm/mach-types.h> DECLARE_GLOBAL_DATA_PTR; @@ -38,6 +39,31 @@ int board_init(void) return 0; } +#if defined(CONFIG_MMC) +int board_mmc_init(bd_t *bis) +{ + return omap_mmc_init(0, 0, 0, -1, -1); +} +#endif + +#if defined(CONFIG_MMC) +void board_mmc_power_init(void) +{ + twl4030_power_mmc_init(0); +} +#endif + +#if defined(CONFIG_SPL_OS_BOOT) +int spl_start_uboot(void) +{ + /* break into full u-boot on 'c' */ + if (serial_tstc() && serial_getc() == 'c') + return 1; + + return 0; +} +#endif /* CONFIG_SPL_OS_BOOT */ + #define MUX_OVERO() \ /*SDRC*/\ MUX_VAL(CP(SDRC_D0), (IEN | PTD | DIS | M0)) /*SDRC_D0*/\ |