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: 1078052 Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7ILqw4R025651 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Aug 2011 21:53:19 GMT Received: from dlep34.itg.ti.com ([157.170.170.115]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p7ILq7oB001239 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Aug 2011 16:52:07 -0500 Received: from linux.omap.com (smtp-le.itg.ti.com [157.170.170.27]) by dlep34.itg.ti.com (8.13.7/8.13.8) with ESMTP id p7ILpxuA000529; Thu, 18 Aug 2011 16:52:05 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id A45368063B; Thu, 18 Aug 2011 16:51:53 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id 09A238062D for ; Thu, 18 Aug 2011 16:51:01 -0500 (CDT) Received: from white.ext.ti.com (white.ext.ti.com [192.94.93.38]) by dflp51.itg.ti.com (8.13.7/8.13.8) with ESMTP id p7ILp0Np004309 for ; Thu, 18 Aug 2011 16:51:00 -0500 (CDT) Received: from psmtp.com (na3sys009amx211.postini.com [74.125.149.51]) by white.ext.ti.com (8.13.7/8.13.7) with SMTP id p7ILoxhg025336 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 18 Aug 2011 16:51:00 -0500 Received: from na3sys009aog118.obsmtp.com ([74.125.149.244]) (using TLSv1) by na3sys009amx211.postini.com ([74.125.148.10]) with SMTP; Thu, 18 Aug 2011 14:51:00 PDT Received: from mail-gw0-f49.google.com ([74.125.83.49]) (using TLSv1) by na3sys009aob118.postini.com ([74.125.148.12]) with SMTP ID DSNKTk2JQ//AWbb76K6nGYzrc0/nLDvOiPmV@postini.com; Thu, 18 Aug 2011 14:51:00 PDT Received: by mail-gw0-f49.google.com with SMTP id 1so1326374gwb.8 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-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:72.08635/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 2 (0.5000:0.0750) s cv GT3 gt2 gt1 r p m c X-pstn-addresses: from [35/1] Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: davinci-linux-open-source@linux.davincidsp.com 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: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 18 Aug 2011 21:53:20 +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 */