From: Minkyu Kang <mk7.kang@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/3] board: samsung: trats2: Add DW MMC controller initialization
Date: Thu, 06 Mar 2014 15:58:45 +0900 [thread overview]
Message-ID: <53181CA5.1080402@samsung.com> (raw)
In-Reply-To: <53168481.3080701@samsung.com>
On 05/03/14 10:57, Beomho Seo wrote:
> Add DW MMC controller initialization.
> Selectively use DW MMC controller instead of SDHCI controller.
>
> Signed-off-by: Beomho Seo <beomho.seo@samsung.com>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
> ---
> board/samsung/trats2/trats2.c | 31 +++++++++++++++++++++----------
> 1 file changed, 21 insertions(+), 10 deletions(-)
>
> diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
> index c17c24d..11bebb9 100644
> --- a/board/samsung/trats2/trats2.c
> +++ b/board/samsung/trats2/trats2.c
> @@ -11,6 +11,7 @@
> #include <asm/io.h>
> #include <asm/arch/gpio.h>
> #include <asm/arch/mmc.h>
> +#include <asm/arch/dwmmc.h>
> #include <asm/arch/power.h>
> #include <asm/arch/clk.h>
> #include <asm/arch/clock.h>
> @@ -280,18 +281,19 @@ int board_mmc_init(bd_t *bis)
>
> gpio2 = (struct exynos4x12_gpio_part2 *)samsung_get_base_gpio_part2();
>
> - /* eMMC_EN: SD_0_CDn: GPK0[2] Output High */
> + /* eMMC_EN: SD_0_CDn or SD_4_CDn: GPK0[2] Output High */
> s5p_gpio_direction_output(&gpio2->k0, 2, 1);
> s5p_gpio_set_pull(&gpio2->k0, 2, GPIO_PULL_NONE);
>
> /*
> * eMMC GPIO:
> * SDR 8-bit at 48MHz at MMC0
> - * GPK0[0] SD_0_CLK(2)
> - * GPK0[1] SD_0_CMD(2)
> - * GPK0[2] SD_0_CDn -> Not used
> - * GPK0[3:6] SD_0_DATA[0:3](2)
> - * GPK1[3:6] SD_0_DATA[0:3](3)
> + * SDHCI DW-MMC
> + * GPK0[0] SD_0_CLK(2) SD_4_CLK(3)
> + * GPK0[1] SD_0_CMD(2) SD_4_CMD(3)
> + * GPK0[2] SD_0_CDn SD_4_CDn -> Not used
> + * GPK0[3:6] SD_0_DATA[0:3](2) SD_4_DATA[0:3](3)
> + * GPK1[3:6] SD_0_DATA[4:7](3) SD_4_DATA[4:7](4)
> *
> * DDR 4-bit at 26MHz at MMC4
> * GPK0[0] SD_4_CLK(3)
> @@ -301,17 +303,26 @@ int board_mmc_init(bd_t *bis)
> * GPK1[3:6] SD_4_DATA[4:7](4)
> */
>
> - err0 = exynos_pinmux_config(PERIPH_ID_SDMMC0, PINMUX_FLAG_8BIT_MODE);
> -
> /*
> * MMC device init
> - * mmc0 : eMMC (8-bit buswidth)
> - * mmc2 : SD card (4-bit buswidth)
> + * mmc0 : eMMC, sdhci controller (8-bit buswidth)
> + * mmc2 : SD card, sdhci controller (4-bit buswidth)
> + * mmc4 : eMMC, dw-mmc controller (8-bit buswidth)
> */
> +
> +#ifndef CONFIG_DWMMC
> + err0 = exynos_pinmux_config(PERIPH_ID_SDMMC0, PINMUX_FLAG_8BIT_MODE);
> if (err0)
> debug("SDMMC0 not configured\n");
> else
> err0 = s5p_mmc_init(0, 8);
> +#else
> + err0 = exynos_pinmux_config(PERIPH_ID_SDMMC4, PINMUX_FLAG_8BIT_MODE);
> + if (err0)
> + debug("SDMMC4 not configured\n");
> + else
> + err0 = exynos_dwmci_add_port(4, 0x12550000, 8, 0x00010000);
what means 0x12550000, 0x00010000?
> +#endif
>
> /* T-flash detect */
> s5p_gpio_cfg_pin(&gpio2->x3, 4, 0xf);
>
Thanks,
Minkyu Kang.
next prev parent reply other threads:[~2014-03-06 6:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-05 1:57 [U-Boot] [PATCH 1/3] board: samsung: trats2: Add DW MMC controller initialization Beomho Seo
2014-03-06 6:58 ` Minkyu Kang [this message]
2014-03-06 7:49 ` Beomho Seo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53181CA5.1080402@samsung.com \
--to=mk7.kang@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox