Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/arch/arm/mach-sa1100/simpad.c |
| 3 | */ |
| 4 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | #include <linux/module.h> |
| 6 | #include <linux/init.h> |
| 7 | #include <linux/kernel.h> |
| 8 | #include <linux/tty.h> |
| 9 | #include <linux/proc_fs.h> |
| 10 | #include <linux/string.h> |
| 11 | #include <linux/pm.h> |
Russell King | d052d1b | 2005-10-29 19:07:23 +0100 | [diff] [blame] | 12 | #include <linux/platform_device.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | #include <linux/mtd/mtd.h> |
| 14 | #include <linux/mtd/partitions.h> |
Russell King | fced80c | 2008-09-06 12:10:45 +0100 | [diff] [blame] | 15 | #include <linux/io.h> |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 16 | #include <linux/gpio.h> |
Jochen Friedrich | 5dd7bf5 | 2011-11-27 22:00:54 +0100 | [diff] [blame] | 17 | #include <linux/mfd/ucb1x00.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | |
| 19 | #include <asm/irq.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 20 | #include <mach/hardware.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | #include <asm/setup.h> |
| 22 | |
| 23 | #include <asm/mach-types.h> |
| 24 | #include <asm/mach/arch.h> |
| 25 | #include <asm/mach/flash.h> |
| 26 | #include <asm/mach/map.h> |
| 27 | #include <asm/mach/serial_sa1100.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 28 | #include <mach/mcp.h> |
| 29 | #include <mach/simpad.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | |
| 31 | #include <linux/serial_core.h> |
| 32 | #include <linux/ioport.h> |
Jochen Friedrich | dbd406f | 2011-08-18 21:51:06 +0100 | [diff] [blame] | 33 | #include <linux/input.h> |
| 34 | #include <linux/gpio_keys.h> |
Jochen Friedrich | d056f5a | 2011-08-18 21:51:39 +0100 | [diff] [blame] | 35 | #include <linux/leds.h> |
Jochen Friedrich | dbd406f | 2011-08-18 21:51:06 +0100 | [diff] [blame] | 36 | #include <linux/i2c-gpio.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | |
| 38 | #include "generic.h" |
| 39 | |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 40 | /* |
| 41 | * CS3 support |
| 42 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 44 | static long cs3_shadow; |
| 45 | static spinlock_t cs3_lock; |
| 46 | static struct gpio_chip cs3_gpio; |
| 47 | |
| 48 | long simpad_get_cs3_ro(void) |
| 49 | { |
| 50 | return readl(CS3_BASE); |
| 51 | } |
| 52 | EXPORT_SYMBOL(simpad_get_cs3_ro); |
| 53 | |
| 54 | long simpad_get_cs3_shadow(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | { |
| 56 | return cs3_shadow; |
| 57 | } |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 58 | EXPORT_SYMBOL(simpad_get_cs3_shadow); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 60 | static void __simpad_write_cs3(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 61 | { |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 62 | writel(cs3_shadow, CS3_BASE); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 63 | } |
| 64 | |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 65 | void simpad_set_cs3_bit(int value) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 66 | { |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 67 | unsigned long flags; |
| 68 | |
| 69 | spin_lock_irqsave(&cs3_lock, flags); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 70 | cs3_shadow |= value; |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 71 | __simpad_write_cs3(); |
| 72 | spin_unlock_irqrestore(&cs3_lock, flags); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 73 | } |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 74 | EXPORT_SYMBOL(simpad_set_cs3_bit); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 75 | |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 76 | void simpad_clear_cs3_bit(int value) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 77 | { |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 78 | unsigned long flags; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 | |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 80 | spin_lock_irqsave(&cs3_lock, flags); |
| 81 | cs3_shadow &= ~value; |
| 82 | __simpad_write_cs3(); |
| 83 | spin_unlock_irqrestore(&cs3_lock, flags); |
| 84 | } |
| 85 | EXPORT_SYMBOL(simpad_clear_cs3_bit); |
| 86 | |
| 87 | static void cs3_gpio_set(struct gpio_chip *chip, unsigned offset, int value) |
| 88 | { |
| 89 | if (offset > 15) |
| 90 | return; |
| 91 | if (value) |
| 92 | simpad_set_cs3_bit(1 << offset); |
| 93 | else |
| 94 | simpad_clear_cs3_bit(1 << offset); |
| 95 | }; |
| 96 | |
| 97 | static int cs3_gpio_get(struct gpio_chip *chip, unsigned offset) |
| 98 | { |
| 99 | if (offset > 15) |
| 100 | return simpad_get_cs3_ro() & (1 << (offset - 16)); |
| 101 | return simpad_get_cs3_shadow() & (1 << offset); |
| 102 | }; |
| 103 | |
| 104 | static int cs3_gpio_direction_input(struct gpio_chip *chip, unsigned offset) |
| 105 | { |
| 106 | if (offset > 15) |
| 107 | return 0; |
| 108 | return -EINVAL; |
| 109 | }; |
| 110 | |
| 111 | static int cs3_gpio_direction_output(struct gpio_chip *chip, unsigned offset, |
| 112 | int value) |
| 113 | { |
| 114 | if (offset > 15) |
| 115 | return -EINVAL; |
| 116 | cs3_gpio_set(chip, offset, value); |
| 117 | return 0; |
| 118 | }; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 119 | |
| 120 | static struct map_desc simpad_io_desc[] __initdata = { |
Deepak Saxena | 92519d8 | 2005-10-28 15:19:04 +0100 | [diff] [blame] | 121 | { /* MQ200 */ |
| 122 | .virtual = 0xf2800000, |
| 123 | .pfn = __phys_to_pfn(0x4b800000), |
| 124 | .length = 0x00800000, |
| 125 | .type = MT_DEVICE |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 126 | }, { /* Simpad CS3 */ |
| 127 | .virtual = CS3_BASE, |
| 128 | .pfn = __phys_to_pfn(SA1100_CS3_PHYS), |
Deepak Saxena | 92519d8 | 2005-10-28 15:19:04 +0100 | [diff] [blame] | 129 | .length = 0x00100000, |
| 130 | .type = MT_DEVICE |
| 131 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 132 | }; |
| 133 | |
| 134 | |
| 135 | static void simpad_uart_pm(struct uart_port *port, u_int state, u_int oldstate) |
| 136 | { |
| 137 | if (port->mapbase == (u_int)&Ser1UTCR0) { |
| 138 | if (state) |
| 139 | { |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 140 | simpad_clear_cs3_bit(RS232_ON); |
| 141 | simpad_clear_cs3_bit(DECT_POWER_ON); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 142 | }else |
| 143 | { |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 144 | simpad_set_cs3_bit(RS232_ON); |
| 145 | simpad_set_cs3_bit(DECT_POWER_ON); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 146 | } |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | static struct sa1100_port_fns simpad_port_fns __initdata = { |
| 151 | .pm = simpad_uart_pm, |
| 152 | }; |
| 153 | |
| 154 | |
| 155 | static struct mtd_partition simpad_partitions[] = { |
| 156 | { |
| 157 | .name = "SIMpad boot firmware", |
| 158 | .size = 0x00080000, |
| 159 | .offset = 0, |
| 160 | .mask_flags = MTD_WRITEABLE, |
| 161 | }, { |
| 162 | .name = "SIMpad kernel", |
| 163 | .size = 0x0010000, |
| 164 | .offset = MTDPART_OFS_APPEND, |
| 165 | }, { |
| 166 | .name = "SIMpad root jffs2", |
| 167 | .size = MTDPART_SIZ_FULL, |
| 168 | .offset = MTDPART_OFS_APPEND, |
| 169 | } |
| 170 | }; |
| 171 | |
| 172 | static struct flash_platform_data simpad_flash_data = { |
| 173 | .map_name = "cfi_probe", |
| 174 | .parts = simpad_partitions, |
| 175 | .nr_parts = ARRAY_SIZE(simpad_partitions), |
| 176 | }; |
| 177 | |
| 178 | |
| 179 | static struct resource simpad_flash_resources [] = { |
| 180 | { |
| 181 | .start = SA1100_CS0_PHYS, |
| 182 | .end = SA1100_CS0_PHYS + SZ_16M -1, |
| 183 | .flags = IORESOURCE_MEM, |
| 184 | }, { |
| 185 | .start = SA1100_CS1_PHYS, |
| 186 | .end = SA1100_CS1_PHYS + SZ_16M -1, |
| 187 | .flags = IORESOURCE_MEM, |
| 188 | } |
| 189 | }; |
| 190 | |
Jochen Friedrich | 5dd7bf5 | 2011-11-27 22:00:54 +0100 | [diff] [blame] | 191 | static struct ucb1x00_plat_data simpad_ucb1x00_data = { |
| 192 | .gpio_base = SIMPAD_UCB1X00_GPIO_BASE, |
| 193 | }; |
| 194 | |
Russell King | 323cdfc | 2005-08-18 10:10:46 +0100 | [diff] [blame] | 195 | static struct mcp_plat_data simpad_mcp_data = { |
| 196 | .mccr0 = MCCR0_ADM, |
| 197 | .sclk_rate = 11981000, |
Jochen Friedrich | 5dd7bf5 | 2011-11-27 22:00:54 +0100 | [diff] [blame] | 198 | .codec = "ucb1300", |
| 199 | .codec_pdata = &simpad_ucb1x00_data, |
Russell King | 323cdfc | 2005-08-18 10:10:46 +0100 | [diff] [blame] | 200 | }; |
| 201 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 202 | |
| 203 | |
| 204 | static void __init simpad_map_io(void) |
| 205 | { |
| 206 | sa1100_map_io(); |
| 207 | |
| 208 | iotable_init(simpad_io_desc, ARRAY_SIZE(simpad_io_desc)); |
| 209 | |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 210 | /* Initialize CS3 */ |
| 211 | cs3_shadow = (EN1 | EN0 | LED2_ON | DISPLAY_ON | |
| 212 | RS232_ON | ENABLE_5V | RESET_SIMCARD | DECT_POWER_ON); |
| 213 | __simpad_write_cs3(); /* Spinlocks not yet initialized */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 214 | |
| 215 | sa1100_register_uart_fns(&simpad_port_fns); |
| 216 | sa1100_register_uart(0, 3); /* serial interface */ |
| 217 | sa1100_register_uart(1, 1); /* DECT */ |
| 218 | |
| 219 | // Reassign UART 1 pins |
| 220 | GAFR |= GPIO_UART_TXD | GPIO_UART_RXD; |
| 221 | GPDR |= GPIO_UART_TXD | GPIO_LDD13 | GPIO_LDD15; |
| 222 | GPDR &= ~GPIO_UART_RXD; |
| 223 | PPAR |= PPAR_UPR; |
| 224 | |
| 225 | /* |
| 226 | * Set up registers for sleep mode. |
| 227 | */ |
| 228 | |
| 229 | |
| 230 | PWER = PWER_GPIO0| PWER_RTC; |
| 231 | PGSR = 0x818; |
| 232 | PCFR = 0; |
| 233 | PSDR = 0; |
| 234 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 235 | } |
| 236 | |
| 237 | static void simpad_power_off(void) |
| 238 | { |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 239 | local_irq_disable(); |
| 240 | cs3_shadow = SD_MEDIAQ; |
| 241 | __simpad_write_cs3(); /* Bypass spinlock here */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 242 | |
| 243 | /* disable internal oscillator, float CS lines */ |
| 244 | PCFR = (PCFR_OPDE | PCFR_FP | PCFR_FS); |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 245 | /* enable wake-up on GPIO0 */ |
| 246 | PWER = GFER = GRER = PWER_GPIO0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 247 | /* |
| 248 | * set scratchpad to zero, just in case it is used as a |
| 249 | * restart address by the bootloader. |
| 250 | */ |
| 251 | PSPR = 0; |
| 252 | PGSR = 0; |
| 253 | /* enter sleep mode */ |
| 254 | PMCR = PMCR_SF; |
| 255 | while(1); |
| 256 | |
| 257 | local_irq_enable(); /* we won't ever call it */ |
| 258 | |
| 259 | |
| 260 | } |
| 261 | |
Jochen Friedrich | dbd406f | 2011-08-18 21:51:06 +0100 | [diff] [blame] | 262 | /* |
| 263 | * gpio_keys |
| 264 | */ |
| 265 | |
| 266 | static struct gpio_keys_button simpad_button_table[] = { |
| 267 | { KEY_POWER, IRQ_GPIO_POWER_BUTTON, 1, "power button" }, |
| 268 | }; |
| 269 | |
| 270 | static struct gpio_keys_platform_data simpad_keys_data = { |
| 271 | .buttons = simpad_button_table, |
| 272 | .nbuttons = ARRAY_SIZE(simpad_button_table), |
| 273 | }; |
| 274 | |
| 275 | static struct platform_device simpad_keys = { |
| 276 | .name = "gpio-keys", |
| 277 | .dev = { |
| 278 | .platform_data = &simpad_keys_data, |
| 279 | }, |
| 280 | }; |
| 281 | |
| 282 | static struct gpio_keys_button simpad_polled_button_table[] = { |
| 283 | { KEY_PROG1, SIMPAD_UCB1X00_GPIO_PROG1, 1, "prog1 button" }, |
| 284 | { KEY_PROG2, SIMPAD_UCB1X00_GPIO_PROG2, 1, "prog2 button" }, |
| 285 | { KEY_UP, SIMPAD_UCB1X00_GPIO_UP, 1, "up button" }, |
| 286 | { KEY_DOWN, SIMPAD_UCB1X00_GPIO_DOWN, 1, "down button" }, |
| 287 | { KEY_LEFT, SIMPAD_UCB1X00_GPIO_LEFT, 1, "left button" }, |
| 288 | { KEY_RIGHT, SIMPAD_UCB1X00_GPIO_RIGHT, 1, "right button" }, |
| 289 | }; |
| 290 | |
| 291 | static struct gpio_keys_platform_data simpad_polled_keys_data = { |
| 292 | .buttons = simpad_polled_button_table, |
| 293 | .nbuttons = ARRAY_SIZE(simpad_polled_button_table), |
| 294 | .poll_interval = 50, |
| 295 | }; |
| 296 | |
| 297 | static struct platform_device simpad_polled_keys = { |
| 298 | .name = "gpio-keys-polled", |
| 299 | .dev = { |
| 300 | .platform_data = &simpad_polled_keys_data, |
| 301 | }, |
| 302 | }; |
| 303 | |
| 304 | /* |
Jochen Friedrich | d056f5a | 2011-08-18 21:51:39 +0100 | [diff] [blame] | 305 | * GPIO LEDs |
| 306 | */ |
| 307 | |
| 308 | static struct gpio_led simpad_leds[] = { |
| 309 | { |
| 310 | .name = "simpad:power", |
| 311 | .gpio = SIMPAD_CS3_LED2_ON, |
| 312 | .active_low = 0, |
| 313 | .default_trigger = "default-on", |
| 314 | }, |
| 315 | }; |
| 316 | |
| 317 | static struct gpio_led_platform_data simpad_led_data = { |
| 318 | .num_leds = ARRAY_SIZE(simpad_leds), |
| 319 | .leds = simpad_leds, |
| 320 | }; |
| 321 | |
| 322 | static struct platform_device simpad_gpio_leds = { |
| 323 | .name = "leds-gpio", |
| 324 | .id = 0, |
| 325 | .dev = { |
| 326 | .platform_data = &simpad_led_data, |
| 327 | }, |
| 328 | }; |
| 329 | |
| 330 | /* |
Jochen Friedrich | dbd406f | 2011-08-18 21:51:06 +0100 | [diff] [blame] | 331 | * i2c |
| 332 | */ |
| 333 | static struct i2c_gpio_platform_data simpad_i2c_data = { |
| 334 | .sda_pin = GPIO_GPIO21, |
| 335 | .scl_pin = GPIO_GPIO25, |
| 336 | .udelay = 10, |
| 337 | .timeout = HZ, |
| 338 | }; |
| 339 | |
| 340 | static struct platform_device simpad_i2c = { |
| 341 | .name = "i2c-gpio", |
| 342 | .id = 0, |
| 343 | .dev = { |
| 344 | .platform_data = &simpad_i2c_data, |
| 345 | }, |
| 346 | }; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 347 | |
| 348 | /* |
| 349 | * MediaQ Video Device |
| 350 | */ |
| 351 | static struct platform_device simpad_mq200fb = { |
| 352 | .name = "simpad-mq200", |
| 353 | .id = 0, |
| 354 | }; |
| 355 | |
| 356 | static struct platform_device *devices[] __initdata = { |
Jochen Friedrich | dbd406f | 2011-08-18 21:51:06 +0100 | [diff] [blame] | 357 | &simpad_keys, |
| 358 | &simpad_polled_keys, |
| 359 | &simpad_mq200fb, |
Jochen Friedrich | d056f5a | 2011-08-18 21:51:39 +0100 | [diff] [blame] | 360 | &simpad_gpio_leds, |
Jochen Friedrich | dbd406f | 2011-08-18 21:51:06 +0100 | [diff] [blame] | 361 | &simpad_i2c, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 362 | }; |
| 363 | |
| 364 | |
| 365 | |
| 366 | static int __init simpad_init(void) |
| 367 | { |
| 368 | int ret; |
| 369 | |
Jochen Friedrich | de0bc0d | 2011-08-18 21:50:31 +0100 | [diff] [blame] | 370 | spin_lock_init(&cs3_lock); |
| 371 | |
| 372 | cs3_gpio.label = "simpad_cs3"; |
| 373 | cs3_gpio.base = SIMPAD_CS3_GPIO_BASE; |
| 374 | cs3_gpio.ngpio = 24; |
| 375 | cs3_gpio.set = cs3_gpio_set; |
| 376 | cs3_gpio.get = cs3_gpio_get; |
| 377 | cs3_gpio.direction_input = cs3_gpio_direction_input; |
| 378 | cs3_gpio.direction_output = cs3_gpio_direction_output; |
| 379 | ret = gpiochip_add(&cs3_gpio); |
| 380 | if (ret) |
| 381 | printk(KERN_WARNING "simpad: Unable to register cs3 GPIO device"); |
| 382 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 383 | pm_power_off = simpad_power_off; |
| 384 | |
Jochen Friedrich | 4f444e2 | 2011-01-03 12:09:05 +0100 | [diff] [blame] | 385 | sa11x0_register_mtd(&simpad_flash_data, simpad_flash_resources, |
| 386 | ARRAY_SIZE(simpad_flash_resources)); |
Jochen Friedrich | af9081a | 2011-11-27 22:00:55 +0100 | [diff] [blame] | 387 | |
| 388 | /* |
| 389 | * Setup the PPC unit correctly. |
| 390 | */ |
| 391 | PPDR &= ~PPC_RXD4; |
| 392 | PPDR |= PPC_TXD4 | PPC_SCLK | PPC_SFRM; |
| 393 | PSDR |= PPC_RXD4; |
| 394 | PSDR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); |
| 395 | PPSR &= ~(PPC_TXD4 | PPC_SCLK | PPC_SFRM); |
| 396 | |
Jochen Friedrich | 4f444e2 | 2011-01-03 12:09:05 +0100 | [diff] [blame] | 397 | sa11x0_register_mcp(&simpad_mcp_data); |
| 398 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 399 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
| 400 | if(ret) |
| 401 | printk(KERN_WARNING "simpad: Unable to register mq200 framebuffer device"); |
| 402 | |
| 403 | return 0; |
| 404 | } |
| 405 | |
| 406 | arch_initcall(simpad_init); |
| 407 | |
| 408 | |
| 409 | MACHINE_START(SIMPAD, "Simpad") |
Russell King | e9dea0c | 2005-07-03 17:38:58 +0100 | [diff] [blame] | 410 | /* Maintainer: Holger Freyther */ |
Nicolas Pitre | 17f4425 | 2011-07-05 22:38:17 -0400 | [diff] [blame] | 411 | .atag_offset = 0x100, |
Russell King | e9dea0c | 2005-07-03 17:38:58 +0100 | [diff] [blame] | 412 | .map_io = simpad_map_io, |
| 413 | .init_irq = sa1100_init_irq, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 414 | .timer = &sa1100_timer, |
Russell King | d9ca583 | 2011-11-05 10:28:50 +0000 | [diff] [blame] | 415 | .restart = sa11x0_restart, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 416 | MACHINE_END |