You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(6) |
Sep
(2) |
Oct
(43) |
Nov
(4) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(78) |
Feb
(97) |
Mar
(29) |
Apr
(2) |
May
(22) |
Jun
(38) |
Jul
(11) |
Aug
(27) |
Sep
(40) |
Oct
(2) |
Nov
(17) |
Dec
(8) |
2002 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(480) |
May
(456) |
Jun
(12) |
Jul
|
Aug
(1) |
Sep
|
Oct
(18) |
Nov
(3) |
Dec
(6) |
2003 |
Jan
|
Feb
(18) |
Mar
(1) |
Apr
|
May
(6) |
Jun
(147) |
Jul
(7) |
Aug
(3) |
Sep
(235) |
Oct
(10) |
Nov
(2) |
Dec
(1) |
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Dave A. <ai...@us...> - 2003-02-12 02:37:39
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm In directory sc8-pr-cvs1:/tmp/cvs-serv5736/include/asm-vax/mm Modified Files: cache.h Log Message: DA: update for new toolchain build... add percentage signs to all assembly routines Index: cache.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mm/cache.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- cache.h 15 Feb 2001 01:16:04 -0000 1.1 +++ cache.h 12 Feb 2003 02:37:34 -0000 1.2 @@ -26,7 +26,7 @@ /* Push a PC/PSL onto the stack so it looks like we got an interrupt, and then REI */ __asm__ ( - " movpsl -(sp) \n" + " movpsl -(%%sp) \n" " pushab 1f \n" " rei \n" "1: " : : ); |
From: Dave A. <ai...@us...> - 2003-02-12 02:37:38
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/mm In directory sc8-pr-cvs1:/tmp/cvs-serv5736/arch/vax/mm Modified Files: fault.c Log Message: DA: update for new toolchain build... add percentage signs to all assembly routines Index: fault.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/mm/fault.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- fault.c 9 Apr 2002 13:50:55 -0000 1.14 +++ fault.c 12 Feb 2003 02:37:33 -0000 1.15 @@ -136,7 +136,7 @@ show_regs(regs); show_cpu_regs(); printk("\nStack dump\n"); - hex_dump( (void *)(regs->fp&~0xf), 512); + hex_dump( (void *)((regs->fp-256)&~0xf), 512); printk("do_page_fault: sending SIGSEGV\n"); #endif |
From: Dave A. <ai...@us...> - 2003-02-03 00:09:34
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory sc8-pr-cvs1:/tmp/cvs-serv26464 Modified Files: descriptor.h processor.h rpb.h vaxcpu.h Log Message: DA: gcc 3 dislikes garbage after the #endif.. put comments in Index: descriptor.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/descriptor.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- descriptor.h 17 Jan 2001 16:18:52 -0000 1.1 +++ descriptor.h 3 Feb 2003 00:09:31 -0000 1.2 @@ -46,4 +46,4 @@ void *pointer; }; -#endif _VAX_DESCRIPTOR_H +#endif /* _VAX_DESCRIPTOR_H */ Index: processor.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/processor.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- processor.h 9 Apr 2002 12:33:20 -0000 1.11 +++ processor.h 3 Feb 2003 00:09:31 -0000 1.12 @@ -146,4 +146,4 @@ #define cpu_relax() do { } while (0) -#endif _VAX_PROCESSOR_H +#endif /* _VAX_PROCESSOR_H */ Index: rpb.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/rpb.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- rpb.h 23 Jan 2001 23:54:29 -0000 1.2 +++ rpb.h 3 Feb 2003 00:09:31 -0000 1.3 @@ -78,4 +78,5 @@ extern struct rpb_struct boot_rpb; -#endif _VAX_RPB_H +#endif /* _VAX_RPB_H */ + Index: vaxcpu.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/vaxcpu.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- vaxcpu.h 20 May 2002 16:16:08 -0000 1.6 +++ vaxcpu.h 3 Feb 2003 00:09:31 -0000 1.7 @@ -277,4 +277,4 @@ #define NVAX_SIDEX_ADDR 0x20040004 -#endif _VAX_CPU_H +#endif /* _VAX_CPU_H */ |
From: Dave A. <ai...@us...> - 2003-02-01 05:23:08
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax In directory sc8-pr-cvs1:/tmp/cvs-serv27531 Modified Files: config.in Log Message: DA: update our config.in with some of the latest stuff.. profile is long gone Index: config.in =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/config.in,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- config.in 26 Oct 2002 10:52:26 -0000 1.14 +++ config.in 1 Feb 2003 05:23:05 -0000 1.15 @@ -179,12 +179,15 @@ mainmenu_option next_comment comment 'Kernel hacking' -# This appears to have died. -#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC -bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ -bool 'Kernel profiling support' CONFIG_PROFILE -if [ "$CONFIG_PROFILE" = "y" ]; then - int ' Profile shift count' CONFIG_PROFILE_SHIFT 2 +bool 'Kernel debugging' CONFIG_DEBUG_KERNEL +if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then + bool ' Debug high memory support' CONFIG_DEBUG_HIGHMEM + bool ' Debug memory allocations' CONFIG_DEBUG_SLAB + bool ' Memory mapped I/O debugging' CONFIG_DEBUG_IOVIRT + bool ' Magic SysRq key' CONFIG_MAGIC_SYSRQ + bool ' Spinlock debugging' CONFIG_DEBUG_SPINLOCK + bool ' Verbose BUG() reporting (adds 70K)' CONFIG_DEBUG_BUGVERBOSE fi + endmenu |
From: Dave A. <ai...@us...> - 2003-02-01 05:19:15
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory sc8-pr-cvs1:/tmp/cvs-serv26486 Modified Files: cpu_generic.c cpu_ka55.c process.c syscall.c Log Message: DA: gcc-latest changed asm .. every line must be quoted (gcc-latest doesn't work yet.. just started testing..) Index: cpu_generic.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_generic.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- cpu_generic.c 26 Jun 2001 18:59:00 -0000 1.2 +++ cpu_generic.c 1 Feb 2003 05:19:12 -0000 1.3 @@ -75,10 +75,8 @@ void ka46_48_49_prom_putchar(int c) { - asm (" - movzbl %0, r2 # zero-extended byte convert. - jsb 0x20040068 - " + asm ("movzbl %0, r2 # zero-extended byte convert. \n" + "jsb 0x20040068\n" : /* nothing */ : "g" (c) : "r2" ); @@ -94,10 +92,8 @@ void ka4x_prom_putchar(int c) { - asm (" - movzbl %0, r2 # zero-extended byte convert. - jsb 0x20040058 - " + asm (" movzbl %0, r2 # zero-extended byte convert.\n" + "jsb 0x20040058 \n" : /* nothing */ : "g" (c) : "r2" ); Index: cpu_ka55.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka55.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- cpu_ka55.c 2 Dec 2002 02:55:12 -0000 1.8 +++ cpu_ka55.c 1 Feb 2003 05:19:12 -0000 1.9 @@ -65,14 +65,13 @@ void ka55_prom_putchar(int c) { - asm (" - movl $0x2014044b, r11 # console page addr - 1: - jsb *0x20(r11) # ready to TX? - blbc r0, 1b - movl %0, r1 - jsb *0x24(r11) # TX char in R11 - " : /* no outputs */ + asm (" movl $0x2014044b, r11 # console page addr\n" + "1:\n" + "jsb *0x20(r11) # ready to TX? \n" + "blbc r0, 1b\n" + "movl %0, r1\n" + "jsb *0x24(r11) # TX char in R11 \n" + : /* no outputs */ : "g"(c) : "r0", "r1", "r11" ); } Index: process.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/process.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- process.c 9 Apr 2002 13:50:55 -0000 1.16 +++ process.c 1 Feb 2003 05:19:12 -0000 1.17 @@ -61,16 +61,16 @@ /* svpctx should deal with writing the stuff into *prev */ - asm(" movl %1, r11 \n - movpsl -(sp) \n - pushab 1f \n - mtpr %4,%5 \n - svpctx \n - mtpr %2, %3 \n - ldpctx \n - rei \n - 1: \n - movl r11, %0" + asm(" movl %1, r11 \n" + " movpsl -(sp) \n" + " pushab 1f \n" + " mtpr %4,%5 \n" + " svpctx \n" + " mtpr %2, %3 \n" + " ldpctx \n" + " rei \n" + "1: \n" + " movl r11, %0" : "=g"(retval) : "g"(prev), "r"(pcbb), "g"(PR_PCBB), @@ -171,15 +171,15 @@ pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) { - asm(" clrl -(sp) \n - movl %0, -(sp) \n - pushl $0x2 \n - movl sp, ap \n - chmk %1 \n - tstl r0 \n - beql child \n - ret \n - child:" + asm(" clrl -(sp) \n" + " movl %0, -(sp) \n" + " pushl $0x2 \n" + " movl sp, ap \n" + " chmk %1 \n" + " tstl r0 \n" + " beql child \n" + " ret \n" + "child:" : /* no outputs */ : "g"(flags|CLONE_VM), "g"(__NR_clone) Index: syscall.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/syscall.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- syscall.c 9 Apr 2002 13:50:55 -0000 1.9 +++ syscall.c 1 Feb 2003 05:19:12 -0000 1.10 @@ -99,17 +99,17 @@ We'll sort this out later... - KPH 2000-10-16 */ /* atp aug 2001, FIXME: ptrace/strace syscall stuff */ - __asm__(" pushl %1 \n - subl2 %2,sp \n - 1: movc3 %2,4(%4),(sp) \n - calls %3, %5 \n - brb 3f \n - 2: movl %6, r0 \n - 3: movl r0, %0 \n - .section ex_table,\"a\" \n - .align 2 \n - .long 1b, 2b \n - .text" + __asm__(" pushl %1 \n" + " subl2 %2,sp \n" + " 1: movc3 %2,4(%4),(sp) \n" + " calls %3, %5 \n" + " brb 3f \n" + " 2: movl %6, r0 \n" + " 3: movl r0, %0 \n" + " .section ex_table,\"a\" \n" + " .align 2 \n" + " .long 1b, 2b \n" + " .text" : "=g"(regs->r0) : "g"(regs), "g"(nr_args*4), "g"(nr_args+1), |
From: Dave A. <ai...@us...> - 2003-02-01 05:09:40
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/vax/bus In directory sc8-pr-cvs1:/tmp/cvs-serv24404 Modified Files: qbus.c Log Message: DA: fix qbus.c so that it uses GFP_ATOMIC.. this fixes a crash on the simulator Index: qbus.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/vax/bus/qbus.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- qbus.c 25 Oct 2002 14:04:35 -0000 1.1 +++ qbus.c 1 Feb 2003 05:09:35 -0000 1.2 @@ -85,7 +85,7 @@ { struct vax_dmamap *map; - map = kmalloc(sizeof(struct vax_dmamap), GFP_KERNEL); + map = kmalloc(sizeof(struct vax_dmamap), GFP_ATOMIC); if (map != NULL) { int reg; unsigned int pagelets; |
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; |
From: Richard B. <rb...@us...> - 2002-12-02 02:55:22
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/vsbus In directory sc8-pr-cvs1:/tmp/cvs-serv8266/drivers/vsbus Modified Files: vsbus.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: vsbus.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/vsbus/vsbus.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- vsbus.c 29 May 2002 03:02:50 -0000 1.9 +++ vsbus.c 2 Dec 2002 02:55:11 -0000 1.10 @@ -14,38 +14,24 @@ #include <asm/mv.h> #include <asm/ka43.h> -#include <asm/ka55.h> -extern struct vax_mv mv_ka46; -extern struct vax_mv mv_ka55; -struct vsbus { - struct vs_cpu *vs_cpu_ptr; - unsigned char vs_mask; - unsigned char vs_enabled; -} sys_vs; - -struct ka55_cpu_regs *ka55_cpu; - -int is_ka46(void) { return (mv==&mv_ka46); } - -int is_ka55(void) { return (mv==&mv_ka55); } +struct vsbus sys_vs; int vsbus_setup(void) { unsigned long irqs; - if (!is_ka55()){ + if (mv->cpu_type!=MV_CPU_KA55){ sys_vs.vs_cpu_ptr=(void *)ioremap(VSA_BASE_REGS, 128); sys_vs.vs_mask=sys_vs.vs_cpu_ptr->vc_intreq; } else { - sys_vs.vs_cpu_ptr=(void *)ioremap(VSA_KA55_BASE_REGS,128); - ka55_cpu = (struct ka55_cpu_regs *)sys_vs.vs_cpu_ptr; - sys_vs.vs_mask=ka55_cpu->intreq; + sys_vs.ka55_cpu_ptr=(void *)ioremap(VSA_KA55_BASE_REGS,128); + sys_vs.vs_mask=sys_vs.ka55_cpu_ptr->intreq; } irqs=probe_irq_on(); - if (!is_ka55()) { + if (mv->cpu_type!=MV_CPU_KA55) { sys_vs.vs_cpu_ptr->vc_intmsk=0; sys_vs.vs_cpu_ptr->vc_intclr=0xFF; mdelay(1000); @@ -55,10 +41,10 @@ sys_vs.vs_cpu_ptr->vc_intmsk=0; /*~sys_vs.vs_mask;*/ } else { - ka55_cpu->intmsk = 0; - ka55_cpu->intclr = 0xff; + sys_vs.ka55_cpu_ptr->intmsk = 0; + sys_vs.ka55_cpu_ptr->intclr = 0xff; mdelay(1000); - sys_vs.vs_mask=ka55_cpu->intreq; + sys_vs.vs_mask=sys_vs.ka55_cpu_ptr->intreq; } probe_irq_off(irqs); return 0; @@ -66,30 +52,30 @@ int vsbus_enable_int(int bit_nr) { - if (!is_ka55()) + if (mv->cpu_type!=MV_CPU_KA55) sys_vs.vs_cpu_ptr->vc_intmsk|=1<<bit_nr; else - ka55_cpu->intmsk|=1<<bit_nr; + sys_vs.ka55_cpu_ptr->intmsk|=1<<bit_nr; sys_vs.vs_enabled |= 1<< bit_nr; return 0; } int vsbus_clear_int(int bit_nr) { - if(!is_ka55()) + if(mv->cpu_type!=MV_CPU_KA55) sys_vs.vs_cpu_ptr->vc_intclr=1<<bit_nr; else - ka55_cpu->intclr=1<<bit_nr; + sys_vs.ka55_cpu_ptr->intclr=1<<bit_nr; return 0; } int vsbus_disable_int(int bit_nr) { - if (!is_ka55()) + if (mv->cpu_type!=MV_CPU_KA55) sys_vs.vs_cpu_ptr->vc_intmsk&=~(1<<bit_nr); else - ka55_cpu->intmsk&=~(1<<bit_nr); + sys_vs.ka55_cpu_ptr->intmsk&=~(1<<bit_nr); sys_vs.vs_enabled &= ~(1<<bit_nr); return 0; } @@ -97,12 +83,12 @@ int vsbus_probe_irq_on(void) { printk("vsbus: probing set mask ~%2X\n", sys_vs.vs_mask); - if (!is_ka55()){ + if (mv->cpu_type!=MV_CPU_KA55){ sys_vs.vs_cpu_ptr->vc_intmsk = 0; //~sys_vs.vs_mask; sys_vs.vs_cpu_ptr->vc_intclr=0xff; } else { - ka55_cpu->intmsk=0; - ka55_cpu->intclr=0xff; + sys_vs.ka55_cpu_ptr->intmsk=0; + sys_vs.ka55_cpu_ptr->intclr=0xff; } return 0; } @@ -111,15 +97,15 @@ { unsigned char x, y; - if (!is_ka55()) + if (mv->cpu_type!=MV_CPU_KA55) x=sys_vs.vs_cpu_ptr->vc_intreq; else - x=ka55_cpu->intreq; + x=sys_vs.ka55_cpu_ptr->intreq; y = x & ~sys_vs.vs_mask; printk("vsbus: probe returning %2X, %2X\n", x, ffs(y)); - if(!is_ka55()) + if(mv->cpu_type!=MV_CPU_KA55) sys_vs.vs_cpu_ptr->vc_intmsk = sys_vs.vs_enabled; else - ka55_cpu->intmsk=sys_vs.vs_enabled; + sys_vs.ka55_cpu_ptr->intmsk=sys_vs.vs_enabled; return ffs(y)-1; } |
From: Richard B. <rb...@us...> - 2002-12-02 02:55:22
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/char In directory sc8-pr-cvs1:/tmp/cvs-serv8266/drivers/char Modified Files: dz.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: dz.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/dz.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- dz.c 11 Apr 2002 13:30:51 -0000 1.12 +++ dz.c 2 Dec 2002 02:55:10 -0000 1.13 @@ -62,6 +62,7 @@ #include <asm/irq.h> #ifdef CONFIG_VAX +#include <asm/mv.h> #include <asm/vsa.h> #include <asm/dz11.h> volatile struct dz11_regs *dz11_addr; @@ -1546,7 +1547,7 @@ irq=autoirq_report(0); } #else -if (is_ka46()){ +if (mv->cpu_type==MV_CPU_KA46){ dz_vsbus_tx_int=5; dz_vsbus_rx_int=4; irq=149; |
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 |
From: Richard B. <rb...@us...> - 2002-12-02 02:55:21
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/scsi In directory sc8-pr-cvs1:/tmp/cvs-serv8266/drivers/scsi Modified Files: vax_esp.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: vax_esp.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/scsi/vax_esp.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- vax_esp.c 29 Nov 2002 04:32:44 -0000 1.4 +++ vax_esp.c 2 Dec 2002 02:55:11 -0000 1.5 @@ -25,10 +25,11 @@ #include <asm/mm/pagelet.h> #include <asm/vsa.h> #include <asm/mv.h> -#include <asm/ka55.h> #include <asm/pgtable.h> +extern struct vsbus sys_vs; + static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count); static void dma_drain(struct NCR_ESP *esp); static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd * sp); @@ -59,8 +60,6 @@ unsigned char *scsi_dma_buffer; /* 64K area for DMA transfers */ int scsi_current_length = 0; -extern struct ka55_cpu_regs *ka55_cpu; - unsigned long *esp_pte; /* device page table pointer */ unsigned long esp_pte_offset; @@ -75,17 +74,18 @@ unsigned long *pte; unsigned long l,m; - //scsi_base = 0x200c0080; - - /* On the 3100/85: + /* On the KA55: * The SCSI DMA registers are at 0x25c00000 (address & direction) which * is part of the vsbus cpu registers and should already be mapped * The SCSI DMA Map registers are at 0x27000000-27007FFF (8K) * The SCSI controller registers are at0X26000080-BF */ - scsi_base = 0x26000080; /* hardcode for 3100/85 for now */ - + if (mv->cpu_type != MV_CPU_KA55) + scsi_base = 0x200c0080; + else + scsi_base = 0x26000080; + esp_dev = 0; esp = esp_allocate(tpnt, (void *) esp_dev); @@ -170,8 +170,8 @@ /* need to set the address and direction scsi registers. * on the KA55 they're located in the cpu register area. */ - ka55_cpu->scsi_adr = virt_to_phys(scsi_dma_buffer); - ka55_cpu->scsi_dir = VAX_SCSI_DMA_MAP_LOADED | VAX_SCSI_DMA_ACTIVE; + sys_vs.ka55_cpu_ptr->scsi_adr = virt_to_phys(scsi_dma_buffer); + sys_vs.ka55_cpu_ptr->scsi_dir = VAX_SCSI_DMA_MAP_LOADED | VAX_SCSI_DMA_ACTIVE; // esp->irq = SCSI_INT; esp->irq = 255; @@ -267,9 +267,9 @@ } printk("]\n"); printk("vax_esp: dma_init_write: setting scsi_adr to 0x%x\n",virt_to_phys(scsi_dma_buffer)); - ka55_cpu->scsi_adr = virt_to_phys(scsi_dma_buffer); /* note: virtual address */ + sys_vs.ka55_cpu_ptr->scsi_adr = virt_to_phys(scsi_dma_buffer); /* note: virtual address */ /* tell device that it should read from memory */ - ka55_cpu->scsi_dir |= VAX_SCSI_DMA_FROM_MEMORY; + sys_vs.ka55_cpu_ptr->scsi_dir |= VAX_SCSI_DMA_FROM_MEMORY; } static void dma_ints_off(struct NCR_ESP *esp) |
From: Richard B. <rb...@us...> - 2002-12-02 02:55:21
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory sc8-pr-cvs1:/tmp/cvs-serv8266/arch/vax/kernel Modified Files: cpu_ka55.c cpu_ka46.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: cpu_ka55.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka55.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- cpu_ka55.c 26 Oct 2002 10:51:44 -0000 1.7 +++ cpu_ka55.c 2 Dec 2002 02:55:12 -0000 1.8 @@ -55,6 +55,7 @@ ka55_cpu_type_str, generic_clock_init, NULL, + MV_CPU_KA55 }, 0 /* System ID Extension from ROM */ }; Index: cpu_ka46.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka46.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- cpu_ka46.c 26 Oct 2002 10:51:44 -0000 1.13 +++ cpu_ka46.c 2 Dec 2002 02:55:12 -0000 1.14 @@ -57,7 +57,8 @@ ka46_init_devices, /* init_devices */ ka46_cpu_type_str, ka4x_clock_init, /* dallas rtc init */ - NULL /* clock base */ + NULL, /* clock base */ + MV_CPU_KA46 }, 0 /* System ID Extension from ROM */ }; |
From: Richard B. <rb...@us...> - 2002-11-29 04:32:47
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/scsi In directory sc8-pr-cvs1:/tmp/cvs-serv3052/drivers/scsi Modified Files: vax_esp.c vax_esp.h Log Message: Updates to scsi driver for 3100/85. Still very much work in progress Index: vax_esp.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/scsi/vax_esp.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- vax_esp.c 12 Jun 2002 07:57:26 -0000 1.3 +++ vax_esp.c 29 Nov 2002 04:32:44 -0000 1.4 @@ -22,8 +22,10 @@ #include <asm/irq.h> #include <asm/dma.h> #include <asm/pgalloc.h> +#include <asm/mm/pagelet.h> #include <asm/vsa.h> #include <asm/mv.h> +#include <asm/ka55.h> #include <asm/pgtable.h> @@ -44,7 +46,6 @@ unsigned char scsi_cur_buff = 1; /* Leave space for command buffer */ __u32 esp_virt_buffer; -int scsi_current_length = 0; volatile unsigned char cmd_buffer[16]; @@ -55,10 +56,12 @@ volatile unsigned long *scsi_sdr0; volatile unsigned long *scsi_sdr1; -volatile unsigned long *scsi_dma_address; -volatile unsigned long *scsi_dma_direction; +unsigned char *scsi_dma_buffer; /* 64K area for DMA transfers */ +int scsi_current_length = 0; + +extern struct ka55_cpu_regs *ka55_cpu; -struct vax_scsi_pte *esp_pte; +unsigned long *esp_pte; /* device page table pointer */ unsigned long esp_pte_offset; static void scsi_dma_int(int, void *, struct pt_regs *); @@ -69,12 +72,14 @@ struct NCR_ESP *esp; struct ConfigDev *esp_dev; unsigned long scsi_base; - struct vax_scsi_pte *pte; - unsigned long l; + unsigned long *pte; + unsigned long l,m; - scsi_base = 0x200c0080; + //scsi_base = 0x200c0080; - /* On the 3100/85 the SCSI DMA registers are at 0x25c00000 (address & direction + /* On the 3100/85: + * The SCSI DMA registers are at 0x25c00000 (address & direction) which + * is part of the vsbus cpu registers and should already be mapped * The SCSI DMA Map registers are at 0x27000000-27007FFF (8K) * The SCSI controller registers are at0X26000080-BF */ @@ -130,32 +135,43 @@ /* ESP register base */ esp->eregs = (struct ESP_regs *) ioremap (scsi_base,sizeof(struct ESP_regs)); + printk("esp->eregs located at 0x%x, virt: 0x%x\n",virt_to_phys(esp->eregs),esp->eregs); /* Set the command buffer */ esp->esp_command = (volatile unsigned char *) cmd_buffer; + esp->esp_command_dvma = esp->esp_command; /* for now just set to the same location */ /* Now we have to create and initialise our DMA area. * Initially we need to allocate the memory and clear the page table entries for the device */ - esp_pte = pte = (struct vax_scsi_pte *)ioremap (0x27000000,32767); + esp_pte = pte = (unsigned long *)ioremap (0x27000000,0x7fff); + //printk("setting ptes to 0\n"); for (l=0; l<8192; l++){ ((unsigned long *)pte)[l] = 0; /* can't use bzero as access must be via longword */ } esp_pte_offset = 0; - /* now we need to create the dma area - * As we use memory we will map the PTE for this memory into the PTE's for the device + /* now we need to create the dma area. + * The PTE's of the memory we allocate we will copy to the PTE map for the device + * Being a vax we have to actually work with pagelets (hardware page). */ - esp->esp_command_dvma = (__u32) kmalloc (VAX_SCSI_MAX_TRANSFER,GFP_ATOMIC); - - + printk("kmalloc of dma memory\n"); + scsi_dma_buffer = (char *) kmalloc (VAX_SCSI_MAX_TRANSFER,GFP_ATOMIC); + printk("scsi_dma_buffer at 0x%x\n",scsi_dma_buffer); + printk("now getting pagelets\n"); + for (l=0; l<=(VAX_SCSI_MAX_TRANSFER/PAGELET_SIZE);l++){ + /* should return a copy of the pagelet for the segment of the allocated buffer */ + m = &scsi_dma_buffer[(l*PAGELET_SIZE)]; + // printk("address of dma buffer pagelet %d = 0x%x\n",l,m); + esp_pte[l] = (SPT_BASE + ((m >> PAGELET_SHIFT) << SIZEOF_PTR_LOG2)); + // printk("esp_pte[%d] = 0x%x\n",l,esp_pte[l]); + } - /* need to find address and direction scsi registers. - * on the KA55 they're just offsets from the base register location. - * -- ugly code -- should set this inside vsbus.c somewhere + /* need to set the address and direction scsi registers. + * on the KA55 they're located in the cpu register area. */ - scsi_dma_address = (unsigned long *)ioremap(VSA_KA55_BASE_REGS,1); - scsi_dma_direction = (unsigned long *)((unsigned long)&scsi_dma_address + VAX_SCSI_DMA_DIRECTION); /* add offset */ + ka55_cpu->scsi_adr = virt_to_phys(scsi_dma_buffer); + ka55_cpu->scsi_dir = VAX_SCSI_DMA_MAP_LOADED | VAX_SCSI_DMA_ACTIVE; // esp->irq = SCSI_INT; esp->irq = 255; @@ -168,13 +184,13 @@ esp->scsi_id = 6; - /* Check for differential SCSI-bus */ + /* We don't have a differential SCSI-bus */ esp->diff = 0; esp_initialize(esp); if(nesps) { - printk("ESP: Total of %d ESP hosts found, %d actually in use.\n", nesps, esps_in_use); + printk("VAX_ESP: Total of %d ESP hosts found, %d actually in use.\n", nesps, esps_in_use); esps_running = esps_in_use; return esps_in_use; } else @@ -187,31 +203,31 @@ extern volatile unsigned int *isr; unsigned int dummy; - printk ("dma_int called\n"); + printk ("vax_esp: dma_int called\n"); } static int dma_bytes_sent(struct NCR_ESP *esp, int fifo_count) { - printk ("dma_bytes_sent called\n"); + printk ("vax_esp: dma_bytes_sent called\n"); return fifo_count; } static void dma_drain(struct NCR_ESP *esp) { unsigned long nw = *scsi_scr; - printk ("dma_drain called\n"); + printk ("vax_esp: dma_drain called\n"); } static int dma_can_transfer(struct NCR_ESP *esp, Scsi_Cmnd * sp) { - printk ("dma_can_transfer called\n"); + printk ("vax_esp: dma_can_transfer called\n"); return sp->SCp.this_residual;; } static void dma_dump_state(struct NCR_ESP *esp) { - printk ("dma_dump_state called\n"); + printk ("vax_esp: dma_dump_state called\n"); } static void dma_init_read(struct NCR_ESP *esp, __u32 vaddress, int length) @@ -219,7 +235,7 @@ extern volatile unsigned int *isr; unsigned int dummy; - printk ("dma_init_read called\n"); + printk ("vax_esp: dma_init_read called\n"); } @@ -227,33 +243,50 @@ { extern volatile unsigned int *isr; unsigned int dummy; - struct vax_scsi_pte *pte; - - printk ("dma_init_write called\n"); - printk (" vaddress = 0x%x, length = %d\n",vaddress,length); - /* need to get the PTE of the buffer and transfer it to the device PTE map */ - printk(" virt_to_page(vaddress) = 0x%x\n",(unsigned long)virt_to_page(vaddress)); - pte = (struct vax_scsi_pte *)virt_to_page(vaddress); - esp_pte[esp_pte_offset++] = pte[0]; - // scsi_dma_direction = scsi_dma_direction | VAX_SCSI_DMA_FROM_MEMORY; - + unsigned long *pte; + unsigned int i; + unsigned char *vaddress_char; + + printk ("vax_esp: dma_init_write called\n"); + vaddress_char = vaddress; + printk ("dma data at 0x%x for %d bytes\n",vaddress,length); + printk("dma data ["); + for (i=0;i<length;i++){ + if (i> 0) + printk(","); + printk("%2.2x",vaddress_char[i]); + } + printk("]\n"); + /* move data to dma buffer - but where ?*/ + memcpy(scsi_dma_buffer,vaddress,length); + printk("SCSI dma data ["); + for (i=0;i<length;i++){ + if (i> 0) + printk(","); + printk("%2.2x",scsi_dma_buffer[i]); + } + printk("]\n"); + printk("vax_esp: dma_init_write: setting scsi_adr to 0x%x\n",virt_to_phys(scsi_dma_buffer)); + ka55_cpu->scsi_adr = virt_to_phys(scsi_dma_buffer); /* note: virtual address */ + /* tell device that it should read from memory */ + ka55_cpu->scsi_dir |= VAX_SCSI_DMA_FROM_MEMORY; } static void dma_ints_off(struct NCR_ESP *esp) { - printk ("dma_ints_off called\n"); + printk ("vax_esp: dma_ints_off called\n"); // disable_irq(SCSI_DMA_INT); } static void dma_ints_on(struct NCR_ESP *esp) { - printk ("dma_ints_on called\n"); + printk ("vax_esp: dma_ints_on called\n"); // enable_irq(SCSI_DMA_INT); } static int dma_irq_p(struct NCR_ESP *esp) { - printk ("dma_irq_p called\n"); + printk ("vax_esp: dma_irq_p called\n"); return (esp->eregs->esp_status & ESP_STAT_INTR); } @@ -262,7 +295,7 @@ /* * FIXME: what's this good for? */ - printk ("dma_ports_p called\n"); + printk ("vax_esp: dma_ports_p called\n"); return 1; } @@ -272,7 +305,7 @@ * On the Sparc, DMA_ST_WRITE means "move data from device to memory" * so when (write) is true, it actually means READ! */ - printk ("dma_setup called\n"); + printk ("vax_esp: dma_setup called\n"); #if 0 if (write) { dma_init_read(esp, addr, count); @@ -282,26 +315,36 @@ #endif } -static void dma_mmu_get_scsi_one(struct NCR_ESP *esp, Scsi_Cmnd * sp) +static void dma_mmu_get_scsi_one(struct NCR_ESP *esp, Scsi_Cmnd * scmd) { - printk("dma_mmu_get_scsi_one called\n"); - // sp->SCp.have_data_in = virt_to_phys(sp->SCp.buffer); - //sp->SCp.ptr = (char *) ((unsigned long) sp->SCp.have_data_in); + printk("vax_esp: dma_mmu_get_scsi_one called\n"); + /* need to allocate a buffer for the dma command we will send + * This will be appended to the end of whatever is currently in the buffer + * and increase our end marker + */ + scmd->SCp.ptr = &scsi_dma_buffer[scsi_current_length]; + scsi_current_length += scmd->SCp.this_residual; } static void dma_mmu_get_scsi_sgl(struct NCR_ESP *esp, Scsi_Cmnd * sp) { int sz = sp->SCp.buffers_residual; struct mmu_sglist *sg = (struct mmu_sglist *) sp->SCp.buffer; - printk ("dma_mmu_get_scsi_sgl called\n"); + printk ("vax_esp: dma_mmu_get_scsi_sgl called\n"); } static void dma_advance_sg(Scsi_Cmnd * sp) { - printk ("dma_adavnce_sg called\n"); + printk ("vax_esp: dma_adavnce_sg called\n"); // sp->SCp.ptr = (char *) ((unsigned long) sp->SCp.buffer->dvma_addr); } static Scsi_Host_Template driver_template = SCSI_VAX_ESP; #include "scsi_module.c" + + + + + + Index: vax_esp.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/scsi/vax_esp.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- vax_esp.h 12 Jun 2002 07:57:26 -0000 1.3 +++ vax_esp.h 29 Nov 2002 04:32:44 -0000 1.4 @@ -57,7 +57,7 @@ #define SCSI_VAX_ESP { \ proc_name: "esp", \ proc_info: &esp_proc_info, \ - name: "NCR53C94", \ + name: "VAX NCR53C94", \ detect: vax_esp_detect, \ info: esp_info, \ command: esp_command, \ @@ -67,9 +67,10 @@ can_queue: 7, \ this_id: 6, \ sg_tablesize: SG_ALL, \ - cmd_per_lun: 1, \ use_new_eh_code: 1, \ + cmd_per_lun: 1, \ use_clustering: DISABLE_CLUSTERING, } + // controller id is 6 on the 3100/85 |
From: Richard B. <rb...@us...> - 2002-11-29 04:32:47
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory sc8-pr-cvs1:/tmp/cvs-serv3052/include/asm-vax Modified Files: ka55.h Log Message: Updates to scsi driver for 3100/85. Still very much work in progress Index: ka55.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/ka55.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ka55.h 29 May 2002 03:02:50 -0000 1.1 +++ ka55.h 29 Nov 2002 04:32:43 -0000 1.2 @@ -12,7 +12,9 @@ struct ka55_cpu_regs { unsigned long hltcod; /* byte 0-3 Halt Code Register */ - unsigned long pad1; +#define scsi_adr hltcod + unsigned long pad1; +#define scsi_dir pad1 unsigned char intmsk; /* byte 8 Interrupt Mask */ unsigned char pad2; unsigned char pad3; @@ -33,4 +35,6 @@ #endif /* __ASSEMBLY */ #endif /* __VAX_KA55_H */ + + |
From: Richard B. <rb...@us...> - 2002-11-29 04:30:19
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/net In directory sc8-pr-cvs1:/tmp/cvs-serv1245/drivers/net Modified Files: vaxsgec.c Log Message: Changed default interrupt when using ka55 cpu Index: vaxsgec.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/net/vaxsgec.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- vaxsgec.c 3 Jun 2002 02:43:45 -0000 1.14 +++ vaxsgec.c 29 Nov 2002 04:30:14 -0000 1.15 @@ -27,6 +27,7 @@ #include <asm/pgalloc.h> /* for __flush_tlb_one */ #include <asm/vsa.h> #include <asm/mv.h> +extern int is_ka55(void); /* use #undef to turn these off */ #undef VAX_SGEC_DEBUG @@ -46,6 +47,7 @@ *regptr = value; } + static inline void writecsr6(volatile struct sgec_regs *regs, unsigned long value) { writereg(®s->sg_nicsr6, value); @@ -1001,7 +1003,11 @@ 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 */ - dev->irq = 0x80; + if (is_ka55()) { + dev->irq = 0x108; + } else { + dev->irq = 0x80; + } printk(" failed to detect IRQ line - assuming 0x%x.\n", dev->irq); } |
From: Dave A. <ai...@us...> - 2002-10-26 10:55:43
|
Update of /cvsroot/linux-vax/kernel-2.4 In directory usw-pr-cvs1:/tmp/cvs-serv7230 Modified Files: Makefile Log Message: DA: bckport Kenns 2.5 changes Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/Makefile,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- Makefile 13 Apr 2002 16:20:09 -0000 1.15 +++ Makefile 26 Oct 2002 10:55:40 -0000 1.16 @@ -187,6 +187,10 @@ DRIVERS-$(CONFIG_BLUEZ) += drivers/bluetooth/bluetooth.o DRIVERS-$(CONFIG_HOTPLUG_PCI) += drivers/hotplug/vmlinux-obj.o DRIVERS-$(CONFIG_VSBUS) += drivers/vsbus/vsbus.a +DRIVERS-$(CONFIG_VAX) += drivers/vax/bus/vaxbus.o +DRIVERS-$(CONFIG_VAX) += drivers/vax/char/vaxchar.o +DRIVERS-$(CONFIG_VAX) += drivers/vax/net/vaxnet.o + DRIVERS := $(DRIVERS-y) |
From: Dave A. <ai...@us...> - 2002-10-26 10:53:57
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv6730/drivers/char Modified Files: Makefile Log Message: DA: backport Kenns 2.5 work Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Makefile 29 May 2002 03:37:39 -0000 1.3 +++ Makefile 26 Oct 2002 10:53:51 -0000 1.4 @@ -212,6 +212,7 @@ obj-$(CONFIG_PPDEV) += ppdev.o obj-$(CONFIG_DZ) += dz.o obj-$(CONFIG_VXT2694) += sc26c94.o vxt2694.o generic_serial.o +obj-$(CONFIG_SERIAL_IPR) += generic_serial.o obj-$(CONFIG_NWBUTTON) += nwbutton.o obj-$(CONFIG_NWFLASH) += nwflash.o |
From: Dave A. <ai...@us...> - 2002-10-26 10:53:57
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers In directory usw-pr-cvs1:/tmp/cvs-serv6730/drivers Modified Files: Makefile Log Message: DA: backport Kenns 2.5 work Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Makefile 11 Apr 2002 14:26:57 -0000 1.4 +++ Makefile 26 Oct 2002 10:53:52 -0000 1.5 @@ -39,6 +39,7 @@ subdir-$(CONFIG_ISDN) += isdn subdir-$(CONFIG_ATM) += atm subdir-$(CONFIG_FC4) += fc4 +subdir-$(CONFIG_VAX) += vax subdir-$(CONFIG_VSBUS) += vsbus # CONFIG_HAMRADIO can be set without CONFIG_NETDEVICE being set -- ch |
From: Dave A. <ai...@us...> - 2002-10-26 10:52:29
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax In directory usw-pr-cvs1:/tmp/cvs-serv6472 Modified Files: config.in Log Message: DA: backport Kenn 2.5 work to 2.4 Index: config.in =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/config.in,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- config.in 29 May 2002 03:37:39 -0000 1.13 +++ config.in 26 Oct 2002 10:52:26 -0000 1.14 @@ -78,8 +78,8 @@ mainmenu_option next_comment comment 'Bus support' bool 'Support for Q-bus' CONFIG_QBUS -bool 'Support for Unibus' CONFIG_UNIBUS -bool 'Support for VAXBI' CONFIG_VAXBI +#bool 'Support for Unibus' CONFIG_UNIBUS +#bool 'Support for VAXBI' CONFIG_VAXBI bool 'Support for Vax Station BUS (??)' CONFIG_VSBUS if [ "$CONFIG_VSBUS" != "n" ]; then bool 'Hardcode 4000/60 (temporary for now - DA)' CONFIG_VAX_4000HC @@ -142,6 +142,7 @@ fi bool 'LANCE ethernet controller support' CONFIG_VAX_LANCE bool 'SGEC ethernet controller support (EXPERIMENTAL)' CONFIG_SGEC + bool 'DELQA/DEQNA Q-bus ethernet controller support' CONFIG_DELQA fi endmenu @@ -161,7 +162,7 @@ tristate 'Standard/generic (dumb) serial support' CONFIG_SERIAL if [ "$CONFIG_SERIAL" = "y" ]; then bool 'DZ11 Serial Support' CONFIG_DZ - bool 'CPU register-based Serial Console Support' CONFIG_SERIAL_MTPR + bool 'CPU register-based Serial Console Support' CONFIG_SERIAL_IPR bool 'SC26C94 Serial Support (for VXT2000)' CONFIG_VXT2694 bool ' Support for console on serial port' CONFIG_SERIAL_CONSOLE fi |
From: Dave A. <ai...@us...> - 2002-10-26 10:51:47
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv6293 Modified Files: cpu_ka410.c cpu_ka42.c cpu_ka43.c cpu_ka46.c cpu_ka55.c Log Message: DA: make compile with CONFIG_DZ switched off Index: cpu_ka410.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka410.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- cpu_ka410.c 25 Apr 2002 08:46:20 -0000 1.3 +++ cpu_ka410.c 26 Oct 2002 10:51:44 -0000 1.4 @@ -60,9 +60,11 @@ void ka410_post_vm_init(void) { +#ifdef CONFIG_DZ init_dz11_console(0x200A000, 3); dz_serial_console_init(0,0); +#endif } const char *ka410_cpu_type_str(void) Index: cpu_ka42.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka42.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- cpu_ka42.c 25 Apr 2002 08:46:20 -0000 1.7 +++ cpu_ka42.c 26 Oct 2002 10:51:44 -0000 1.8 @@ -70,10 +70,11 @@ #define KA42_CADR_ISE 0x20 #define KA42_CADR_DSE 0x10 __mtpr(KA42_CADR_S2E|KA42_CADR_S1E|KA42_CADR_ISE|KA42_CADR_DSE, PR_CADR); - +#ifdef CONFIG_DZ init_dz11_console(0x200A0000, 3); dz_serial_console_init(0, 0); +#endif } void ka42_init_devices(void) Index: cpu_ka43.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka43.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- cpu_ka43.c 25 Apr 2002 08:46:20 -0000 1.8 +++ cpu_ka43.c 26 Oct 2002 10:51:44 -0000 1.9 @@ -94,9 +94,11 @@ /* dont call ka43_cache_reset before this function (unlikely) */ void ka43_post_vm_init(void) { +#ifdef CONFIG_DZ init_dz11_console(0x200A0000, 3); dz_serial_console_init(0, 0); +#endif cpu_regs = ioremap(KA43_CPU_BASE, KA43_CPU_SIZE); ka43_creg_addr = ioremap(KA43_CH2_CREG, 1); Index: cpu_ka46.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka46.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- cpu_ka46.c 18 May 2002 18:12:35 -0000 1.12 +++ cpu_ka46.c 26 Oct 2002 10:51:44 -0000 1.13 @@ -83,8 +83,10 @@ void ka46_post_vm_init(void) { +#ifdef CONFIG_DZ init_dz11_console(0x200A0000, 3); dz_serial_console_init(0, 0); +#endif } const char *ka46_cpu_type_str(void) Index: cpu_ka55.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka55.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- cpu_ka55.c 25 Apr 2002 08:46:20 -0000 1.6 +++ cpu_ka55.c 26 Oct 2002 10:51:44 -0000 1.7 @@ -91,9 +91,11 @@ void ka55_post_vm_init(void) { +#ifdef CONFIG_DZ init_dz11_console(0x25000000, 3); dz_serial_console_init(0, 0); +#endif } const char *ka55_cpu_type_str(void) |
From: Dave A. <ai...@us...> - 2002-10-26 10:50:09
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv5909 Modified Files: cpu_ka650.c Log Message: DA: backport IPR console support from 2.5 Index: cpu_ka650.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_ka650.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- cpu_ka650.c 25 Apr 2002 08:46:20 -0000 1.4 +++ cpu_ka650.c 26 Oct 2002 10:50:05 -0000 1.5 @@ -54,6 +54,8 @@ unsigned int *ka650_cacr = (unsigned int *)0x20084000; +extern void iprcons_serial_console_init(void); + void ka650_pre_vm_init(void) { mv_ka650.sidex = *(unsigned int *)CVAX_SIDEX_ADDR; @@ -94,8 +96,10 @@ /* Writing to PR_CADR on the CVAX chip implicitly clears the level 1 cache */ __mtpr(KA650_CADR_S2E|KA650_CADR_S1E|KA650_CADR_ISE|KA650_CADR_DSE, PR_CADR); - - register_console(&vax_console); +#if defined(CONFIG_SERIAL_IPR) && defined(CONFIG_SERIAL_CONSOLE) + iprcons_serial_console_init(); +#endif + printk("KA650 sidex = %08x\n", mv_ka650.sidex); } |
From: Dave A. <ai...@us...> - 2002-10-26 10:49:03
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/vax/char In directory usw-pr-cvs1:/tmp/cvs-serv5668/char Modified Files: iprcons.c Log Message: DA: make work with 2.4 Index: iprcons.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/vax/char/iprcons.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- iprcons.c 25 Oct 2002 14:04:35 -0000 1.1 +++ iprcons.c 26 Oct 2002 10:48:56 -0000 1.2 @@ -756,7 +756,7 @@ static kdev_t iprcons_console_device(struct console *cons) { - return mk_kdev(TTY_MAJOR, 64); + return MKDEV(TTY_MAJOR, 64); } static struct console iprcons_sercons = { |
From: Dave A. <ai...@us...> - 2002-10-25 17:36:02
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/vax/net In directory usw-pr-cvs1:/tmp/cvs-serv25791/net Log Message: Directory /cvsroot/linux-vax/kernel-2.4/drivers/vax/net added to the repository |
From: Dave A. <ai...@us...> - 2002-10-25 17:35:58
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/vax/char In directory usw-pr-cvs1:/tmp/cvs-serv27297/char Added Files: Makefile iprcons.c Log Message: DA: backport from 2.5 of Kenns qbus/delqa work - delqa/qbus works iprcons is not working.. needed for SIMH emu --- NEW FILE --- # # Makefile for the Linux/VAX character device drivers. # O_TARGET := vaxchar.o obj-y := obj-m := obj-n := obj-$(CONFIG_SERIAL_IPR) += iprcons.o include $(TOPDIR)/Rules.make --- NEW FILE --- /* $Id: iprcons.c,v 1.1 2002/10/25 14:04:35 airlied Exp $ Copyright (c) 2002, Kenn Humborg Serial driver for VAX console ports that are accessed through internal processor registers (IPRs). "Real" VAX CPUs use 4 internal registers to drive the console serial port (this info is from the VAX Architecture Reference Manual): RXCS Console Receive Control and Status Register Bit 7 RDY (ready, read-only) Cleared by processor initialization and by reading RXDB. When RDY is clear, RXDB is unpredictable. When RDY is set, RXDB contains valid data to be read. Bit 6 IE (interrupt enable, read/write) Cleared by processor initialization and by being written zero. If IE is set by software while RXDB RDY is already set, or if RDY is set by the console while IE is already set, then an interrupt is requested at IPL 14 (hex). That is, an interrupt is requested when the function (IE and RDY) changes from 0 to 1. RXDB Console Receive Data Buffer Register Bit 15 ERROR (read-only) An error occurred while receiving data, such as data overrun or loss of carrier. Cleared by processor initialization and by reading from RXDB. Bits 11:8 ID (read-only) If zero, then data is from the console terminal. If nonzero, then the rest of the register is implementation dependent. Cleared by processor initialization and by reading from RXDB. Bits 7:0 DATA (read-only) Data from the console terminal (if ID is zero). Unpredictable unless RXCS RDY is set. TXCS Console Transmit Control and Status Register Bit 7 RDY (read-only) Set by processor initialization. RDY is clear when the console terminal is busy writing a character written to TXDB. RDY is set when the console terminal is ready to receive another character. Bit 6 IE (interrupt enable, read/write) Cleared by processor initialization and by being written clear. If IE is set by software while RXDB RDY is already set, or if RDY is set by the console while IE is already set, then an interrupt is requested at IPL 14 (hex). That is, an interrupt is requested when the function (IE and RDY) changes from 0 to 1. TXDB Console Transmit Data Buffer Register Bits 11:8 ID (read/write) If ID is written zero when TXDB is written, the data goes to the console terminal. If ID is written with 0F (hex), the data is a message to be sent to the console. If ID is neither zero nor 0F (hex), the meaning is implementation-dependent. Bits 7:0 DATA (read/write) If ID is zero, the data is a character sent to the console terminal to type. If ID is 0F (hex), the data is a message to be sent to the console, with the following meaning: 1. Software done -- A program started by a console indirect command file is signalling successful completion. When the processor halts, the consolel should resume processing the indirect command file. 2. Boot processor -- The console should initiate a system bootstrap. 3. Clear "restart in progress" flag -- A system restart has been successfully completed. If a system restart would occur automatically, the attempt should be allowed. 4. Clear "bootstrap in progress" flag -- A system bootstrap has successfully completed. If a system bootstrap would occur automatically, the attempt should be allowed. However, the implementation of these registers varies a little bit between CPUs. For example, the KA650/655 uses the ID fields a bit differently. To handle this, this driver will evetually become a "template" driver (like drivers/scsi/NCR5380.c) which will be #include-d in individual drivers for each CPU's console port. It will provide all the generic functionality, and provide callouts for any implementation-specific functionality. TODO: o Write iprcons_set_termios(). I don't think we need to do anything here, since there is nothing configurable on these ports. o ioctl() o Write transmit code path: iprcons_write(), iprcons_put_char(), iprcons_flush_chars() and iprcons_write_root(), iprcons_start() and iprcons_stop(), iprcons_wait_until_sent(), iprcons_send_xchar(). o Write TX ISR. o Write receive code path - RX ISR o Write iprcons_close(). Release interrupts and uninit. o Write iprcons_break_ctl(). o SMP/pre-emptive issues o system console support */ #include <linux/version.h> #include <linux/module.h> #include <linux/config.h> #include <linux/kernel.h> #include <linux/sched.h> #include <linux/init.h> #include <linux/slab.h> #include <linux/mm.h> #include <linux/major.h> #include <linux/delay.h> #include <linux/param.h> #include <linux/tqueue.h> #include <linux/interrupt.h> #include <linux/serial.h> #include <linux/serialP.h> #include <linux/generic_serial.h> /* for definition of struct console */ #if defined(CONFIG_SERIAL_CONSOLE) #include <linux/console.h> #include <asm/mv.h> /* for mtpr_putchar */ #endif /* if defined(CONFIG_SERIAL_CONSOLE) */ #include <linux/tty.h> #include <linux/tty_flip.h> #include <asm/uaccess.h> #include <asm/irq.h> #include <asm/mtpr.h> #define IPRCONS_XMIT_SIZE 4096 /* buffer size */ #define WAKEUP_CHARS IPRCONS_XMIT_SIZE/4 #define IPRCONS_EVENT_WRITE_WAKEUP 0 #define IPRCONS_CLOSING_WAIT_INF 0 #define IPRCONS_CLOSING_WAIT_NONE 65535 struct iprcons_serial { struct gs_port gs; /* must be first in structure */ int type; unsigned short x_char; /* pending xon/xoff character */ struct async_icount icount; /* keep track of things ... */ struct tq_struct tqueue; /* Queue for BH */ unsigned long event; /* mask used in BH */ unsigned char is_console; /* flag indicating a serial console */ }; static struct iprcons_serial console_state; static struct tty_driver iprcons_serial_driver, iprcons_callout_driver; static struct tty_struct *iprcons_table[1]; static struct termios *iprcons_termios[1]; static struct termios *iprcons_termios_locked[1]; static int iprcons_refcount; /* Register definitions */ #define PR_RXCS_RDY 0x0080 #define PR_RXCS_IE 0x0040 #define PR_RXDB_ERROR 0x8000 #define PR_RXDB_ID 0x0f00 #define PR_RXDB_DATA 0x00ff #define PR_TXCS_RDY 0x0080 #define PR_TXCS_IE 0x0040 #define PR_TXDB_ID 0x0f00 #define PR_TXDB_DATA 0x00ff /* These vectors are defined by the VAX Architecture Reference Manual */ #define IPRCONS_RX_VECTOR 0x3e #define IPRCONS_TX_VECTOR 0x3f static void iprcons_enable_rx_interrupts(void *ptr) { __mtpr(PR_RXCS_IE, PR_RXCS); } static void iprcons_disable_rx_interrupts(void *ptr) { __mtpr(0, PR_RXCS); } static void iprcons_enable_tx_interrupts(void *ptr) { __mtpr(PR_TXCS_IE, PR_TXCS); } static void iprcons_disable_tx_interrupts(void *ptr) { __mtpr(0, PR_TXCS); } static int iprcons_get_CD(void *ptr) { /* Our hardware doesn't have a CD line, so pretend that CD is always asserted */ return 1; } /* * ------------------------------------------------------------ * iprcons_sched_event () * * This routine is used by the interrupt handler to schedule * processing in the software interrupt portion of the driver. * ------------------------------------------------------------ */ static inline void iprcons_sched_event (struct iprcons_serial *port, int event) { port->event |= 1 << event; queue_task(&port->tqueue, &tq_immediate); mark_bh(IMMEDIATE_BH); } /* * ------------------------------------------------------------ * receive_char () * * This routine deals with input from the port * ------------------------------------------------------------ */ static inline void iprcons_rx_char(struct iprcons_serial *port, unsigned int rxcs, unsigned int rxdb) { struct tty_struct *tty = port->gs.tty; unsigned char ch = rxdb & PR_RXDB_DATA; if (tty->flip.count >= TTY_FLIPBUF_SIZE) { /* No space for this character */ return; } *tty->flip.char_buf_ptr = ch; *tty->flip.flag_buf_ptr = TTY_NORMAL; port->icount.rx++; /* FIXME: provide a hook here for individual CPUs to interpret their error bits and update the stats and the flag_buf flags. */ tty->flip.flag_buf_ptr++; tty->flip.char_buf_ptr++; tty->flip.count++; tty_flip_buffer_push(tty); } static inline void iprcons_outchar(unsigned char c) { __mtpr(c, PR_TXDB); } static inline void iprcons_tx_ready(struct iprcons_serial *port) { if (port->x_char) { /* XON/XOFF chars */ iprcons_outchar(port->x_char); port->icount.tx++; port->x_char = 0; return; } /* if nothing to do or stopped */ if (port->gs.xmit_cnt <= 0) { port->gs.flags &= ~GS_TX_INTEN; iprcons_disable_tx_interrupts(port); printk("TX interrupt: nothing to transmit\n"); return; } /* If there is anything waiting, send it now */ // iprcons_outchar(port->gs.xmit_buf[port->gs.xmit_tail]); mtpr_putchar(port->gs.xmit_buf[port->gs.xmit_tail]); // printk("TX interrupt: would transmit %02x - %c\n", // port->gs.xmit_buf[port->gs.xmit_tail], // port->gs.xmit_buf[port->gs.xmit_tail]); port->gs.xmit_tail = (port->gs.xmit_tail + 1) & (SERIAL_XMIT_SIZE - 1); port->gs.xmit_cnt--; port->icount.tx++; if (port->gs.xmit_cnt <= port->gs.wakeup_chars) { iprcons_sched_event(port, IPRCONS_EVENT_WRITE_WAKEUP); } if (port->gs.xmit_cnt <= 0) { port->gs.flags &= ~GS_TX_INTEN; iprcons_disable_tx_interrupts(port); } } static void iprcons_rx_interrupt (int irq, void *dev, struct pt_regs *regs) { unsigned int rxcs = __mfpr(PR_RXCS); unsigned int rxdb = __mfpr(PR_RXDB); struct iprcons_serial *port = dev; // printk("iprcons_rx_interrupt: RXCS=%04x RXDB=%04x\n", rxcs, rxdb); if (port->gs.flags & GS_ACTIVE) { if (rxcs & PR_RXCS_RDY) { iprcons_rx_char(port, rxcs, rxdb); } } else { iprcons_disable_rx_interrupts(port); } } static void iprcons_tx_interrupt (int irq, void *dev, struct pt_regs *regs) { unsigned int txcs = __mfpr(PR_TXCS); struct iprcons_serial *port = dev; // printk("iprcons_tx_interrupt: TXCS=%04x\n", txcs); if (port->gs.flags & GS_ACTIVE) { if (txcs & PR_TXCS_RDY) { iprcons_tx_ready(port); } } else { iprcons_disable_tx_interrupts(port); } } static void do_softint(void *ptr) { struct iprcons_serial *port = ptr; struct tty_struct *tty; tty = port->gs.tty; if (!tty) return; if (test_and_clear_bit(IPRCONS_EVENT_WRITE_WAKEUP, &port->event)) { if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) (tty->ldisc.write_wakeup)(tty); wake_up_interruptible(&tty->write_wait); } } /* * ------------------------------------------------------------------- * iprcons_chars_in_buffer () * * compute the amount of characters in the _hardware's_ output buffer * ------------------------------------------------------------------- */ static int iprcons_chars_in_buffer (void *ptr) { if (__mfpr(PR_TXCS) & PR_TXCS_RDY) { /* output buffer must be empty */ return 0; } else { /* Output buffer must contain 1 character */ return 1; } } /* * ------------------------------------------------------------ * iprcons_throttle () and iprcons_unthrottle () * * This routine is called by the upper-layer tty layer to signal that * incoming characters should be throttled (or not). * ------------------------------------------------------------ */ static void iprcons_throttle (struct tty_struct *tty) { struct iprcons_serial *port = tty->driver_data; if (I_IXOFF(tty)) { port->x_char = STOP_CHAR(tty); } } static void iprcons_unthrottle (struct tty_struct *tty) { struct iprcons_serial *port = tty->driver_data; if (I_IXOFF(tty)) { if (port->x_char) { port->x_char = 0; } else { port->x_char = START_CHAR(tty); } } } static void iprcons_send_xchar (struct tty_struct *tty, char ch) { struct iprcons_serial *port = tty->driver_data; port->x_char = ch; if (ch) { gs_start(port->gs.tty); } } /* * ------------------------------------------------------------ * iprcons_ioctl () and friends * ------------------------------------------------------------ */ static int iprcons_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { struct iprcons_serial *port = tty->driver_data; int retval; retval = 0; switch (cmd) { case TIOCGSOFTCAR: retval = put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned long *)arg); break; case TIOCSSOFTCAR: retval = get_user (arg, (unsigned long *)arg); if (retval == 0) { tty->termios->c_cflag = (tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0); } break; case TIOCGSERIAL: retval = verify_area(VERIFY_WRITE, (void *) arg, sizeof(struct serial_struct)); if (retval == 0) { gs_getserial(&port->gs, (struct serial_struct *) arg); } break; case TIOCSSERIAL: retval = verify_area(VERIFY_READ, (void *) arg, sizeof(struct serial_struct)); if (retval == 0) { retval = gs_setserial(&port->gs, (struct serial_struct *) arg); } break; default: return -ENOIOCTLCMD; } return 0; } /* * ------------------------------------------------------------------- * iprcons_request_irqs() * * This routine is called during the first open() on the port to * hook interrupts. * ------------------------------------------------------------------- */ static int iprcons_request_irqs(struct iprcons_serial *port) { unsigned int retval; unsigned long flags; save_and_cli(flags); retval = request_irq(IPRCONS_TX_VECTOR, iprcons_tx_interrupt, 0, "iprcons-tx", port); if (retval) { printk("iprcons: unable to acquire TX interrupt vector\n"); } else { retval = request_irq(IPRCONS_RX_VECTOR, iprcons_rx_interrupt, 0, "iprcons-rx", port); if (retval) { free_irq(IPRCONS_TX_VECTOR, port); printk("iprcons: unable to acquire RX interrupt vector\n"); } } restore_flags (flags); return retval; } static void iprcons_free_irqs(struct iprcons_serial *port) { free_irq(IPRCONS_TX_VECTOR, port); free_irq(IPRCONS_RX_VECTOR, port); } static void iprcons_shutdown_port(void *ptr) { struct iprcons_serial *port = ptr; port->gs.flags &= ~GS_ACTIVE; iprcons_free_irqs(port); } static int iprcons_set_real_termios(void *ptr) { return 0; } static void iprcons_hungup(void *ptr) { MOD_DEC_USE_COUNT; } static void iprcons_close(void *ptr) { MOD_DEC_USE_COUNT; //printk("iprcons_close: count = %d\n", ((struct iprcons_serial *)ptr)->gs.count); } static struct real_driver iprcons_real_driver = { iprcons_disable_tx_interrupts, iprcons_enable_tx_interrupts, iprcons_disable_rx_interrupts, iprcons_enable_rx_interrupts, iprcons_get_CD, iprcons_shutdown_port, iprcons_set_real_termios, iprcons_chars_in_buffer, iprcons_close, iprcons_hungup, NULL }; /* * This routine is called whenever a serial port is opened. It * enables interrupts for a serial port. It also performs the * serial-specific initialization for the tty structure. */ static int iprcons_open (struct tty_struct *tty, struct file *filp) { struct iprcons_serial *port; int retval; port = &console_state; tty->driver_data = port; port->gs.tty = tty; port->gs.count++; port->event = 0; port->tqueue.routine = do_softint; port->tqueue.data = port; //printk("iprcons_open: entered: count = %d\n", port->gs.count); retval = gs_init_port(&port->gs); if (retval) { goto failed_1; } port->gs.flags |= GS_ACTIVE; if (port->gs.count == 1) { MOD_INC_USE_COUNT; retval = iprcons_request_irqs(port); if (retval) { goto failed_2; } } retval = gs_block_til_ready(port, filp); if (retval) { goto failed_3; } if ((port->gs.count == 1) && (port->gs.flags & ASYNC_SPLIT_TERMIOS)) { if (tty->driver.subtype == SERIAL_TYPE_NORMAL) { *tty->termios = port->gs.normal_termios; } else { *tty->termios = port->gs.callout_termios; } } iprcons_enable_rx_interrupts(port); port->gs.session = current->session; port->gs.pgrp = current->pgrp; return 0; failed_3: iprcons_free_irqs(port); failed_2: MOD_DEC_USE_COUNT; failed_1: port->gs.count--; return retval; } int __init iprcons_init(void) { /* Should really check for CPUs with IPR-based consoles here */ int error; struct iprcons_serial *port; memset(&iprcons_serial_driver, 0, sizeof(iprcons_serial_driver)); iprcons_serial_driver.magic = TTY_DRIVER_MAGIC; iprcons_serial_driver.name = "ttyS"; iprcons_serial_driver.major = TTY_MAJOR; iprcons_serial_driver.minor_start = 64; iprcons_serial_driver.num = 1; iprcons_serial_driver.type = TTY_DRIVER_TYPE_SERIAL; iprcons_serial_driver.subtype = SERIAL_TYPE_NORMAL; iprcons_serial_driver.init_termios = tty_std_termios; iprcons_serial_driver.init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; iprcons_serial_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; iprcons_serial_driver.refcount = &iprcons_refcount; iprcons_serial_driver.table = iprcons_table; iprcons_serial_driver.termios = iprcons_termios; iprcons_serial_driver.termios_locked = iprcons_termios_locked; iprcons_serial_driver.open = iprcons_open; iprcons_serial_driver.close = gs_close; iprcons_serial_driver.write = gs_write; iprcons_serial_driver.put_char = gs_put_char; iprcons_serial_driver.flush_chars = gs_flush_chars; iprcons_serial_driver.write_room = gs_write_room; iprcons_serial_driver.chars_in_buffer = gs_chars_in_buffer; iprcons_serial_driver.flush_buffer = gs_flush_buffer; iprcons_serial_driver.ioctl = iprcons_ioctl; iprcons_serial_driver.throttle = iprcons_throttle; iprcons_serial_driver.unthrottle = iprcons_unthrottle; iprcons_serial_driver.send_xchar = iprcons_send_xchar; iprcons_serial_driver.stop = gs_stop; iprcons_serial_driver.start = gs_start; iprcons_serial_driver.hangup = gs_hangup; /* * The callout device is just like normal device except for major * number and the subtype code. */ iprcons_callout_driver = iprcons_serial_driver; iprcons_callout_driver.name = "cua"; iprcons_callout_driver.major = TTYAUX_MAJOR; iprcons_callout_driver.subtype = SERIAL_TYPE_CALLOUT; error = tty_register_driver (&iprcons_serial_driver); if (error) { printk("iprcons: Couldn't register serial driver: error = %d\n", error); return 1; } error = tty_register_driver (&iprcons_callout_driver); if (error) { tty_unregister_driver(&iprcons_serial_driver); printk("iprcons: Couldn't register callout driver: error = %d\n", error); return 1; } port = &console_state; memset(port, 0, sizeof(*port)); port->gs.magic = SERIAL_MAGIC; port->gs.callout_termios = iprcons_callout_driver.init_termios; port->gs.normal_termios = iprcons_serial_driver.init_termios; port->gs.close_delay = HZ/2; port->gs.closing_wait = 30 * HZ; init_waitqueue_head(&port->gs.open_wait); init_waitqueue_head(&port->gs.close_wait); port->gs.rd = &iprcons_real_driver; printk("ttyS0: Internal processor register console\n"); return 0; } __initcall(iprcons_init); /* End of regular serial port support - the rest of this file is related to serial console (printk) support */ #ifdef CONFIG_SERIAL_CONSOLE static void iprcons_console_print(struct console *cons, const char *str, unsigned int count) { unsigned int old_ie; old_ie = __mfpr(PR_TXCS) & PR_TXCS_IE; /* Ensure TX interrupts are disabled */ __mtpr(0, PR_TXCS); while (count--) { if (*str == '\n') { mtpr_putchar('\r'); } mtpr_putchar(*str++); } /* Enable TX interrupts again if necessary */ __mtpr(old_ie, PR_TXCS); } static kdev_t iprcons_console_device(struct console *cons) { return mk_kdev(TTY_MAJOR, 64); } static struct console iprcons_sercons = { name: "ttyS", write: iprcons_console_print, device: iprcons_console_device, flags: CON_CONSDEV | CON_PRINTBUFFER, index: 0, }; void __init iprcons_serial_console_init(void) { register_console(&iprcons_sercons); } #endif /* ifdef CONFIG_SERIAL_CONSOLE */ |
From: Dave A. <ai...@us...> - 2002-10-25 17:35:45
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax/bus In directory usw-pr-cvs1:/tmp/cvs-serv1902/bus Added Files: qbus.h Log Message: DA: backport 2.5 qbus support to 2.4 for SIMH --- NEW FILE --- #include <asm/dma.h> /* Soon these functions will be moved to a bus_ops structure */ void qbus_dumpmap(void); struct vax_dmamap *qbus_alloc_mapregs(void *start, unsigned int len); void qbus_unmap(struct vax_dmamap *mapping); int qbus_vector_to_irq(unsigned int vector); int qbus_request_irq(unsigned int qbus_vector, void (*handler)(int, void *, struct pt_regs *), unsigned long irqflags, const char * devname, void *dev_id); |