setup-sh7786.c 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056
  1. /*
  2. * SH7786 Setup
  3. *
  4. * Copyright (C) 2009 - 2011 Renesas Solutions Corp.
  5. * Kuninori Morimoto <morimoto.kuninori@renesas.com>
  6. * Paul Mundt <paul.mundt@renesas.com>
  7. *
  8. * Based on SH7785 Setup
  9. *
  10. * Copyright (C) 2007 Paul Mundt
  11. *
  12. * This file is subject to the terms and conditions of the GNU General Public
  13. * License. See the file "COPYING" in the main directory of this archive
  14. * for more details.
  15. */
  16. #include <linux/platform_device.h>
  17. #include <linux/init.h>
  18. #include <linux/serial.h>
  19. #include <linux/serial_sci.h>
  20. #include <linux/io.h>
  21. #include <linux/mm.h>
  22. #include <linux/dma-mapping.h>
  23. #include <linux/sh_timer.h>
  24. #include <linux/sh_dma.h>
  25. #include <linux/sh_intc.h>
  26. #include <cpu/dma-register.h>
  27. #include <asm/mmzone.h>
  28. static struct plat_sci_port scif0_platform_data = {
  29. .mapbase = 0xffea0000,
  30. .flags = UPF_BOOT_AUTOCONF,
  31. .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
  32. .scbrr_algo_id = SCBRR_ALGO_1,
  33. .type = PORT_SCIF,
  34. .irqs = { 40, 41, 43, 42 },
  35. .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
  36. };
  37. static struct platform_device scif0_device = {
  38. .name = "sh-sci",
  39. .id = 0,
  40. .dev = {
  41. .platform_data = &scif0_platform_data,
  42. },
  43. };
  44. /*
  45. * The rest of these all have multiplexed IRQs
  46. */
  47. static struct plat_sci_port scif1_platform_data = {
  48. .mapbase = 0xffeb0000,
  49. .flags = UPF_BOOT_AUTOCONF,
  50. .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
  51. .scbrr_algo_id = SCBRR_ALGO_1,
  52. .type = PORT_SCIF,
  53. .irqs = { 44, 44, 44, 44 },
  54. .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
  55. };
  56. static struct platform_device scif1_device = {
  57. .name = "sh-sci",
  58. .id = 1,
  59. .dev = {
  60. .platform_data = &scif1_platform_data,
  61. },
  62. };
  63. static struct plat_sci_port scif2_platform_data = {
  64. .mapbase = 0xffec0000,
  65. .flags = UPF_BOOT_AUTOCONF,
  66. .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
  67. .scbrr_algo_id = SCBRR_ALGO_1,
  68. .type = PORT_SCIF,
  69. .irqs = { 50, 50, 50, 50 },
  70. .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
  71. };
  72. static struct platform_device scif2_device = {
  73. .name = "sh-sci",
  74. .id = 2,
  75. .dev = {
  76. .platform_data = &scif2_platform_data,
  77. },
  78. };
  79. static struct plat_sci_port scif3_platform_data = {
  80. .mapbase = 0xffed0000,
  81. .flags = UPF_BOOT_AUTOCONF,
  82. .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
  83. .scbrr_algo_id = SCBRR_ALGO_1,
  84. .type = PORT_SCIF,
  85. .irqs = { 51, 51, 51, 51 },
  86. .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
  87. };
  88. static struct platform_device scif3_device = {
  89. .name = "sh-sci",
  90. .id = 3,
  91. .dev = {
  92. .platform_data = &scif3_platform_data,
  93. },
  94. };
  95. static struct plat_sci_port scif4_platform_data = {
  96. .mapbase = 0xffee0000,
  97. .flags = UPF_BOOT_AUTOCONF,
  98. .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
  99. .scbrr_algo_id = SCBRR_ALGO_1,
  100. .type = PORT_SCIF,
  101. .irqs = { 52, 52, 52, 52 },
  102. .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
  103. };
  104. static struct platform_device scif4_device = {
  105. .name = "sh-sci",
  106. .id = 4,
  107. .dev = {
  108. .platform_data = &scif4_platform_data,
  109. },
  110. };
  111. static struct plat_sci_port scif5_platform_data = {
  112. .mapbase = 0xffef0000,
  113. .flags = UPF_BOOT_AUTOCONF,
  114. .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
  115. .scbrr_algo_id = SCBRR_ALGO_1,
  116. .type = PORT_SCIF,
  117. .irqs = { 53, 53, 53, 53 },
  118. .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
  119. };
  120. static struct platform_device scif5_device = {
  121. .name = "sh-sci",
  122. .id = 5,
  123. .dev = {
  124. .platform_data = &scif5_platform_data,
  125. },
  126. };
  127. static struct sh_timer_config tmu0_platform_data = {
  128. .channel_offset = 0x04,
  129. .timer_bit = 0,
  130. .clockevent_rating = 200,
  131. };
  132. static struct resource tmu0_resources[] = {
  133. [0] = {
  134. .start = 0xffd80008,
  135. .end = 0xffd80013,
  136. .flags = IORESOURCE_MEM,
  137. },
  138. [1] = {
  139. .start = 16,
  140. .flags = IORESOURCE_IRQ,
  141. },
  142. };
  143. static struct platform_device tmu0_device = {
  144. .name = "sh_tmu",
  145. .id = 0,
  146. .dev = {
  147. .platform_data = &tmu0_platform_data,
  148. },
  149. .resource = tmu0_resources,
  150. .num_resources = ARRAY_SIZE(tmu0_resources),
  151. };
  152. static struct sh_timer_config tmu1_platform_data = {
  153. .channel_offset = 0x10,
  154. .timer_bit = 1,
  155. .clocksource_rating = 200,
  156. };
  157. static struct resource tmu1_resources[] = {
  158. [0] = {
  159. .start = 0xffd80014,
  160. .end = 0xffd8001f,
  161. .flags = IORESOURCE_MEM,
  162. },
  163. [1] = {
  164. .start = 17,
  165. .flags = IORESOURCE_IRQ,
  166. },
  167. };
  168. static struct platform_device tmu1_device = {
  169. .name = "sh_tmu",
  170. .id = 1,
  171. .dev = {
  172. .platform_data = &tmu1_platform_data,
  173. },
  174. .resource = tmu1_resources,
  175. .num_resources = ARRAY_SIZE(tmu1_resources),
  176. };
  177. static struct sh_timer_config tmu2_platform_data = {
  178. .channel_offset = 0x1c,
  179. .timer_bit = 2,
  180. };
  181. static struct resource tmu2_resources[] = {
  182. [0] = {
  183. .start = 0xffd80020,
  184. .end = 0xffd8002f,
  185. .flags = IORESOURCE_MEM,
  186. },
  187. [1] = {
  188. .start = 18,
  189. .flags = IORESOURCE_IRQ,
  190. },
  191. };
  192. static struct platform_device tmu2_device = {
  193. .name = "sh_tmu",
  194. .id = 2,
  195. .dev = {
  196. .platform_data = &tmu2_platform_data,
  197. },
  198. .resource = tmu2_resources,
  199. .num_resources = ARRAY_SIZE(tmu2_resources),
  200. };
  201. static struct sh_timer_config tmu3_platform_data = {
  202. .channel_offset = 0x04,
  203. .timer_bit = 0,
  204. };
  205. static struct resource tmu3_resources[] = {
  206. [0] = {
  207. .start = 0xffda0008,
  208. .end = 0xffda0013,
  209. .flags = IORESOURCE_MEM,
  210. },
  211. [1] = {
  212. .start = 20,
  213. .flags = IORESOURCE_IRQ,
  214. },
  215. };
  216. static struct platform_device tmu3_device = {
  217. .name = "sh_tmu",
  218. .id = 3,
  219. .dev = {
  220. .platform_data = &tmu3_platform_data,
  221. },
  222. .resource = tmu3_resources,
  223. .num_resources = ARRAY_SIZE(tmu3_resources),
  224. };
  225. static struct sh_timer_config tmu4_platform_data = {
  226. .channel_offset = 0x10,
  227. .timer_bit = 1,
  228. };
  229. static struct resource tmu4_resources[] = {
  230. [0] = {
  231. .start = 0xffda0014,
  232. .end = 0xffda001f,
  233. .flags = IORESOURCE_MEM,
  234. },
  235. [1] = {
  236. .start = 21,
  237. .flags = IORESOURCE_IRQ,
  238. },
  239. };
  240. static struct platform_device tmu4_device = {
  241. .name = "sh_tmu",
  242. .id = 4,
  243. .dev = {
  244. .platform_data = &tmu4_platform_data,
  245. },
  246. .resource = tmu4_resources,
  247. .num_resources = ARRAY_SIZE(tmu4_resources),
  248. };
  249. static struct sh_timer_config tmu5_platform_data = {
  250. .channel_offset = 0x1c,
  251. .timer_bit = 2,
  252. };
  253. static struct resource tmu5_resources[] = {
  254. [0] = {
  255. .start = 0xffda0020,
  256. .end = 0xffda002b,
  257. .flags = IORESOURCE_MEM,
  258. },
  259. [1] = {
  260. .start = 22,
  261. .flags = IORESOURCE_IRQ,
  262. },
  263. };
  264. static struct platform_device tmu5_device = {
  265. .name = "sh_tmu",
  266. .id = 5,
  267. .dev = {
  268. .platform_data = &tmu5_platform_data,
  269. },
  270. .resource = tmu5_resources,
  271. .num_resources = ARRAY_SIZE(tmu5_resources),
  272. };
  273. static struct sh_timer_config tmu6_platform_data = {
  274. .channel_offset = 0x04,
  275. .timer_bit = 0,
  276. };
  277. static struct resource tmu6_resources[] = {
  278. [0] = {
  279. .start = 0xffdc0008,
  280. .end = 0xffdc0013,
  281. .flags = IORESOURCE_MEM,
  282. },
  283. [1] = {
  284. .start = 45,
  285. .flags = IORESOURCE_IRQ,
  286. },
  287. };
  288. static struct platform_device tmu6_device = {
  289. .name = "sh_tmu",
  290. .id = 6,
  291. .dev = {
  292. .platform_data = &tmu6_platform_data,
  293. },
  294. .resource = tmu6_resources,
  295. .num_resources = ARRAY_SIZE(tmu6_resources),
  296. };
  297. static struct sh_timer_config tmu7_platform_data = {
  298. .channel_offset = 0x10,
  299. .timer_bit = 1,
  300. };
  301. static struct resource tmu7_resources[] = {
  302. [0] = {
  303. .start = 0xffdc0014,
  304. .end = 0xffdc001f,
  305. .flags = IORESOURCE_MEM,
  306. },
  307. [1] = {
  308. .start = 45,
  309. .flags = IORESOURCE_IRQ,
  310. },
  311. };
  312. static struct platform_device tmu7_device = {
  313. .name = "sh_tmu",
  314. .id = 7,
  315. .dev = {
  316. .platform_data = &tmu7_platform_data,
  317. },
  318. .resource = tmu7_resources,
  319. .num_resources = ARRAY_SIZE(tmu7_resources),
  320. };
  321. static struct sh_timer_config tmu8_platform_data = {
  322. .channel_offset = 0x1c,
  323. .timer_bit = 2,
  324. };
  325. static struct resource tmu8_resources[] = {
  326. [0] = {
  327. .start = 0xffdc0020,
  328. .end = 0xffdc002b,
  329. .flags = IORESOURCE_MEM,
  330. },
  331. [1] = {
  332. .start = 45,
  333. .flags = IORESOURCE_IRQ,
  334. },
  335. };
  336. static struct platform_device tmu8_device = {
  337. .name = "sh_tmu",
  338. .id = 8,
  339. .dev = {
  340. .platform_data = &tmu8_platform_data,
  341. },
  342. .resource = tmu8_resources,
  343. .num_resources = ARRAY_SIZE(tmu8_resources),
  344. };
  345. static struct sh_timer_config tmu9_platform_data = {
  346. .channel_offset = 0x04,
  347. .timer_bit = 0,
  348. };
  349. static struct resource tmu9_resources[] = {
  350. [0] = {
  351. .start = 0xffde0008,
  352. .end = 0xffde0013,
  353. .flags = IORESOURCE_MEM,
  354. },
  355. [1] = {
  356. .start = 46,
  357. .flags = IORESOURCE_IRQ,
  358. },
  359. };
  360. static struct platform_device tmu9_device = {
  361. .name = "sh_tmu",
  362. .id = 9,
  363. .dev = {
  364. .platform_data = &tmu9_platform_data,
  365. },
  366. .resource = tmu9_resources,
  367. .num_resources = ARRAY_SIZE(tmu9_resources),
  368. };
  369. static struct sh_timer_config tmu10_platform_data = {
  370. .channel_offset = 0x10,
  371. .timer_bit = 1,
  372. };
  373. static struct resource tmu10_resources[] = {
  374. [0] = {
  375. .start = 0xffde0014,
  376. .end = 0xffde001f,
  377. .flags = IORESOURCE_MEM,
  378. },
  379. [1] = {
  380. .start = 46,
  381. .flags = IORESOURCE_IRQ,
  382. },
  383. };
  384. static struct platform_device tmu10_device = {
  385. .name = "sh_tmu",
  386. .id = 10,
  387. .dev = {
  388. .platform_data = &tmu10_platform_data,
  389. },
  390. .resource = tmu10_resources,
  391. .num_resources = ARRAY_SIZE(tmu10_resources),
  392. };
  393. static struct sh_timer_config tmu11_platform_data = {
  394. .channel_offset = 0x1c,
  395. .timer_bit = 2,
  396. };
  397. static struct resource tmu11_resources[] = {
  398. [0] = {
  399. .start = 0xffde0020,
  400. .end = 0xffde002b,
  401. .flags = IORESOURCE_MEM,
  402. },
  403. [1] = {
  404. .start = 46,
  405. .flags = IORESOURCE_IRQ,
  406. },
  407. };
  408. static struct platform_device tmu11_device = {
  409. .name = "sh_tmu",
  410. .id = 11,
  411. .dev = {
  412. .platform_data = &tmu11_platform_data,
  413. },
  414. .resource = tmu11_resources,
  415. .num_resources = ARRAY_SIZE(tmu11_resources),
  416. };
  417. static const struct sh_dmae_channel dmac0_channels[] = {
  418. {
  419. .offset = 0,
  420. .dmars = 0,
  421. .dmars_bit = 0,
  422. }, {
  423. .offset = 0x10,
  424. .dmars = 0,
  425. .dmars_bit = 8,
  426. }, {
  427. .offset = 0x20,
  428. .dmars = 4,
  429. .dmars_bit = 0,
  430. }, {
  431. .offset = 0x30,
  432. .dmars = 4,
  433. .dmars_bit = 8,
  434. }, {
  435. .offset = 0x50,
  436. .dmars = 8,
  437. .dmars_bit = 0,
  438. }, {
  439. .offset = 0x60,
  440. .dmars = 8,
  441. .dmars_bit = 8,
  442. }
  443. };
  444. static const unsigned int ts_shift[] = TS_SHIFT;
  445. static struct sh_dmae_pdata dma0_platform_data = {
  446. .channel = dmac0_channels,
  447. .channel_num = ARRAY_SIZE(dmac0_channels),
  448. .ts_low_shift = CHCR_TS_LOW_SHIFT,
  449. .ts_low_mask = CHCR_TS_LOW_MASK,
  450. .ts_high_shift = CHCR_TS_HIGH_SHIFT,
  451. .ts_high_mask = CHCR_TS_HIGH_MASK,
  452. .ts_shift = ts_shift,
  453. .ts_shift_num = ARRAY_SIZE(ts_shift),
  454. .dmaor_init = DMAOR_INIT,
  455. };
  456. /* Resource order important! */
  457. static struct resource dmac0_resources[] = {
  458. {
  459. /* Channel registers and DMAOR */
  460. .start = 0xfe008020,
  461. .end = 0xfe00808f,
  462. .flags = IORESOURCE_MEM,
  463. }, {
  464. /* DMARSx */
  465. .start = 0xfe009000,
  466. .end = 0xfe00900b,
  467. .flags = IORESOURCE_MEM,
  468. }, {
  469. .name = "error_irq",
  470. .start = evt2irq(0x5c0),
  471. .end = evt2irq(0x5c0),
  472. .flags = IORESOURCE_IRQ,
  473. }, {
  474. /* IRQ for channels 0-5 */
  475. .start = evt2irq(0x500),
  476. .end = evt2irq(0x5a0),
  477. .flags = IORESOURCE_IRQ,
  478. },
  479. };
  480. static struct platform_device dma0_device = {
  481. .name = "sh-dma-engine",
  482. .id = 0,
  483. .resource = dmac0_resources,
  484. .num_resources = ARRAY_SIZE(dmac0_resources),
  485. .dev = {
  486. .platform_data = &dma0_platform_data,
  487. },
  488. };
  489. #define USB_EHCI_START 0xffe70000
  490. #define USB_OHCI_START 0xffe70400
  491. static struct resource usb_ehci_resources[] = {
  492. [0] = {
  493. .start = USB_EHCI_START,
  494. .end = USB_EHCI_START + 0x3ff,
  495. .flags = IORESOURCE_MEM,
  496. },
  497. [1] = {
  498. .start = 77,
  499. .end = 77,
  500. .flags = IORESOURCE_IRQ,
  501. },
  502. };
  503. static struct platform_device usb_ehci_device = {
  504. .name = "sh_ehci",
  505. .id = -1,
  506. .dev = {
  507. .dma_mask = &usb_ehci_device.dev.coherent_dma_mask,
  508. .coherent_dma_mask = DMA_BIT_MASK(32),
  509. },
  510. .num_resources = ARRAY_SIZE(usb_ehci_resources),
  511. .resource = usb_ehci_resources,
  512. };
  513. static struct resource usb_ohci_resources[] = {
  514. [0] = {
  515. .start = USB_OHCI_START,
  516. .end = USB_OHCI_START + 0x3ff,
  517. .flags = IORESOURCE_MEM,
  518. },
  519. [1] = {
  520. .start = 77,
  521. .end = 77,
  522. .flags = IORESOURCE_IRQ,
  523. },
  524. };
  525. static struct platform_device usb_ohci_device = {
  526. .name = "sh_ohci",
  527. .id = -1,
  528. .dev = {
  529. .dma_mask = &usb_ohci_device.dev.coherent_dma_mask,
  530. .coherent_dma_mask = DMA_BIT_MASK(32),
  531. },
  532. .num_resources = ARRAY_SIZE(usb_ohci_resources),
  533. .resource = usb_ohci_resources,
  534. };
  535. static struct platform_device *sh7786_early_devices[] __initdata = {
  536. &scif0_device,
  537. &scif1_device,
  538. &scif2_device,
  539. &scif3_device,
  540. &scif4_device,
  541. &scif5_device,
  542. &tmu0_device,
  543. &tmu1_device,
  544. &tmu2_device,
  545. &tmu3_device,
  546. &tmu4_device,
  547. &tmu5_device,
  548. &tmu6_device,
  549. &tmu7_device,
  550. &tmu8_device,
  551. &tmu9_device,
  552. &tmu10_device,
  553. &tmu11_device,
  554. };
  555. static struct platform_device *sh7786_devices[] __initdata = {
  556. &dma0_device,
  557. &usb_ehci_device,
  558. &usb_ohci_device,
  559. };
  560. /*
  561. * Please call this function if your platform board
  562. * use external clock for USB
  563. * */
  564. #define USBCTL0 0xffe70858
  565. #define CLOCK_MODE_MASK 0xffffff7f
  566. #define EXT_CLOCK_MODE 0x00000080
  567. void __init sh7786_usb_use_exclock(void)
  568. {
  569. u32 val = __raw_readl(USBCTL0) & CLOCK_MODE_MASK;
  570. __raw_writel(val | EXT_CLOCK_MODE, USBCTL0);
  571. }
  572. #define USBINITREG1 0xffe70094
  573. #define USBINITREG2 0xffe7009c
  574. #define USBINITVAL1 0x00ff0040
  575. #define USBINITVAL2 0x00000001
  576. #define USBPCTL1 0xffe70804
  577. #define USBST 0xffe70808
  578. #define PHY_ENB 0x00000001
  579. #define PLL_ENB 0x00000002
  580. #define PHY_RST 0x00000004
  581. #define ACT_PLL_STATUS 0xc0000000
  582. static void __init sh7786_usb_setup(void)
  583. {
  584. int i = 1000000;
  585. /*
  586. * USB initial settings
  587. *
  588. * The following settings are necessary
  589. * for using the USB modules.
  590. *
  591. * see "USB Initial Settings" for detail
  592. */
  593. __raw_writel(USBINITVAL1, USBINITREG1);
  594. __raw_writel(USBINITVAL2, USBINITREG2);
  595. /*
  596. * Set the PHY and PLL enable bit
  597. */
  598. __raw_writel(PHY_ENB | PLL_ENB, USBPCTL1);
  599. while (i--) {
  600. if (ACT_PLL_STATUS == (__raw_readl(USBST) & ACT_PLL_STATUS)) {
  601. /* Set the PHY RST bit */
  602. __raw_writel(PHY_ENB | PLL_ENB | PHY_RST, USBPCTL1);
  603. printk(KERN_INFO "sh7786 usb setup done\n");
  604. break;
  605. }
  606. cpu_relax();
  607. }
  608. }
  609. enum {
  610. UNUSED = 0,
  611. /* interrupt sources */
  612. IRL0_LLLL, IRL0_LLLH, IRL0_LLHL, IRL0_LLHH,
  613. IRL0_LHLL, IRL0_LHLH, IRL0_LHHL, IRL0_LHHH,
  614. IRL0_HLLL, IRL0_HLLH, IRL0_HLHL, IRL0_HLHH,
  615. IRL0_HHLL, IRL0_HHLH, IRL0_HHHL,
  616. IRL4_LLLL, IRL4_LLLH, IRL4_LLHL, IRL4_LLHH,
  617. IRL4_LHLL, IRL4_LHLH, IRL4_LHHL, IRL4_LHHH,
  618. IRL4_HLLL, IRL4_HLLH, IRL4_HLHL, IRL4_HLHH,
  619. IRL4_HHLL, IRL4_HHLH, IRL4_HHHL,
  620. IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7,
  621. WDT,
  622. TMU0_0, TMU0_1, TMU0_2, TMU0_3,
  623. TMU1_0, TMU1_1, TMU1_2,
  624. DMAC0_0, DMAC0_1, DMAC0_2, DMAC0_3, DMAC0_4, DMAC0_5, DMAC0_6,
  625. HUDI1, HUDI0,
  626. DMAC1_0, DMAC1_1, DMAC1_2, DMAC1_3,
  627. HPB_0, HPB_1, HPB_2,
  628. SCIF0_0, SCIF0_1, SCIF0_2, SCIF0_3,
  629. SCIF1,
  630. TMU2, TMU3,
  631. SCIF2, SCIF3, SCIF4, SCIF5,
  632. Eth_0, Eth_1,
  633. PCIeC0_0, PCIeC0_1, PCIeC0_2,
  634. PCIeC1_0, PCIeC1_1, PCIeC1_2,
  635. USB,
  636. I2C0, I2C1,
  637. DU,
  638. SSI0, SSI1, SSI2, SSI3,
  639. PCIeC2_0, PCIeC2_1, PCIeC2_2,
  640. HAC0, HAC1,
  641. FLCTL,
  642. HSPI,
  643. GPIO0, GPIO1,
  644. Thermal,
  645. INTICI0, INTICI1, INTICI2, INTICI3,
  646. INTICI4, INTICI5, INTICI6, INTICI7,
  647. /* Muxed sub-events */
  648. TXI1, BRI1, RXI1, ERI1,
  649. };
  650. static struct intc_vect sh7786_vectors[] __initdata = {
  651. INTC_VECT(WDT, 0x3e0),
  652. INTC_VECT(TMU0_0, 0x400), INTC_VECT(TMU0_1, 0x420),
  653. INTC_VECT(TMU0_2, 0x440), INTC_VECT(TMU0_3, 0x460),
  654. INTC_VECT(TMU1_0, 0x480), INTC_VECT(TMU1_1, 0x4a0),
  655. INTC_VECT(TMU1_2, 0x4c0),
  656. INTC_VECT(DMAC0_0, 0x500), INTC_VECT(DMAC0_1, 0x520),
  657. INTC_VECT(DMAC0_2, 0x540), INTC_VECT(DMAC0_3, 0x560),
  658. INTC_VECT(DMAC0_4, 0x580), INTC_VECT(DMAC0_5, 0x5a0),
  659. INTC_VECT(DMAC0_6, 0x5c0),
  660. INTC_VECT(HUDI1, 0x5e0), INTC_VECT(HUDI0, 0x600),
  661. INTC_VECT(DMAC1_0, 0x620), INTC_VECT(DMAC1_1, 0x640),
  662. INTC_VECT(DMAC1_2, 0x660), INTC_VECT(DMAC1_3, 0x680),
  663. INTC_VECT(HPB_0, 0x6a0), INTC_VECT(HPB_1, 0x6c0),
  664. INTC_VECT(HPB_2, 0x6e0),
  665. INTC_VECT(SCIF0_0, 0x700), INTC_VECT(SCIF0_1, 0x720),
  666. INTC_VECT(SCIF0_2, 0x740), INTC_VECT(SCIF0_3, 0x760),
  667. INTC_VECT(SCIF1, 0x780),
  668. INTC_VECT(TMU2, 0x7a0), INTC_VECT(TMU3, 0x7c0),
  669. INTC_VECT(SCIF2, 0x840), INTC_VECT(SCIF3, 0x860),
  670. INTC_VECT(SCIF4, 0x880), INTC_VECT(SCIF5, 0x8a0),
  671. INTC_VECT(Eth_0, 0x8c0), INTC_VECT(Eth_1, 0x8e0),
  672. INTC_VECT(PCIeC0_0, 0xae0), INTC_VECT(PCIeC0_1, 0xb00),
  673. INTC_VECT(PCIeC0_2, 0xb20),
  674. INTC_VECT(PCIeC1_0, 0xb40), INTC_VECT(PCIeC1_1, 0xb60),
  675. INTC_VECT(PCIeC1_2, 0xb80),
  676. INTC_VECT(USB, 0xba0),
  677. INTC_VECT(I2C0, 0xcc0), INTC_VECT(I2C1, 0xce0),
  678. INTC_VECT(DU, 0xd00),
  679. INTC_VECT(SSI0, 0xd20), INTC_VECT(SSI1, 0xd40),
  680. INTC_VECT(SSI2, 0xd60), INTC_VECT(SSI3, 0xd80),
  681. INTC_VECT(PCIeC2_0, 0xda0), INTC_VECT(PCIeC2_1, 0xdc0),
  682. INTC_VECT(PCIeC2_2, 0xde0),
  683. INTC_VECT(HAC0, 0xe00), INTC_VECT(HAC1, 0xe20),
  684. INTC_VECT(FLCTL, 0xe40),
  685. INTC_VECT(HSPI, 0xe80),
  686. INTC_VECT(GPIO0, 0xea0), INTC_VECT(GPIO1, 0xec0),
  687. INTC_VECT(Thermal, 0xee0),
  688. INTC_VECT(INTICI0, 0xf00), INTC_VECT(INTICI1, 0xf20),
  689. INTC_VECT(INTICI2, 0xf40), INTC_VECT(INTICI3, 0xf60),
  690. INTC_VECT(INTICI4, 0xf80), INTC_VECT(INTICI5, 0xfa0),
  691. INTC_VECT(INTICI6, 0xfc0), INTC_VECT(INTICI7, 0xfe0),
  692. };
  693. #define CnINTMSK0 0xfe410030
  694. #define CnINTMSK1 0xfe410040
  695. #define CnINTMSKCLR0 0xfe410050
  696. #define CnINTMSKCLR1 0xfe410060
  697. #define CnINT2MSKR0 0xfe410a20
  698. #define CnINT2MSKR1 0xfe410a24
  699. #define CnINT2MSKR2 0xfe410a28
  700. #define CnINT2MSKR3 0xfe410a2c
  701. #define CnINT2MSKCR0 0xfe410a30
  702. #define CnINT2MSKCR1 0xfe410a34
  703. #define CnINT2MSKCR2 0xfe410a38
  704. #define CnINT2MSKCR3 0xfe410a3c
  705. #define INTMSK2 0xfe410068
  706. #define INTMSKCLR2 0xfe41006c
  707. #define INTDISTCR0 0xfe4100b0
  708. #define INTDISTCR1 0xfe4100b4
  709. #define INT2DISTCR0 0xfe410900
  710. #define INT2DISTCR1 0xfe410904
  711. #define INT2DISTCR2 0xfe410908
  712. #define INT2DISTCR3 0xfe41090c
  713. static struct intc_mask_reg sh7786_mask_registers[] __initdata = {
  714. { CnINTMSK0, CnINTMSKCLR0, 32,
  715. { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 },
  716. INTC_SMP_BALANCING(INTDISTCR0) },
  717. { INTMSK2, INTMSKCLR2, 32,
  718. { IRL0_LLLL, IRL0_LLLH, IRL0_LLHL, IRL0_LLHH,
  719. IRL0_LHLL, IRL0_LHLH, IRL0_LHHL, IRL0_LHHH,
  720. IRL0_HLLL, IRL0_HLLH, IRL0_HLHL, IRL0_HLHH,
  721. IRL0_HHLL, IRL0_HHLH, IRL0_HHHL, 0,
  722. IRL4_LLLL, IRL4_LLLH, IRL4_LLHL, IRL4_LLHH,
  723. IRL4_LHLL, IRL4_LHLH, IRL4_LHHL, IRL4_LHHH,
  724. IRL4_HLLL, IRL4_HLLH, IRL4_HLHL, IRL4_HLHH,
  725. IRL4_HHLL, IRL4_HHLH, IRL4_HHHL, 0, } },
  726. { CnINT2MSKR0, CnINT2MSKCR0 , 32,
  727. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  728. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, WDT },
  729. INTC_SMP_BALANCING(INT2DISTCR0) },
  730. { CnINT2MSKR1, CnINT2MSKCR1, 32,
  731. { TMU0_0, TMU0_1, TMU0_2, TMU0_3, TMU1_0, TMU1_1, TMU1_2, 0,
  732. DMAC0_0, DMAC0_1, DMAC0_2, DMAC0_3, DMAC0_4, DMAC0_5, DMAC0_6,
  733. HUDI1, HUDI0,
  734. DMAC1_0, DMAC1_1, DMAC1_2, DMAC1_3,
  735. HPB_0, HPB_1, HPB_2,
  736. SCIF0_0, SCIF0_1, SCIF0_2, SCIF0_3,
  737. SCIF1,
  738. TMU2, TMU3, 0, }, INTC_SMP_BALANCING(INT2DISTCR1) },
  739. { CnINT2MSKR2, CnINT2MSKCR2, 32,
  740. { 0, 0, SCIF2, SCIF3, SCIF4, SCIF5,
  741. Eth_0, Eth_1,
  742. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  743. PCIeC0_0, PCIeC0_1, PCIeC0_2,
  744. PCIeC1_0, PCIeC1_1, PCIeC1_2,
  745. USB, 0, 0 }, INTC_SMP_BALANCING(INT2DISTCR2) },
  746. { CnINT2MSKR3, CnINT2MSKCR3, 32,
  747. { 0, 0, 0, 0, 0, 0,
  748. I2C0, I2C1,
  749. DU, SSI0, SSI1, SSI2, SSI3,
  750. PCIeC2_0, PCIeC2_1, PCIeC2_2,
  751. HAC0, HAC1,
  752. FLCTL, 0,
  753. HSPI, GPIO0, GPIO1, Thermal,
  754. 0, 0, 0, 0, 0, 0, 0, 0 }, INTC_SMP_BALANCING(INT2DISTCR3) },
  755. };
  756. static struct intc_prio_reg sh7786_prio_registers[] __initdata = {
  757. { 0xfe410010, 0, 32, 4, /* INTPRI */ { IRQ0, IRQ1, IRQ2, IRQ3,
  758. IRQ4, IRQ5, IRQ6, IRQ7 } },
  759. { 0xfe410800, 0, 32, 8, /* INT2PRI0 */ { 0, 0, 0, WDT } },
  760. { 0xfe410804, 0, 32, 8, /* INT2PRI1 */ { TMU0_0, TMU0_1,
  761. TMU0_2, TMU0_3 } },
  762. { 0xfe410808, 0, 32, 8, /* INT2PRI2 */ { TMU1_0, TMU1_1,
  763. TMU1_2, 0 } },
  764. { 0xfe41080c, 0, 32, 8, /* INT2PRI3 */ { DMAC0_0, DMAC0_1,
  765. DMAC0_2, DMAC0_3 } },
  766. { 0xfe410810, 0, 32, 8, /* INT2PRI4 */ { DMAC0_4, DMAC0_5,
  767. DMAC0_6, HUDI1 } },
  768. { 0xfe410814, 0, 32, 8, /* INT2PRI5 */ { HUDI0, DMAC1_0,
  769. DMAC1_1, DMAC1_2 } },
  770. { 0xfe410818, 0, 32, 8, /* INT2PRI6 */ { DMAC1_3, HPB_0,
  771. HPB_1, HPB_2 } },
  772. { 0xfe41081c, 0, 32, 8, /* INT2PRI7 */ { SCIF0_0, SCIF0_1,
  773. SCIF0_2, SCIF0_3 } },
  774. { 0xfe410820, 0, 32, 8, /* INT2PRI8 */ { SCIF1, TMU2, TMU3, 0 } },
  775. { 0xfe410824, 0, 32, 8, /* INT2PRI9 */ { 0, 0, SCIF2, SCIF3 } },
  776. { 0xfe410828, 0, 32, 8, /* INT2PRI10 */ { SCIF4, SCIF5,
  777. Eth_0, Eth_1 } },
  778. { 0xfe41082c, 0, 32, 8, /* INT2PRI11 */ { 0, 0, 0, 0 } },
  779. { 0xfe410830, 0, 32, 8, /* INT2PRI12 */ { 0, 0, 0, 0 } },
  780. { 0xfe410834, 0, 32, 8, /* INT2PRI13 */ { 0, 0, 0, 0 } },
  781. { 0xfe410838, 0, 32, 8, /* INT2PRI14 */ { 0, 0, 0, PCIeC0_0 } },
  782. { 0xfe41083c, 0, 32, 8, /* INT2PRI15 */ { PCIeC0_1, PCIeC0_2,
  783. PCIeC1_0, PCIeC1_1 } },
  784. { 0xfe410840, 0, 32, 8, /* INT2PRI16 */ { PCIeC1_2, USB, 0, 0 } },
  785. { 0xfe410844, 0, 32, 8, /* INT2PRI17 */ { 0, 0, 0, 0 } },
  786. { 0xfe410848, 0, 32, 8, /* INT2PRI18 */ { 0, 0, I2C0, I2C1 } },
  787. { 0xfe41084c, 0, 32, 8, /* INT2PRI19 */ { DU, SSI0, SSI1, SSI2 } },
  788. { 0xfe410850, 0, 32, 8, /* INT2PRI20 */ { SSI3, PCIeC2_0,
  789. PCIeC2_1, PCIeC2_2 } },
  790. { 0xfe410854, 0, 32, 8, /* INT2PRI21 */ { HAC0, HAC1, FLCTL, 0 } },
  791. { 0xfe410858, 0, 32, 8, /* INT2PRI22 */ { HSPI, GPIO0,
  792. GPIO1, Thermal } },
  793. { 0xfe41085c, 0, 32, 8, /* INT2PRI23 */ { 0, 0, 0, 0 } },
  794. { 0xfe410860, 0, 32, 8, /* INT2PRI24 */ { 0, 0, 0, 0 } },
  795. { 0xfe410090, 0xfe4100a0, 32, 4, /* CnICIPRI / CnICIPRICLR */
  796. { INTICI7, INTICI6, INTICI5, INTICI4,
  797. INTICI3, INTICI2, INTICI1, INTICI0 }, INTC_SMP(4, 2) },
  798. };
  799. static struct intc_subgroup sh7786_subgroups[] __initdata = {
  800. { 0xfe410c20, 32, SCIF1,
  801. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  802. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, TXI1, BRI1, RXI1, ERI1 } },
  803. };
  804. static struct intc_desc sh7786_intc_desc __initdata = {
  805. .name = "sh7786",
  806. .hw = {
  807. .vectors = sh7786_vectors,
  808. .nr_vectors = ARRAY_SIZE(sh7786_vectors),
  809. .mask_regs = sh7786_mask_registers,
  810. .nr_mask_regs = ARRAY_SIZE(sh7786_mask_registers),
  811. .subgroups = sh7786_subgroups,
  812. .nr_subgroups = ARRAY_SIZE(sh7786_subgroups),
  813. .prio_regs = sh7786_prio_registers,
  814. .nr_prio_regs = ARRAY_SIZE(sh7786_prio_registers),
  815. },
  816. };
  817. /* Support for external interrupt pins in IRQ mode */
  818. static struct intc_vect vectors_irq0123[] __initdata = {
  819. INTC_VECT(IRQ0, 0x200), INTC_VECT(IRQ1, 0x240),
  820. INTC_VECT(IRQ2, 0x280), INTC_VECT(IRQ3, 0x2c0),
  821. };
  822. static struct intc_vect vectors_irq4567[] __initdata = {
  823. INTC_VECT(IRQ4, 0x300), INTC_VECT(IRQ5, 0x340),
  824. INTC_VECT(IRQ6, 0x380), INTC_VECT(IRQ7, 0x3c0),
  825. };
  826. static struct intc_sense_reg sh7786_sense_registers[] __initdata = {
  827. { 0xfe41001c, 32, 2, /* ICR1 */ { IRQ0, IRQ1, IRQ2, IRQ3,
  828. IRQ4, IRQ5, IRQ6, IRQ7 } },
  829. };
  830. static struct intc_mask_reg sh7786_ack_registers[] __initdata = {
  831. { 0xfe410024, 0, 32, /* INTREQ */
  832. { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
  833. };
  834. static DECLARE_INTC_DESC_ACK(intc_desc_irq0123, "sh7786-irq0123",
  835. vectors_irq0123, NULL, sh7786_mask_registers,
  836. sh7786_prio_registers, sh7786_sense_registers,
  837. sh7786_ack_registers);
  838. static DECLARE_INTC_DESC_ACK(intc_desc_irq4567, "sh7786-irq4567",
  839. vectors_irq4567, NULL, sh7786_mask_registers,
  840. sh7786_prio_registers, sh7786_sense_registers,
  841. sh7786_ack_registers);
  842. /* External interrupt pins in IRL mode */
  843. static struct intc_vect vectors_irl0123[] __initdata = {
  844. INTC_VECT(IRL0_LLLL, 0x200), INTC_VECT(IRL0_LLLH, 0x220),
  845. INTC_VECT(IRL0_LLHL, 0x240), INTC_VECT(IRL0_LLHH, 0x260),
  846. INTC_VECT(IRL0_LHLL, 0x280), INTC_VECT(IRL0_LHLH, 0x2a0),
  847. INTC_VECT(IRL0_LHHL, 0x2c0), INTC_VECT(IRL0_LHHH, 0x2e0),
  848. INTC_VECT(IRL0_HLLL, 0x300), INTC_VECT(IRL0_HLLH, 0x320),
  849. INTC_VECT(IRL0_HLHL, 0x340), INTC_VECT(IRL0_HLHH, 0x360),
  850. INTC_VECT(IRL0_HHLL, 0x380), INTC_VECT(IRL0_HHLH, 0x3a0),
  851. INTC_VECT(IRL0_HHHL, 0x3c0),
  852. };
  853. static struct intc_vect vectors_irl4567[] __initdata = {
  854. INTC_VECT(IRL4_LLLL, 0x900), INTC_VECT(IRL4_LLLH, 0x920),
  855. INTC_VECT(IRL4_LLHL, 0x940), INTC_VECT(IRL4_LLHH, 0x960),
  856. INTC_VECT(IRL4_LHLL, 0x980), INTC_VECT(IRL4_LHLH, 0x9a0),
  857. INTC_VECT(IRL4_LHHL, 0x9c0), INTC_VECT(IRL4_LHHH, 0x9e0),
  858. INTC_VECT(IRL4_HLLL, 0xa00), INTC_VECT(IRL4_HLLH, 0xa20),
  859. INTC_VECT(IRL4_HLHL, 0xa40), INTC_VECT(IRL4_HLHH, 0xa60),
  860. INTC_VECT(IRL4_HHLL, 0xa80), INTC_VECT(IRL4_HHLH, 0xaa0),
  861. INTC_VECT(IRL4_HHHL, 0xac0),
  862. };
  863. static DECLARE_INTC_DESC(intc_desc_irl0123, "sh7786-irl0123", vectors_irl0123,
  864. NULL, sh7786_mask_registers, NULL, NULL);
  865. static DECLARE_INTC_DESC(intc_desc_irl4567, "sh7786-irl4567", vectors_irl4567,
  866. NULL, sh7786_mask_registers, NULL, NULL);
  867. #define INTC_ICR0 0xfe410000
  868. #define INTC_INTMSK0 CnINTMSK0
  869. #define INTC_INTMSK1 CnINTMSK1
  870. #define INTC_INTMSK2 INTMSK2
  871. #define INTC_INTMSKCLR1 CnINTMSKCLR1
  872. #define INTC_INTMSKCLR2 INTMSKCLR2
  873. void __init plat_irq_setup(void)
  874. {
  875. /* disable IRQ3-0 + IRQ7-4 */
  876. __raw_writel(0xff000000, INTC_INTMSK0);
  877. /* disable IRL3-0 + IRL7-4 */
  878. __raw_writel(0xc0000000, INTC_INTMSK1);
  879. __raw_writel(0xfffefffe, INTC_INTMSK2);
  880. /* select IRL mode for IRL3-0 + IRL7-4 */
  881. __raw_writel(__raw_readl(INTC_ICR0) & ~0x00c00000, INTC_ICR0);
  882. register_intc_controller(&sh7786_intc_desc);
  883. }
  884. void __init plat_irq_setup_pins(int mode)
  885. {
  886. switch (mode) {
  887. case IRQ_MODE_IRQ7654:
  888. /* select IRQ mode for IRL7-4 */
  889. __raw_writel(__raw_readl(INTC_ICR0) | 0x00400000, INTC_ICR0);
  890. register_intc_controller(&intc_desc_irq4567);
  891. break;
  892. case IRQ_MODE_IRQ3210:
  893. /* select IRQ mode for IRL3-0 */
  894. __raw_writel(__raw_readl(INTC_ICR0) | 0x00800000, INTC_ICR0);
  895. register_intc_controller(&intc_desc_irq0123);
  896. break;
  897. case IRQ_MODE_IRL7654:
  898. /* enable IRL7-4 but don't provide any masking */
  899. __raw_writel(0x40000000, INTC_INTMSKCLR1);
  900. __raw_writel(0x0000fffe, INTC_INTMSKCLR2);
  901. break;
  902. case IRQ_MODE_IRL3210:
  903. /* enable IRL0-3 but don't provide any masking */
  904. __raw_writel(0x80000000, INTC_INTMSKCLR1);
  905. __raw_writel(0xfffe0000, INTC_INTMSKCLR2);
  906. break;
  907. case IRQ_MODE_IRL7654_MASK:
  908. /* enable IRL7-4 and mask using cpu intc controller */
  909. __raw_writel(0x40000000, INTC_INTMSKCLR1);
  910. register_intc_controller(&intc_desc_irl4567);
  911. break;
  912. case IRQ_MODE_IRL3210_MASK:
  913. /* enable IRL0-3 and mask using cpu intc controller */
  914. __raw_writel(0x80000000, INTC_INTMSKCLR1);
  915. register_intc_controller(&intc_desc_irl0123);
  916. break;
  917. default:
  918. BUG();
  919. }
  920. }
  921. void __init plat_mem_setup(void)
  922. {
  923. }
  924. static int __init sh7786_devices_setup(void)
  925. {
  926. int ret, irq;
  927. sh7786_usb_setup();
  928. /*
  929. * De-mux SCIF1 IRQs if possible
  930. */
  931. irq = intc_irq_lookup(sh7786_intc_desc.name, TXI1);
  932. if (irq > 0) {
  933. scif1_platform_data.irqs[SCIx_TXI_IRQ] = irq;
  934. scif1_platform_data.irqs[SCIx_ERI_IRQ] =
  935. intc_irq_lookup(sh7786_intc_desc.name, ERI1);
  936. scif1_platform_data.irqs[SCIx_BRI_IRQ] =
  937. intc_irq_lookup(sh7786_intc_desc.name, BRI1);
  938. scif1_platform_data.irqs[SCIx_RXI_IRQ] =
  939. intc_irq_lookup(sh7786_intc_desc.name, RXI1);
  940. }
  941. ret = platform_add_devices(sh7786_early_devices,
  942. ARRAY_SIZE(sh7786_early_devices));
  943. if (unlikely(ret != 0))
  944. return ret;
  945. return platform_add_devices(sh7786_devices,
  946. ARRAY_SIZE(sh7786_devices));
  947. }
  948. arch_initcall(sh7786_devices_setup);
  949. void __init plat_early_device_setup(void)
  950. {
  951. early_platform_add_devices(sh7786_early_devices,
  952. ARRAY_SIZE(sh7786_early_devices));
  953. }