diff options
author | Linus Walleij <linus.walleij@stericsson.com> | 2010-09-06 17:15:08 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-09-19 07:12:26 -0400 |
commit | 29aeb3cfeb88ecdb2febb5da247d0cf6a82f8831 (patch) | |
tree | a45d55586a7abb9d9ea8fcff0e7eac94db97c918 /arch/arm/mach-ux500 | |
parent | fd0d67d62def64ed5aa57f99d247e2b3d5eff8c5 (diff) |
ARM: 6337/2: AB8500 I2C platform configuration and irq
This patch adds the platform part of the AB8500 PRCMU I2C
access driver. The old irq name AB4500 is changed to AB8500.
Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 31 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/irqs.h | 2 |
2 files changed, 28 insertions, 5 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index de310326df1c..642b8e60d119 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <mach/setup.h> | 29 | #include <mach/setup.h> |
30 | #include <mach/devices.h> | 30 | #include <mach/devices.h> |
31 | #include <mach/irqs.h> | ||
31 | 32 | ||
32 | #include "pins-db8500.h" | 33 | #include "pins-db8500.h" |
33 | #include "board-mop500.h" | 34 | #include "board-mop500.h" |
@@ -76,9 +77,27 @@ static struct ab8500_platform_data ab8500_platdata = { | |||
76 | .irq_base = MOP500_AB8500_IRQ_BASE, | 77 | .irq_base = MOP500_AB8500_IRQ_BASE, |
77 | }; | 78 | }; |
78 | 79 | ||
79 | static struct spi_board_info u8500_spi_devices[] = { | 80 | static struct resource ab8500_resources[] = { |
81 | [0] = { | ||
82 | .start = IRQ_AB8500, | ||
83 | .end = IRQ_AB8500, | ||
84 | .flags = IORESOURCE_IRQ | ||
85 | } | ||
86 | }; | ||
87 | |||
88 | struct platform_device ab8500_device = { | ||
89 | .name = "ab8500-i2c", | ||
90 | .id = 0, | ||
91 | .dev = { | ||
92 | .platform_data = &ab8500_platdata, | ||
93 | }, | ||
94 | .num_resources = 1, | ||
95 | .resource = ab8500_resources, | ||
96 | }; | ||
97 | |||
98 | static struct spi_board_info ab8500_spi_devices[] = { | ||
80 | { | 99 | { |
81 | .modalias = "ab8500", | 100 | .modalias = "ab8500-spi", |
82 | .controller_data = &ab4500_chip_info, | 101 | .controller_data = &ab4500_chip_info, |
83 | .platform_data = &ab8500_platdata, | 102 | .platform_data = &ab8500_platdata, |
84 | .max_speed_hz = 12000000, | 103 | .max_speed_hz = 12000000, |
@@ -166,8 +185,12 @@ static void __init u8500_init_machine(void) | |||
166 | 185 | ||
167 | mop500_sdi_init(); | 186 | mop500_sdi_init(); |
168 | 187 | ||
169 | spi_register_board_info(u8500_spi_devices, | 188 | /* If HW is early drop (ED) or V1.0 then use SPI to access AB8500 */ |
170 | ARRAY_SIZE(u8500_spi_devices)); | 189 | if (cpu_is_u8500ed() || cpu_is_u8500v10()) |
190 | spi_register_board_info(ab8500_spi_devices, | ||
191 | ARRAY_SIZE(ab8500_spi_devices)); | ||
192 | else /* If HW is v.1.1 or later use I2C to access AB8500 */ | ||
193 | platform_device_register(&ab8500_device); | ||
171 | } | 194 | } |
172 | 195 | ||
173 | MACHINE_START(U8500, "ST-Ericsson MOP500 platform") | 196 | MACHINE_START(U8500, "ST-Ericsson MOP500 platform") |
diff --git a/arch/arm/mach-ux500/include/mach/irqs.h b/arch/arm/mach-ux500/include/mach/irqs.h index 0e7a2cec1994..0d552d9c9c00 100644 --- a/arch/arm/mach-ux500/include/mach/irqs.h +++ b/arch/arm/mach-ux500/include/mach/irqs.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #define IRQ_HSIR_CH1_OVRRUN (IRQ_SHPI_START + 33) | 40 | #define IRQ_HSIR_CH1_OVRRUN (IRQ_SHPI_START + 33) |
41 | #define IRQ_HSIR_CH2_OVRRUN (IRQ_SHPI_START + 34) | 41 | #define IRQ_HSIR_CH2_OVRRUN (IRQ_SHPI_START + 34) |
42 | #define IRQ_HSIR_CH3_OVRRUN (IRQ_SHPI_START + 35) | 42 | #define IRQ_HSIR_CH3_OVRRUN (IRQ_SHPI_START + 35) |
43 | #define IRQ_AB4500 (IRQ_SHPI_START + 40) | 43 | #define IRQ_AB8500 (IRQ_SHPI_START + 40) |
44 | #define IRQ_PRCMU (IRQ_SHPI_START + 47) | 44 | #define IRQ_PRCMU (IRQ_SHPI_START + 47) |
45 | #define IRQ_DISP (IRQ_SHPI_START + 48) | 45 | #define IRQ_DISP (IRQ_SHPI_START + 48) |
46 | #define IRQ_SiPI3 (IRQ_SHPI_START + 49) | 46 | #define IRQ_SiPI3 (IRQ_SHPI_START + 49) |