Project 'Librem5/linux-next' was moved to 'Librem5/linux'. Please update any links and bookmarks that may still have the old path.
irqchip: irq-imx-gpcv2: Add workaround for i.MX8MQ ERR11171
i.MX8MQ is missing the wake_request signals from GIC to GPCv2. This indirectly breaks cpuidle support due to inability to wake target cores on IPIs. Here is the link to the errata (see e11171): https://www.nxp.com/docs/en/errata/IMX8MDQLQ_0N14W.pdf Now, in order to fix this, we can trigger IRQ 32 (hwirq 0) to all the cores by setting 12th bit in IOMUX_GPR1 register. In order to control the target cores only, that is, not waking up all the cores every time, we can unmask/mask the IRQ 32 in the first GPC IMR register. So basically we can leave the IOMUX_GPR1 12th bit always set and just play with the masking and unmasking the IRO 32 for each independent core. Since EL3 is the one that deals with powering down/up the cores, and since the cores wake up in EL3, EL3 should be the one to control the IMRs in this case. This implies we need to get into EL3 on every IPI to do the unmasking, leaving the masking to be done on the power-up sequence by the core itself. In order to be able to get into EL3 on each IPI, we 'hijack' the registered smp cross call handler, in this case the gic_raise_softirq which is registered by the irq-gic-v3 driver and register our own handler instead. This new handler is basically a wrapper over the hijacked handler plus the call into EL3. To get into EL3, we use a custom vendor SIP id added just for this purpose. All of this is conditional for i.MX8MQ only. Signed-off-by:Abel Vesa <abel.vesa@nxp.com>
parent
e1ca22e0
No related branches found
No related tags found