From: Richard B. <rb...@us...> - 2002-12-02 02:55:21
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory sc8-pr-cvs1:/tmp/cvs-serv8266/include/asm-vax Modified Files: mv.h vsa.h 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: mv.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mv.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- mv.h 25 Apr 2002 08:46:20 -0000 1.3 +++ mv.h 2 Dec 2002 02:55:09 -0000 1.4 @@ -39,7 +39,16 @@ /* clock routines */ void (*clock_init)(void); /* called by time_init() to set up RTC */ unsigned int *clock_base; /* address of clock page for vsbus RTC */ + unsigned int cpu_type; /* general grouping of cpu's for registers and interrupt hardcoding */ }; + +/* Defines for CPU types. Used in driver code to differentiate between + various VAX architectures, specifically for loading correct base addresses + and interrupt settings */ +#define MV_CPU_GENERIC 0 +#define MV_CPU_KA46 46 +#define MV_CPU_KA55 55 + #endif /* !__ASSEMBLY__ */ Index: vsa.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/vsa.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- vsa.h 25 Apr 2002 08:46:20 -0000 1.7 +++ vsa.h 2 Dec 2002 02:55:09 -0000 1.8 @@ -25,6 +25,13 @@ #define vc_diagtimm vc_diagtme }; +struct vsbus { + struct vs_cpu *vs_cpu_ptr; + struct ka55_cpu *ka55_cpu_ptr; + unsigned char vs_mask; + unsigned char vs_enabled; +}; + extern int vsbus_setup(void); extern int vsbus_enable_int(int bit_nr); extern int vsbus_disable_int(int bit_nr); @@ -33,7 +40,29 @@ extern int vsbus_probe_irq_on(void); extern unsigned char vsbus_probe_irq_report(void); +/* KA55's have a different register structure to other vaxen */ +struct ka55_cpu { + unsigned long hltcod; /* byte 0-3 Halt Code Register */ +#define scsi_adr hltcod + unsigned long pad1; +#define scsi_dir pad1 + unsigned char intmsk; /* byte 8 Interrupt Mask */ + unsigned char pad2; + unsigned char pad3; + unsigned char pad4; + unsigned char intreq; /* byte 12 Interrupt request register */ +#define intclr intreq + unsigned short pad5; + unsigned char pad6; + unsigned short diagdsp; + unsigned short pad7; + unsigned long parctl; /* byte 20-23 Parity Control Register */ + unsigned short pad8; + unsigned short pad9; + unsigned short diagtimu; + unsigned short diagtme; /* byte 30-31 Diagnostic time register */ +}; #define VSA_CLOCK_BASE 0x200b0000 #define VSA_BASE_REGS 0x20080000 |