From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/8] ARM: am33xx: Make uart0 mux init callable during early init
Date: Thu, 22 Aug 2013 22:36:54 +0200 [thread overview]
Message-ID: <1377203819-23074-4-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1377203819-23074-1-git-send-email-s.hauer@pengutronix.de>
The am33xx pinmux functions use global variables which are not
accessible during early init. To make the setup of an early debug
uart easier convert am33xx_enable_uart0_pin_mux to not use global
variables.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/mach-omap/am33xx_mux.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-omap/am33xx_mux.c b/arch/arm/mach-omap/am33xx_mux.c
index 8318713..e92bc27 100644
--- a/arch/arm/mach-omap/am33xx_mux.c
+++ b/arch/arm/mach-omap/am33xx_mux.c
@@ -21,12 +21,6 @@
#define MUX_CFG(value, offset) \
__raw_writel(value, (AM33XX_CTRL_BASE + offset));
-static const __maybe_unused struct module_pin_mux uart0_pin_mux[] = {
- {OFFSET(uart0_rxd), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* UART0_RXD */
- {OFFSET(uart0_txd), (MODE(0) | PULLUDEN)}, /* UART0_TXD */
- {-1},
-};
-
static const __maybe_unused struct module_pin_mux uart2_pin_mux[] = {
{OFFSET(mii1_txclk), (MODE(1) | PULLUDEN | RXACTIVE)}, /* UART2_RXD */
{OFFSET(mii1_rxclk), (MODE(1) | PULLUDEN)}, /* UART2_TXD */
@@ -299,7 +293,12 @@ void am33xx_enable_i2c2_pin_mux(void)
void am33xx_enable_uart0_pin_mux(void)
{
- configure_module_pin_mux(uart0_pin_mux);
+ /*
+ * no global variables for UART to make this callable
+ * during early init.
+ */
+ MUX_CFG((MODE(0) | PULLUP_EN | RXACTIVE), OFFSET(uart0_rxd));
+ MUX_CFG((MODE(0) | PULLUDEN), OFFSET(uart0_txd));
}
void am33xx_enable_uart2_pin_mux(void)
--
1.8.4.rc3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2013-08-22 20:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-22 20:36 [PATCH] OMAP fixes and beaglebone black support Sascha Hauer
2013-08-22 20:36 ` [PATCH 1/8] ARM: am33xx: Add SRAM0 address/size defines Sascha Hauer
2013-08-22 20:36 ` [PATCH 2/8] ARM: omap: fix omap_save_bootinfo Sascha Hauer
2013-08-22 20:36 ` Sascha Hauer [this message]
2013-08-22 20:36 ` [PATCH 4/8] ARM: cpuinfo: display the core name and version Sascha Hauer
2013-08-22 20:36 ` [PATCH 5/8] ARM: am33xx: implement cpu revision decoding Sascha Hauer
2013-08-22 20:36 ` [PATCH 6/8] ARM: am33xx: beaglebone: split out DDR2 init for BB White Sascha Hauer
2013-08-22 20:36 ` [PATCH 7/8] ARM: am33xx: beaglebone: configure I2C EEPROM Sascha Hauer
2013-08-22 20:36 ` [PATCH 8/8] ARM: am33xx: beaglebone: add support for beaglebone black with DDR3 RAM Sascha Hauer
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=1377203819-23074-4-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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