diff options
author | Nicolas Pitre <nico@cam.org> | 2005-10-28 11:39:33 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-10-28 11:39:33 -0400 |
commit | 6f475c0133eb91c7df3b056843dc33d2824368a2 (patch) | |
tree | 051e35468fb1965c72e6fa5b679fac48975508b8 /arch/arm/mach-pxa/lubbock.c | |
parent | a999cb04b4bfb4a2243383f00d5714b8d7163035 (diff) |
[ARM] 2897/2: PXA2xx IRDA support
Patch from Nicolas Pitre
This is the PXA2xx common IRDA driver, plus platform support
for Lubbock and Mainstone.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Acked-by: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/lubbock.c')
-rw-r--r-- | arch/arm/mach-pxa/lubbock.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index 69abc7f61ed0..beccf455f796 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/arch/pxa-regs.h> | 35 | #include <asm/arch/pxa-regs.h> |
36 | #include <asm/arch/lubbock.h> | 36 | #include <asm/arch/lubbock.h> |
37 | #include <asm/arch/udc.h> | 37 | #include <asm/arch/udc.h> |
38 | #include <asm/arch/irda.h> | ||
38 | #include <asm/arch/pxafb.h> | 39 | #include <asm/arch/pxafb.h> |
39 | #include <asm/arch/mmc.h> | 40 | #include <asm/arch/mmc.h> |
40 | 41 | ||
@@ -237,11 +238,30 @@ static struct pxamci_platform_data lubbock_mci_platform_data = { | |||
237 | .init = lubbock_mci_init, | 238 | .init = lubbock_mci_init, |
238 | }; | 239 | }; |
239 | 240 | ||
241 | static void lubbock_irda_transceiver_mode(struct device *dev, int mode) | ||
242 | { | ||
243 | unsigned long flags; | ||
244 | |||
245 | local_irq_save(flags); | ||
246 | if (mode & IR_SIRMODE) { | ||
247 | LUB_MISC_WR &= ~(1 << 4); | ||
248 | } else if (mode & IR_FIRMODE) { | ||
249 | LUB_MISC_WR |= 1 << 4; | ||
250 | } | ||
251 | local_irq_restore(flags); | ||
252 | } | ||
253 | |||
254 | static struct pxaficp_platform_data lubbock_ficp_platform_data = { | ||
255 | .transceiver_cap = IR_SIRMODE | IR_FIRMODE, | ||
256 | .transceiver_mode = lubbock_irda_transceiver_mode, | ||
257 | }; | ||
258 | |||
240 | static void __init lubbock_init(void) | 259 | static void __init lubbock_init(void) |
241 | { | 260 | { |
242 | pxa_set_udc_info(&udc_info); | 261 | pxa_set_udc_info(&udc_info); |
243 | set_pxa_fb_info(&sharp_lm8v31); | 262 | set_pxa_fb_info(&sharp_lm8v31); |
244 | pxa_set_mci_info(&lubbock_mci_platform_data); | 263 | pxa_set_mci_info(&lubbock_mci_platform_data); |
264 | pxa_set_ficp_info(&lubbock_ficp_platform_data); | ||
245 | (void) platform_add_devices(devices, ARRAY_SIZE(devices)); | 265 | (void) platform_add_devices(devices, ARRAY_SIZE(devices)); |
246 | } | 266 | } |
247 | 267 | ||