diff options
author | Amar <amarendra.xt@samsung.com> | 2013-04-27 11:42:59 +0530 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2013-06-13 17:35:14 +0900 |
commit | c748be0d30f3df538a897f8aad6db447c1d9580f (patch) | |
tree | aea6c5033b64db0b8c4ea9035b752c67530aa93f /board/samsung/smdk5250/clock_init.c | |
parent | 3690d6d66b8f2d33402ce7c0f0478c8075885291 (diff) | |
download | talos-obmc-uboot-c748be0d30f3df538a897f8aad6db447c1d9580f.tar.gz talos-obmc-uboot-c748be0d30f3df538a897f8aad6db447c1d9580f.zip |
SMDK5250: Enable EMMC booting
This patch adds support for EMMC booting on SMDK5250.
Signed-off-by: Amar <amarendra.xt@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'board/samsung/smdk5250/clock_init.c')
-rw-r--r-- | board/samsung/smdk5250/clock_init.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/board/samsung/smdk5250/clock_init.c b/board/samsung/smdk5250/clock_init.c index 5b9e82fdf7..b288e66f0e 100644 --- a/board/samsung/smdk5250/clock_init.c +++ b/board/samsung/smdk5250/clock_init.c @@ -28,10 +28,14 @@ #include <asm/arch/clk.h> #include <asm/arch/clock.h> #include <asm/arch/spl.h> +#include <asm/arch/dwmmc.h> #include "clock_init.h" #include "setup.h" +#define FSYS1_MMC0_DIV_MASK 0xff0f +#define FSYS1_MMC0_DIV_VAL 0x0701 + DECLARE_GLOBAL_DATA_PTR; struct arm_clk_ratios arm_clk_ratios[] = { @@ -664,3 +668,17 @@ void clock_init_dp_clock(void) /* We run DP at 267 Mhz */ setbits_le32(&clk->div_disp1_0, CLK_DIV_DISP1_0_FIMD1); } + +/* + * Set clock divisor value for booting from EMMC. + * Set DWMMC channel-0 clk div to operate mmc0 device at 50MHz. + */ +void emmc_boot_clk_div_set(void) +{ + struct exynos5_clock *clk = (struct exynos5_clock *)EXYNOS5_CLOCK_BASE; + unsigned int div_mmc; + + div_mmc = readl((unsigned int) &clk->div_fsys1) & ~FSYS1_MMC0_DIV_MASK; + div_mmc |= FSYS1_MMC0_DIV_VAL; + writel(div_mmc, (unsigned int) &clk->div_fsys1); +} |