All of lore.kernel.org
 help / color / mirror / Atom feed
From: sricharan <r.sricharan@ti.com>
To: r.sricharan@ti.com, linux-omap@vger.kernel.org
Cc: santosh.shilimkar@ti.com, tony@atomide.com, paul@pwsan.com
Subject: [PATCH 2/5] omap4: board-4430sdp: Initialise the serial pads
Date: Fri, 28 Jan 2011 10:38:15 +0530	[thread overview]
Message-ID: <1296191298-17545-3-git-send-email-r.sricharan@ti.com> (raw)
In-Reply-To: <1296191298-17545-1-git-send-email-r.sricharan@ti.com>

Use the mux framework to initialise the serial pads.

Signed-off-by: sricharan <r.sricharan@ti.com>
---
 arch/arm/mach-omap2/board-4430sdp.c |   73 ++++++++++++++++++++++++++++++++++-
 1 files changed, 72 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 1cb208b..d77f099 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -537,8 +537,79 @@ static void __init omap_sfh7741prox_init(void)
 static struct omap_board_mux board_mux[] __initdata = {
 	{ .reg_offset = OMAP_MUX_TERMINATOR },
 };
+
+static struct omap_device_pad serial2_pads[] __initdata = {
+	{ .name   = "uart2_cts.uart2_cts",
+	  .enable = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	  .flags  = OMAP_DEVICE_PAD_REMUX_IDLE,
+	  .idle   = OMAP_MUX_MODE7,
+	},
+	{ .name   = "uart2_rts.uart2_rts",
+	  .enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{ .name   = "uart2_rx.uart2_rx",
+	  .enable = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+	{ .name   = "uart2_tx.uart2_tx",
+	  .enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+};
+
+static struct omap_device_pad serial3_pads[] __initdata = {
+	{ .name   = "uart3_cts_rctx.uart3_cts_rctx",
+	  .enable = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0,
+	},
+	{ .name   = "uart3_rts_sd.uart3_rts_sd",
+	  .enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+	{ .name   = "uart3_rx_irrx.uart3_rx_irrx",
+	  .enable = OMAP_PIN_INPUT | OMAP_MUX_MODE0,
+	},
+	{ .name   = "uart3_tx_irtx.uart3_tx_irtx",
+	  .enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+};
+
+static struct omap_device_pad serial4_pads[] __initdata = {
+	{ .name   = "uart4_rx.uart4_rx",
+	  .enable = OMAP_PIN_INPUT | OMAP_MUX_MODE0,
+	},
+	{ .name   = "uart4_tx.uart4_tx",
+	  .enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE0,
+	},
+};
+
+static struct omap_board_data serial2_data = {
+	.id		= 1,
+	.pads		= serial2_pads,
+	.pads_cnt	= ARRAY_SIZE(serial2_pads),
+};
+
+static struct omap_board_data serial3_data = {
+	.id		= 2,
+	.pads		= serial3_pads,
+	.pads_cnt	= ARRAY_SIZE(serial3_pads),
+};
+
+static struct omap_board_data serial4_data = {
+	.id		= 3,
+	.pads		= serial4_pads,
+	.pads_cnt	= ARRAY_SIZE(serial4_pads),
+};
+
+static inline void board_serial_init(void)
+{
+	omap_serial_init_port(&serial2_data);
+	omap_serial_init_port(&serial3_data);
+	omap_serial_init_port(&serial4_data);
+}
 #else
 #define board_mux	NULL
+
+static inline void board_serial_init(void)
+{
+	omap_serial_init();
+}
 #endif
 
 static void __init omap_4430sdp_init(void)
@@ -553,7 +624,7 @@ static void __init omap_4430sdp_init(void)
 	omap4_i2c_init();
 	omap_sfh7741prox_init();
 	platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
-	omap_serial_init();
+	board_serial_init();
 	omap4_twl6030_hsmmc_init(mmc);
 	/* OMAP4 SDP uses internal transceiver so register nop transceiver */
 	usb_nop_xceiv_register();
-- 
1.7.0.4


  parent reply	other threads:[~2011-01-28  5:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-28  5:08 [PATCH 0/5] omap2+: mux: Add support for static and dynamic pads sricharan
2011-01-28  5:08 ` [PATCH 1/5] omap2+: mux: Seperate the pads of a hwmod as static and dynamic sricharan
2011-01-28 20:49   ` Anand Gadiyar
2011-01-31 14:20     ` Sricharan R
2011-02-23 18:49   ` Tony Lindgren
2011-02-25 13:21     ` Sricharan R
2011-01-28  5:08 ` sricharan [this message]
2011-02-23 18:49   ` [PATCH 2/5] omap4: board-4430sdp: Initialise the serial pads Tony Lindgren
2011-02-25 13:21     ` Sricharan R
2011-01-28  5:08 ` [PATCH 3/5] omap3: board-3430sdp: " sricharan
2011-01-28  5:08 ` [PATCH 4/5] omap4: board-omap4panda: " sricharan
2011-01-28 20:53   ` Anand Gadiyar
2011-01-31 14:20     ` Sricharan R
2011-02-23 18:49   ` Tony Lindgren
2011-02-25 13:22     ` Sricharan R
2011-01-28  5:08 ` [PATCH 5/5] omap2+: board-n8x0: Change the flags for " sricharan
2011-02-23 18:49   ` Tony Lindgren
2011-02-25 13:21     ` Sricharan R
2011-02-10 12:04 ` [PATCH 0/5] omap2+: mux: Add support for static and dynamic pads Sricharan R

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=1296191298-17545-3-git-send-email-r.sricharan@ti.com \
    --to=r.sricharan@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=santosh.shilimkar@ti.com \
    --cc=tony@atomide.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.