From patchwork Tue Aug 27 20:25:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 2850310 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B2E64BF546 for ; Tue, 27 Aug 2013 20:26:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4E25D2049D for ; Tue, 27 Aug 2013 20:26:17 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 846DE2043C for ; Tue, 27 Aug 2013 20:26:15 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VEPq9-0001Kv-6O; Tue, 27 Aug 2013 20:26:13 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VEPq6-0004a2-T7; Tue, 27 Aug 2013 20:26:10 +0000 Received: from bear.ext.ti.com ([192.94.94.41]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VEPq3-0004Z0-LC for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2013 20:26:09 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id r7RKPhFp028783; Tue, 27 Aug 2013 15:25:43 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r7RKPhSM015764; Tue, 27 Aug 2013 15:25:43 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.2.342.3; Tue, 27 Aug 2013 15:25:43 -0500 Received: from [172.24.81.132] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id r7RKPbFM012968; Tue, 27 Aug 2013 15:25:39 -0500 Message-ID: <521D0B41.7080706@ti.com> Date: Wed, 28 Aug 2013 01:55:37 +0530 From: Sekhar Nori User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: "Lad, Prabhakar" Subject: Re: [PATCH v3 6/7] ARM: davinci: dmxxx: gpio device creation References: <1376803143-13738-1-git-send-email-prabhakar.csengg@gmail.com> <1376803143-13738-7-git-send-email-prabhakar.csengg@gmail.com> In-Reply-To: <1376803143-13738-7-git-send-email-prabhakar.csengg@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130827_162607_883302_1A6BB677 X-CRM114-Status: GOOD ( 18.61 ) X-Spam-Score: -9.4 (---------) Cc: DLOS , Kevin Hilman , Linus Walleij , LKML , Grant Likely , LAK X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 8/18/2013 10:49 AM, Lad, Prabhakar wrote: > From: Philip Avinash > > Create davinci gpio device and remove gpio references in > davinci_soc_info structure for dmxxx platforms. Also add Memory and IRQ > resources for GPIO platform device. Also rearrange header file inclusion > in group basis. > > Signed-off-by: Philip Avinash > Signed-off-by: Sekhar Nori > Signed-off-by: Lad, Prabhakar > Acked-by: Linus Walleij > --- > arch/arm/mach-davinci/board-dm355-evm.c | 33 +++++++----- > arch/arm/mach-davinci/board-dm355-leopard.c | 30 ++++++----- > arch/arm/mach-davinci/board-dm365-evm.c | 30 ++++++----- > arch/arm/mach-davinci/board-dm644x-evm.c | 40 ++++++++------ > arch/arm/mach-davinci/board-dm646x-evm.c | 37 +++++++------ > arch/arm/mach-davinci/board-neuros-osd2.c | 18 ++++--- > arch/arm/mach-davinci/davinci.h | 17 +++--- > arch/arm/mach-davinci/dm355.c | 54 +++++++++++++------ > arch/arm/mach-davinci/dm365.c | 58 ++++++++++++++------- > arch/arm/mach-davinci/dm644x.c | 47 ++++++++++++----- > arch/arm/mach-davinci/dm646x.c | 47 ++++++++++++----- > arch/arm/mach-davinci/include/mach/common.h | 2 + > arch/arm/mach-davinci/include/mach/gpio-davinci.h | 2 - > 13 files changed, 272 insertions(+), 143 deletions(-) > > +int __init dm355_gpio_register() This line and other lines like this for other SoCs causes compiler warning. > --- a/arch/arm/mach-davinci/include/mach/common.h > +++ b/arch/arm/mach-davinci/include/mach/common.h > @@ -38,6 +38,8 @@ struct davinci_timer_info { > > struct davinci_gpio_controller; > > +#define DAVINCI_GPIO_BASE 0x01c67000 No need to place this in a globally visible header. There is a local davinci.h just for this purpose. So here is the updated patch with all the SoC bits of this patch moved. Thanks, Sekhar ---8<--- From a01133ae68247d762b491a56bbf9fc8d94b389c4 Mon Sep 17 00:00:00 2001 From: Philip Avinash Date: Sun, 18 Aug 2013 10:49:02 +0530 Subject: [PATCH 6/7] ARM: davinci: board: gpio device creation Create GPIO device for existing DaVinci boards. While at it, group related header files together and sort in alphabetic order within the group. This will help in future in avoiding duplicate header files. Signed-off-by: Philip Avinash Signed-off-by: Lad, Prabhakar Acked-by: Linus Walleij [nsekhar@ti.com: remove soc bits from this patch and simplify commit message] Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/board-dm355-evm.c | 33 +++++++++++++--------- arch/arm/mach-davinci/board-dm355-leopard.c | 30 ++++++++++++-------- arch/arm/mach-davinci/board-dm365-evm.c | 30 ++++++++++++-------- arch/arm/mach-davinci/board-dm644x-evm.c | 40 +++++++++++++++++---------- arch/arm/mach-davinci/board-dm646x-evm.c | 37 ++++++++++++++----------- arch/arm/mach-davinci/board-neuros-osd2.c | 18 ++++++++---- 6 files changed, 114 insertions(+), 74 deletions(-) diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index 42b23a3..4712fb4 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c @@ -8,29 +8,31 @@ * is licensed "as is" without any warranty of any kind, whether express * or implied. */ -#include -#include +#include #include -#include +#include +#include +#include +#include #include -#include #include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include + #include -#include -#include #include #include -#include +#include #include -#include -#include -#include #include "davinci.h" @@ -375,6 +377,11 @@ static struct spi_board_info dm355_evm_spi_info[] __initconst = { static __init void dm355_evm_init(void) { struct clk *aemif; + int ret; + + ret = dm355_gpio_register(); + if (ret) + pr_warn("%s: GPIO init failed: %d\n", __func__, ret); gpio_request(1, "dm9000"); gpio_direction_input(1); diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c index d9eb1c9..fbaeea8 100644 --- a/arch/arm/mach-davinci/board-dm355-leopard.c +++ b/arch/arm/mach-davinci/board-dm355-leopard.c @@ -7,27 +7,28 @@ * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ -#include -#include +#include #include -#include +#include +#include +#include +#include #include -#include #include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include +#include #include #include -#include +#include #include -#include -#include -#include #include "davinci.h" @@ -233,6 +234,11 @@ static struct spi_board_info dm355_leopard_spi_info[] __initconst = { static __init void dm355_leopard_init(void) { struct clk *aemif; + int ret; + + ret = dm355_gpio_register(); + if (ret) + pr_warn("%s: GPIO init failed: %d\n", __func__, ret); gpio_request(9, "dm9000"); gpio_direction_input(9); diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index 000e2ab..9c1dd31 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c @@ -12,33 +12,33 @@ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ -#include -#include +#include #include #include -#include -#include #include +#include +#include +#include +#include #include #include +#include #include +#include +#include +#include +#include #include -#include -#include -#include #include +#include #include #include #include -#include #include -#include +#include #include -#include -#include -#include #include #include @@ -743,6 +743,12 @@ static struct spi_board_info dm365_evm_spi_info[] __initconst = { static __init void dm365_evm_init(void) { + int ret; + + ret = dm365_gpio_register(); + if (ret) + pr_warn("%s: GPIO init failed: %d\n", __func__, ret); + evm_init_i2c(); davinci_serial_init(dm365_serial_device); diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 462812b..d0894d8 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ -8,37 +8,42 @@ * is licensed "as is" without any warranty of any kind, whether express * or implied. */ -#include -#include +#include #include -#include +#include #include #include -#include #include +#include +#include +#include +#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include - -#include #include #include #include -#include -#include #include -#include -#include -#include -#include +#include + +#include #include "davinci.h" @@ -753,9 +758,14 @@ static int davinci_phy_fixup(struct phy_device *phydev) static __init void davinci_evm_init(void) { + int ret; struct clk *aemif_clk; struct davinci_soc_info *soc_info = &davinci_soc_info; + ret = dm644x_gpio_register(); + if (ret) + pr_warn("%s: GPIO init failed: %d\n", __func__, ret); + aemif_clk = clk_get(NULL, "aemif"); clk_prepare_enable(aemif_clk); diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 734cc02..fe79d8d 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c @@ -16,37 +16,37 @@ * Included Files **************************************************************************/ -#include -#include -#include +#include +#include #include -#include #include #include #include - -#include -#include - +#include +#include +#include +#include #include #include #include -#include -#include +#include +#include +#include +#include #include #include +#include +#include #include #include -#include -#include -#include -#include -#include -#include "davinci.h" +#include +#include + #include "clock.h" +#include "davinci.h" #define NAND_BLOCK_SIZE SZ_128K @@ -785,8 +785,13 @@ static struct edma_rsv_info dm646x_edma_rsv[] = { static __init void evm_init(void) { + int ret; struct davinci_soc_info *soc_info = &davinci_soc_info; + ret = dm646x_gpio_register(); + if (ret) + pr_warn("%s: GPIO init failed: %d\n", __func__, ret); + evm_init_i2c(); davinci_serial_init(dm646x_serial_device); dm646x_init_mcasp0(&dm646x_evm_snd_data[0]); diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c index 8e156e0..322eabd 100644 --- a/arch/arm/mach-davinci/board-neuros-osd2.c +++ b/arch/arm/mach-davinci/board-neuros-osd2.c @@ -23,20 +23,21 @@ * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ -#include #include #include +#include +#include +#include +#include +#include +#include #include #include #include -#include -#include #include -#include -#include -#include +#include #include "davinci.h" @@ -168,9 +169,14 @@ static struct davinci_mmc_config davinci_ntosd2_mmc_config = { static __init void davinci_ntosd2_init(void) { + int ret; struct clk *aemif_clk; struct davinci_soc_info *soc_info = &davinci_soc_info; + ret = dm644x_gpio_register(); + if (ret) + pr_warn("%s: GPIO init failed: %d\n", __func__, ret); + aemif_clk = clk_get(NULL, "aemif"); clk_prepare_enable(aemif_clk);