sh: fix r2d board detection

This patch fixes the R2D-PLUS and R2D-1 board detection code. Tested on two
R2D-PLUS and two R2D-1 boards.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
Magnus Damm 2007-10-10 18:03:58 +09:00 committed by Paul Mundt
parent 63482aaada
commit 9cbf3be67d

View file

@ -130,7 +130,7 @@ void __init init_rts7751r2d_IRQ(void)
{ {
struct intc_desc *d; struct intc_desc *d;
switch (ctrl_inw(PA_BVERREG)) { switch (ctrl_inw(PA_VERREG) & 0xf0) {
#ifdef CONFIG_RTS7751R2D_PLUS #ifdef CONFIG_RTS7751R2D_PLUS
case 0x10: case 0x10:
printk(KERN_INFO "Using R2D-PLUS interrupt controller.\n"); printk(KERN_INFO "Using R2D-PLUS interrupt controller.\n");
@ -139,13 +139,16 @@ void __init init_rts7751r2d_IRQ(void)
break; break;
#endif #endif
#ifdef CONFIG_RTS7751R2D_1 #ifdef CONFIG_RTS7751R2D_1
case 0x11: case 0x00: /* according to manual */
case 0x30: /* in reality */
printk(KERN_INFO "Using R2D-1 interrupt controller.\n"); printk(KERN_INFO "Using R2D-1 interrupt controller.\n");
d = &intc_desc_r2d_1; d = &intc_desc_r2d_1;
memcpy(irl2irq, irl2irq_r2d_1, R2D_NR_IRL); memcpy(irl2irq, irl2irq_r2d_1, R2D_NR_IRL);
break; break;
#endif #endif
default: default:
printk(KERN_INFO "Unknown R2D interrupt controller 0x%04x\n",
ctrl_inw(PA_VERREG));
return; return;
} }