From patchwork Thu Apr 8 13:43:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rabin Vincent X-Patchwork-Id: 71741 X-Patchwork-Delegate: albert.aribaud@free.fr Return-Path: X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id A62E71051E73 for ; Thu, 8 Apr 2010 15:44:45 +0200 (CEST) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id 96784C913116 for ; Thu, 8 Apr 2010 15:44:45 +0200 (CEST) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.9) for (single-drop); Thu, 08 Apr 2010 15:44:45 +0200 (CEST) Received: from murder (svr19.m-online.net [192.168.3.147]) by backend2 (Cyrus v2.2.12) with LMTPA; Thu, 08 Apr 2010 15:44:18 +0200 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend3.pop.m-online.net (Cyrus v2.2.13) with LMTPA; Thu, 08 Apr 2010 15:44:17 +0200 Received: from scanner-2.m-online.net (unknown [192.168.8.166]) by mail.m-online.net (Postfix) with ESMTP id CADE520010F; Thu, 8 Apr 2010 15:44:17 +0200 (CEST) Received: from mxin-1.m-online.net ([192.168.6.164]) by scanner-2.m-online.net (scanner-2.m-online.net [192.168.8.166]) (amavisd-new, port 10026) with ESMTP id 32293-02-2; Thu, 8 Apr 2010 15:44:15 +0200 (CEST) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-1.m-online.net (Postfix) with ESMTP id D8BA246C0B4; Thu, 8 Apr 2010 15:44:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0B54628198; Thu, 8 Apr 2010 15:44:06 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1kSpe9PTSPjQ; Thu, 8 Apr 2010 15:44:05 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6D2252816F; Thu, 8 Apr 2010 15:43:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 11AF42813D for ; Thu, 8 Apr 2010 15:43:56 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7l1sFbWJNDPI for ; Thu, 8 Apr 2010 15:43:54 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from eu1sys200aog101.obsmtp.com (eu1sys200aog101.obsmtp.com [207.126.144.111]) by theia.denx.de (Postfix) with ESMTPS id 04CDD28166 for ; Thu, 8 Apr 2010 15:43:48 +0200 (CEST) Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob101.postini.com ([207.126.147.11]) with SMTP ID DSNKS73dk7tXNrmYuKb3sdthowUfk6evXc6u@postini.com; Thu, 08 Apr 2010 13:43:52 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6AD52DF; Thu, 8 Apr 2010 13:43:47 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 3136F15C5; Thu, 8 Apr 2010 13:43:47 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id 7BA7DA8098; Thu, 8 Apr 2010 15:43:40 +0200 (CEST) Received: from localhost (10.201.54.39) by exdcvycastm022.EQ1STM.local (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.1.393.1; Thu, 8 Apr 2010 15:43:46 +0200 From: Rabin Vincent To: Date: Thu, 8 Apr 2010 19:13:12 +0530 Message-ID: <1270734200-17762-6-git-send-email-rabin.vincent@stericsson.com> X-Mailer: git-send-email 1.7.0 In-Reply-To: <1270734200-17762-5-git-send-email-rabin.vincent@stericsson.com> References: <1270734200-17762-1-git-send-email-rabin.vincent@stericsson.com> <1270734200-17762-2-git-send-email-rabin.vincent@stericsson.com> <1270734200-17762-3-git-send-email-rabin.vincent@stericsson.com> <1270734200-17762-4-git-send-email-rabin.vincent@stericsson.com> <1270734200-17762-5-git-send-email-rabin.vincent@stericsson.com> MIME-Version: 1.0 Cc: STEricsson_nomadik_linux@list.st.com, Michael Brandt , Alessandro Rubini Subject: [U-Boot] [PATCHv2 05/13] Nomadik: move gpio driver to drivers/gpio X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Virus-Scanned: by amavisd-new at m-online.net The Nomadik GPIO driver will also be used on the U8500 SoC, so move it out of platform-specific code. Acked-by: Alessandro Rubini Acked-by: Michael Brandt Signed-off-by: Rabin Vincent --- board/st/nhk8815/nhk8815.c | 2 +- cpu/arm926ejs/nomadik/Makefile | 1 - drivers/gpio/Makefile | 1 + .../nomadik/gpio.c => drivers/gpio/nomadik_gpio.c | 2 +- include/configs/nhk8815.h | 7 +++++-- include/{asm-arm/arch-nomadik/gpio.h => nomadik.h} | 0 6 files changed, 8 insertions(+), 5 deletions(-) rename cpu/arm926ejs/nomadik/gpio.c => drivers/gpio/nomadik_gpio.c (98%) rename include/{asm-arm/arch-nomadik/gpio.h => nomadik.h} (100%) diff --git a/include/asm-arm/arch-nomadik/gpio.h b/include/nomadik.h similarity index 100% rename from include/asm-arm/arch-nomadik/gpio.h rename to include/nomadik.h diff --git a/board/st/nhk8815/nhk8815.c b/board/st/nhk8815/nhk8815.c index faef810..fc5d3b8 100644 --- a/board/st/nhk8815/nhk8815.c +++ b/board/st/nhk8815/nhk8815.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/cpu/arm926ejs/nomadik/Makefile b/cpu/arm926ejs/nomadik/Makefile index 180db8b..35550d7 100644 --- a/cpu/arm926ejs/nomadik/Makefile +++ b/cpu/arm926ejs/nomadik/Makefile @@ -25,7 +25,6 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).a -COBJS = gpio.o SOBJS = reset.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile index d966082..d84f81e 100644 --- a/drivers/gpio/Makefile +++ b/drivers/gpio/Makefile @@ -28,6 +28,7 @@ LIB := $(obj)libgpio.a COBJS-$(CONFIG_AT91_GPIO) += at91_gpio.o COBJS-$(CONFIG_KIRKWOOD_GPIO) += kw_gpio.o COBJS-$(CONFIG_MX31_GPIO) += mx31_gpio.o +COBJS-$(CONFIG_NOMADIK_GPIO) += nomadik_gpio.o COBJS-$(CONFIG_PCA953X) += pca953x.o COBJS := $(COBJS-y) diff --git a/cpu/arm926ejs/nomadik/gpio.c b/drivers/gpio/nomadik_gpio.c similarity index 98% rename from cpu/arm926ejs/nomadik/gpio.c rename to drivers/gpio/nomadik_gpio.c index 62a375b..670b684 100644 --- a/cpu/arm926ejs/nomadik/gpio.c +++ b/drivers/gpio/nomadik_gpio.c @@ -22,7 +22,7 @@ #include #include -#include +#include static unsigned long gpio_base[4] = { NOMADIK_GPIO0_BASE, diff --git a/include/configs/nhk8815.h b/include/configs/nhk8815.h index d84e787..f882715 100644 --- a/include/configs/nhk8815.h +++ b/include/configs/nhk8815.h @@ -99,6 +99,9 @@ #define CONFIG_SYS_TIMERBASE 0x101E2000 #define CONFIG_NOMADIK_MTU +/* GPIO */ +#define CONFIG_NOMADIK_GPIO + /* serial port (PL011) configuration */ #define CONFIG_PL011_SERIAL #define CONFIG_CONS_INDEX 1 @@ -110,9 +113,9 @@ #define CONFIG_PL01x_PORTS { (void *)CFG_SERIAL0, (void *)CFG_SERIAL1 } #define CONFIG_PL011_CLOCK 48000000 -/* i2c, for the port extenders (uses gpio.c in board directory) */ +/* i2c, for the port extenders */ #ifndef __ASSEMBLY__ -#include +#include #define CONFIG_CMD_I2C #define CONFIG_SOFT_I2C #define CONFIG_SYS_I2C_SPEED 400000