setup-sh7780.c 14 KB

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