diff options
author | Mattias Wallin <mattias.wallin@stericsson.com> | 2010-05-01 12:26:40 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-05-27 19:37:47 -0400 |
commit | d162251d1b8860ef489aecb712e5f06c33763ef3 (patch) | |
tree | 5904f7726990c3a7f6914d34daf52e95bc23f6b4 | |
parent | 09bcb3f3369e164bf51b3b566b865f2514b23e8c (diff) |
ARM: AB3550 board configuration and irq for U300
This patch adds the i2c board configuration needed for the
Mixed Signal chip AB3550. It also adds the irq numbers needed
for the irq_chip implementation.
Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r-- | arch/arm/mach-u300/i2c.c | 55 | ||||
-rw-r--r-- | arch/arm/mach-u300/include/mach/irqs.h | 7 |
2 files changed, 62 insertions, 0 deletions
diff --git a/arch/arm/mach-u300/i2c.c b/arch/arm/mach-u300/i2c.c index d893ee035c23..f0394baa11fa 100644 --- a/arch/arm/mach-u300/i2c.c +++ b/arch/arm/mach-u300/i2c.c | |||
@@ -46,6 +46,7 @@ | |||
46 | /* BUCK SLEEP 0xAC: 1.05V, Not used, SLEEP_A and B, Not used */ | 46 | /* BUCK SLEEP 0xAC: 1.05V, Not used, SLEEP_A and B, Not used */ |
47 | #define BUCK_SLEEP_SETTING 0xAC | 47 | #define BUCK_SLEEP_SETTING 0xAC |
48 | 48 | ||
49 | #ifdef CONFIG_AB3100_CORE | ||
49 | static struct regulator_consumer_supply supply_ldo_c[] = { | 50 | static struct regulator_consumer_supply supply_ldo_c[] = { |
50 | { | 51 | { |
51 | .dev_name = "ab3100-codec", | 52 | .dev_name = "ab3100-codec", |
@@ -253,14 +254,68 @@ static struct ab3100_platform_data ab3100_plf_data = { | |||
253 | LDO_D_SETTING, | 254 | LDO_D_SETTING, |
254 | }, | 255 | }, |
255 | }; | 256 | }; |
257 | #endif | ||
258 | |||
259 | #ifdef CONFIG_AB3550_CORE | ||
260 | static struct abx500_init_settings ab3550_init_settings[] = { | ||
261 | { | ||
262 | .bank = 0, | ||
263 | .reg = AB3550_IMR1, | ||
264 | .setting = 0xff | ||
265 | }, | ||
266 | { | ||
267 | .bank = 0, | ||
268 | .reg = AB3550_IMR2, | ||
269 | .setting = 0xff | ||
270 | }, | ||
271 | { | ||
272 | .bank = 0, | ||
273 | .reg = AB3550_IMR3, | ||
274 | .setting = 0xff | ||
275 | }, | ||
276 | { | ||
277 | .bank = 0, | ||
278 | .reg = AB3550_IMR4, | ||
279 | .setting = 0xff | ||
280 | }, | ||
281 | { | ||
282 | .bank = 0, | ||
283 | .reg = AB3550_IMR5, | ||
284 | /* The two most significant bits are not used */ | ||
285 | .setting = 0x3f | ||
286 | }, | ||
287 | }; | ||
288 | |||
289 | static struct ab3550_platform_data ab3550_plf_data = { | ||
290 | .irq = { | ||
291 | .base = IRQ_AB3550_BASE, | ||
292 | .count = (IRQ_AB3550_END - IRQ_AB3550_BASE + 1), | ||
293 | }, | ||
294 | .dev_data = { | ||
295 | }, | ||
296 | .init_settings = ab3550_init_settings, | ||
297 | .init_settings_sz = ARRAY_SIZE(ab3550_init_settings), | ||
298 | }; | ||
299 | #endif | ||
256 | 300 | ||
257 | static struct i2c_board_info __initdata bus0_i2c_board_info[] = { | 301 | static struct i2c_board_info __initdata bus0_i2c_board_info[] = { |
302 | #if defined(CONFIG_AB3550_CORE) | ||
303 | { | ||
304 | .type = "ab3550", | ||
305 | .addr = 0x4A, | ||
306 | .irq = IRQ_U300_IRQ0_EXT, | ||
307 | .platform_data = &ab3550_plf_data, | ||
308 | }, | ||
309 | #elif defined(CONFIG_AB3100_CORE) | ||
258 | { | 310 | { |
259 | .type = "ab3100", | 311 | .type = "ab3100", |
260 | .addr = 0x48, | 312 | .addr = 0x48, |
261 | .irq = IRQ_U300_IRQ0_EXT, | 313 | .irq = IRQ_U300_IRQ0_EXT, |
262 | .platform_data = &ab3100_plf_data, | 314 | .platform_data = &ab3100_plf_data, |
263 | }, | 315 | }, |
316 | #else | ||
317 | { }, | ||
318 | #endif | ||
264 | }; | 319 | }; |
265 | 320 | ||
266 | static struct i2c_board_info __initdata bus1_i2c_board_info[] = { | 321 | static struct i2c_board_info __initdata bus1_i2c_board_info[] = { |
diff --git a/arch/arm/mach-u300/include/mach/irqs.h b/arch/arm/mach-u300/include/mach/irqs.h index a6867b12773e..09b1b28fa8fd 100644 --- a/arch/arm/mach-u300/include/mach/irqs.h +++ b/arch/arm/mach-u300/include/mach/irqs.h | |||
@@ -109,6 +109,13 @@ | |||
109 | #define U300_NR_IRQS 48 | 109 | #define U300_NR_IRQS 48 |
110 | #endif | 110 | #endif |
111 | 111 | ||
112 | #ifdef CONFIG_AB3550_CORE | ||
113 | #define IRQ_AB3550_BASE (U300_NR_IRQS) | ||
114 | #define IRQ_AB3550_END (IRQ_AB3550_BASE + 37) | ||
115 | |||
116 | #define NR_IRQS (IRQ_AB3550_END + 1) | ||
117 | #else | ||
112 | #define NR_IRQS U300_NR_IRQS | 118 | #define NR_IRQS U300_NR_IRQS |
119 | #endif | ||
113 | 120 | ||
114 | #endif | 121 | #endif |