mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
mmc: dw_mmc: remove the exynos specific code in dw-mmc.c
dw-mmc.c is the general driver file. So, remove the exynos specific code at dw-mmc.c. Instead, exynos specific cod can be move into exynos-dw_mmc.c. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com> Acked-by: Minkyu Kang <mk7.kang@samsung.com>
This commit is contained in:
committed by
Pantelis Antoniou
parent
f44483b57c
commit
18ab675597
@@ -11,7 +11,6 @@
|
|||||||
#include <mmc.h>
|
#include <mmc.h>
|
||||||
#include <dwmmc.h>
|
#include <dwmmc.h>
|
||||||
#include <asm-generic/errno.h>
|
#include <asm-generic/errno.h>
|
||||||
#include <asm/arch/dwmmc.h>
|
|
||||||
|
|
||||||
#define PAGE_SIZE 4096
|
#define PAGE_SIZE 4096
|
||||||
|
|
||||||
@@ -302,15 +301,8 @@ static int dwmci_init(struct mmc *mmc)
|
|||||||
struct dwmci_host *host = (struct dwmci_host *)mmc->priv;
|
struct dwmci_host *host = (struct dwmci_host *)mmc->priv;
|
||||||
u32 fifo_size;
|
u32 fifo_size;
|
||||||
|
|
||||||
if (host->quirks & DWMCI_QUIRK_DISABLE_SMU) {
|
if (host->board_init)
|
||||||
dwmci_writel(host, EMMCP_MPSBEGIN0, 0);
|
host->board_init(host);
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
dwmci_writel(host, DWMCI_PWREN, 1);
|
dwmci_writel(host, DWMCI_PWREN, 1);
|
||||||
|
|
||||||
|
@@ -34,6 +34,19 @@ unsigned int exynos_dwmci_get_clk(int dev_index)
|
|||||||
return get_mmc_clk(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.
|
* This function adds the mmc channel to be registered with mmc core.
|
||||||
* index - mmc channel number.
|
* 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
|
#ifdef CONFIG_EXYNOS5420
|
||||||
host->quirks = DWMCI_QUIRK_DISABLE_SMU;
|
host->quirks = DWMCI_QUIRK_DISABLE_SMU;
|
||||||
#endif
|
#endif
|
||||||
|
host->board_init = exynos_dwmci_board_init;
|
||||||
|
|
||||||
if (clksel) {
|
if (clksel) {
|
||||||
host->clksel_val = clksel;
|
host->clksel_val = clksel;
|
||||||
|
@@ -141,6 +141,7 @@ struct dwmci_host {
|
|||||||
struct mmc *mmc;
|
struct mmc *mmc;
|
||||||
|
|
||||||
void (*clksel)(struct dwmci_host *host);
|
void (*clksel)(struct dwmci_host *host);
|
||||||
|
void (*board_init)(struct dwmci_host *host);
|
||||||
unsigned int (*get_mmc_clk)(int dev_index);
|
unsigned int (*get_mmc_clk)(int dev_index);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user