|
@@ -175,3 +175,99 @@ static struct intc_mask_reg intcs_mask_registers[] = {
|
|
|
EMUX2_EMUX20I, EMUX2_EMUX21I, MSTIF0_MST00I, MSTIF0_MST01I } },
|
|
|
{ 0xffd501a8, 0xffd501e8, 8, /* IMR10SA3 / IMCR10SA3 */
|
|
|
{ MSTIF0_MST00I, MSTIF0_MST01I, 0, 0,
|
|
|
+ 0, 0, 0, 0 } },
|
|
|
+ { 0xffd60180, 0xffd601c0, 8, /* IMR0SA4 / IMCR0SA4 */
|
|
|
+ { SPUV, 0, 0, 0,
|
|
|
+ 0, 0, 0, 0 } },
|
|
|
+};
|
|
|
+
|
|
|
+/* Priority is needed for INTCA to receive the INTCS interrupt */
|
|
|
+static struct intc_prio_reg intcs_prio_registers[] = {
|
|
|
+ { 0xffd20000, 0, 16, 4, /* IPRAS */ { CTI, 0, _2DDMAC_2DDM0, ICB } },
|
|
|
+ { 0xffd20004, 0, 16, 4, /* IPRBS */ { JPU_JPEG, LCDC, 0, LCRC } },
|
|
|
+ { 0xffd20008, 0, 16, 4, /* IPRCS */ { BBIF2, 0, 0, 0 } },
|
|
|
+ { 0xffd2000c, 0, 16, 4, /* IPRDS */ { PINTCS_PINT1, PINTCS_PINT2,
|
|
|
+ 0, 0 } },
|
|
|
+ { 0xffd20010, 0, 16, 4, /* IPRES */ { RTDMAC_0, CEU, MFI, VPU } },
|
|
|
+ { 0xffd20014, 0, 16, 4, /* IPRFS */ { KEYSC_KEY, RTDMAC_1,
|
|
|
+ CMT2, CMT0 } },
|
|
|
+ { 0xffd20018, 0, 16, 4, /* IPRGS */ { TMU0_TUNI00, TMU0_TUNI01,
|
|
|
+ TMU0_TUNI02, TSIF1 } },
|
|
|
+ { 0xffd2001c, 0, 16, 4, /* IPRHS */ { VINT, 0, 0, 0 } },
|
|
|
+ { 0xffd20020, 0, 16, 4, /* IPRIS */ { 0, MSIOF, TSIF0, 0 } },
|
|
|
+ { 0xffd20024, 0, 16, 4, /* IPRJS */ { 0, _3DG_SGX543, MSUG, MSU } },
|
|
|
+ { 0xffd20028, 0, 16, 4, /* IPRKS */ { 0, ASA, LMB, PEP } },
|
|
|
+ { 0xffd20030, 0, 16, 4, /* IPRMS */ { 0, 0, 0, RWDT0 } },
|
|
|
+ { 0xffd50000, 0, 16, 4, /* IPRAS3 */ { RTDMAC_2, 0, 0, 0 } },
|
|
|
+ { 0xffd50004, 0, 16, 4, /* IPRBS3 */ { RTDMAC_3, 0, 0, 0 } },
|
|
|
+ { 0xffd50020, 0, 16, 4, /* IPRIS3 */ { FRC, 0, 0, 0 } },
|
|
|
+ { 0xffd50024, 0, 16, 4, /* IPRJS3 */ { LCDC1, CSIRX, DSITX0, 0 } },
|
|
|
+ { 0xffd50028, 0, 16, 4, /* IPRKS3 */ { SPU2, 0, FSI, 0 } },
|
|
|
+ { 0xffd50030, 0, 16, 4, /* IPRMS3 */ { TMU1, 0, 0, TSIF2 } },
|
|
|
+ { 0xffd50034, 0, 16, 4, /* IPRNS3 */ { CMT4, 0, 0, 0 } },
|
|
|
+ { 0xffd50038, 0, 16, 4, /* IPROS3 */ { MFIS2, CPORTS2R, 0, 0 } },
|
|
|
+ { 0xffd50040, 0, 16, 4, /* IPRQS3 */ { DMASCH1, 0, SCUW, VIO60 } },
|
|
|
+ { 0xffd50044, 0, 16, 4, /* IPRRS3 */ { VIO61, CEU21, 0, CSI21 } },
|
|
|
+ { 0xffd50048, 0, 16, 4, /* IPRSS3 */ { DSITX1_DSITX10, DSITX1_DSITX11,
|
|
|
+ DISP, DSRV } },
|
|
|
+ { 0xffd5004c, 0, 16, 4, /* IPRTS3 */ { EMUX2_EMUX20I, EMUX2_EMUX21I,
|
|
|
+ MSTIF0_MST00I, MSTIF0_MST01I } },
|
|
|
+ { 0xffd50050, 0, 16, 4, /* IPRUS3 */ { MSTIF1_MST10I, MSTIF1_MST11I,
|
|
|
+ 0, 0 } },
|
|
|
+ { 0xffd60000, 0, 16, 4, /* IPRAS4 */ { SPUV, 0, 0, 0 } },
|
|
|
+};
|
|
|
+
|
|
|
+static struct resource intcs_resources[] __initdata = {
|
|
|
+ [0] = {
|
|
|
+ .start = 0xffd20000,
|
|
|
+ .end = 0xffd201ff,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ },
|
|
|
+ [1] = {
|
|
|
+ .start = 0xffd50000,
|
|
|
+ .end = 0xffd501ff,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ },
|
|
|
+ [2] = {
|
|
|
+ .start = 0xffd60000,
|
|
|
+ .end = 0xffd601ff,
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+static struct intc_desc intcs_desc __initdata = {
|
|
|
+ .name = "sh73a0-intcs",
|
|
|
+ .resource = intcs_resources,
|
|
|
+ .num_resources = ARRAY_SIZE(intcs_resources),
|
|
|
+ .hw = INTC_HW_DESC(intcs_vectors, intcs_groups, intcs_mask_registers,
|
|
|
+ intcs_prio_registers, NULL, NULL),
|
|
|
+};
|
|
|
+
|
|
|
+static struct irqaction sh73a0_intcs_cascade;
|
|
|
+
|
|
|
+static irqreturn_t sh73a0_intcs_demux(int irq, void *dev_id)
|
|
|
+{
|
|
|
+ unsigned int evtcodeas = ioread32((void __iomem *)dev_id);
|
|
|
+
|
|
|
+ generic_handle_irq(intcs_evt2irq(evtcodeas));
|
|
|
+
|
|
|
+ return IRQ_HANDLED;
|
|
|
+}
|
|
|
+
|
|
|
+static int sh73a0_set_wake(struct irq_data *data, unsigned int on)
|
|
|
+{
|
|
|
+ return 0; /* always allow wakeup */
|
|
|
+}
|
|
|
+
|
|
|
+#define RELOC_BASE 0x1200
|
|
|
+
|
|
|
+/* INTCA IRQ pins at INTCS + RELOC_BASE to make space for GIC+INTC handling */
|
|
|
+#define INTCS_VECT_RELOC(n, vect) INTCS_VECT((n), (vect) + RELOC_BASE)
|
|
|
+
|
|
|
+INTC_IRQ_PINS_32(intca_irq_pins, 0xe6900000,
|
|
|
+ INTCS_VECT_RELOC, "sh73a0-intca-irq-pins");
|
|
|
+
|
|
|
+static int to_gic_irq(struct irq_data *data)
|
|
|
+{
|
|
|
+ unsigned int vect = irq2evt(data->irq) - INTCS_VECT_BASE;
|
|
|
+
|