setup-sh7372.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. /*
  2. * sh7372 processor support
  3. *
  4. * Copyright (C) 2010 Magnus Damm
  5. * Copyright (C) 2008 Yoshihiro Shimoda
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; version 2 of the License.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #include <linux/kernel.h>
  21. #include <linux/init.h>
  22. #include <linux/interrupt.h>
  23. #include <linux/irq.h>
  24. #include <linux/platform_device.h>
  25. #include <linux/delay.h>
  26. #include <linux/input.h>
  27. #include <linux/io.h>
  28. #include <linux/serial_sci.h>
  29. #include <linux/sh_dma.h>
  30. #include <linux/sh_intc.h>
  31. #include <linux/sh_timer.h>
  32. #include <mach/hardware.h>
  33. #include <mach/sh7372.h>
  34. #include <asm/mach-types.h>
  35. #include <asm/mach/arch.h>
  36. /* SCIFA0 */
  37. static struct plat_sci_port scif0_platform_data = {
  38. .mapbase = 0xe6c40000,
  39. .flags = UPF_BOOT_AUTOCONF,
  40. .type = PORT_SCIFA,
  41. .irqs = { evt2irq(0x0c00), evt2irq(0x0c00),
  42. evt2irq(0x0c00), evt2irq(0x0c00) },
  43. };
  44. static struct platform_device scif0_device = {
  45. .name = "sh-sci",
  46. .id = 0,
  47. .dev = {
  48. .platform_data = &scif0_platform_data,
  49. },
  50. };
  51. /* SCIFA1 */
  52. static struct plat_sci_port scif1_platform_data = {
  53. .mapbase = 0xe6c50000,
  54. .flags = UPF_BOOT_AUTOCONF,
  55. .type = PORT_SCIFA,
  56. .irqs = { evt2irq(0x0c20), evt2irq(0x0c20),
  57. evt2irq(0x0c20), evt2irq(0x0c20) },
  58. };
  59. static struct platform_device scif1_device = {
  60. .name = "sh-sci",
  61. .id = 1,
  62. .dev = {
  63. .platform_data = &scif1_platform_data,
  64. },
  65. };
  66. /* SCIFA2 */
  67. static struct plat_sci_port scif2_platform_data = {
  68. .mapbase = 0xe6c60000,
  69. .flags = UPF_BOOT_AUTOCONF,
  70. .type = PORT_SCIFA,
  71. .irqs = { evt2irq(0x0c40), evt2irq(0x0c40),
  72. evt2irq(0x0c40), evt2irq(0x0c40) },
  73. };
  74. static struct platform_device scif2_device = {
  75. .name = "sh-sci",
  76. .id = 2,
  77. .dev = {
  78. .platform_data = &scif2_platform_data,
  79. },
  80. };
  81. /* SCIFA3 */
  82. static struct plat_sci_port scif3_platform_data = {
  83. .mapbase = 0xe6c70000,
  84. .flags = UPF_BOOT_AUTOCONF,
  85. .type = PORT_SCIFA,
  86. .irqs = { evt2irq(0x0c60), evt2irq(0x0c60),
  87. evt2irq(0x0c60), evt2irq(0x0c60) },
  88. };
  89. static struct platform_device scif3_device = {
  90. .name = "sh-sci",
  91. .id = 3,
  92. .dev = {
  93. .platform_data = &scif3_platform_data,
  94. },
  95. };
  96. /* SCIFA4 */
  97. static struct plat_sci_port scif4_platform_data = {
  98. .mapbase = 0xe6c80000,
  99. .flags = UPF_BOOT_AUTOCONF,
  100. .type = PORT_SCIFA,
  101. .irqs = { evt2irq(0x0d20), evt2irq(0x0d20),
  102. evt2irq(0x0d20), evt2irq(0x0d20) },
  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. /* SCIFA5 */
  112. static struct plat_sci_port scif5_platform_data = {
  113. .mapbase = 0xe6cb0000,
  114. .flags = UPF_BOOT_AUTOCONF,
  115. .type = PORT_SCIFA,
  116. .irqs = { evt2irq(0x0d40), evt2irq(0x0d40),
  117. evt2irq(0x0d40), evt2irq(0x0d40) },
  118. };
  119. static struct platform_device scif5_device = {
  120. .name = "sh-sci",
  121. .id = 5,
  122. .dev = {
  123. .platform_data = &scif5_platform_data,
  124. },
  125. };
  126. /* SCIFB */
  127. static struct plat_sci_port scif6_platform_data = {
  128. .mapbase = 0xe6c30000,
  129. .flags = UPF_BOOT_AUTOCONF,
  130. .type = PORT_SCIFB,
  131. .irqs = { evt2irq(0x0d60), evt2irq(0x0d60),
  132. evt2irq(0x0d60), evt2irq(0x0d60) },
  133. };
  134. static struct platform_device scif6_device = {
  135. .name = "sh-sci",
  136. .id = 6,
  137. .dev = {
  138. .platform_data = &scif6_platform_data,
  139. },
  140. };
  141. /* CMT */
  142. static struct sh_timer_config cmt10_platform_data = {
  143. .name = "CMT10",
  144. .channel_offset = 0x10,
  145. .timer_bit = 0,
  146. .clockevent_rating = 125,
  147. .clocksource_rating = 125,
  148. };
  149. static struct resource cmt10_resources[] = {
  150. [0] = {
  151. .name = "CMT10",
  152. .start = 0xe6138010,
  153. .end = 0xe613801b,
  154. .flags = IORESOURCE_MEM,
  155. },
  156. [1] = {
  157. .start = evt2irq(0x0b00), /* CMT1_CMT10 */
  158. .flags = IORESOURCE_IRQ,
  159. },
  160. };
  161. static struct platform_device cmt10_device = {
  162. .name = "sh_cmt",
  163. .id = 10,
  164. .dev = {
  165. .platform_data = &cmt10_platform_data,
  166. },
  167. .resource = cmt10_resources,
  168. .num_resources = ARRAY_SIZE(cmt10_resources),
  169. };
  170. /* TMU */
  171. static struct sh_timer_config tmu00_platform_data = {
  172. .name = "TMU00",
  173. .channel_offset = 0x4,
  174. .timer_bit = 0,
  175. .clockevent_rating = 200,
  176. };
  177. static struct resource tmu00_resources[] = {
  178. [0] = {
  179. .name = "TMU00",
  180. .start = 0xfff60008,
  181. .end = 0xfff60013,
  182. .flags = IORESOURCE_MEM,
  183. },
  184. [1] = {
  185. .start = intcs_evt2irq(0xe80), /* TMU_TUNI0 */
  186. .flags = IORESOURCE_IRQ,
  187. },
  188. };
  189. static struct platform_device tmu00_device = {
  190. .name = "sh_tmu",
  191. .id = 0,
  192. .dev = {
  193. .platform_data = &tmu00_platform_data,
  194. },
  195. .resource = tmu00_resources,
  196. .num_resources = ARRAY_SIZE(tmu00_resources),
  197. };
  198. static struct sh_timer_config tmu01_platform_data = {
  199. .name = "TMU01",
  200. .channel_offset = 0x10,
  201. .timer_bit = 1,
  202. .clocksource_rating = 200,
  203. };
  204. static struct resource tmu01_resources[] = {
  205. [0] = {
  206. .name = "TMU01",
  207. .start = 0xfff60014,
  208. .end = 0xfff6001f,
  209. .flags = IORESOURCE_MEM,
  210. },
  211. [1] = {
  212. .start = intcs_evt2irq(0xea0), /* TMU_TUNI1 */
  213. .flags = IORESOURCE_IRQ,
  214. },
  215. };
  216. static struct platform_device tmu01_device = {
  217. .name = "sh_tmu",
  218. .id = 1,
  219. .dev = {
  220. .platform_data = &tmu01_platform_data,
  221. },
  222. .resource = tmu01_resources,
  223. .num_resources = ARRAY_SIZE(tmu01_resources),
  224. };
  225. /* I2C */
  226. static struct resource iic0_resources[] = {
  227. [0] = {
  228. .name = "IIC0",
  229. .start = 0xFFF20000,
  230. .end = 0xFFF20425 - 1,
  231. .flags = IORESOURCE_MEM,
  232. },
  233. [1] = {
  234. .start = intcs_evt2irq(0xe00), /* IIC0_ALI0 */
  235. .end = intcs_evt2irq(0xe60), /* IIC0_DTEI0 */
  236. .flags = IORESOURCE_IRQ,
  237. },
  238. };
  239. static struct platform_device iic0_device = {
  240. .name = "i2c-sh_mobile",
  241. .id = 0, /* "i2c0" clock */
  242. .num_resources = ARRAY_SIZE(iic0_resources),
  243. .resource = iic0_resources,
  244. };
  245. static struct resource iic1_resources[] = {
  246. [0] = {
  247. .name = "IIC1",
  248. .start = 0xE6C20000,
  249. .end = 0xE6C20425 - 1,
  250. .flags = IORESOURCE_MEM,
  251. },
  252. [1] = {
  253. .start = evt2irq(0x780), /* IIC1_ALI1 */
  254. .end = evt2irq(0x7e0), /* IIC1_DTEI1 */
  255. .flags = IORESOURCE_IRQ,
  256. },
  257. };
  258. static struct platform_device iic1_device = {
  259. .name = "i2c-sh_mobile",
  260. .id = 1, /* "i2c1" clock */
  261. .num_resources = ARRAY_SIZE(iic1_resources),
  262. .resource = iic1_resources,
  263. };
  264. /* DMA */
  265. /* Transmit sizes and respective CHCR register values */
  266. enum {
  267. XMIT_SZ_8BIT = 0,
  268. XMIT_SZ_16BIT = 1,
  269. XMIT_SZ_32BIT = 2,
  270. XMIT_SZ_64BIT = 7,
  271. XMIT_SZ_128BIT = 3,
  272. XMIT_SZ_256BIT = 4,
  273. XMIT_SZ_512BIT = 5,
  274. };
  275. /* log2(size / 8) - used to calculate number of transfers */
  276. #define TS_SHIFT { \
  277. [XMIT_SZ_8BIT] = 0, \
  278. [XMIT_SZ_16BIT] = 1, \
  279. [XMIT_SZ_32BIT] = 2, \
  280. [XMIT_SZ_64BIT] = 3, \
  281. [XMIT_SZ_128BIT] = 4, \
  282. [XMIT_SZ_256BIT] = 5, \
  283. [XMIT_SZ_512BIT] = 6, \
  284. }
  285. #define TS_INDEX2VAL(i) ((((i) & 3) << 3) | \
  286. (((i) & 0xc) << (20 - 2)))
  287. static const struct sh_dmae_slave_config sh7372_dmae_slaves[] = {
  288. {
  289. .slave_id = SHDMA_SLAVE_SCIF0_TX,
  290. .addr = 0xe6c40020,
  291. .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
  292. .mid_rid = 0x21,
  293. }, {
  294. .slave_id = SHDMA_SLAVE_SCIF0_RX,
  295. .addr = 0xe6c40024,
  296. .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
  297. .mid_rid = 0x22,
  298. }, {
  299. .slave_id = SHDMA_SLAVE_SCIF1_TX,
  300. .addr = 0xe6c50020,
  301. .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
  302. .mid_rid = 0x25,
  303. }, {
  304. .slave_id = SHDMA_SLAVE_SCIF1_RX,
  305. .addr = 0xe6c50024,
  306. .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
  307. .mid_rid = 0x26,
  308. }, {
  309. .slave_id = SHDMA_SLAVE_SCIF2_TX,
  310. .addr = 0xe6c60020,
  311. .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
  312. .mid_rid = 0x29,
  313. }, {
  314. .slave_id = SHDMA_SLAVE_SCIF2_RX,
  315. .addr = 0xe6c60024,
  316. .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
  317. .mid_rid = 0x2a,
  318. }, {
  319. .slave_id = SHDMA_SLAVE_SCIF3_TX,
  320. .addr = 0xe6c70020,
  321. .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
  322. .mid_rid = 0x2d,
  323. }, {
  324. .slave_id = SHDMA_SLAVE_SCIF3_RX,
  325. .addr = 0xe6c70024,
  326. .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
  327. .mid_rid = 0x2e,
  328. }, {
  329. .slave_id = SHDMA_SLAVE_SCIF4_TX,
  330. .addr = 0xe6c80020,
  331. .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
  332. .mid_rid = 0x39,
  333. }, {
  334. .slave_id = SHDMA_SLAVE_SCIF4_RX,
  335. .addr = 0xe6c80024,
  336. .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
  337. .mid_rid = 0x3a,
  338. }, {
  339. .slave_id = SHDMA_SLAVE_SCIF5_TX,
  340. .addr = 0xe6cb0020,
  341. .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
  342. .mid_rid = 0x35,
  343. }, {
  344. .slave_id = SHDMA_SLAVE_SCIF5_RX,
  345. .addr = 0xe6cb0024,
  346. .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
  347. .mid_rid = 0x36,
  348. }, {
  349. .slave_id = SHDMA_SLAVE_SCIF6_TX,
  350. .addr = 0xe6c30040,
  351. .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
  352. .mid_rid = 0x3d,
  353. }, {
  354. .slave_id = SHDMA_SLAVE_SCIF6_RX,
  355. .addr = 0xe6c30060,
  356. .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT),
  357. .mid_rid = 0x3e,
  358. }, {
  359. .slave_id = SHDMA_SLAVE_SDHI0_TX,
  360. .addr = 0xe6850030,
  361. .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT),
  362. .mid_rid = 0xc1,
  363. }, {
  364. .slave_id = SHDMA_SLAVE_SDHI0_RX,
  365. .addr = 0xe6850030,
  366. .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT),
  367. .mid_rid = 0xc2,
  368. }, {
  369. .slave_id = SHDMA_SLAVE_SDHI1_TX,
  370. .addr = 0xe6860030,
  371. .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT),
  372. .mid_rid = 0xc9,
  373. }, {
  374. .slave_id = SHDMA_SLAVE_SDHI1_RX,
  375. .addr = 0xe6860030,
  376. .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT),
  377. .mid_rid = 0xca,
  378. }, {
  379. .slave_id = SHDMA_SLAVE_SDHI2_TX,
  380. .addr = 0xe6870030,
  381. .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT),
  382. .mid_rid = 0xcd,
  383. }, {
  384. .slave_id = SHDMA_SLAVE_SDHI2_RX,
  385. .addr = 0xe6870030,
  386. .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT),
  387. .mid_rid = 0xce,
  388. }, {
  389. .slave_id = SHDMA_SLAVE_MMCIF_TX,
  390. .addr = 0xe6bd0034,
  391. .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
  392. .mid_rid = 0xd1,
  393. }, {
  394. .slave_id = SHDMA_SLAVE_MMCIF_RX,
  395. .addr = 0xe6bd0034,
  396. .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT),
  397. .mid_rid = 0xd2,
  398. },
  399. };
  400. static const struct sh_dmae_channel sh7372_dmae_channels[] = {
  401. {
  402. .offset = 0,
  403. .dmars = 0,
  404. .dmars_bit = 0,
  405. }, {
  406. .offset = 0x10,
  407. .dmars = 0,
  408. .dmars_bit = 8,
  409. }, {
  410. .offset = 0x20,
  411. .dmars = 4,
  412. .dmars_bit = 0,
  413. }, {
  414. .offset = 0x30,
  415. .dmars = 4,
  416. .dmars_bit = 8,
  417. }, {
  418. .offset = 0x50,
  419. .dmars = 8,
  420. .dmars_bit = 0,
  421. }, {
  422. .offset = 0x60,
  423. .dmars = 8,
  424. .dmars_bit = 8,
  425. }
  426. };
  427. static const unsigned int ts_shift[] = TS_SHIFT;
  428. static struct sh_dmae_pdata dma_platform_data = {
  429. .slave = sh7372_dmae_slaves,
  430. .slave_num = ARRAY_SIZE(sh7372_dmae_slaves),
  431. .channel = sh7372_dmae_channels,
  432. .channel_num = ARRAY_SIZE(sh7372_dmae_channels),
  433. .ts_low_shift = 3,
  434. .ts_low_mask = 0x18,
  435. .ts_high_shift = (20 - 2), /* 2 bits for shifted low TS */
  436. .ts_high_mask = 0x00300000,
  437. .ts_shift = ts_shift,
  438. .ts_shift_num = ARRAY_SIZE(ts_shift),
  439. .dmaor_init = DMAOR_DME,
  440. };
  441. /* Resource order important! */
  442. static struct resource sh7372_dmae0_resources[] = {
  443. {
  444. /* Channel registers and DMAOR */
  445. .start = 0xfe008020,
  446. .end = 0xfe00808f,
  447. .flags = IORESOURCE_MEM,
  448. },
  449. {
  450. /* DMARSx */
  451. .start = 0xfe009000,
  452. .end = 0xfe00900b,
  453. .flags = IORESOURCE_MEM,
  454. },
  455. {
  456. /* DMA error IRQ */
  457. .start = evt2irq(0x20c0),
  458. .end = evt2irq(0x20c0),
  459. .flags = IORESOURCE_IRQ,
  460. },
  461. {
  462. /* IRQ for channels 0-5 */
  463. .start = evt2irq(0x2000),
  464. .end = evt2irq(0x20a0),
  465. .flags = IORESOURCE_IRQ,
  466. },
  467. };
  468. /* Resource order important! */
  469. static struct resource sh7372_dmae1_resources[] = {
  470. {
  471. /* Channel registers and DMAOR */
  472. .start = 0xfe018020,
  473. .end = 0xfe01808f,
  474. .flags = IORESOURCE_MEM,
  475. },
  476. {
  477. /* DMARSx */
  478. .start = 0xfe019000,
  479. .end = 0xfe01900b,
  480. .flags = IORESOURCE_MEM,
  481. },
  482. {
  483. /* DMA error IRQ */
  484. .start = evt2irq(0x21c0),
  485. .end = evt2irq(0x21c0),
  486. .flags = IORESOURCE_IRQ,
  487. },
  488. {
  489. /* IRQ for channels 0-5 */
  490. .start = evt2irq(0x2100),
  491. .end = evt2irq(0x21a0),
  492. .flags = IORESOURCE_IRQ,
  493. },
  494. };
  495. /* Resource order important! */
  496. static struct resource sh7372_dmae2_resources[] = {
  497. {
  498. /* Channel registers and DMAOR */
  499. .start = 0xfe028020,
  500. .end = 0xfe02808f,
  501. .flags = IORESOURCE_MEM,
  502. },
  503. {
  504. /* DMARSx */
  505. .start = 0xfe029000,
  506. .end = 0xfe02900b,
  507. .flags = IORESOURCE_MEM,
  508. },
  509. {
  510. /* DMA error IRQ */
  511. .start = evt2irq(0x22c0),
  512. .end = evt2irq(0x22c0),
  513. .flags = IORESOURCE_IRQ,
  514. },
  515. {
  516. /* IRQ for channels 0-5 */
  517. .start = evt2irq(0x2200),
  518. .end = evt2irq(0x22a0),
  519. .flags = IORESOURCE_IRQ,
  520. },
  521. };
  522. static struct platform_device dma0_device = {
  523. .name = "sh-dma-engine",
  524. .id = 0,
  525. .resource = sh7372_dmae0_resources,
  526. .num_resources = ARRAY_SIZE(sh7372_dmae0_resources),
  527. .dev = {
  528. .platform_data = &dma_platform_data,
  529. },
  530. };
  531. static struct platform_device dma1_device = {
  532. .name = "sh-dma-engine",
  533. .id = 1,
  534. .resource = sh7372_dmae1_resources,
  535. .num_resources = ARRAY_SIZE(sh7372_dmae1_resources),
  536. .dev = {
  537. .platform_data = &dma_platform_data,
  538. },
  539. };
  540. static struct platform_device dma2_device = {
  541. .name = "sh-dma-engine",
  542. .id = 2,
  543. .resource = sh7372_dmae2_resources,
  544. .num_resources = ARRAY_SIZE(sh7372_dmae2_resources),
  545. .dev = {
  546. .platform_data = &dma_platform_data,
  547. },
  548. };
  549. static struct platform_device *sh7372_early_devices[] __initdata = {
  550. &scif0_device,
  551. &scif1_device,
  552. &scif2_device,
  553. &scif3_device,
  554. &scif4_device,
  555. &scif5_device,
  556. &scif6_device,
  557. &cmt10_device,
  558. &tmu00_device,
  559. &tmu01_device,
  560. };
  561. static struct platform_device *sh7372_late_devices[] __initdata = {
  562. &iic0_device,
  563. &iic1_device,
  564. &dma0_device,
  565. &dma1_device,
  566. &dma2_device,
  567. };
  568. void __init sh7372_add_standard_devices(void)
  569. {
  570. platform_add_devices(sh7372_early_devices,
  571. ARRAY_SIZE(sh7372_early_devices));
  572. platform_add_devices(sh7372_late_devices,
  573. ARRAY_SIZE(sh7372_late_devices));
  574. }
  575. void __init sh7372_add_early_devices(void)
  576. {
  577. early_platform_add_devices(sh7372_early_devices,
  578. ARRAY_SIZE(sh7372_early_devices));
  579. }