
On 12/05/2012 10:31 PM, Amar wrote:
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 amarendra.xt@samsung.com
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 <netdev.h> #include <spi.h> #include <asm/arch/cpu.h> +#include <asm/arch/dwmmc.h> #include <asm/arch/gpio.h> #include <asm/arch/mmc.h> #include <asm/arch/pinmux.h> @@ -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;
- }
If return error, we didn't need to initialize the MMC0? And why do you initialize the MMC2 before initialized MMC0? I didn't test the this patch, but i think if you inserted SD-card, it didn't work well.
- /*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