From patchwork Fri Mar 4 17:01:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 364 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:41:57 -0000 Delivered-To: patches@linaro.org Received: by 10.224.60.68 with SMTP id o4cs21473qah; Fri, 4 Mar 2011 09:03:22 -0800 (PST) Received: by 10.216.192.223 with SMTP id i73mr713804wen.95.1299258116008; Fri, 04 Mar 2011 09:01:56 -0800 (PST) Received: from mail-wy0-f178.google.com (mail-wy0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id f60si3505776wej.119.2011.03.04.09.01.54 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2011 09:01:54 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by wyf28 with SMTP id 28so2726741wyf.37 for ; Fri, 04 Mar 2011 09:01:54 -0800 (PST) Received: by 10.227.42.143 with SMTP id s15mr751313wbe.143.1299258114153; Fri, 04 Mar 2011 09:01:54 -0800 (PST) Received: from [192.168.0.2] (cpc2-aztw21-0-0-cust264.aztw.cable.virginmedia.com [77.100.97.9]) by mx.google.com with ESMTPS id bd8sm1614278wbb.1.2011.03.04.09.01.52 (version=SSLv3 cipher=OTHER); Fri, 04 Mar 2011 09:01:53 -0800 (PST) Message-ID: <4D711AFC.1030908@linaro.org> Date: Fri, 04 Mar 2011 17:01:48 +0000 From: Lee Jones User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: patches@linaro.org Subject: [PATCH] mach-ux500: move MOP500 pins to separate file From: Rabin Vincent Split off pin definitions for the MOP500 board family to its own file. Signed-off-by: Rabin Vincent Signed-off-by: Mathieu Poirier Signed-off-by: Linus Walleij --- arch/arm/mach-ux500/Makefile | 3 +- arch/arm/mach-ux500/board-mop500-pins.c | 80 +++++++++++++++++++++++++++++++ arch/arm/mach-ux500/board-mop500.c | 61 +----------------------- arch/arm/mach-ux500/board-mop500.h | 1 + 4 files changed, 84 insertions(+), 61 deletions(-) create mode 100644 arch/arm/mach-ux500/board-mop500-pins.c diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile index eec3279..b549a8f 100644 --- a/arch/arm/mach-ux500/Makefile +++ b/arch/arm/mach-ux500/Makefile @@ -9,7 +9,8 @@ obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o prcmu.o obj-$(CONFIG_MACH_U8500) += board-mop500.o board-mop500-sdi.o \ board-mop500-regulators.o \ board-mop500-uib.o board-mop500-stuib.o \ - board-mop500-u8500uib.o + board-mop500-u8500uib.o \ + board-mop500-pins.o obj-$(CONFIG_MACH_U5500) += board-u5500.o board-u5500-sdi.o obj-$(CONFIG_SMP) += platsmp.o headsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c new file mode 100644 index 0000000..edd3a6b --- /dev/null +++ b/arch/arm/mach-ux500/board-mop500-pins.c @@ -0,0 +1,80 @@ +/* + * Copyright (C) ST-Ericsson SA 2010 + * + * License terms: GNU General Public License (GPL) version 2 + */ + +#include +#include +#include + +#include + +#include + +#include "pins-db8500.h" + +static pin_cfg_t mop500_pins[] = { + /* SSP0 */ + GPIO143_SSP0_CLK, + GPIO144_SSP0_FRM, + GPIO145_SSP0_RXD, + GPIO146_SSP0_TXD, + + /* I2C */ + GPIO147_I2C0_SCL, + GPIO148_I2C0_SDA, + GPIO16_I2C1_SCL, + GPIO17_I2C1_SDA, + GPIO10_I2C2_SDA, + GPIO11_I2C2_SCL, + GPIO229_I2C3_SDA, + GPIO230_I2C3_SCL, + + /* SKE keypad */ + GPIO153_KP_I7, + GPIO154_KP_I6, + GPIO155_KP_I5, + GPIO156_KP_I4, + GPIO157_KP_O7, + GPIO158_KP_O6, + GPIO159_KP_O5, + GPIO160_KP_O4, + GPIO161_KP_I3, + GPIO162_KP_I2, + GPIO163_KP_I1, + GPIO164_KP_I0, + GPIO165_KP_O3, + GPIO166_KP_O2, + GPIO167_KP_O1, + GPIO168_KP_O0, + + /* GPIO_EXP_INT */ + GPIO217_GPIO, + + /* STMPE1601 IRQ */ + GPIO218_GPIO | PIN_INPUT_PULLUP, + + /* touch screen */ + GPIO84_GPIO | PIN_INPUT_PULLUP, + + /* USB OTG */ + GPIO256_USB_NXT | PIN_PULL_DOWN, + GPIO257_USB_STP | PIN_PULL_UP, + GPIO258_USB_XCLK | PIN_PULL_DOWN, + GPIO259_USB_DIR | PIN_PULL_DOWN, + GPIO260_USB_DAT7 | PIN_PULL_DOWN, + GPIO261_USB_DAT6 | PIN_PULL_DOWN, + GPIO262_USB_DAT5 | PIN_PULL_DOWN, + GPIO263_USB_DAT4 | PIN_PULL_DOWN, + GPIO264_USB_DAT3 | PIN_PULL_DOWN, + GPIO265_USB_DAT2 | PIN_PULL_DOWN, + GPIO266_USB_DAT1 | PIN_PULL_DOWN, + GPIO267_USB_DAT0 | PIN_PULL_DOWN, +}; + +void __init mop500_pins_init(void) +{ + nmk_config_pins(mop500_pins, + ARRAY_SIZE(mop500_pins)); +} diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 67d9c63..8ae932d 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -43,65 +43,6 @@ #include "board-mop500.h" #include "board-mop500-regulators.h" -static pin_cfg_t mop500_pins[] = { - /* SSP0 */ - GPIO143_SSP0_CLK, - GPIO144_SSP0_FRM, - GPIO145_SSP0_RXD, - GPIO146_SSP0_TXD, - - /* I2C */ - GPIO147_I2C0_SCL, - GPIO148_I2C0_SDA, - GPIO16_I2C1_SCL, - GPIO17_I2C1_SDA, - GPIO10_I2C2_SDA, - GPIO11_I2C2_SCL, - GPIO229_I2C3_SDA, - GPIO230_I2C3_SCL, - - /* SKE keypad */ - GPIO153_KP_I7, - GPIO154_KP_I6, - GPIO155_KP_I5, - GPIO156_KP_I4, - GPIO157_KP_O7, - GPIO158_KP_O6, - GPIO159_KP_O5, - GPIO160_KP_O4, - GPIO161_KP_I3, - GPIO162_KP_I2, - GPIO163_KP_I1, - GPIO164_KP_I0, - GPIO165_KP_O3, - GPIO166_KP_O2, - GPIO167_KP_O1, - GPIO168_KP_O0, - - /* GPIO_EXP_INT */ - GPIO217_GPIO, - - /* STMPE1601 IRQ */ - GPIO218_GPIO | PIN_INPUT_PULLUP, - - /* touch screen */ - GPIO84_GPIO | PIN_INPUT_PULLUP, - - /* USB OTG */ - GPIO256_USB_NXT | PIN_PULL_DOWN, - GPIO257_USB_STP | PIN_PULL_UP, - GPIO258_USB_XCLK | PIN_PULL_DOWN, - GPIO259_USB_DIR | PIN_PULL_DOWN, - GPIO260_USB_DAT7 | PIN_PULL_DOWN, - GPIO261_USB_DAT6 | PIN_PULL_DOWN, - GPIO262_USB_DAT5 | PIN_PULL_DOWN, - GPIO263_USB_DAT4 | PIN_PULL_DOWN, - GPIO264_USB_DAT3 | PIN_PULL_DOWN, - GPIO265_USB_DAT2 | PIN_PULL_DOWN, - GPIO266_USB_DAT1 | PIN_PULL_DOWN, - GPIO267_USB_DAT0 | PIN_PULL_DOWN, -}; - static struct ab8500_platform_data ab8500_platdata = { .irq_base = MOP500_AB8500_IRQ_BASE, .regulator = ab8500_regulators, @@ -444,7 +385,7 @@ static void __init u8500_init_machine(void) { u8500_init_devices(); - nmk_config_pins(mop500_pins, ARRAY_SIZE(mop500_pins)); + mop500_pins_init(); platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h index 19b6c27..48abca7 100644 --- a/arch/arm/mach-ux500/board-mop500.h +++ b/arch/arm/mach-ux500/board-mop500.h @@ -22,6 +22,7 @@ extern void mop500_sdi_init(void); extern void mop500_sdi_tc35892_init(void); void __init mop500_u8500uib_init(void); void __init mop500_stuib_init(void); +void __init mop500_pins_init(void); void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info, unsigned n); -- 1.7.3.2