From patchwork Wed Dec 5 13:31:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,4/4] SMDK5250: Initialise and enable dwmmc channels Date: Wed, 05 Dec 2012 03:31:37 -0000 From: Amar X-Patchwork-Id: 203870 Message-Id: <1354714297-11568-5-git-send-email-amarendra.xt@samsung.com> To: u-boot@lists.denx.de, jh80.chung@samsung.com Cc: afleming@gmail.com, patches@linaro.org This patch initialises and enables dwmmc channels 0 and 2 for SMDK5250. It also initialises the pinmux for the same. Signed-off-by: Amarendra Reddy --- board/samsung/smdk5250/smdk5250.c | 22 +++++++++++++++++++++- include/configs/smdk5250.h | 4 ++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index 4c50342..9503510 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -139,13 +140,32 @@ int board_mmc_init(bd_t *bis) { int err; + err = exynos_pinmux_config(PERIPH_ID_SDMMC2, PINMUX_FLAG_NONE); + if (err) { + debug("SDMMC2 not configured\n"); + return err; + } + + /*SD: dwmmc Channel-2 with 4 bit bus width */ + err = exynos_dwmmc_init(2, 4); + if (err) { + debug("dwmmc Channel-2 init failed\n"); + return err; + } + err = exynos_pinmux_config(PERIPH_ID_SDMMC0, PINMUX_FLAG_8BIT_MODE); if (err) { debug("SDMMC0 not configured\n"); return err; } - err = s5p_mmc_init(0, 8); + /*eMMC: dwmmc Channel-0 with 8 bit bus width */ + err = exynos_dwmmc_init(0, 8); + if (err) { + debug("dwmmc Channel-0 init failed\n"); + return err; + } + return err; } #endif diff --git a/include/configs/smdk5250.h b/include/configs/smdk5250.h index e412da8..7dc2d96 100644 --- a/include/configs/smdk5250.h +++ b/include/configs/smdk5250.h @@ -77,8 +77,8 @@ /* SD/MMC configuration */ #define CONFIG_GENERIC_MMC #define CONFIG_MMC -#define CONFIG_SDHCI -#define CONFIG_S5P_SDHCI +#define CONFIG_DWMMC +#define CONFIG_EXYNOS_DWMMC #define CONFIG_BOARD_EARLY_INIT_F