From: Pavel Machek Date: Mon, 8 Sep 2014 12:08:45 +0000 (+0200) Subject: arm: socfpga: misc: Add SD controller init X-Git-Tag: v2014.10-rc3~2^2~20 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4e736869c6e0df7a955fd000681d6ceea636928c;p=u-boot arm: socfpga: misc: Add SD controller init Add CPU function to register and initialize the dw_mmc SD controller. This allows us to use the HPS SDMMC block. Signed-off-by: Pavel Machek Signed-off-by: Marek Vasut Cc: Chin Liang See Cc: Dinh Nguyen Cc: Albert Aribaud Cc: Tom Rini Cc: Wolfgang Denk Cc: Pavel Machek --- diff --git a/arch/arm/cpu/armv7/socfpga/misc.c b/arch/arm/cpu/armv7/socfpga/misc.c index 872ea59c64..bf5c668b13 100644 --- a/arch/arm/cpu/armv7/socfpga/misc.c +++ b/arch/arm/cpu/armv7/socfpga/misc.c @@ -10,6 +10,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -61,6 +62,18 @@ int cpu_eth_init(bd_t *bis) } #endif +#ifdef CONFIG_DWMMC +/* + * Initializes MMC controllers. + * to override, implement board_mmc_init() + */ +int cpu_mmc_init(bd_t *bis) +{ + return socfpga_dwmmc_init(SOCFPGA_SDMMC_ADDRESS, + CONFIG_HPS_SDMMC_BUSWIDTH, 0); +} +#endif + #if defined(CONFIG_DISPLAY_CPUINFO) /* * Print CPU information