From: Richard B. <rb...@us...> - 2002-12-02 02:55:22
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/net In directory sc8-pr-cvs1:/tmp/cvs-serv8266/drivers/net Modified Files: vaxlance.c vaxsgec.c Log Message: Added cpu_type to machine vector. Use this to remove the is_ka55 and is_ka46 calls and replace with a more generic cpu_type check. Changed the drivers for the dz, lance, sgec and vax_esp devices. Also merged the ka55.h file into the vsa.h file and added the vsbus struct into the same file. Actual register and hex addresses are still hardcoded for the moment, but at least this is a bit cleaner than before... Index: vaxlance.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/net/vaxlance.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- vaxlance.c 11 Nov 2001 21:33:14 -0000 1.18 +++ vaxlance.c 2 Dec 2002 02:55:11 -0000 1.19 @@ -1031,7 +1031,7 @@ lp->vsbus_int=num; } #else - if (is_ka46()) lp->vsbus_int=1; else lp->vsbus_int=5; + if (mv->cpu_type==MV_CPU_KA46) lp->vsbus_int=1; else lp->vsbus_int=5; #endif #endif @@ -1064,7 +1064,7 @@ vsbus_clear_int(lp->vsbus_int); #else - if (is_ka46()) dev->irq=254; else dev->irq=0x94; + if (mv->cpu_type==MV_CPU_KA46) dev->irq=254; else dev->irq=0x94; #endif if (dev->irq) printk(" probed IRQ %d, vsbus %d\n", dev->irq, lp->vsbus_int); Index: vaxsgec.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/net/vaxsgec.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- vaxsgec.c 29 Nov 2002 04:30:14 -0000 1.15 +++ vaxsgec.c 2 Dec 2002 02:55:11 -0000 1.16 @@ -25,9 +25,8 @@ #include <linux/ioport.h> /* for autoirq_setup/_report */ #include <asm/pgalloc.h> /* for __flush_tlb_one */ -#include <asm/vsa.h> #include <asm/mv.h> -extern int is_ka55(void); +#include <asm/vsa.h> /* use #undef to turn these off */ #undef VAX_SGEC_DEBUG @@ -182,7 +181,7 @@ if (i <= 0) { printk ("SGEC: CSR0 IRQ setup FAILED !\n"); - return -1; + return; } /* check for parity error and clear flags */ @@ -199,7 +198,6 @@ { struct sgec_private *lp = (struct sgec_private *) dev->priv; volatile struct sgec_regs *regs = lp->regs; - unsigned long v; int i; #ifdef VAX_SGEC_DEBUG @@ -901,8 +899,6 @@ struct sgec_private *lp; volatile struct sgec_regs *regs; unsigned long sgec_phys_addr=SGECADDR; - unsigned long v; - int i; if (version_printed++ == 0) printk(version); @@ -1003,7 +999,7 @@ dev->irq=SGECVEC; /* 0x80 is probably not the best vector but it's where the sgec is ending up after we reset it, so force it there for now */ - if (is_ka55()) { + if (mv->cpu_type==MV_CPU_KA55) { dev->irq = 0x108; } else { dev->irq = 0x80; |