diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2011-05-17 21:19:17 +0000 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2011-05-26 19:33:09 +0900 |
commit | 68a8cbfad93241387ee1385b9d19e3e2b7919c4e (patch) | |
tree | 0d7664d1ddf1e819f58d593815db7a61f0e2f25d /drivers/mmc | |
parent | 5d845f2758d86f9287e2ac3d48fdcbe80ad1d21b (diff) |
S5P: add set_mmc_clk for external clock control
This patch added set_mmc_clk for external clock control.
c210 didn't support host clock control.
So We need external_clock_control function for c210.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/s5p_mmc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/s5p_mmc.c b/drivers/mmc/s5p_mmc.c index 86447e05bd..280738fbf4 100644 --- a/drivers/mmc/s5p_mmc.c +++ b/drivers/mmc/s5p_mmc.c @@ -22,6 +22,7 @@ #include <mmc.h> #include <asm/io.h> #include <asm/arch/mmc.h> +#include <asm/arch/clk.h> /* support 4 mmc hosts */ struct mmc mmc_dev[4]; @@ -291,6 +292,8 @@ static void mmc_change_clock(struct mmc_host *host, uint clock) clk = (div << 8) | (1 << 0); writew(clk, &host->reg->clkcon); + set_mmc_clk(host->dev_index, div); + /* Wait max 10 ms */ timeout = 10; while (!(readw(&host->reg->clkcon) & (1 << 1))) { @@ -464,6 +467,7 @@ static int s5p_mmc_initialize(int dev_index, int bus_width) mmc->f_min = 400000; mmc->f_max = 52000000; + mmc_host[dev_index].dev_index = dev_index; mmc_host[dev_index].clock = 0; mmc_host[dev_index].reg = s5p_get_base_mmc(dev_index); mmc->b_max = 0; |