From patchwork Thu Aug 18 21:50:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gardiner X-Patchwork-Id: 1078082 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7ILrIZZ017466 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 18 Aug 2011 21:53:39 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QuAWH-00053V-5O; Thu, 18 Aug 2011 21:52:57 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QuAVx-0002EP-JU; Thu, 18 Aug 2011 21:52:37 +0000 Received: from na3sys009aog104.obsmtp.com ([74.125.149.73]) by canuck.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1QuAV6-0001p1-Sy for linux-arm-kernel@lists.infradead.org; Thu, 18 Aug 2011 21:51:46 +0000 Received: from mail-yw0-f48.google.com ([209.85.213.48]) (using TLSv1) by na3sys009aob104.postini.com ([74.125.148.12]) with SMTP ID DSNKTk2JQ//AWbb76K6nGYzrc0/nLDvOiPmV@postini.com; Thu, 18 Aug 2011 14:51:01 PDT Received: by mail-yw0-f48.google.com with SMTP id 26so2204057ywb.7 for ; Thu, 18 Aug 2011 14:50:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nanometrics.ca; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references; bh=Y93AQkpVjdoSX+iMjqw3X/s+Xz2RzGSBP6BCIdC3Kok=; b=qvrYCQB2So4xW8rD5GBkbO3OpCjU/S4i9cPp4zv+c0Vh8CwD3av28D6X1jfqwlUu8s epdlcY5p1IkB+uXf+ztpc5zQ1N5TFNAChrIVpj9gPOG220OY+d6XZz5QD/pwgQA+5pup cEaIs3gLPRPu8BpjlH273TDP1qolaBi5/+uh8= Received: by 10.236.78.2 with SMTP id f2mr1613980yhe.46.1313704259547; Thu, 18 Aug 2011 14:50:59 -0700 (PDT) Received: from localhost.localdomain ([206.191.47.130]) by mx.google.com with ESMTPS id s62sm2485298yhn.19.2011.08.18.14.50.57 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 18 Aug 2011 14:50:58 -0700 (PDT) From: Ben Gardiner To: Sekhar Nori , davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH 4/5] ARM: davinci: da850, omapl138: share the davinci_uart_config Date: Thu, 18 Aug 2011 17:50:50 -0400 Message-Id: <69e35d4eac3c4a52d7896bc18c69b4578d1b15b3.1313702401.git.bengardiner@nanometrics.ca> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110818_175145_295805_F147A9C7 X-CRM114-Status: GOOD ( 14.98 ) X-Spam-Score: -2.4 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.73 listed in list.dnswl.org] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: James Nuss , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 18 Aug 2011 21:53:39 +0000 (UTC) Extract the common davinci_uart_config.enabled_uarts=0x7 passed to davinci_serial_init() from all of the da850/omapl138 boards to the da850-reference object introduced in a previous commit. Signed-off-by: Ben Gardiner Reviewed-by: James Nuss --- arch/arm/mach-davinci/board-da850-evm.c | 6 +----- arch/arm/mach-davinci/board-mityomapl138.c | 6 +----- arch/arm/mach-davinci/board-omapl138-hawk.c | 6 +----- arch/arm/mach-davinci/da850-reference.c | 9 +++++++++ .../mach-davinci/include/mach/da850-reference.h | 1 + 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 109b016..18e60e3 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -704,10 +704,6 @@ static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = { .bus_delay = 0, /* usec */ }; -static struct davinci_uart_config da850_evm_uart_config __initdata = { - .enabled_uarts = 0x7, -}; - /* davinci da850 evm audio machine driver */ static u8 da850_iis_serializer_direction[] = { INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, @@ -1174,7 +1170,7 @@ static __init void da850_evm_init(void) " %d\n", ret); } - davinci_serial_init(&da850_evm_uart_config); + da850_reference_serial_init(); i2c_register_board_info(1, da850_evm_i2c_devices, ARRAY_SIZE(da850_evm_i2c_devices)); diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index 998cd2e..d3cd099 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c @@ -433,10 +433,6 @@ static void __init mityomapl138_setup_nand(void) ARRAY_SIZE(mityomapl138_devices)); } -static struct davinci_uart_config mityomapl138_uart_config __initdata = { - .enabled_uarts = 0x7, -}; - static const short mityomap_mii_pins[] = { DA850_MII_TXEN, DA850_MII_TXCLK, DA850_MII_COL, DA850_MII_TXD_3, DA850_MII_TXD_2, DA850_MII_TXD_1, DA850_MII_TXD_0, DA850_MII_RXER, @@ -516,7 +512,7 @@ static void __init mityomapl138_init(void) if (ret) pr_warning("watchdog registration failed: %d\n", ret); - davinci_serial_init(&mityomapl138_uart_config); + da850_reference_serial_init(); ret = da8xx_register_i2c(0, &mityomap_i2c_0_pdata); if (ret) diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c index 73d826d..d5ead44 100644 --- a/arch/arm/mach-davinci/board-omapl138-hawk.c +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c @@ -294,15 +294,11 @@ usb11_setup_oc_fail: gpio_free(DA850_USB1_VBUS_PIN); } -static struct davinci_uart_config omapl138_hawk_uart_config __initdata = { - .enabled_uarts = 0x7, -}; - static __init void omapl138_hawk_init(void) { int ret; - davinci_serial_init(&omapl138_hawk_uart_config); + da850_reference_serial_init(); omapl138_hawk_config_emac(); diff --git a/arch/arm/mach-davinci/da850-reference.c b/arch/arm/mach-davinci/da850-reference.c index 25df6476..e4f5072 100644 --- a/arch/arm/mach-davinci/da850-reference.c +++ b/arch/arm/mach-davinci/da850-reference.c @@ -20,3 +20,12 @@ int da850_reference_add_preferred_console(void) { return add_preferred_console("ttyS", 2, "115200"); } + +static struct davinci_uart_config da850_reference_uart_config __initdata = { + .enabled_uarts = 0x7, +}; + +void da850_reference_serial_init(void) +{ + davinci_serial_init(&da850_reference_uart_config); +} diff --git a/arch/arm/mach-davinci/include/mach/da850-reference.h b/arch/arm/mach-davinci/include/mach/da850-reference.h index ed72c53..d6e0b28 100644 --- a/arch/arm/mach-davinci/include/mach/da850-reference.h +++ b/arch/arm/mach-davinci/include/mach/da850-reference.h @@ -15,5 +15,6 @@ void __init da850_reference_map_io(void); int da850_reference_add_preferred_console(void); +void da850_reference_serial_init(void); #endif /* __ASM_ARCH_DAVINCI_DA850_REFERENCE_H */