[PATCH v2] sh: hd64461: fix virq offsets

Artur Rojek posted 1 patch 2 years, 7 months ago
arch/sh/cchips/Kconfig        | 4 ++--
arch/sh/include/asm/hd64461.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
[PATCH v2] sh: hd64461: fix virq offsets
Posted by Artur Rojek 2 years, 7 months ago
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>
---

v2: Make the IRQ base offset an explicit (64 + 16), as per review.

 arch/sh/cchips/Kconfig        | 4 ++--
 arch/sh/include/asm/hd64461.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/sh/cchips/Kconfig b/arch/sh/cchips/Kconfig
index efde2edb5627..9659a0bc58de 100644
--- a/arch/sh/cchips/Kconfig
+++ b/arch/sh/cchips/Kconfig
@@ -29,9 +29,9 @@ endchoice
 config HD64461_IRQ
 	int "HD64461 IRQ"
 	depends on HD64461
-	default "36"
+	default "52"
 	help
-	  The default setting of the HD64461 IRQ is 36.
+	  The default setting of the HD64461 IRQ is 52.
 
 	  Do not change this unless you know what you are doing.
 
diff --git a/arch/sh/include/asm/hd64461.h b/arch/sh/include/asm/hd64461.h
index afb24cb034b1..d2c485fa333b 100644
--- a/arch/sh/include/asm/hd64461.h
+++ b/arch/sh/include/asm/hd64461.h
@@ -229,7 +229,7 @@
 #define	HD64461_NIMR		HD64461_IO_OFFSET(0x5002)
 
 #define	HD64461_IRQBASE		OFFCHIP_IRQ_BASE
-#define	OFFCHIP_IRQ_BASE	64
+#define	OFFCHIP_IRQ_BASE	(64 + 16)
 #define	HD64461_IRQ_NUM		16
 
 #define	HD64461_IRQ_UART	(HD64461_IRQBASE+5)
-- 
2.41.0
Re: [PATCH v2] sh: hd64461: fix virq offsets
Posted by Geert Uytterhoeven 2 years, 7 months ago
On Tue, Jul 11, 2023 at 1:31 AM Artur Rojek <contact@artur-rojek.eu> wrote:
> 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>
> ---
>
> v2: Make the IRQ base offset an explicit (64 + 16), as per review.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Re: [PATCH v2] sh: hd64461: fix virq offsets
Posted by John Paul Adrian Glaubitz 2 years, 7 months ago
On Tue, 2023-07-11 at 01:31 +0200, Artur Rojek wrote:
> 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>
> ---
> 
> v2: Make the IRQ base offset an explicit (64 + 16), as per review.
> 
>  arch/sh/cchips/Kconfig        | 4 ++--
>  arch/sh/include/asm/hd64461.h | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/sh/cchips/Kconfig b/arch/sh/cchips/Kconfig
> index efde2edb5627..9659a0bc58de 100644
> --- a/arch/sh/cchips/Kconfig
> +++ b/arch/sh/cchips/Kconfig
> @@ -29,9 +29,9 @@ endchoice
>  config HD64461_IRQ
>  	int "HD64461 IRQ"
>  	depends on HD64461
> -	default "36"
> +	default "52"
>  	help
> -	  The default setting of the HD64461 IRQ is 36.
> +	  The default setting of the HD64461 IRQ is 52.
>  
>  	  Do not change this unless you know what you are doing.
>  
> diff --git a/arch/sh/include/asm/hd64461.h b/arch/sh/include/asm/hd64461.h
> index afb24cb034b1..d2c485fa333b 100644
> --- a/arch/sh/include/asm/hd64461.h
> +++ b/arch/sh/include/asm/hd64461.h
> @@ -229,7 +229,7 @@
>  #define	HD64461_NIMR		HD64461_IO_OFFSET(0x5002)
>  
>  #define	HD64461_IRQBASE		OFFCHIP_IRQ_BASE
> -#define	OFFCHIP_IRQ_BASE	64
> +#define	OFFCHIP_IRQ_BASE	(64 + 16)
>  #define	HD64461_IRQ_NUM		16
>  
>  #define	HD64461_IRQ_UART	(HD64461_IRQBASE+5)

Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Re: [PATCH v2] sh: hd64461: fix virq offsets
Posted by John Paul Adrian Glaubitz 2 years, 7 months ago
On Tue, 2023-07-11 at 01:31 +0200, Artur Rojek wrote:
> 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>
> ---
> 
> v2: Make the IRQ base offset an explicit (64 + 16), as per review.
> 
>  arch/sh/cchips/Kconfig        | 4 ++--
>  arch/sh/include/asm/hd64461.h | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/sh/cchips/Kconfig b/arch/sh/cchips/Kconfig
> index efde2edb5627..9659a0bc58de 100644
> --- a/arch/sh/cchips/Kconfig
> +++ b/arch/sh/cchips/Kconfig
> @@ -29,9 +29,9 @@ endchoice
>  config HD64461_IRQ
>  	int "HD64461 IRQ"
>  	depends on HD64461
> -	default "36"
> +	default "52"
>  	help
> -	  The default setting of the HD64461 IRQ is 36.
> +	  The default setting of the HD64461 IRQ is 52.
>  
>  	  Do not change this unless you know what you are doing.
>  
> diff --git a/arch/sh/include/asm/hd64461.h b/arch/sh/include/asm/hd64461.h
> index afb24cb034b1..d2c485fa333b 100644
> --- a/arch/sh/include/asm/hd64461.h
> +++ b/arch/sh/include/asm/hd64461.h
> @@ -229,7 +229,7 @@
>  #define	HD64461_NIMR		HD64461_IO_OFFSET(0x5002)
>  
>  #define	HD64461_IRQBASE		OFFCHIP_IRQ_BASE
> -#define	OFFCHIP_IRQ_BASE	64
> +#define	OFFCHIP_IRQ_BASE	(64 + 16)
>  #define	HD64461_IRQ_NUM		16
>  
>  #define	HD64461_IRQ_UART	(HD64461_IRQBASE+5)

Applied to my for-linus branch.

Thanks,
Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913