diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2010-06-03 02:58:42 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-06-16 17:30:47 -0400 |
commit | ea05a57f6d34cb9e3a422ef165b515e9a1cd844a (patch) | |
tree | 04a10650d966b8d7f153766610cd00f0fca1f468 /arch/arm/mach-ux500/board-mop500.c | |
parent | 2917947a673763be5f94313a59e5f28ee01b3d9d (diff) |
ARM: 6161/1: mop500: add basic pin configuration
Use the newly added infrastructure to configure the SSP0 and I2C[0-3]
pins on the MOP500 board.
The u8500_init_devices() call needed to be moved up in order to register
the GPIO device first.
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500.c')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index bb8d7b771817..b83005e9b8fa 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/interrupt.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/gpio.h> | ||
16 | #include <linux/amba/bus.h> | 17 | #include <linux/amba/bus.h> |
17 | #include <linux/amba/pl022.h> | 18 | #include <linux/amba/pl022.h> |
18 | #include <linux/spi/spi.h> | 19 | #include <linux/spi/spi.h> |
@@ -20,12 +21,33 @@ | |||
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
22 | 23 | ||
24 | #include <plat/pincfg.h> | ||
23 | #include <plat/i2c.h> | 25 | #include <plat/i2c.h> |
24 | 26 | ||
25 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
26 | #include <mach/setup.h> | 28 | #include <mach/setup.h> |
27 | #include <mach/devices.h> | 29 | #include <mach/devices.h> |
28 | 30 | ||
31 | #include "pins-db8500.h" | ||
32 | |||
33 | static pin_cfg_t mop500_pins[] = { | ||
34 | /* SSP0 */ | ||
35 | GPIO143_SSP0_CLK, | ||
36 | GPIO144_SSP0_FRM, | ||
37 | GPIO145_SSP0_RXD, | ||
38 | GPIO146_SSP0_TXD, | ||
39 | |||
40 | /* I2C */ | ||
41 | GPIO147_I2C0_SCL, | ||
42 | GPIO148_I2C0_SDA, | ||
43 | GPIO16_I2C1_SCL, | ||
44 | GPIO17_I2C1_SDA, | ||
45 | GPIO10_I2C2_SDA, | ||
46 | GPIO11_I2C2_SCL, | ||
47 | GPIO229_I2C3_SDA, | ||
48 | GPIO230_I2C3_SCL, | ||
49 | }; | ||
50 | |||
29 | static void ab4500_spi_cs_control(u32 command) | 51 | static void ab4500_spi_cs_control(u32 command) |
30 | { | 52 | { |
31 | /* set the FRM signal, which is CS - TODO */ | 53 | /* set the FRM signal, which is CS - TODO */ |
@@ -118,6 +140,10 @@ static void __init u8500_init_machine(void) | |||
118 | { | 140 | { |
119 | int i; | 141 | int i; |
120 | 142 | ||
143 | u8500_init_devices(); | ||
144 | |||
145 | nmk_config_pins(mop500_pins, ARRAY_SIZE(mop500_pins)); | ||
146 | |||
121 | u8500_i2c0_device.dev.platform_data = &u8500_i2c0_data; | 147 | u8500_i2c0_device.dev.platform_data = &u8500_i2c0_data; |
122 | ux500_i2c1_device.dev.platform_data = &u8500_i2c1_data; | 148 | ux500_i2c1_device.dev.platform_data = &u8500_i2c1_data; |
123 | ux500_i2c2_device.dev.platform_data = &u8500_i2c2_data; | 149 | ux500_i2c2_device.dev.platform_data = &u8500_i2c2_data; |
@@ -133,8 +159,6 @@ static void __init u8500_init_machine(void) | |||
133 | 159 | ||
134 | spi_register_board_info(u8500_spi_devices, | 160 | spi_register_board_info(u8500_spi_devices, |
135 | ARRAY_SIZE(u8500_spi_devices)); | 161 | ARRAY_SIZE(u8500_spi_devices)); |
136 | |||
137 | u8500_init_devices(); | ||
138 | } | 162 | } |
139 | 163 | ||
140 | MACHINE_START(U8500, "ST-Ericsson MOP500 platform") | 164 | MACHINE_START(U8500, "ST-Ericsson MOP500 platform") |