From patchwork Fri Jan 28 05:08:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: R Sricharan X-Patchwork-Id: 514001 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0S56BBL032010 for ; Fri, 28 Jan 2011 05:11:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751457Ab1A1FGM (ORCPT ); Fri, 28 Jan 2011 00:06:12 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:33961 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751345Ab1A1FGJ (ORCPT ); Fri, 28 Jan 2011 00:06:09 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id p0S565WZ000847 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 27 Jan 2011 23:06:07 -0600 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p0S55u7I000730; Fri, 28 Jan 2011 10:36:01 +0530 (IST) From: sricharan To: r.sricharan@ti.com, linux-omap@vger.kernel.org Cc: santosh.shilimkar@ti.com, tony@atomide.com, paul@pwsan.com Subject: [PATCH 4/5] omap4: board-omap4panda: Initialise the serial pads Date: Fri, 28 Jan 2011 10:38:17 +0530 Message-Id: <1296191298-17545-5-git-send-email-r.sricharan@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1296191298-17545-1-git-send-email-r.sricharan@ti.com> References: <1296191298-17545-1-git-send-email-r.sricharan@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 28 Jan 2011 05:11:12 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index b43e3ff..9688ea9 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c @@ -370,13 +370,83 @@ static int __init omap4_panda_i2c_init(void) omap_register_i2c_bus(4, 400, NULL, 0); return 0; } - #ifdef CONFIG_OMAP_MUX 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 omap4_panda_init(void)