Skip to content

Commit 9350cd0

Browse files
committed
Merge tag 'sh-for-v6.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/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
2 parents 0099852 + 7c28a35 commit 9350cd0

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

arch/sh/boards/mach-dreamcast/irq.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ int systemasic_irq_demux(int irq)
108108
__u32 j, bit;
109109

110110
switch (irq) {
111-
case 13:
111+
case 13 + 16:
112112
level = 0;
113113
break;
114-
case 11:
114+
case 11 + 16:
115115
level = 1;
116116
break;
117-
case 9:
117+
case 9 + 16:
118118
level = 2;
119119
break;
120120
default:

arch/sh/boards/mach-highlander/setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,10 +389,10 @@ static unsigned char irl2irq[HL_NR_IRL];
389389

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

395-
return irl2irq[irq];
395+
return irl2irq[irq - 16];
396396
}
397397

398398
static void __init highlander_init_irq(void)

arch/sh/boards/mach-r2d/irq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ static unsigned char irl2irq[R2D_NR_IRL];
117117

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

123-
return irl2irq[irq];
123+
return irl2irq[irq - 16];
124124
}
125125

126126
/*

arch/sh/cchips/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ endchoice
2929
config HD64461_IRQ
3030
int "HD64461 IRQ"
3131
depends on HD64461
32-
default "36"
32+
default "52"
3333
help
34-
The default setting of the HD64461 IRQ is 36.
34+
The default setting of the HD64461 IRQ is 52.
3535

3636
Do not change this unless you know what you are doing.
3737

arch/sh/include/asm/hd64461.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
#define HD64461_NIMR HD64461_IO_OFFSET(0x5002)
230230

231231
#define HD64461_IRQBASE OFFCHIP_IRQ_BASE
232-
#define OFFCHIP_IRQ_BASE 64
232+
#define OFFCHIP_IRQ_BASE (64 + 16)
233233
#define HD64461_IRQ_NUM 16
234234

235235
#define HD64461_IRQ_UART (HD64461_IRQBASE+5)

0 commit comments

Comments
 (0)