board-da850-evm.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  1. /*
  2. * TI DA850/OMAP-L138 EVM board
  3. *
  4. * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
  5. *
  6. * Derived from: arch/arm/mach-davinci/board-da830-evm.c
  7. * Original Copyrights follow:
  8. *
  9. * 2007, 2009 (c) MontaVista Software, Inc. This file is licensed under
  10. * the terms of the GNU General Public License version 2. This program
  11. * is licensed "as is" without any warranty of any kind, whether express
  12. * or implied.
  13. */
  14. #include <linux/kernel.h>
  15. #include <linux/module.h>
  16. #include <linux/init.h>
  17. #include <linux/console.h>
  18. #include <linux/i2c.h>
  19. #include <linux/i2c/at24.h>
  20. #include <linux/i2c/pca953x.h>
  21. #include <linux/gpio.h>
  22. #include <linux/platform_device.h>
  23. #include <linux/mtd/mtd.h>
  24. #include <linux/mtd/nand.h>
  25. #include <linux/mtd/partitions.h>
  26. #include <linux/mtd/physmap.h>
  27. #include <linux/regulator/machine.h>
  28. #include <asm/mach-types.h>
  29. #include <asm/mach/arch.h>
  30. #include <mach/common.h>
  31. #include <mach/irqs.h>
  32. #include <mach/cp_intc.h>
  33. #include <mach/da8xx.h>
  34. #include <mach/nand.h>
  35. #include <mach/mux.h>
  36. #define DA850_EVM_PHY_MASK 0x1
  37. #define DA850_EVM_MDIO_FREQUENCY 2200000 /* PHY bus frequency */
  38. #define DA850_LCD_PWR_PIN GPIO_TO_PIN(2, 8)
  39. #define DA850_LCD_BL_PIN GPIO_TO_PIN(2, 15)
  40. #define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0)
  41. #define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1)
  42. static struct mtd_partition da850_evm_norflash_partition[] = {
  43. {
  44. .name = "NOR filesystem",
  45. .offset = 0,
  46. .size = MTDPART_SIZ_FULL,
  47. .mask_flags = 0,
  48. },
  49. };
  50. static struct physmap_flash_data da850_evm_norflash_data = {
  51. .width = 2,
  52. .parts = da850_evm_norflash_partition,
  53. .nr_parts = ARRAY_SIZE(da850_evm_norflash_partition),
  54. };
  55. static struct resource da850_evm_norflash_resource[] = {
  56. {
  57. .start = DA8XX_AEMIF_CS2_BASE,
  58. .end = DA8XX_AEMIF_CS2_BASE + SZ_32M - 1,
  59. .flags = IORESOURCE_MEM,
  60. },
  61. };
  62. static struct platform_device da850_evm_norflash_device = {
  63. .name = "physmap-flash",
  64. .id = 0,
  65. .dev = {
  66. .platform_data = &da850_evm_norflash_data,
  67. },
  68. .num_resources = 1,
  69. .resource = da850_evm_norflash_resource,
  70. };
  71. /* DA850/OMAP-L138 EVM includes a 512 MByte large-page NAND flash
  72. * (128K blocks). It may be used instead of the (default) SPI flash
  73. * to boot, using TI's tools to install the secondary boot loader
  74. * (UBL) and U-Boot.
  75. */
  76. struct mtd_partition da850_evm_nandflash_partition[] = {
  77. {
  78. .name = "u-boot env",
  79. .offset = 0,
  80. .size = SZ_128K,
  81. .mask_flags = MTD_WRITEABLE,
  82. },
  83. {
  84. .name = "UBL",
  85. .offset = MTDPART_OFS_APPEND,
  86. .size = SZ_128K,
  87. .mask_flags = MTD_WRITEABLE,
  88. },
  89. {
  90. .name = "u-boot",
  91. .offset = MTDPART_OFS_APPEND,
  92. .size = 4 * SZ_128K,
  93. .mask_flags = MTD_WRITEABLE,
  94. },
  95. {
  96. .name = "kernel",
  97. .offset = 0x200000,
  98. .size = SZ_2M,
  99. .mask_flags = 0,
  100. },
  101. {
  102. .name = "filesystem",
  103. .offset = MTDPART_OFS_APPEND,
  104. .size = MTDPART_SIZ_FULL,
  105. .mask_flags = 0,
  106. },
  107. };
  108. static struct davinci_nand_pdata da850_evm_nandflash_data = {
  109. .parts = da850_evm_nandflash_partition,
  110. .nr_parts = ARRAY_SIZE(da850_evm_nandflash_partition),
  111. .ecc_mode = NAND_ECC_HW,
  112. .options = NAND_USE_FLASH_BBT,
  113. };
  114. static struct resource da850_evm_nandflash_resource[] = {
  115. {
  116. .start = DA8XX_AEMIF_CS3_BASE,
  117. .end = DA8XX_AEMIF_CS3_BASE + SZ_512K + 2 * SZ_1K - 1,
  118. .flags = IORESOURCE_MEM,
  119. },
  120. {
  121. .start = DA8XX_AEMIF_CTL_BASE,
  122. .end = DA8XX_AEMIF_CTL_BASE + SZ_32K - 1,
  123. .flags = IORESOURCE_MEM,
  124. },
  125. };
  126. static struct platform_device da850_evm_nandflash_device = {
  127. .name = "davinci_nand",
  128. .id = 1,
  129. .dev = {
  130. .platform_data = &da850_evm_nandflash_data,
  131. },
  132. .num_resources = ARRAY_SIZE(da850_evm_nandflash_resource),
  133. .resource = da850_evm_nandflash_resource,
  134. };
  135. static u32 ui_card_detected;
  136. static void da850_evm_setup_nor_nand(void);
  137. static int da850_evm_ui_expander_setup(struct i2c_client *client, unsigned gpio,
  138. unsigned ngpio, void *c)
  139. {
  140. int sel_a, sel_b, sel_c, ret;
  141. sel_a = gpio + 7;
  142. sel_b = gpio + 6;
  143. sel_c = gpio + 5;
  144. ret = gpio_request(sel_a, "sel_a");
  145. if (ret) {
  146. pr_warning("Cannot open UI expander pin %d\n", sel_a);
  147. goto exp_setup_sela_fail;
  148. }
  149. ret = gpio_request(sel_b, "sel_b");
  150. if (ret) {
  151. pr_warning("Cannot open UI expander pin %d\n", sel_b);
  152. goto exp_setup_selb_fail;
  153. }
  154. ret = gpio_request(sel_c, "sel_c");
  155. if (ret) {
  156. pr_warning("Cannot open UI expander pin %d\n", sel_c);
  157. goto exp_setup_selc_fail;
  158. }
  159. /* deselect all functionalities */
  160. gpio_direction_output(sel_a, 1);
  161. gpio_direction_output(sel_b, 1);
  162. gpio_direction_output(sel_c, 1);
  163. ui_card_detected = 1;
  164. pr_info("DA850/OMAP-L138 EVM UI card detected\n");
  165. da850_evm_setup_nor_nand();
  166. return 0;
  167. exp_setup_selc_fail:
  168. gpio_free(sel_b);
  169. exp_setup_selb_fail:
  170. gpio_free(sel_a);
  171. exp_setup_sela_fail:
  172. return ret;
  173. }
  174. static int da850_evm_ui_expander_teardown(struct i2c_client *client,
  175. unsigned gpio, unsigned ngpio, void *c)
  176. {
  177. /* deselect all functionalities */
  178. gpio_set_value(gpio + 5, 1);
  179. gpio_set_value(gpio + 6, 1);
  180. gpio_set_value(gpio + 7, 1);
  181. gpio_free(gpio + 5);
  182. gpio_free(gpio + 6);
  183. gpio_free(gpio + 7);
  184. return 0;
  185. }
  186. static struct pca953x_platform_data da850_evm_ui_expander_info = {
  187. .gpio_base = DAVINCI_N_GPIO,
  188. .setup = da850_evm_ui_expander_setup,
  189. .teardown = da850_evm_ui_expander_teardown,
  190. };
  191. static struct i2c_board_info __initdata da850_evm_i2c_devices[] = {
  192. {
  193. I2C_BOARD_INFO("tlv320aic3x", 0x18),
  194. },
  195. {
  196. I2C_BOARD_INFO("tca6416", 0x20),
  197. .platform_data = &da850_evm_ui_expander_info,
  198. },
  199. };
  200. static struct davinci_i2c_platform_data da850_evm_i2c_0_pdata = {
  201. .bus_freq = 100, /* kHz */
  202. .bus_delay = 0, /* usec */
  203. };
  204. static struct davinci_uart_config da850_evm_uart_config __initdata = {
  205. .enabled_uarts = 0x7,
  206. };
  207. static struct platform_device *da850_evm_devices[] __initdata = {
  208. &da850_evm_nandflash_device,
  209. &da850_evm_norflash_device,
  210. };
  211. /* davinci da850 evm audio machine driver */
  212. static u8 da850_iis_serializer_direction[] = {
  213. INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
  214. INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
  215. INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, TX_MODE,
  216. RX_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
  217. };
  218. static struct snd_platform_data da850_evm_snd_data = {
  219. .tx_dma_offset = 0x2000,
  220. .rx_dma_offset = 0x2000,
  221. .op_mode = DAVINCI_MCASP_IIS_MODE,
  222. .num_serializer = ARRAY_SIZE(da850_iis_serializer_direction),
  223. .tdm_slots = 2,
  224. .serial_dir = da850_iis_serializer_direction,
  225. .eventq_no = EVENTQ_1,
  226. .version = MCASP_VERSION_2,
  227. .txnumevt = 1,
  228. .rxnumevt = 1,
  229. };
  230. static int da850_evm_mmc_get_ro(int index)
  231. {
  232. return gpio_get_value(DA850_MMCSD_WP_PIN);
  233. }
  234. static int da850_evm_mmc_get_cd(int index)
  235. {
  236. return !gpio_get_value(DA850_MMCSD_CD_PIN);
  237. }
  238. static struct davinci_mmc_config da850_mmc_config = {
  239. .get_ro = da850_evm_mmc_get_ro,
  240. .get_cd = da850_evm_mmc_get_cd,
  241. .wires = 4,
  242. .version = MMC_CTLR_VERSION_2,
  243. };
  244. static int da850_lcd_hw_init(void)
  245. {
  246. int status;
  247. status = gpio_request(DA850_LCD_BL_PIN, "lcd bl\n");
  248. if (status < 0)
  249. return status;
  250. status = gpio_request(DA850_LCD_PWR_PIN, "lcd pwr\n");
  251. if (status < 0) {
  252. gpio_free(DA850_LCD_BL_PIN);
  253. return status;
  254. }
  255. gpio_direction_output(DA850_LCD_BL_PIN, 0);
  256. gpio_direction_output(DA850_LCD_PWR_PIN, 0);
  257. /* disable lcd backlight */
  258. gpio_set_value(DA850_LCD_BL_PIN, 0);
  259. /* disable lcd power */
  260. gpio_set_value(DA850_LCD_PWR_PIN, 0);
  261. /* enable lcd power */
  262. gpio_set_value(DA850_LCD_PWR_PIN, 1);
  263. /* enable lcd backlight */
  264. gpio_set_value(DA850_LCD_BL_PIN, 1);
  265. return 0;
  266. }
  267. #define DA8XX_AEMIF_CE2CFG_OFFSET 0x10
  268. #define DA8XX_AEMIF_ASIZE_16BIT 0x1
  269. static void __init da850_evm_init_nor(void)
  270. {
  271. void __iomem *aemif_addr;
  272. aemif_addr = ioremap(DA8XX_AEMIF_CTL_BASE, SZ_32K);
  273. /* Configure data bus width of CS2 to 16 bit */
  274. writel(readl(aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET) |
  275. DA8XX_AEMIF_ASIZE_16BIT,
  276. aemif_addr + DA8XX_AEMIF_CE2CFG_OFFSET);
  277. iounmap(aemif_addr);
  278. }
  279. /* TPS65070 voltage regulator support */
  280. /* 3.3V */
  281. struct regulator_consumer_supply tps65070_dcdc1_consumers[] = {
  282. {
  283. .supply = "usb0_vdda33",
  284. },
  285. {
  286. .supply = "usb1_vdda33",
  287. },
  288. };
  289. /* 3.3V or 1.8V */
  290. struct regulator_consumer_supply tps65070_dcdc2_consumers[] = {
  291. {
  292. .supply = "dvdd3318_a",
  293. },
  294. {
  295. .supply = "dvdd3318_b",
  296. },
  297. {
  298. .supply = "dvdd3318_c",
  299. },
  300. };
  301. /* 1.2V */
  302. struct regulator_consumer_supply tps65070_dcdc3_consumers[] = {
  303. {
  304. .supply = "cvdd",
  305. },
  306. };
  307. /* 1.8V LDO */
  308. struct regulator_consumer_supply tps65070_ldo1_consumers[] = {
  309. {
  310. .supply = "sata_vddr",
  311. },
  312. {
  313. .supply = "usb0_vdda18",
  314. },
  315. {
  316. .supply = "usb1_vdda18",
  317. },
  318. {
  319. .supply = "ddr_dvdd18",
  320. },
  321. };
  322. /* 1.2V LDO */
  323. struct regulator_consumer_supply tps65070_ldo2_consumers[] = {
  324. {
  325. .supply = "sata_vdd",
  326. },
  327. {
  328. .supply = "pll0_vdda",
  329. },
  330. {
  331. .supply = "pll1_vdda",
  332. },
  333. {
  334. .supply = "usbs_cvdd",
  335. },
  336. {
  337. .supply = "vddarnwa1",
  338. },
  339. };
  340. struct regulator_init_data tps65070_regulator_data[] = {
  341. /* dcdc1 */
  342. {
  343. .constraints = {
  344. .min_uV = 3150000,
  345. .max_uV = 3450000,
  346. .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
  347. REGULATOR_CHANGE_STATUS),
  348. .boot_on = 1,
  349. },
  350. .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc1_consumers),
  351. .consumer_supplies = tps65070_dcdc1_consumers,
  352. },
  353. /* dcdc2 */
  354. {
  355. .constraints = {
  356. .min_uV = 1710000,
  357. .max_uV = 3450000,
  358. .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
  359. REGULATOR_CHANGE_STATUS),
  360. .boot_on = 1,
  361. },
  362. .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc2_consumers),
  363. .consumer_supplies = tps65070_dcdc2_consumers,
  364. },
  365. /* dcdc3 */
  366. {
  367. .constraints = {
  368. .min_uV = 950000,
  369. .max_uV = 1320000,
  370. .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
  371. REGULATOR_CHANGE_STATUS),
  372. .boot_on = 1,
  373. },
  374. .num_consumer_supplies = ARRAY_SIZE(tps65070_dcdc3_consumers),
  375. .consumer_supplies = tps65070_dcdc3_consumers,
  376. },
  377. /* ldo1 */
  378. {
  379. .constraints = {
  380. .min_uV = 1710000,
  381. .max_uV = 1890000,
  382. .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
  383. REGULATOR_CHANGE_STATUS),
  384. .boot_on = 1,
  385. },
  386. .num_consumer_supplies = ARRAY_SIZE(tps65070_ldo1_consumers),
  387. .consumer_supplies = tps65070_ldo1_consumers,
  388. },
  389. /* ldo2 */
  390. {
  391. .constraints = {
  392. .min_uV = 1140000,
  393. .max_uV = 1320000,
  394. .valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
  395. REGULATOR_CHANGE_STATUS),
  396. .boot_on = 1,
  397. },
  398. .num_consumer_supplies = ARRAY_SIZE(tps65070_ldo2_consumers),
  399. .consumer_supplies = tps65070_ldo2_consumers,
  400. },
  401. };
  402. static struct i2c_board_info __initdata da850evm_tps65070_info[] = {
  403. {
  404. I2C_BOARD_INFO("tps6507x", 0x48),
  405. .platform_data = &tps65070_regulator_data[0],
  406. },
  407. };
  408. static int __init pmic_tps65070_init(void)
  409. {
  410. return i2c_register_board_info(1, da850evm_tps65070_info,
  411. ARRAY_SIZE(da850evm_tps65070_info));
  412. }
  413. #if defined(CONFIG_MMC_DAVINCI) || \
  414. defined(CONFIG_MMC_DAVINCI_MODULE)
  415. #define HAS_MMC 1
  416. #else
  417. #define HAS_MMC 0
  418. #endif
  419. static void da850_evm_setup_nor_nand(void)
  420. {
  421. int ret = 0;
  422. if (ui_card_detected & !HAS_MMC) {
  423. ret = da8xx_pinmux_setup(da850_nand_pins);
  424. if (ret)
  425. pr_warning("da850_evm_init: nand mux setup failed: "
  426. "%d\n", ret);
  427. ret = da8xx_pinmux_setup(da850_nor_pins);
  428. if (ret)
  429. pr_warning("da850_evm_init: nor mux setup failed: %d\n",
  430. ret);
  431. da850_evm_init_nor();
  432. platform_add_devices(da850_evm_devices,
  433. ARRAY_SIZE(da850_evm_devices));
  434. }
  435. }
  436. static const short da850_evm_lcdc_pins[] = {
  437. DA850_GPIO2_8, DA850_GPIO2_15,
  438. -1
  439. };
  440. static __init void da850_evm_init(void)
  441. {
  442. struct davinci_soc_info *soc_info = &davinci_soc_info;
  443. int ret;
  444. ret = pmic_tps65070_init();
  445. if (ret)
  446. pr_warning("da850_evm_init: TPS65070 PMIC init failed: %d\n",
  447. ret);
  448. ret = da8xx_register_edma();
  449. if (ret)
  450. pr_warning("da850_evm_init: edma registration failed: %d\n",
  451. ret);
  452. ret = da8xx_pinmux_setup(da850_i2c0_pins);
  453. if (ret)
  454. pr_warning("da850_evm_init: i2c0 mux setup failed: %d\n",
  455. ret);
  456. ret = da8xx_register_i2c(0, &da850_evm_i2c_0_pdata);
  457. if (ret)
  458. pr_warning("da850_evm_init: i2c0 registration failed: %d\n",
  459. ret);
  460. soc_info->emac_pdata->phy_mask = DA850_EVM_PHY_MASK;
  461. soc_info->emac_pdata->mdio_max_freq = DA850_EVM_MDIO_FREQUENCY;
  462. soc_info->emac_pdata->rmii_en = 0;
  463. ret = da8xx_pinmux_setup(da850_cpgmac_pins);
  464. if (ret)
  465. pr_warning("da850_evm_init: cpgmac mux setup failed: %d\n",
  466. ret);
  467. ret = da8xx_register_emac();
  468. if (ret)
  469. pr_warning("da850_evm_init: emac registration failed: %d\n",
  470. ret);
  471. ret = da8xx_register_watchdog();
  472. if (ret)
  473. pr_warning("da830_evm_init: watchdog registration failed: %d\n",
  474. ret);
  475. if (HAS_MMC) {
  476. ret = da8xx_pinmux_setup(da850_mmcsd0_pins);
  477. if (ret)
  478. pr_warning("da850_evm_init: mmcsd0 mux setup failed:"
  479. " %d\n", ret);
  480. ret = gpio_request(DA850_MMCSD_CD_PIN, "MMC CD\n");
  481. if (ret)
  482. pr_warning("da850_evm_init: can not open GPIO %d\n",
  483. DA850_MMCSD_CD_PIN);
  484. gpio_direction_input(DA850_MMCSD_CD_PIN);
  485. ret = gpio_request(DA850_MMCSD_WP_PIN, "MMC WP\n");
  486. if (ret)
  487. pr_warning("da850_evm_init: can not open GPIO %d\n",
  488. DA850_MMCSD_WP_PIN);
  489. gpio_direction_input(DA850_MMCSD_WP_PIN);
  490. ret = da8xx_register_mmcsd0(&da850_mmc_config);
  491. if (ret)
  492. pr_warning("da850_evm_init: mmcsd0 registration failed:"
  493. " %d\n", ret);
  494. }
  495. davinci_serial_init(&da850_evm_uart_config);
  496. i2c_register_board_info(1, da850_evm_i2c_devices,
  497. ARRAY_SIZE(da850_evm_i2c_devices));
  498. /*
  499. * shut down uart 0 and 1; they are not used on the board and
  500. * accessing them causes endless "too much work in irq53" messages
  501. * with arago fs
  502. */
  503. __raw_writel(0, IO_ADDRESS(DA8XX_UART1_BASE) + 0x30);
  504. __raw_writel(0, IO_ADDRESS(DA8XX_UART0_BASE) + 0x30);
  505. ret = da8xx_pinmux_setup(da850_mcasp_pins);
  506. if (ret)
  507. pr_warning("da850_evm_init: mcasp mux setup failed: %d\n",
  508. ret);
  509. da8xx_register_mcasp(0, &da850_evm_snd_data);
  510. ret = da8xx_pinmux_setup(da850_lcdcntl_pins);
  511. if (ret)
  512. pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n",
  513. ret);
  514. /* Handle board specific muxing for LCD here */
  515. ret = da8xx_pinmux_setup(da850_evm_lcdc_pins);
  516. if (ret)
  517. pr_warning("da850_evm_init: evm specific lcd mux setup "
  518. "failed: %d\n", ret);
  519. ret = da850_lcd_hw_init();
  520. if (ret)
  521. pr_warning("da850_evm_init: lcd initialization failed: %d\n",
  522. ret);
  523. ret = da8xx_register_lcdc(&sharp_lk043t1dg01_pdata);
  524. if (ret)
  525. pr_warning("da850_evm_init: lcdc registration failed: %d\n",
  526. ret);
  527. ret = da8xx_register_rtc();
  528. if (ret)
  529. pr_warning("da850_evm_init: rtc setup failed: %d\n", ret);
  530. ret = da850_register_cpufreq();
  531. if (ret)
  532. pr_warning("da850_evm_init: cpufreq registration failed: %d\n",
  533. ret);
  534. }
  535. #ifdef CONFIG_SERIAL_8250_CONSOLE
  536. static int __init da850_evm_console_init(void)
  537. {
  538. return add_preferred_console("ttyS", 2, "115200");
  539. }
  540. console_initcall(da850_evm_console_init);
  541. #endif
  542. static __init void da850_evm_irq_init(void)
  543. {
  544. struct davinci_soc_info *soc_info = &davinci_soc_info;
  545. cp_intc_init((void __iomem *)DA8XX_CP_INTC_VIRT, DA850_N_CP_INTC_IRQ,
  546. soc_info->intc_irq_prios);
  547. }
  548. static void __init da850_evm_map_io(void)
  549. {
  550. da850_init();
  551. }
  552. MACHINE_START(DAVINCI_DA850_EVM, "DaVinci DA850/OMAP-L138 EVM")
  553. .phys_io = IO_PHYS,
  554. .io_pg_offst = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
  555. .boot_params = (DA8XX_DDR_BASE + 0x100),
  556. .map_io = da850_evm_map_io,
  557. .init_irq = da850_evm_irq_init,
  558. .timer = &davinci_timer,
  559. .init_machine = da850_evm_init,
  560. MACHINE_END