openwrt/target/linux/lantiq
Aleksander Jan Bajkowski 5c85a3e607 lantiq: enable interrupts on second VPEs
This patch is needed to handle interrupts by the second VPE on the Lantiq
ARX100, xRX200, xRX300 and xRX330 SoCs. Switching some ICU interrupts to
the second VPE results in a hang. Currently, the vsmp_init_secondary()
function is responsible for enabling these interrupts. It only enables
Malta-specific interrupts (SW0, SW1, HW4 and HW5).

The MIPS core has 8 interrupts defined. On Lantiq SoCs, hardware
interrupts are wired to an ICU instance. Each VPE has an independent
instance of the ICU. The mapping of the ICU interrupts is shown below:
SW0(IP0) - IPI call,
SW1(IP1) - IPI resched,
HW0(IP2) - ICU 0-31,
HW1(IP3) - ICU 32-63,
HW2(IP4) - ICU 64-95,
HW3(IP5) - ICU 96-127,
HW4(IP6) - ICU 128-159,
HW5(IP7) - timer.

This patch enables all interrupt lines on the second VPE.

This problem affects multithreaded SoCs with a custom interrupt controller.
SOCs with 1004Kc core and newer use the MIPS GIC. At this point, I am aware
that the Realtek RTL839x and RTL930x SoCs may need a similar fix. In the
future, this may be replaced with some generic solution.

Tested on Lantiq xRX200.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
(cherry picked from commit fbd33d6164)
2022-11-27 14:03:08 +01:00
..
ase target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
base-files treewide: drop shebang from non-executable lib files 2021-01-29 14:29:41 +01:00
falcon kernel: drop empty kmod-ledtrig-* packages 2021-01-15 18:24:31 +01:00
files lantiq: flag FritzBox 7360 family buttons active-low 2022-01-15 22:49:28 +01:00
image lantiq: set maximum kernel size for P2812HNUF3 2021-11-27 23:00:31 +01:00
patches-5.4 lantiq: enable interrupts on second VPEs 2022-11-27 14:03:08 +01:00
xrx200 ltq-deu: Mark lantiq DEU broken 2021-07-02 19:22:13 +02:00
xway kernel: move some disabled symbols to generic 2020-12-22 19:11:50 +01:00
xway_legacy treewide: do not disable LED triggers in target config 2021-01-15 18:22:45 +01:00
config-5.4 kernel: unify CONFIG_GPIO_SYSFS in kernel configs 2020-08-06 12:37:04 +02:00
Makefile target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
modules.mk target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00