19 #include <linux/kernel.h>
22 #include <linux/module.h>
27 #include <mach/irqs.h>
159 static struct intc_group intca_groups[] __initdata = {
188 static struct intc_mask_reg intca_mask_registers[] __initdata = {
189 { 0xe6940080, 0xe69400c0, 8,
192 { 0xe6940084, 0xe69400c4, 8,
195 { 0xe6940088, 0xe69400c8, 8,
198 { 0xe694008c, 0xe69400cc, 8,
201 { 0xe6940090, 0xe69400d0, 8,
204 { 0xe6940094, 0xe69400d4, 8,
207 { 0xe6940098, 0xe69400d8, 8,
210 { 0xe694009c, 0xe69400dc, 8,
213 { 0xe69400a0, 0xe69400e0, 8,
216 { 0xe69400a4, 0xe69400e4, 8,
219 { 0xe69400a8, 0xe69400e8, 8,
222 { 0xe69400ac, 0xe69400ec, 8,
225 { 0xe69400b0, 0xe69400f0, 8,
228 { 0xe69400b4, 0xe69400f4, 8,
231 { 0xe6950080, 0xe69500c0, 8,
234 { 0xe6950090, 0xe69500d0, 8,
237 { 0xe6950094, 0xe69500d4, 8,
240 { 0xe6950098, 0xe69500d8, 8,
244 { 0xe695009c, 0xe69500dc, 8,
247 { 0xe69500a0, 0xe69500e0, 8,
250 { 0xe69500a4, 0xe69500e4, 8,
253 { 0xe69500a8, 0xe69500e8, 8,
258 static struct intc_prio_reg intca_prio_registers[] __initdata = {
263 { 0xe694000c, 0, 16, 4, { 0, 0,
278 { 0xe694002c, 0, 16, 4, {
TPU0, 0, 0, 0 } },
279 { 0xe6940030, 0, 16, 4, { 0,
CMT3, 0,
RWDT0 } },
281 { 0xe6940038, 0, 16, 4, { 0, 0,
DIRC,
SDHI2 } },
282 { 0xe6950000, 0, 16, 4, {
SHWYSTAT, 0, 0, 0 } },
283 { 0xe6950024, 0, 16, 4, { 0, 0, 0,
HDMI } },
285 { 0xe695002c, 0, 16, 4, { 0, 0, 0,
MIPI_HSI } },
288 { 0xe6950034, 0, 16, 4, {
AP_ARM2, 0, 0, 0 } },
291 { 0xe695003c, 0, 16, 4, { 0, 0,
297 { 0xe6950048, 0, 16, 4, { 0, 0,
305 intca_vectors, intca_groups,
306 intca_mask_registers, intca_prio_registers,
374 static struct intc_vect intcs_vectors[] = {
434 static struct intc_group intcs_groups[] __initdata = {
452 { 0xffd20184, 0xffd201c4, 8,
455 { 0xffd20188, 0xffd201c8, 8,
458 { 0xffd2018c, 0xffd201cc, 8,
461 { 0xffd20190, 0xffd201d0, 8,
464 { 0xffd20194, 0xffd201d4, 8,
467 { 0xffd20198, 0xffd201d8, 8,
470 { 0xffd2019c, 0xffd201dc, 8,
473 { 0xffd201a4, 0xffd201e4, 8,
476 { 0xffd201a8, 0xffd201e8, 8,
479 { 0xffd201ac, 0xffd201ec, 8,
482 { 0xffd50180, 0xffd501c0, 8,
485 { 0xffd50190, 0xffd501d0, 8,
488 { 0xffd50198, 0xffd501d8, 8,
491 { 0xffd5019c, 0xffd501dc, 8,
504 { 0xffd2001c, 0, 16, 4, { 0, 0,
VEU,
BEU } },
506 { 0xffd20028, 0, 16, 4, { 0, 0,
LMB, 0 } },
507 { 0xffd2002c, 0, 16, 4, {
IPMMU, 0, 0, 0 } },
508 { 0xffd20030, 0, 16, 4, {
IIC2, 0, 0, 0 } },
509 { 0xffd50000, 0, 16, 4, {
RTDMAC2_1, 0, 0, 0 } },
510 { 0xffd50004, 0, 16, 4, {
RTDMAC2_2, 0, 0, 0 } },
511 { 0xffd50020, 0, 16, 4, { 0,
ISP, 0, 0 } },
513 { 0xffd50030, 0, 16, 4, {
TMU1, 0, 0, 0 } },
518 { 0xffd5003c, 0, 16, 4, {
JPU6E, 0, 0, 0 } },
521 static struct resource intcs_resources[] __initdata = {
534 static struct intc_desc intcs_desc __initdata = {
535 .
name =
"sh7372-intcs",
537 .skip_syscore_suspend =
true,
538 .resource = intcs_resources,
540 .hw =
INTC_HW_DESC(intcs_vectors, intcs_groups, intcs_mask_registers,
544 static void intcs_demux(
unsigned int irq,
struct irq_desc *
desc)
546 void __iomem *
reg = (
void *)irq_get_handler_data(irq);
547 unsigned int evtcodeas =
ioread32(reg);
552 static void __iomem *intcs_ffd2;
553 static void __iomem *intcs_ffd5;
561 intevtsa = intcs_ffd2 + 0x100;
578 irq_set_chained_handler(n, intcs_demux);
584 static unsigned short ffd2[0x200];
585 static unsigned short ffd5[0x100];
591 for (k = 0x00; k <= 0x30; k += 4)
594 for (k = 0x80; k <= 0xb0; k += 4)
597 for (k = 0x180; k <= 0x188; k += 4)
600 for (k = 0x00; k <= 0x3c; k += 4)
603 for (k = 0x80; k <= 0x9c; k += 4)
611 for (k = 0x00; k <= 0x30; k += 4)
614 for (k = 0x80; k <= 0xb0; k += 4)
617 for (k = 0x180; k <= 0x188; k += 4)
620 for (k = 0x00; k <= 0x3c; k += 4)
623 for (k = 0x80; k <= 0x9c; k += 4)
627 #define E694_BASE IOMEM(0xe6940000)
628 #define E695_BASE IOMEM(0xe6950000)
630 static unsigned short e694[0x200];
631 static unsigned short e695[0x200];
637 for (k = 0x00; k <= 0x38; k += 4)
640 for (k = 0x80; k <= 0xb4; k += 4)
643 for (k = 0x180; k <= 0x1b4; k += 4)
646 for (k = 0x00; k <= 0x50; k += 4)
649 for (k = 0x80; k <= 0xa8; k += 4)
652 for (k = 0x180; k <= 0x1a8; k += 4)
660 for (k = 0x00; k <= 0x38; k += 4)
663 for (k = 0x80; k <= 0xb4; k += 4)
666 for (k = 0x180; k <= 0x1b4; k += 4)
669 for (k = 0x00; k <= 0x50; k += 4)
672 for (k = 0x80; k <= 0xa8; k += 4)
675 for (k = 0x180; k <= 0x1a8; k += 4)