aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2011-02-11 19:07:21 -0500
committerLinus Walleij <linus.walleij@linaro.org>2011-03-14 09:05:16 -0400
commitfe05203b0c4ba0454ba34a858002b12ae4a72faa (patch)
tree822f033dd3ff23dfa16d689e7210b0ed98ef8caf /arch/arm/mach-ux500
parent3c4bee04d147f149a167633cf0033f9d25a8d720 (diff)
mach-ux500: move MOP500 pins to separate file
Split off pin definitions for the MOP500 board family to its own file. Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/Makefile3
-rw-r--r--arch/arm/mach-ux500/board-mop500-pins.c80
-rw-r--r--arch/arm/mach-ux500/board-mop500.c63
-rw-r--r--arch/arm/mach-ux500/board-mop500.h1
4 files changed, 84 insertions, 63 deletions
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index eec327906686..b549a8fb4231 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
9obj-$(CONFIG_MACH_U8500) += board-mop500.o board-mop500-sdi.o \ 9obj-$(CONFIG_MACH_U8500) += board-mop500.o board-mop500-sdi.o \
10 board-mop500-regulators.o \ 10 board-mop500-regulators.o \
11 board-mop500-uib.o board-mop500-stuib.o \ 11 board-mop500-uib.o board-mop500-stuib.o \
12 board-mop500-u8500uib.o 12 board-mop500-u8500uib.o \
13 board-mop500-pins.o
13obj-$(CONFIG_MACH_U5500) += board-u5500.o board-u5500-sdi.o 14obj-$(CONFIG_MACH_U5500) += board-u5500.o board-u5500-sdi.o
14obj-$(CONFIG_SMP) += platsmp.o headsmp.o 15obj-$(CONFIG_SMP) += platsmp.o headsmp.o
15obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o 16obj-$(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 000000000000..edd3a6bc3d23
--- /dev/null
+++ b/arch/arm/mach-ux500/board-mop500-pins.c
@@ -0,0 +1,80 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * License terms: GNU General Public License (GPL) version 2
5 */
6
7#include <linux/kernel.h>
8#include <linux/init.h>
9#include <linux/gpio.h>
10
11#include <plat/pincfg.h>
12
13#include <mach/hardware.h>
14
15#include "pins-db8500.h"
16
17static pin_cfg_t mop500_pins[] = {
18 /* SSP0 */
19 GPIO143_SSP0_CLK,
20 GPIO144_SSP0_FRM,
21 GPIO145_SSP0_RXD,
22 GPIO146_SSP0_TXD,
23
24 /* I2C */
25 GPIO147_I2C0_SCL,
26 GPIO148_I2C0_SDA,
27 GPIO16_I2C1_SCL,
28 GPIO17_I2C1_SDA,
29 GPIO10_I2C2_SDA,
30 GPIO11_I2C2_SCL,
31 GPIO229_I2C3_SDA,
32 GPIO230_I2C3_SCL,
33
34 /* SKE keypad */
35 GPIO153_KP_I7,
36 GPIO154_KP_I6,
37 GPIO155_KP_I5,
38 GPIO156_KP_I4,
39 GPIO157_KP_O7,
40 GPIO158_KP_O6,
41 GPIO159_KP_O5,
42 GPIO160_KP_O4,
43 GPIO161_KP_I3,
44 GPIO162_KP_I2,
45 GPIO163_KP_I1,
46 GPIO164_KP_I0,
47 GPIO165_KP_O3,
48 GPIO166_KP_O2,
49 GPIO167_KP_O1,
50 GPIO168_KP_O0,
51
52 /* GPIO_EXP_INT */
53 GPIO217_GPIO,
54
55 /* STMPE1601 IRQ */
56 GPIO218_GPIO | PIN_INPUT_PULLUP,
57
58 /* touch screen */
59 GPIO84_GPIO | PIN_INPUT_PULLUP,
60
61 /* USB OTG */
62 GPIO256_USB_NXT | PIN_PULL_DOWN,
63 GPIO257_USB_STP | PIN_PULL_UP,
64 GPIO258_USB_XCLK | PIN_PULL_DOWN,
65 GPIO259_USB_DIR | PIN_PULL_DOWN,
66 GPIO260_USB_DAT7 | PIN_PULL_DOWN,
67 GPIO261_USB_DAT6 | PIN_PULL_DOWN,
68 GPIO262_USB_DAT5 | PIN_PULL_DOWN,
69 GPIO263_USB_DAT4 | PIN_PULL_DOWN,
70 GPIO264_USB_DAT3 | PIN_PULL_DOWN,
71 GPIO265_USB_DAT2 | PIN_PULL_DOWN,
72 GPIO266_USB_DAT1 | PIN_PULL_DOWN,
73 GPIO267_USB_DAT0 | PIN_PULL_DOWN,
74};
75
76void __init mop500_pins_init(void)
77{
78 nmk_config_pins(mop500_pins,
79 ARRAY_SIZE(mop500_pins));
80}
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 67d9c634c05d..72448e17260f 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -28,7 +28,6 @@
28#include <asm/mach-types.h> 28#include <asm/mach-types.h>
29#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
30 30
31#include <plat/pincfg.h>
32#include <plat/i2c.h> 31#include <plat/i2c.h>
33#include <plat/ste_dma40.h> 32#include <plat/ste_dma40.h>
34 33
@@ -39,69 +38,9 @@
39 38
40#include "ste-dma40-db8500.h" 39#include "ste-dma40-db8500.h"
41#include "devices-db8500.h" 40#include "devices-db8500.h"
42#include "pins-db8500.h"
43#include "board-mop500.h" 41#include "board-mop500.h"
44#include "board-mop500-regulators.h" 42#include "board-mop500-regulators.h"
45 43
46static pin_cfg_t mop500_pins[] = {
47 /* SSP0 */
48 GPIO143_SSP0_CLK,
49 GPIO144_SSP0_FRM,
50 GPIO145_SSP0_RXD,
51 GPIO146_SSP0_TXD,
52
53 /* I2C */
54 GPIO147_I2C0_SCL,
55 GPIO148_I2C0_SDA,
56 GPIO16_I2C1_SCL,
57 GPIO17_I2C1_SDA,
58 GPIO10_I2C2_SDA,
59 GPIO11_I2C2_SCL,
60 GPIO229_I2C3_SDA,
61 GPIO230_I2C3_SCL,
62
63 /* SKE keypad */
64 GPIO153_KP_I7,
65 GPIO154_KP_I6,
66 GPIO155_KP_I5,
67 GPIO156_KP_I4,
68 GPIO157_KP_O7,
69 GPIO158_KP_O6,
70 GPIO159_KP_O5,
71 GPIO160_KP_O4,
72 GPIO161_KP_I3,
73 GPIO162_KP_I2,
74 GPIO163_KP_I1,
75 GPIO164_KP_I0,
76 GPIO165_KP_O3,
77 GPIO166_KP_O2,
78 GPIO167_KP_O1,
79 GPIO168_KP_O0,
80
81 /* GPIO_EXP_INT */
82 GPIO217_GPIO,
83
84 /* STMPE1601 IRQ */
85 GPIO218_GPIO | PIN_INPUT_PULLUP,
86
87 /* touch screen */
88 GPIO84_GPIO | PIN_INPUT_PULLUP,
89
90 /* USB OTG */
91 GPIO256_USB_NXT | PIN_PULL_DOWN,
92 GPIO257_USB_STP | PIN_PULL_UP,
93 GPIO258_USB_XCLK | PIN_PULL_DOWN,
94 GPIO259_USB_DIR | PIN_PULL_DOWN,
95 GPIO260_USB_DAT7 | PIN_PULL_DOWN,
96 GPIO261_USB_DAT6 | PIN_PULL_DOWN,
97 GPIO262_USB_DAT5 | PIN_PULL_DOWN,
98 GPIO263_USB_DAT4 | PIN_PULL_DOWN,
99 GPIO264_USB_DAT3 | PIN_PULL_DOWN,
100 GPIO265_USB_DAT2 | PIN_PULL_DOWN,
101 GPIO266_USB_DAT1 | PIN_PULL_DOWN,
102 GPIO267_USB_DAT0 | PIN_PULL_DOWN,
103};
104
105static struct ab8500_platform_data ab8500_platdata = { 44static struct ab8500_platform_data ab8500_platdata = {
106 .irq_base = MOP500_AB8500_IRQ_BASE, 45 .irq_base = MOP500_AB8500_IRQ_BASE,
107 .regulator = ab8500_regulators, 46 .regulator = ab8500_regulators,
@@ -444,7 +383,7 @@ static void __init u8500_init_machine(void)
444{ 383{
445 u8500_init_devices(); 384 u8500_init_devices();
446 385
447 nmk_config_pins(mop500_pins, ARRAY_SIZE(mop500_pins)); 386 mop500_pins_init();
448 387
449 platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs)); 388 platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));
450 389
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h
index 19b6c270d206..48abca77335c 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);
22extern void mop500_sdi_tc35892_init(void); 22extern void mop500_sdi_tc35892_init(void);
23void __init mop500_u8500uib_init(void); 23void __init mop500_u8500uib_init(void);
24void __init mop500_stuib_init(void); 24void __init mop500_stuib_init(void);
25void __init mop500_pins_init(void);
25 26
26void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info, 27void mop500_uib_i2c_add(int busnum, struct i2c_board_info *info,
27 unsigned n); 28 unsigned n);