Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: hd64461: Handle virq offset for offchip IRQ base and HD64461 IRQ

A recent change to start counting SuperH IRQ #s from 16 breaks support
for the Hitachi HD64461 companion chip.

Move the offchip IRQ base and HD64461 IRQ # by 16 in order to
accommodate for the new virq numbering rules.

Fixes: a8ac2961148e ("sh: Avoid using IRQ0 on SH3 and SH4")
Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Link: https://lore.kernel.org/r/20230710233132.69734-1-contact@artur-rojek.eu
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

authored by

Artur Rojek and committed by
John Paul Adrian Glaubitz
7c28a35e 3d20f7a6

+3 -3
+2 -2
arch/sh/cchips/Kconfig
··· 29 29 config HD64461_IRQ 30 30 int "HD64461 IRQ" 31 31 depends on HD64461 32 - default "36" 32 + default "52" 33 33 help 34 - The default setting of the HD64461 IRQ is 36. 34 + The default setting of the HD64461 IRQ is 52. 35 35 36 36 Do not change this unless you know what you are doing. 37 37
+1 -1
arch/sh/include/asm/hd64461.h
··· 229 229 #define HD64461_NIMR HD64461_IO_OFFSET(0x5002) 230 230 231 231 #define HD64461_IRQBASE OFFCHIP_IRQ_BASE 232 - #define OFFCHIP_IRQ_BASE 64 232 + #define OFFCHIP_IRQ_BASE (64 + 16) 233 233 #define HD64461_IRQ_NUM 16 234 234 235 235 #define HD64461_IRQ_UART (HD64461_IRQBASE+5)