diff options
Diffstat (limited to 'arch/arm/mach-pxa/balloon3.c')
-rw-r--r-- | arch/arm/mach-pxa/balloon3.c | 105 |
1 files changed, 69 insertions, 36 deletions
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index 9041340fee1d..79d0f6cf53d7 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c | |||
@@ -68,42 +68,6 @@ static unsigned long balloon3_pin_config[] __initdata = { | |||
68 | 68 | ||
69 | /* Reset, configured as GPIO wakeup source */ | 69 | /* Reset, configured as GPIO wakeup source */ |
70 | GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, | 70 | GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, |
71 | |||
72 | /* LEDs */ | ||
73 | GPIO9_GPIO, /* NAND activity LED */ | ||
74 | GPIO10_GPIO, /* Heartbeat LED */ | ||
75 | |||
76 | /* AC97 */ | ||
77 | GPIO28_AC97_BITCLK, | ||
78 | GPIO29_AC97_SDATA_IN_0, | ||
79 | GPIO30_AC97_SDATA_OUT, | ||
80 | GPIO31_AC97_SYNC, | ||
81 | GPIO113_AC97_nRESET, | ||
82 | GPIO95_GPIO, | ||
83 | |||
84 | /* MMC */ | ||
85 | GPIO32_MMC_CLK, | ||
86 | GPIO92_MMC_DAT_0, | ||
87 | GPIO109_MMC_DAT_1, | ||
88 | GPIO110_MMC_DAT_2, | ||
89 | GPIO111_MMC_DAT_3, | ||
90 | GPIO112_MMC_CMD, | ||
91 | |||
92 | /* USB Host */ | ||
93 | GPIO88_USBH1_PWR, | ||
94 | GPIO89_USBH1_PEN, | ||
95 | |||
96 | /* PC Card */ | ||
97 | GPIO48_nPOE, | ||
98 | GPIO49_nPWE, | ||
99 | GPIO50_nPIOR, | ||
100 | GPIO51_nPIOW, | ||
101 | GPIO85_nPCE_1, | ||
102 | GPIO54_nPCE_2, | ||
103 | GPIO79_PSKTSEL, | ||
104 | GPIO55_nPREG, | ||
105 | GPIO56_nPWAIT, | ||
106 | GPIO57_nIOIS16, | ||
107 | }; | 71 | }; |
108 | 72 | ||
109 | /****************************************************************************** | 73 | /****************************************************************************** |
@@ -132,6 +96,34 @@ int __init parse_balloon3_features(char *arg) | |||
132 | early_param("balloon3_features", parse_balloon3_features); | 96 | early_param("balloon3_features", parse_balloon3_features); |
133 | 97 | ||
134 | /****************************************************************************** | 98 | /****************************************************************************** |
99 | * Compact Flash slot | ||
100 | ******************************************************************************/ | ||
101 | #if defined(CONFIG_PCMCIA_PXA2XX) || defined(CONFIG_PCMCIA_PXA2XX_MODULE) | ||
102 | static unsigned long balloon3_cf_pin_config[] __initdata = { | ||
103 | GPIO48_nPOE, | ||
104 | GPIO49_nPWE, | ||
105 | GPIO50_nPIOR, | ||
106 | GPIO51_nPIOW, | ||
107 | GPIO85_nPCE_1, | ||
108 | GPIO54_nPCE_2, | ||
109 | GPIO79_PSKTSEL, | ||
110 | GPIO55_nPREG, | ||
111 | GPIO56_nPWAIT, | ||
112 | GPIO57_nIOIS16, | ||
113 | }; | ||
114 | |||
115 | static void __init balloon3_cf_init(void) | ||
116 | { | ||
117 | if (!balloon3_has(BALLOON3_FEATURE_CF)) | ||
118 | return; | ||
119 | |||
120 | pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_cf_pin_config)); | ||
121 | } | ||
122 | #else | ||
123 | static inline void balloon3_cf_init(void) {} | ||
124 | #endif | ||
125 | |||
126 | /****************************************************************************** | ||
135 | * NOR Flash | 127 | * NOR Flash |
136 | ******************************************************************************/ | 128 | ******************************************************************************/ |
137 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) | 129 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
@@ -179,6 +171,15 @@ static inline void balloon3_nor_init(void) {} | |||
179 | ******************************************************************************/ | 171 | ******************************************************************************/ |
180 | #if defined(CONFIG_TOUCHSCREEN_UCB1400) || \ | 172 | #if defined(CONFIG_TOUCHSCREEN_UCB1400) || \ |
181 | defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE) | 173 | defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE) |
174 | static unsigned long balloon3_ac97_pin_config[] __initdata = { | ||
175 | GPIO28_AC97_BITCLK, | ||
176 | GPIO29_AC97_SDATA_IN_0, | ||
177 | GPIO30_AC97_SDATA_OUT, | ||
178 | GPIO31_AC97_SYNC, | ||
179 | GPIO113_AC97_nRESET, | ||
180 | GPIO95_GPIO, | ||
181 | }; | ||
182 | |||
182 | static struct ucb1400_pdata vpac270_ucb1400_pdata = { | 183 | static struct ucb1400_pdata vpac270_ucb1400_pdata = { |
183 | .irq = IRQ_GPIO(BALLOON3_GPIO_CODEC_IRQ), | 184 | .irq = IRQ_GPIO(BALLOON3_GPIO_CODEC_IRQ), |
184 | }; | 185 | }; |
@@ -197,6 +198,7 @@ static void __init balloon3_ts_init(void) | |||
197 | if (!balloon3_has(BALLOON3_FEATURE_AUDIO)) | 198 | if (!balloon3_has(BALLOON3_FEATURE_AUDIO)) |
198 | return; | 199 | return; |
199 | 200 | ||
201 | pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_ac97_pin_config)); | ||
200 | pxa_set_ac97_info(NULL); | 202 | pxa_set_ac97_info(NULL); |
201 | platform_device_register(&balloon3_ucb1400_device); | 203 | platform_device_register(&balloon3_ucb1400_device); |
202 | } | 204 | } |
@@ -208,6 +210,11 @@ static inline void balloon3_ts_init(void) {} | |||
208 | * Framebuffer | 210 | * Framebuffer |
209 | ******************************************************************************/ | 211 | ******************************************************************************/ |
210 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) | 212 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) |
213 | static unsigned long balloon3_lcd_pin_config[] __initdata = { | ||
214 | GPIOxx_LCD_TFT_16BPP, | ||
215 | GPIO99_GPIO, | ||
216 | }; | ||
217 | |||
211 | static struct pxafb_mode_info balloon3_lcd_modes[] = { | 218 | static struct pxafb_mode_info balloon3_lcd_modes[] = { |
212 | { | 219 | { |
213 | .pixclock = 38000, | 220 | .pixclock = 38000, |
@@ -242,6 +249,8 @@ static void __init balloon3_lcd_init(void) | |||
242 | if (!balloon3_has(BALLOON3_FEATURE_TOPPOLY)) | 249 | if (!balloon3_has(BALLOON3_FEATURE_TOPPOLY)) |
243 | return; | 250 | return; |
244 | 251 | ||
252 | pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_lcd_pin_config)); | ||
253 | |||
245 | ret = gpio_request(BALLOON3_GPIO_RUN_BACKLIGHT, "BKL-ON"); | 254 | ret = gpio_request(BALLOON3_GPIO_RUN_BACKLIGHT, "BKL-ON"); |
246 | if (ret) { | 255 | if (ret) { |
247 | pr_err("Requesting BKL-ON GPIO failed!\n"); | 256 | pr_err("Requesting BKL-ON GPIO failed!\n"); |
@@ -271,6 +280,15 @@ static inline void balloon3_lcd_init(void) {} | |||
271 | * SD/MMC card controller | 280 | * SD/MMC card controller |
272 | ******************************************************************************/ | 281 | ******************************************************************************/ |
273 | #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) | 282 | #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) |
283 | static unsigned long balloon3_mmc_pin_config[] __initdata = { | ||
284 | GPIO32_MMC_CLK, | ||
285 | GPIO92_MMC_DAT_0, | ||
286 | GPIO109_MMC_DAT_1, | ||
287 | GPIO110_MMC_DAT_2, | ||
288 | GPIO111_MMC_DAT_3, | ||
289 | GPIO112_MMC_CMD, | ||
290 | }; | ||
291 | |||
274 | static struct pxamci_platform_data balloon3_mci_platform_data = { | 292 | static struct pxamci_platform_data balloon3_mci_platform_data = { |
275 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, | 293 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
276 | .gpio_card_detect = -1, | 294 | .gpio_card_detect = -1, |
@@ -281,6 +299,7 @@ static struct pxamci_platform_data balloon3_mci_platform_data = { | |||
281 | 299 | ||
282 | static void __init balloon3_mmc_init(void) | 300 | static void __init balloon3_mmc_init(void) |
283 | { | 301 | { |
302 | pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_mmc_pin_config)); | ||
284 | pxa_set_mci_info(&balloon3_mci_platform_data); | 303 | pxa_set_mci_info(&balloon3_mci_platform_data); |
285 | } | 304 | } |
286 | #else | 305 | #else |
@@ -339,6 +358,11 @@ static inline void balloon3_irda_init(void) {} | |||
339 | * USB Host | 358 | * USB Host |
340 | ******************************************************************************/ | 359 | ******************************************************************************/ |
341 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | 360 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) |
361 | static unsigned long balloon3_uhc_pin_config[] __initdata = { | ||
362 | GPIO88_USBH1_PWR, | ||
363 | GPIO89_USBH1_PEN, | ||
364 | }; | ||
365 | |||
342 | static struct pxaohci_platform_data balloon3_ohci_info = { | 366 | static struct pxaohci_platform_data balloon3_ohci_info = { |
343 | .port_mode = PMM_PERPORT_MODE, | 367 | .port_mode = PMM_PERPORT_MODE, |
344 | .flags = ENABLE_PORT_ALL | POWER_CONTROL_LOW | POWER_SENSE_LOW, | 368 | .flags = ENABLE_PORT_ALL | POWER_CONTROL_LOW | POWER_SENSE_LOW, |
@@ -348,6 +372,7 @@ static void __init balloon3_uhc_init(void) | |||
348 | { | 372 | { |
349 | if (!balloon3_has(BALLOON3_FEATURE_OHCI)) | 373 | if (!balloon3_has(BALLOON3_FEATURE_OHCI)) |
350 | return; | 374 | return; |
375 | pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_uhc_pin_config)); | ||
351 | pxa_set_ohci_info(&balloon3_ohci_info); | 376 | pxa_set_ohci_info(&balloon3_ohci_info); |
352 | } | 377 | } |
353 | #else | 378 | #else |
@@ -358,6 +383,11 @@ static inline void balloon3_uhc_init(void) {} | |||
358 | * LEDs | 383 | * LEDs |
359 | ******************************************************************************/ | 384 | ******************************************************************************/ |
360 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) | 385 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) |
386 | static unsigned long balloon3_led_pin_config[] __initdata = { | ||
387 | GPIO9_GPIO, /* NAND activity LED */ | ||
388 | GPIO10_GPIO, /* Heartbeat LED */ | ||
389 | }; | ||
390 | |||
361 | struct gpio_led balloon3_gpio_leds[] = { | 391 | struct gpio_led balloon3_gpio_leds[] = { |
362 | { | 392 | { |
363 | .name = "balloon3:green:idle", | 393 | .name = "balloon3:green:idle", |
@@ -436,6 +466,7 @@ static struct platform_device balloon3_pcf_leds = { | |||
436 | 466 | ||
437 | static void __init balloon3_leds_init(void) | 467 | static void __init balloon3_leds_init(void) |
438 | { | 468 | { |
469 | pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_led_pin_config)); | ||
439 | platform_device_register(&balloon3_leds); | 470 | platform_device_register(&balloon3_leds); |
440 | platform_device_register(&balloon3_pcf_leds); | 471 | platform_device_register(&balloon3_pcf_leds); |
441 | } | 472 | } |
@@ -757,6 +788,7 @@ static void __init balloon3_init(void) | |||
757 | balloon3_ts_init(); | 788 | balloon3_ts_init(); |
758 | balloon3_udc_init(); | 789 | balloon3_udc_init(); |
759 | balloon3_uhc_init(); | 790 | balloon3_uhc_init(); |
791 | balloon3_cf_init(); | ||
760 | } | 792 | } |
761 | 793 | ||
762 | static struct map_desc balloon3_io_desc[] __initdata = { | 794 | static struct map_desc balloon3_io_desc[] __initdata = { |
@@ -779,6 +811,7 @@ MACHINE_START(BALLOON3, "Balloon3") | |||
779 | .phys_io = 0x40000000, | 811 | .phys_io = 0x40000000, |
780 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 812 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
781 | .map_io = balloon3_map_io, | 813 | .map_io = balloon3_map_io, |
814 | .nr_irqs = BALLOON3_NR_IRQS, | ||
782 | .init_irq = balloon3_init_irq, | 815 | .init_irq = balloon3_init_irq, |
783 | .timer = &pxa_timer, | 816 | .timer = &pxa_timer, |
784 | .init_machine = balloon3_init, | 817 | .init_machine = balloon3_init, |