Commit 4e736869c6e0df7a955fd000681d6ceea636928c

Authored by Pavel Machek
Committed by Marek Vasut
1 parent 45d6e67710

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 <pavel@denx.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Pavel Machek <pavel@denx.de>

Showing 1 changed file with 13 additions and 0 deletions Side-by-side Diff

arch/arm/cpu/armv7/socfpga/misc.c
... ... @@ -10,6 +10,7 @@
10 10 #include <netdev.h>
11 11 #include <asm/arch/reset_manager.h>
12 12 #include <asm/arch/system_manager.h>
  13 +#include <asm/arch/dwmmc.h>
13 14  
14 15 DECLARE_GLOBAL_DATA_PTR;
15 16  
... ... @@ -58,6 +59,18 @@
58 59 /* initialize and register the emac */
59 60 return designware_initialize(CONFIG_EMAC_BASE,
60 61 CONFIG_PHY_INTERFACE_MODE);
  62 +}
  63 +#endif
  64 +
  65 +#ifdef CONFIG_DWMMC
  66 +/*
  67 + * Initializes MMC controllers.
  68 + * to override, implement board_mmc_init()
  69 + */
  70 +int cpu_mmc_init(bd_t *bis)
  71 +{
  72 + return socfpga_dwmmc_init(SOCFPGA_SDMMC_ADDRESS,
  73 + CONFIG_HPS_SDMMC_BUSWIDTH, 0);
61 74 }
62 75 #endif
63 76