board-kota2.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. /*
  2. * kota2 board support
  3. *
  4. * Copyright (C) 2011 Renesas Solutions Corp.
  5. * Copyright (C) 2011 Magnus Damm
  6. * Copyright (C) 2010 Takashi Yoshii <yoshii.takashi.zj@renesas.com>
  7. * Copyright (C) 2009 Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
  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 as published by
  11. * the Free Software Foundation; version 2 of the License.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  21. */
  22. #include <linux/kernel.h>
  23. #include <linux/init.h>
  24. #include <linux/interrupt.h>
  25. #include <linux/irq.h>
  26. #include <linux/platform_device.h>
  27. #include <linux/delay.h>
  28. #include <linux/io.h>
  29. #include <linux/regulator/fixed.h>
  30. #include <linux/regulator/machine.h>
  31. #include <linux/smsc911x.h>
  32. #include <linux/gpio.h>
  33. #include <linux/input.h>
  34. #include <linux/input/sh_keysc.h>
  35. #include <linux/gpio_keys.h>
  36. #include <linux/leds.h>
  37. #include <linux/irqchip/arm-gic.h>
  38. #include <linux/platform_data/leds-renesas-tpu.h>
  39. #include <linux/mmc/host.h>
  40. #include <linux/mmc/sh_mmcif.h>
  41. #include <linux/mfd/tmio.h>
  42. #include <linux/mmc/sh_mobile_sdhi.h>
  43. #include <mach/hardware.h>
  44. #include <mach/irqs.h>
  45. #include <mach/sh73a0.h>
  46. #include <mach/common.h>
  47. #include <asm/mach-types.h>
  48. #include <asm/mach/arch.h>
  49. #include <asm/mach/time.h>
  50. #include <asm/hardware/cache-l2x0.h>
  51. #include <asm/traps.h>
  52. /* Dummy supplies, where voltage doesn't matter */
  53. static struct regulator_consumer_supply dummy_supplies[] = {
  54. REGULATOR_SUPPLY("vddvario", "smsc911x"),
  55. REGULATOR_SUPPLY("vdd33a", "smsc911x"),
  56. };
  57. /* SMSC 9220 */
  58. static struct resource smsc9220_resources[] = {
  59. [0] = {
  60. .start = 0x14000000, /* CS5A */
  61. .end = 0x140000ff, /* A1->A7 */
  62. .flags = IORESOURCE_MEM,
  63. },
  64. [1] = {
  65. .start = SH73A0_PINT0_IRQ(2), /* PINTA2 */
  66. .flags = IORESOURCE_IRQ,
  67. },
  68. };
  69. static struct smsc911x_platform_config smsc9220_platdata = {
  70. .flags = SMSC911X_USE_32BIT, /* 32-bit SW on 16-bit HW bus */
  71. .phy_interface = PHY_INTERFACE_MODE_MII,
  72. .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
  73. .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
  74. };
  75. static struct platform_device eth_device = {
  76. .name = "smsc911x",
  77. .id = 0,
  78. .dev = {
  79. .platform_data = &smsc9220_platdata,
  80. },
  81. .resource = smsc9220_resources,
  82. .num_resources = ARRAY_SIZE(smsc9220_resources),
  83. };
  84. /* KEYSC */
  85. static struct sh_keysc_info keysc_platdata = {
  86. .mode = SH_KEYSC_MODE_6,
  87. .scan_timing = 3,
  88. .delay = 100,
  89. .keycodes = {
  90. KEY_NUMERIC_STAR, KEY_NUMERIC_0, KEY_NUMERIC_POUND,
  91. 0, 0, 0, 0, 0,
  92. KEY_NUMERIC_7, KEY_NUMERIC_8, KEY_NUMERIC_9,
  93. 0, KEY_DOWN, 0, 0, 0,
  94. KEY_NUMERIC_4, KEY_NUMERIC_5, KEY_NUMERIC_6,
  95. KEY_LEFT, KEY_ENTER, KEY_RIGHT, 0, 0,
  96. KEY_NUMERIC_1, KEY_NUMERIC_2, KEY_NUMERIC_3,
  97. 0, KEY_UP, 0, 0, 0,
  98. 0, 0, 0, 0, 0, 0, 0, 0,
  99. 0, 0, 0, 0, 0, 0, 0, 0,
  100. 0, 0, 0, 0, 0, 0, 0, 0,
  101. 0, 0, 0, 0, 0, 0, 0, 0,
  102. },
  103. };
  104. static struct resource keysc_resources[] = {
  105. [0] = {
  106. .name = "KEYSC",
  107. .start = 0xe61b0000,
  108. .end = 0xe61b0098 - 1,
  109. .flags = IORESOURCE_MEM,
  110. },
  111. [1] = {
  112. .start = gic_spi(71),
  113. .flags = IORESOURCE_IRQ,
  114. },
  115. };
  116. static struct platform_device keysc_device = {
  117. .name = "sh_keysc",
  118. .id = 0,
  119. .num_resources = ARRAY_SIZE(keysc_resources),
  120. .resource = keysc_resources,
  121. .dev = {
  122. .platform_data = &keysc_platdata,
  123. },
  124. };
  125. /* GPIO KEY */
  126. #define GPIO_KEY(c, g, d) { .code = c, .gpio = g, .desc = d, .active_low = 1 }
  127. static struct gpio_keys_button gpio_buttons[] = {
  128. GPIO_KEY(KEY_VOLUMEUP, GPIO_PORT56, "+"), /* S2: VOL+ [IRQ9] */
  129. GPIO_KEY(KEY_VOLUMEDOWN, GPIO_PORT54, "-"), /* S3: VOL- [IRQ10] */
  130. GPIO_KEY(KEY_MENU, GPIO_PORT27, "Menu"), /* S4: MENU [IRQ30] */
  131. GPIO_KEY(KEY_HOMEPAGE, GPIO_PORT26, "Home"), /* S5: HOME [IRQ31] */
  132. GPIO_KEY(KEY_BACK, GPIO_PORT11, "Back"), /* S6: BACK [IRQ0] */
  133. GPIO_KEY(KEY_PHONE, GPIO_PORT238, "Tel"), /* S7: TEL [IRQ11] */
  134. GPIO_KEY(KEY_POWER, GPIO_PORT239, "C1"), /* S8: CAM [IRQ13] */
  135. GPIO_KEY(KEY_MAIL, GPIO_PORT224, "Mail"), /* S9: MAIL [IRQ3] */
  136. /* Omitted button "C3?": GPIO_PORT223 - S10: CUST [IRQ8] */
  137. GPIO_KEY(KEY_CAMERA, GPIO_PORT164, "C2"), /* S11: CAM_HALF [IRQ25] */
  138. /* Omitted button "?": GPIO_PORT152 - S12: CAM_FULL [No IRQ] */
  139. };
  140. static struct gpio_keys_platform_data gpio_key_info = {
  141. .buttons = gpio_buttons,
  142. .nbuttons = ARRAY_SIZE(gpio_buttons),
  143. };
  144. static struct platform_device gpio_keys_device = {
  145. .name = "gpio-keys",
  146. .id = -1,
  147. .dev = {
  148. .platform_data = &gpio_key_info,
  149. },
  150. };
  151. /* GPIO LED */
  152. #define GPIO_LED(n, g) { .name = n, .gpio = g }
  153. static struct gpio_led gpio_leds[] = {
  154. GPIO_LED("G", GPIO_PORT20), /* PORT20 [GPO0] -> LED7 -> "G" */
  155. GPIO_LED("H", GPIO_PORT21), /* PORT21 [GPO1] -> LED8 -> "H" */
  156. GPIO_LED("J", GPIO_PORT22), /* PORT22 [GPO2] -> LED9 -> "J" */
  157. };
  158. static struct gpio_led_platform_data gpio_leds_info = {
  159. .leds = gpio_leds,
  160. .num_leds = ARRAY_SIZE(gpio_leds),
  161. };
  162. static struct platform_device gpio_leds_device = {
  163. .name = "leds-gpio",
  164. .id = -1,
  165. .dev = {
  166. .platform_data = &gpio_leds_info,
  167. },
  168. };
  169. /* TPU LED */
  170. static struct led_renesas_tpu_config led_renesas_tpu12_pdata = {
  171. .name = "V2513",
  172. .pin_gpio_fn = GPIO_FN_TPU1TO2,
  173. .pin_gpio = GPIO_PORT153,
  174. .channel_offset = 0x90,
  175. .timer_bit = 2,
  176. .max_brightness = 1000,
  177. };
  178. static struct resource tpu12_resources[] = {
  179. [0] = {
  180. .name = "TPU12",
  181. .start = 0xe6610090,
  182. .end = 0xe66100b5,
  183. .flags = IORESOURCE_MEM,
  184. },
  185. };
  186. static struct platform_device leds_tpu12_device = {
  187. .name = "leds-renesas-tpu",
  188. .id = 12,
  189. .dev = {
  190. .platform_data = &led_renesas_tpu12_pdata,
  191. },
  192. .num_resources = ARRAY_SIZE(tpu12_resources),
  193. .resource = tpu12_resources,
  194. };
  195. static struct led_renesas_tpu_config led_renesas_tpu41_pdata = {
  196. .name = "V2514",
  197. .pin_gpio_fn = GPIO_FN_TPU4TO1,
  198. .pin_gpio = GPIO_PORT199,
  199. .channel_offset = 0x50,
  200. .timer_bit = 1,
  201. .max_brightness = 1000,
  202. };
  203. static struct resource tpu41_resources[] = {
  204. [0] = {
  205. .name = "TPU41",
  206. .start = 0xe6640050,
  207. .end = 0xe6640075,
  208. .flags = IORESOURCE_MEM,
  209. },
  210. };
  211. static struct platform_device leds_tpu41_device = {
  212. .name = "leds-renesas-tpu",
  213. .id = 41,
  214. .dev = {
  215. .platform_data = &led_renesas_tpu41_pdata,
  216. },
  217. .num_resources = ARRAY_SIZE(tpu41_resources),
  218. .resource = tpu41_resources,
  219. };
  220. static struct led_renesas_tpu_config led_renesas_tpu21_pdata = {
  221. .name = "V2515",
  222. .pin_gpio_fn = GPIO_FN_TPU2TO1,
  223. .pin_gpio = GPIO_PORT197,
  224. .channel_offset = 0x50,
  225. .timer_bit = 1,
  226. .max_brightness = 1000,
  227. };
  228. static struct resource tpu21_resources[] = {
  229. [0] = {
  230. .name = "TPU21",
  231. .start = 0xe6620050,
  232. .end = 0xe6620075,
  233. .flags = IORESOURCE_MEM,
  234. },
  235. };
  236. static struct platform_device leds_tpu21_device = {
  237. .name = "leds-renesas-tpu",
  238. .id = 21,
  239. .dev = {
  240. .platform_data = &led_renesas_tpu21_pdata,
  241. },
  242. .num_resources = ARRAY_SIZE(tpu21_resources),
  243. .resource = tpu21_resources,
  244. };
  245. static struct led_renesas_tpu_config led_renesas_tpu30_pdata = {
  246. .name = "KEYLED",
  247. .pin_gpio_fn = GPIO_FN_TPU3TO0,
  248. .pin_gpio = GPIO_PORT163,
  249. .channel_offset = 0x10,
  250. .timer_bit = 0,
  251. .max_brightness = 1000,
  252. };
  253. static struct resource tpu30_resources[] = {
  254. [0] = {
  255. .name = "TPU30",
  256. .start = 0xe6630010,
  257. .end = 0xe6630035,
  258. .flags = IORESOURCE_MEM,
  259. },
  260. };
  261. static struct platform_device leds_tpu30_device = {
  262. .name = "leds-renesas-tpu",
  263. .id = 30,
  264. .dev = {
  265. .platform_data = &led_renesas_tpu30_pdata,
  266. },
  267. .num_resources = ARRAY_SIZE(tpu30_resources),
  268. .resource = tpu30_resources,
  269. };
  270. /* Fixed 1.8V regulator to be used by MMCIF */
  271. static struct regulator_consumer_supply fixed1v8_power_consumers[] =
  272. {
  273. REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
  274. REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"),
  275. };
  276. /* MMCIF */
  277. static struct resource mmcif_resources[] = {
  278. [0] = {
  279. .name = "MMCIF",
  280. .start = 0xe6bd0000,
  281. .end = 0xe6bd00ff,
  282. .flags = IORESOURCE_MEM,
  283. },
  284. [1] = {
  285. .start = gic_spi(140),
  286. .flags = IORESOURCE_IRQ,
  287. },
  288. [2] = {
  289. .start = gic_spi(141),
  290. .flags = IORESOURCE_IRQ,
  291. },
  292. };
  293. static struct sh_mmcif_plat_data mmcif_info = {
  294. .ocr = MMC_VDD_165_195,
  295. .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
  296. };
  297. static struct platform_device mmcif_device = {
  298. .name = "sh_mmcif",
  299. .id = 0,
  300. .dev = {
  301. .platform_data = &mmcif_info,
  302. },
  303. .num_resources = ARRAY_SIZE(mmcif_resources),
  304. .resource = mmcif_resources,
  305. };
  306. /* Fixed 3.3V regulator to be used by SDHI0 and SDHI1 */
  307. static struct regulator_consumer_supply fixed3v3_power_consumers[] =
  308. {
  309. REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
  310. REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
  311. REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
  312. REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
  313. };
  314. /* SDHI0 */
  315. static struct sh_mobile_sdhi_info sdhi0_info = {
  316. .tmio_caps = MMC_CAP_SD_HIGHSPEED,
  317. .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT,
  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. /* SDHI1 */
  349. static struct sh_mobile_sdhi_info sdhi1_info = {
  350. .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ,
  351. .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT,
  352. };
  353. static struct resource sdhi1_resources[] = {
  354. [0] = {
  355. .name = "SDHI1",
  356. .start = 0xee120000,
  357. .end = 0xee1200ff,
  358. .flags = IORESOURCE_MEM,
  359. },
  360. [1] = {
  361. .start = gic_spi(87),
  362. .flags = IORESOURCE_IRQ,
  363. },
  364. [2] = {
  365. .start = gic_spi(88),
  366. .flags = IORESOURCE_IRQ,
  367. },
  368. [3] = {
  369. .start = gic_spi(89),
  370. .flags = IORESOURCE_IRQ,
  371. },
  372. };
  373. static struct platform_device sdhi1_device = {
  374. .name = "sh_mobile_sdhi",
  375. .id = 1,
  376. .num_resources = ARRAY_SIZE(sdhi1_resources),
  377. .resource = sdhi1_resources,
  378. .dev = {
  379. .platform_data = &sdhi1_info,
  380. },
  381. };
  382. static struct platform_device *kota2_devices[] __initdata = {
  383. &eth_device,
  384. &keysc_device,
  385. &gpio_keys_device,
  386. &gpio_leds_device,
  387. &leds_tpu12_device,
  388. &leds_tpu41_device,
  389. &leds_tpu21_device,
  390. &leds_tpu30_device,
  391. &mmcif_device,
  392. &sdhi0_device,
  393. &sdhi1_device,
  394. };
  395. static void __init kota2_init(void)
  396. {
  397. regulator_register_always_on(0, "fixed-1.8V", fixed1v8_power_consumers,
  398. ARRAY_SIZE(fixed1v8_power_consumers), 1800000);
  399. regulator_register_always_on(1, "fixed-3.3V", fixed3v3_power_consumers,
  400. ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
  401. regulator_register_fixed(2, dummy_supplies, ARRAY_SIZE(dummy_supplies));
  402. sh73a0_pinmux_init();
  403. /* SCIFA2 (UART2) */
  404. gpio_request(GPIO_FN_SCIFA2_TXD1, NULL);
  405. gpio_request(GPIO_FN_SCIFA2_RXD1, NULL);
  406. gpio_request(GPIO_FN_SCIFA2_RTS1_, NULL);
  407. gpio_request(GPIO_FN_SCIFA2_CTS1_, NULL);
  408. /* SCIFA4 (UART1) */
  409. gpio_request(GPIO_FN_SCIFA4_TXD, NULL);
  410. gpio_request(GPIO_FN_SCIFA4_RXD, NULL);
  411. gpio_request(GPIO_FN_SCIFA4_RTS_, NULL);
  412. gpio_request(GPIO_FN_SCIFA4_CTS_, NULL);
  413. /* SMSC911X */
  414. gpio_request(GPIO_FN_D0_NAF0, NULL);
  415. gpio_request(GPIO_FN_D1_NAF1, NULL);
  416. gpio_request(GPIO_FN_D2_NAF2, NULL);
  417. gpio_request(GPIO_FN_D3_NAF3, NULL);
  418. gpio_request(GPIO_FN_D4_NAF4, NULL);
  419. gpio_request(GPIO_FN_D5_NAF5, NULL);
  420. gpio_request(GPIO_FN_D6_NAF6, NULL);
  421. gpio_request(GPIO_FN_D7_NAF7, NULL);
  422. gpio_request(GPIO_FN_D8_NAF8, NULL);
  423. gpio_request(GPIO_FN_D9_NAF9, NULL);
  424. gpio_request(GPIO_FN_D10_NAF10, NULL);
  425. gpio_request(GPIO_FN_D11_NAF11, NULL);
  426. gpio_request(GPIO_FN_D12_NAF12, NULL);
  427. gpio_request(GPIO_FN_D13_NAF13, NULL);
  428. gpio_request(GPIO_FN_D14_NAF14, NULL);
  429. gpio_request(GPIO_FN_D15_NAF15, NULL);
  430. gpio_request(GPIO_FN_CS5A_, NULL);
  431. gpio_request(GPIO_FN_WE0__FWE, NULL);
  432. gpio_request_one(GPIO_PORT144, GPIOF_IN, NULL); /* PINTA2 */
  433. gpio_request_one(GPIO_PORT145, GPIOF_OUT_INIT_HIGH, NULL); /* RESET */
  434. /* KEYSC */
  435. gpio_request(GPIO_FN_KEYIN0_PU, NULL);
  436. gpio_request(GPIO_FN_KEYIN1_PU, NULL);
  437. gpio_request(GPIO_FN_KEYIN2_PU, NULL);
  438. gpio_request(GPIO_FN_KEYIN3_PU, NULL);
  439. gpio_request(GPIO_FN_KEYIN4_PU, NULL);
  440. gpio_request(GPIO_FN_KEYIN5_PU, NULL);
  441. gpio_request(GPIO_FN_KEYIN6_PU, NULL);
  442. gpio_request(GPIO_FN_KEYIN7_PU, NULL);
  443. gpio_request(GPIO_FN_KEYOUT0, NULL);
  444. gpio_request(GPIO_FN_KEYOUT1, NULL);
  445. gpio_request(GPIO_FN_KEYOUT2, NULL);
  446. gpio_request(GPIO_FN_KEYOUT3, NULL);
  447. gpio_request(GPIO_FN_KEYOUT4, NULL);
  448. gpio_request(GPIO_FN_KEYOUT5, NULL);
  449. gpio_request(GPIO_FN_PORT59_KEYOUT6, NULL);
  450. gpio_request(GPIO_FN_PORT58_KEYOUT7, NULL);
  451. gpio_request(GPIO_FN_KEYOUT8, NULL);
  452. /* MMCIF */
  453. gpio_request(GPIO_FN_MMCCLK0, NULL);
  454. gpio_request(GPIO_FN_MMCD0_0, NULL);
  455. gpio_request(GPIO_FN_MMCD0_1, NULL);
  456. gpio_request(GPIO_FN_MMCD0_2, NULL);
  457. gpio_request(GPIO_FN_MMCD0_3, NULL);
  458. gpio_request(GPIO_FN_MMCD0_4, NULL);
  459. gpio_request(GPIO_FN_MMCD0_5, NULL);
  460. gpio_request(GPIO_FN_MMCD0_6, NULL);
  461. gpio_request(GPIO_FN_MMCD0_7, NULL);
  462. gpio_request(GPIO_FN_MMCCMD0, NULL);
  463. gpio_request_one(GPIO_PORT208, GPIOF_OUT_INIT_HIGH, NULL); /* Reset */
  464. /* SDHI0 (microSD) */
  465. gpio_request(GPIO_FN_SDHICD0_PU, NULL);
  466. gpio_request(GPIO_FN_SDHICMD0_PU, NULL);
  467. gpio_request(GPIO_FN_SDHICLK0, NULL);
  468. gpio_request(GPIO_FN_SDHID0_3_PU, NULL);
  469. gpio_request(GPIO_FN_SDHID0_2_PU, NULL);
  470. gpio_request(GPIO_FN_SDHID0_1_PU, NULL);
  471. gpio_request(GPIO_FN_SDHID0_0_PU, NULL);
  472. /* SCIFB (BT) */
  473. gpio_request(GPIO_FN_PORT159_SCIFB_SCK, NULL);
  474. gpio_request(GPIO_FN_PORT160_SCIFB_TXD, NULL);
  475. gpio_request(GPIO_FN_PORT161_SCIFB_CTS_, NULL);
  476. gpio_request(GPIO_FN_PORT162_SCIFB_RXD, NULL);
  477. gpio_request(GPIO_FN_PORT163_SCIFB_RTS_, NULL);
  478. /* SDHI1 (BCM4330) */
  479. gpio_request(GPIO_FN_SDHICLK1, NULL);
  480. gpio_request(GPIO_FN_SDHICMD1_PU, NULL);
  481. gpio_request(GPIO_FN_SDHID1_3_PU, NULL);
  482. gpio_request(GPIO_FN_SDHID1_2_PU, NULL);
  483. gpio_request(GPIO_FN_SDHID1_1_PU, NULL);
  484. gpio_request(GPIO_FN_SDHID1_0_PU, NULL);
  485. #ifdef CONFIG_CACHE_L2X0
  486. /* Early BRESP enable, Shared attribute override enable, 64K*8way */
  487. l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff);
  488. #endif
  489. sh73a0_add_standard_devices();
  490. platform_add_devices(kota2_devices, ARRAY_SIZE(kota2_devices));
  491. }
  492. MACHINE_START(KOTA2, "kota2")
  493. .smp = smp_ops(sh73a0_smp_ops),
  494. .map_io = sh73a0_map_io,
  495. .init_early = sh73a0_add_early_devices,
  496. .nr_irqs = NR_IRQS_LEGACY,
  497. .init_irq = sh73a0_init_irq,
  498. .init_machine = kota2_init,
  499. .init_late = shmobile_init_late,
  500. .init_time = sh73a0_earlytimer_init,
  501. MACHINE_END