From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaehoon Chung Date: Thu, 06 Dec 2012 13:08:50 +0900 Subject: [U-Boot] [PATCH 4/4] SMDK5250: Initialise and enable dwmmc channels In-Reply-To: <1354714297-11568-5-git-send-email-amarendra.xt@samsung.com> References: <1354714297-11568-1-git-send-email-amarendra.xt@samsung.com> <1354714297-11568-5-git-send-email-amarendra.xt@samsung.com> Message-ID: <50C01A52.1040004@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > --- > 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; > + } 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 > >