Skip to content

Commit

Permalink
Merge tag 'sh-for-v6.5-tag2' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/glaubitz/sh-linux

Pull sh fixes from John Paul Adrian Glaubitz:
 "The sh updates introduced multiple regressions.

  In particular, the change a8ac296 ("sh: Avoid using IRQ0 on SH3
  and SH4") causes several boards to hang during boot due to incorrect
  IRQ numbers.

  Geert Uytterhoeven has contributed patches that handle the virq offset
  in the IRQ code for the dreamcast, highlander and r2d boards while
  Artur Rojek has contributed a patch which handles the virq offset for
  the hd64461 companion chip"

* tag 'sh-for-v6.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux:
  sh: hd64461: Handle virq offset for offchip IRQ base and HD64461 IRQ
  sh: mach-dreamcast: Handle virq offset in cascaded IRQ demux
  sh: mach-highlander: Handle virq offset in cascaded IRL demux
  sh: mach-r2d: Handle virq offset in cascaded IRL demux
  • Loading branch information
torvalds committed Jul 13, 2023
2 parents 0099852 + 7c28a35 commit 9350cd0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions arch/sh/boards/mach-dreamcast/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ int systemasic_irq_demux(int irq)
__u32 j, bit;

switch (irq) {
case 13:
case 13 + 16:
level = 0;
break;
case 11:
case 11 + 16:
level = 1;
break;
case 9:
case 9 + 16:
level = 2;
break;
default:
Expand Down
4 changes: 2 additions & 2 deletions arch/sh/boards/mach-highlander/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,10 @@ static unsigned char irl2irq[HL_NR_IRL];

static int highlander_irq_demux(int irq)
{
if (irq >= HL_NR_IRL || irq < 0 || !irl2irq[irq])
if (irq >= HL_NR_IRL + 16 || irq < 16 || !irl2irq[irq - 16])
return irq;

return irl2irq[irq];
return irl2irq[irq - 16];
}

static void __init highlander_init_irq(void)
Expand Down
4 changes: 2 additions & 2 deletions arch/sh/boards/mach-r2d/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ static unsigned char irl2irq[R2D_NR_IRL];

int rts7751r2d_irq_demux(int irq)
{
if (irq >= R2D_NR_IRL || irq < 0 || !irl2irq[irq])
if (irq >= R2D_NR_IRL + 16 || irq < 16 || !irl2irq[irq - 16])
return irq;

return irl2irq[irq];
return irl2irq[irq - 16];
}

/*
Expand Down
4 changes: 2 additions & 2 deletions arch/sh/cchips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion arch/sh/include/asm/hd64461.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9350cd0

Please sign in to comment.