Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 1 | /* |
| 2 | * AP4EVB board support |
| 3 | * |
| 4 | * Copyright (C) 2010 Magnus Damm |
| 5 | * Copyright (C) 2008 Yoshihiro Shimoda |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; version 2 of the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | */ |
| 20 | #include <linux/kernel.h> |
| 21 | #include <linux/init.h> |
| 22 | #include <linux/interrupt.h> |
| 23 | #include <linux/irq.h> |
| 24 | #include <linux/platform_device.h> |
| 25 | #include <linux/delay.h> |
| 26 | #include <linux/mtd/mtd.h> |
| 27 | #include <linux/mtd/partitions.h> |
| 28 | #include <linux/mtd/physmap.h> |
Kuninori Morimoto | 91cf508 | 2010-03-11 10:42:52 +0000 | [diff] [blame] | 29 | #include <linux/i2c.h> |
| 30 | #include <linux/i2c/tsc2007.h> |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 31 | #include <linux/io.h> |
Kuninori Morimoto | 1b7e067 | 2010-02-17 09:30:14 +0000 | [diff] [blame] | 32 | #include <linux/smsc911x.h> |
| 33 | #include <linux/gpio.h> |
Kuninori Morimoto | 17ccb83 | 2010-02-23 07:07:01 +0000 | [diff] [blame] | 34 | #include <linux/input.h> |
| 35 | #include <linux/input/sh_keysc.h> |
Kuninori Morimoto | fb54d26 | 2010-04-13 06:16:32 +0000 | [diff] [blame] | 36 | #include <linux/usb/r8a66597.h> |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 37 | #include <mach/common.h> |
Kuninori Morimoto | 1b7e067 | 2010-02-17 09:30:14 +0000 | [diff] [blame] | 38 | #include <mach/sh7372.h> |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 39 | #include <asm/mach-types.h> |
| 40 | #include <asm/mach/arch.h> |
| 41 | #include <asm/mach/map.h> |
Magnus Damm | 495b3ce | 2010-05-12 14:21:34 +0000 | [diff] [blame^] | 42 | #include <asm/mach/time.h> |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 43 | |
Kuninori Morimoto | 02624a1 | 2010-02-18 17:58:19 +0900 | [diff] [blame] | 44 | /* |
| 45 | * Address Interface BusWidth note |
| 46 | * ------------------------------------------------------------------ |
| 47 | * 0x0000_0000 NOR Flash ROM (MCP) 16bit SW7 : bit1 = ON |
| 48 | * 0x0800_0000 user area - |
| 49 | * 0x1000_0000 NOR Flash ROM (MCP) 16bit SW7 : bit1 = OFF |
| 50 | * 0x1400_0000 Ether (LAN9220) 16bit |
| 51 | * 0x1600_0000 user area - cannot use with NAND |
| 52 | * 0x1800_0000 user area - |
| 53 | * 0x1A00_0000 - |
| 54 | * 0x4000_0000 LPDDR2-SDRAM (POP) 32bit |
| 55 | */ |
| 56 | |
| 57 | /* |
| 58 | * NOR Flash ROM |
| 59 | * |
| 60 | * SW1 | SW2 | SW7 | NOR Flash ROM |
| 61 | * bit1 | bit1 bit2 | bit1 | Memory allocation |
| 62 | * ------+------------+------+------------------ |
| 63 | * OFF | ON OFF | ON | Area 0 |
| 64 | * OFF | ON OFF | OFF | Area 4 |
| 65 | */ |
| 66 | |
| 67 | /* |
| 68 | * NAND Flash ROM |
| 69 | * |
| 70 | * SW1 | SW2 | SW7 | NAND Flash ROM |
| 71 | * bit1 | bit1 bit2 | bit2 | Memory allocation |
| 72 | * ------+------------+------+------------------ |
| 73 | * OFF | ON OFF | ON | FCE 0 |
| 74 | * OFF | ON OFF | OFF | FCE 1 |
| 75 | */ |
| 76 | |
| 77 | /* |
| 78 | * SMSC 9220 |
| 79 | * |
| 80 | * SW1 SMSC 9220 |
| 81 | * ----------------------- |
| 82 | * ON access disable |
| 83 | * OFF access enable |
| 84 | */ |
| 85 | |
Kuninori Morimoto | 17ccb83 | 2010-02-23 07:07:01 +0000 | [diff] [blame] | 86 | /* |
Kuninori Morimoto | dda128d | 2010-03-12 10:07:55 +0000 | [diff] [blame] | 87 | * LCD / IRQ / KEYSC / IrDA |
Kuninori Morimoto | 17ccb83 | 2010-02-23 07:07:01 +0000 | [diff] [blame] | 88 | * |
Kuninori Morimoto | dda128d | 2010-03-12 10:07:55 +0000 | [diff] [blame] | 89 | * IRQ = IRQ26 (TS), IRQ27 (VIO), IRQ28 (TouchScreen) |
| 90 | * LCD = 2nd LCDC |
| 91 | * |
| 92 | * | SW43 | |
| 93 | * SW3 | ON | OFF | |
| 94 | * -------------+-----------------------+---------------+ |
| 95 | * ON | KEY / IrDA | LCD | |
| 96 | * OFF | KEY / IrDA / IRQ | IRQ | |
Kuninori Morimoto | 17ccb83 | 2010-02-23 07:07:01 +0000 | [diff] [blame] | 97 | */ |
| 98 | |
Kuninori Morimoto | fb54d26 | 2010-04-13 06:16:32 +0000 | [diff] [blame] | 99 | /* |
| 100 | * USB |
| 101 | * |
| 102 | * J7 : 1-2 MAX3355E VBUS |
| 103 | * 2-3 DC 5.0V |
| 104 | * |
| 105 | * S39: bit2: off |
| 106 | */ |
| 107 | |
Kuninori Morimoto | 1b7e067 | 2010-02-17 09:30:14 +0000 | [diff] [blame] | 108 | /* MTD */ |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 109 | static struct mtd_partition nor_flash_partitions[] = { |
| 110 | { |
| 111 | .name = "loader", |
| 112 | .offset = 0x00000000, |
| 113 | .size = 512 * 1024, |
| 114 | }, |
| 115 | { |
| 116 | .name = "bootenv", |
| 117 | .offset = MTDPART_OFS_APPEND, |
| 118 | .size = 512 * 1024, |
| 119 | }, |
| 120 | { |
| 121 | .name = "kernel_ro", |
| 122 | .offset = MTDPART_OFS_APPEND, |
| 123 | .size = 8 * 1024 * 1024, |
| 124 | .mask_flags = MTD_WRITEABLE, |
| 125 | }, |
| 126 | { |
| 127 | .name = "kernel", |
| 128 | .offset = MTDPART_OFS_APPEND, |
| 129 | .size = 8 * 1024 * 1024, |
| 130 | }, |
| 131 | { |
| 132 | .name = "data", |
| 133 | .offset = MTDPART_OFS_APPEND, |
| 134 | .size = MTDPART_SIZ_FULL, |
| 135 | }, |
| 136 | }; |
| 137 | |
| 138 | static struct physmap_flash_data nor_flash_data = { |
| 139 | .width = 2, |
| 140 | .parts = nor_flash_partitions, |
| 141 | .nr_parts = ARRAY_SIZE(nor_flash_partitions), |
| 142 | }; |
| 143 | |
| 144 | static struct resource nor_flash_resources[] = { |
| 145 | [0] = { |
| 146 | .start = 0x00000000, |
| 147 | .end = 0x08000000 - 1, |
| 148 | .flags = IORESOURCE_MEM, |
| 149 | } |
| 150 | }; |
| 151 | |
| 152 | static struct platform_device nor_flash_device = { |
| 153 | .name = "physmap-flash", |
| 154 | .dev = { |
| 155 | .platform_data = &nor_flash_data, |
| 156 | }, |
| 157 | .num_resources = ARRAY_SIZE(nor_flash_resources), |
| 158 | .resource = nor_flash_resources, |
| 159 | }; |
| 160 | |
Kuninori Morimoto | 1b7e067 | 2010-02-17 09:30:14 +0000 | [diff] [blame] | 161 | /* SMSC 9220 */ |
| 162 | static struct resource smc911x_resources[] = { |
| 163 | { |
| 164 | .start = 0x14000000, |
| 165 | .end = 0x16000000 - 1, |
| 166 | .flags = IORESOURCE_MEM, |
| 167 | }, { |
| 168 | .start = 6, |
| 169 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
| 170 | }, |
| 171 | }; |
| 172 | |
| 173 | static struct smsc911x_platform_config smsc911x_info = { |
| 174 | .flags = SMSC911X_USE_16BIT | SMSC911X_SAVE_MAC_ADDRESS, |
| 175 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, |
| 176 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, |
| 177 | }; |
| 178 | |
| 179 | static struct platform_device smc911x_device = { |
| 180 | .name = "smsc911x", |
| 181 | .id = -1, |
| 182 | .num_resources = ARRAY_SIZE(smc911x_resources), |
| 183 | .resource = smc911x_resources, |
| 184 | .dev = { |
| 185 | .platform_data = &smsc911x_info, |
| 186 | }, |
| 187 | }; |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 188 | |
Kuninori Morimoto | 17ccb83 | 2010-02-23 07:07:01 +0000 | [diff] [blame] | 189 | /* KEYSC (Needs SW43 set to ON) */ |
| 190 | static struct sh_keysc_info keysc_info = { |
| 191 | .mode = SH_KEYSC_MODE_1, |
| 192 | .scan_timing = 3, |
| 193 | .delay = 2500, |
| 194 | .keycodes = { |
| 195 | KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, |
| 196 | KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, |
| 197 | KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, |
| 198 | KEY_F, KEY_G, KEY_H, KEY_I, KEY_J, |
| 199 | KEY_K, KEY_L, KEY_M, KEY_N, KEY_O, |
| 200 | }, |
| 201 | }; |
| 202 | |
| 203 | static struct resource keysc_resources[] = { |
| 204 | [0] = { |
| 205 | .name = "KEYSC", |
| 206 | .start = 0xe61b0000, |
| 207 | .end = 0xe61b0063, |
| 208 | .flags = IORESOURCE_MEM, |
| 209 | }, |
| 210 | [1] = { |
| 211 | .start = 79, |
| 212 | .flags = IORESOURCE_IRQ, |
| 213 | }, |
| 214 | }; |
| 215 | |
| 216 | static struct platform_device keysc_device = { |
| 217 | .name = "sh_keysc", |
| 218 | .id = 0, /* "keysc0" clock */ |
| 219 | .num_resources = ARRAY_SIZE(keysc_resources), |
| 220 | .resource = keysc_resources, |
| 221 | .dev = { |
| 222 | .platform_data = &keysc_info, |
| 223 | }, |
| 224 | }; |
| 225 | |
Magnus Damm | 3a14d03 | 2010-03-10 09:26:44 +0000 | [diff] [blame] | 226 | /* SDHI0 */ |
| 227 | static struct resource sdhi0_resources[] = { |
| 228 | [0] = { |
| 229 | .name = "SDHI0", |
| 230 | .start = 0xe6850000, |
| 231 | .end = 0xe68501ff, |
| 232 | .flags = IORESOURCE_MEM, |
| 233 | }, |
| 234 | [1] = { |
| 235 | .start = 96, |
| 236 | .flags = IORESOURCE_IRQ, |
| 237 | }, |
| 238 | }; |
| 239 | |
| 240 | static struct platform_device sdhi0_device = { |
| 241 | .name = "sh_mobile_sdhi", |
| 242 | .num_resources = ARRAY_SIZE(sdhi0_resources), |
| 243 | .resource = sdhi0_resources, |
| 244 | .id = 0, |
| 245 | }; |
| 246 | |
Kuninori Morimoto | fb54d26 | 2010-04-13 06:16:32 +0000 | [diff] [blame] | 247 | /* USB1 */ |
| 248 | void usb1_host_port_power(int port, int power) |
| 249 | { |
| 250 | if (!power) /* only power-on supported for now */ |
| 251 | return; |
| 252 | |
| 253 | /* set VBOUT/PWEN and EXTLP1 in DVSTCTR */ |
| 254 | __raw_writew(__raw_readw(0xE68B0008) | 0x600, 0xE68B0008); |
| 255 | } |
| 256 | |
| 257 | static struct r8a66597_platdata usb1_host_data = { |
| 258 | .on_chip = 1, |
| 259 | .port_power = usb1_host_port_power, |
| 260 | }; |
| 261 | |
| 262 | static struct resource usb1_host_resources[] = { |
| 263 | [0] = { |
| 264 | .name = "USBHS", |
| 265 | .start = 0xE68B0000, |
| 266 | .end = 0xE68B00E6 - 1, |
| 267 | .flags = IORESOURCE_MEM, |
| 268 | }, |
| 269 | [1] = { |
| 270 | .start = 215, |
| 271 | .end = 215, |
| 272 | .flags = IORESOURCE_IRQ, |
| 273 | }, |
| 274 | }; |
| 275 | |
| 276 | static struct platform_device usb1_host_device = { |
| 277 | .name = "r8a66597_hcd", |
| 278 | .id = 1, |
| 279 | .dev = { |
| 280 | .dma_mask = NULL, /* not use dma */ |
| 281 | .coherent_dma_mask = 0xffffffff, |
| 282 | .platform_data = &usb1_host_data, |
| 283 | }, |
| 284 | .num_resources = ARRAY_SIZE(usb1_host_resources), |
| 285 | .resource = usb1_host_resources, |
| 286 | }; |
| 287 | |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 288 | static struct platform_device *ap4evb_devices[] __initdata = { |
| 289 | &nor_flash_device, |
Kuninori Morimoto | 1b7e067 | 2010-02-17 09:30:14 +0000 | [diff] [blame] | 290 | &smc911x_device, |
Kuninori Morimoto | 17ccb83 | 2010-02-23 07:07:01 +0000 | [diff] [blame] | 291 | &keysc_device, |
Magnus Damm | 3a14d03 | 2010-03-10 09:26:44 +0000 | [diff] [blame] | 292 | &sdhi0_device, |
Kuninori Morimoto | fb54d26 | 2010-04-13 06:16:32 +0000 | [diff] [blame] | 293 | &usb1_host_device, |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 294 | }; |
| 295 | |
Kuninori Morimoto | dda128d | 2010-03-12 10:07:55 +0000 | [diff] [blame] | 296 | /* TouchScreen (Needs SW3 set to OFF) */ |
Kuninori Morimoto | 91cf508 | 2010-03-11 10:42:52 +0000 | [diff] [blame] | 297 | #define IRQ28 396 |
| 298 | struct tsc2007_platform_data tsc2007_info = { |
| 299 | .model = 2007, |
| 300 | .x_plate_ohms = 180, |
| 301 | }; |
| 302 | |
| 303 | /* I2C */ |
| 304 | static struct i2c_board_info i2c1_devices[] = { |
| 305 | { |
Kuninori Morimoto | 8fc883c | 2010-03-11 07:34:37 +0000 | [diff] [blame] | 306 | I2C_BOARD_INFO("r2025sd", 0x32), |
| 307 | }, |
| 308 | { |
Kuninori Morimoto | 91cf508 | 2010-03-11 10:42:52 +0000 | [diff] [blame] | 309 | I2C_BOARD_INFO("tsc2007", 0x48), |
| 310 | .type = "tsc2007", |
| 311 | .platform_data = &tsc2007_info, |
| 312 | .irq = IRQ28, |
| 313 | }, |
| 314 | }; |
| 315 | |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 316 | static struct map_desc ap4evb_io_desc[] __initdata = { |
| 317 | /* create a 1:1 entity map for 0xe6xxxxxx |
| 318 | * used by CPGA, INTC and PFC. |
| 319 | */ |
| 320 | { |
| 321 | .virtual = 0xe6000000, |
| 322 | .pfn = __phys_to_pfn(0xe6000000), |
| 323 | .length = 256 << 20, |
| 324 | .type = MT_DEVICE_NONSHARED |
| 325 | }, |
| 326 | }; |
| 327 | |
| 328 | static void __init ap4evb_map_io(void) |
| 329 | { |
| 330 | iotable_init(ap4evb_io_desc, ARRAY_SIZE(ap4evb_io_desc)); |
| 331 | |
Magnus Damm | 495b3ce | 2010-05-12 14:21:34 +0000 | [diff] [blame^] | 332 | /* setup early devices and console here as well */ |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 333 | sh7372_add_early_devices(); |
Magnus Damm | 4ae04ac | 2010-02-08 11:02:54 +0000 | [diff] [blame] | 334 | shmobile_setup_console(); |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 335 | } |
| 336 | |
| 337 | static void __init ap4evb_init(void) |
| 338 | { |
Kuninori Morimoto | 1b7e067 | 2010-02-17 09:30:14 +0000 | [diff] [blame] | 339 | sh7372_pinmux_init(); |
| 340 | |
Kuninori Morimoto | b228b48 | 2010-02-18 16:44:41 +0900 | [diff] [blame] | 341 | /* enable SCIFA0 */ |
| 342 | gpio_request(GPIO_FN_SCIFA0_TXD, NULL); |
| 343 | gpio_request(GPIO_FN_SCIFA0_RXD, NULL); |
| 344 | |
Kuninori Morimoto | 1b7e067 | 2010-02-17 09:30:14 +0000 | [diff] [blame] | 345 | /* enable SMSC911X */ |
| 346 | gpio_request(GPIO_FN_CS5A, NULL); |
| 347 | gpio_request(GPIO_FN_IRQ6_39, NULL); |
| 348 | |
Kuninori Morimoto | 5098280 | 2010-02-22 09:20:39 +0000 | [diff] [blame] | 349 | /* enable LED 1 - 4 */ |
| 350 | gpio_request(GPIO_PORT185, NULL); |
| 351 | gpio_request(GPIO_PORT186, NULL); |
| 352 | gpio_request(GPIO_PORT187, NULL); |
| 353 | gpio_request(GPIO_PORT188, NULL); |
| 354 | gpio_direction_output(GPIO_PORT185, 1); |
| 355 | gpio_direction_output(GPIO_PORT186, 1); |
| 356 | gpio_direction_output(GPIO_PORT187, 1); |
| 357 | gpio_direction_output(GPIO_PORT188, 1); |
| 358 | gpio_export(GPIO_PORT185, 0); |
| 359 | gpio_export(GPIO_PORT186, 0); |
| 360 | gpio_export(GPIO_PORT187, 0); |
| 361 | gpio_export(GPIO_PORT188, 0); |
| 362 | |
Kuninori Morimoto | 8cb3a2e | 2010-02-22 09:30:12 +0000 | [diff] [blame] | 363 | /* enable Debug switch (S6) */ |
| 364 | gpio_request(GPIO_PORT32, NULL); |
| 365 | gpio_request(GPIO_PORT33, NULL); |
| 366 | gpio_request(GPIO_PORT34, NULL); |
| 367 | gpio_request(GPIO_PORT35, NULL); |
| 368 | gpio_direction_input(GPIO_PORT32); |
| 369 | gpio_direction_input(GPIO_PORT33); |
| 370 | gpio_direction_input(GPIO_PORT34); |
| 371 | gpio_direction_input(GPIO_PORT35); |
| 372 | gpio_export(GPIO_PORT32, 0); |
| 373 | gpio_export(GPIO_PORT33, 0); |
| 374 | gpio_export(GPIO_PORT34, 0); |
| 375 | gpio_export(GPIO_PORT35, 0); |
| 376 | |
Kuninori Morimoto | 17ccb83 | 2010-02-23 07:07:01 +0000 | [diff] [blame] | 377 | /* enable KEYSC */ |
| 378 | gpio_request(GPIO_FN_KEYOUT0, NULL); |
| 379 | gpio_request(GPIO_FN_KEYOUT1, NULL); |
| 380 | gpio_request(GPIO_FN_KEYOUT2, NULL); |
| 381 | gpio_request(GPIO_FN_KEYOUT3, NULL); |
| 382 | gpio_request(GPIO_FN_KEYOUT4, NULL); |
| 383 | gpio_request(GPIO_FN_KEYIN0_136, NULL); |
| 384 | gpio_request(GPIO_FN_KEYIN1_135, NULL); |
| 385 | gpio_request(GPIO_FN_KEYIN2_134, NULL); |
| 386 | gpio_request(GPIO_FN_KEYIN3_133, NULL); |
| 387 | gpio_request(GPIO_FN_KEYIN4, NULL); |
| 388 | |
Magnus Damm | 3a14d03 | 2010-03-10 09:26:44 +0000 | [diff] [blame] | 389 | /* SDHI0 */ |
| 390 | gpio_request(GPIO_FN_SDHICD0, NULL); |
| 391 | gpio_request(GPIO_FN_SDHIWP0, NULL); |
| 392 | gpio_request(GPIO_FN_SDHICMD0, NULL); |
| 393 | gpio_request(GPIO_FN_SDHICLK0, NULL); |
| 394 | gpio_request(GPIO_FN_SDHID0_3, NULL); |
| 395 | gpio_request(GPIO_FN_SDHID0_2, NULL); |
| 396 | gpio_request(GPIO_FN_SDHID0_1, NULL); |
| 397 | gpio_request(GPIO_FN_SDHID0_0, NULL); |
| 398 | |
Kuninori Morimoto | 91cf508 | 2010-03-11 10:42:52 +0000 | [diff] [blame] | 399 | /* enable TouchScreen */ |
| 400 | gpio_request(GPIO_FN_IRQ28_123, NULL); |
| 401 | set_irq_type(IRQ28, IRQ_TYPE_LEVEL_LOW); |
| 402 | |
| 403 | i2c_register_board_info(1, i2c1_devices, |
| 404 | ARRAY_SIZE(i2c1_devices)); |
| 405 | |
Kuninori Morimoto | fb54d26 | 2010-04-13 06:16:32 +0000 | [diff] [blame] | 406 | /* USB enable */ |
| 407 | gpio_request(GPIO_FN_VBUS0_1, NULL); |
| 408 | gpio_request(GPIO_FN_IDIN_1_18, NULL); |
| 409 | gpio_request(GPIO_FN_PWEN_1_115, NULL); |
| 410 | gpio_request(GPIO_FN_OVCN_1_114, NULL); |
| 411 | gpio_request(GPIO_FN_EXTLP_1, NULL); |
| 412 | gpio_request(GPIO_FN_OVCN2_1, NULL); |
| 413 | |
| 414 | /* setup USB phy */ |
| 415 | __raw_writew(0x8a0a, 0xE6058130); /* USBCR2 */ |
| 416 | |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 417 | sh7372_add_standard_devices(); |
| 418 | |
| 419 | platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices)); |
| 420 | } |
| 421 | |
Magnus Damm | 495b3ce | 2010-05-12 14:21:34 +0000 | [diff] [blame^] | 422 | static void __init ap4evb_timer_init(void) |
| 423 | { |
| 424 | sh7372_clock_init(); |
| 425 | shmobile_timer.init(); |
| 426 | } |
| 427 | |
| 428 | static struct sys_timer ap4evb_timer = { |
| 429 | .init = ap4evb_timer_init, |
| 430 | }; |
| 431 | |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 432 | MACHINE_START(AP4EVB, "ap4evb") |
| 433 | .phys_io = 0xe6000000, |
| 434 | .io_pg_offst = ((0xe6000000) >> 18) & 0xfffc, |
| 435 | .map_io = ap4evb_map_io, |
| 436 | .init_irq = sh7372_init_irq, |
| 437 | .init_machine = ap4evb_init, |
Magnus Damm | 495b3ce | 2010-05-12 14:21:34 +0000 | [diff] [blame^] | 438 | .timer = &ap4evb_timer, |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 439 | MACHINE_END |