INTC woes on HP Jornada 600-series
Greetings,
I recall bugging Magnus about adding this patch. Rediscoverd it when I couldn't get the Compact Flash going (se earlier mail).
Anyhow, I'm looking for the correct place to put this.
With this patch applied, matt's patch works fine.
drivers/sh/intc.c +12 -0
@@ -230,6 +230,18 @@ static void intc_disable(unsigned int irq) intc_disable_fns[_INTC_MODE (handle)](addr, handle,intc_reg_fns\ [_INTC_FN (handle)], irq); } + +#ifdef CONFIG_CPU_SUBTYPE_SH7709 +/* We need to unmask IRQ0->IRQ5 +* to keep the interrupts coming. +* Otherwise we end up with timeouts +* on PCMCIA/CF devices. */ +if ((irq >31 ) && (irq <37 )) { + cpu =__raw_readb (0xA4000004 );/* IRR0 */ + cpu &= ~(1 << (irq -32 )); +__raw_writeb (cpu,0xA4000004 ); + } +#endif }#if defined(CONFIG_CPU_SH3 ) || defined(CONFIG_CPU_SH4A )
Signature · 1 line
Kristoffer Ericson <[email protected]>
drivers/sh/intc.c +12 -0
@@ -230,6 +230,18 @@ static void intc_disable(unsigned int irq) intc_disable_fns[_INTC_MODE (handle)](addr, handle,intc_reg_fns\ [_INTC_FN (handle)], irq); } + +#ifdef CONFIG_CPU_SUBTYPE_SH7709 +/* We need to unmask IRQ0->IRQ5 +* to keep the interrupts coming. +* Otherwise we end up with timeouts +* on PCMCIA/CF devices. */ +if ((irq >31 ) && (irq <37 )) { + cpu =__raw_readb (0xA4000004 );/* IRR0 */ + cpu &= ~(1 << (irq -32 )); +__raw_writeb (cpu,0xA4000004 ); + } +#endif }#if defined(CONFIG_CPU_SH3 ) || defined(CONFIG_CPU_SH4A )
Hi Kristoffer,
Your patch seems to be acknowleding external interrupt sources using the IRR0 register. The intc code is supposed to handle this already, but maybe there is some case that's not fully covered. I suggest you look into how ack_registers[] in setup-sh3.c is being used.
/ magnus
Quoted 38 lines · Kristoffer Ericson
Greetings,
I recall bugging Magnus about adding this patch. Rediscoverd it when I couldn't get the Compact Flash going (se earlier mail).
Anyhow, I'm looking for the correct place to put this.With this patch applied, matt's patch works fine.
drivers/sh/intc.c +12
-1@@ -230,6 +230,18 @@ static void intc_disable(unsigned int irq) intc_disable_fns[_INTC_MODE (handle)](addr, handle,intc_reg_fns\ [_INTC_FN (handle)], irq); } + +#ifdef CONFIG_CPU_SUBTYPE_SH7709 +/* We need to unmask IRQ0->IRQ5 +* to keep the interrupts coming. +* Otherwise we end up with timeouts +* on PCMCIA/CF devices. */ +if ((irq >31 ) && (irq <37 )) { + cpu =__raw_readb (0xA4000004 );/* IRR0 */ + cpu &= ~(1 << (irq -32 )); +__raw_writeb (cpu,0xA4000004 ); + } +#endif }#if defined(CONFIG_CPU_SH3 ) || defined(CONFIG_CPU_SH4A ) --Kristoffer Ericson <[email protected]>