You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(165) |
Sep
(240) |
Oct
(424) |
Nov
(526) |
Dec
(293) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(242) |
Feb
(149) |
Mar
(143) |
Apr
(143) |
May
(76) |
Jun
(59) |
Jul
(20) |
Aug
(2) |
Sep
(49) |
Oct
(1) |
Nov
(4) |
Dec
|
2003 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(72) |
Jul
(36) |
Aug
(9) |
Sep
(16) |
Oct
(23) |
Nov
(9) |
Dec
(3) |
2010 |
Jan
|
Feb
(1) |
Mar
(35) |
Apr
(44) |
May
(56) |
Jun
(71) |
Jul
(41) |
Aug
(41) |
Sep
(22) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(25) |
Oct
(105) |
Nov
(15) |
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
Update of /cvsroot/linux-mips/linux/fs/jffs2/test In directory usw-pr-cvs1:/tmp/cvs-serv17920/fs/jffs2/test Removed Files: compr_rubin.h histo.cc histo.h histo1.h histo2.h histo_html.h histo_text.h main.c pushpull.h rtime.h Log Message: jffs2 is in Linus's tree. --- compr_rubin.h DELETED --- --- histo.cc DELETED --- --- histo.h DELETED --- --- histo1.h DELETED --- --- histo2.h DELETED --- --- histo_html.h DELETED --- --- histo_text.h DELETED --- --- main.c DELETED --- --- pushpull.h DELETED --- --- rtime.h DELETED --- |
Update of /cvsroot/linux-mips/linux/fs/jffs2 In directory usw-pr-cvs1:/tmp/cvs-serv17920/fs/jffs2 Removed Files: Makefile TODO background.c build.c compr.c compr_rtime.c compr_rubin.c compr_rubin.h compr_zlib.c comprtest.c crc32.c crc32.h dir.c erase.c file.c gc.c histo.h histo_mips.h ioctl.c malloc.c nodelist.c nodelist.h nodemgmt.c pushpull.c pushpull.h read.c readinode.c scan.c super.c symlink.c write.c zlib.c zlib.h Log Message: jffs2 is in Linus's tree. --- Makefile DELETED --- --- TODO DELETED --- --- background.c DELETED --- --- build.c DELETED --- --- compr.c DELETED --- --- compr_rtime.c DELETED --- --- compr_rubin.c DELETED --- --- compr_rubin.h DELETED --- --- compr_zlib.c DELETED --- --- comprtest.c DELETED --- --- crc32.c DELETED --- --- crc32.h DELETED --- --- dir.c DELETED --- --- erase.c DELETED --- --- file.c DELETED --- --- gc.c DELETED --- --- histo.h DELETED --- --- histo_mips.h DELETED --- --- ioctl.c DELETED --- --- malloc.c DELETED --- --- nodelist.c DELETED --- --- nodelist.h DELETED --- --- nodemgmt.c DELETED --- --- pushpull.c DELETED --- --- pushpull.h DELETED --- --- read.c DELETED --- --- readinode.c DELETED --- --- scan.c DELETED --- --- super.c DELETED --- --- symlink.c DELETED --- --- write.c DELETED --- --- zlib.c DELETED --- --- zlib.h DELETED --- |
From: Bradley D. L. <br...@us...> - 2001-11-04 16:02:55
|
Update of /cvsroot/linux-mips/linux/arch/mips/philips/nino In directory usw-pr-cvs1:/tmp/cvs-serv15502/arch/mips/philips/nino Modified Files: Makefile int-handler.S irq.c kgdb.c power.c prom.c setup.c time.c Log Message: Please correct me if I'm wrong, but I think oss has the latest Nino stuff. Index: Makefile =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/philips/nino/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile 2001/10/27 20:29:40 1.5 +++ Makefile 2001/11/04 16:02:52 1.6 @@ -22,6 +22,12 @@ obj-$(CONFIG_REMOTE_DEBUG) += kgdb.o +obj-$(CONFIG_BLK_DEV_INITRD) += ramdisk.o + +ramdisk.o: + $(MAKE) -C ramdisk + mv ramdisk/ramdisk.o ramdisk.o + clean: rm -f *.o Index: int-handler.S =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/philips/nino/int-handler.S,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- int-handler.S 2001/10/31 18:29:07 1.3 +++ int-handler.S 2001/11/04 16:02:52 1.4 @@ -1,14 +1,9 @@ /* - * arch/mips/philips/nino/int-handler.S + * int-handler.S: Interrupt exception dispatch code for Philips Nino * * Copyright (C) 2001 Steven J. Hill (sj...@re...) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Interrupt exception dispatch code for Philips Nino */ + #include <asm/asm.h> #include <asm/mipsregs.h> #include <asm/regdef.h> @@ -18,16 +13,26 @@ * Here is the table of interrupts for the Philips Nino * which uses the Philips PR31700/Toshiba TMPR3912 core. * - * MIPS IRQ Description - * -------- -------------------------------- - * 0 SW0 interrupt (unused) - * 1 SW1 interrupt (unused) - * 2 - * 3 - * 4 PR31700 low priority interrupts - * 5 - * 6 PR31700 high priority interrupts - * 7 + * MIPS IRQ PR31700 IRQ Source + * -------- ----------- ------ + * 0 1 Sound, LCD, telecom + * 1 2 UARTA & UARTB + * 2 3 MFIO (positive edge) + * 3 4 MFIO (negative edge) + * 4 5 Timers, power management + * 5 6 High priority interrupts + * + * We handle the IRQ according to the priorities below: + * + * Highest ---- High priority interrupts + * UARTA & UARTB + * Timers, power management + * Sound, LCD, telecom + * Multi-function IO (positive edge) + * Lowest ---- Multi-function IO (negative edge) + * + * then we just return, if multiple IRQs are pending then + * we will just take another exception, big deal. */ .text @@ -38,29 +43,40 @@ SAVE_ALL CLI .set at - mfc0 s0, CP0_CAUSE # determine cause + mfc0 s0, CP0_CAUSE # get irq mask - andi a0, s0, CAUSEF_IP6 + /* Check for IRQ4 */ + andi a0, s0, C_IRQ4 beq a0, zero, 1f - andi a0, s0, CAUSEF_IP4 # delay slot + andi a0, s0, C_IRQ2 # delay slot, check for IRQ2 + + /* High priority interrupt */ move a0, sp - jal irq6_dispatch + jal irq4_dispatch nop # delay slot + j ret_from_irq nop # delay slot 1: + /* Check for IRQ2 */ beq a0, zero, 1f nop # delay slot + + /* UART interrupt of some sort */ move a0, sp - jal irq4_dispatch + jal irq2_dispatch nop # delay slot + j ret_from_irq nop # delay slot 1: /* We should never get here */ move a0, sp - j irq_bad + jal irq_bad + nop + + j ret_from_irq nop END(ninoIRQ) Index: irq.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/philips/nino/irq.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- irq.c 2001/10/31 18:29:07 1.5 +++ irq.c 2001/11/04 16:02:52 1.6 @@ -1,13 +1,7 @@ /* - * arch/mips/philips/nino/irq.c + * include/arch/mips/philips/nino/irq.c * * Copyright (C) 2001 Steven J. Hill (sj...@re...) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Interrupt service routines for Philips Nino */ #include <linux/init.h> #include <linux/sched.h> @@ -19,7 +13,7 @@ extern asmlinkage void do_IRQ(int irq, struct pt_regs *regs); -static void enable_irq6(unsigned int irq) +static void enable_irq4(unsigned int irq) { if(irq == 0) { IntEnable5 |= INT5_PERIODICINT; @@ -27,14 +21,14 @@ } } -static unsigned int startup_irq6(unsigned int irq) +static unsigned int startup_irq4(unsigned int irq) { - enable_irq6(irq); + enable_irq4(irq); return 0; /* Never anything pending */ } -static void disable_irq6(unsigned int irq) +static void disable_irq4(unsigned int irq) { if(irq == 0) { IntEnable6 &= ~INT6_PERIODICINT; @@ -43,27 +37,27 @@ } } -#define shutdown_irq6 disable_irq6 -#define mask_and_ack_irq6 disable_irq6 +#define shutdown_irq4 disable_irq4 +#define mask_and_ack_irq4 disable_irq4 -static void end_irq6(unsigned int irq) +static void end_irq4(unsigned int irq) { if(!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) - enable_irq6(irq); + enable_irq4(irq); } -static struct hw_interrupt_type irq6_type = { +static struct hw_interrupt_type irq4_type = { "MIPS", - startup_irq6, - shutdown_irq6, - enable_irq6, - disable_irq6, - mask_and_ack_irq6, - end_irq6, + startup_irq4, + shutdown_irq4, + enable_irq4, + disable_irq4, + mask_and_ack_irq4, + end_irq4, NULL }; -void irq6_dispatch(struct pt_regs *regs) +void irq4_dispatch(struct pt_regs *regs) { int irq = -1; @@ -74,7 +68,8 @@ /* if irq == -1, then the interrupt has already been cleared */ if(irq == -1) { - panic("No handler installed for MIPS IRQ6\n"); + printk("IRQ6 Status Register = 0x%08lx\n", IntStatus6); + goto end; } done: @@ -84,59 +79,68 @@ return; } -static void enable_irq4(unsigned int irq) +static void enable_irq2(unsigned int irq) { set_cp0_status(STATUSF_IP4); - if(irq == 2) { + if(irq == 2 || irq == 3) { IntClear2 = 0xffffffff; - IntEnable2 |= 0x07c00000; + IntEnable2 = 0xfffff000; } } -static unsigned int startup_irq4(unsigned int irq) +static unsigned int startup_irq2(unsigned int irq) { - enable_irq4(irq); + enable_irq2(irq); return 0; /* Never anything pending */ } -static void disable_irq4(unsigned int irq) +static void disable_irq2(unsigned int irq) { clear_cp0_status(STATUSF_IP4); } -#define shutdown_irq4 disable_irq4 -#define mask_and_ack_irq4 disable_irq4 +#define shutdown_irq2 disable_irq2 +#define mask_and_ack_irq2 disable_irq2 -static void end_irq4(unsigned int irq) +static void end_irq2(unsigned int irq) { if(!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) - enable_irq4(irq); + enable_irq2(irq); } -static struct hw_interrupt_type irq4_type = { +static struct hw_interrupt_type irq2_type = { "MIPS", - startup_irq4, - shutdown_irq4, - enable_irq4, - disable_irq4, - mask_and_ack_irq4, - end_irq4, + startup_irq2, + shutdown_irq2, + enable_irq2, + disable_irq2, + mask_and_ack_irq2, + end_irq2, NULL }; -void irq4_dispatch(struct pt_regs *regs) +void irq2_dispatch(struct pt_regs *regs) { int irq = -1; - if(IntStatus2 & 0x07c00000) { + if(IntStatus2 & 0xfffff000) { irq = 2; goto done; } + if(IntStatus2 & 0xfffff000) { + irq = 3; + goto done; + } /* if irq == -1, then the interrupt has already been cleared */ if (irq == -1) { - panic("No handler installed for MIPS IRQ4\n"); + printk("EEK\n"); + IntClear1 = 0xffffffff; + IntClear3 = 0xffffffff; + IntClear4 = 0xffffffff; + IntClear5 = 0xffffffff; + goto end; } done: @@ -186,10 +190,10 @@ /* Initialize IRQ action handlers */ for (i = 0; i < 16; i++) { hw_irq_controller *handler = NULL; - if (i == 0 || i == 3) - handler = &irq6_type; - else if (i == 2) + if (i == 0) handler = &irq4_type; + else if (i > 1 && i < 4) + handler = &irq2_type; else handler = NULL; @@ -205,8 +209,8 @@ /* Enable high priority interrupts */ IntEnable6 = (INT6_GLOBALEN | 0xffff); - /* Enable all interrupts */ - change_cp0_status(ST0_IM, ALLINTS); + /* Enable interrupts */ + change_cp0_status(ST0_IM, IE_IRQ2 | IE_IRQ4); } void (*irq_setup)(void); Index: kgdb.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/philips/nino/kgdb.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- kgdb.c 2001/10/31 18:29:07 1.2 +++ kgdb.c 2001/11/04 16:02:52 1.3 @@ -1,5 +1,5 @@ /* - * arch/mips/philips/nino/kgdb.c + * linux/arch/mips/philips/nino/kgdb.c * * Copyright (C) 2001 Steven J. Hill (sj...@re...) * @@ -7,7 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * Kernel debugging for the Philips Nino + * Kernel debugging on the Philips Nino. */ #include <asm/system.h> #include <asm/tx3912.h> Index: power.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/philips/nino/power.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- power.c 2001/10/31 18:29:07 1.2 +++ power.c 2001/11/04 16:02:52 1.3 @@ -1,5 +1,5 @@ /* - * arch/mips/philips/nino/power.c + * linux/arch/mips/philips/nino/power.c * * Copyright (C) 2000 Jim Pick <ji...@ji...> * Copyright (C) 2001 Steven J. Hill (sj...@re...) @@ -8,7 +8,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * Power management routines for the Philips Nino + * Power management routines on the Philips Nino. */ #include <asm/tx3912.h> Index: prom.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/philips/nino/prom.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- prom.c 2001/10/31 18:29:08 1.3 +++ prom.c 2001/11/04 16:02:52 1.4 @@ -1,5 +1,5 @@ /* - * arch/mips/philips/nino/prom.c + * linux/arch/mips/philips/nino/prom.c * * Copyright (C) 2001 Steven J. Hill (sj...@re...) * @@ -7,7 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * Early initialization code for the Philips Nino + * Early initialization code for the Philips Nino. */ #include <linux/config.h> #include <linux/init.h> Index: setup.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/philips/nino/setup.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- setup.c 2001/10/31 18:29:08 1.4 +++ setup.c 2001/11/04 16:02:52 1.5 @@ -1,5 +1,5 @@ /* - * arch/mips/philips/nino/setup.c + * linux/arch/mips/philips/nino/setup.c * * Copyright (C) 2001 Steven J. Hill (sj...@re...) * @@ -7,7 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * Interrupt and exception initialization for Philips Nino + * Interrupt and exception initialization for Philips Nino. */ #include <linux/init.h> #include <linux/interrupt.h> Index: time.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/philips/nino/time.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- time.c 2001/10/31 18:29:08 1.4 +++ time.c 2001/11/04 16:02:52 1.5 @@ -1,5 +1,5 @@ /* - * arch/mips/philips/nino/time.c + * linux/arch/mips/philips/nino/time.c * * Copyright (C) 1999 Harald Koerfgen * Copyright (C) 2000 Pavel Machek (pa...@su...) @@ -9,7 +9,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * - * Time handling functinos for Philips Nino + * Time handling functinos for Philips Nino. */ #include <linux/errno.h> #include <linux/init.h> |
From: Bradley D. L. <br...@us...> - 2001-11-04 15:57:41
|
Update of /cvsroot/linux-mips/linux/arch/mips/mm In directory usw-pr-cvs1:/tmp/cvs-serv14566/arch/mips/mm Modified Files: c-r5432.c fault.c Log Message: Trivial sync w/oss. Index: c-r5432.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/mm/c-r5432.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- c-r5432.c 2001/10/31 18:26:52 1.2 +++ c-r5432.c 2001/11/04 15:57:38 1.3 @@ -42,7 +42,7 @@ /* -------------------------------------------------------------------- */ /* #include <asm/r4kcache.h> */ -static inline void flush_icache_line_indexed(unsigned long addr) +extern inline void flush_icache_line_indexed(unsigned long addr) { __asm__ __volatile__( ".set noreorder\n\t" @@ -56,7 +56,7 @@ "i" (Index_Invalidate_I)); } -static inline void flush_dcache_line_indexed(unsigned long addr) +extern inline void flush_dcache_line_indexed(unsigned long addr) { __asm__ __volatile__( ".set noreorder\n\t" @@ -70,7 +70,7 @@ "i" (Index_Writeback_Inv_D)); } -static inline void flush_icache_line(unsigned long addr) +extern inline void flush_icache_line(unsigned long addr) { __asm__ __volatile__( ".set noreorder\n\t" @@ -83,7 +83,7 @@ "i" (Hit_Invalidate_I)); } -static inline void flush_dcache_line(unsigned long addr) +extern inline void flush_dcache_line(unsigned long addr) { __asm__ __volatile__( ".set noreorder\n\t" @@ -96,7 +96,7 @@ "i" (Hit_Writeback_Inv_D)); } -static inline void invalidate_dcache_line(unsigned long addr) +extern inline void invalidate_dcache_line(unsigned long addr) { __asm__ __volatile__( ".set noreorder\n\t" @@ -113,7 +113,7 @@ /* * The next two are for badland addresses like signal trampolines. */ -static inline void protected_flush_icache_line(unsigned long addr) +extern inline void protected_flush_icache_line(unsigned long addr) { __asm__ __volatile__( ".set noreorder\n\t" @@ -129,7 +129,7 @@ "i" (Hit_Invalidate_I)); } -static inline void protected_writeback_dcache_line(unsigned long addr) +extern inline void protected_writeback_dcache_line(unsigned long addr) { __asm__ __volatile__( ".set noreorder\n\t" @@ -172,7 +172,7 @@ : "r" (base), \ "i" (op)); -static inline void blast_dcache32(void) +extern inline void blast_dcache32(void) { unsigned long start = KSEG0; unsigned long end = (start + dcache_size/2); @@ -184,7 +184,7 @@ } } -static inline void blast_dcache32_page(unsigned long page) +extern inline void blast_dcache32_page(unsigned long page) { unsigned long start = page; unsigned long end = (start + PAGE_SIZE); @@ -195,7 +195,7 @@ } } -static inline void blast_dcache32_page_indexed(unsigned long page) +extern inline void blast_dcache32_page_indexed(unsigned long page) { unsigned long start = page; unsigned long end = (start + PAGE_SIZE); @@ -207,7 +207,7 @@ } } -static inline void blast_icache32(void) +extern inline void blast_icache32(void) { unsigned long start = KSEG0; unsigned long end = (start + icache_size/2); @@ -219,7 +219,7 @@ } } -static inline void blast_icache32_page(unsigned long page) +extern inline void blast_icache32_page(unsigned long page) { unsigned long start = page; unsigned long end = (start + PAGE_SIZE); @@ -230,7 +230,7 @@ } } -static inline void blast_icache32_page_indexed(unsigned long page) +extern inline void blast_icache32_page_indexed(unsigned long page) { unsigned long start = page; unsigned long end = (start + PAGE_SIZE); Index: fault.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/mm/fault.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- fault.c 2001/10/31 19:13:03 1.6 +++ fault.c 2001/11/04 15:57:38 1.7 @@ -202,7 +202,7 @@ "address %08lx, epc == %08lx, ra == %08lx\n", address, regs->cp0_epc, regs->regs[31]); die("Oops", regs); - bust_spinlocks(0); + bust_spinlock(0); do_exit(SIGKILL); /* |
From: James S. <jsi...@us...> - 2001-11-02 17:49:11
|
Update of /cvsroot/linux-mips/linux/kernel In directory usw-pr-cvs1:/tmp/cvs-serv9755 Added Files: Makefile Log Message: Added in generic IS dma support. This devices without it don't need to compile it in. Plus some deivces need their own generic dma code. --- NEW FILE: Makefile --- # # Makefile for the linux kernel. # # Note! Dependencies are done automagically by 'make dep', which also # removes any old dependencies. DON'T put your own dependencies here # unless it's something special (ie not a .c file). # # Note 2! The CFLAGS definitions are now in the main makefile... O_TARGET := kernel.o export-objs = signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o printk.o obj-y = sched.o fork.o exec_domain.o panic.o printk.o \ module.o exit.o itimer.o info.o time.o softirq.o resource.o \ sysctl.o acct.o capability.o ptrace.o timer.o user.o \ signal.o sys.o kmod.o context.o obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o obj-$(CONFIG_UID16) += uid16.o obj-$(CONFIG_MODULES) += ksyms.o obj-$(CONFIG_PM) += pm.o ifneq ($(CONFIG_IA64),y) # According to Alan Modra <al...@li...>, the -fno-omit-frame-pointer is # needed for x86 only. Why this used to be enabled for all architectures is beyond # me. I suspect most platforms don't need this, but until we know that for sure # I turn this off for IA-64 only. Andreas Schwab says it's also needed on m68k # to get a correct value for the wait-channel (WCHAN in ps). --davidm CFLAGS_sched.o := $(PROFILING) -fno-omit-frame-pointer endif include $(TOPDIR)/Rules.make |
From: James S. <jsi...@us...> - 2001-11-01 22:29:26
|
Update of /cvsroot/linux-mips/linux/Documentation/mips/pci In directory usw-pr-cvs1:/tmp/cvs-serv1631 Modified Files: pci_fixups.c Log Message: Small note which if I new would have saved me alot of headaches. pcibios_fixup_resource is called after pcibios_fixup_irq which itslef is called after pcibios_init. Index: pci_fixups.c =================================================================== RCS file: /cvsroot/linux-mips/linux/Documentation/mips/pci/pci_fixups.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- pci_fixups.c 2001/10/22 21:24:44 1.2 +++ pci_fixups.c 2001/11/01 22:29:23 1.3 @@ -36,7 +36,7 @@ /* * Fixup your resources here, if necessary. *Usually* you * don't have to do anything here. - * Called after pcibios_fixup(). + * Called after pcibios_fixup() and pcibios_fixup_irqs(). */ void __init pcibios_fixup_resources(struct pci_dev *dev) { @@ -56,6 +56,7 @@ /* * This is very board specific. You'll have to look at * each pci device and assign its interrupt number. + * This function is called last of all the fixup functions. */ void __init pcibios_fixup_irqs(void) { |
From: Pete P. <pp...@us...> - 2001-11-01 21:58:17
|
Update of /cvsroot/linux-mips/linux/arch/mips In directory usw-pr-cvs1:/tmp/cvs-serv24461/arch/mips Modified Files: Makefile Log Message: Oops. Index: Makefile =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/Makefile,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- Makefile 2001/11/01 21:47:06 1.25 +++ Makefile 2001/11/01 21:58:13 1.26 @@ -16,7 +16,7 @@ # Select the object file format to substitute into the linker script. # ifdef CONFIG_CPU_LITTLE_ENDIAN -tool-prefix = mips_fp_le- +tool-prefix = mipsel-linux- else tool-prefix = mips-linux- endif |
From: James S. <jsi...@tr...> - 2001-11-01 21:52:05
|
> +++ Makefile 2001/11/01 21:47:06 1.25 > @@ -16,7 +16,7 @@ > # Select the object file format to substitute into the linker script. > # > ifdef CONFIG_CPU_LITTLE_ENDIAN > -tool-prefix = mipsel-linux- > +tool-prefix = mips_fp_le- > else > tool-prefix = mips-linux- > endif Please change that back. I want to stick as close as possible to the name of the GNU compiler. |
From: Pete P. <pp...@us...> - 2001-11-01 21:47:10
|
Update of /cvsroot/linux-mips/linux/drivers/net/irda In directory usw-pr-cvs1:/tmp/cvs-serv21264/drivers/net/irda Modified Files: au1k_ir.c Log Message: * fixed tx timeout problem * fixed module unload/load crash * cleaned up some debug code Index: au1k_ir.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/net/irda/au1k_ir.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- au1k_ir.c 2001/10/31 18:50:55 1.1 +++ au1k_ir.c 2001/11/01 21:47:06 1.2 @@ -274,19 +274,19 @@ for (i=0; i<NUM_IR_DESC; i++) { pDB = GetFreeDB(aup); if (!pDB) goto out; - aup->rx_ring[i]->addr_0 = (u8)((u32)pDB->dma_addr & 0xff); - aup->rx_ring[i]->addr_1 = (u8)(((u32)pDB->dma_addr>>8) & 0xff); - aup->rx_ring[i]->addr_2 = (u8)(((u32)pDB->dma_addr>>16) & 0xff); - aup->rx_ring[i]->addr_3 = (u8)(((u32)pDB->dma_addr>>24) & 0xff); + aup->rx_ring[i]->addr_0 = (u8)(pDB->dma_addr & 0xff); + aup->rx_ring[i]->addr_1 = (u8)((pDB->dma_addr>>8) & 0xff); + aup->rx_ring[i]->addr_2 = (u8)((pDB->dma_addr>>16) & 0xff); + aup->rx_ring[i]->addr_3 = (u8)((pDB->dma_addr>>24) & 0xff); aup->rx_db_inuse[i] = pDB; } for (i=0; i<NUM_IR_DESC; i++) { pDB = GetFreeDB(aup); if (!pDB) goto out; - aup->tx_ring[i]->addr_0 = (u8)((u32)pDB->dma_addr & 0xff); - aup->tx_ring[i]->addr_1 = (u8)(((u32)pDB->dma_addr>>8) & 0xff); - aup->tx_ring[i]->addr_2 = (u8)(((u32)pDB->dma_addr>>16) & 0xff); - aup->tx_ring[i]->addr_3 = (u8)(((u32)pDB->dma_addr>>24) & 0xff); + aup->tx_ring[i]->addr_0 = (u8)(pDB->dma_addr & 0xff); + aup->tx_ring[i]->addr_1 = (u8)((pDB->dma_addr>>8) & 0xff); + aup->tx_ring[i]->addr_2 = (u8)((pDB->dma_addr>>16) & 0xff); + aup->tx_ring[i]->addr_3 = (u8)((pDB->dma_addr>>24) & 0xff); aup->tx_ring[i]->count_0 = 0; aup->tx_ring[i]->count_1 = 0; aup->tx_ring[i]->flags = 0; @@ -295,7 +295,6 @@ return 0; out: - unregister_netdev(dev); if (aup->db[0].vaddr) dma_free((void *)aup->db[0].vaddr, MAX_BUF_SIZE * 2*NUM_IR_DESC); @@ -305,7 +304,7 @@ kfree(aup->rx_buff.head); if (dev->priv != NULL) kfree(dev->priv); - kfree(dev); + unregister_netdevice(dev); printk(KERN_ERR "%s: au1k_init_module failed. Returns %d\n", dev->name, retval); return retval; @@ -400,6 +399,12 @@ { struct au1k_private *aup = (struct au1k_private *) dev->priv; + /* disable interrupts */ + writel(read_ir_reg(IR_CONFIG_2) & ~(1<<8), IR_CONFIG_2); + writel(0, IR_CONFIG_1); + writel(0, IR_INTERFACE_CONFIG); /* disable clock */ + au_sync(); + if (aup->irlap) { irlap_close(aup->irlap); aup->irlap = NULL; @@ -408,13 +413,6 @@ netif_stop_queue(dev); del_timer(&aup->timer); - /* disable interrupts */ - writel(read_ir_reg(IR_CONFIG_2) & ~(1<<8), IR_CONFIG_2); - writel(0, IR_CONFIG_1); - writel(0, IR_INTERFACE_CONFIG); /* disable clock */ - au_sync(); - - /* disable the interrupt */ free_irq(AU1000_IRDA_TX_INT, dev); free_irq(AU1000_IRDA_RX_INT, dev); @@ -441,8 +439,9 @@ 2*MAX_NUM_IR_DESC*(sizeof(ring_dest_t))); aup->rx_ring[0] = 0; } - unregister_netdev(dev); - kfree(dev); + rtnl_lock(); + unregister_netdevice(dev); + rtnl_unlock(); ir_devs[0] = 0; } @@ -486,58 +485,23 @@ } if (aup->tx_tail == aup->tx_head) { - writel(read_ir_reg(IR_CONFIG_1) & ~IR_TX_ENABLE, IR_CONFIG_1); - au_sync(); - writel(read_ir_reg(IR_CONFIG_1) | IR_RX_ENABLE, IR_CONFIG_1); - writel(0, IR_RING_PROMPT); - au_sync(); - - if (aup->newspeed) + if (aup->newspeed) { au1k_irda_set_speed(dev, aup->newspeed); - aup->newspeed = 0; + aup->newspeed = 0; + } + else { + writel(read_ir_reg(IR_CONFIG_1) & ~IR_TX_ENABLE, + IR_CONFIG_1); + au_sync(); + writel(read_ir_reg(IR_CONFIG_1) | IR_RX_ENABLE, + IR_CONFIG_1); + writel(0, IR_RING_PROMPT); + au_sync(); + } } } -void dump_tx_desc(struct net_device *dev) -{ - struct au1k_private *aup = (struct au1k_private *) dev->priv; - volatile ring_dest_t *ptxd = aup->tx_ring[aup->tx_head]; - int i; - u32 ring_stat; - printk("dumping tx desc: tx_head %d tx_tail %d\n", - aup->tx_head, aup->tx_tail); - ring_stat = read_ir_reg(IR_RING_PTR_STATUS); - printk("rx ring ptr %d, tx ring ptr %d\n", - ring_stat & 0x3f, (ring_stat >> 8) & 0x3f); - - for (i=0; i<NUM_IR_DESC; i++) { - ptxd = aup->tx_ring[i]; - - printk("tx ptxd %x\n", ptxd); - printk("count_0 %x\n", ptxd->count_0); - printk("count_1 %x\n", ptxd->count_1); - printk("flags %x\n", ptxd->flags); - printk("addr_0 %x\n", ptxd->addr_0); - printk("addr_1 %x\n", ptxd->addr_1); - printk("addr_2 %x\n", ptxd->addr_2); - printk("addr_3 %x\n\n", ptxd->addr_3); - } - - for (i=0; i<NUM_IR_DESC; i++) { - ptxd = aup->rx_ring[i]; - - printk("rx ptxd %x\n", ptxd); - printk("count_0 %x\n", ptxd->count_0); - printk("count_1 %x\n", ptxd->count_1); - printk("flags %x\n", ptxd->flags); - printk("addr_0 %x\n", ptxd->addr_0); - printk("addr_1 %x\n", ptxd->addr_1); - printk("addr_2 %x\n", ptxd->addr_2); - printk("addr_3 %x\n\n", ptxd->addr_3); - } -} - /* * Au1000 transmit routine. */ @@ -555,10 +519,11 @@ aup->newspeed = speed; } - if (skb->len == 0) { - if (aup->newspeed) + if ((skb->len == 0) && (aup->newspeed)) { + if (aup->tx_tail == aup->tx_head) { au1k_irda_set_speed(dev, speed); - aup->newspeed = 0; + aup->newspeed = 0; + } dev_kfree_skb(skb); return 0; } @@ -567,11 +532,13 @@ flags = ptxd->flags; if (flags & AU_OWN) { + printk(KERN_INFO "%s: tx_full\n", dev->name); netif_stop_queue(dev); aup->tx_full = 1; return 1; } else if (((aup->tx_head + 1) & (NUM_IR_DESC - 1)) == aup->tx_tail) { + printk(KERN_INFO "%s: tx_full\n", dev->name); netif_stop_queue(dev); aup->tx_full = 1; return 1; @@ -709,10 +676,15 @@ */ static void au1k_tx_timeout(struct net_device *dev) { + u32 speed; struct au1k_private *aup = (struct au1k_private *) dev->priv; printk(KERN_ERR "%s: tx timeout\n", dev->name); - au1k_irda_set_speed(dev, aup->speed); + speed = aup->speed; + aup->speed = 0; + au1k_irda_set_speed(dev, speed); + aup->tx_full = 0; + netif_wake_queue(dev); } @@ -744,7 +716,8 @@ while (read_ir_reg(IR_ENABLE) & (IR_RX_STATUS | IR_TX_STATUS)) { mdelay(1); if (!timeout--) { - printk("rx/tx disable timeout\n"); + printk(KERN_ERR "%s: rx/tx disable timeout\n", + dev->name); break; } } |
From: Pete P. <pp...@us...> - 2001-11-01 21:47:10
|
Update of /cvsroot/linux-mips/linux/arch/mips In directory usw-pr-cvs1:/tmp/cvs-serv21264/arch/mips Modified Files: Makefile Log Message: * fixed tx timeout problem * fixed module unload/load crash * cleaned up some debug code Index: Makefile =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/Makefile,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- Makefile 2001/10/28 23:04:19 1.24 +++ Makefile 2001/11/01 21:47:06 1.25 @@ -16,7 +16,7 @@ # Select the object file format to substitute into the linker script. # ifdef CONFIG_CPU_LITTLE_ENDIAN -tool-prefix = mipsel-linux- +tool-prefix = mips_fp_le- else tool-prefix = mips-linux- endif |
From: James S. <jsi...@us...> - 2001-11-01 19:30:47
|
Update of /cvsroot/linux-mips/linux/arch/mips/cobalt In directory usw-pr-cvs1:/tmp/cvs-serv19652 Modified Files: setup.c Log Message: Now using real resource addresses. Index: setup.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/cobalt/setup.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- setup.c 2001/10/30 00:53:41 1.10 +++ setup.c 2001/11/01 19:30:43 1.11 @@ -145,10 +145,10 @@ * IO/MEM resources. */ mips_io_port_base = COBALT_LOCAL_IO_SPACE; - ioport_resource.start = 0; - ioport_resource.end = 0xffffffff; - iomem_resource.start = 0; - iomem_resource.end = 0xffffffff; + ioport_resource.start = 0x10000000; + ioport_resource.end = 0x11FFFFFF; + iomem_resource.start = 0x12000000; + iomem_resource.end = 0x13FFFFFF; _machine_restart = cobalt_machine_restart; _machine_halt = cobalt_machine_halt; |
From: Pete P. <pp...@us...> - 2001-10-31 22:02:47
|
Update of /cvsroot/linux-mips/linux/arch/mips/au1000/pb1000 In directory usw-pr-cvs1:/tmp/cvs-serv2774/arch/mips/au1000/pb1000 Modified Files: setup.c Log Message: * cleaned up comments * added irda gpio setup * always enable chip selects so the memory map is always valid Index: setup.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/au1000/pb1000/setup.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- setup.c 2001/10/10 19:21:06 1.11 +++ setup.c 2001/10/31 22:02:45 1.12 @@ -96,9 +96,7 @@ _machine_halt = au1000_halt; _machine_power_off = au1000_power_off; - /* - * IO/MEM resources. - */ + // IO/MEM resources. mips_io_port_base = 0; ioport_resource.start = 0; ioport_resource.end = 0xffffffff; @@ -160,9 +158,9 @@ outl(0x0030, OUTPUT_STATE_CLEAR); #endif // defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1000_USB_DEVICE) - /* select gpio 15 (for interrupt line) */ + // select gpio 15 (for interrupt line) pin_func = inl(PIN_FUNCTION) & (u32)(~0x100); - /* we don't need I2S, so make it available for GPIO[31:29] */ + // we don't need I2S, so make it available for GPIO[31:29] pin_func |= (1<<5); outl(pin_func, PIN_FUNCTION); @@ -172,8 +170,7 @@ conswitchp = &dummy_con; #endif -#ifdef CONFIG_FB_E1356 - static_cfg0 = inl(STATIC_CONFIG_0) & (u32)(~0x1c00); + static_cfg0 = inl(STATIC_CONFIG_0) & (u32)(~0xc00); outl(static_cfg0, STATIC_CONFIG_0); // configure RCE2* for LCD @@ -185,18 +182,25 @@ // Set 32-bit base address decoding for RCE2* outl(0x10003ff0, STATIC_ADDRESS_2); + // PCI CPLD setup + // expand CE0 to cover PCI + outl(0x11803e40, STATIC_ADDRESS_1); + + // burst visibility on + outl(inl(STATIC_CONFIG_0) | 0x1000, STATIC_CONFIG_0); + + outl(0x83, STATIC_CONFIG_1); // ewait enabled, flash timing + outl(0x33030a10, STATIC_TIMING_1); // slower timing for FPGA + +#ifdef CONFIG_FB_E1356 if ((argptr = strstr(argptr, "video=")) == NULL) { argptr = prom_getcmdline(); strcat(argptr, " video=e1356fb:system:pb1000,mmunalign:1"); } #endif // CONFIG_FB_E1356 -#ifdef CONFIG_PCI - outl(0x11803e40, STATIC_ADDRESS_1); // expand CE0 to cover PCI - outl(inl(STATIC_CONFIG_0) | 0x1000, STATIC_CONFIG_0); // burst visibility on - outl(0x83, STATIC_CONFIG_1); // ewait enabled, flash timing - outl(0x33030a10, STATIC_TIMING_1); // slower timing for FPGA +#ifdef CONFIG_PCI outl(0, PCI_BRIDGE_CONFIG); // set extend byte to 0 outl(0, SDRAM_MBAR); // set mbar to 0 outl(0x2, SDRAM_CMD); // enable memory accesses @@ -218,6 +222,12 @@ } ide_ops = &std_ide_ops; #endif + + // setup irda clocks + // aux clock, divide by 2, clock from 2/4 divider + writel(readl(CLOCK_SOURCE_CNTRL) | 0x7, CLOCK_SOURCE_CNTRL); + pin_func = inl(PIN_FUNCTION) & (u32)(~(1<<2)); // clear IRTXD + outl(pin_func, PIN_FUNCTION); while (inl(PC_COUNTER_CNTRL) & PC_CNTRL_E0S); outl(PC_CNTRL_E0 | PC_CNTRL_EN0, PC_COUNTER_CNTRL); |
From: James S. <jsi...@us...> - 2001-10-31 19:39:12
|
Update of /cvsroot/linux-mips/linux/arch/mips/cobalt In directory usw-pr-cvs1:/tmp/cvs-serv8324 Modified Files: pci_fixups.c Log Message: Moved fixups to pcibios_fixup. Not really teh right place but here at least the machine boots. Index: pci_fixups.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/cobalt/pci_fixups.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- pci_fixups.c 2001/10/25 21:39:48 1.3 +++ pci_fixups.c 2001/10/31 19:39:10 1.4 @@ -317,11 +317,6 @@ void __init pcibios_fixup_resources(struct pci_dev *dev) { /* will need to fixup IO resources */ - qube_raq_via_bmIDE_fixup(dev); - qube_raq_tulip_fixup(dev); - qube_raq_galileo_fixup(dev); - qube_raq_scsi_fixup(dev); - qube_pcibios_fixup(dev); } /* @@ -334,7 +329,12 @@ struct pci_dev *dev; pci_for_each_dev(dev) { - } + qube_raq_via_bmIDE_fixup(dev); + qube_raq_tulip_fixup(dev); + qube_raq_galileo_fixup(dev); + qube_raq_scsi_fixup(dev); + qube_pcibios_fixup(dev); + } } /* |
From: James S. <jsi...@us...> - 2001-10-31 19:13:05
|
Update of /cvsroot/linux-mips/linux/arch/mips/mm In directory usw-pr-cvs1:/tmp/cvs-serv28960 Modified Files: fault.c Log Message: Fixed typo with bust_spinlocks. Index: fault.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/mm/fault.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- fault.c 2001/10/29 17:33:15 1.5 +++ fault.c 2001/10/31 19:13:03 1.6 @@ -202,7 +202,7 @@ "address %08lx, epc == %08lx, ra == %08lx\n", address, regs->cp0_epc, regs->regs[31]); die("Oops", regs); - bust_spinlock(0); + bust_spinlocks(0); do_exit(SIGKILL); /* |
From: James S. <jsi...@us...> - 2001-10-31 18:54:12
|
Update of /cvsroot/linux-mips/linux/arch/mips/kernel In directory usw-pr-cvs1:/tmp/cvs-serv20922 Modified Files: gdb-low.S Log Message: Use cfc1 to access fpu control registers. Index: gdb-low.S =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/gdb-low.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gdb-low.S 2001/10/24 23:32:54 1.2 +++ gdb-low.S 2001/10/31 18:54:09 1.3 @@ -145,9 +145,9 @@ * FPU control registers */ - mfc1 v0,CP1_STATUS + cfc1 v0,CP1_STATUS sw v0,GDB_FR_FSR(sp) - mfc1 v0,CP1_REVISION + cfc1 v0,CP1_REVISION sw v0,GDB_FR_FIR(sp) /* |
From: James S. <jsi...@us...> - 2001-10-31 18:53:14
|
Update of /cvsroot/linux-mips/linux/drivers/tc In directory usw-pr-cvs1:/tmp/cvs-serv20500 Modified Files: lk201.c lk201.h Log Message: DEC LK201 keyboard updates. Index: lk201.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/tc/lk201.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- lk201.c 2001/10/18 18:05:54 1.3 +++ lk201.c 2001/10/31 18:53:12 1.4 @@ -4,15 +4,20 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. * + * Copyright (C) 2001 Maciej W. Rozycki <ma...@ds...> */ + #include <linux/config.h> #include <linux/errno.h> +#include <linux/sched.h> #include <linux/tty.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/delay.h> #include <linux/kbd_ll.h> +#include <linux/kbd_kern.h> +#include <linux/vt_kern.h> #include <asm/keyboard.h> #include <asm/wbflush.h> @@ -77,6 +82,8 @@ LK_CMD_LEDS_OFF, LK_PARAM_LED_MASK(0xf) }; +static struct dec_serial* lk201kbd_info; + static int __init lk201_reset(struct dec_serial *info) { int i; @@ -89,16 +96,115 @@ return 0; } -int kbd_rate(struct kbd_repeat *rep) +#define DEFAULT_KEYB_REP_DELAY (250/5) /* [5ms] */ +#define DEFAULT_KEYB_REP_RATE 30 /* [cps] */ + +static struct kbd_repeat kbdrate = { + DEFAULT_KEYB_REP_DELAY, + DEFAULT_KEYB_REP_RATE +}; + +static void parse_kbd_rate(struct kbd_repeat *r) { - return 0; + if (r->delay <= 0) + r->delay = kbdrate.delay; + if (r->rate <= 0) + r->rate = kbdrate.rate; + + if (r->delay < 5) + r->delay = 5; + if (r->delay > 630) + r->delay = 630; + if (r->rate < 12) + r->rate = 12; + if (r->rate > 127) + r->rate = 127; + if (r->rate == 125) + r->rate = 124; +} + +static int write_kbd_rate(struct kbd_repeat *rep) +{ + struct dec_serial* info = lk201kbd_info; + int delay, rate; + int i; + + delay = rep->delay / 5; + rate = rep->rate; + for (i = 0; i < 4; i++) { + if (info->hook->poll_tx_char(info, LK_CMD_RPT_RATE(i))) + return 1; + if (info->hook->poll_tx_char(info, LK_PARAM_DELAY(delay))) + return 1; + if (info->hook->poll_tx_char(info, LK_PARAM_RATE(rate))) + return 1; + } + return 0; +} + +static int lk201kbd_rate(struct kbd_repeat *rep) +{ + if (rep == NULL) + return -EINVAL; + + parse_kbd_rate(rep); + + if (write_kbd_rate(rep)) { + memcpy(rep, &kbdrate, sizeof(struct kbd_repeat)); + return -EIO; + } + + memcpy(&kbdrate, rep, sizeof(struct kbd_repeat)); + + return 0; } +static void lk201kd_mksound(unsigned int hz, unsigned int ticks) +{ + struct dec_serial* info = lk201kbd_info; + + if (!ticks) + return; + + /* + * Can't set frequency and we "approximate" + * duration by volume. ;-) + */ + ticks /= HZ / 32; + if (ticks > 7) + ticks = 7; + ticks = 7 - ticks; + if (info->hook->poll_tx_char(info, LK_CMD_ENB_BELL)) + return; + if (info->hook->poll_tx_char(info, LK_PARAM_VOLUME(ticks))) + return; + if (info->hook->poll_tx_char(info, LK_CMD_BELL)) + return; +} void kbd_leds(unsigned char leds) { - return; + struct dec_serial* info = lk201kbd_info; + unsigned char l = 0; + + if (!info) /* FIXME */ + return; + + /* FIXME -- Only Hold and Lock LEDs for now. --macro */ + if (leds & LED_SCR) + l |= LK_LED_HOLD; + if (leds & LED_CAP) + l |= LK_LED_LOCK; + + if (info->hook->poll_tx_char(info, LK_CMD_LEDS_ON)) + return; + if (info->hook->poll_tx_char(info, LK_PARAM_LED_MASK(l))) + return; + if (info->hook->poll_tx_char(info, LK_CMD_LEDS_OFF)) + return; + if (info->hook->poll_tx_char(info, LK_PARAM_LED_MASK(~l))) + return; } int kbd_setkeycode(unsigned int scancode, unsigned int keycode) @@ -131,7 +237,12 @@ if (!stat || stat == 4) { switch (ch) { - case LK_KEY_ACK: + case LK_STAT_RESUME_ERR: + case LK_STAT_ERROR: + case LK_STAT_INHIBIT_ACK: + case LK_STAT_TEST_ACK: + case LK_STAT_MODE_KEYDOWN: + case LK_STAT_MODE_ACK: break; case LK_KEY_LOCK: shift_state ^= LK_LOCK; @@ -170,6 +281,7 @@ } } else printk("Error reading LKx01 keyboard: 0x%02x\n", stat); + tasklet_schedule(&keyboard_tasklet); } static void __init lk201_info(struct dec_serial *info) @@ -213,6 +325,10 @@ */ info->hook->rx_char = lk201_kbd_rx_char; + lk201kbd_info = info; + kbd_rate = lk201kbd_rate; + kd_mksound = lk201kd_mksound; + return 0; } @@ -244,7 +360,3 @@ printk("LK201 Support for DS3100 not yet ready ...\n"); } } - - - - Index: lk201.h =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/tc/lk201.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- lk201.h 2001/06/22 02:29:32 1.1.1.1 +++ lk201.h 2001/10/31 18:53:12 1.2 @@ -2,52 +2,121 @@ * Commands to the keyboard processor */ -#define LK_PARAM 0x80 /* start/end parameter list */ +#define LK_PARAM 0x80 /* start/end parameter list */ -#define LK_CMD_RESUME 0x8b -#define LK_CMD_INHIBIT 0xb9 -#define LK_CMD_LEDS_ON 0x13 /* 1 param: led bitmask */ -#define LK_CMD_LEDS_OFF 0x11 /* 1 param: led bitmask */ -#define LK_CMD_DIS_KEYCLK 0x99 -#define LK_CMD_ENB_KEYCLK 0x1b /* 1 param: volume */ -#define LK_CMD_DIS_CTLCLK 0xb9 -#define LK_CMD_ENB_CTLCLK 0xbb -#define LK_CMD_SOUND_CLK 0x9f -#define LK_CMD_DIS_BELL 0xa1 -#define LK_CMD_ENB_BELL 0x23 /* 1 param: volume */ -#define LK_CMD_BELL 0xa7 -#define LK_CMD_TMP_NORPT 0xc1 -#define LK_CMD_ENB_RPT 0xe3 -#define LK_CMD_DIS_RPT 0xe1 -#define LK_CMD_RPT_TO_DOWN 0xd9 -#define LK_CMD_REQ_ID 0xab -#define LK_CMD_POWER_UP 0xfd -#define LK_CMD_TEST_MODE 0xcb -#define LK_CMD_SET_DEFAULTS 0xd3 +#define LK_CMD_RESUME 0x8b /* resume transmission to the host */ +#define LK_CMD_INHIBIT 0x89 /* stop transmission to the host */ +#define LK_CMD_LEDS_ON 0x13 /* light LEDs */ + /* 1st param: led bitmask */ +#define LK_CMD_LEDS_OFF 0x11 /* turn off LEDs */ + /* 1st param: led bitmask */ +#define LK_CMD_DIS_KEYCLK 0x99 /* disable the keyclick */ +#define LK_CMD_ENB_KEYCLK 0x1b /* enable the keyclick */ + /* 1st param: volume */ +#define LK_CMD_DIS_CTLCLK 0xb9 /* disable the Ctrl keyclick */ +#define LK_CMD_ENB_CTLCLK 0xbb /* enable the Ctrl keyclick */ +#define LK_CMD_SOUND_CLK 0x9f /* emit a keyclick */ +#define LK_CMD_DIS_BELL 0xa1 /* disable the bell */ +#define LK_CMD_ENB_BELL 0x23 /* enable the bell */ + /* 1st param: volume */ +#define LK_CMD_BELL 0xa7 /* emit a bell */ +#define LK_CMD_TMP_NORPT 0xc1 /* disable typematic */ + /* for the currently pressed key */ +#define LK_CMD_ENB_RPT 0xe3 /* enable typematic */ + /* for RPT_DOWN groups */ +#define LK_CMD_DIS_RPT 0xe1 /* disable typematic */ + /* for RPT_DOWN groups */ +#define LK_CMD_RPT_TO_DOWN 0xd9 /* set RPT_DOWN groups to DOWN */ +#define LK_CMD_REQ_ID 0xab /* request the keyboard ID */ +#define LK_CMD_POWER_UP 0xfd /* init power-up sequence */ +#define LK_CMD_TEST_MODE 0xcb /* enter the factory test mode */ +#define LK_CMD_TEST_EXIT 0x80 /* exit the factory test mode */ +#define LK_CMD_SET_DEFAULTS 0xd3 /* set power-up defaults */ +#define LK_CMD_MODE(m,div) (LK_PARAM|(((div)&0xf)<<3)|m) + /* select the repeat mode */ + /* for the selected key group */ +#define LK_CMD_MODE_AR(m,div) ((((div)&0xf)<<3)|m) + /* select the repeat mode */ + /* and the repeat register */ + /* for the selected key group */ + /* 1st param: register number */ +#define LK_CMD_RPT_RATE(r) (0x04|((((r)&0x3)<<1))) + /* set the delay and repeat rate */ + /* for the selected repeat register */ + /* 1st param: initial delay */ + /* 2nd param: repeat rate */ + /* there are 4 leds, represent them in the low 4 bits of a byte */ -#define LK_PARAM_LED_MASK(ledbmap) (LK_PARAM|(ledbmap)) +#define LK_PARAM_LED_MASK(ledbmap) (LK_PARAM|((ledbmap)&0xf)) +#define LK_LED_WAIT 0x1 /* Wait LED */ +#define LK_LED_COMP 0x2 /* Compose LED */ +#define LK_LED_LOCK 0x4 /* Lock LED */ +#define LK_LED_HOLD 0x8 /* Hold Screen LED */ /* max volume is 0, lowest is 0x7 */ -#define LK_PARAM_VOLUME(v) (LK_PARAM|((v)&0x7)) +#define LK_PARAM_VOLUME(v) (LK_PARAM|((v)&0x7)) -/* mode set command(s) details */ -#define LK_MODE_DOWN 0x0 -#define LK_MODE_RPT_DOWN 0x2 -#define LK_MODE_DOWN_UP 0x6 -#define LK_CMD_MODE(m,div) (LK_PARAM|(div<<3)|m) +/* mode set command details, div is a key group number */ +#define LK_MODE_DOWN 0x0 /* make only */ +#define LK_MODE_RPT_DOWN 0x2 /* make and typematic */ +#define LK_MODE_DOWN_UP 0x6 /* make and release */ + +/* there are 4 repeat registers */ +#define LK_PARAM_AR(r) (LK_PARAM|((v)&0x3)) + +/* + * Mappings between key groups and keycodes are as follows: + * + * 1: 0xbf - 0xfb -- alphanumeric, + * 2: 0x92 - 0xa4 -- numeric keypad, + * 3: 0xbc -- Backspace, + * 4: 0xbd - 0xbe -- Tab, Return, + * 5: 0xb0 - 0xb1 -- Lock, Compose Character, + * 6: 0xae - 0xaf -- Ctrl, Shift, + * 7: 0xa7 - 0xa8 -- Left Arrow, Right Arrow, + * 8: 0xa9 - 0xab -- Up Arrow, Down Arrow, Right Shift, + * 9: 0x8a - 0x8f -- editor keypad, + * 10: 0x56 - 0x5a -- F1 - F5, + * 11: 0x64 - 0x68 -- F6 - F10, + * 12: 0x71 - 0x74 -- F11 - F14, + * 13: 0x7c - 0x7d -- Help, Do, + * 14: 0x80 - 0x83 -- F17 - F20. + * + * Others, i.e. 0x55, 0xac, 0xad, 0xb2, are undiscovered. + */ + +/* delay is 5 - 630 ms; 0x00 and 0x7f are reserved */ +#define LK_PARAM_DELAY(t) ((t)&0x7f) + +/* rate is 12 - 127 Hz; 0x00 - 0x0b and 0x7d (power-up!) are reserved */ +#define LK_PARAM_RATE(r) (LK_PARAM|((r)&0x7f)) #define LK_SHIFT 1<<0 #define LK_CTRL 1<<1 #define LK_LOCK 1<<2 #define LK_COMP 1<<3 -#define LK_KEY_SHIFT 174 -#define LK_KEY_CTRL 175 -#define LK_KEY_LOCK 176 -#define LK_KEY_COMP 177 -#define LK_KEY_RELEASE 179 -#define LK_KEY_REPEAT 180 -#define LK_KEY_ACK 186 +#define LK_KEY_SHIFT 0xae +#define LK_KEY_CTRL 0xaf +#define LK_KEY_LOCK 0xb0 +#define LK_KEY_COMP 0xb1 -extern unsigned char scancodeRemap[256]; \ No newline at end of file +#define LK_KEY_RELEASE 0xb3 /* all keys released */ +#define LK_KEY_REPEAT 0xb4 /* repeat the last key */ + +/* status responses */ +#define LK_STAT_RESUME_ERR 0xb5 /* keystrokes lost while inhibited */ +#define LK_STAT_ERROR 0xb6 /* an invalid command received */ +#define LK_STAT_INHIBIT_ACK 0xb7 /* transmission inhibited */ +#define LK_STAT_TEST_ACK 0xb8 /* the factory test mode entered */ +#define LK_STAT_MODE_KEYDOWN 0xb9 /* a key is down on a change */ + /* to the DOWN_UP mode; */ + /* the keycode follows */ +#define LK_STAT_MODE_ACK 0xba /* the mode command succeeded */ + +#define LK_STAT_PWRUP_OK 0x00 /* the power-up self test OK */ +#define LK_STAT_PWRUP_KDOWN 0x3d /* a key was down during the test */ +#define LK_STAT_PWRUP_ERROR 0x3e /* keyboard self test failure */ + +extern unsigned char scancodeRemap[256]; |
From: James S. <jsi...@us...> - 2001-10-31 18:52:33
|
Update of /cvsroot/linux-mips/linux/drivers/video In directory usw-pr-cvs1:/tmp/cvs-serv20133 Modified Files: fbmem.c Log Message: DECstation fb fixes. Index: fbmem.c =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/video/fbmem.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- fbmem.c 2001/10/22 22:32:06 1.10 +++ fbmem.c 2001/10/31 18:52:30 1.11 @@ -119,9 +119,7 @@ extern int stifb_init(void); extern int stifb_setup(char*); extern int pmagbafb_init(void); -extern int pmagbafb_setup(char *); extern int pmagbbfb_init(void); -extern int pmagbbfb_setup(char *options, int *ints); extern void maxinefb_init(void); extern int tx3912fb_init(void); extern int radeonfb_init(void); @@ -301,6 +299,16 @@ #ifdef CONFIG_FB_MQ200 { "mq200fb", mq200fb_init, mq200fb_setup }, #endif +#ifdef CONFIG_FB_PMAG_BA + { "pmagbafb", pmagbafb_init, NULL }, +#endif +#ifdef CONFIG_FB_PMAGB_B + { "pmagbbfb", pmagbbfb_init, NULL }, +#endif +#ifdef CONFIG_FB_MAXINE + { "maxinefb", maxinefb_init, NULL }, +#endif + /* * Generic drivers that don't use resource management (yet) @@ -317,30 +325,6 @@ /* Not a real frame buffer device... */ { "resolver", NULL, resolver_video_setup }, #endif - -#ifdef CONFIG_FB_PMAG_BA - { "pmagbafb", pmagbafb_init, NULL }, -#endif -#ifdef CONFIG_FB_PMAGB_B - { "pmagbbfb", pmagbbfb_init, NULL }, -#endif - -#ifdef CONFIG_FB_MAXINE - { "maxinefb", maxinefb_init, NULL }, -#endif - - -#ifdef CONFIG_FB_PMAG_BA - { "pmagbafb", pmagbafb_init, pmagbafb_setup }, -#endif -#ifdef CONFIG_FB_PMAGB_B - { "pmagbbfb", pmagbbfb_init, pmagbbfb_setup }, -#endif - -#ifdef CONFIG_FB_MAXINE - { "maxinefb", maxinefb_init, maxinefb_setup }, -#endif - #ifdef CONFIG_FB_VIRTUAL /* |
From: James S. <jsi...@us...> - 2001-10-31 18:50:58
|
Update of /cvsroot/linux-mips/linux/drivers/net/irda In directory usw-pr-cvs1:/tmp/cvs-serv19643/drivers/net/irda Added Files: Config.in Makefile au1k_ir.c Log Message: Au1000 IrDA driver. --- NEW FILE: Config.in --- mainmenu_option next_comment comment 'Infrared-port device drivers' comment 'SIR device drivers' dep_tristate 'IrTTY (uses Linux serial driver)' CONFIG_IRTTY_SIR $CONFIG_IRDA dep_tristate 'IrPORT (IrDA serial driver)' CONFIG_IRPORT_SIR $CONFIG_IRDA comment 'Dongle support' bool 'Serial dongle support' CONFIG_DONGLE if [ "$CONFIG_DONGLE" != "n" ]; then dep_tristate ' ESI JetEye PC dongle' CONFIG_ESI_DONGLE $CONFIG_IRDA dep_tristate ' ACTiSYS IR-220L and IR220L+ dongle' CONFIG_ACTISYS_DONGLE $CONFIG_IRDA dep_tristate ' Tekram IrMate 210B dongle' CONFIG_TEKRAM_DONGLE $CONFIG_IRDA dep_tristate ' Greenwich GIrBIL dongle' CONFIG_GIRBIL_DONGLE $CONFIG_IRDA dep_tristate ' Parallax LiteLink dongle' CONFIG_LITELINK_DONGLE $CONFIG_IRDA dep_tristate ' Old Belkin dongle' CONFIG_OLD_BELKIN_DONGLE $CONFIG_IRDA fi comment 'FIR device drivers' dep_tristate 'IrDA USB dongles (Experimental)' CONFIG_USB_IRDA $CONFIG_IRDA $CONFIG_USB $CONFIG_EXPERIMENTAL dep_tristate 'NSC PC87108/PC87338' CONFIG_NSC_FIR $CONFIG_IRDA dep_tristate 'Winbond W83977AF (IR)' CONFIG_WINBOND_FIR $CONFIG_IRDA dep_tristate 'Toshiba Type-O IR Port' CONFIG_TOSHIBA_FIR $CONFIG_IRDA dep_tristate 'Alchemy Au1000 SIR/FIR' CONFIG_AU1000_FIR $CONFIG_IRDA if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then dep_tristate 'SMC IrCC (Experimental)' CONFIG_SMC_IRCC_FIR $CONFIG_IRDA dep_tristate 'ALi M5123 FIR (Experimental)' CONFIG_ALI_FIR $CONFIG_IRDA dep_tristate 'VLSI 82C147 SIR/MIR/FIR (Experimental)' CONFIG_VLSI_FIR $CONFIG_IRDA fi endmenu --- NEW FILE: Makefile --- # # Makefile for the Linux IrDA infrared port device drivers. # # 9 Aug 2000, Christoph Hellwig <hc...@ca...> # Rewritten to use lists instead of if-statements. # O_TARGET := irda.o export-objs = irport.o obj-$(CONFIG_IRTTY_SIR) += irtty.o obj-$(CONFIG_IRPORT_SIR) += irport.o obj-$(CONFIG_USB_IRDA) += irda-usb.o obj-$(CONFIG_NSC_FIR) += nsc-ircc.o obj-$(CONFIG_WINBOND_FIR) += w83977af_ir.o obj-$(CONFIG_TOSHIBA_FIR) += toshoboe.o obj-$(CONFIG_SMC_IRCC_FIR) += smc-ircc.o irport.o obj-$(CONFIG_ALI_FIR) += ali-ircc.o obj-$(CONFIG_VLSI_FIR) += vlsi_ir.o obj-$(CONFIG_ESI_DONGLE) += esi.o obj-$(CONFIG_TEKRAM_DONGLE) += tekram.o obj-$(CONFIG_ACTISYS_DONGLE) += actisys.o obj-$(CONFIG_GIRBIL_DONGLE) += girbil.o obj-$(CONFIG_LITELINK_DONGLE) += litelink.o obj-$(CONFIG_OLD_BELKIN_DONGLE) += old_belkin.o obj-$(CONFIG_AU1000_FIR) += au1k_ir.o include $(TOPDIR)/Rules.make --- NEW FILE: au1k_ir.c --- /* * * Alchemy Semi Au1000 IrDA driver * * Copyright 2001 MontaVista Software Inc. * Author: MontaVista Software, Inc. * pp...@mv... or so...@mv... * * ######################################################################## * * This program is free software; you can distribute it and/or modify it * under the terms of the GNU General Public License (Version 2) as * published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. * * ######################################################################## * * */ #ifndef __mips__ #error This driver only works with MIPS architectures! #endif #include <linux/config.h> #include <linux/module.h> #include <linux/types.h> #include <linux/init.h> #include <linux/errno.h> #include <linux/netdevice.h> #include <linux/slab.h> #include <linux/rtnetlink.h> #include <linux/interrupt.h> #include <linux/pm.h> #include <asm/irq.h> #include <asm/bitops.h> #include <asm/io.h> #include <asm/au1000.h> #include <asm/pb1000.h> #include <net/irda/irda.h> #include <net/irda/irmod.h> #include <net/irda/wrapper.h> #include <net/irda/irda_device.h> #include "net/irda/au1000_ircc.h" static int au1k_irda_net_init(struct net_device *); static int au1k_irda_start(struct net_device *); static int au1k_irda_stop(struct net_device *dev); static int au1k_irda_hard_xmit(struct sk_buff *, struct net_device *); static int au1k_irda_rx(struct net_device *); static void au1k_irda_interrupt(int, void *, struct pt_regs *); static void au1k_tx_timeout(struct net_device *); static struct net_device_stats *au1k_irda_stats(struct net_device *); static int au1k_irda_ioctl(struct net_device *, struct ifreq *, int); static int au1k_irda_set_speed(struct net_device *dev, int speed); static void *dma_alloc(size_t, dma_addr_t *); static void dma_free(void *, size_t); static int qos_mtt_bits = 0x07; /* 1 ms or more */ static struct net_device *ir_devs[NUM_IR_IFF]; static char version[] __devinitdata = "au1k_ircc:1.0 pp...@mv...\n"; #define RUN_AT(x) (jiffies + (x)) /* * IrDA peripheral bug. You have to read the register * twice to get the right value. */ u32 read_ir_reg(u32 addr) { readl(addr); return readl(addr); } /* * Buffer allocation/deallocation routines. The buffer descriptor returned * has the virtual and dma address of a buffer suitable for * both, receive and transmit operations. */ static db_dest_t *GetFreeDB(struct au1k_private *aup) { db_dest_t *pDB; pDB = aup->pDBfree; if (pDB) { aup->pDBfree = pDB->pnext; } return pDB; } static void ReleaseDB(struct au1k_private *aup, db_dest_t *pDB) { db_dest_t *pDBfree = aup->pDBfree; if (pDBfree) pDBfree->pnext = pDB; aup->pDBfree = pDB; } /* DMA memory allocation, derived from pci_alloc_consistent. However, the Au1000 data cache is coherent (when programmed so), therefore we return KSEG0 address, not KSEG1. */ static void *dma_alloc(size_t size, dma_addr_t * dma_handle) { void *ret; int gfp = GFP_ATOMIC | GFP_DMA; ret = (void *) __get_free_pages(gfp, get_order(size)); if (ret != NULL) { memset(ret, 0, size); *dma_handle = virt_to_bus(ret); ret = KSEG0ADDR(ret); } return ret; } static void dma_free(void *vaddr, size_t size) { vaddr = KSEG0ADDR(vaddr); free_pages((unsigned long) vaddr, get_order(size)); } static void setup_hw_rings(struct au1k_private *aup, u32 rx_base, u32 tx_base) { int i; for (i=0; i<NUM_IR_DESC; i++) { aup->rx_ring[i] = (volatile ring_dest_t *) (rx_base + sizeof(ring_dest_t)*i); } for (i=0; i<NUM_IR_DESC; i++) { aup->tx_ring[i] = (volatile ring_dest_t *) (tx_base + sizeof(ring_dest_t)*i); } } /* * Device has already been stopped at this point. */ static void au1k_irda_net_uninit(struct net_device *dev) { dev->hard_start_xmit = NULL; dev->open = NULL; dev->stop = NULL; dev->do_ioctl = NULL; dev->get_stats = NULL; dev->priv = NULL; } static int au1k_irda_init(void) { static unsigned version_printed = 0; struct net_device *dev; int err; if (version_printed++ == 0) printk(version); rtnl_lock(); dev = dev_alloc("irda%d", &err); if (dev) { dev->irq = AU1000_IRDA_RX_INT; /* TX has its own interrupt */ dev->init = au1k_irda_net_init; dev->uninit = au1k_irda_net_uninit; err = register_netdevice(dev); if (err) kfree(dev); else ir_devs[0] = dev; printk(KERN_INFO "IrDA: Registered device %s\n", dev->name); } rtnl_unlock(); return err; } static int au1k_irda_init_iobuf(iobuff_t *io, int size) { io->head = kmalloc(size, GFP_KERNEL); if (io->head != NULL) { io->truesize = size; io->in_frame = FALSE; io->state = OUTSIDE_FRAME; io->data = io->head; } return io->head ? 0 : -ENOMEM; } static int au1k_irda_net_init(struct net_device *dev) { struct au1k_private *aup = NULL; int i, retval = 0, err; db_dest_t *pDB, *pDBfree; unsigned long temp; dev->priv = kmalloc(sizeof(struct au1k_private), GFP_KERNEL); if (dev->priv == NULL) { retval = -ENOMEM; goto out; } memset(dev->priv, 0, sizeof(struct au1k_private)); aup = dev->priv; err = au1k_irda_init_iobuf(&aup->rx_buff, 14384); if (err) goto out; dev->open = au1k_irda_start; dev->hard_start_xmit = au1k_irda_hard_xmit; dev->stop = au1k_irda_stop; dev->get_stats = au1k_irda_stats; dev->do_ioctl = au1k_irda_ioctl; dev->tx_timeout = au1k_tx_timeout; irda_device_setup(dev); irda_init_max_qos_capabilies(&aup->qos); /* The only value we must override it the baudrate */ aup->qos.baud_rate.bits = IR_9600|IR_19200|IR_38400|IR_57600| IR_115200|IR_576000 |(IR_4000000 << 8); aup->qos.min_turn_time.bits = qos_mtt_bits; irda_qos_bits_to_value(&aup->qos); /* Tx ring follows rx ring + 512 bytes */ /* we need a 1k aligned buffer */ aup->rx_ring[0] = (ring_dest_t *) dma_alloc(2*MAX_NUM_IR_DESC*(sizeof(ring_dest_t)), &temp); /* allocate the data buffers */ aup->db[0].vaddr = (void *)dma_alloc(MAX_BUF_SIZE * 2*NUM_IR_DESC, &temp); if (!aup->db[0].vaddr || !aup->rx_ring[0]) { retval = -ENOMEM; goto out; } setup_hw_rings(aup, (u32)aup->rx_ring[0], (u32)aup->rx_ring[0] + 512); pDBfree = NULL; pDB = aup->db; for (i=0; i<(2*NUM_IR_DESC); i++) { pDB->pnext = pDBfree; pDBfree = pDB; pDB->vaddr = (u32 *)((unsigned)aup->db[0].vaddr + MAX_BUF_SIZE*i); pDB->dma_addr = (dma_addr_t)virt_to_bus(pDB->vaddr); pDB++; } aup->pDBfree = pDBfree; /* attach a data buffer to each descriptor */ for (i=0; i<NUM_IR_DESC; i++) { pDB = GetFreeDB(aup); if (!pDB) goto out; aup->rx_ring[i]->addr_0 = (u8)((u32)pDB->dma_addr & 0xff); aup->rx_ring[i]->addr_1 = (u8)(((u32)pDB->dma_addr>>8) & 0xff); aup->rx_ring[i]->addr_2 = (u8)(((u32)pDB->dma_addr>>16) & 0xff); aup->rx_ring[i]->addr_3 = (u8)(((u32)pDB->dma_addr>>24) & 0xff); aup->rx_db_inuse[i] = pDB; } for (i=0; i<NUM_IR_DESC; i++) { pDB = GetFreeDB(aup); if (!pDB) goto out; aup->tx_ring[i]->addr_0 = (u8)((u32)pDB->dma_addr & 0xff); aup->tx_ring[i]->addr_1 = (u8)(((u32)pDB->dma_addr>>8) & 0xff); aup->tx_ring[i]->addr_2 = (u8)(((u32)pDB->dma_addr>>16) & 0xff); aup->tx_ring[i]->addr_3 = (u8)(((u32)pDB->dma_addr>>24) & 0xff); aup->tx_ring[i]->count_0 = 0; aup->tx_ring[i]->count_1 = 0; aup->tx_ring[i]->flags = 0; aup->tx_db_inuse[i] = pDB; } return 0; out: unregister_netdev(dev); if (aup->db[0].vaddr) dma_free((void *)aup->db[0].vaddr, MAX_BUF_SIZE * 2*NUM_IR_DESC); if (aup->rx_ring[0]) kfree((void *)aup->rx_ring[0]); if (aup->rx_buff.head) kfree(aup->rx_buff.head); if (dev->priv != NULL) kfree(dev->priv); kfree(dev); printk(KERN_ERR "%s: au1k_init_module failed. Returns %d\n", dev->name, retval); return retval; } static int au1k_init(struct net_device *dev) { struct au1k_private *aup = (struct au1k_private *) dev->priv; int i; u32 control; u32 ring_address; /* bring the device out of reset */ control = 0xe; /* coherent, clock enable, one half system clock */ #ifndef CONFIG_CPU_LITTLE_ENDIAN control |= 1; #endif aup->tx_head = 0; aup->tx_tail = 0; aup->rx_head = 0; for (i=0; i<NUM_IR_DESC; i++) { aup->rx_ring[i]->flags = AU_OWN; } writel(control, IR_INTERFACE_CONFIG); au_sync_delay(10); writel(read_ir_reg(IR_ENABLE) & ~0x8000, IR_ENABLE); /* disable PHY */ au_sync_delay(1); writel(MAX_BUF_SIZE, IR_MAX_PKT_LEN); ring_address = (u32)virt_to_phys((void *)aup->rx_ring[0]); writel(ring_address >> 26, IR_RING_BASE_ADDR_H); writel((ring_address >> 10) & 0xffff, IR_RING_BASE_ADDR_L); writel(RING_SIZE_64<<8 | RING_SIZE_64<<12, IR_RING_SIZE); writel(1<<2 | IR_ONE_PIN, IR_CONFIG_2); /* 48MHz */ writel(0, IR_RING_ADDR_CMPR); au1k_irda_set_speed(dev, 9600); return 0; } static int au1k_irda_start(struct net_device *dev) { int retval; char hwname[32]; struct au1k_private *aup = (struct au1k_private *) dev->priv; MOD_INC_USE_COUNT; if ((retval = au1k_init(dev))) { printk(KERN_ERR "%s: error in au1k_init\n", dev->name); MOD_DEC_USE_COUNT; return retval; } if ((retval = request_irq(AU1000_IRDA_TX_INT, &au1k_irda_interrupt, 0, dev->name, dev))) { printk(KERN_ERR "%s: unable to get IRQ %d\n", dev->name, dev->irq); MOD_DEC_USE_COUNT; return retval; } if ((retval = request_irq(AU1000_IRDA_RX_INT, &au1k_irda_interrupt, 0, dev->name, dev))) { free_irq(AU1000_IRDA_TX_INT, dev); printk(KERN_ERR "%s: unable to get IRQ %d\n", dev->name, dev->irq); MOD_DEC_USE_COUNT; return retval; } /* Give self a hardware name */ sprintf(hwname, "Au1000 SIR/FIR"); aup->irlap = irlap_open(dev, &aup->qos, hwname); netif_start_queue(dev); writel(read_ir_reg(IR_CONFIG_2) | 1<<8, IR_CONFIG_2); /* int enable */ aup->timer.expires = RUN_AT((3*HZ)); aup->timer.data = (unsigned long)dev; return 0; } static int au1k_irda_stop(struct net_device *dev) { struct au1k_private *aup = (struct au1k_private *) dev->priv; if (aup->irlap) { irlap_close(aup->irlap); aup->irlap = NULL; } netif_stop_queue(dev); del_timer(&aup->timer); /* disable interrupts */ writel(read_ir_reg(IR_CONFIG_2) & ~(1<<8), IR_CONFIG_2); writel(0, IR_CONFIG_1); writel(0, IR_INTERFACE_CONFIG); /* disable clock */ au_sync(); /* disable the interrupt */ free_irq(AU1000_IRDA_TX_INT, dev); free_irq(AU1000_IRDA_RX_INT, dev); MOD_DEC_USE_COUNT; return 0; } static void __exit au1k_irda_exit(void) { struct net_device *dev = ir_devs[0]; struct au1k_private *aup = (struct au1k_private *) dev->priv; if (!dev) { printk(KERN_ERR "au1k_ircc no dev found\n"); return; } if (aup->db[0].vaddr) { dma_free((void *)aup->db[0].vaddr, MAX_BUF_SIZE * 2*NUM_IR_DESC); aup->db[0].vaddr = 0; } if (aup->rx_ring[0]) { dma_free((void *)aup->rx_ring[0], 2*MAX_NUM_IR_DESC*(sizeof(ring_dest_t))); aup->rx_ring[0] = 0; } unregister_netdev(dev); kfree(dev); ir_devs[0] = 0; } static inline void update_tx_stats(struct net_device *dev, u32 status, u32 pkt_len) { struct au1k_private *aup = (struct au1k_private *) dev->priv; struct net_device_stats *ps = &aup->stats; ps->tx_packets++; ps->tx_bytes += pkt_len; if (status & IR_TX_ERROR) { ps->tx_errors++; ps->tx_aborted_errors++; } } static void au1k_tx_ack(struct net_device *dev) { struct au1k_private *aup = (struct au1k_private *) dev->priv; volatile ring_dest_t *ptxd; ptxd = aup->tx_ring[aup->tx_tail]; while (!(ptxd->flags & AU_OWN) && (aup->tx_tail != aup->tx_head)) { update_tx_stats(dev, ptxd->flags, ptxd->count_1<<8 | ptxd->count_0); ptxd->count_0 = 0; ptxd->count_1 = 0; au_sync(); aup->tx_tail = (aup->tx_tail + 1) & (NUM_IR_DESC - 1); ptxd = aup->tx_ring[aup->tx_tail]; if (aup->tx_full) { aup->tx_full = 0; netif_wake_queue(dev); } } if (aup->tx_tail == aup->tx_head) { writel(read_ir_reg(IR_CONFIG_1) & ~IR_TX_ENABLE, IR_CONFIG_1); au_sync(); writel(read_ir_reg(IR_CONFIG_1) | IR_RX_ENABLE, IR_CONFIG_1); writel(0, IR_RING_PROMPT); au_sync(); if (aup->newspeed) au1k_irda_set_speed(dev, aup->newspeed); aup->newspeed = 0; } } void dump_tx_desc(struct net_device *dev) { struct au1k_private *aup = (struct au1k_private *) dev->priv; volatile ring_dest_t *ptxd = aup->tx_ring[aup->tx_head]; int i; u32 ring_stat; printk("dumping tx desc: tx_head %d tx_tail %d\n", aup->tx_head, aup->tx_tail); ring_stat = read_ir_reg(IR_RING_PTR_STATUS); printk("rx ring ptr %d, tx ring ptr %d\n", ring_stat & 0x3f, (ring_stat >> 8) & 0x3f); for (i=0; i<NUM_IR_DESC; i++) { ptxd = aup->tx_ring[i]; printk("tx ptxd %x\n", ptxd); printk("count_0 %x\n", ptxd->count_0); printk("count_1 %x\n", ptxd->count_1); printk("flags %x\n", ptxd->flags); printk("addr_0 %x\n", ptxd->addr_0); printk("addr_1 %x\n", ptxd->addr_1); printk("addr_2 %x\n", ptxd->addr_2); printk("addr_3 %x\n\n", ptxd->addr_3); } for (i=0; i<NUM_IR_DESC; i++) { ptxd = aup->rx_ring[i]; printk("rx ptxd %x\n", ptxd); printk("count_0 %x\n", ptxd->count_0); printk("count_1 %x\n", ptxd->count_1); printk("flags %x\n", ptxd->flags); printk("addr_0 %x\n", ptxd->addr_0); printk("addr_1 %x\n", ptxd->addr_1); printk("addr_2 %x\n", ptxd->addr_2); printk("addr_3 %x\n\n", ptxd->addr_3); } } /* * Au1000 transmit routine. */ static int au1k_irda_hard_xmit(struct sk_buff *skb, struct net_device *dev) { struct au1k_private *aup = (struct au1k_private *) dev->priv; int speed = irda_get_next_speed(skb); volatile ring_dest_t *ptxd; u32 len; u32 flags; db_dest_t *pDB; if (speed != aup->speed && speed != -1) { aup->newspeed = speed; } if (skb->len == 0) { if (aup->newspeed) au1k_irda_set_speed(dev, speed); aup->newspeed = 0; dev_kfree_skb(skb); return 0; } ptxd = aup->tx_ring[aup->tx_head]; flags = ptxd->flags; if (flags & AU_OWN) { netif_stop_queue(dev); aup->tx_full = 1; return 1; } else if (((aup->tx_head + 1) & (NUM_IR_DESC - 1)) == aup->tx_tail) { netif_stop_queue(dev); aup->tx_full = 1; return 1; } pDB = aup->tx_db_inuse[aup->tx_head]; #if 0 if (read_ir_reg(IR_RX_BYTE_CNT) != 0) { printk("tx warning: rx byte cnt %x\n", read_ir_reg(IR_RX_BYTE_CNT)); } #endif if (aup->speed == 4000000) { /* FIR */ memcpy((void *)pDB->vaddr, skb->data, skb->len); ptxd->count_0 = skb->len & 0xff; ptxd->count_1 = (skb->len >> 8) & 0xff; } else { /* SIR */ len = async_wrap_skb(skb, (u8 *)pDB->vaddr, MAX_BUF_SIZE); ptxd->count_0 = len & 0xff; ptxd->count_1 = (len >> 8) & 0xff; ptxd->flags |= IR_DIS_CRC; } ptxd->flags |= AU_OWN; au_sync(); writel(read_ir_reg(IR_CONFIG_1) | IR_TX_ENABLE, IR_CONFIG_1); writel(0, IR_RING_PROMPT); au_sync(); dev_kfree_skb(skb); aup->tx_head = (aup->tx_head + 1) & (NUM_IR_DESC - 1); dev->trans_start = jiffies; return 0; } static inline void update_rx_stats(struct net_device *dev, u32 status, u32 count) { struct au1k_private *aup = (struct au1k_private *) dev->priv; struct net_device_stats *ps = &aup->stats; ps->rx_packets++; if (status & IR_RX_ERROR) { ps->rx_errors++; if (status & (IR_PHY_ERROR|IR_FIFO_OVER)) ps->rx_missed_errors++; if (status & IR_MAX_LEN) ps->rx_length_errors++; if (status & IR_CRC_ERROR) ps->rx_crc_errors++; } else ps->rx_bytes += count; } /* * Au1000 receive routine. */ static int au1k_irda_rx(struct net_device *dev) { struct au1k_private *aup = (struct au1k_private *) dev->priv; struct sk_buff *skb; volatile ring_dest_t *prxd; u32 flags, count; db_dest_t *pDB; prxd = aup->rx_ring[aup->rx_head]; flags = prxd->flags; while (!(flags & AU_OWN)) { pDB = aup->rx_db_inuse[aup->rx_head]; count = prxd->count_1<<8 | prxd->count_0; if (!(flags & IR_RX_ERROR)) { /* good frame */ update_rx_stats(dev, flags, count); skb=alloc_skb(count+1,GFP_ATOMIC); if (skb == NULL) { aup->stats.rx_dropped++; continue; } skb_reserve(skb, 1); if (aup->speed == 4000000) skb_put(skb, count); else skb_put(skb, count-2); memcpy(skb->data, (void *)pDB->vaddr, count-2); skb->dev = dev; skb->mac.raw = skb->data; skb->protocol = htons(ETH_P_IRDA); netif_rx(skb); prxd->count_0 = 0; prxd->count_1 = 0; } prxd->flags |= AU_OWN; aup->rx_head = (aup->rx_head + 1) & (NUM_IR_DESC - 1); writel(0, IR_RING_PROMPT); au_sync(); /* next descriptor */ prxd = aup->rx_ring[aup->rx_head]; flags = prxd->flags; dev->last_rx = jiffies; } return 0; } void au1k_irda_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; if (dev == NULL) { printk(KERN_ERR "%s: isr: null dev ptr\n", dev->name); return; } writel(0, IR_INT_CLEAR); /* ack irda interrupts */ au1k_irda_rx(dev); au1k_tx_ack(dev); } /* * The Tx ring has been full longer than the watchdog timeout * value. The transmitter must be hung? */ static void au1k_tx_timeout(struct net_device *dev) { struct au1k_private *aup = (struct au1k_private *) dev->priv; printk(KERN_ERR "%s: tx timeout\n", dev->name); au1k_irda_set_speed(dev, aup->speed); } /* * Set the IrDA communications speed. */ static int au1k_irda_set_speed(struct net_device *dev, int speed) { unsigned long flags; struct au1k_private *aup = (struct au1k_private *) dev->priv; u32 control; int ret = 0, timeout = 10, i; volatile ring_dest_t *ptxd; if (speed == aup->speed) return ret; save_flags(flags); cli(); /* disable PHY first */ writel(read_ir_reg(IR_ENABLE) & ~0x8000, IR_ENABLE); /* disable RX/TX */ writel(read_ir_reg(IR_CONFIG_1) & ~(IR_RX_ENABLE|IR_TX_ENABLE), IR_CONFIG_1); au_sync_delay(1); while (read_ir_reg(IR_ENABLE) & (IR_RX_STATUS | IR_TX_STATUS)) { mdelay(1); if (!timeout--) { printk("rx/tx disable timeout\n"); break; } } /* disable DMA */ writel(read_ir_reg(IR_CONFIG_1) & ~IR_DMA_ENABLE, IR_CONFIG_1); au_sync_delay(1); /* * After we disable tx/rx. the index pointers * go back to zero. */ aup->tx_head = aup->tx_tail = aup->rx_head = 0; for (i=0; i<NUM_IR_DESC; i++) { ptxd = aup->tx_ring[i]; ptxd->flags = 0; ptxd->count_0 = 0; ptxd->count_1 = 0; } for (i=0; i<NUM_IR_DESC; i++) { ptxd = aup->rx_ring[i]; ptxd->count_0 = 0; ptxd->count_1 = 0; ptxd->flags = AU_OWN; } if (speed == 4000000) writel(1<<13, CPLD_AUX1); else writel(readl(CPLD_AUX1) & ~(1<<13), CPLD_AUX1); switch (speed) { case 9600: writel(11<<10 | 12<<5, IR_WRITE_PHY_CONFIG); writel(IR_SIR_MODE, IR_CONFIG_1); break; case 19200: writel(5<<10 | 12<<5, IR_WRITE_PHY_CONFIG); writel(IR_SIR_MODE, IR_CONFIG_1); break; case 38400: writel(2<<10 | 12<<5, IR_WRITE_PHY_CONFIG); writel(IR_SIR_MODE, IR_CONFIG_1); break; case 57600: writel(1<<10 | 12<<5, IR_WRITE_PHY_CONFIG); writel(IR_SIR_MODE, IR_CONFIG_1); break; case 115200: writel(12<<5, IR_WRITE_PHY_CONFIG); writel(IR_SIR_MODE, IR_CONFIG_1); break; case 4000000: writel(0xF, IR_WRITE_PHY_CONFIG); writel(IR_FIR|IR_DMA_ENABLE|IR_RX_ENABLE, IR_CONFIG_1); break; default: printk(KERN_ERR "%s unsupported speed %x\n", dev->name, speed); ret = -EINVAL; break; } aup->speed = speed; writel(read_ir_reg(IR_ENABLE) | 0x8000, IR_ENABLE); au_sync(); control = read_ir_reg(IR_ENABLE); writel(0, IR_RING_PROMPT); au_sync(); if (control & (1<<14)) { printk(KERN_ERR "%s: configuration error\n", dev->name); } else { if (control & (1<<11)) printk(KERN_INFO "%s Valid SIR config\n", dev->name); if (control & (1<<12)) printk(KERN_INFO "%s Valid MIR config\n", dev->name); if (control & (1<<13)) printk(KERN_INFO "%s Valid FIR config\n", dev->name); if (control & (1<<10)) printk(KERN_INFO "%s TX enabled\n", dev->name); if (control & (1<<9)) printk(KERN_INFO "%s RX enabled\n", dev->name); } restore_flags(flags); return ret; } static int au1k_irda_ioctl(struct net_device *dev, struct ifreq *ifreq, int cmd) { struct if_irda_req *rq = (struct if_irda_req *)ifreq; struct au1k_private *aup = dev->priv; int ret = -EOPNOTSUPP; switch (cmd) { case SIOCSBANDWIDTH: if (capable(CAP_NET_ADMIN)) { /* * We are unable to set the speed if the * device is not running. */ if (aup->open) ret = au1k_irda_set_speed(dev, rq->ifr_baudrate); else { printk(KERN_ERR "%s ioctl: !netif_running\n", dev->name); ret = 0; } } break; case SIOCSMEDIABUSY: ret = -EPERM; if (capable(CAP_NET_ADMIN)) { irda_device_set_media_busy(dev, TRUE); ret = 0; } break; case SIOCGRECEIVING: rq->ifr_receiving = 0; break; default: break; } return ret; } static struct net_device_stats *au1k_irda_stats(struct net_device *dev) { struct au1k_private *aup = (struct au1k_private *) dev->priv; return &aup->stats; } #ifdef MODULE MODULE_AUTHOR("Pete Popov <pp...@mv...>"); MODULE_DESCRIPTION("Au1000 IrDA Device Driver"); module_init(au1k_irda_init); module_exit(au1k_irda_exit); #endif /* MODULE */ |
From: James S. <jsi...@us...> - 2001-10-31 18:50:58
|
Update of /cvsroot/linux-mips/linux/include/net/irda In directory usw-pr-cvs1:/tmp/cvs-serv19643/include/net/irda Added Files: au1000_ircc.h Log Message: Au1000 IrDA driver. --- NEW FILE: au1000_ircc.h --- /* * * BRIEF MODULE DESCRIPTION * Au1000 IrDA driver. * * Copyright 2001 MontaVista Software Inc. * Author: MontaVista Software, Inc. * pp...@mv... or so...@mv... * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef AU1000_IRCC_H #define AU1000_IRCC_H #include <linux/time.h> #include <linux/spinlock.h> #include <linux/pm.h> #include <asm/io.h> #define NUM_IR_IFF 1 #define NUM_IR_DESC 64 #define RING_SIZE_4 0x0 #define RING_SIZE_16 0x3 #define RING_SIZE_64 0xF #define MAX_NUM_IR_DESC 64 #define MAX_BUF_SIZE 2048 #define BPS_115200 0 #define BPS_57600 1 #define BPS_38400 2 #define BPS_19200 5 #define BPS_9600 11 #define BPS_2400 47 /* Ring descriptor flags */ #define AU_OWN (1<<7) /* tx,rx */ #define IR_DIS_CRC (1<<6) /* tx */ #define IR_BAD_CRC (1<<5) /* tx */ #define IR_NEED_PULSE (1<<4) /* tx */ #define IR_FORCE_UNDER (1<<3) /* tx */ #define IR_DISABLE_TX (1<<2) /* tx */ #define IR_HW_UNDER (1<<0) /* tx */ #define IR_TX_ERROR (IR_DIS_CRC|IR_BAD_CRC|IR_HW_UNDER) #define IR_PHY_ERROR (1<<6) /* rx */ #define IR_CRC_ERROR (1<<5) /* rx */ #define IR_MAX_LEN (1<<4) /* rx */ #define IR_FIFO_OVER (1<<3) /* rx */ #define IR_SIR_ERROR (1<<2) /* rx */ #define IR_RX_ERROR (IR_PHY_ERROR|IR_CRC_ERROR| \ IR_MAX_LEN|IR_FIFO_OVER|IR_SIR_ERROR) typedef struct db_dest { struct db_dest *pnext; volatile u32 *vaddr; dma_addr_t dma_addr; } db_dest_t; typedef struct ring_desc { u8 count_0; /* 7:0 */ u8 count_1; /* 12:8 */ u8 reserved; u8 flags; u8 addr_0; /* 7:0 */ u8 addr_1; /* 15:8 */ u8 addr_2; /* 23:16 */ u8 addr_3; /* 31:24 */ } ring_dest_t; /* Private data for each instance */ struct au1k_private { db_dest_t *pDBfree; db_dest_t db[2*NUM_IR_DESC]; volatile ring_dest_t *rx_ring[NUM_IR_DESC]; volatile ring_dest_t *tx_ring[NUM_IR_DESC]; db_dest_t *rx_db_inuse[NUM_IR_DESC]; db_dest_t *tx_db_inuse[NUM_IR_DESC]; u32 rx_head; u32 tx_head; u32 tx_tail; u32 tx_full; iobuff_t rx_buff; struct net_device *netdev; struct net_device_stats stats; struct timeval stamp; struct timeval now; struct qos_info qos; struct irlap_cb *irlap; u8 open; u32 flags; /* Interface flags */ u32 speed; u32 newspeed; u32 intr_work_done; /* number of Rx and Tx pkts processed in the isr */ struct timer_list timer; spinlock_t lock; /* For serializing operations */ struct pm_dev *dev; }; #endif /* AU1000_IRCC_H */ |
From: James S. <jsi...@us...> - 2001-10-31 18:50:13
|
Update of /cvsroot/linux-mips/linux/include/net/irda In directory usw-pr-cvs1:/tmp/cvs-serv19416/irda Log Message: Directory /cvsroot/linux-mips/linux/include/net/irda added to the repository |
From: James S. <jsi...@us...> - 2001-10-31 18:49:51
|
Update of /cvsroot/linux-mips/linux/include/net In directory usw-pr-cvs1:/tmp/cvs-serv19193/net Log Message: Directory /cvsroot/linux-mips/linux/include/net added to the repository |
From: James S. <jsi...@us...> - 2001-10-31 18:46:36
|
Update of /cvsroot/linux-mips/linux/include/asm-mips In directory usw-pr-cvs1:/tmp/cvs-serv17790 Modified Files: au1000.h Log Message: Minor sync to Ralph's tree. Indent issues only. Index: au1000.h =================================================================== RCS file: /cvsroot/linux-mips/linux/include/asm-mips/au1000.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- au1000.h 2001/10/31 06:16:24 1.9 +++ au1000.h 2001/10/31 18:46:34 1.10 @@ -54,20 +54,20 @@ void static inline outb_sync(u8 val, int reg) { - outb(val, reg); - au_sync(); + outb(val, reg); + au_sync(); } void static inline outw_sync(u16 val, int reg) { - outw(val, reg); - au_sync(); + outw(val, reg); + au_sync(); } void static inline outl_sync(u32 val, int reg) { - outl(val, reg); - au_sync(); + outl(val, reg); + au_sync(); } /* arch/mips/au1000/common/clocks.c */ |
From: James S. <jsi...@us...> - 2001-10-31 18:44:57
|
Update of /cvsroot/linux-mips/linux/drivers/net/irda In directory usw-pr-cvs1:/tmp/cvs-serv16925/irda Log Message: Directory /cvsroot/linux-mips/linux/drivers/net/irda added to the repository |
From: James S. <jsi...@us...> - 2001-10-31 18:44:00
|
Update of /cvsroot/linux-mips/linux/arch/mips/vr4181/common In directory usw-pr-cvs1:/tmp/cvs-serv16408/vr4181/common Modified Files: irq.c Log Message: Interrupt handler fixes. Index: irq.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/vr4181/common/irq.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- irq.c 2001/10/07 16:57:19 1.6 +++ irq.c 2001/10/31 18:43:56 1.7 @@ -77,7 +77,13 @@ #define sys_irq_shutdown sys_irq_disable #define sys_irq_ack sys_irq_disable -#define sys_irq_end sys_irq_enable + +static void +sys_irq_end(unsigned int irq) +{ + if(!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) + sys_irq_enable(); +} static hw_irq_controller sys_irq_controller = { "vr4181_sys_irq", @@ -148,7 +154,12 @@ } } -#define gpio_irq_end gpio_irq_enable +static void +gpio_irq_end(unsigned int irq) +{ + if(!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) + gpio_irq_enable(irq); +} static hw_irq_controller gpio_irq_controller = { "vr4181_gpio_irq", |
From: James S. <jsi...@us...> - 2001-10-31 18:43:59
|
Update of /cvsroot/linux-mips/linux/arch/mips/kernel In directory usw-pr-cvs1:/tmp/cvs-serv16408/kernel Modified Files: irq_cpu.c Log Message: Interrupt handler fixes. Index: irq_cpu.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/irq_cpu.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- irq_cpu.c 2001/10/22 19:16:44 1.2 +++ irq_cpu.c 2001/10/31 18:43:56 1.3 @@ -2,7 +2,7 @@ * Copyright 2001 MontaVista Software Inc. * Author: Jun Sun, js...@mv... or js...@ju... * - * This file define the irq handler for MIPS CPU interrupts. + * This file define the irq handler for MIPS CPU interrupts. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -65,7 +65,8 @@ static void mips_cpu_irq_end(unsigned int irq) { - mips_cpu_irq_enable(irq); + if(!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) + mips_cpu_irq_enable(irq); } static hw_irq_controller mips_cpu_irq_controller = { @@ -94,4 +95,4 @@ } mips_cpu_irq_base = irq_base; -} +} |