diff options
Diffstat (limited to 'arch/arm/mach-pxa/mainstone.c')
-rw-r--r-- | arch/arm/mach-pxa/mainstone.c | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index f2e9e7c4da8e..d44af761564d 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -26,12 +26,13 @@ | |||
26 | #include <linux/input.h> | 26 | #include <linux/input.h> |
27 | #include <linux/gpio_keys.h> | 27 | #include <linux/gpio_keys.h> |
28 | #include <linux/pwm_backlight.h> | 28 | #include <linux/pwm_backlight.h> |
29 | #include <linux/smc91x.h> | ||
29 | 30 | ||
30 | #include <asm/types.h> | 31 | #include <asm/types.h> |
31 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
32 | #include <asm/memory.h> | 33 | #include <asm/memory.h> |
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
34 | #include <asm/hardware.h> | 35 | #include <mach/hardware.h> |
35 | #include <asm/irq.h> | 36 | #include <asm/irq.h> |
36 | #include <asm/sizes.h> | 37 | #include <asm/sizes.h> |
37 | 38 | ||
@@ -40,17 +41,17 @@ | |||
40 | #include <asm/mach/irq.h> | 41 | #include <asm/mach/irq.h> |
41 | #include <asm/mach/flash.h> | 42 | #include <asm/mach/flash.h> |
42 | 43 | ||
43 | #include <asm/arch/pxa-regs.h> | 44 | #include <mach/pxa-regs.h> |
44 | #include <asm/arch/pxa2xx-regs.h> | 45 | #include <mach/pxa2xx-regs.h> |
45 | #include <asm/arch/mfp-pxa27x.h> | 46 | #include <mach/mfp-pxa27x.h> |
46 | #include <asm/arch/mainstone.h> | 47 | #include <mach/mainstone.h> |
47 | #include <asm/arch/audio.h> | 48 | #include <mach/audio.h> |
48 | #include <asm/arch/pxafb.h> | 49 | #include <mach/pxafb.h> |
49 | #include <asm/arch/i2c.h> | 50 | #include <mach/i2c.h> |
50 | #include <asm/arch/mmc.h> | 51 | #include <mach/mmc.h> |
51 | #include <asm/arch/irda.h> | 52 | #include <mach/irda.h> |
52 | #include <asm/arch/ohci.h> | 53 | #include <mach/ohci.h> |
53 | #include <asm/arch/pxa27x_keypad.h> | 54 | #include <mach/pxa27x_keypad.h> |
54 | 55 | ||
55 | #include "generic.h" | 56 | #include "generic.h" |
56 | #include "devices.h" | 57 | #include "devices.h" |
@@ -110,9 +111,9 @@ static unsigned long mainstone_pin_config[] = { | |||
110 | GPIO45_AC97_SYSCLK, | 111 | GPIO45_AC97_SYSCLK, |
111 | 112 | ||
112 | /* Keypad */ | 113 | /* Keypad */ |
113 | GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, | 114 | GPIO93_KP_DKIN_0, |
114 | GPIO94_KP_DKIN_1 | WAKEUP_ON_LEVEL_HIGH, | 115 | GPIO94_KP_DKIN_1, |
115 | GPIO95_KP_DKIN_2 | WAKEUP_ON_LEVEL_HIGH, | 116 | GPIO95_KP_DKIN_2, |
116 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | 117 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, |
117 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | 118 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, |
118 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | 119 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, |
@@ -190,7 +191,7 @@ static void __init mainstone_init_irq(void) | |||
190 | MST_INTSETCLR = 0; | 191 | MST_INTSETCLR = 0; |
191 | 192 | ||
192 | set_irq_chained_handler(IRQ_GPIO(0), mainstone_irq_handler); | 193 | set_irq_chained_handler(IRQ_GPIO(0), mainstone_irq_handler); |
193 | set_irq_type(IRQ_GPIO(0), IRQT_FALLING); | 194 | set_irq_type(IRQ_GPIO(0), IRQ_TYPE_EDGE_FALLING); |
194 | } | 195 | } |
195 | 196 | ||
196 | #ifdef CONFIG_PM | 197 | #ifdef CONFIG_PM |
@@ -240,11 +241,19 @@ static struct resource smc91x_resources[] = { | |||
240 | } | 241 | } |
241 | }; | 242 | }; |
242 | 243 | ||
244 | static struct smc91x_platdata mainstone_smc91x_info = { | ||
245 | .flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT | | ||
246 | SMC91X_NOWAIT | SMC91X_USE_DMA, | ||
247 | }; | ||
248 | |||
243 | static struct platform_device smc91x_device = { | 249 | static struct platform_device smc91x_device = { |
244 | .name = "smc91x", | 250 | .name = "smc91x", |
245 | .id = 0, | 251 | .id = 0, |
246 | .num_resources = ARRAY_SIZE(smc91x_resources), | 252 | .num_resources = ARRAY_SIZE(smc91x_resources), |
247 | .resource = smc91x_resources, | 253 | .resource = smc91x_resources, |
254 | .dev = { | ||
255 | .platform_data = &mainstone_smc91x_info, | ||
256 | }, | ||
248 | }; | 257 | }; |
249 | 258 | ||
250 | static int mst_audio_startup(struct snd_pcm_substream *substream, void *priv) | 259 | static int mst_audio_startup(struct snd_pcm_substream *substream, void *priv) |
@@ -455,6 +464,7 @@ static void mainstone_irda_transceiver_mode(struct device *dev, int mode) | |||
455 | } else if (mode & IR_FIRMODE) { | 464 | } else if (mode & IR_FIRMODE) { |
456 | MST_MSCWR1 |= MST_MSCWR1_IRDA_FIR; | 465 | MST_MSCWR1 |= MST_MSCWR1_IRDA_FIR; |
457 | } | 466 | } |
467 | pxa2xx_transceiver_mode(dev, mode); | ||
458 | if (mode & IR_OFF) { | 468 | if (mode & IR_OFF) { |
459 | MST_MSCWR1 = (MST_MSCWR1 & ~MST_MSCWR1_IRDA_MASK) | MST_MSCWR1_IRDA_OFF; | 469 | MST_MSCWR1 = (MST_MSCWR1 & ~MST_MSCWR1_IRDA_MASK) | MST_MSCWR1_IRDA_OFF; |
460 | } else { | 470 | } else { |
@@ -513,7 +523,7 @@ static struct pxaohci_platform_data mainstone_ohci_platform_data = { | |||
513 | .init = mainstone_ohci_init, | 523 | .init = mainstone_ohci_init, |
514 | }; | 524 | }; |
515 | 525 | ||
516 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES) | 526 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) |
517 | static unsigned int mainstone_matrix_keys[] = { | 527 | static unsigned int mainstone_matrix_keys[] = { |
518 | KEY(0, 0, KEY_A), KEY(1, 0, KEY_B), KEY(2, 0, KEY_C), | 528 | KEY(0, 0, KEY_A), KEY(1, 0, KEY_B), KEY(2, 0, KEY_C), |
519 | KEY(3, 0, KEY_D), KEY(4, 0, KEY_E), KEY(5, 0, KEY_F), | 529 | KEY(3, 0, KEY_D), KEY(4, 0, KEY_E), KEY(5, 0, KEY_F), |