linux-m68k.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] m68k: coldfire: fix irq ranges
@ 2021-04-08 21:37 Angelo Dureghello
  2021-04-12  7:37 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Angelo Dureghello @ 2021-04-08 21:37 UTC (permalink / raw)
  To: gerg; +Cc: geert, linux-m68k, Angelo Dureghello

Working on flexcan0, there was no way to have irq 128 working.
Fix irq 128 and 196 setup.

Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
---
Change for v2:
  line 85, fix >= into >
---
 arch/m68k/coldfire/intc-simr.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/m68k/coldfire/intc-simr.c b/arch/m68k/coldfire/intc-simr.c
index 15c4b7a6e38f..f7c2c41b3156 100644
--- a/arch/m68k/coldfire/intc-simr.c
+++ b/arch/m68k/coldfire/intc-simr.c
@@ -68,9 +68,9 @@ static void intc_irq_mask(struct irq_data *d)
 {
 	unsigned int irq = d->irq - MCFINT_VECBASE;
 
-	if (MCFINTC2_SIMR && (irq > 128))
+	if (MCFINTC2_SIMR && (irq > 127))
 		__raw_writeb(irq - 128, MCFINTC2_SIMR);
-	else if (MCFINTC1_SIMR && (irq > 64))
+	else if (MCFINTC1_SIMR && (irq > 63))
 		__raw_writeb(irq - 64, MCFINTC1_SIMR);
 	else
 		__raw_writeb(irq, MCFINTC0_SIMR);
@@ -80,9 +80,9 @@ static void intc_irq_unmask(struct irq_data *d)
 {
 	unsigned int irq = d->irq - MCFINT_VECBASE;
 
-	if (MCFINTC2_CIMR && (irq > 128))
+	if (MCFINTC2_CIMR && (irq > 127))
 		__raw_writeb(irq - 128, MCFINTC2_CIMR);
-	else if (MCFINTC1_CIMR && (irq > 64))
+	else if (MCFINTC1_CIMR && (irq > 63))
 		__raw_writeb(irq - 64, MCFINTC1_CIMR);
 	else
 		__raw_writeb(irq, MCFINTC0_CIMR);
@@ -115,9 +115,9 @@ static unsigned int intc_irq_startup(struct irq_data *d)
 	}
 
 	irq -= MCFINT_VECBASE;
-	if (MCFINTC2_ICR0 && (irq > 128))
+	if (MCFINTC2_ICR0 && (irq > 127))
 		__raw_writeb(5, MCFINTC2_ICR0 + irq - 128);
-	else if (MCFINTC1_ICR0 && (irq > 64))
+	else if (MCFINTC1_ICR0 && (irq > 63))
 		__raw_writeb(5, MCFINTC1_ICR0 + irq - 64);
 	else
 		__raw_writeb(5, MCFINTC0_ICR0 + irq);
-- 
2.31.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] m68k: coldfire: fix irq ranges
  2021-04-08 21:37 [PATCH v2] m68k: coldfire: fix irq ranges Angelo Dureghello
@ 2021-04-12  7:37 ` Geert Uytterhoeven
  0 siblings, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2021-04-12  7:37 UTC (permalink / raw)
  To: Angelo Dureghello; +Cc: Greg Ungerer, Linux/m68k

On Thu, Apr 8, 2021 at 11:38 PM Angelo Dureghello
<angelo@kernel-space.org> wrote:
> Working on flexcan0, there was no way to have irq 128 working.
> Fix irq 128 and 196 setup.
>
> Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] m68k: coldfire: fix irq ranges
@ 2021-04-22 22:31 Greg Ungerer
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Ungerer @ 2021-04-22 22:31 UTC (permalink / raw)
  To: angelo; +Cc: Geert Uytterhoeven, Linux/m68k

Hi Angelo,

Sorry for the slow pick up of this. Some email problems caused me
to not get the original emails (saw this in the archives).

Applied to m68knommu git tree, for-next branch.

Regards
Greg


> Working on flexcan0, there was no way to have irq 128 working.
> Fix irq 128 and 196 setup.
> 
> Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
> ---
> Change for v2:
>   line 85, fix >= into >
> ---
>  arch/m68k/coldfire/intc-simr.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/m68k/coldfire/intc-simr.c b/arch/m68k/coldfire/intc-simr.c
> index 15c4b7a6e38f..f7c2c41b3156 100644
> --- a/arch/m68k/coldfire/intc-simr.c
> +++ b/arch/m68k/coldfire/intc-simr.c
> @@ -68,9 +68,9 @@ static void intc_irq_mask(struct irq_data *d)
>  {
>  	unsigned int irq = d->irq - MCFINT_VECBASE;
>  
> -	if (MCFINTC2_SIMR && (irq > 128))
> +	if (MCFINTC2_SIMR && (irq > 127))
>  		__raw_writeb(irq - 128, MCFINTC2_SIMR);
> -	else if (MCFINTC1_SIMR && (irq > 64))
> +	else if (MCFINTC1_SIMR && (irq > 63))
>  		__raw_writeb(irq - 64, MCFINTC1_SIMR);
>  	else
>  		__raw_writeb(irq, MCFINTC0_SIMR);
> @@ -80,9 +80,9 @@ static void intc_irq_unmask(struct irq_data *d)
>  {
>  	unsigned int irq = d->irq - MCFINT_VECBASE;
>  
> -	if (MCFINTC2_CIMR && (irq > 128))
> +	if (MCFINTC2_CIMR && (irq > 127))
>  		__raw_writeb(irq - 128, MCFINTC2_CIMR);
> -	else if (MCFINTC1_CIMR && (irq > 64))
> +	else if (MCFINTC1_CIMR && (irq > 63))
>  		__raw_writeb(irq - 64, MCFINTC1_CIMR);
>  	else
>  		__raw_writeb(irq, MCFINTC0_CIMR);
> @@ -115,9 +115,9 @@ static unsigned int intc_irq_startup(struct irq_data *d)
>  	}
>  
>  	irq -= MCFINT_VECBASE;
> -	if (MCFINTC2_ICR0 && (irq > 128))
> +	if (MCFINTC2_ICR0 && (irq > 127))
>  		__raw_writeb(5, MCFINTC2_ICR0 + irq - 128);
> -	else if (MCFINTC1_ICR0 && (irq > 64))
> +	else if (MCFINTC1_ICR0 && (irq > 63))
>  		__raw_writeb(5, MCFINTC1_ICR0 + irq - 64);
>  	else
>  		__raw_writeb(5, MCFINTC0_ICR0 + irq);
> -- 
> 2.31.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-22 22:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08 21:37 [PATCH v2] m68k: coldfire: fix irq ranges Angelo Dureghello
2021-04-12  7:37 ` Geert Uytterhoeven
2021-04-22 22:31 Greg Ungerer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).