diff options
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r-- | arch/arm/mach-ux500/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-regulators.c | 201 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-regulators.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 55 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/db8500-regs.h | 10 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/irqs-board-mop500.h | 15 | ||||
-rw-r--r-- | arch/arm/mach-ux500/localtimer.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-ux500/modem-irq-db5500.c | 3 |
9 files changed, 282 insertions, 13 deletions
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig index 203b986280f5..58626013aa32 100644 --- a/arch/arm/mach-ux500/Kconfig +++ b/arch/arm/mach-ux500/Kconfig | |||
@@ -23,6 +23,7 @@ menu "Ux500 target platform" | |||
23 | config MACH_U8500 | 23 | config MACH_U8500 |
24 | bool "U8500 Development platform" | 24 | bool "U8500 Development platform" |
25 | depends on UX500_SOC_DB8500 | 25 | depends on UX500_SOC_DB8500 |
26 | select TPS6105X | ||
26 | help | 27 | help |
27 | Include support for the mop500 development platform. | 28 | Include support for the mop500 development platform. |
28 | 29 | ||
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c index 875c91b2f8a4..9ed0f90cfe23 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.c +++ b/arch/arm/mach-ux500/board-mop500-regulators.c | |||
@@ -13,6 +13,30 @@ | |||
13 | #include <linux/regulator/ab8500.h> | 13 | #include <linux/regulator/ab8500.h> |
14 | #include "board-mop500-regulators.h" | 14 | #include "board-mop500-regulators.h" |
15 | 15 | ||
16 | /* | ||
17 | * TPS61052 regulator | ||
18 | */ | ||
19 | static struct regulator_consumer_supply tps61052_vaudio_consumers[] = { | ||
20 | /* | ||
21 | * Boost converter supply to raise voltage on audio speaker, this | ||
22 | * is actually connected to three pins, VInVhfL (left amplifier) | ||
23 | * VInVhfR (right amplifier) and VIntDClassInt - all three must | ||
24 | * be connected to the same voltage. | ||
25 | */ | ||
26 | REGULATOR_SUPPLY("vintdclassint", "ab8500-codec.0"), | ||
27 | }; | ||
28 | |||
29 | struct regulator_init_data tps61052_regulator = { | ||
30 | .constraints = { | ||
31 | .name = "vaudio-hf", | ||
32 | .min_uV = 4500000, | ||
33 | .max_uV = 4500000, | ||
34 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
35 | }, | ||
36 | .num_consumer_supplies = ARRAY_SIZE(tps61052_vaudio_consumers), | ||
37 | .consumer_supplies = tps61052_vaudio_consumers, | ||
38 | }; | ||
39 | |||
16 | static struct regulator_consumer_supply ab8500_vaux1_consumers[] = { | 40 | static struct regulator_consumer_supply ab8500_vaux1_consumers[] = { |
17 | /* External displays, connector on board 2v5 power supply */ | 41 | /* External displays, connector on board 2v5 power supply */ |
18 | REGULATOR_SUPPLY("vaux12v5", "mcde.0"), | 42 | REGULATOR_SUPPLY("vaux12v5", "mcde.0"), |
@@ -62,6 +86,182 @@ static struct regulator_consumer_supply ab8500_vana_consumers[] = { | |||
62 | REGULATOR_SUPPLY("vsmps2", "mcde.0"), | 86 | REGULATOR_SUPPLY("vsmps2", "mcde.0"), |
63 | }; | 87 | }; |
64 | 88 | ||
89 | /* ab8500 regulator register initialization */ | ||
90 | struct ab8500_regulator_reg_init | ||
91 | ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = { | ||
92 | /* | ||
93 | * VanaRequestCtrl = HP/LP depending on VxRequest | ||
94 | * VextSupply1RequestCtrl = HP/LP depending on VxRequest | ||
95 | */ | ||
96 | INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL2, 0x00), | ||
97 | /* | ||
98 | * VextSupply2RequestCtrl = HP/LP depending on VxRequest | ||
99 | * VextSupply3RequestCtrl = HP/LP depending on VxRequest | ||
100 | * Vaux1RequestCtrl = HP/LP depending on VxRequest | ||
101 | * Vaux2RequestCtrl = HP/LP depending on VxRequest | ||
102 | */ | ||
103 | INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL3, 0x00), | ||
104 | /* | ||
105 | * Vaux3RequestCtrl = HP/LP depending on VxRequest | ||
106 | * SwHPReq = Control through SWValid disabled | ||
107 | */ | ||
108 | INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL4, 0x00), | ||
109 | /* | ||
110 | * VanaSysClkReq1HPValid = disabled | ||
111 | * Vaux1SysClkReq1HPValid = disabled | ||
112 | * Vaux2SysClkReq1HPValid = disabled | ||
113 | * Vaux3SysClkReq1HPValid = disabled | ||
114 | */ | ||
115 | INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID1, 0x00), | ||
116 | /* | ||
117 | * VextSupply1SysClkReq1HPValid = disabled | ||
118 | * VextSupply2SysClkReq1HPValid = disabled | ||
119 | * VextSupply3SysClkReq1HPValid = SysClkReq1 controlled | ||
120 | */ | ||
121 | INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID2, 0x40), | ||
122 | /* | ||
123 | * VanaHwHPReq1Valid = disabled | ||
124 | * Vaux1HwHPreq1Valid = disabled | ||
125 | * Vaux2HwHPReq1Valid = disabled | ||
126 | * Vaux3HwHPReqValid = disabled | ||
127 | */ | ||
128 | INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID1, 0x00), | ||
129 | /* | ||
130 | * VextSupply1HwHPReq1Valid = disabled | ||
131 | * VextSupply2HwHPReq1Valid = disabled | ||
132 | * VextSupply3HwHPReq1Valid = disabled | ||
133 | */ | ||
134 | INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID2, 0x00), | ||
135 | /* | ||
136 | * VanaHwHPReq2Valid = disabled | ||
137 | * Vaux1HwHPReq2Valid = disabled | ||
138 | * Vaux2HwHPReq2Valid = disabled | ||
139 | * Vaux3HwHPReq2Valid = disabled | ||
140 | */ | ||
141 | INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID1, 0x00), | ||
142 | /* | ||
143 | * VextSupply1HwHPReq2Valid = disabled | ||
144 | * VextSupply2HwHPReq2Valid = disabled | ||
145 | * VextSupply3HwHPReq2Valid = HWReq2 controlled | ||
146 | */ | ||
147 | INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID2, 0x04), | ||
148 | /* | ||
149 | * VanaSwHPReqValid = disabled | ||
150 | * Vaux1SwHPReqValid = disabled | ||
151 | */ | ||
152 | INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID1, 0x00), | ||
153 | /* | ||
154 | * Vaux2SwHPReqValid = disabled | ||
155 | * Vaux3SwHPReqValid = disabled | ||
156 | * VextSupply1SwHPReqValid = disabled | ||
157 | * VextSupply2SwHPReqValid = disabled | ||
158 | * VextSupply3SwHPReqValid = disabled | ||
159 | */ | ||
160 | INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID2, 0x00), | ||
161 | /* | ||
162 | * SysClkReq2Valid1 = SysClkReq2 controlled | ||
163 | * SysClkReq3Valid1 = disabled | ||
164 | * SysClkReq4Valid1 = SysClkReq4 controlled | ||
165 | * SysClkReq5Valid1 = disabled | ||
166 | * SysClkReq6Valid1 = SysClkReq6 controlled | ||
167 | * SysClkReq7Valid1 = disabled | ||
168 | * SysClkReq8Valid1 = disabled | ||
169 | */ | ||
170 | INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID1, 0x2a), | ||
171 | /* | ||
172 | * SysClkReq2Valid2 = disabled | ||
173 | * SysClkReq3Valid2 = disabled | ||
174 | * SysClkReq4Valid2 = disabled | ||
175 | * SysClkReq5Valid2 = disabled | ||
176 | * SysClkReq6Valid2 = SysClkReq6 controlled | ||
177 | * SysClkReq7Valid2 = disabled | ||
178 | * SysClkReq8Valid2 = disabled | ||
179 | */ | ||
180 | INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID2, 0x20), | ||
181 | /* | ||
182 | * VTVoutEna = disabled | ||
183 | * Vintcore12Ena = disabled | ||
184 | * Vintcore12Sel = 1.25 V | ||
185 | * Vintcore12LP = inactive (HP) | ||
186 | * VTVoutLP = inactive (HP) | ||
187 | */ | ||
188 | INIT_REGULATOR_REGISTER(AB8500_REGUMISC1, 0x10), | ||
189 | /* | ||
190 | * VaudioEna = disabled | ||
191 | * VdmicEna = disabled | ||
192 | * Vamic1Ena = disabled | ||
193 | * Vamic2Ena = disabled | ||
194 | */ | ||
195 | INIT_REGULATOR_REGISTER(AB8500_VAUDIOSUPPLY, 0x00), | ||
196 | /* | ||
197 | * Vamic1_dzout = high-Z when Vamic1 is disabled | ||
198 | * Vamic2_dzout = high-Z when Vamic2 is disabled | ||
199 | */ | ||
200 | INIT_REGULATOR_REGISTER(AB8500_REGUCTRL1VAMIC, 0x00), | ||
201 | /* | ||
202 | * VPll = Hw controlled | ||
203 | * VanaRegu = force off | ||
204 | */ | ||
205 | INIT_REGULATOR_REGISTER(AB8500_VPLLVANAREGU, 0x02), | ||
206 | /* | ||
207 | * VrefDDREna = disabled | ||
208 | * VrefDDRSleepMode = inactive (no pulldown) | ||
209 | */ | ||
210 | INIT_REGULATOR_REGISTER(AB8500_VREFDDR, 0x00), | ||
211 | /* | ||
212 | * VextSupply1Regu = HW control | ||
213 | * VextSupply2Regu = HW control | ||
214 | * VextSupply3Regu = HW control | ||
215 | * ExtSupply2Bypass = ExtSupply12LPn ball is 0 when Ena is 0 | ||
216 | * ExtSupply3Bypass = ExtSupply3LPn ball is 0 when Ena is 0 | ||
217 | */ | ||
218 | INIT_REGULATOR_REGISTER(AB8500_EXTSUPPLYREGU, 0x2a), | ||
219 | /* | ||
220 | * Vaux1Regu = force HP | ||
221 | * Vaux2Regu = force off | ||
222 | */ | ||
223 | INIT_REGULATOR_REGISTER(AB8500_VAUX12REGU, 0x01), | ||
224 | /* | ||
225 | * Vaux3regu = force off | ||
226 | */ | ||
227 | INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3REGU, 0x00), | ||
228 | /* | ||
229 | * Vsmps1 = 1.15V | ||
230 | */ | ||
231 | INIT_REGULATOR_REGISTER(AB8500_VSMPS1SEL1, 0x24), | ||
232 | /* | ||
233 | * Vaux1Sel = 2.5 V | ||
234 | */ | ||
235 | INIT_REGULATOR_REGISTER(AB8500_VAUX1SEL, 0x08), | ||
236 | /* | ||
237 | * Vaux2Sel = 2.9 V | ||
238 | */ | ||
239 | INIT_REGULATOR_REGISTER(AB8500_VAUX2SEL, 0x0d), | ||
240 | /* | ||
241 | * Vaux3Sel = 2.91 V | ||
242 | */ | ||
243 | INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3SEL, 0x07), | ||
244 | /* | ||
245 | * VextSupply12LP = disabled (no LP) | ||
246 | */ | ||
247 | INIT_REGULATOR_REGISTER(AB8500_REGUCTRL2SPARE, 0x00), | ||
248 | /* | ||
249 | * Vaux1Disch = short discharge time | ||
250 | * Vaux2Disch = short discharge time | ||
251 | * Vaux3Disch = short discharge time | ||
252 | * Vintcore12Disch = short discharge time | ||
253 | * VTVoutDisch = short discharge time | ||
254 | * VaudioDisch = short discharge time | ||
255 | */ | ||
256 | INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH, 0x00), | ||
257 | /* | ||
258 | * VanaDisch = short discharge time | ||
259 | * VdmicPullDownEna = pulldown disabled when Vdmic is disabled | ||
260 | * VdmicDisch = short discharge time | ||
261 | */ | ||
262 | INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH2, 0x00), | ||
263 | }; | ||
264 | |||
65 | /* AB8500 regulators */ | 265 | /* AB8500 regulators */ |
66 | struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = { | 266 | struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = { |
67 | /* supplies to the display/camera */ | 267 | /* supplies to the display/camera */ |
@@ -72,6 +272,7 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = { | |||
72 | .max_uV = 2900000, | 272 | .max_uV = 2900000, |
73 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | 273 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | |
74 | REGULATOR_CHANGE_STATUS, | 274 | REGULATOR_CHANGE_STATUS, |
275 | .boot_on = 1, /* must be on for display */ | ||
75 | }, | 276 | }, |
76 | .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers), | 277 | .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers), |
77 | .consumer_supplies = ab8500_vaux1_consumers, | 278 | .consumer_supplies = ab8500_vaux1_consumers, |
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.h b/arch/arm/mach-ux500/board-mop500-regulators.h index 2675fae52537..94992158d962 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.h +++ b/arch/arm/mach-ux500/board-mop500-regulators.h | |||
@@ -14,6 +14,9 @@ | |||
14 | #include <linux/regulator/machine.h> | 14 | #include <linux/regulator/machine.h> |
15 | #include <linux/regulator/ab8500.h> | 15 | #include <linux/regulator/ab8500.h> |
16 | 16 | ||
17 | extern struct ab8500_regulator_reg_init | ||
18 | ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS]; | ||
17 | extern struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS]; | 19 | extern struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS]; |
20 | extern struct regulator_init_data tps61052_regulator; | ||
18 | 21 | ||
19 | #endif | 22 | #endif |
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 8790d984cac8..6e1907fa94f0 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -20,7 +20,10 @@ | |||
20 | #include <linux/amba/serial.h> | 20 | #include <linux/amba/serial.h> |
21 | #include <linux/spi/spi.h> | 21 | #include <linux/spi/spi.h> |
22 | #include <linux/mfd/ab8500.h> | 22 | #include <linux/mfd/ab8500.h> |
23 | #include <linux/regulator/ab8500.h> | ||
23 | #include <linux/mfd/tc3589x.h> | 24 | #include <linux/mfd/tc3589x.h> |
25 | #include <linux/mfd/tps6105x.h> | ||
26 | #include <linux/mfd/ab8500/gpio.h> | ||
24 | #include <linux/leds-lp5521.h> | 27 | #include <linux/leds-lp5521.h> |
25 | #include <linux/input.h> | 28 | #include <linux/input.h> |
26 | #include <linux/gpio_keys.h> | 29 | #include <linux/gpio_keys.h> |
@@ -41,10 +44,35 @@ | |||
41 | #include "board-mop500.h" | 44 | #include "board-mop500.h" |
42 | #include "board-mop500-regulators.h" | 45 | #include "board-mop500-regulators.h" |
43 | 46 | ||
47 | static struct ab8500_gpio_platform_data ab8500_gpio_pdata = { | ||
48 | .gpio_base = MOP500_AB8500_GPIO(0), | ||
49 | .irq_base = MOP500_AB8500_VIR_GPIO_IRQ_BASE, | ||
50 | /* config_reg is the initial configuration of ab8500 pins. | ||
51 | * The pins can be configured as GPIO or alt functions based | ||
52 | * on value present in GpioSel1 to GpioSel6 and AlternatFunction | ||
53 | * register. This is the array of 7 configuration settings. | ||
54 | * One has to compile time decide these settings. Below is the | ||
55 | * explanation of these setting | ||
56 | * GpioSel1 = 0x00 => Pins GPIO1 to GPIO8 are not used as GPIO | ||
57 | * GpioSel2 = 0x1E => Pins GPIO10 to GPIO13 are configured as GPIO | ||
58 | * GpioSel3 = 0x80 => Pin GPIO24 is configured as GPIO | ||
59 | * GpioSel4 = 0x01 => Pin GPIo25 is configured as GPIO | ||
60 | * GpioSel5 = 0x7A => Pins GPIO34, GPIO36 to GPIO39 are conf as GPIO | ||
61 | * GpioSel6 = 0x00 => Pins GPIO41 & GPIo42 are not configured as GPIO | ||
62 | * AlternaFunction = 0x00 => If Pins GPIO10 to 13 are not configured | ||
63 | * as GPIO then this register selectes the alternate fucntions | ||
64 | */ | ||
65 | .config_reg = {0x00, 0x1E, 0x80, 0x01, | ||
66 | 0x7A, 0x00, 0x00}, | ||
67 | }; | ||
68 | |||
44 | static struct ab8500_platform_data ab8500_platdata = { | 69 | static struct ab8500_platform_data ab8500_platdata = { |
45 | .irq_base = MOP500_AB8500_IRQ_BASE, | 70 | .irq_base = MOP500_AB8500_IRQ_BASE, |
71 | .regulator_reg_init = ab8500_regulator_reg_init, | ||
72 | .num_regulator_reg_init = ARRAY_SIZE(ab8500_regulator_reg_init), | ||
46 | .regulator = ab8500_regulators, | 73 | .regulator = ab8500_regulators, |
47 | .num_regulator = ARRAY_SIZE(ab8500_regulators), | 74 | .num_regulator = ARRAY_SIZE(ab8500_regulators), |
75 | .gpio = &ab8500_gpio_pdata, | ||
48 | }; | 76 | }; |
49 | 77 | ||
50 | static struct resource ab8500_resources[] = { | 78 | static struct resource ab8500_resources[] = { |
@@ -66,6 +94,15 @@ struct platform_device ab8500_device = { | |||
66 | }; | 94 | }; |
67 | 95 | ||
68 | /* | 96 | /* |
97 | * TPS61052 | ||
98 | */ | ||
99 | |||
100 | static struct tps6105x_platform_data mop500_tps61052_data = { | ||
101 | .mode = TPS6105X_MODE_VOLTAGE, | ||
102 | .regulator_data = &tps61052_regulator, | ||
103 | }; | ||
104 | |||
105 | /* | ||
69 | * TC35892 | 106 | * TC35892 |
70 | */ | 107 | */ |
71 | 108 | ||
@@ -135,14 +172,21 @@ static struct lp5521_platform_data __initdata lp5521_sec_data = { | |||
135 | .clock_mode = LP5521_CLOCK_EXT, | 172 | .clock_mode = LP5521_CLOCK_EXT, |
136 | }; | 173 | }; |
137 | 174 | ||
138 | static struct i2c_board_info mop500_i2c0_devices[] = { | 175 | static struct i2c_board_info __initdata mop500_i2c0_devices[] = { |
139 | { | 176 | { |
140 | I2C_BOARD_INFO("tc3589x", 0x42), | 177 | I2C_BOARD_INFO("tc3589x", 0x42), |
141 | .irq = NOMADIK_GPIO_TO_IRQ(217), | 178 | .irq = NOMADIK_GPIO_TO_IRQ(217), |
142 | .platform_data = &mop500_tc35892_data, | 179 | .platform_data = &mop500_tc35892_data, |
143 | }, | 180 | }, |
181 | /* I2C0 devices only available prior to HREFv60 */ | ||
182 | { | ||
183 | I2C_BOARD_INFO("tps61052", 0x33), | ||
184 | .platform_data = &mop500_tps61052_data, | ||
185 | }, | ||
144 | }; | 186 | }; |
145 | 187 | ||
188 | #define NUM_PRE_V60_I2C0_DEVICES 1 | ||
189 | |||
146 | static struct i2c_board_info __initdata mop500_i2c2_devices[] = { | 190 | static struct i2c_board_info __initdata mop500_i2c2_devices[] = { |
147 | { | 191 | { |
148 | /* lp5521 LED driver, 1st device */ | 192 | /* lp5521 LED driver, 1st device */ |
@@ -380,6 +424,8 @@ static void __init mop500_uart_init(void) | |||
380 | 424 | ||
381 | static void __init mop500_init_machine(void) | 425 | static void __init mop500_init_machine(void) |
382 | { | 426 | { |
427 | int i2c0_devs; | ||
428 | |||
383 | /* | 429 | /* |
384 | * The HREFv60 board removed a GPIO expander and routed | 430 | * The HREFv60 board removed a GPIO expander and routed |
385 | * all these GPIO pins to the internal GPIO controller | 431 | * all these GPIO pins to the internal GPIO controller |
@@ -403,8 +449,11 @@ static void __init mop500_init_machine(void) | |||
403 | 449 | ||
404 | platform_device_register(&ab8500_device); | 450 | platform_device_register(&ab8500_device); |
405 | 451 | ||
406 | i2c_register_board_info(0, mop500_i2c0_devices, | 452 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); |
407 | ARRAY_SIZE(mop500_i2c0_devices)); | 453 | if (machine_is_hrefv60()) |
454 | i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES; | ||
455 | |||
456 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); | ||
408 | i2c_register_board_info(2, mop500_i2c2_devices, | 457 | i2c_register_board_info(2, mop500_i2c2_devices, |
409 | ARRAY_SIZE(mop500_i2c2_devices)); | 458 | ARRAY_SIZE(mop500_i2c2_devices)); |
410 | } | 459 | } |
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h index 56722f4be71b..03a31cc9b084 100644 --- a/arch/arm/mach-ux500/board-mop500.h +++ b/arch/arm/mach-ux500/board-mop500.h | |||
@@ -27,6 +27,10 @@ | |||
27 | #define GPIO_BU21013_CS MOP500_EGPIO(13) | 27 | #define GPIO_BU21013_CS MOP500_EGPIO(13) |
28 | #define GPIO_SDMMC_EN MOP500_EGPIO(17) | 28 | #define GPIO_SDMMC_EN MOP500_EGPIO(17) |
29 | #define GPIO_SDMMC_1V8_3V_SEL MOP500_EGPIO(18) | 29 | #define GPIO_SDMMC_1V8_3V_SEL MOP500_EGPIO(18) |
30 | #define MOP500_EGPIO_END MOP500_EGPIO(24) | ||
31 | |||
32 | /* GPIOs on the AB8500 mixed-signals circuit */ | ||
33 | #define MOP500_AB8500_GPIO(x) (MOP500_EGPIO_END + (x)) | ||
30 | 34 | ||
31 | struct i2c_board_info; | 35 | struct i2c_board_info; |
32 | 36 | ||
diff --git a/arch/arm/mach-ux500/include/mach/db8500-regs.h b/arch/arm/mach-ux500/include/mach/db8500-regs.h index 0fefb34c11e4..16647b255378 100644 --- a/arch/arm/mach-ux500/include/mach/db8500-regs.h +++ b/arch/arm/mach-ux500/include/mach/db8500-regs.h | |||
@@ -58,7 +58,7 @@ | |||
58 | #define U8500_GPIO2_BASE (U8500_PER2_BASE + 0xE000) | 58 | #define U8500_GPIO2_BASE (U8500_PER2_BASE + 0xE000) |
59 | #define U8500_GPIO3_BASE (U8500_PER5_BASE + 0x1E000) | 59 | #define U8500_GPIO3_BASE (U8500_PER5_BASE + 0x1E000) |
60 | 60 | ||
61 | /* per7 base addressess */ | 61 | /* per7 base addresses */ |
62 | #define U8500_CR_BASE_ED (U8500_PER7_BASE_ED + 0x8000) | 62 | #define U8500_CR_BASE_ED (U8500_PER7_BASE_ED + 0x8000) |
63 | #define U8500_MTU0_BASE_ED (U8500_PER7_BASE_ED + 0xa000) | 63 | #define U8500_MTU0_BASE_ED (U8500_PER7_BASE_ED + 0xa000) |
64 | #define U8500_MTU1_BASE_ED (U8500_PER7_BASE_ED + 0xb000) | 64 | #define U8500_MTU1_BASE_ED (U8500_PER7_BASE_ED + 0xb000) |
@@ -68,7 +68,7 @@ | |||
68 | #define U8500_UART0_BASE (U8500_PER1_BASE + 0x0000) | 68 | #define U8500_UART0_BASE (U8500_PER1_BASE + 0x0000) |
69 | #define U8500_UART1_BASE (U8500_PER1_BASE + 0x1000) | 69 | #define U8500_UART1_BASE (U8500_PER1_BASE + 0x1000) |
70 | 70 | ||
71 | /* per6 base addressess */ | 71 | /* per6 base addresses */ |
72 | #define U8500_RNG_BASE (U8500_PER6_BASE + 0x0000) | 72 | #define U8500_RNG_BASE (U8500_PER6_BASE + 0x0000) |
73 | #define U8500_PKA_BASE (U8500_PER6_BASE + 0x1000) | 73 | #define U8500_PKA_BASE (U8500_PER6_BASE + 0x1000) |
74 | #define U8500_PKAM_BASE (U8500_PER6_BASE + 0x2000) | 74 | #define U8500_PKAM_BASE (U8500_PER6_BASE + 0x2000) |
@@ -79,11 +79,11 @@ | |||
79 | #define U8500_CRYPTO1_BASE (U8500_PER6_BASE + 0xb000) | 79 | #define U8500_CRYPTO1_BASE (U8500_PER6_BASE + 0xb000) |
80 | #define U8500_CLKRST6_BASE (U8500_PER6_BASE + 0xf000) | 80 | #define U8500_CLKRST6_BASE (U8500_PER6_BASE + 0xf000) |
81 | 81 | ||
82 | /* per5 base addressess */ | 82 | /* per5 base addresses */ |
83 | #define U8500_USBOTG_BASE (U8500_PER5_BASE + 0x00000) | 83 | #define U8500_USBOTG_BASE (U8500_PER5_BASE + 0x00000) |
84 | #define U8500_CLKRST5_BASE (U8500_PER5_BASE + 0x1f000) | 84 | #define U8500_CLKRST5_BASE (U8500_PER5_BASE + 0x1f000) |
85 | 85 | ||
86 | /* per4 base addressess */ | 86 | /* per4 base addresses */ |
87 | #define U8500_BACKUPRAM0_BASE (U8500_PER4_BASE + 0x00000) | 87 | #define U8500_BACKUPRAM0_BASE (U8500_PER4_BASE + 0x00000) |
88 | #define U8500_BACKUPRAM1_BASE (U8500_PER4_BASE + 0x01000) | 88 | #define U8500_BACKUPRAM1_BASE (U8500_PER4_BASE + 0x01000) |
89 | #define U8500_RTT0_BASE (U8500_PER4_BASE + 0x02000) | 89 | #define U8500_RTT0_BASE (U8500_PER4_BASE + 0x02000) |
@@ -106,7 +106,7 @@ | |||
106 | #define U8500_SDI5_BASE (U8500_PER3_BASE + 0x8000) | 106 | #define U8500_SDI5_BASE (U8500_PER3_BASE + 0x8000) |
107 | #define U8500_CLKRST3_BASE (U8500_PER3_BASE + 0xf000) | 107 | #define U8500_CLKRST3_BASE (U8500_PER3_BASE + 0xf000) |
108 | 108 | ||
109 | /* per2 base addressess */ | 109 | /* per2 base addresses */ |
110 | #define U8500_I2C3_BASE (U8500_PER2_BASE + 0x0000) | 110 | #define U8500_I2C3_BASE (U8500_PER2_BASE + 0x0000) |
111 | #define U8500_SPI2_BASE (U8500_PER2_BASE + 0x1000) | 111 | #define U8500_SPI2_BASE (U8500_PER2_BASE + 0x1000) |
112 | #define U8500_SPI1_BASE (U8500_PER2_BASE + 0x2000) | 112 | #define U8500_SPI1_BASE (U8500_PER2_BASE + 0x2000) |
diff --git a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h b/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h index 7cdeb2af0ebb..97ef55f84934 100644 --- a/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h +++ b/arch/arm/mach-ux500/include/mach/irqs-board-mop500.h | |||
@@ -35,9 +35,20 @@ | |||
35 | #define MOP500_STMPE1601_IRQBASE MOP500_EGPIO_IRQ_END | 35 | #define MOP500_STMPE1601_IRQBASE MOP500_EGPIO_IRQ_END |
36 | #define MOP500_STMPE1601_IRQ(x) (MOP500_STMPE1601_IRQBASE + (x)) | 36 | #define MOP500_STMPE1601_IRQ(x) (MOP500_STMPE1601_IRQBASE + (x)) |
37 | 37 | ||
38 | #define MOP500_NR_IRQS MOP500_STMPE1601_IRQ(STMPE_NR_INTERNAL_IRQS) | 38 | #define MOP500_STMPE1601_IRQ_END \ |
39 | MOP500_STMPE1601_IRQ(STMPE_NR_INTERNAL_IRQS) | ||
39 | 40 | ||
40 | #define MOP500_IRQ_END MOP500_NR_IRQS | 41 | /* AB8500 virtual gpio IRQ */ |
42 | #define AB8500_VIR_GPIO_NR_IRQS 16 | ||
43 | |||
44 | #define MOP500_AB8500_VIR_GPIO_IRQ_BASE \ | ||
45 | MOP500_STMPE1601_IRQ_END | ||
46 | #define MOP500_AB8500_VIR_GPIO_IRQ_END \ | ||
47 | (MOP500_AB8500_VIR_GPIO_IRQ_BASE + AB8500_VIR_GPIO_NR_IRQS) | ||
48 | |||
49 | #define MOP500_NR_IRQS MOP500_AB8500_VIR_GPIO_IRQ_END | ||
50 | |||
51 | #define MOP500_IRQ_END MOP500_NR_IRQS | ||
41 | 52 | ||
42 | #if MOP500_IRQ_END > IRQ_BOARD_END | 53 | #if MOP500_IRQ_END > IRQ_BOARD_END |
43 | #undef IRQ_BOARD_END | 54 | #undef IRQ_BOARD_END |
diff --git a/arch/arm/mach-ux500/localtimer.c b/arch/arm/mach-ux500/localtimer.c index 2288f6a7c518..5ba113309a0b 100644 --- a/arch/arm/mach-ux500/localtimer.c +++ b/arch/arm/mach-ux500/localtimer.c | |||
@@ -21,8 +21,9 @@ | |||
21 | /* | 21 | /* |
22 | * Setup the local clock events for a CPU. | 22 | * Setup the local clock events for a CPU. |
23 | */ | 23 | */ |
24 | void __cpuinit local_timer_setup(struct clock_event_device *evt) | 24 | int __cpuinit local_timer_setup(struct clock_event_device *evt) |
25 | { | 25 | { |
26 | evt->irq = IRQ_LOCALTIMER; | 26 | evt->irq = IRQ_LOCALTIMER; |
27 | twd_timer_setup(evt); | 27 | twd_timer_setup(evt); |
28 | return 0; | ||
28 | } | 29 | } |
diff --git a/arch/arm/mach-ux500/modem-irq-db5500.c b/arch/arm/mach-ux500/modem-irq-db5500.c index e1296a7447c8..6b86416c94c9 100644 --- a/arch/arm/mach-ux500/modem-irq-db5500.c +++ b/arch/arm/mach-ux500/modem-irq-db5500.c | |||
@@ -90,8 +90,7 @@ static irqreturn_t modem_cpu_irq_handler(int irq, void *data) | |||
90 | 90 | ||
91 | static void create_virtual_irq(int irq, struct irq_chip *modem_irq_chip) | 91 | static void create_virtual_irq(int irq, struct irq_chip *modem_irq_chip) |
92 | { | 92 | { |
93 | set_irq_chip(irq, modem_irq_chip); | 93 | irq_set_chip_and_handler(irq, modem_irq_chip, handle_simple_irq); |
94 | set_irq_handler(irq, handle_simple_irq); | ||
95 | set_irq_flags(irq, IRQF_VALID); | 94 | set_irq_flags(irq, IRQF_VALID); |
96 | 95 | ||
97 | pr_debug("modem_irq: Created virtual IRQ %d\n", irq); | 96 | pr_debug("modem_irq: Created virtual IRQ %d\n", irq); |