From: Ian Campbell <ijc@hellion.org.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/9] ARM: sunxi: Add support for uart0 on port F (mmc0)
Date: Sat, 11 Oct 2014 16:53:40 +0100 [thread overview]
Message-ID: <1413042820.11505.38.camel@hellion.org.uk> (raw)
In-Reply-To: <1412665917-29731-4-git-send-email-wens@csie.org>
On Tue, 2014-10-07 at 15:11 +0800, Chen-Yu Tsai wrote:
> Allwinner SoCs provide uart0 muxed with mmc0, which can then be used
> with a micro SD breakout board. On the A23, this is the only way to
> use uart0.
>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
> ---
> arch/arm/cpu/armv7/sunxi/board.c | 11 ++++++++++-
> include/configs/sunxi-common.h | 2 ++
> 2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
> index b6d63db..29d45b6 100644
> --- a/arch/arm/cpu/armv7/sunxi/board.c
> +++ b/arch/arm/cpu/armv7/sunxi/board.c
> @@ -50,7 +50,16 @@ u32 spl_boot_mode(void)
>
> int gpio_init(void)
> {
> -#if CONFIG_CONS_INDEX == 1 && (defined(CONFIG_SUN4I) || defined(CONFIG_SUN7I))
> +#if CONFIG_CONS_INDEX == 1 && defined(CONFIG_UART0_PORT_F)
> +#if defined(CONFIG_SUN4I) || defined(CONFIG_SUN7I)
> + /* disable GPB22,23 as uart0 tx,rx to avoid conflict */
> + sunxi_gpio_set_cfgpin(SUNXI_GPB(22), SUNXI_GPIO_INPUT);
> + sunxi_gpio_set_cfgpin(SUNXI_GPB(23), SUNXI_GPIO_INPUT);
> +#endif
> + sunxi_gpio_set_cfgpin(SUNXI_GPF(2), SUNXI_GPF2_UART0_TX);
> + sunxi_gpio_set_cfgpin(SUNXI_GPF(4), SUNXI_GPF4_UART0_RX);
> + sunxi_gpio_set_pull(SUNXI_GPF(4), 1);
> +#elif CONFIG_CONS_INDEX == 1 && (defined(CONFIG_SUN4I) || defined(CONFIG_SUN7I))
> sunxi_gpio_set_cfgpin(SUNXI_GPB(22), SUN4I_GPB22_UART0_TX);
> sunxi_gpio_set_cfgpin(SUNXI_GPB(23), SUN4I_GPB23_UART0_RX);
> sunxi_gpio_set_pull(SUNXI_GPB(23), SUNXI_GPIO_PULL_UP);
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index 7571e0e..7857a56 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -77,6 +77,7 @@
> #define CONFIG_INITRD_TAG
>
> /* mmc config */
> +#if !defined(CONFIG_UART0_PORT_F)
> #define CONFIG_MMC
> #define CONFIG_GENERIC_MMC
> #define CONFIG_CMD_MMC
> @@ -84,6 +85,7 @@
> #define CONFIG_MMC_SUNXI_SLOT 0
> #define CONFIG_ENV_IS_IN_MMC
> #define CONFIG_SYS_MMC_ENV_DEV 0 /* first detected MMC controller */
> +#endif
>
> /* 4MB of malloc() pool */
> #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (4 << 20))
next prev parent reply other threads:[~2014-10-11 15:53 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 7:11 [U-Boot] [PATCH 0/9] ARM: sunxi: Add Allwinner A23 (sun8i) support Chen-Yu Tsai
2014-10-07 7:11 ` [U-Boot] [PATCH 1/9] ARM: sunxi: Fix build break when CONFIG_MMC is not defined Chen-Yu Tsai
2014-10-11 15:50 ` Ian Campbell
2014-10-12 8:58 ` Hans de Goede
2014-10-07 7:11 ` [U-Boot] [PATCH 2/9] ARM: sunxi: Add sun8i (A23) UART0 pin mux support Chen-Yu Tsai
2014-10-11 15:51 ` Ian Campbell
2014-10-07 7:11 ` [U-Boot] [PATCH 3/9] ARM: sunxi: Add support for uart0 on port F (mmc0) Chen-Yu Tsai
2014-10-11 15:53 ` Ian Campbell [this message]
2014-10-07 7:11 ` [U-Boot] [PATCH 4/9] mmc: sunxi: Add support for sun8i (A23) Chen-Yu Tsai
2014-10-11 15:54 ` Ian Campbell
2014-10-07 7:11 ` [U-Boot] [PATCH 5/9] ARM: sunxi: Add basic A23 support Chen-Yu Tsai
2014-10-11 15:58 ` Ian Campbell
2014-10-12 2:43 ` Chen-Yu Tsai
2014-10-12 9:33 ` Ian Campbell
2014-10-07 7:11 ` [U-Boot] [PATCH 6/9] ARM: sunxi: Add support for R_PIO gpio banks Chen-Yu Tsai
2014-10-11 16:05 ` Ian Campbell
2014-10-12 8:23 ` Chen-Yu Tsai
2014-10-12 9:34 ` Ian Campbell
2014-10-13 12:57 ` Maxime Ripard
2014-10-17 14:48 ` [U-Boot] [linux-sunxi] " Chen-Yu Tsai
2014-10-21 18:55 ` Ian Campbell
2014-10-07 7:11 ` [U-Boot] [PATCH 7/9] ARM: sunxi: Allow specifying module in prcm apb0 init function Chen-Yu Tsai
2014-10-11 16:11 ` Ian Campbell
2014-10-11 16:13 ` Ian Campbell
2014-10-12 8:15 ` Chen-Yu Tsai
2014-10-07 7:11 ` [U-Boot] [PATCH 8/9] ARM: sunxi: Add support for using R_UART as console Chen-Yu Tsai
2014-10-11 16:15 ` Ian Campbell
2014-10-07 7:11 ` [U-Boot] [PATCH 9/9] ARM: sunxi: Add Ippo-q8h-v5 A23 tablet board defconfig Chen-Yu Tsai
2014-10-11 16:17 ` Ian Campbell
2014-10-12 8:13 ` Chen-Yu Tsai
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=1413042820.11505.38.camel@hellion.org.uk \
--to=ijc@hellion.org.uk \
--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