From patchwork Sun Aug 18 05:19:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar X-Patchwork-Id: 2846155 Return-Path: X-Original-To: patchwork-davinci@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 9313CBF546 for ; Sun, 18 Aug 2013 05:23:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 439FC20263 for ; Sun, 18 Aug 2013 05:23:09 +0000 (UTC) Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C87E220260 for ; Sun, 18 Aug 2013 05:23:07 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id r7I5LokF020601; Sun, 18 Aug 2013 00:21:50 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r7I5Loso029541; Sun, 18 Aug 2013 00:21:50 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Sun, 18 Aug 2013 00:21:49 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id r7I5LnXh023527; Sun, 18 Aug 2013 00:21:49 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id DC3B080628; Sun, 18 Aug 2013 00:21:49 -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 D2A6A80627 for ; Sun, 18 Aug 2013 00:21:10 -0500 (CDT) Received: from red.ext.ti.com (red.ext.ti.com [192.94.93.37]) by dflp51.itg.ti.com (8.13.7/8.13.8) with ESMTP id r7I5LARA028013 for ; Sun, 18 Aug 2013 00:21:10 -0500 (CDT) Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by red.ext.ti.com (8.13.7/8.13.7) with ESMTP id r7I5LAtm024624 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 18 Aug 2013 00:21:10 -0500 Received: from [216.82.253.147:6340] by server-1.bemta-7.messagelabs.com id 7D/76-06631-6C950125; Sun, 18 Aug 2013 05:21:10 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-15.tower-165.messagelabs.com!1376803268!15936911!1 X-Originating-IP: [209.85.160.45] X-SpamReason: No, hits=0.0 required=7.0 tests=ML_RADAR_SPEW_LINKS_14, spamassassin: X-StarScan-Received: X-StarScan-Version: 6.9.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 23307 invoked from network); 18 Aug 2013 05:21:08 -0000 Received: from mail-pb0-f45.google.com (HELO mail-pb0-f45.google.com) (209.85.160.45) by server-15.tower-165.messagelabs.com with RC4-SHA encrypted SMTP; 18 Aug 2013 05:21:08 -0000 Received: by mail-pb0-f45.google.com with SMTP id mc17so3586665pbc.32 for ; Sat, 17 Aug 2013 22:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EgJR7YOANBZmHSKjWQV/MYlKGFZN4cIVAOHvnpeUfJ4=; b=AfWfpc5T/cvCvD/8NgQxOigJjVNvSzMFCGVv1ciIB7Ji3heS7MP/9IoYMF+z2Ip0+v b2lRtgZXivRp7gqDr3wXvh8Ve9FTXqm/3p6UjEOj8fVAMv7A5r7CSu1RB05MGUyRiEPT FyRukZ/MzrCZiDeyx8uwttTyo8u+mgGU6B6B+6SIIOQH04NT0MVRVZg0d4tO6TdSxj9k Kf7sEWSdRVtoIah0oZx6Qs6pOj7lWnWsU4pXio68LWyCF8UAqGbPkdSPclFlsP/AvsSN 4LCQsFlDG+uJoc6nsZv7F9jJWG6R6mQBi1a8xghr8Qg7WP6Dhg4fCbxZsEmk7BK9LREK ORKA== X-Received: by 10.68.131.3 with SMTP id oi3mr6336226pbb.35.1376803268311; Sat, 17 Aug 2013 22:21:08 -0700 (PDT) Received: from localhost.localdomain ([112.79.40.224]) by mx.google.com with ESMTPSA id pq1sm7175496pbb.26.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 17 Aug 2013 22:21:07 -0700 (PDT) From: "Lad, Prabhakar" To: DLOS , Sekhar Nori Subject: [PATCH v3 5/7] ARM: davinci: da8xx: gpio device creation Date: Sun, 18 Aug 2013 10:49:01 +0530 Message-ID: <1376803143-13738-6-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1376803143-13738-1-git-send-email-prabhakar.csengg@gmail.com> References: <1376803143-13738-1-git-send-email-prabhakar.csengg@gmail.com> CC: Linus Walleij , LKML , Philip Avinash , Grant Likely , LAK 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: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 From: Philip Avinash Create davinci gpio device and remove references in davinci_soc_info structure. 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-da830-evm.c | 28 ++++++++++++++++----------- arch/arm/mach-davinci/board-da850-evm.c | 16 ++++++++++----- arch/arm/mach-davinci/board-omapl138-hawk.c | 10 ++++++++-- arch/arm/mach-davinci/da830.c | 21 +++++++++++++++----- arch/arm/mach-davinci/da850.c | 27 ++++++++++++++++++-------- arch/arm/mach-davinci/include/mach/da8xx.h | 22 +++++++++++---------- 6 files changed, 83 insertions(+), 41 deletions(-) diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index c4bdc0a..54a8690 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c @@ -9,30 +9,32 @@ * 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 #define DA830_EVM_PHY_ID "" /* @@ -591,6 +593,10 @@ static __init void da830_evm_init(void) struct davinci_soc_info *soc_info = &davinci_soc_info; int ret; + ret = da830_register_gpio(); + if (ret) + pr_warn("da830_evm_init: GPIO init failed: %d\n", ret); + ret = da830_register_edma(da830_edma_rsv); if (ret) pr_warning("da830_evm_init: edma registration failed: %d\n", diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index 9afd687..8b0a673 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -15,29 +15,31 @@ #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 @@ -47,8 +49,8 @@ #include #include -#include #include +#include #define DA850_EVM_PHY_ID "davinci_mdio-0:00" #define DA850_LCD_PWR_PIN GPIO_TO_PIN(2, 8) @@ -1439,6 +1441,10 @@ static __init void da850_evm_init(void) { int ret; + ret = da850_register_gpio(); + if (ret) + pr_warn("da850_evm_init: GPIO init failed: %d\n", ret); + ret = pmic_tps65070_init(); if (ret) pr_warn("%s: TPS65070 PMIC init failed: %d\n", __func__, ret); diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c index ab98c75..0e0b998 100644 --- a/arch/arm/mach-davinci/board-omapl138-hawk.c +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c @@ -9,14 +9,16 @@ * 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 @@ -290,6 +292,10 @@ static __init void omapl138_hawk_init(void) { int ret; + ret = da850_register_gpio(); + if (ret) + pr_warn("%s: GPIO init failed: %d\n", __func__, ret); + davinci_serial_init(da8xx_serial_device); omapl138_hawk_config_emac(); diff --git a/arch/arm/mach-davinci/da830.c b/arch/arm/mach-davinci/da830.c index 9ef1b67..da498ee 100644 --- a/arch/arm/mach-davinci/da830.c +++ b/arch/arm/mach-davinci/da830.c @@ -8,19 +8,20 @@ * 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 "clock.h" #include "mux.h" @@ -1151,6 +1152,16 @@ static struct davinci_id da830_ids[] = { }, }; +static struct davinci_gpio_platform_data da830_gpio_platform_data = { + .ngpio = 128, + .intc_irq_num = DA830_N_CP_INTC_IRQ, +}; + +int __init da830_register_gpio() +{ + return da8xx_register_gpio(&da830_gpio_platform_data); +} + static struct davinci_timer_instance da830_timer_instance[2] = { { .base = DA8XX_TIMER64P0_BASE, diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index 887af90..c6608c4 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -11,24 +11,25 @@ * 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 "clock.h" #include "mux.h" @@ -1281,6 +1282,16 @@ int __init da850_register_vpif_capture(struct vpif_capture_config return platform_device_register(&da850_vpif_capture_dev); } +static struct davinci_gpio_platform_data da850_gpio_platform_data = { + .ngpio = 144, + .intc_irq_num = DA850_N_CP_INTC_IRQ, +}; + +int __init da850_register_gpio() +{ + return da8xx_register_gpio(&da850_gpio_platform_data); +} + static struct davinci_soc_info davinci_soc_info_da850 = { .io_desc = da850_io_desc, .io_desc_num = ARRAY_SIZE(da850_io_desc), diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h index a96da92..8642150 100644 --- a/arch/arm/mach-davinci/include/mach/da8xx.h +++ b/arch/arm/mach-davinci/include/mach/da8xx.h @@ -11,26 +11,26 @@ #ifndef __ASM_ARCH_DAVINCI_DA8XX_H #define __ASM_ARCH_DAVINCI_DA8XX_H -#include