diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/dw_mmc.c | 12 | ||||
-rw-r--r-- | drivers/mmc/exynos_dw_mmc.c | 14 |
2 files changed, 16 insertions, 10 deletions
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 1e0f72bbe7..38f50ce0d8 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -11,7 +11,6 @@ #include <mmc.h> #include <dwmmc.h> #include <asm-generic/errno.h> -#include <asm/arch/dwmmc.h> #define PAGE_SIZE 4096 @@ -302,15 +301,8 @@ static int dwmci_init(struct mmc *mmc) struct dwmci_host *host = (struct dwmci_host *)mmc->priv; u32 fifo_size; - if (host->quirks & DWMCI_QUIRK_DISABLE_SMU) { - dwmci_writel(host, EMMCP_MPSBEGIN0, 0); - dwmci_writel(host, EMMCP_SEND0, 0); - dwmci_writel(host, EMMCP_CTRL0, - MPSCTRL_SECURE_READ_BIT | - MPSCTRL_SECURE_WRITE_BIT | - MPSCTRL_NON_SECURE_READ_BIT | - MPSCTRL_NON_SECURE_WRITE_BIT | MPSCTRL_VALID); - } + if (host->board_init) + host->board_init(host); dwmci_writel(host, DWMCI_PWREN, 1); diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c index a0f1511cb6..b3e5c5e5e0 100644 --- a/drivers/mmc/exynos_dw_mmc.c +++ b/drivers/mmc/exynos_dw_mmc.c @@ -34,6 +34,19 @@ unsigned int exynos_dwmci_get_clk(int dev_index) return get_mmc_clk(dev_index); } +static void exynos_dwmci_board_init(struct dwmci_host *host) +{ + if (host->quirks & DWMCI_QUIRK_DISABLE_SMU) { + dwmci_writel(host, EMMCP_MPSBEGIN0, 0); + dwmci_writel(host, EMMCP_SEND0, 0); + dwmci_writel(host, EMMCP_CTRL0, + MPSCTRL_SECURE_READ_BIT | + MPSCTRL_SECURE_WRITE_BIT | + MPSCTRL_NON_SECURE_READ_BIT | + MPSCTRL_NON_SECURE_WRITE_BIT | MPSCTRL_VALID); + } +} + /* * This function adds the mmc channel to be registered with mmc core. * index - mmc channel number. @@ -65,6 +78,7 @@ int exynos_dwmci_add_port(int index, u32 regbase, int bus_width, u32 clksel) #ifdef CONFIG_EXYNOS5420 host->quirks = DWMCI_QUIRK_DISABLE_SMU; #endif + host->board_init = exynos_dwmci_board_init; if (clksel) { host->clksel_val = clksel; |