setup-sh7780.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. /*
  2. * SH7780 Setup
  3. *
  4. * Copyright (C) 2006 Paul Mundt
  5. *
  6. * This file is subject to the terms and conditions of the GNU General Public
  7. * License. See the file "COPYING" in the main directory of this archive
  8. * for more details.
  9. */
  10. #include <linux/platform_device.h>
  11. #include <linux/init.h>
  12. #include <linux/serial.h>
  13. #include <linux/io.h>
  14. #include <linux/serial_sci.h>
  15. #include <linux/sh_dma.h>
  16. #include <linux/sh_timer.h>
  17. #include <linux/sh_intc.h>
  18. #include <cpu/dma-register.h>
  19. static struct plat_sci_port scif0_platform_data = {
  20. .scscr = SCSCR_REIE | SCSCR_CKE1,
  21. .type = PORT_SCIF,
  22. .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
  23. };
  24. static struct resource scif0_resources[] = {
  25. DEFINE_RES_MEM(0xffe00000, 0x100),
  26. DEFINE_RES_IRQ(evt2irq(0x700)),
  27. };
  28. static struct platform_device scif0_device = {
  29. .name = "sh-sci",
  30. .id = 0,
  31. .resource = scif0_resources,
  32. .num_resources = ARRAY_SIZE(scif0_resources),
  33. .dev = {
  34. .platform_data = &scif0_platform_data,
  35. },
  36. };
  37. static struct plat_sci_port scif1_platform_data = {
  38. .scscr = SCSCR_REIE | SCSCR_CKE1,
  39. .type = PORT_SCIF,
  40. .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
  41. };
  42. static struct resource scif1_resources[] = {
  43. DEFINE_RES_MEM(0xffe10000, 0x100),
  44. DEFINE_RES_IRQ(evt2irq(0xb80)),
  45. };
  46. static struct platform_device scif1_device = {
  47. .name = "sh-sci",
  48. .id = 1,
  49. .resource = scif1_resources,
  50. .num_resources = ARRAY_SIZE(scif1_resources),
  51. .dev = {
  52. .platform_data = &scif1_platform_data,
  53. },
  54. };
  55. static struct sh_timer_config tmu0_platform_data = {
  56. .channels_mask = 7,
  57. };
  58. static struct resource tmu0_resources[] = {
  59. DEFINE_RES_MEM(0xffd80000, 0x30),
  60. DEFINE_RES_IRQ(evt2irq(0x580)),
  61. DEFINE_RES_IRQ(evt2irq(0x5a0)),
  62. DEFINE_RES_IRQ(evt2irq(0x5c0)),
  63. };
  64. static struct platform_device tmu0_device = {
  65. .name = "sh-tmu",
  66. .id = 0,
  67. .dev = {
  68. .platform_data = &tmu0_platform_data,
  69. },
  70. .resource = tmu0_resources,
  71. .num_resources = ARRAY_SIZE(tmu0_resources),
  72. };
  73. static struct sh_timer_config tmu1_platform_data = {
  74. .channels_mask = 7,
  75. };
  76. static struct resource tmu1_resources[] = {
  77. DEFINE_RES_MEM(0xffdc0000, 0x2c),
  78. DEFINE_RES_IRQ(evt2irq(0xe00)),
  79. DEFINE_RES_IRQ(evt2irq(0xe20)),
  80. DEFINE_RES_IRQ(evt2irq(0xe40)),
  81. };
  82. static struct platform_device tmu1_device = {
  83. .name = "sh-tmu",
  84. .id = 1,
  85. .dev = {
  86. .platform_data = &tmu1_platform_data,
  87. },
  88. .resource = tmu1_resources,
  89. .num_resources = ARRAY_SIZE(tmu1_resources),
  90. };
  91. static struct resource rtc_resources[] = {
  92. [0] = {
  93. .start = 0xffe80000,
  94. .end = 0xffe80000 + 0x58 - 1,
  95. .flags = IORESOURCE_IO,
  96. },
  97. [1] = {
  98. /* Shared Period/Carry/Alarm IRQ */
  99. .start = evt2irq(0x480),
  100. .flags = IORESOURCE_IRQ,
  101. },
  102. };
  103. static struct platform_device rtc_device = {
  104. .name = "sh-rtc",
  105. .id = -1,
  106. .num_resources = ARRAY_SIZE(rtc_resources),
  107. .resource = rtc_resources,
  108. };
  109. /* DMA */
  110. static const struct sh_dmae_channel sh7780_dmae0_channels[] = {
  111. {
  112. .offset = 0,
  113. .dmars = 0,
  114. .dmars_bit = 0,
  115. }, {
  116. .offset = 0x10,
  117. .dmars = 0,
  118. .dmars_bit = 8,
  119. }, {
  120. .offset = 0x20,
  121. .dmars = 4,
  122. .dmars_bit = 0,
  123. }, {
  124. .offset = 0x30,
  125. .dmars = 4,
  126. .dmars_bit = 8,
  127. }, {
  128. .offset = 0x50,
  129. .dmars = 8,
  130. .dmars_bit = 0,
  131. }, {
  132. .offset = 0x60,
  133. .dmars = 8,
  134. .dmars_bit = 8,
  135. }
  136. };
  137. static const struct sh_dmae_channel sh7780_dmae1_channels[] = {
  138. {
  139. .offset = 0,
  140. }, {
  141. .offset = 0x10,
  142. }, {
  143. .offset = 0x20,
  144. }, {
  145. .offset = 0x30,
  146. }, {
  147. .offset = 0x50,
  148. }, {
  149. .offset = 0x60,
  150. }
  151. };
  152. static const unsigned int ts_shift[] = TS_SHIFT;
  153. static struct sh_dmae_pdata dma0_platform_data = {
  154. .channel = sh7780_dmae0_channels,
  155. .channel_num = ARRAY_SIZE(sh7780_dmae0_channels),
  156. .ts_low_shift = CHCR_TS_LOW_SHIFT,
  157. .ts_low_mask = CHCR_TS_LOW_MASK,
  158. .ts_high_shift = CHCR_TS_HIGH_SHIFT,
  159. .ts_high_mask = CHCR_TS_HIGH_MASK,
  160. .ts_shift = ts_shift,
  161. .ts_shift_num = ARRAY_SIZE(ts_shift),
  162. .dmaor_init = DMAOR_INIT,
  163. };
  164. static struct sh_dmae_pdata dma1_platform_data = {
  165. .channel = sh7780_dmae1_channels,
  166. .channel_num = ARRAY_SIZE(sh7780_dmae1_channels),
  167. .ts_low_shift = CHCR_TS_LOW_SHIFT,
  168. .ts_low_mask = CHCR_TS_LOW_MASK,
  169. .ts_high_shift = CHCR_TS_HIGH_SHIFT,
  170. .ts_high_mask = CHCR_TS_HIGH_MASK,
  171. .ts_shift = ts_shift,
  172. .ts_shift_num = ARRAY_SIZE(ts_shift),
  173. .dmaor_init = DMAOR_INIT,
  174. };
  175. static struct resource sh7780_dmae0_resources[] = {
  176. [0] = {
  177. /* Channel registers and DMAOR */
  178. .start = 0xfc808020,
  179. .end = 0xfc80808f,
  180. .flags = IORESOURCE_MEM,
  181. },
  182. [1] = {
  183. /* DMARSx */
  184. .start = 0xfc809000,
  185. .end = 0xfc80900b,
  186. .flags = IORESOURCE_MEM,
  187. },
  188. {
  189. /*
  190. * Real DMA error vector is 0x6c0, and channel
  191. * vectors are 0x640-0x6a0, 0x780-0x7a0
  192. */
  193. .name = "error_irq",
  194. .start = evt2irq(0x640),
  195. .end = evt2irq(0x640),
  196. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_SHAREABLE,
  197. },
  198. };
  199. static struct resource sh7780_dmae1_resources[] = {
  200. [0] = {
  201. /* Channel registers and DMAOR */
  202. .start = 0xfc818020,
  203. .end = 0xfc81808f,
  204. .flags = IORESOURCE_MEM,
  205. },
  206. /* DMAC1 has no DMARS */
  207. {
  208. /*
  209. * Real DMA error vector is 0x6c0, and channel
  210. * vectors are 0x7c0-0x7e0, 0xd80-0xde0
  211. */
  212. .name = "error_irq",
  213. .start = evt2irq(0x7c0),
  214. .end = evt2irq(0x7c0),
  215. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_SHAREABLE,
  216. },
  217. };
  218. static struct platform_device dma0_device = {
  219. .name = "sh-dma-engine",
  220. .id = 0,
  221. .resource = sh7780_dmae0_resources,
  222. .num_resources = ARRAY_SIZE(sh7780_dmae0_resources),
  223. .dev = {
  224. .platform_data = &dma0_platform_data,
  225. },
  226. };
  227. static struct platform_device dma1_device = {
  228. .name = "sh-dma-engine",
  229. .id = 1,
  230. .resource = sh7780_dmae1_resources,
  231. .num_resources = ARRAY_SIZE(sh7780_dmae1_resources),
  232. .dev = {
  233. .platform_data = &dma1_platform_data,
  234. },
  235. };
  236. static struct platform_device *sh7780_devices[] __initdata = {
  237. &scif0_device,
  238. &scif1_device,
  239. &tmu0_device,
  240. &tmu1_device,
  241. &rtc_device,
  242. &dma0_device,
  243. &dma1_device,
  244. };
  245. static int __init sh7780_devices_setup(void)
  246. {
  247. return platform_add_devices(sh7780_devices,
  248. ARRAY_SIZE(sh7780_devices));
  249. }
  250. arch_initcall(sh7780_devices_setup);
  251. static struct platform_device *sh7780_early_devices[] __initdata = {
  252. &scif0_device,
  253. &scif1_device,
  254. &tmu0_device,
  255. &tmu1_device,
  256. };
  257. void __init plat_early_device_setup(void)
  258. {
  259. if (mach_is_sh2007()) {
  260. scif0_platform_data.scscr &= ~SCSCR_CKE1;
  261. scif1_platform_data.scscr &= ~SCSCR_CKE1;
  262. }
  263. early_platform_add_devices(sh7780_early_devices,
  264. ARRAY_SIZE(sh7780_early_devices));
  265. }
  266. enum {
  267. UNUSED = 0,
  268. /* interrupt sources */
  269. IRL_LLLL, IRL_LLLH, IRL_LLHL, IRL_LLHH,
  270. IRL_LHLL, IRL_LHLH, IRL_LHHL, IRL_LHHH,
  271. IRL_HLLL, IRL_HLLH, IRL_HLHL, IRL_HLHH,
  272. IRL_HHLL, IRL_HHLH, IRL_HHHL,
  273. IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7,
  274. RTC, WDT, TMU0, TMU1, TMU2, TMU2_TICPI,
  275. HUDI, DMAC0, SCIF0, DMAC1, CMT, HAC,
  276. PCISERR, PCIINTA, PCIINTB, PCIINTC, PCIINTD, PCIC5,
  277. SCIF1, SIOF, HSPI, MMCIF, TMU3, TMU4, TMU5, SSI, FLCTL, GPIO,
  278. /* interrupt groups */
  279. TMU012, TMU345,
  280. };
  281. static struct intc_vect vectors[] __initdata = {
  282. INTC_VECT(RTC, 0x480), INTC_VECT(RTC, 0x4a0),
  283. INTC_VECT(RTC, 0x4c0),
  284. INTC_VECT(WDT, 0x560),
  285. INTC_VECT(TMU0, 0x580), INTC_VECT(TMU1, 0x5a0),
  286. INTC_VECT(TMU2, 0x5c0), INTC_VECT(TMU2_TICPI, 0x5e0),
  287. INTC_VECT(HUDI, 0x600),
  288. INTC_VECT(DMAC0, 0x640), INTC_VECT(DMAC0, 0x660),
  289. INTC_VECT(DMAC0, 0x680), INTC_VECT(DMAC0, 0x6a0),
  290. INTC_VECT(DMAC0, 0x6c0),
  291. INTC_VECT(SCIF0, 0x700), INTC_VECT(SCIF0, 0x720),
  292. INTC_VECT(SCIF0, 0x740), INTC_VECT(SCIF0, 0x760),
  293. INTC_VECT(DMAC0, 0x780), INTC_VECT(DMAC0, 0x7a0),
  294. INTC_VECT(DMAC1, 0x7c0), INTC_VECT(DMAC1, 0x7e0),
  295. INTC_VECT(CMT, 0x900), INTC_VECT(HAC, 0x980),
  296. INTC_VECT(PCISERR, 0xa00), INTC_VECT(PCIINTA, 0xa20),
  297. INTC_VECT(PCIINTB, 0xa40), INTC_VECT(PCIINTC, 0xa60),
  298. INTC_VECT(PCIINTD, 0xa80), INTC_VECT(PCIC5, 0xaa0),
  299. INTC_VECT(PCIC5, 0xac0), INTC_VECT(PCIC5, 0xae0),
  300. INTC_VECT(PCIC5, 0xb00), INTC_VECT(PCIC5, 0xb20),
  301. INTC_VECT(SCIF1, 0xb80), INTC_VECT(SCIF1, 0xba0),
  302. INTC_VECT(SCIF1, 0xbc0), INTC_VECT(SCIF1, 0xbe0),
  303. INTC_VECT(SIOF, 0xc00), INTC_VECT(HSPI, 0xc80),
  304. INTC_VECT(MMCIF, 0xd00), INTC_VECT(MMCIF, 0xd20),
  305. INTC_VECT(MMCIF, 0xd40), INTC_VECT(MMCIF, 0xd60),
  306. INTC_VECT(DMAC1, 0xd80), INTC_VECT(DMAC1, 0xda0),
  307. INTC_VECT(DMAC1, 0xdc0), INTC_VECT(DMAC1, 0xde0),
  308. INTC_VECT(TMU3, 0xe00), INTC_VECT(TMU4, 0xe20),
  309. INTC_VECT(TMU5, 0xe40),
  310. INTC_VECT(SSI, 0xe80),
  311. INTC_VECT(FLCTL, 0xf00), INTC_VECT(FLCTL, 0xf20),
  312. INTC_VECT(FLCTL, 0xf40), INTC_VECT(FLCTL, 0xf60),
  313. INTC_VECT(GPIO, 0xf80), INTC_VECT(GPIO, 0xfa0),
  314. INTC_VECT(GPIO, 0xfc0), INTC_VECT(GPIO, 0xfe0),
  315. };
  316. static struct intc_group groups[] __initdata = {
  317. INTC_GROUP(TMU012, TMU0, TMU1, TMU2, TMU2_TICPI),
  318. INTC_GROUP(TMU345, TMU3, TMU4, TMU5),
  319. };
  320. static struct intc_mask_reg mask_registers[] __initdata = {
  321. { 0xffd40038, 0xffd4003c, 32, /* INT2MSKR / INT2MSKCR */
  322. { 0, 0, 0, 0, 0, 0, GPIO, FLCTL,
  323. SSI, MMCIF, HSPI, SIOF, PCIC5, PCIINTD, PCIINTC, PCIINTB,
  324. PCIINTA, PCISERR, HAC, CMT, 0, 0, DMAC1, DMAC0,
  325. HUDI, 0, WDT, SCIF1, SCIF0, RTC, TMU345, TMU012 } },
  326. };
  327. static struct intc_prio_reg prio_registers[] __initdata = {
  328. { 0xffd40000, 0, 32, 8, /* INT2PRI0 */ { TMU0, TMU1,
  329. TMU2, TMU2_TICPI } },
  330. { 0xffd40004, 0, 32, 8, /* INT2PRI1 */ { TMU3, TMU4, TMU5, RTC } },
  331. { 0xffd40008, 0, 32, 8, /* INT2PRI2 */ { SCIF0, SCIF1, WDT } },
  332. { 0xffd4000c, 0, 32, 8, /* INT2PRI3 */ { HUDI, DMAC0, DMAC1 } },
  333. { 0xffd40010, 0, 32, 8, /* INT2PRI4 */ { CMT, HAC,
  334. PCISERR, PCIINTA, } },
  335. { 0xffd40014, 0, 32, 8, /* INT2PRI5 */ { PCIINTB, PCIINTC,
  336. PCIINTD, PCIC5 } },
  337. { 0xffd40018, 0, 32, 8, /* INT2PRI6 */ { SIOF, HSPI, MMCIF, SSI } },
  338. { 0xffd4001c, 0, 32, 8, /* INT2PRI7 */ { FLCTL, GPIO } },
  339. };
  340. static DECLARE_INTC_DESC(intc_desc, "sh7780", vectors, groups,
  341. mask_registers, prio_registers, NULL);
  342. /* Support for external interrupt pins in IRQ mode */
  343. static struct intc_vect irq_vectors[] __initdata = {
  344. INTC_VECT(IRQ0, 0x240), INTC_VECT(IRQ1, 0x280),
  345. INTC_VECT(IRQ2, 0x2c0), INTC_VECT(IRQ3, 0x300),
  346. INTC_VECT(IRQ4, 0x340), INTC_VECT(IRQ5, 0x380),
  347. INTC_VECT(IRQ6, 0x3c0), INTC_VECT(IRQ7, 0x200),
  348. };
  349. static struct intc_mask_reg irq_mask_registers[] __initdata = {
  350. { 0xffd00044, 0xffd00064, 32, /* INTMSK0 / INTMSKCLR0 */
  351. { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
  352. };
  353. static struct intc_prio_reg irq_prio_registers[] __initdata = {
  354. { 0xffd00010, 0, 32, 4, /* INTPRI */ { IRQ0, IRQ1, IRQ2, IRQ3,
  355. IRQ4, IRQ5, IRQ6, IRQ7 } },
  356. };
  357. static struct intc_sense_reg irq_sense_registers[] __initdata = {
  358. { 0xffd0001c, 32, 2, /* ICR1 */ { IRQ0, IRQ1, IRQ2, IRQ3,
  359. IRQ4, IRQ5, IRQ6, IRQ7 } },
  360. };
  361. static struct intc_mask_reg irq_ack_registers[] __initdata = {
  362. { 0xffd00024, 0, 32, /* INTREQ */
  363. { IRQ0, IRQ1, IRQ2, IRQ3, IRQ4, IRQ5, IRQ6, IRQ7 } },
  364. };
  365. static DECLARE_INTC_DESC_ACK(intc_irq_desc, "sh7780-irq", irq_vectors,
  366. NULL, irq_mask_registers, irq_prio_registers,
  367. irq_sense_registers, irq_ack_registers);
  368. /* External interrupt pins in IRL mode */
  369. static struct intc_vect irl_vectors[] __initdata = {
  370. INTC_VECT(IRL_LLLL, 0x200), INTC_VECT(IRL_LLLH, 0x220),
  371. INTC_VECT(IRL_LLHL, 0x240), INTC_VECT(IRL_LLHH, 0x260),
  372. INTC_VECT(IRL_LHLL, 0x280), INTC_VECT(IRL_LHLH, 0x2a0),
  373. INTC_VECT(IRL_LHHL, 0x2c0), INTC_VECT(IRL_LHHH, 0x2e0),
  374. INTC_VECT(IRL_HLLL, 0x300), INTC_VECT(IRL_HLLH, 0x320),
  375. INTC_VECT(IRL_HLHL, 0x340), INTC_VECT(IRL_HLHH, 0x360),
  376. INTC_VECT(IRL_HHLL, 0x380), INTC_VECT(IRL_HHLH, 0x3a0),
  377. INTC_VECT(IRL_HHHL, 0x3c0),
  378. };
  379. static struct intc_mask_reg irl3210_mask_registers[] __initdata = {
  380. { 0xffd40080, 0xffd40084, 32, /* INTMSK2 / INTMSKCLR2 */
  381. { IRL_LLLL, IRL_LLLH, IRL_LLHL, IRL_LLHH,
  382. IRL_LHLL, IRL_LHLH, IRL_LHHL, IRL_LHHH,
  383. IRL_HLLL, IRL_HLLH, IRL_HLHL, IRL_HLHH,
  384. IRL_HHLL, IRL_HHLH, IRL_HHHL, } },
  385. };
  386. static struct intc_mask_reg irl7654_mask_registers[] __initdata = {
  387. { 0xffd40080, 0xffd40084, 32, /* INTMSK2 / INTMSKCLR2 */
  388. { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  389. IRL_LLLL, IRL_LLLH, IRL_LLHL, IRL_LLHH,
  390. IRL_LHLL, IRL_LHLH, IRL_LHHL, IRL_LHHH,
  391. IRL_HLLL, IRL_HLLH, IRL_HLHL, IRL_HLHH,
  392. IRL_HHLL, IRL_HHLH, IRL_HHHL, } },
  393. };
  394. static DECLARE_INTC_DESC(intc_irl7654_desc, "sh7780-irl7654", irl_vectors,
  395. NULL, irl7654_mask_registers, NULL, NULL);
  396. static DECLARE_INTC_DESC(intc_irl3210_desc, "sh7780-irl3210", irl_vectors,
  397. NULL, irl3210_mask_registers, NULL, NULL);
  398. #define INTC_ICR0 0xffd00000
  399. #define INTC_INTMSK0 0xffd00044
  400. #define INTC_INTMSK1 0xffd00048
  401. #define INTC_INTMSK2 0xffd40080
  402. #define INTC_INTMSKCLR1 0xffd00068
  403. #define INTC_INTMSKCLR2 0xffd40084
  404. void __init plat_irq_setup(void)
  405. {
  406. /* disable IRQ7-0 */
  407. __raw_writel(0xff000000, INTC_INTMSK0);
  408. /* disable IRL3-0 + IRL7-4 */
  409. __raw_writel(0xc0000000, INTC_INTMSK1);
  410. __raw_writel(0xfffefffe, INTC_INTMSK2);
  411. /* select IRL mode for IRL3-0 + IRL7-4 */
  412. __raw_writel(__raw_readl(INTC_ICR0) & ~0x00c00000, INTC_ICR0);
  413. /* disable holding function, ie enable "SH-4 Mode" */
  414. __raw_writel(__raw_readl(INTC_ICR0) | 0x00200000, INTC_ICR0);
  415. register_intc_controller(&intc_desc);
  416. }
  417. void __init plat_irq_setup_pins(int mode)
  418. {
  419. switch (mode) {
  420. case IRQ_MODE_IRQ:
  421. /* select IRQ mode for IRL3-0 + IRL7-4 */
  422. __raw_writel(__raw_readl(INTC_ICR0) | 0x00c00000, INTC_ICR0);
  423. register_intc_controller(&intc_irq_desc);
  424. break;
  425. case IRQ_MODE_IRL7654:
  426. /* enable IRL7-4 but don't provide any masking */
  427. __raw_writel(0x40000000, INTC_INTMSKCLR1);
  428. __raw_writel(0x0000fffe, INTC_INTMSKCLR2);
  429. break;
  430. case IRQ_MODE_IRL3210:
  431. /* enable IRL0-3 but don't provide any masking */
  432. __raw_writel(0x80000000, INTC_INTMSKCLR1);
  433. __raw_writel(0xfffe0000, INTC_INTMSKCLR2);
  434. break;
  435. case IRQ_MODE_IRL7654_MASK:
  436. /* enable IRL7-4 and mask using cpu intc controller */
  437. __raw_writel(0x40000000, INTC_INTMSKCLR1);
  438. register_intc_controller(&intc_irl7654_desc);
  439. break;
  440. case IRQ_MODE_IRL3210_MASK:
  441. /* enable IRL0-3 and mask using cpu intc controller */
  442. __raw_writel(0x80000000, INTC_INTMSKCLR1);
  443. register_intc_controller(&intc_irl3210_desc);
  444. break;
  445. default:
  446. BUG();
  447. }
  448. }