Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Support for Sharp SL-Cxx00 Series of PDAs |
| 3 | * Models: SL-C3000 (Spitz), SL-C1000 (Akita) and SL-C3100 (Borzoi) |
| 4 | * |
| 5 | * Copyright (c) 2005 Richard Purdie |
| 6 | * |
| 7 | * Based on Sharp's 2.4 kernel patches/lubbock.c |
| 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 | */ |
| 14 | |
| 15 | #include <linux/kernel.h> |
| 16 | #include <linux/init.h> |
Russell King | d052d1b | 2005-10-29 19:07:23 +0100 | [diff] [blame] | 17 | #include <linux/platform_device.h> |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 18 | #include <linux/delay.h> |
| 19 | #include <linux/major.h> |
| 20 | #include <linux/fs.h> |
| 21 | #include <linux/interrupt.h> |
Eric Miao | dd5980d | 2008-09-02 17:34:33 +0800 | [diff] [blame] | 22 | #include <linux/gpio.h> |
Eric Miao | 4fe3224 | 2008-09-05 22:38:23 +0800 | [diff] [blame] | 23 | #include <linux/leds.h> |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 24 | #include <linux/mmc/host.h> |
Richard Purdie | 74617fb | 2006-06-19 19:57:12 +0100 | [diff] [blame] | 25 | #include <linux/pm.h> |
Richard Purdie | c3f8f65 | 2007-09-03 00:27:00 +0100 | [diff] [blame] | 26 | #include <linux/backlight.h> |
Russell King | fced80c | 2008-09-06 12:10:45 +0100 | [diff] [blame] | 27 | #include <linux/io.h> |
Eric Miao | f72de66 | 2008-09-06 08:46:23 +0800 | [diff] [blame] | 28 | #include <linux/i2c.h> |
| 29 | #include <linux/i2c/pca953x.h> |
Eric Miao | 859b796 | 2008-09-03 12:09:24 +0800 | [diff] [blame] | 30 | #include <linux/spi/spi.h> |
| 31 | #include <linux/spi/ads7846.h> |
| 32 | #include <linux/spi/corgi_lcd.h> |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 33 | |
| 34 | #include <asm/setup.h> |
| 35 | #include <asm/memory.h> |
| 36 | #include <asm/mach-types.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 37 | #include <mach/hardware.h> |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 38 | #include <asm/irq.h> |
Richard Purdie | 74617fb | 2006-06-19 19:57:12 +0100 | [diff] [blame] | 39 | #include <asm/system.h> |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 40 | |
| 41 | #include <asm/mach/arch.h> |
| 42 | #include <asm/mach/map.h> |
| 43 | #include <asm/mach/irq.h> |
| 44 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 45 | #include <mach/pxa-regs.h> |
| 46 | #include <mach/pxa2xx-regs.h> |
Eric Miao | 5e96ade | 2008-09-03 09:47:42 +0800 | [diff] [blame] | 47 | #include <mach/mfp-pxa27x.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 48 | #include <mach/pxa27x-udc.h> |
Russell King | afd2fc0 | 2008-08-07 11:05:25 +0100 | [diff] [blame] | 49 | #include <mach/reset.h> |
Mark Brown | f8787fd | 2008-08-26 13:30:03 +0100 | [diff] [blame] | 50 | #include <mach/i2c.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 51 | #include <mach/irda.h> |
| 52 | #include <mach/mmc.h> |
| 53 | #include <mach/ohci.h> |
| 54 | #include <mach/udc.h> |
| 55 | #include <mach/pxafb.h> |
Eric Miao | 859b796 | 2008-09-03 12:09:24 +0800 | [diff] [blame] | 56 | #include <mach/pxa2xx_spi.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 57 | #include <mach/spitz.h> |
| 58 | #include <mach/sharpsl.h> |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 59 | |
| 60 | #include <asm/mach/sharpsl_param.h> |
| 61 | #include <asm/hardware/scoop.h> |
| 62 | |
| 63 | #include "generic.h" |
Russell King | 46c41e6 | 2007-05-15 15:39:36 +0100 | [diff] [blame] | 64 | #include "devices.h" |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 65 | #include "sharpsl.h" |
| 66 | |
Eric Miao | 5e96ade | 2008-09-03 09:47:42 +0800 | [diff] [blame] | 67 | static unsigned long spitz_pin_config[] __initdata = { |
| 68 | /* Chip Selects */ |
| 69 | GPIO78_nCS_2, /* SCOOP #2 */ |
Eric Miao | faf2f0a | 2008-11-16 15:56:58 +0800 | [diff] [blame] | 70 | GPIO79_nCS_3, /* NAND */ |
Eric Miao | 5e96ade | 2008-09-03 09:47:42 +0800 | [diff] [blame] | 71 | GPIO80_nCS_4, /* SCOOP #1 */ |
| 72 | |
| 73 | /* LCD - 16bpp Active TFT */ |
| 74 | GPIO58_LCD_LDD_0, |
| 75 | GPIO59_LCD_LDD_1, |
| 76 | GPIO60_LCD_LDD_2, |
| 77 | GPIO61_LCD_LDD_3, |
| 78 | GPIO62_LCD_LDD_4, |
| 79 | GPIO63_LCD_LDD_5, |
| 80 | GPIO64_LCD_LDD_6, |
| 81 | GPIO65_LCD_LDD_7, |
| 82 | GPIO66_LCD_LDD_8, |
| 83 | GPIO67_LCD_LDD_9, |
| 84 | GPIO68_LCD_LDD_10, |
| 85 | GPIO69_LCD_LDD_11, |
| 86 | GPIO70_LCD_LDD_12, |
| 87 | GPIO71_LCD_LDD_13, |
| 88 | GPIO72_LCD_LDD_14, |
| 89 | GPIO73_LCD_LDD_15, |
| 90 | GPIO74_LCD_FCLK, |
| 91 | GPIO75_LCD_LCLK, |
| 92 | GPIO76_LCD_PCLK, |
| 93 | |
| 94 | /* PC Card */ |
| 95 | GPIO48_nPOE, |
| 96 | GPIO49_nPWE, |
| 97 | GPIO50_nPIOR, |
| 98 | GPIO51_nPIOW, |
| 99 | GPIO85_nPCE_1, |
| 100 | GPIO54_nPCE_2, |
Eric Miao | 5e96ade | 2008-09-03 09:47:42 +0800 | [diff] [blame] | 101 | GPIO55_nPREG, |
| 102 | GPIO56_nPWAIT, |
| 103 | GPIO57_nIOIS16, |
Eric Miao | faf2f0a | 2008-11-16 15:56:58 +0800 | [diff] [blame] | 104 | GPIO104_PSKTSEL, |
Eric Miao | 5e96ade | 2008-09-03 09:47:42 +0800 | [diff] [blame] | 105 | |
| 106 | /* MMC */ |
| 107 | GPIO32_MMC_CLK, |
| 108 | GPIO112_MMC_CMD, |
| 109 | GPIO92_MMC_DAT_0, |
| 110 | GPIO109_MMC_DAT_1, |
| 111 | GPIO110_MMC_DAT_2, |
| 112 | GPIO111_MMC_DAT_3, |
| 113 | |
| 114 | /* GPIOs */ |
| 115 | GPIO9_GPIO, /* SPITZ_GPIO_nSD_DETECT */ |
| 116 | GPIO81_GPIO, /* SPITZ_GPIO_nSD_WP */ |
| 117 | GPIO41_GPIO, /* SPITZ_GPIO_USB_CONNECT */ |
| 118 | GPIO37_GPIO, /* SPITZ_GPIO_USB_HOST */ |
| 119 | GPIO35_GPIO, /* SPITZ_GPIO_USB_DEVICE */ |
| 120 | GPIO22_GPIO, /* SPITZ_GPIO_HSYNC */ |
| 121 | GPIO94_GPIO, /* SPITZ_GPIO_CF_CD */ |
| 122 | GPIO105_GPIO, /* SPITZ_GPIO_CF_IRQ */ |
| 123 | GPIO106_GPIO, /* SPITZ_GPIO_CF2_IRQ */ |
| 124 | |
| 125 | GPIO1_GPIO | WAKEUP_ON_EDGE_RISE, |
| 126 | }; |
| 127 | |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 128 | /* |
| 129 | * Spitz SCOOP Device #1 |
| 130 | */ |
| 131 | static struct resource spitz_scoop_resources[] = { |
| 132 | [0] = { |
| 133 | .start = 0x10800000, |
| 134 | .end = 0x10800fff, |
| 135 | .flags = IORESOURCE_MEM, |
| 136 | }, |
| 137 | }; |
| 138 | |
| 139 | static struct scoop_config spitz_scoop_setup = { |
Eric Miao | fff1472 | 2008-09-05 22:15:23 +0800 | [diff] [blame] | 140 | .io_dir = SPITZ_SCP_IO_DIR, |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 141 | .io_out = SPITZ_SCP_IO_OUT, |
Eric Miao | fff1472 | 2008-09-05 22:15:23 +0800 | [diff] [blame] | 142 | .suspend_clr = SPITZ_SCP_SUS_CLR, |
| 143 | .suspend_set = SPITZ_SCP_SUS_SET, |
| 144 | .gpio_base = SPITZ_SCP_GPIO_BASE, |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 145 | }; |
| 146 | |
| 147 | struct platform_device spitzscoop_device = { |
| 148 | .name = "sharp-scoop", |
| 149 | .id = 0, |
| 150 | .dev = { |
| 151 | .platform_data = &spitz_scoop_setup, |
| 152 | }, |
| 153 | .num_resources = ARRAY_SIZE(spitz_scoop_resources), |
| 154 | .resource = spitz_scoop_resources, |
| 155 | }; |
| 156 | |
| 157 | /* |
| 158 | * Spitz SCOOP Device #2 |
| 159 | */ |
| 160 | static struct resource spitz_scoop2_resources[] = { |
| 161 | [0] = { |
| 162 | .start = 0x08800040, |
| 163 | .end = 0x08800fff, |
| 164 | .flags = IORESOURCE_MEM, |
| 165 | }, |
| 166 | }; |
| 167 | |
| 168 | static struct scoop_config spitz_scoop2_setup = { |
Eric Miao | fff1472 | 2008-09-05 22:15:23 +0800 | [diff] [blame] | 169 | .io_dir = SPITZ_SCP2_IO_DIR, |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 170 | .io_out = SPITZ_SCP2_IO_OUT, |
Eric Miao | fff1472 | 2008-09-05 22:15:23 +0800 | [diff] [blame] | 171 | .suspend_clr = SPITZ_SCP2_SUS_CLR, |
| 172 | .suspend_set = SPITZ_SCP2_SUS_SET, |
| 173 | .gpio_base = SPITZ_SCP2_GPIO_BASE, |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 174 | }; |
| 175 | |
| 176 | struct platform_device spitzscoop2_device = { |
| 177 | .name = "sharp-scoop", |
| 178 | .id = 1, |
| 179 | .dev = { |
| 180 | .platform_data = &spitz_scoop2_setup, |
| 181 | }, |
| 182 | .num_resources = ARRAY_SIZE(spitz_scoop2_resources), |
| 183 | .resource = spitz_scoop2_resources, |
| 184 | }; |
| 185 | |
Richard Purdie | a63ae44 | 2005-11-08 19:15:43 +0000 | [diff] [blame] | 186 | #define SPITZ_PWR_SD 0x01 |
| 187 | #define SPITZ_PWR_CF 0x02 |
| 188 | |
| 189 | /* Power control is shared with between one of the CF slots and SD */ |
| 190 | static void spitz_card_pwr_ctrl(int device, unsigned short new_cpr) |
| 191 | { |
| 192 | unsigned short cpr = read_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR); |
| 193 | |
| 194 | if (new_cpr & 0x0007) { |
Eric Miao | fff1472 | 2008-09-05 22:15:23 +0800 | [diff] [blame] | 195 | gpio_set_value(SPITZ_GPIO_CF_POWER, 1); |
Richard Purdie | a63ae44 | 2005-11-08 19:15:43 +0000 | [diff] [blame] | 196 | if (!(cpr & 0x0002) && !(cpr & 0x0004)) |
| 197 | mdelay(5); |
| 198 | if (device == SPITZ_PWR_CF) |
| 199 | cpr |= 0x0002; |
| 200 | if (device == SPITZ_PWR_SD) |
| 201 | cpr |= 0x0004; |
| 202 | write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr | new_cpr); |
| 203 | } else { |
| 204 | if (device == SPITZ_PWR_CF) |
| 205 | cpr &= ~0x0002; |
| 206 | if (device == SPITZ_PWR_SD) |
| 207 | cpr &= ~0x0004; |
Richard Purdie | a63ae44 | 2005-11-08 19:15:43 +0000 | [diff] [blame] | 208 | if (!(cpr & 0x0002) && !(cpr & 0x0004)) { |
Richard Purdie | 945b957 | 2006-01-05 20:44:57 +0000 | [diff] [blame] | 209 | write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, 0x0000); |
Richard Purdie | a63ae44 | 2005-11-08 19:15:43 +0000 | [diff] [blame] | 210 | mdelay(1); |
Eric Miao | fff1472 | 2008-09-05 22:15:23 +0800 | [diff] [blame] | 211 | gpio_set_value(SPITZ_GPIO_CF_POWER, 0); |
Richard Purdie | 945b957 | 2006-01-05 20:44:57 +0000 | [diff] [blame] | 212 | } else { |
| 213 | write_scoop_reg(&spitzscoop_device.dev, SCOOP_CPR, cpr | new_cpr); |
Richard Purdie | a63ae44 | 2005-11-08 19:15:43 +0000 | [diff] [blame] | 214 | } |
| 215 | } |
| 216 | } |
| 217 | |
Richard Purdie | a63ae44 | 2005-11-08 19:15:43 +0000 | [diff] [blame] | 218 | static void spitz_pcmcia_pwr(struct device *scoop, unsigned short cpr, int nr) |
| 219 | { |
| 220 | /* Only need to override behaviour for slot 0 */ |
| 221 | if (nr == 0) |
| 222 | spitz_card_pwr_ctrl(SPITZ_PWR_CF, cpr); |
| 223 | else |
| 224 | write_scoop_reg(scoop, SCOOP_CPR, cpr); |
| 225 | } |
| 226 | |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 227 | static struct scoop_pcmcia_dev spitz_pcmcia_scoop[] = { |
| 228 | { |
| 229 | .dev = &spitzscoop_device.dev, |
| 230 | .irq = SPITZ_IRQ_GPIO_CF_IRQ, |
| 231 | .cd_irq = SPITZ_IRQ_GPIO_CF_CD, |
| 232 | .cd_irq_str = "PCMCIA0 CD", |
| 233 | },{ |
| 234 | .dev = &spitzscoop2_device.dev, |
| 235 | .irq = SPITZ_IRQ_GPIO_CF2_IRQ, |
| 236 | .cd_irq = -1, |
| 237 | }, |
| 238 | }; |
| 239 | |
Richard Purdie | a63ae44 | 2005-11-08 19:15:43 +0000 | [diff] [blame] | 240 | static struct scoop_pcmcia_config spitz_pcmcia_config = { |
| 241 | .devs = &spitz_pcmcia_scoop[0], |
| 242 | .num_devs = 2, |
Richard Purdie | a63ae44 | 2005-11-08 19:15:43 +0000 | [diff] [blame] | 243 | .power_ctrl = spitz_pcmcia_pwr, |
| 244 | }; |
| 245 | |
| 246 | EXPORT_SYMBOL(spitzscoop_device); |
| 247 | EXPORT_SYMBOL(spitzscoop2_device); |
| 248 | |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 249 | /* |
| 250 | * Spitz Keyboard Device |
| 251 | */ |
| 252 | static struct platform_device spitzkbd_device = { |
| 253 | .name = "spitz-keyboard", |
| 254 | .id = -1, |
| 255 | }; |
| 256 | |
| 257 | |
| 258 | /* |
Richard Purdie | 3179108 | 2006-03-31 02:31:09 -0800 | [diff] [blame] | 259 | * Spitz LEDs |
| 260 | */ |
Eric Miao | 4fe3224 | 2008-09-05 22:38:23 +0800 | [diff] [blame] | 261 | static struct gpio_led spitz_gpio_leds[] = { |
| 262 | { |
| 263 | .name = "spitz:amber:charge", |
| 264 | .default_trigger = "sharpsl-charge", |
| 265 | .gpio = SPITZ_GPIO_LED_ORANGE, |
| 266 | }, |
| 267 | { |
| 268 | .name = "spitz:green:hddactivity", |
| 269 | .default_trigger = "ide-disk", |
| 270 | .gpio = SPITZ_GPIO_LED_GREEN, |
| 271 | }, |
| 272 | }; |
| 273 | |
| 274 | static struct gpio_led_platform_data spitz_gpio_leds_info = { |
| 275 | .leds = spitz_gpio_leds, |
| 276 | .num_leds = ARRAY_SIZE(spitz_gpio_leds), |
| 277 | }; |
| 278 | |
Richard Purdie | 3179108 | 2006-03-31 02:31:09 -0800 | [diff] [blame] | 279 | static struct platform_device spitzled_device = { |
Eric Miao | 4fe3224 | 2008-09-05 22:38:23 +0800 | [diff] [blame] | 280 | .name = "leds-gpio", |
Richard Purdie | 3179108 | 2006-03-31 02:31:09 -0800 | [diff] [blame] | 281 | .id = -1, |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 282 | .dev = { |
Eric Miao | 4fe3224 | 2008-09-05 22:38:23 +0800 | [diff] [blame] | 283 | .platform_data = &spitz_gpio_leds_info, |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 284 | }, |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 285 | }; |
| 286 | |
Eric Miao | 859b796 | 2008-09-03 12:09:24 +0800 | [diff] [blame] | 287 | #if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE) |
| 288 | static struct pxa2xx_spi_master spitz_spi_info = { |
| 289 | .num_chipselect = 3, |
| 290 | }; |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 291 | |
Eric Miao | 859b796 | 2008-09-03 12:09:24 +0800 | [diff] [blame] | 292 | static struct ads7846_platform_data spitz_ads7846_info = { |
| 293 | .model = 7846, |
| 294 | .vref_delay_usecs = 100, |
| 295 | .x_plate_ohms = 419, |
| 296 | .y_plate_ohms = 486, |
| 297 | .gpio_pendown = SPITZ_GPIO_TP_INT, |
| 298 | }; |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 299 | |
Eric Miao | 859b796 | 2008-09-03 12:09:24 +0800 | [diff] [blame] | 300 | static void spitz_ads7846_cs(u32 command) |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 301 | { |
Eric Miao | 859b796 | 2008-09-03 12:09:24 +0800 | [diff] [blame] | 302 | gpio_set_value(SPITZ_GPIO_ADS7846_CS, !(command == PXA2XX_CS_ASSERT)); |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 303 | } |
| 304 | |
Eric Miao | 859b796 | 2008-09-03 12:09:24 +0800 | [diff] [blame] | 305 | static struct pxa2xx_spi_chip spitz_ads7846_chip = { |
| 306 | .cs_control = spitz_ads7846_cs, |
| 307 | }; |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 308 | |
Eric Miao | 859b796 | 2008-09-03 12:09:24 +0800 | [diff] [blame] | 309 | static void spitz_bl_kick_battery(void) |
| 310 | { |
| 311 | void (*kick_batt)(void); |
| 312 | |
| 313 | kick_batt = symbol_get(sharpsl_battery_kick); |
| 314 | if (kick_batt) { |
| 315 | kick_batt(); |
| 316 | symbol_put(sharpsl_battery_kick); |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | static struct corgi_lcd_platform_data spitz_lcdcon_info = { |
| 321 | .init_mode = CORGI_LCD_MODE_VGA, |
| 322 | .max_intensity = 0x2f, |
| 323 | .default_intensity = 0x1f, |
| 324 | .limit_mask = 0x0b, |
Eric Miao | ff7a4c7 | 2008-09-07 11:30:06 +0800 | [diff] [blame] | 325 | .gpio_backlight_cont = SPITZ_GPIO_BACKLIGHT_CONT, |
| 326 | .gpio_backlight_on = SPITZ_GPIO_BACKLIGHT_ON, |
Eric Miao | 859b796 | 2008-09-03 12:09:24 +0800 | [diff] [blame] | 327 | .kick_battery = spitz_bl_kick_battery, |
| 328 | }; |
| 329 | |
| 330 | static void spitz_lcdcon_cs(u32 command) |
| 331 | { |
| 332 | gpio_set_value(SPITZ_GPIO_LCDCON_CS, !(command == PXA2XX_CS_ASSERT)); |
| 333 | } |
| 334 | |
| 335 | static struct pxa2xx_spi_chip spitz_lcdcon_chip = { |
| 336 | .cs_control = spitz_lcdcon_cs, |
| 337 | }; |
| 338 | |
| 339 | static void spitz_max1111_cs(u32 command) |
| 340 | { |
| 341 | gpio_set_value(SPITZ_GPIO_MAX1111_CS, !(command == PXA2XX_CS_ASSERT)); |
| 342 | } |
| 343 | |
| 344 | static struct pxa2xx_spi_chip spitz_max1111_chip = { |
| 345 | .cs_control = spitz_max1111_cs, |
| 346 | }; |
| 347 | |
| 348 | static struct spi_board_info spitz_spi_devices[] = { |
| 349 | { |
| 350 | .modalias = "ads7846", |
| 351 | .max_speed_hz = 1200000, |
| 352 | .bus_num = 2, |
| 353 | .chip_select = 0, |
| 354 | .platform_data = &spitz_ads7846_info, |
| 355 | .controller_data= &spitz_ads7846_chip, |
| 356 | .irq = gpio_to_irq(SPITZ_GPIO_TP_INT), |
| 357 | }, { |
| 358 | .modalias = "corgi-lcd", |
| 359 | .max_speed_hz = 50000, |
| 360 | .bus_num = 2, |
| 361 | .chip_select = 1, |
| 362 | .platform_data = &spitz_lcdcon_info, |
| 363 | .controller_data= &spitz_lcdcon_chip, |
| 364 | }, { |
| 365 | .modalias = "max1111", |
| 366 | .max_speed_hz = 450000, |
| 367 | .bus_num = 2, |
| 368 | .chip_select = 2, |
| 369 | .controller_data= &spitz_max1111_chip, |
| 370 | }, |
| 371 | }; |
| 372 | |
| 373 | static void __init spitz_init_spi(void) |
| 374 | { |
| 375 | int err; |
| 376 | |
| 377 | err = gpio_request(SPITZ_GPIO_ADS7846_CS, "ADS7846_CS"); |
| 378 | if (err) |
| 379 | return; |
| 380 | |
| 381 | err = gpio_request(SPITZ_GPIO_LCDCON_CS, "LCDCON_CS"); |
| 382 | if (err) |
| 383 | goto err_free_1; |
| 384 | |
| 385 | err = gpio_request(SPITZ_GPIO_MAX1111_CS, "MAX1111_CS"); |
| 386 | if (err) |
| 387 | goto err_free_2; |
| 388 | |
Dmitry Baryshkov | b6e642e | 2008-10-29 11:40:46 +0800 | [diff] [blame] | 389 | err = gpio_direction_output(SPITZ_GPIO_ADS7846_CS, 1); |
| 390 | if (err) |
| 391 | goto err_free_3; |
| 392 | err = gpio_direction_output(SPITZ_GPIO_LCDCON_CS, 1); |
| 393 | if (err) |
| 394 | goto err_free_3; |
| 395 | err = gpio_direction_output(SPITZ_GPIO_MAX1111_CS, 1); |
| 396 | if (err) |
| 397 | goto err_free_3; |
| 398 | |
Eric Miao | ff7a4c7 | 2008-09-07 11:30:06 +0800 | [diff] [blame] | 399 | if (machine_is_akita()) { |
| 400 | spitz_lcdcon_info.gpio_backlight_cont = AKITA_GPIO_BACKLIGHT_CONT; |
| 401 | spitz_lcdcon_info.gpio_backlight_on = AKITA_GPIO_BACKLIGHT_ON; |
| 402 | } |
| 403 | |
Eric Miao | 859b796 | 2008-09-03 12:09:24 +0800 | [diff] [blame] | 404 | pxa2xx_set_spi_info(2, &spitz_spi_info); |
| 405 | spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices)); |
| 406 | return; |
| 407 | |
Dmitry Baryshkov | b6e642e | 2008-10-29 11:40:46 +0800 | [diff] [blame] | 408 | err_free_3: |
| 409 | gpio_free(SPITZ_GPIO_MAX1111_CS); |
Eric Miao | 859b796 | 2008-09-03 12:09:24 +0800 | [diff] [blame] | 410 | err_free_2: |
| 411 | gpio_free(SPITZ_GPIO_LCDCON_CS); |
| 412 | err_free_1: |
| 413 | gpio_free(SPITZ_GPIO_ADS7846_CS); |
| 414 | } |
| 415 | #else |
| 416 | static inline void spitz_init_spi(void) {} |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 417 | #endif |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 418 | |
| 419 | /* |
| 420 | * MMC/SD Device |
| 421 | * |
| 422 | * The card detect interrupt isn't debounced so we delay it by 250ms |
| 423 | * to give the card a chance to fully insert/eject. |
| 424 | */ |
| 425 | |
| 426 | static struct pxamci_platform_data spitz_mci_platform_data; |
| 427 | |
David Howells | 40220c1 | 2006-10-09 12:19:47 +0100 | [diff] [blame] | 428 | static int spitz_mci_init(struct device *dev, irq_handler_t spitz_detect_int, void *data) |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 429 | { |
| 430 | int err; |
| 431 | |
Eric Miao | dd5980d | 2008-09-02 17:34:33 +0800 | [diff] [blame] | 432 | err = gpio_request(SPITZ_GPIO_nSD_DETECT, "nSD_DETECT"); |
| 433 | if (err) |
| 434 | goto err_out; |
| 435 | |
| 436 | err = gpio_request(SPITZ_GPIO_nSD_WP, "nSD_WP"); |
| 437 | if (err) |
| 438 | goto err_free_1; |
| 439 | |
| 440 | gpio_direction_input(SPITZ_GPIO_nSD_DETECT); |
| 441 | gpio_direction_input(SPITZ_GPIO_nSD_WP); |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 442 | |
| 443 | spitz_mci_platform_data.detect_delay = msecs_to_jiffies(250); |
| 444 | |
Russell King | 9ded96f | 2006-01-08 01:02:07 -0800 | [diff] [blame] | 445 | err = request_irq(SPITZ_IRQ_GPIO_nSD_DETECT, spitz_detect_int, |
Eric Miao | dd5980d | 2008-09-02 17:34:33 +0800 | [diff] [blame] | 446 | IRQF_DISABLED | IRQF_TRIGGER_RISING | |
| 447 | IRQF_TRIGGER_FALLING, |
Russell King | 9ded96f | 2006-01-08 01:02:07 -0800 | [diff] [blame] | 448 | "MMC card detect", data); |
Eric Miao | dd5980d | 2008-09-02 17:34:33 +0800 | [diff] [blame] | 449 | if (err) { |
| 450 | pr_err("%s: MMC/SD: can't request MMC card detect IRQ\n", |
| 451 | __func__); |
| 452 | goto err_free_2; |
| 453 | } |
| 454 | return 0; |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 455 | |
Eric Miao | dd5980d | 2008-09-02 17:34:33 +0800 | [diff] [blame] | 456 | err_free_2: |
| 457 | gpio_free(SPITZ_GPIO_nSD_WP); |
| 458 | err_free_1: |
| 459 | gpio_free(SPITZ_GPIO_nSD_DETECT); |
| 460 | err_out: |
Russell King | 2687bd3 | 2008-01-23 14:05:58 +0000 | [diff] [blame] | 461 | return err; |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 462 | } |
| 463 | |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 464 | static void spitz_mci_setpower(struct device *dev, unsigned int vdd) |
| 465 | { |
| 466 | struct pxamci_platform_data* p_d = dev->platform_data; |
| 467 | |
Richard Purdie | a63ae44 | 2005-11-08 19:15:43 +0000 | [diff] [blame] | 468 | if (( 1 << vdd) & p_d->ocr_mask) |
| 469 | spitz_card_pwr_ctrl(SPITZ_PWR_SD, 0x0004); |
| 470 | else |
| 471 | spitz_card_pwr_ctrl(SPITZ_PWR_SD, 0x0000); |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 472 | } |
| 473 | |
| 474 | static int spitz_mci_get_ro(struct device *dev) |
| 475 | { |
Eric Miao | dd5980d | 2008-09-02 17:34:33 +0800 | [diff] [blame] | 476 | return gpio_get_value(SPITZ_GPIO_nSD_WP); |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 477 | } |
| 478 | |
| 479 | static void spitz_mci_exit(struct device *dev, void *data) |
| 480 | { |
| 481 | free_irq(SPITZ_IRQ_GPIO_nSD_DETECT, data); |
Eric Miao | dd5980d | 2008-09-02 17:34:33 +0800 | [diff] [blame] | 482 | gpio_free(SPITZ_GPIO_nSD_WP); |
| 483 | gpio_free(SPITZ_GPIO_nSD_DETECT); |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 484 | } |
| 485 | |
| 486 | static struct pxamci_platform_data spitz_mci_platform_data = { |
| 487 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
| 488 | .init = spitz_mci_init, |
| 489 | .get_ro = spitz_mci_get_ro, |
| 490 | .setpower = spitz_mci_setpower, |
| 491 | .exit = spitz_mci_exit, |
| 492 | }; |
| 493 | |
| 494 | |
| 495 | /* |
Richard Purdie | 3125c68 | 2006-01-05 20:44:52 +0000 | [diff] [blame] | 496 | * USB Host (OHCI) |
| 497 | */ |
| 498 | static int spitz_ohci_init(struct device *dev) |
| 499 | { |
Eric Miao | dd5980d | 2008-09-02 17:34:33 +0800 | [diff] [blame] | 500 | int err; |
Richard Purdie | 3125c68 | 2006-01-05 20:44:52 +0000 | [diff] [blame] | 501 | |
Eric Miao | dd5980d | 2008-09-02 17:34:33 +0800 | [diff] [blame] | 502 | err = gpio_request(SPITZ_GPIO_USB_HOST, "USB_HOST"); |
| 503 | if (err) |
| 504 | return err; |
| 505 | |
Eric Miao | 5e96ade | 2008-09-03 09:47:42 +0800 | [diff] [blame] | 506 | /* Only Port 2 is connected |
| 507 | * Setup USB Port 2 Output Control Register |
| 508 | */ |
Richard Purdie | 3125c68 | 2006-01-05 20:44:52 +0000 | [diff] [blame] | 509 | UP2OCR = UP2OCR_HXS | UP2OCR_HXOE | UP2OCR_DPPDE | UP2OCR_DMPDE; |
| 510 | |
Eric Miao | 097b533 | 2008-09-27 15:49:57 +0800 | [diff] [blame] | 511 | return gpio_direction_output(SPITZ_GPIO_USB_HOST, 1); |
Richard Purdie | 3125c68 | 2006-01-05 20:44:52 +0000 | [diff] [blame] | 512 | } |
| 513 | |
| 514 | static struct pxaohci_platform_data spitz_ohci_platform_data = { |
| 515 | .port_mode = PMM_NPS_MODE, |
| 516 | .init = spitz_ohci_init, |
Eric Miao | 097b533 | 2008-09-27 15:49:57 +0800 | [diff] [blame] | 517 | .flags = ENABLE_PORT_ALL | NO_OC_PROTECTION, |
Richard Purdie | 0c27c5d | 2006-06-08 22:44:07 +0100 | [diff] [blame] | 518 | .power_budget = 150, |
Richard Purdie | 3125c68 | 2006-01-05 20:44:52 +0000 | [diff] [blame] | 519 | }; |
| 520 | |
| 521 | |
| 522 | /* |
Richard Purdie | dc07845 | 2005-10-30 14:50:25 +0000 | [diff] [blame] | 523 | * Irda |
| 524 | */ |
Eric Miao | fff1472 | 2008-09-05 22:15:23 +0800 | [diff] [blame] | 525 | static int spitz_irda_startup(struct device *dev) |
| 526 | { |
| 527 | int rc; |
| 528 | |
| 529 | rc = gpio_request(SPITZ_GPIO_IR_ON, "IrDA on"); |
| 530 | if (rc) |
| 531 | goto err; |
| 532 | |
| 533 | rc = gpio_direction_output(SPITZ_GPIO_IR_ON, 1); |
| 534 | if (rc) |
| 535 | goto err_dir; |
| 536 | |
| 537 | return 0; |
| 538 | |
| 539 | err_dir: |
| 540 | gpio_free(SPITZ_GPIO_IR_ON); |
| 541 | err: |
| 542 | return rc; |
| 543 | } |
| 544 | |
| 545 | static void spitz_irda_shutdown(struct device *dev) |
| 546 | { |
| 547 | gpio_free(SPITZ_GPIO_IR_ON); |
| 548 | } |
| 549 | |
Richard Purdie | dc07845 | 2005-10-30 14:50:25 +0000 | [diff] [blame] | 550 | static void spitz_irda_transceiver_mode(struct device *dev, int mode) |
| 551 | { |
Eric Miao | fff1472 | 2008-09-05 22:15:23 +0800 | [diff] [blame] | 552 | gpio_set_value(SPITZ_GPIO_IR_ON, mode & IR_OFF); |
Dmitry Baryshkov | 0fc3ff3 | 2008-07-02 13:54:46 +0100 | [diff] [blame] | 553 | pxa2xx_transceiver_mode(dev, mode); |
Richard Purdie | dc07845 | 2005-10-30 14:50:25 +0000 | [diff] [blame] | 554 | } |
| 555 | |
Richard Purdie | 94cabd0 | 2005-11-12 18:53:48 +0000 | [diff] [blame] | 556 | #ifdef CONFIG_MACH_AKITA |
| 557 | static void akita_irda_transceiver_mode(struct device *dev, int mode) |
| 558 | { |
Eric Miao | f72de66 | 2008-09-06 08:46:23 +0800 | [diff] [blame] | 559 | gpio_set_value(AKITA_GPIO_IR_ON, mode & IR_OFF); |
Dmitry Baryshkov | 0fc3ff3 | 2008-07-02 13:54:46 +0100 | [diff] [blame] | 560 | pxa2xx_transceiver_mode(dev, mode); |
Richard Purdie | 94cabd0 | 2005-11-12 18:53:48 +0000 | [diff] [blame] | 561 | } |
| 562 | #endif |
| 563 | |
Richard Purdie | dc07845 | 2005-10-30 14:50:25 +0000 | [diff] [blame] | 564 | static struct pxaficp_platform_data spitz_ficp_platform_data = { |
Eric Miao | fff1472 | 2008-09-05 22:15:23 +0800 | [diff] [blame] | 565 | .transceiver_cap = IR_SIRMODE | IR_OFF, |
| 566 | .transceiver_mode = spitz_irda_transceiver_mode, |
| 567 | .startup = spitz_irda_startup, |
| 568 | .shutdown = spitz_irda_shutdown, |
Richard Purdie | dc07845 | 2005-10-30 14:50:25 +0000 | [diff] [blame] | 569 | }; |
| 570 | |
| 571 | |
| 572 | /* |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 573 | * Spitz PXA Framebuffer |
| 574 | */ |
Richard Purdie | d14b272 | 2006-09-20 22:54:21 +0100 | [diff] [blame] | 575 | |
| 576 | static struct pxafb_mode_info spitz_pxafb_modes[] = { |
| 577 | { |
| 578 | .pixclock = 19231, |
| 579 | .xres = 480, |
| 580 | .yres = 640, |
| 581 | .bpp = 16, |
| 582 | .hsync_len = 40, |
| 583 | .left_margin = 46, |
| 584 | .right_margin = 125, |
| 585 | .vsync_len = 3, |
| 586 | .upper_margin = 1, |
| 587 | .lower_margin = 0, |
| 588 | .sync = 0, |
| 589 | },{ |
| 590 | .pixclock = 134617, |
| 591 | .xres = 240, |
| 592 | .yres = 320, |
| 593 | .bpp = 16, |
| 594 | .hsync_len = 20, |
| 595 | .left_margin = 20, |
| 596 | .right_margin = 46, |
| 597 | .vsync_len = 2, |
| 598 | .upper_margin = 1, |
| 599 | .lower_margin = 0, |
| 600 | .sync = 0, |
| 601 | }, |
| 602 | }; |
| 603 | |
| 604 | static struct pxafb_mach_info spitz_pxafb_info = { |
| 605 | .modes = &spitz_pxafb_modes[0], |
| 606 | .num_modes = 2, |
| 607 | .fixed_modes = 1, |
Eric Miao | 79009a0 | 2008-09-03 10:00:38 +0800 | [diff] [blame] | 608 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_ALTERNATE_MAPPING, |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 609 | }; |
| 610 | |
| 611 | |
| 612 | static struct platform_device *devices[] __initdata = { |
| 613 | &spitzscoop_device, |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 614 | &spitzkbd_device, |
Richard Purdie | 3179108 | 2006-03-31 02:31:09 -0800 | [diff] [blame] | 615 | &spitzled_device, |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 616 | }; |
| 617 | |
Richard Purdie | 74617fb | 2006-06-19 19:57:12 +0100 | [diff] [blame] | 618 | static void spitz_poweroff(void) |
| 619 | { |
Dmitry Baryshkov | 86159a9 | 2008-05-22 16:21:48 +0100 | [diff] [blame] | 620 | arm_machine_restart('g'); |
Richard Purdie | 74617fb | 2006-06-19 19:57:12 +0100 | [diff] [blame] | 621 | } |
| 622 | |
| 623 | static void spitz_restart(char mode) |
| 624 | { |
| 625 | /* Bootloader magic for a reboot */ |
| 626 | if((MSC0 & 0xffff0000) == 0x7ff00000) |
| 627 | MSC0 = (MSC0 & 0xffff) | 0x7ee00000; |
| 628 | |
| 629 | spitz_poweroff(); |
| 630 | } |
| 631 | |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 632 | static void __init common_init(void) |
| 633 | { |
Dmitry Baryshkov | 69fc7ee | 2008-10-09 16:58:13 +0100 | [diff] [blame] | 634 | init_gpio_reset(SPITZ_GPIO_ON_RESET, 1); |
Richard Purdie | 74617fb | 2006-06-19 19:57:12 +0100 | [diff] [blame] | 635 | pm_power_off = spitz_poweroff; |
| 636 | arm_pm_restart = spitz_restart; |
| 637 | |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 638 | PMCR = 0x00; |
| 639 | |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 640 | /* Stop 3.6MHz and drive HIGH to PCMCIA and CS */ |
| 641 | PCFR |= PCFR_OPDE; |
| 642 | |
Eric Miao | 5e96ade | 2008-09-03 09:47:42 +0800 | [diff] [blame] | 643 | pxa2xx_mfp_config(ARRAY_AND_SIZE(spitz_pin_config)); |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 644 | |
Eric Miao | 859b796 | 2008-09-03 12:09:24 +0800 | [diff] [blame] | 645 | spitz_init_spi(); |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 646 | |
| 647 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
| 648 | pxa_set_mci_info(&spitz_mci_platform_data); |
Richard Purdie | 3125c68 | 2006-01-05 20:44:52 +0000 | [diff] [blame] | 649 | pxa_set_ohci_info(&spitz_ohci_platform_data); |
Richard Purdie | dc07845 | 2005-10-30 14:50:25 +0000 | [diff] [blame] | 650 | pxa_set_ficp_info(&spitz_ficp_platform_data); |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 651 | set_pxa_fb_info(&spitz_pxafb_info); |
Mark Brown | f8787fd | 2008-08-26 13:30:03 +0100 | [diff] [blame] | 652 | pxa_set_i2c_info(NULL); |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 653 | } |
| 654 | |
Richard Purdie | ca4d6cf | 2008-01-02 01:09:54 +0100 | [diff] [blame] | 655 | #if defined(CONFIG_MACH_SPITZ) || defined(CONFIG_MACH_BORZOI) |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 656 | static void __init spitz_init(void) |
| 657 | { |
Richard Purdie | a63ae44 | 2005-11-08 19:15:43 +0000 | [diff] [blame] | 658 | platform_scoop_config = &spitz_pcmcia_config; |
| 659 | |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 660 | common_init(); |
| 661 | |
| 662 | platform_device_register(&spitzscoop2_device); |
| 663 | } |
Richard Purdie | ca4d6cf | 2008-01-02 01:09:54 +0100 | [diff] [blame] | 664 | #endif |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 665 | |
Richard Purdie | 94cabd0 | 2005-11-12 18:53:48 +0000 | [diff] [blame] | 666 | #ifdef CONFIG_MACH_AKITA |
| 667 | /* |
| 668 | * Akita IO Expander |
| 669 | */ |
Eric Miao | f72de66 | 2008-09-06 08:46:23 +0800 | [diff] [blame] | 670 | static struct pca953x_platform_data akita_ioexp = { |
| 671 | .gpio_base = AKITA_IOEXP_GPIO_BASE, |
Richard Purdie | 94cabd0 | 2005-11-12 18:53:48 +0000 | [diff] [blame] | 672 | }; |
| 673 | |
Eric Miao | f72de66 | 2008-09-06 08:46:23 +0800 | [diff] [blame] | 674 | static struct i2c_board_info akita_i2c_board_info[] = { |
| 675 | { |
| 676 | .type = "max7310", |
| 677 | .addr = 0x18, |
| 678 | .platform_data = &akita_ioexp, |
| 679 | }, |
| 680 | }; |
Richard Purdie | ca4d6cf | 2008-01-02 01:09:54 +0100 | [diff] [blame] | 681 | |
Richard Purdie | 94cabd0 | 2005-11-12 18:53:48 +0000 | [diff] [blame] | 682 | static void __init akita_init(void) |
| 683 | { |
| 684 | spitz_ficp_platform_data.transceiver_mode = akita_irda_transceiver_mode; |
| 685 | |
| 686 | /* We just pretend the second element of the array doesn't exist */ |
| 687 | spitz_pcmcia_config.num_devs = 1; |
| 688 | platform_scoop_config = &spitz_pcmcia_config; |
Richard Purdie | 94cabd0 | 2005-11-12 18:53:48 +0000 | [diff] [blame] | 689 | |
Eric Miao | f72de66 | 2008-09-06 08:46:23 +0800 | [diff] [blame] | 690 | i2c_register_board_info(0, ARRAY_AND_SIZE(akita_i2c_board_info)); |
Richard Purdie | 94cabd0 | 2005-11-12 18:53:48 +0000 | [diff] [blame] | 691 | |
Richard Purdie | 94cabd0 | 2005-11-12 18:53:48 +0000 | [diff] [blame] | 692 | common_init(); |
| 693 | } |
| 694 | #endif |
| 695 | |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 696 | static void __init fixup_spitz(struct machine_desc *desc, |
| 697 | struct tag *tags, char **cmdline, struct meminfo *mi) |
| 698 | { |
| 699 | sharpsl_save_param(); |
| 700 | mi->nr_banks = 1; |
| 701 | mi->bank[0].start = 0xa0000000; |
| 702 | mi->bank[0].node = 0; |
| 703 | mi->bank[0].size = (64*1024*1024); |
| 704 | } |
| 705 | |
| 706 | #ifdef CONFIG_MACH_SPITZ |
| 707 | MACHINE_START(SPITZ, "SHARP Spitz") |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 708 | .phys_io = 0x40000000, |
| 709 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
| 710 | .fixup = fixup_spitz, |
| 711 | .map_io = pxa_map_io, |
Eric Miao | cd49104 | 2007-06-22 04:14:09 +0100 | [diff] [blame] | 712 | .init_irq = pxa27x_init_irq, |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 713 | .init_machine = spitz_init, |
| 714 | .timer = &pxa_timer, |
| 715 | MACHINE_END |
| 716 | #endif |
| 717 | |
| 718 | #ifdef CONFIG_MACH_BORZOI |
| 719 | MACHINE_START(BORZOI, "SHARP Borzoi") |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 720 | .phys_io = 0x40000000, |
| 721 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
| 722 | .fixup = fixup_spitz, |
| 723 | .map_io = pxa_map_io, |
Eric Miao | cd49104 | 2007-06-22 04:14:09 +0100 | [diff] [blame] | 724 | .init_irq = pxa27x_init_irq, |
Richard Purdie | 0dd28f1 | 2005-09-13 01:25:34 -0700 | [diff] [blame] | 725 | .init_machine = spitz_init, |
| 726 | .timer = &pxa_timer, |
| 727 | MACHINE_END |
| 728 | #endif |
Richard Purdie | 94cabd0 | 2005-11-12 18:53:48 +0000 | [diff] [blame] | 729 | |
| 730 | #ifdef CONFIG_MACH_AKITA |
| 731 | MACHINE_START(AKITA, "SHARP Akita") |
Richard Purdie | 94cabd0 | 2005-11-12 18:53:48 +0000 | [diff] [blame] | 732 | .phys_io = 0x40000000, |
| 733 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
| 734 | .fixup = fixup_spitz, |
| 735 | .map_io = pxa_map_io, |
Eric Miao | cd49104 | 2007-06-22 04:14:09 +0100 | [diff] [blame] | 736 | .init_irq = pxa27x_init_irq, |
Richard Purdie | 94cabd0 | 2005-11-12 18:53:48 +0000 | [diff] [blame] | 737 | .init_machine = akita_init, |
| 738 | .timer = &pxa_timer, |
| 739 | MACHINE_END |
| 740 | #endif |