From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [linux-sunxi] [PATCH v5 7/8] sunxi: mmc support
Date: Mon, 05 May 2014 14:18:07 +0200 [thread overview]
Message-ID: <5367817F.4040509@denx.de> (raw)
In-Reply-To: <1399287150-31170-7-git-send-email-ijc@hellion.org.uk>
On 05.05.2014 12:52, Ian Campbell wrote:
> This adds support for the MMC controller on the Allwinner A20 (sun7i)
> processor.
>
> Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net>
> Signed-off-by: Luke Leighton <lkcl@lkcl.net>
> Signed-off-by: Oliver Schinagl <oliver@schinagl.nl>
> Signed-off-by: Wills Wang <wills.wang.open@gmail.com>
> Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
> Reviewed-by: Marek Vasut <marex@denx.de>
> Cc: Stefan Roese <sr@denx.de>
> Cc: Tom Cubie <Mr.hipboi@gmail.com>
> Cc: Aaron Maoye <leafy.myeh@allwinnertech.com>
> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
Ian, thanks a lot for your endurance and patience to get this sunxi stuff
upstream. Really appreciated. One comment below:
<snip>
> diff --git a/board/sunxi/board.c b/board/sunxi/board.c
> index 328334a..dc7f636 100644
> --- a/board/sunxi/board.c
> +++ b/board/sunxi/board.c
> @@ -14,6 +14,8 @@
> #include <common.h>
> #include <asm/arch/clock.h>
> #include <asm/arch/dram.h>
> +#include <asm/arch/gpio.h>
> +#include <asm/arch/mmc.h>
>
> DECLARE_GLOBAL_DATA_PTR;
>
> @@ -43,6 +45,76 @@ int dram_init(void)
> return 0;
> }
>
> +#ifdef CONFIG_GENERIC_MMC
> +static void mmc_pinmux_setup(int sdc)
> +{
> + unsigned int pin;
> +
> + switch (sdc) {
> + case 0:
> + /* D1-PF0, D0-PF1, CLK-PF2, CMD-PF3, D3-PF4, D4-PF5 */
> + for (pin = SUNXI_GPF(0); pin <= SUNXI_GPF(5); pin++) {
> + sunxi_gpio_set_cfgpin(pin, SUNXI_GPF0_SDC0);
> + sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);
> + sunxi_gpio_set_drv(pin, 2);
> + }
> + break;
> +
> + case 1:
> +#if CONFIG_MMC1_PG
> + /* PG0-CMD, PG1-CLK, PG2~5-D0~3 : 4 */
> + for (pin = SUNXI_GPG(0); pin <= SUNXI_GPG(5); pin++) {
> + sunxi_gpio_set_cfgpin(pin, SUN4I_GPG0_SDC1);
> + sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);
> + sunxi_gpio_set_drv(pin, 2);
> + }
> +#else
> + /* PH22-CMD, PH23-CLK, PH24~27-D0~D3 : 5 */
> + for (pin = SUNXI_GPH(22); pin <= SUNXI_GPH(27); pin++) {
> + sunxi_gpio_set_cfgpin(pin, SUN4I_GPH22_SDC1);
> + sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);
> + sunxi_gpio_set_drv(pin, 2);
> + }
> +#endif
Are you sure that this is correct and shouldn't be:
+#ifdef CONFIG_MMC1_PG
?
A quick scan through this patch series shows that this define
is not set at all. Perhaps its outdated? Or is it used to support
some other sunxi SoC? Not sure, perhaps it should be removed for
now.
Other than this please add my:
Reviewed-by: Stefan Roese <sr@denx.de>
Thanks,
Stefan
next prev parent reply other threads:[~2014-05-05 12:18 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-05 10:52 [U-Boot] [PATCH v5 0/8] sunxi: initial upstreaming effort Ian Campbell
2014-05-05 10:52 ` [U-Boot] [PATCH v5 1/8] sunxi: add sun7i clocks and timer support Ian Campbell
2014-05-09 17:54 ` Tom Rini
2014-05-05 10:52 ` [U-Boot] [PATCH v5 2/8] sunxi: add sun7i pinmux and gpio support Ian Campbell
2014-05-09 17:54 ` Tom Rini
2014-05-05 10:52 ` [U-Boot] [PATCH v5 3/8] sunxi: add sun7i dram setup support Ian Campbell
2014-05-09 17:54 ` Tom Rini
2014-05-05 10:52 ` [U-Boot] [PATCH v5 4/8] sunxi: add sun7i cpu, board and start of day support Ian Campbell
2014-05-09 17:54 ` Tom Rini
2014-05-05 10:52 ` [U-Boot] [PATCH v5 5/8] sunxi: add support for Cubietruck booting in FEL mode Ian Campbell
2014-06-03 6:11 ` Masahiro Yamada
2014-06-03 7:23 ` Ian Campbell
2014-05-05 10:52 ` [U-Boot] [PATCH v5 6/8] sunxi: add gmac Ethernet support Ian Campbell
2014-05-09 17:54 ` Tom Rini
2014-05-05 10:52 ` [U-Boot] [PATCH v5 7/8] sunxi: mmc support Ian Campbell
2014-05-05 12:18 ` Stefan Roese [this message]
2014-05-05 13:42 ` [U-Boot] [linux-sunxi] " Ian Campbell
2014-05-09 17:54 ` Tom Rini
2014-05-05 10:52 ` [U-Boot] [PATCH v5 8/8] sunxi: non-FEL SPL boot support for sun7i Ian Campbell
2014-05-09 17:54 ` Tom Rini
2014-05-09 20:14 ` Ian Campbell
2014-05-09 20:21 ` Tom Rini
2014-05-05 11:46 ` [U-Boot] [PATCH v5 0/8] sunxi: initial upstreaming effort Marek Vasut
2014-05-25 15:02 ` Albert ARIBAUD
2014-05-25 15:12 ` Marek Vasut
2014-05-25 17:24 ` Ian Campbell
2014-05-25 18:33 ` Maxime Ripard
2014-05-25 19:35 ` Hans de Goede
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=5367817F.4040509@denx.de \
--to=sr@denx.de \
--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