setup-sh7780.c 14 KB

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