Jonathan McDowell | 2a23ec3 | 2009-07-04 14:43:56 +0100 | [diff] [blame] | 1 | /* |
| 2 | * linux/arch/arm/mach-pxa/balloon3.c |
| 3 | * |
| 4 | * Support for Balloonboard.org Balloon3 board. |
| 5 | * |
| 6 | * Author: Nick Bane, Wookey, Jonathan McDowell |
| 7 | * Created: June, 2006 |
| 8 | * Copyright: Toby Churchill Ltd |
| 9 | * Derived from mainstone.c, by Nico Pitre |
| 10 | * |
| 11 | * This program is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License version 2 as |
| 13 | * published by the Free Software Foundation. |
| 14 | */ |
| 15 | |
| 16 | #include <linux/init.h> |
| 17 | #include <linux/platform_device.h> |
| 18 | #include <linux/sysdev.h> |
| 19 | #include <linux/interrupt.h> |
| 20 | #include <linux/sched.h> |
| 21 | #include <linux/bitops.h> |
| 22 | #include <linux/fb.h> |
| 23 | #include <linux/gpio.h> |
| 24 | #include <linux/ioport.h> |
Marek Vasut | 12a2449 | 2010-07-27 01:37:44 +0200 | [diff] [blame] | 25 | #include <linux/ucb1400.h> |
Jonathan McDowell | 2a23ec3 | 2009-07-04 14:43:56 +0100 | [diff] [blame] | 26 | #include <linux/mtd/mtd.h> |
| 27 | #include <linux/mtd/partitions.h> |
| 28 | #include <linux/types.h> |
| 29 | |
| 30 | #include <asm/setup.h> |
| 31 | #include <asm/mach-types.h> |
| 32 | #include <asm/irq.h> |
| 33 | #include <asm/sizes.h> |
| 34 | |
| 35 | #include <asm/mach/arch.h> |
| 36 | #include <asm/mach/map.h> |
| 37 | #include <asm/mach/irq.h> |
| 38 | #include <asm/mach/flash.h> |
| 39 | |
| 40 | #include <mach/pxa27x.h> |
| 41 | #include <mach/balloon3.h> |
| 42 | #include <mach/audio.h> |
| 43 | #include <mach/pxafb.h> |
| 44 | #include <mach/mmc.h> |
| 45 | #include <mach/udc.h> |
| 46 | #include <mach/pxa27x-udc.h> |
| 47 | #include <mach/irda.h> |
| 48 | #include <mach/ohci.h> |
| 49 | |
| 50 | #include <plat/i2c.h> |
| 51 | |
| 52 | #include "generic.h" |
| 53 | #include "devices.h" |
| 54 | |
Marek Vasut | b0240bf | 2010-07-26 23:24:44 +0200 | [diff] [blame] | 55 | /****************************************************************************** |
| 56 | * Pin configuration |
| 57 | ******************************************************************************/ |
| 58 | static unsigned long balloon3_pin_config[] __initdata = { |
| 59 | /* Select BTUART 'COM1/ttyS0' as IO option for pins 42/43/44/45 */ |
| 60 | GPIO42_BTUART_RXD, |
| 61 | GPIO43_BTUART_TXD, |
| 62 | GPIO44_BTUART_CTS, |
| 63 | GPIO45_BTUART_RTS, |
| 64 | |
Marek Vasut | 12a2449 | 2010-07-27 01:37:44 +0200 | [diff] [blame] | 65 | /* Reset, configured as GPIO wakeup source */ |
Marek Vasut | b0240bf | 2010-07-26 23:24:44 +0200 | [diff] [blame] | 66 | GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, |
| 67 | |
Marek Vasut | 12a2449 | 2010-07-27 01:37:44 +0200 | [diff] [blame] | 68 | /* LEDs */ |
| 69 | GPIO9_GPIO, /* NAND activity LED */ |
| 70 | GPIO10_GPIO, /* Heartbeat LED */ |
Marek Vasut | b0240bf | 2010-07-26 23:24:44 +0200 | [diff] [blame] | 71 | |
Marek Vasut | 12a2449 | 2010-07-27 01:37:44 +0200 | [diff] [blame] | 72 | /* AC97 */ |
Marek Vasut | b0240bf | 2010-07-26 23:24:44 +0200 | [diff] [blame] | 73 | GPIO28_AC97_BITCLK, |
| 74 | GPIO29_AC97_SDATA_IN_0, |
| 75 | GPIO30_AC97_SDATA_OUT, |
| 76 | GPIO31_AC97_SYNC, |
| 77 | GPIO113_AC97_nRESET, |
Marek Vasut | 12a2449 | 2010-07-27 01:37:44 +0200 | [diff] [blame] | 78 | GPIO95_GPIO, |
Marek Vasut | b0240bf | 2010-07-26 23:24:44 +0200 | [diff] [blame] | 79 | |
Marek Vasut | 12a2449 | 2010-07-27 01:37:44 +0200 | [diff] [blame] | 80 | /* MMC */ |
Marek Vasut | b0240bf | 2010-07-26 23:24:44 +0200 | [diff] [blame] | 81 | GPIO32_MMC_CLK, |
| 82 | GPIO92_MMC_DAT_0, |
| 83 | GPIO109_MMC_DAT_1, |
| 84 | GPIO110_MMC_DAT_2, |
| 85 | GPIO111_MMC_DAT_3, |
| 86 | GPIO112_MMC_CMD, |
Marek Vasut | b0240bf | 2010-07-26 23:24:44 +0200 | [diff] [blame] | 87 | |
Marek Vasut | 12a2449 | 2010-07-27 01:37:44 +0200 | [diff] [blame] | 88 | /* USB Host */ |
Marek Vasut | b0240bf | 2010-07-26 23:24:44 +0200 | [diff] [blame] | 89 | GPIO88_USBH1_PWR, |
| 90 | GPIO89_USBH1_PEN, |
Marek Vasut | a9c0629 | 2010-07-27 21:48:10 +0200 | [diff] [blame^] | 91 | |
| 92 | /* PC Card */ |
| 93 | GPIO48_nPOE, |
| 94 | GPIO49_nPWE, |
| 95 | GPIO50_nPIOR, |
| 96 | GPIO51_nPIOW, |
| 97 | GPIO85_nPCE_1, |
| 98 | GPIO54_nPCE_2, |
| 99 | GPIO79_PSKTSEL, |
| 100 | GPIO55_nPREG, |
| 101 | GPIO56_nPWAIT, |
| 102 | GPIO57_nIOIS16, |
Marek Vasut | b0240bf | 2010-07-26 23:24:44 +0200 | [diff] [blame] | 103 | }; |
| 104 | |
Marek Vasut | b0240bf | 2010-07-26 23:24:44 +0200 | [diff] [blame] | 105 | /****************************************************************************** |
| 106 | * Compatibility: Parameter parsing |
| 107 | ******************************************************************************/ |
Jonathan McDowell | 2a23ec3 | 2009-07-04 14:43:56 +0100 | [diff] [blame] | 108 | static unsigned long balloon3_irq_enabled; |
| 109 | |
| 110 | static unsigned long balloon3_features_present = |
| 111 | (1 << BALLOON3_FEATURE_OHCI) | (1 << BALLOON3_FEATURE_CF) | |
| 112 | (1 << BALLOON3_FEATURE_AUDIO) | |
| 113 | (1 << BALLOON3_FEATURE_TOPPOLY); |
| 114 | |
| 115 | int balloon3_has(enum balloon3_features feature) |
| 116 | { |
| 117 | return (balloon3_features_present & (1 << feature)) ? 1 : 0; |
| 118 | } |
| 119 | EXPORT_SYMBOL_GPL(balloon3_has); |
| 120 | |
| 121 | int __init parse_balloon3_features(char *arg) |
| 122 | { |
| 123 | if (!arg) |
| 124 | return 0; |
| 125 | |
| 126 | return strict_strtoul(arg, 0, &balloon3_features_present); |
| 127 | } |
| 128 | early_param("balloon3_features", parse_balloon3_features); |
| 129 | |
Marek Vasut | b0240bf | 2010-07-26 23:24:44 +0200 | [diff] [blame] | 130 | /****************************************************************************** |
Marek Vasut | 12a2449 | 2010-07-27 01:37:44 +0200 | [diff] [blame] | 131 | * NOR Flash |
| 132 | ******************************************************************************/ |
| 133 | #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE) |
| 134 | static struct mtd_partition balloon3_nor_partitions[] = { |
| 135 | { |
| 136 | .name = "Flash", |
| 137 | .offset = 0x00000000, |
| 138 | .size = MTDPART_SIZ_FULL, |
| 139 | } |
| 140 | }; |
| 141 | |
| 142 | static struct physmap_flash_data balloon3_flash_data[] = { |
| 143 | { |
| 144 | .width = 2, /* bankwidth in bytes */ |
| 145 | .parts = balloon3_nor_partitions, |
| 146 | .nr_parts = ARRAY_SIZE(balloon3_nor_partitions) |
| 147 | } |
| 148 | }; |
| 149 | |
| 150 | static struct resource balloon3_flash_resource = { |
| 151 | .start = PXA_CS0_PHYS, |
| 152 | .end = PXA_CS0_PHYS + SZ_64M - 1, |
| 153 | .flags = IORESOURCE_MEM, |
| 154 | }; |
| 155 | |
| 156 | static struct platform_device balloon3_flash = { |
| 157 | .name = "physmap-flash", |
| 158 | .id = 0, |
| 159 | .resource = &balloon3_flash_resource, |
| 160 | .num_resources = 1, |
| 161 | .dev = { |
| 162 | .platform_data = balloon3_flash_data, |
| 163 | }, |
| 164 | }; |
| 165 | static void __init balloon3_nor_init(void) |
| 166 | { |
| 167 | platform_device_register(&balloon3_flash); |
| 168 | } |
| 169 | #else |
| 170 | static inline void balloon3_nor_init(void) {} |
| 171 | #endif |
| 172 | |
| 173 | /****************************************************************************** |
| 174 | * Audio and Touchscreen |
| 175 | ******************************************************************************/ |
| 176 | #if defined(CONFIG_TOUCHSCREEN_UCB1400) || \ |
| 177 | defined(CONFIG_TOUCHSCREEN_UCB1400_MODULE) |
| 178 | static struct ucb1400_pdata vpac270_ucb1400_pdata = { |
| 179 | .irq = IRQ_GPIO(BALLOON3_GPIO_CODEC_IRQ), |
| 180 | }; |
| 181 | |
| 182 | |
| 183 | static struct platform_device balloon3_ucb1400_device = { |
| 184 | .name = "ucb1400_core", |
| 185 | .id = -1, |
| 186 | .dev = { |
| 187 | .platform_data = &vpac270_ucb1400_pdata, |
| 188 | }, |
| 189 | }; |
| 190 | |
| 191 | static void __init balloon3_ts_init(void) |
| 192 | { |
| 193 | if (!balloon3_has(BALLOON3_FEATURE_AUDIO)) |
| 194 | return; |
| 195 | |
| 196 | pxa_set_ac97_info(NULL); |
| 197 | platform_device_register(&balloon3_ucb1400_device); |
| 198 | } |
| 199 | #else |
| 200 | static inline void balloon3_ts_init(void) {} |
| 201 | #endif |
| 202 | |
| 203 | /****************************************************************************** |
| 204 | * Framebuffer |
| 205 | ******************************************************************************/ |
| 206 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) |
| 207 | static struct pxafb_mode_info balloon3_lcd_modes[] = { |
| 208 | { |
| 209 | .pixclock = 38000, |
| 210 | .xres = 480, |
| 211 | .yres = 640, |
| 212 | .bpp = 16, |
| 213 | .hsync_len = 8, |
| 214 | .left_margin = 8, |
| 215 | .right_margin = 8, |
| 216 | .vsync_len = 2, |
| 217 | .upper_margin = 4, |
| 218 | .lower_margin = 5, |
| 219 | .sync = 0, |
| 220 | }, |
| 221 | }; |
| 222 | |
| 223 | static struct pxafb_mach_info balloon3_lcd_screen = { |
| 224 | .modes = balloon3_lcd_modes, |
| 225 | .num_modes = ARRAY_SIZE(balloon3_lcd_modes), |
| 226 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, |
| 227 | }; |
| 228 | |
| 229 | static void balloon3_backlight_power(int on) |
| 230 | { |
| 231 | gpio_set_value(BALLOON3_GPIO_RUN_BACKLIGHT, on); |
| 232 | } |
| 233 | |
| 234 | static void __init balloon3_lcd_init(void) |
| 235 | { |
| 236 | int ret; |
| 237 | |
| 238 | if (!balloon3_has(BALLOON3_FEATURE_TOPPOLY)) |
| 239 | return; |
| 240 | |
| 241 | ret = gpio_request(BALLOON3_GPIO_RUN_BACKLIGHT, "BKL-ON"); |
| 242 | if (ret) { |
| 243 | pr_err("Requesting BKL-ON GPIO failed!\n"); |
| 244 | goto err; |
| 245 | } |
| 246 | |
| 247 | ret = gpio_direction_output(BALLOON3_GPIO_RUN_BACKLIGHT, 1); |
| 248 | if (ret) { |
| 249 | pr_err("Setting BKL-ON GPIO direction failed!\n"); |
| 250 | goto err2; |
| 251 | } |
| 252 | |
| 253 | balloon3_lcd_screen.pxafb_backlight_power = balloon3_backlight_power; |
| 254 | set_pxa_fb_info(&balloon3_lcd_screen); |
| 255 | return; |
| 256 | |
| 257 | err2: |
| 258 | gpio_free(BALLOON3_GPIO_RUN_BACKLIGHT); |
| 259 | err: |
| 260 | return; |
| 261 | } |
| 262 | #else |
| 263 | static inline void balloon3_lcd_init(void) {} |
| 264 | #endif |
| 265 | |
| 266 | /****************************************************************************** |
| 267 | * SD/MMC card controller |
| 268 | ******************************************************************************/ |
| 269 | #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) |
| 270 | static struct pxamci_platform_data balloon3_mci_platform_data = { |
| 271 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
| 272 | .gpio_card_detect = -1, |
| 273 | .gpio_card_ro = -1, |
| 274 | .gpio_power = -1, |
| 275 | .detect_delay_ms = 200, |
| 276 | }; |
| 277 | |
| 278 | static void __init balloon3_mmc_init(void) |
| 279 | { |
| 280 | pxa_set_mci_info(&balloon3_mci_platform_data); |
| 281 | } |
| 282 | #else |
| 283 | static inline void balloon3_mmc_init(void) {} |
| 284 | #endif |
| 285 | |
| 286 | /****************************************************************************** |
| 287 | * USB Gadget |
| 288 | ******************************************************************************/ |
| 289 | #if defined(CONFIG_USB_GADGET_PXA27X)||defined(CONFIG_USB_GADGET_PXA27X_MODULE) |
| 290 | static void balloon3_udc_command(int cmd) |
| 291 | { |
| 292 | if (cmd == PXA2XX_UDC_CMD_CONNECT) |
| 293 | UP2OCR |= UP2OCR_DPPUE | UP2OCR_DPPUBE; |
| 294 | else if (cmd == PXA2XX_UDC_CMD_DISCONNECT) |
| 295 | UP2OCR &= ~UP2OCR_DPPUE; |
| 296 | } |
| 297 | |
| 298 | static int balloon3_udc_is_connected(void) |
| 299 | { |
| 300 | return 1; |
| 301 | } |
| 302 | |
| 303 | static struct pxa2xx_udc_mach_info balloon3_udc_info __initdata = { |
| 304 | .udc_command = balloon3_udc_command, |
| 305 | .udc_is_connected = balloon3_udc_is_connected, |
| 306 | .gpio_pullup = -1, |
| 307 | }; |
| 308 | |
| 309 | static void __init balloon3_udc_init(void) |
| 310 | { |
| 311 | pxa_set_udc_info(&balloon3_udc_info); |
| 312 | platform_device_register(&balloon3_gpio_vbus); |
| 313 | } |
| 314 | #else |
| 315 | static inline void balloon3_udc_init(void) {} |
| 316 | #endif |
| 317 | |
| 318 | /****************************************************************************** |
| 319 | * IrDA |
| 320 | ******************************************************************************/ |
| 321 | #if defined(CONFIG_IRDA) || defined(CONFIG_IRDA_MODULE) |
| 322 | static struct pxaficp_platform_data balloon3_ficp_platform_data = { |
| 323 | .transceiver_cap = IR_FIRMODE | IR_SIRMODE | IR_OFF, |
| 324 | }; |
| 325 | |
| 326 | static void __init balloon3_irda_init(void) |
| 327 | { |
| 328 | pxa_set_ficp_info(&balloon3_ficp_platform_data); |
| 329 | } |
| 330 | #else |
| 331 | static inline void balloon3_irda_init(void) {} |
| 332 | #endif |
| 333 | |
| 334 | /****************************************************************************** |
| 335 | * USB Host |
| 336 | ******************************************************************************/ |
| 337 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) |
| 338 | static struct pxaohci_platform_data balloon3_ohci_info = { |
| 339 | .port_mode = PMM_PERPORT_MODE, |
| 340 | .flags = ENABLE_PORT_ALL | POWER_CONTROL_LOW | POWER_SENSE_LOW, |
| 341 | }; |
| 342 | |
| 343 | static void __init balloon3_uhc_init(void) |
| 344 | { |
| 345 | if (!balloon3_has(BALLOON3_FEATURE_OHCI)) |
| 346 | return; |
| 347 | pxa_set_ohci_info(&balloon3_ohci_info); |
| 348 | } |
| 349 | #else |
| 350 | static inline void balloon3_uhc_init(void) {} |
| 351 | #endif |
| 352 | |
| 353 | /****************************************************************************** |
| 354 | * LEDs |
| 355 | ******************************************************************************/ |
| 356 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) |
| 357 | struct gpio_led balloon3_gpio_leds[] = { |
| 358 | { |
| 359 | .name = "balloon3:green:idle", |
| 360 | .default_trigger = "heartbeat", |
| 361 | .gpio = BALLOON3_GPIO_LED_IDLE, |
| 362 | .active_low = 1, |
| 363 | }, { |
| 364 | .name = "balloon3:green:nand", |
| 365 | .default_trigger = "nand-disk", |
| 366 | .gpio = BALLOON3_GPIO_LED_NAND, |
| 367 | .active_low = 1, |
| 368 | }, |
| 369 | }; |
| 370 | |
| 371 | static struct gpio_led_platform_data balloon3_gpio_led_info = { |
| 372 | .leds = balloon3_gpio_leds, |
| 373 | .num_leds = ARRAY_SIZE(balloon3_gpio_leds), |
| 374 | }; |
| 375 | |
| 376 | static struct platform_device balloon3_leds = { |
| 377 | .name = "leds-gpio", |
| 378 | .id = -1, |
| 379 | .dev = { |
| 380 | .platform_data = &balloon3_gpio_led_info, |
| 381 | } |
| 382 | }; |
| 383 | |
| 384 | static void __init balloon3_leds_init(void) |
| 385 | { |
| 386 | platform_device_register(&balloon3_leds); |
| 387 | } |
| 388 | #else |
| 389 | static inline void balloon3_leds_init(void) {} |
| 390 | #endif |
| 391 | |
| 392 | /****************************************************************************** |
Marek Vasut | b0240bf | 2010-07-26 23:24:44 +0200 | [diff] [blame] | 393 | * FPGA IRQ |
| 394 | ******************************************************************************/ |
Jonathan McDowell | 2a23ec3 | 2009-07-04 14:43:56 +0100 | [diff] [blame] | 395 | static void balloon3_mask_irq(unsigned int irq) |
| 396 | { |
| 397 | int balloon3_irq = (irq - BALLOON3_IRQ(0)); |
| 398 | balloon3_irq_enabled &= ~(1 << balloon3_irq); |
| 399 | __raw_writel(~balloon3_irq_enabled, BALLOON3_INT_CONTROL_REG); |
| 400 | } |
| 401 | |
| 402 | static void balloon3_unmask_irq(unsigned int irq) |
| 403 | { |
| 404 | int balloon3_irq = (irq - BALLOON3_IRQ(0)); |
| 405 | balloon3_irq_enabled |= (1 << balloon3_irq); |
| 406 | __raw_writel(~balloon3_irq_enabled, BALLOON3_INT_CONTROL_REG); |
| 407 | } |
| 408 | |
| 409 | static struct irq_chip balloon3_irq_chip = { |
| 410 | .name = "FPGA", |
| 411 | .ack = balloon3_mask_irq, |
| 412 | .mask = balloon3_mask_irq, |
| 413 | .unmask = balloon3_unmask_irq, |
| 414 | }; |
| 415 | |
| 416 | static void balloon3_irq_handler(unsigned int irq, struct irq_desc *desc) |
| 417 | { |
| 418 | unsigned long pending = __raw_readl(BALLOON3_INT_CONTROL_REG) & |
| 419 | balloon3_irq_enabled; |
Jonathan McDowell | 2a23ec3 | 2009-07-04 14:43:56 +0100 | [diff] [blame] | 420 | do { |
| 421 | /* clear useless edge notification */ |
| 422 | if (desc->chip->ack) |
| 423 | desc->chip->ack(BALLOON3_AUX_NIRQ); |
| 424 | while (pending) { |
| 425 | irq = BALLOON3_IRQ(0) + __ffs(pending); |
| 426 | generic_handle_irq(irq); |
| 427 | pending &= pending - 1; |
| 428 | } |
| 429 | pending = __raw_readl(BALLOON3_INT_CONTROL_REG) & |
| 430 | balloon3_irq_enabled; |
| 431 | } while (pending); |
| 432 | } |
| 433 | |
| 434 | static void __init balloon3_init_irq(void) |
| 435 | { |
| 436 | int irq; |
| 437 | |
| 438 | pxa27x_init_irq(); |
| 439 | /* setup extra Balloon3 irqs */ |
| 440 | for (irq = BALLOON3_IRQ(0); irq <= BALLOON3_IRQ(7); irq++) { |
| 441 | set_irq_chip(irq, &balloon3_irq_chip); |
| 442 | set_irq_handler(irq, handle_level_irq); |
| 443 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); |
| 444 | } |
| 445 | |
| 446 | set_irq_chained_handler(BALLOON3_AUX_NIRQ, balloon3_irq_handler); |
| 447 | set_irq_type(BALLOON3_AUX_NIRQ, IRQ_TYPE_EDGE_FALLING); |
| 448 | |
| 449 | pr_debug("%s: chained handler installed - irq %d automatically " |
| 450 | "enabled\n", __func__, BALLOON3_AUX_NIRQ); |
| 451 | } |
| 452 | |
Marek Vasut | b0240bf | 2010-07-26 23:24:44 +0200 | [diff] [blame] | 453 | /****************************************************************************** |
| 454 | * Machine init |
| 455 | ******************************************************************************/ |
Jonathan McDowell | 2a23ec3 | 2009-07-04 14:43:56 +0100 | [diff] [blame] | 456 | static void __init balloon3_init(void) |
| 457 | { |
Jonathan McDowell | 2a23ec3 | 2009-07-04 14:43:56 +0100 | [diff] [blame] | 458 | ARB_CNTRL = ARB_CORE_PARK | 0x234; |
| 459 | |
Marek Vasut | 12a2449 | 2010-07-27 01:37:44 +0200 | [diff] [blame] | 460 | pxa2xx_mfp_config(ARRAY_AND_SIZE(balloon3_pin_config)); |
| 461 | |
Russell King | cc155c6 | 2009-11-09 13:34:08 +0800 | [diff] [blame] | 462 | pxa_set_ffuart_info(NULL); |
| 463 | pxa_set_btuart_info(NULL); |
| 464 | pxa_set_stuart_info(NULL); |
| 465 | |
Jonathan McDowell | 2a23ec3 | 2009-07-04 14:43:56 +0100 | [diff] [blame] | 466 | pxa_set_i2c_info(NULL); |
Jonathan McDowell | 2a23ec3 | 2009-07-04 14:43:56 +0100 | [diff] [blame] | 467 | |
Marek Vasut | 12a2449 | 2010-07-27 01:37:44 +0200 | [diff] [blame] | 468 | balloon3_irda_init(); |
| 469 | balloon3_lcd_init(); |
| 470 | balloon3_leds_init(); |
| 471 | balloon3_mmc_init(); |
| 472 | balloon3_nor_init(); |
| 473 | balloon3_ts_init(); |
| 474 | balloon3_udc_init(); |
| 475 | balloon3_uhc_init(); |
Jonathan McDowell | 2a23ec3 | 2009-07-04 14:43:56 +0100 | [diff] [blame] | 476 | } |
| 477 | |
| 478 | static struct map_desc balloon3_io_desc[] __initdata = { |
| 479 | { /* CPLD/FPGA */ |
| 480 | .virtual = BALLOON3_FPGA_VIRT, |
| 481 | .pfn = __phys_to_pfn(BALLOON3_FPGA_PHYS), |
| 482 | .length = BALLOON3_FPGA_LENGTH, |
| 483 | .type = MT_DEVICE, |
| 484 | }, |
| 485 | }; |
| 486 | |
| 487 | static void __init balloon3_map_io(void) |
| 488 | { |
| 489 | pxa_map_io(); |
| 490 | iotable_init(balloon3_io_desc, ARRAY_SIZE(balloon3_io_desc)); |
| 491 | } |
| 492 | |
| 493 | MACHINE_START(BALLOON3, "Balloon3") |
| 494 | /* Maintainer: Nick Bane. */ |
| 495 | .phys_io = 0x40000000, |
| 496 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
| 497 | .map_io = balloon3_map_io, |
| 498 | .init_irq = balloon3_init_irq, |
| 499 | .timer = &pxa_timer, |
| 500 | .init_machine = balloon3_init, |
| 501 | .boot_params = PHYS_OFFSET + 0x100, |
| 502 | MACHINE_END |