diff options
Diffstat (limited to 'arch/arm/mach-pxa/mainstone.c')
-rw-r--r-- | arch/arm/mach-pxa/mainstone.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 8b4a21623fc0..a48c64026e1f 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <asm/arch/audio.h> | 37 | #include <asm/arch/audio.h> |
38 | #include <asm/arch/pxafb.h> | 38 | #include <asm/arch/pxafb.h> |
39 | #include <asm/arch/mmc.h> | 39 | #include <asm/arch/mmc.h> |
40 | #include <asm/arch/irda.h> | ||
40 | 41 | ||
41 | #include "generic.h" | 42 | #include "generic.h" |
42 | 43 | ||
@@ -294,6 +295,29 @@ static struct pxamci_platform_data mainstone_mci_platform_data = { | |||
294 | .exit = mainstone_mci_exit, | 295 | .exit = mainstone_mci_exit, |
295 | }; | 296 | }; |
296 | 297 | ||
298 | static void mainstone_irda_transceiver_mode(struct device *dev, int mode) | ||
299 | { | ||
300 | unsigned long flags; | ||
301 | |||
302 | local_irq_save(flags); | ||
303 | if (mode & IR_SIRMODE) { | ||
304 | MST_MSCWR1 &= ~MST_MSCWR1_IRDA_FIR; | ||
305 | } else if (mode & IR_FIRMODE) { | ||
306 | MST_MSCWR1 |= MST_MSCWR1_IRDA_FIR; | ||
307 | } | ||
308 | if (mode & IR_OFF) { | ||
309 | MST_MSCWR1 = (MST_MSCWR1 & ~MST_MSCWR1_IRDA_MASK) | MST_MSCWR1_IRDA_OFF; | ||
310 | } else { | ||
311 | MST_MSCWR1 = (MST_MSCWR1 & ~MST_MSCWR1_IRDA_MASK) | MST_MSCWR1_IRDA_FULL; | ||
312 | } | ||
313 | local_irq_restore(flags); | ||
314 | } | ||
315 | |||
316 | static struct pxaficp_platform_data mainstone_ficp_platform_data = { | ||
317 | .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF, | ||
318 | .transceiver_mode = mainstone_irda_transceiver_mode, | ||
319 | }; | ||
320 | |||
297 | static void __init mainstone_init(void) | 321 | static void __init mainstone_init(void) |
298 | { | 322 | { |
299 | /* | 323 | /* |
@@ -313,6 +337,7 @@ static void __init mainstone_init(void) | |||
313 | set_pxa_fb_info(&toshiba_ltm035a776c); | 337 | set_pxa_fb_info(&toshiba_ltm035a776c); |
314 | 338 | ||
315 | pxa_set_mci_info(&mainstone_mci_platform_data); | 339 | pxa_set_mci_info(&mainstone_mci_platform_data); |
340 | pxa_set_ficp_info(&mainstone_ficp_platform_data); | ||
316 | } | 341 | } |
317 | 342 | ||
318 | 343 | ||