board-ag5evm.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  1. /*
  2. * arch/arm/mach-shmobile/board-ag5evm.c
  3. *
  4. * Copyright (C) 2010 Takashi Yoshii <yoshii.takashi.zj@renesas.com>
  5. * Copyright (C) 2009 Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
  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. */
  21. #include <linux/kernel.h>
  22. #include <linux/init.h>
  23. #include <linux/interrupt.h>
  24. #include <linux/irq.h>
  25. #include <linux/platform_device.h>
  26. #include <linux/delay.h>
  27. #include <linux/io.h>
  28. #include <linux/dma-mapping.h>
  29. #include <linux/serial_sci.h>
  30. #include <linux/smsc911x.h>
  31. #include <linux/gpio.h>
  32. #include <linux/input.h>
  33. #include <linux/input/sh_keysc.h>
  34. #include <linux/mmc/host.h>
  35. #include <linux/mmc/sh_mmcif.h>
  36. #include <linux/mmc/sh_mobile_sdhi.h>
  37. #include <linux/mfd/tmio.h>
  38. #include <linux/sh_clk.h>
  39. #include <video/sh_mobile_lcdc.h>
  40. #include <video/sh_mipi_dsi.h>
  41. #include <sound/sh_fsi.h>
  42. #include <mach/hardware.h>
  43. #include <mach/sh73a0.h>
  44. #include <mach/common.h>
  45. #include <asm/mach-types.h>
  46. #include <asm/mach/arch.h>
  47. #include <asm/mach/map.h>
  48. #include <asm/mach/time.h>
  49. #include <asm/hardware/gic.h>
  50. #include <asm/hardware/cache-l2x0.h>
  51. #include <asm/traps.h>
  52. static struct resource smsc9220_resources[] = {
  53. [0] = {
  54. .start = 0x14000000,
  55. .end = 0x14000000 + SZ_64K - 1,
  56. .flags = IORESOURCE_MEM,
  57. },
  58. [1] = {
  59. .start = gic_spi(33), /* PINT1 */
  60. .flags = IORESOURCE_IRQ,
  61. },
  62. };
  63. static struct smsc911x_platform_config smsc9220_platdata = {
  64. .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS,
  65. .phy_interface = PHY_INTERFACE_MODE_MII,
  66. .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
  67. .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
  68. };
  69. static struct platform_device eth_device = {
  70. .name = "smsc911x",
  71. .id = 0,
  72. .dev = {
  73. .platform_data = &smsc9220_platdata,
  74. },
  75. .resource = smsc9220_resources,
  76. .num_resources = ARRAY_SIZE(smsc9220_resources),
  77. };
  78. static struct sh_keysc_info keysc_platdata = {
  79. .mode = SH_KEYSC_MODE_6,
  80. .scan_timing = 3,
  81. .delay = 100,
  82. .keycodes = {
  83. KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, KEY_F, KEY_G,
  84. KEY_H, KEY_I, KEY_J, KEY_K, KEY_L, KEY_M, KEY_N,
  85. KEY_O, KEY_P, KEY_Q, KEY_R, KEY_S, KEY_T, KEY_U,
  86. KEY_V, KEY_W, KEY_X, KEY_Y, KEY_Z, KEY_HOME, KEY_SLEEP,
  87. KEY_SPACE, KEY_9, KEY_6, KEY_3, KEY_WAKEUP, KEY_RIGHT, \
  88. KEY_COFFEE,
  89. KEY_0, KEY_8, KEY_5, KEY_2, KEY_DOWN, KEY_ENTER, KEY_UP,
  90. KEY_KPASTERISK, KEY_7, KEY_4, KEY_1, KEY_STOP, KEY_LEFT, \
  91. KEY_COMPUTER,
  92. },
  93. };
  94. static struct resource keysc_resources[] = {
  95. [0] = {
  96. .name = "KEYSC",
  97. .start = 0xe61b0000,
  98. .end = 0xe61b0098 - 1,
  99. .flags = IORESOURCE_MEM,
  100. },
  101. [1] = {
  102. .start = gic_spi(71),
  103. .flags = IORESOURCE_IRQ,
  104. },
  105. };
  106. static struct platform_device keysc_device = {
  107. .name = "sh_keysc",
  108. .id = 0,
  109. .num_resources = ARRAY_SIZE(keysc_resources),
  110. .resource = keysc_resources,
  111. .dev = {
  112. .platform_data = &keysc_platdata,
  113. },
  114. };
  115. /* FSI A */
  116. static struct resource fsi_resources[] = {
  117. [0] = {
  118. .name = "FSI",
  119. .start = 0xEC230000,
  120. .end = 0xEC230400 - 1,
  121. .flags = IORESOURCE_MEM,
  122. },
  123. [1] = {
  124. .start = gic_spi(146),
  125. .flags = IORESOURCE_IRQ,
  126. },
  127. };
  128. static struct platform_device fsi_device = {
  129. .name = "sh_fsi2",
  130. .id = -1,
  131. .num_resources = ARRAY_SIZE(fsi_resources),
  132. .resource = fsi_resources,
  133. };
  134. static struct resource sh_mmcif_resources[] = {
  135. [0] = {
  136. .name = "MMCIF",
  137. .start = 0xe6bd0000,
  138. .end = 0xe6bd00ff,
  139. .flags = IORESOURCE_MEM,
  140. },
  141. [1] = {
  142. .start = gic_spi(141),
  143. .flags = IORESOURCE_IRQ,
  144. },
  145. [2] = {
  146. .start = gic_spi(140),
  147. .flags = IORESOURCE_IRQ,
  148. },
  149. };
  150. static struct sh_mmcif_dma sh_mmcif_dma = {
  151. .chan_priv_rx = {
  152. .slave_id = SHDMA_SLAVE_MMCIF_RX,
  153. },
  154. .chan_priv_tx = {
  155. .slave_id = SHDMA_SLAVE_MMCIF_TX,
  156. },
  157. };
  158. static struct sh_mmcif_plat_data sh_mmcif_platdata = {
  159. .sup_pclk = 0,
  160. .ocr = MMC_VDD_165_195,
  161. .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
  162. .dma = &sh_mmcif_dma,
  163. };
  164. static struct platform_device mmc_device = {
  165. .name = "sh_mmcif",
  166. .id = 0,
  167. .dev = {
  168. .dma_mask = NULL,
  169. .coherent_dma_mask = 0xffffffff,
  170. .platform_data = &sh_mmcif_platdata,
  171. },
  172. .num_resources = ARRAY_SIZE(sh_mmcif_resources),
  173. .resource = sh_mmcif_resources,
  174. };
  175. /* IrDA */
  176. static struct resource irda_resources[] = {
  177. [0] = {
  178. .start = 0xE6D00000,
  179. .end = 0xE6D01FD4 - 1,
  180. .flags = IORESOURCE_MEM,
  181. },
  182. [1] = {
  183. .start = gic_spi(95),
  184. .flags = IORESOURCE_IRQ,
  185. },
  186. };
  187. static struct platform_device irda_device = {
  188. .name = "sh_irda",
  189. .id = 0,
  190. .resource = irda_resources,
  191. .num_resources = ARRAY_SIZE(irda_resources),
  192. };
  193. static unsigned char lcd_backlight_seq[3][2] = {
  194. { 0x04, 0x07 },
  195. { 0x23, 0x80 },
  196. { 0x03, 0x01 },
  197. };
  198. static void lcd_backlight_on(void)
  199. {
  200. struct i2c_adapter *a;
  201. struct i2c_msg msg;
  202. int k;
  203. a = i2c_get_adapter(1);
  204. for (k = 0; a && k < 3; k++) {
  205. msg.addr = 0x6d;
  206. msg.buf = &lcd_backlight_seq[k][0];
  207. msg.len = 2;
  208. msg.flags = 0;
  209. if (i2c_transfer(a, &msg, 1) != 1)
  210. break;
  211. }
  212. }
  213. static void lcd_backlight_reset(void)
  214. {
  215. gpio_set_value(GPIO_PORT235, 0);
  216. mdelay(24);
  217. gpio_set_value(GPIO_PORT235, 1);
  218. }
  219. static void lcd_on(void *board_data, struct fb_info *info)
  220. {
  221. lcd_backlight_on();
  222. }
  223. static void lcd_off(void *board_data)
  224. {
  225. lcd_backlight_reset();
  226. }
  227. /* LCDC0 */
  228. static const struct fb_videomode lcdc0_modes[] = {
  229. {
  230. .name = "R63302(QHD)",
  231. .xres = 544,
  232. .yres = 961,
  233. .left_margin = 72,
  234. .right_margin = 600,
  235. .hsync_len = 16,
  236. .upper_margin = 8,
  237. .lower_margin = 8,
  238. .vsync_len = 2,
  239. .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT,
  240. },
  241. };
  242. static struct sh_mobile_lcdc_info lcdc0_info = {
  243. .clock_source = LCDC_CLK_PERIPHERAL,
  244. .ch[0] = {
  245. .chan = LCDC_CHAN_MAINLCD,
  246. .interface_type = RGB24,
  247. .clock_divider = 1,
  248. .flags = LCDC_FLAGS_DWPOL,
  249. .lcd_size_cfg.width = 44,
  250. .lcd_size_cfg.height = 79,
  251. .bpp = 16,
  252. .lcd_cfg = lcdc0_modes,
  253. .num_cfg = ARRAY_SIZE(lcdc0_modes),
  254. .board_cfg = {
  255. .display_on = lcd_on,
  256. .display_off = lcd_off,
  257. },
  258. }
  259. };
  260. static struct resource lcdc0_resources[] = {
  261. [0] = {
  262. .name = "LCDC0",
  263. .start = 0xfe940000, /* P4-only space */
  264. .end = 0xfe943fff,
  265. .flags = IORESOURCE_MEM,
  266. },
  267. [1] = {
  268. .start = intcs_evt2irq(0x580),
  269. .flags = IORESOURCE_IRQ,
  270. },
  271. };
  272. static struct platform_device lcdc0_device = {
  273. .name = "sh_mobile_lcdc_fb",
  274. .num_resources = ARRAY_SIZE(lcdc0_resources),
  275. .resource = lcdc0_resources,
  276. .id = 0,
  277. .dev = {
  278. .platform_data = &lcdc0_info,
  279. .coherent_dma_mask = ~0,
  280. },
  281. };
  282. /* MIPI-DSI */
  283. static struct resource mipidsi0_resources[] = {
  284. [0] = {
  285. .name = "DSI0",
  286. .start = 0xfeab0000,
  287. .end = 0xfeab3fff,
  288. .flags = IORESOURCE_MEM,
  289. },
  290. [1] = {
  291. .name = "DSI0",
  292. .start = 0xfeab4000,
  293. .end = 0xfeab7fff,
  294. .flags = IORESOURCE_MEM,
  295. },
  296. };
  297. static struct sh_mipi_dsi_info mipidsi0_info = {
  298. .data_format = MIPI_RGB888,
  299. .lcd_chan = &lcdc0_info.ch[0],
  300. .vsynw_offset = 20,
  301. .clksrc = 1,
  302. .flags = SH_MIPI_DSI_HSABM,
  303. };
  304. static struct platform_device mipidsi0_device = {
  305. .name = "sh-mipi-dsi",
  306. .num_resources = ARRAY_SIZE(mipidsi0_resources),
  307. .resource = mipidsi0_resources,
  308. .id = 0,
  309. .dev = {
  310. .platform_data = &mipidsi0_info,
  311. },
  312. };
  313. static struct sh_mobile_sdhi_info sdhi0_info = {
  314. .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
  315. .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
  316. .tmio_caps = MMC_CAP_SD_HIGHSPEED,
  317. .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29,
  318. };
  319. static struct resource sdhi0_resources[] = {
  320. [0] = {
  321. .name = "SDHI0",
  322. .start = 0xee100000,
  323. .end = 0xee1000ff,
  324. .flags = IORESOURCE_MEM,
  325. },
  326. [1] = {
  327. .start = gic_spi(83),
  328. .flags = IORESOURCE_IRQ,
  329. },
  330. [2] = {
  331. .start = gic_spi(84),
  332. .flags = IORESOURCE_IRQ,
  333. },
  334. [3] = {
  335. .start = gic_spi(85),
  336. .flags = IORESOURCE_IRQ,
  337. },
  338. };
  339. static struct platform_device sdhi0_device = {
  340. .name = "sh_mobile_sdhi",
  341. .id = 0,
  342. .num_resources = ARRAY_SIZE(sdhi0_resources),
  343. .resource = sdhi0_resources,
  344. .dev = {
  345. .platform_data = &sdhi0_info,
  346. },
  347. };
  348. void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state)
  349. {
  350. gpio_set_value(GPIO_PORT114, state);
  351. }
  352. static struct sh_mobile_sdhi_info sh_sdhi1_info = {
  353. .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE,
  354. .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ,
  355. .tmio_ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
  356. .set_pwr = ag5evm_sdhi1_set_pwr,
  357. };
  358. static struct resource sdhi1_resources[] = {
  359. [0] = {
  360. .name = "SDHI1",
  361. .start = 0xee120000,
  362. .end = 0xee1200ff,
  363. .flags = IORESOURCE_MEM,
  364. },
  365. [1] = {
  366. .start = gic_spi(87),
  367. .flags = IORESOURCE_IRQ,
  368. },
  369. [2] = {
  370. .start = gic_spi(88),
  371. .flags = IORESOURCE_IRQ,
  372. },
  373. [3] = {
  374. .start = gic_spi(89),
  375. .flags = IORESOURCE_IRQ,
  376. },
  377. };
  378. static struct platform_device sdhi1_device = {
  379. .name = "sh_mobile_sdhi",
  380. .id = 1,
  381. .dev = {
  382. .platform_data = &sh_sdhi1_info,
  383. },
  384. .num_resources = ARRAY_SIZE(sdhi1_resources),
  385. .resource = sdhi1_resources,
  386. };
  387. static struct platform_device *ag5evm_devices[] __initdata = {
  388. &eth_device,
  389. &keysc_device,
  390. &fsi_device,
  391. &mmc_device,
  392. &irda_device,
  393. &lcdc0_device,
  394. &mipidsi0_device,
  395. &sdhi0_device,
  396. &sdhi1_device,
  397. };
  398. static struct map_desc ag5evm_io_desc[] __initdata = {
  399. /* create a 1:1 entity map for 0xe6xxxxxx
  400. * used by CPGA, INTC and PFC.
  401. */
  402. {
  403. .virtual = 0xe6000000,
  404. .pfn = __phys_to_pfn(0xe6000000),
  405. .length = 256 << 20,
  406. .type = MT_DEVICE_NONSHARED
  407. },
  408. };
  409. static void __init ag5evm_map_io(void)
  410. {
  411. iotable_init(ag5evm_io_desc, ARRAY_SIZE(ag5evm_io_desc));
  412. /* setup early devices and console here as well */
  413. sh73a0_add_early_devices();
  414. shmobile_setup_console();
  415. }
  416. #define PINTC_ADDR 0xe6900000
  417. #define PINTER0A (PINTC_ADDR + 0xa0)
  418. #define PINTCR0A (PINTC_ADDR + 0xb0)
  419. void __init ag5evm_init_irq(void)
  420. {
  421. sh73a0_init_irq();
  422. /* setup PINT: enable PINTA2 as active low */
  423. __raw_writel(__raw_readl(PINTER0A) | (1<<29), PINTER0A);
  424. __raw_writew(__raw_readw(PINTCR0A) | (2<<10), PINTCR0A);
  425. }
  426. #define DSI0PHYCR 0xe615006c
  427. static void __init ag5evm_init(void)
  428. {
  429. sh73a0_pinmux_init();
  430. /* enable SCIFA2 */
  431. gpio_request(GPIO_FN_SCIFA2_TXD1, NULL);
  432. gpio_request(GPIO_FN_SCIFA2_RXD1, NULL);
  433. gpio_request(GPIO_FN_SCIFA2_RTS1_, NULL);
  434. gpio_request(GPIO_FN_SCIFA2_CTS1_, NULL);
  435. /* enable KEYSC */
  436. gpio_request(GPIO_FN_KEYIN0_PU, NULL);
  437. gpio_request(GPIO_FN_KEYIN1_PU, NULL);
  438. gpio_request(GPIO_FN_KEYIN2_PU, NULL);
  439. gpio_request(GPIO_FN_KEYIN3_PU, NULL);
  440. gpio_request(GPIO_FN_KEYIN4_PU, NULL);
  441. gpio_request(GPIO_FN_KEYIN5_PU, NULL);
  442. gpio_request(GPIO_FN_KEYIN6_PU, NULL);
  443. gpio_request(GPIO_FN_KEYIN7_PU, NULL);
  444. gpio_request(GPIO_FN_KEYOUT0, NULL);
  445. gpio_request(GPIO_FN_KEYOUT1, NULL);
  446. gpio_request(GPIO_FN_KEYOUT2, NULL);
  447. gpio_request(GPIO_FN_KEYOUT3, NULL);
  448. gpio_request(GPIO_FN_KEYOUT4, NULL);
  449. gpio_request(GPIO_FN_KEYOUT5, NULL);
  450. gpio_request(GPIO_FN_PORT59_KEYOUT6, NULL);
  451. gpio_request(GPIO_FN_PORT58_KEYOUT7, NULL);
  452. gpio_request(GPIO_FN_KEYOUT8, NULL);
  453. gpio_request(GPIO_FN_PORT149_KEYOUT9, NULL);
  454. /* enable I2C channel 2 and 3 */
  455. gpio_request(GPIO_FN_PORT236_I2C_SDA2, NULL);
  456. gpio_request(GPIO_FN_PORT237_I2C_SCL2, NULL);
  457. gpio_request(GPIO_FN_PORT248_I2C_SCL3, NULL);
  458. gpio_request(GPIO_FN_PORT249_I2C_SDA3, NULL);
  459. /* enable MMCIF */
  460. gpio_request(GPIO_FN_MMCCLK0, NULL);
  461. gpio_request(GPIO_FN_MMCCMD0_PU, NULL);
  462. gpio_request(GPIO_FN_MMCD0_0, NULL);
  463. gpio_request(GPIO_FN_MMCD0_1, NULL);
  464. gpio_request(GPIO_FN_MMCD0_2, NULL);
  465. gpio_request(GPIO_FN_MMCD0_3, NULL);
  466. gpio_request(GPIO_FN_MMCD0_4, NULL);
  467. gpio_request(GPIO_FN_MMCD0_5, NULL);
  468. gpio_request(GPIO_FN_MMCD0_6, NULL);
  469. gpio_request(GPIO_FN_MMCD0_7, NULL);
  470. gpio_request(GPIO_PORT208, NULL); /* Reset */
  471. gpio_direction_output(GPIO_PORT208, 1);
  472. /* enable SMSC911X */
  473. gpio_request(GPIO_PORT144, NULL); /* PINTA2 */
  474. gpio_direction_input(GPIO_PORT144);
  475. gpio_request(GPIO_PORT145, NULL); /* RESET */
  476. gpio_direction_output(GPIO_PORT145, 1);
  477. /* FSI A */
  478. gpio_request(GPIO_FN_FSIACK, NULL);
  479. gpio_request(GPIO_FN_FSIAILR, NULL);
  480. gpio_request(GPIO_FN_FSIAIBT, NULL);
  481. gpio_request(GPIO_FN_FSIAISLD, NULL);
  482. gpio_request(GPIO_FN_FSIAOSLD, NULL);
  483. /* IrDA */
  484. gpio_request(GPIO_FN_PORT241_IRDA_OUT, NULL);
  485. gpio_request(GPIO_FN_PORT242_IRDA_IN, NULL);
  486. gpio_request(GPIO_FN_PORT243_IRDA_FIRSEL, NULL);
  487. /* LCD panel */
  488. gpio_request(GPIO_PORT217, NULL); /* RESET */
  489. gpio_direction_output(GPIO_PORT217, 0);
  490. mdelay(1);
  491. gpio_set_value(GPIO_PORT217, 1);
  492. mdelay(100);
  493. /* LCD backlight controller */
  494. gpio_request(GPIO_PORT235, NULL); /* RESET */
  495. gpio_direction_output(GPIO_PORT235, 0);
  496. lcd_backlight_reset();
  497. /* MIPI-DSI clock setup */
  498. __raw_writel(0x2a809010, DSI0PHYCR);
  499. /* enable SDHI0 on CN15 [SD I/F] */
  500. gpio_request(GPIO_FN_SDHICD0, NULL);
  501. gpio_request(GPIO_FN_SDHIWP0, NULL);
  502. gpio_request(GPIO_FN_SDHICMD0, NULL);
  503. gpio_request(GPIO_FN_SDHICLK0, NULL);
  504. gpio_request(GPIO_FN_SDHID0_3, NULL);
  505. gpio_request(GPIO_FN_SDHID0_2, NULL);
  506. gpio_request(GPIO_FN_SDHID0_1, NULL);
  507. gpio_request(GPIO_FN_SDHID0_0, NULL);
  508. /* enable SDHI1 on CN4 [WLAN I/F] */
  509. gpio_request(GPIO_FN_SDHICLK1, NULL);
  510. gpio_request(GPIO_FN_SDHICMD1_PU, NULL);
  511. gpio_request(GPIO_FN_SDHID1_3_PU, NULL);
  512. gpio_request(GPIO_FN_SDHID1_2_PU, NULL);
  513. gpio_request(GPIO_FN_SDHID1_1_PU, NULL);
  514. gpio_request(GPIO_FN_SDHID1_0_PU, NULL);
  515. gpio_request(GPIO_PORT114, "sdhi1_power");
  516. gpio_direction_output(GPIO_PORT114, 0);
  517. #ifdef CONFIG_CACHE_L2X0
  518. /* Shared attribute override enable, 64K*8way */
  519. l2x0_init(__io(0xf0100000), 0x00460000, 0xc2000fff);
  520. #endif
  521. sh73a0_add_standard_devices();
  522. platform_add_devices(ag5evm_devices, ARRAY_SIZE(ag5evm_devices));
  523. }
  524. static void __init ag5evm_timer_init(void)
  525. {
  526. sh73a0_clock_init();
  527. shmobile_timer.init();
  528. return;
  529. }
  530. struct sys_timer ag5evm_timer = {
  531. .init = ag5evm_timer_init,
  532. };
  533. MACHINE_START(AG5EVM, "ag5evm")
  534. .map_io = ag5evm_map_io,
  535. .init_irq = ag5evm_init_irq,
  536. .handle_irq = shmobile_handle_irq_gic,
  537. .init_machine = ag5evm_init,
  538. .timer = &ag5evm_timer,
  539. MACHINE_END