Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/arch/arm/mach-pxa/poodle.c |
| 3 | * |
| 4 | * Support for the SHARP Poodle Board. |
| 5 | * |
| 6 | * Based on: |
| 7 | * linux/arch/arm/mach-pxa/lubbock.c Author: Nicolas Pitre |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License version 2 as |
| 11 | * published by the Free Software Foundation. |
| 12 | * |
| 13 | * Change Log |
| 14 | * 12-Dec-2002 Sharp Corporation for Poodle |
| 15 | * John Lenz <lenz@cs.wisc.edu> updates to 2.6 |
| 16 | */ |
| 17 | #include <linux/kernel.h> |
| 18 | #include <linux/init.h> |
Russell King | d052d1b | 2005-10-29 19:07:23 +0100 | [diff] [blame] | 19 | #include <linux/platform_device.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | #include <linux/fb.h> |
Richard Purdie | 74617fb | 2006-06-19 19:57:12 +0100 | [diff] [blame] | 21 | #include <linux/pm.h> |
Richard Purdie | 8866035 | 2006-06-19 19:58:51 +0100 | [diff] [blame] | 22 | #include <linux/delay.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 24 | #include <mach/hardware.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | #include <asm/mach-types.h> |
| 26 | #include <asm/irq.h> |
| 27 | #include <asm/setup.h> |
Richard Purdie | 74617fb | 2006-06-19 19:57:12 +0100 | [diff] [blame] | 28 | #include <asm/system.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | |
| 30 | #include <asm/mach/arch.h> |
| 31 | #include <asm/mach/map.h> |
| 32 | #include <asm/mach/irq.h> |
| 33 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 34 | #include <mach/pxa-regs.h> |
| 35 | #include <mach/pxa2xx-regs.h> |
| 36 | #include <mach/pxa2xx-gpio.h> |
| 37 | #include <mach/mmc.h> |
| 38 | #include <mach/udc.h> |
Mark Brown | f8787fd | 2008-08-26 13:30:03 +0100 | [diff] [blame] | 39 | #include <mach/i2c.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 40 | #include <mach/irda.h> |
| 41 | #include <mach/poodle.h> |
| 42 | #include <mach/pxafb.h> |
| 43 | #include <mach/sharpsl.h> |
| 44 | #include <mach/ssp.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | |
| 46 | #include <asm/hardware/scoop.h> |
| 47 | #include <asm/hardware/locomo.h> |
| 48 | #include <asm/mach/sharpsl_param.h> |
| 49 | |
| 50 | #include "generic.h" |
Russell King | 46c41e6 | 2007-05-15 15:39:36 +0100 | [diff] [blame] | 51 | #include "devices.h" |
Richard Purdie | faed568 | 2006-06-19 20:46:05 +0100 | [diff] [blame] | 52 | #include "sharpsl.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | |
| 54 | static struct resource poodle_scoop_resources[] = { |
| 55 | [0] = { |
| 56 | .start = 0x10800000, |
| 57 | .end = 0x10800fff, |
| 58 | .flags = IORESOURCE_MEM, |
| 59 | }, |
| 60 | }; |
| 61 | |
| 62 | static struct scoop_config poodle_scoop_setup = { |
| 63 | .io_dir = POODLE_SCOOP_IO_DIR, |
| 64 | .io_out = POODLE_SCOOP_IO_OUT, |
| 65 | }; |
| 66 | |
| 67 | struct platform_device poodle_scoop_device = { |
| 68 | .name = "sharp-scoop", |
| 69 | .id = -1, |
| 70 | .dev = { |
| 71 | .platform_data = &poodle_scoop_setup, |
| 72 | }, |
| 73 | .num_resources = ARRAY_SIZE(poodle_scoop_resources), |
| 74 | .resource = poodle_scoop_resources, |
| 75 | }; |
| 76 | |
Richard Purdie | a63ae44 | 2005-11-08 19:15:43 +0000 | [diff] [blame] | 77 | static void poodle_pcmcia_init(void) |
| 78 | { |
| 79 | /* Setup default state of GPIO outputs |
| 80 | before we enable them as outputs. */ |
| 81 | GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) | |
| 82 | GPIO_bit(GPIO49_nPWE) | GPIO_bit(GPIO50_nPIOR) | |
| 83 | GPIO_bit(GPIO51_nPIOW) | GPIO_bit(GPIO52_nPCE_1) | |
| 84 | GPIO_bit(GPIO53_nPCE_2); |
| 85 | |
| 86 | pxa_gpio_mode(GPIO48_nPOE_MD); |
| 87 | pxa_gpio_mode(GPIO49_nPWE_MD); |
| 88 | pxa_gpio_mode(GPIO50_nPIOR_MD); |
| 89 | pxa_gpio_mode(GPIO51_nPIOW_MD); |
| 90 | pxa_gpio_mode(GPIO55_nPREG_MD); |
| 91 | pxa_gpio_mode(GPIO56_nPWAIT_MD); |
| 92 | pxa_gpio_mode(GPIO57_nIOIS16_MD); |
| 93 | pxa_gpio_mode(GPIO52_nPCE_1_MD); |
| 94 | pxa_gpio_mode(GPIO53_nPCE_2_MD); |
| 95 | pxa_gpio_mode(GPIO54_pSKTSEL_MD); |
| 96 | } |
| 97 | |
Richard Purdie | 0ce7625 | 2005-09-05 20:49:54 +0100 | [diff] [blame] | 98 | static struct scoop_pcmcia_dev poodle_pcmcia_scoop[] = { |
| 99 | { |
| 100 | .dev = &poodle_scoop_device.dev, |
| 101 | .irq = POODLE_IRQ_GPIO_CF_IRQ, |
| 102 | .cd_irq = POODLE_IRQ_GPIO_CF_CD, |
| 103 | .cd_irq_str = "PCMCIA0 CD", |
| 104 | }, |
| 105 | }; |
| 106 | |
Richard Purdie | a63ae44 | 2005-11-08 19:15:43 +0000 | [diff] [blame] | 107 | static struct scoop_pcmcia_config poodle_pcmcia_config = { |
| 108 | .devs = &poodle_pcmcia_scoop[0], |
| 109 | .num_devs = 1, |
| 110 | .pcmcia_init = poodle_pcmcia_init, |
| 111 | }; |
| 112 | |
| 113 | EXPORT_SYMBOL(poodle_scoop_device); |
| 114 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 115 | |
| 116 | /* LoCoMo device */ |
| 117 | static struct resource locomo_resources[] = { |
| 118 | [0] = { |
| 119 | .start = 0x10000000, |
| 120 | .end = 0x10001fff, |
| 121 | .flags = IORESOURCE_MEM, |
| 122 | }, |
| 123 | [1] = { |
| 124 | .start = IRQ_GPIO(10), |
| 125 | .end = IRQ_GPIO(10), |
| 126 | .flags = IORESOURCE_IRQ, |
| 127 | }, |
| 128 | }; |
| 129 | |
Richard Purdie | faed568 | 2006-06-19 20:46:05 +0100 | [diff] [blame] | 130 | struct platform_device poodle_locomo_device = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 131 | .name = "locomo", |
| 132 | .id = 0, |
| 133 | .num_resources = ARRAY_SIZE(locomo_resources), |
| 134 | .resource = locomo_resources, |
| 135 | }; |
| 136 | |
Richard Purdie | faed568 | 2006-06-19 20:46:05 +0100 | [diff] [blame] | 137 | EXPORT_SYMBOL(poodle_locomo_device); |
| 138 | |
| 139 | /* |
| 140 | * Poodle SSP Device |
| 141 | */ |
| 142 | |
| 143 | struct platform_device poodle_ssp_device = { |
| 144 | .name = "corgi-ssp", |
| 145 | .id = -1, |
| 146 | }; |
| 147 | |
| 148 | struct corgissp_machinfo poodle_ssp_machinfo = { |
| 149 | .port = 1, |
| 150 | .cs_lcdcon = -1, |
| 151 | .cs_ads7846 = -1, |
| 152 | .cs_max1111 = -1, |
| 153 | .clk_lcdcon = 2, |
| 154 | .clk_ads7846 = 36, |
| 155 | .clk_max1111 = 2, |
| 156 | }; |
| 157 | |
| 158 | |
| 159 | /* |
| 160 | * Poodle Touch Screen Device |
| 161 | */ |
| 162 | static struct resource poodlets_resources[] = { |
| 163 | [0] = { |
| 164 | .start = POODLE_IRQ_GPIO_TP_INT, |
| 165 | .end = POODLE_IRQ_GPIO_TP_INT, |
| 166 | .flags = IORESOURCE_IRQ, |
| 167 | }, |
| 168 | }; |
| 169 | |
eric miao | 6a0bd09 | 2008-01-31 02:41:16 +0100 | [diff] [blame] | 170 | static unsigned long poodle_get_hsync_invperiod(void) |
Richard Purdie | faed568 | 2006-06-19 20:46:05 +0100 | [diff] [blame] | 171 | { |
| 172 | return 0; |
| 173 | } |
| 174 | |
| 175 | static void poodle_null_hsync(void) |
| 176 | { |
| 177 | } |
| 178 | |
| 179 | static struct corgits_machinfo poodle_ts_machinfo = { |
eric miao | 6a0bd09 | 2008-01-31 02:41:16 +0100 | [diff] [blame] | 180 | .get_hsync_invperiod = poodle_get_hsync_invperiod, |
| 181 | .put_hsync = poodle_null_hsync, |
| 182 | .wait_hsync = poodle_null_hsync, |
Richard Purdie | faed568 | 2006-06-19 20:46:05 +0100 | [diff] [blame] | 183 | }; |
| 184 | |
| 185 | static struct platform_device poodle_ts_device = { |
| 186 | .name = "corgi-ts", |
| 187 | .dev = { |
| 188 | .platform_data = &poodle_ts_machinfo, |
| 189 | }, |
| 190 | .id = -1, |
| 191 | .num_resources = ARRAY_SIZE(poodlets_resources), |
| 192 | .resource = poodlets_resources, |
| 193 | }; |
| 194 | |
Richard Purdie | 13b9d47 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 195 | |
| 196 | /* |
| 197 | * MMC/SD Device |
| 198 | * |
| 199 | * The card detect interrupt isn't debounced so we delay it by 250ms |
| 200 | * to give the card a chance to fully insert/eject. |
| 201 | */ |
| 202 | static struct pxamci_platform_data poodle_mci_platform_data; |
| 203 | |
David Howells | 40220c1 | 2006-10-09 12:19:47 +0100 | [diff] [blame] | 204 | static int poodle_mci_init(struct device *dev, irq_handler_t poodle_detect_int, void *data) |
Richard Purdie | 13b9d47 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 205 | { |
| 206 | int err; |
| 207 | |
| 208 | /* setup GPIO for PXA25x MMC controller */ |
| 209 | pxa_gpio_mode(GPIO6_MMCCLK_MD); |
| 210 | pxa_gpio_mode(GPIO8_MMCCS0_MD); |
| 211 | pxa_gpio_mode(POODLE_GPIO_nSD_DETECT | GPIO_IN); |
Richard Purdie | 8866035 | 2006-06-19 19:58:51 +0100 | [diff] [blame] | 212 | pxa_gpio_mode(POODLE_GPIO_nSD_WP | GPIO_IN); |
Richard Purdie | 13b9d47 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 213 | pxa_gpio_mode(POODLE_GPIO_SD_PWR | GPIO_OUT); |
Richard Purdie | 8866035 | 2006-06-19 19:58:51 +0100 | [diff] [blame] | 214 | pxa_gpio_mode(POODLE_GPIO_SD_PWR1 | GPIO_OUT); |
Richard Purdie | 13b9d47 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 215 | |
| 216 | poodle_mci_platform_data.detect_delay = msecs_to_jiffies(250); |
| 217 | |
Russell King | 9ded96f | 2006-01-08 01:02:07 -0800 | [diff] [blame] | 218 | err = request_irq(POODLE_IRQ_GPIO_nSD_DETECT, poodle_detect_int, |
Thomas Gleixner | 52e405e | 2006-07-03 02:20:05 +0200 | [diff] [blame] | 219 | IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, |
Russell King | 9ded96f | 2006-01-08 01:02:07 -0800 | [diff] [blame] | 220 | "MMC card detect", data); |
Russell King | 2687bd3 | 2008-01-23 14:05:58 +0000 | [diff] [blame] | 221 | if (err) |
Richard Purdie | 13b9d47 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 222 | printk(KERN_ERR "poodle_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); |
Richard Purdie | 13b9d47 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 223 | |
Russell King | 2687bd3 | 2008-01-23 14:05:58 +0000 | [diff] [blame] | 224 | return err; |
Richard Purdie | 13b9d47 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 225 | } |
| 226 | |
| 227 | static void poodle_mci_setpower(struct device *dev, unsigned int vdd) |
| 228 | { |
| 229 | struct pxamci_platform_data* p_d = dev->platform_data; |
| 230 | |
Richard Purdie | 8866035 | 2006-06-19 19:58:51 +0100 | [diff] [blame] | 231 | if (( 1 << vdd) & p_d->ocr_mask) { |
| 232 | GPSR(POODLE_GPIO_SD_PWR) = GPIO_bit(POODLE_GPIO_SD_PWR); |
| 233 | mdelay(2); |
| 234 | GPSR(POODLE_GPIO_SD_PWR1) = GPIO_bit(POODLE_GPIO_SD_PWR1); |
| 235 | } else { |
| 236 | GPCR(POODLE_GPIO_SD_PWR1) = GPIO_bit(POODLE_GPIO_SD_PWR1); |
| 237 | GPCR(POODLE_GPIO_SD_PWR) = GPIO_bit(POODLE_GPIO_SD_PWR); |
| 238 | } |
Richard Purdie | 13b9d47 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 239 | } |
| 240 | |
Richard Purdie | 8866035 | 2006-06-19 19:58:51 +0100 | [diff] [blame] | 241 | static int poodle_mci_get_ro(struct device *dev) |
| 242 | { |
| 243 | return GPLR(POODLE_GPIO_nSD_WP) & GPIO_bit(POODLE_GPIO_nSD_WP); |
| 244 | } |
| 245 | |
| 246 | |
Richard Purdie | 13b9d47 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 247 | static void poodle_mci_exit(struct device *dev, void *data) |
| 248 | { |
| 249 | free_irq(POODLE_IRQ_GPIO_nSD_DETECT, data); |
| 250 | } |
| 251 | |
| 252 | static struct pxamci_platform_data poodle_mci_platform_data = { |
| 253 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
| 254 | .init = poodle_mci_init, |
Richard Purdie | 8866035 | 2006-06-19 19:58:51 +0100 | [diff] [blame] | 255 | .get_ro = poodle_mci_get_ro, |
Richard Purdie | 13b9d47 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 256 | .setpower = poodle_mci_setpower, |
| 257 | .exit = poodle_mci_exit, |
| 258 | }; |
| 259 | |
| 260 | |
| 261 | /* |
Richard Purdie | 8e4b871 | 2005-10-30 14:38:52 +0000 | [diff] [blame] | 262 | * Irda |
| 263 | */ |
| 264 | static void poodle_irda_transceiver_mode(struct device *dev, int mode) |
| 265 | { |
| 266 | if (mode & IR_OFF) { |
| 267 | GPSR(POODLE_GPIO_IR_ON) = GPIO_bit(POODLE_GPIO_IR_ON); |
| 268 | } else { |
| 269 | GPCR(POODLE_GPIO_IR_ON) = GPIO_bit(POODLE_GPIO_IR_ON); |
| 270 | } |
Dmitry Baryshkov | 0fc3ff3 | 2008-07-02 13:54:46 +0100 | [diff] [blame] | 271 | pxa2xx_transceiver_mode(dev, mode); |
Richard Purdie | 8e4b871 | 2005-10-30 14:38:52 +0000 | [diff] [blame] | 272 | } |
| 273 | |
| 274 | static struct pxaficp_platform_data poodle_ficp_platform_data = { |
| 275 | .transceiver_cap = IR_SIRMODE | IR_OFF, |
| 276 | .transceiver_mode = poodle_irda_transceiver_mode, |
| 277 | }; |
| 278 | |
| 279 | |
| 280 | /* |
Richard Purdie | 13b9d47 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 281 | * USB Device Controller |
| 282 | */ |
Richard Purdie | 13b9d47 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 283 | static struct pxa2xx_udc_mach_info udc_info __initdata = { |
| 284 | /* no connect GPIO; poodle can't tell connection status */ |
Eric Miao | 1730aad | 2008-07-18 08:51:07 +0800 | [diff] [blame] | 285 | .gpio_pullup = POODLE_GPIO_USB_PULLUP, |
Richard Purdie | 13b9d47 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 286 | }; |
| 287 | |
| 288 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 289 | /* PXAFB device */ |
Richard Purdie | d14b272 | 2006-09-20 22:54:21 +0100 | [diff] [blame] | 290 | static struct pxafb_mode_info poodle_fb_mode = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 291 | .pixclock = 144700, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 292 | .xres = 320, |
| 293 | .yres = 240, |
| 294 | .bpp = 16, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 295 | .hsync_len = 7, |
| 296 | .left_margin = 11, |
| 297 | .right_margin = 30, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 298 | .vsync_len = 2, |
| 299 | .upper_margin = 2, |
| 300 | .lower_margin = 0, |
| 301 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, |
Richard Purdie | d14b272 | 2006-09-20 22:54:21 +0100 | [diff] [blame] | 302 | }; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 303 | |
Richard Purdie | d14b272 | 2006-09-20 22:54:21 +0100 | [diff] [blame] | 304 | static struct pxafb_mach_info poodle_fb_info = { |
| 305 | .modes = &poodle_fb_mode, |
| 306 | .num_modes = 1, |
Eric Miao | cf5eb8c | 2008-07-18 08:53:52 +0800 | [diff] [blame^] | 307 | .lcd_conn = LCD_COLOR_TFT_16BPP, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 308 | }; |
| 309 | |
| 310 | static struct platform_device *devices[] __initdata = { |
Richard Purdie | faed568 | 2006-06-19 20:46:05 +0100 | [diff] [blame] | 311 | &poodle_locomo_device, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 312 | &poodle_scoop_device, |
Richard Purdie | faed568 | 2006-06-19 20:46:05 +0100 | [diff] [blame] | 313 | &poodle_ssp_device, |
| 314 | &poodle_ts_device, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 315 | }; |
| 316 | |
Richard Purdie | 74617fb | 2006-06-19 19:57:12 +0100 | [diff] [blame] | 317 | static void poodle_poweroff(void) |
| 318 | { |
Richard Purdie | 74617fb | 2006-06-19 19:57:12 +0100 | [diff] [blame] | 319 | arm_machine_restart('h'); |
| 320 | } |
| 321 | |
| 322 | static void poodle_restart(char mode) |
| 323 | { |
Richard Purdie | 74617fb | 2006-06-19 19:57:12 +0100 | [diff] [blame] | 324 | arm_machine_restart('h'); |
| 325 | } |
| 326 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 327 | static void __init poodle_init(void) |
| 328 | { |
| 329 | int ret = 0; |
| 330 | |
Richard Purdie | 74617fb | 2006-06-19 19:57:12 +0100 | [diff] [blame] | 331 | pm_power_off = poodle_poweroff; |
| 332 | arm_pm_restart = poodle_restart; |
| 333 | |
Richard Purdie | f29d245 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 334 | /* setup sleep mode values */ |
| 335 | PWER = 0x00000002; |
| 336 | PFER = 0x00000000; |
| 337 | PRER = 0x00000002; |
| 338 | PGSR0 = 0x00008000; |
| 339 | PGSR1 = 0x003F0202; |
| 340 | PGSR2 = 0x0001C000; |
| 341 | PCFR |= PCFR_OPDE; |
| 342 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 343 | /* cpu initialize */ |
| 344 | /* Pgsr Register */ |
| 345 | PGSR0 = 0x0146dd80; |
| 346 | PGSR1 = 0x03bf0890; |
| 347 | PGSR2 = 0x0001c000; |
| 348 | |
| 349 | /* Alternate Register */ |
| 350 | GAFR0_L = 0x01001000; |
| 351 | GAFR0_U = 0x591a8010; |
| 352 | GAFR1_L = 0x900a8451; |
| 353 | GAFR1_U = 0xaaa5aaaa; |
| 354 | GAFR2_L = 0x8aaaaaaa; |
| 355 | GAFR2_U = 0x00000002; |
| 356 | |
| 357 | /* Direction Register */ |
| 358 | GPDR0 = 0xd3f0904c; |
| 359 | GPDR1 = 0xfcffb7d3; |
| 360 | GPDR2 = 0x0001ffff; |
| 361 | |
| 362 | /* Output Register */ |
| 363 | GPCR0 = 0x00000000; |
| 364 | GPCR1 = 0x00000000; |
| 365 | GPCR2 = 0x00000000; |
| 366 | |
| 367 | GPSR0 = 0x00400000; |
| 368 | GPSR1 = 0x00000000; |
| 369 | GPSR2 = 0x00000000; |
| 370 | |
Eric Miao | 2b0defd | 2008-08-09 05:54:22 -0400 | [diff] [blame] | 371 | platform_scoop_config = &poodle_pcmcia_config; |
| 372 | corgi_ssp_set_machinfo(&poodle_ssp_machinfo); |
| 373 | |
| 374 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
| 375 | if (ret) |
| 376 | pr_warning("poodle: Unable to register LoCoMo device\n"); |
| 377 | |
Richard Purdie | faed568 | 2006-06-19 20:46:05 +0100 | [diff] [blame] | 378 | set_pxa_fb_parent(&poodle_locomo_device.dev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 379 | set_pxa_fb_info(&poodle_fb_info); |
Richard Purdie | 13b9d47 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 380 | pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT); |
Richard Purdie | 8e4b871 | 2005-10-30 14:38:52 +0000 | [diff] [blame] | 381 | pxa_gpio_mode(POODLE_GPIO_IR_ON | GPIO_OUT); |
Richard Purdie | 13b9d47 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 382 | pxa_set_udc_info(&udc_info); |
| 383 | pxa_set_mci_info(&poodle_mci_platform_data); |
Richard Purdie | 8e4b871 | 2005-10-30 14:38:52 +0000 | [diff] [blame] | 384 | pxa_set_ficp_info(&poodle_ficp_platform_data); |
Mark Brown | f8787fd | 2008-08-26 13:30:03 +0100 | [diff] [blame] | 385 | pxa_set_i2c_info(NULL); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 386 | } |
| 387 | |
| 388 | static void __init fixup_poodle(struct machine_desc *desc, |
| 389 | struct tag *tags, char **cmdline, struct meminfo *mi) |
| 390 | { |
| 391 | sharpsl_save_param(); |
Richard Purdie | b2e6f75 | 2006-04-02 17:11:00 +0100 | [diff] [blame] | 392 | mi->nr_banks=1; |
| 393 | mi->bank[0].start = 0xa0000000; |
| 394 | mi->bank[0].node = 0; |
| 395 | mi->bank[0].size = (32*1024*1024); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 396 | } |
| 397 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 398 | MACHINE_START(POODLE, "SHARP Poodle") |
Russell King | e9dea0c | 2005-07-03 17:38:58 +0100 | [diff] [blame] | 399 | .phys_io = 0x40000000, |
Russell King | 68070bd | 2005-07-04 10:44:34 +0100 | [diff] [blame] | 400 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
Russell King | e9dea0c | 2005-07-03 17:38:58 +0100 | [diff] [blame] | 401 | .fixup = fixup_poodle, |
Richard Purdie | f29d245 | 2005-09-15 14:53:22 +0100 | [diff] [blame] | 402 | .map_io = pxa_map_io, |
Eric Miao | cd49104 | 2007-06-22 04:14:09 +0100 | [diff] [blame] | 403 | .init_irq = pxa25x_init_irq, |
Russell King | e9dea0c | 2005-07-03 17:38:58 +0100 | [diff] [blame] | 404 | .timer = &pxa_timer, |
| 405 | .init_machine = poodle_init, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 406 | MACHINE_END |