]> git.neil.brown.name Git - history.git/commitdiff
Linux 2.2.18pre15 2.2.18pre15
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:22:34 +0000 (15:22 -0500)
committerAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:22:34 +0000 (15:22 -0500)
o Default msdos behaviour to old (small) letters (Alan Cox)
| An option 'big' goes with 'small'
o Fix define collision in cpqfc (Arjan van de Ven)
o Fix case where scripts/kwhich isnt executable (Alan Cox)
o Alpha FPU divide fix (Richard Henderson)
o Add ADMtek985 to the tulip list (J Katz)
o Lose excess ymfpci debugging (Rob Landley)
o Fix i2c bus id clash (Russell King)
o Update the ARM vidc driver (Russell King)
o Update the ARM am79c961a driver (Russell King)
o Fix parport_pc build with no PCI (Russell King)
o Fix ARM memzero (Russell King)
o Update ARM for __init and __setup (Russell King)
o Update ARM to loops_per_jiffy (Russell King)
o Remove arm ecard debug messages (Russell King)
o Fix ARM makefiles (Russell King)
o Fix iph5526 driver to use mdelay (Arjan van de Ven)
o Fix epca, dtlk, aha152x loops_per_sec bits (Philipp Rumpf)
o Fix smp tlb invalidate and bogomip printing (Philipp Rumpf)
o Fix NLS warnings (Arjan van de Ven)
o Fix wavfront conversion to loops_per_jiffies (Alan Cox)
o Fix an audio problem and a sanyo changer  (Jens Axboe)
problem
o Fix include bug with divert (Alan Cox)
| Alternate fix to Willy Tarreau's
o Fix Alpha for loops_per_jiffy (Willy Tarreau)

84 files changed:
Documentation/cdrom/cdrom-standard.tex
Documentation/cdrom/ide-cd
MAINTAINERS
Makefile
arch/alpha/kernel/setup.c
arch/alpha/kernel/smp.c
arch/alpha/math-emu/Makefile
arch/alpha/math-emu/math.c
arch/alpha/math-emu/qrnnd.S [new file with mode: 0644]
arch/alpha/math-emu/sfp-util.h
arch/arm/boot/Makefile
arch/arm/kernel/ecard.c
arch/arm/kernel/iic.c
arch/arm/kernel/setup.c
arch/arm/lib/delay.S
arch/arm/lib/memzero.S
arch/arm/vmlinux-armo.lds.in
arch/arm/vmlinux-armv.lds.in
arch/i386/kernel/setup.c
arch/i386/kernel/smp.c
drivers/block/acsi.c
drivers/block/ide-cd.c
drivers/block/rd.c
drivers/cdrom/cdrom.c
drivers/char/dtlk.c
drivers/char/epca.c
drivers/misc/parport_pc.c
drivers/net/am79c961a.c
drivers/net/am79c961a.h
drivers/net/fc/iph5526.c
drivers/net/tulip.c
drivers/scsi/aha152x.c
drivers/scsi/cpqfcTSstructs.h
drivers/scsi/sr.c
drivers/sound/Makefile
drivers/sound/vidc.c
drivers/sound/vidc.h
drivers/sound/vidc_audio.c [deleted file]
drivers/sound/vidc_fill.S
drivers/sound/vidc_mixer.c [deleted file]
drivers/sound/vidc_synth.c
drivers/sound/wavfront.c
drivers/sound/ymfpci.c
fs/adfs/super.c
fs/fat/inode.c
fs/nls/nls_base.c
fs/nls/nls_cp437.c
fs/nls/nls_cp737.c
fs/nls/nls_cp775.c
fs/nls/nls_cp850.c
fs/nls/nls_cp852.c
fs/nls/nls_cp855.c
fs/nls/nls_cp857.c
fs/nls/nls_cp860.c
fs/nls/nls_cp861.c
fs/nls/nls_cp862.c
fs/nls/nls_cp863.c
fs/nls/nls_cp864.c
fs/nls/nls_cp865.c
fs/nls/nls_cp866.c
fs/nls/nls_cp869.c
fs/nls/nls_cp874.c
fs/nls/nls_cp932.c
fs/nls/nls_cp936.c
fs/nls/nls_cp949.c
fs/nls/nls_cp950.c
fs/nls/nls_iso8859-1.c
fs/nls/nls_iso8859-14.c
fs/nls/nls_iso8859-15.c
fs/nls/nls_iso8859-2.c
fs/nls/nls_iso8859-3.c
fs/nls/nls_iso8859-4.c
fs/nls/nls_iso8859-5.c
fs/nls/nls_iso8859-6.c
fs/nls/nls_iso8859-7.c
fs/nls/nls_iso8859-8.c
fs/nls/nls_iso8859-9.c
fs/nls/nls_koi8-r.c
include/asm-alpha/delay.h
include/asm-alpha/smp.h
include/linux/i2c.h
include/linux/netdevice.h
include/linux/nls.h
init/main.c

index 1bf6434cbff622a0217a2d377d4d461f42a89fd8..56dd21bc82424bcff4f3a9a8282d1e7d61202db7 100644 (file)
@@ -24,7 +24,7 @@
 \title{A \linux\ \cdrom\ standard}
 \author{David van Leeuwen\\{\normalsize\tt david@ElseWare.cistron.nl}
 \\{\footnotesize updated by Erik Andersen {\tt(andersee@debian.org)}}
-\\{\footnotesize updated by Jens Axboe {\tt(axboe@image.dk)}}}
+\\{\footnotesize updated by Jens Axboe {\tt(axboe@suse.de)}}}
 \date{12 March 1999}
 
 \maketitle
index b5967f50689337e2e358b92e99f36e17b38d70db..ac202df5810396771dbef2a97cfff34767dfb90f 100644 (file)
@@ -1,7 +1,7 @@
 IDE-CD driver documentation
 Originally by scott snyder  <snyder@fnald0.fnal.gov> (19 May 1996)
 Carrying on the torch is: Erik Andersen <andersee@debian.org>
-New maintainers (19 Oct 1998): Jens Axboe <axboe@image.dk>
+New maintainer (19 Oct 1998): Jens Axboe <axboe@suse.de>
 
 1. Introduction
 ---------------
index fca825504cbd6b57409010ad80d91a905a6dea1a..812943f55d02dc15a5b1a44c532d105b1f803d4b 100644 (file)
@@ -468,7 +468,7 @@ S:  Maintained
 
 IDE/ATAPI CDROM DRIVER 
 P:     Jens Axboe
-M:     axboe@image.dk
+M:     axboe@suse.de
 L:     linux-kernel@vger.kernel.org
 S:     Maintained
 
@@ -943,7 +943,7 @@ S:  Maintained
 
 UNIFORM CDROM DRIVER 
 P:     Jens Axboe
-M:     axboe@image.dk
+M:     axboe@suse.de
 L:     linux-kernel@vger.kernel.org
 S:     Maintained
 
index 6d079f9fa4db9065bc5af7f679f6accf5820ef0c..c4c3406a63f8bd4bafd7dd27f6cd71eb10407f79 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 18
-EXTRAVERSION = pre14
+EXTRAVERSION = pre15
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
@@ -29,7 +29,7 @@ LD    =$(CROSS_COMPILE)ld
 #      otherwise 'cc'
 #
 CC     =$(shell if [ -n "$(CROSS_COMPILE)" ]; then echo $(CROSS_COMPILE)gcc; else \
-       scripts/kwhich gcc272 2>/dev/null || scripts/kwhich kgcc 2>/dev/null || echo cc; fi) \
+       $(CONFIG_SHELL) scripts/kwhich gcc272 2>/dev/null || $(CONFIG_SHELL) scripts/kwhich kgcc 2>/dev/null || echo cc; fi) \
        -D__KERNEL__ -I$(HPATH)
 CPP    =$(CC) -E
 AR     =$(CROSS_COMPILE)ar
index 4aa45c911cf74d54cb5d1fd90508bcd2cb28e2e0..bac5fe1e66821034ed75fc4a6acabf88b88f9eb9 100644 (file)
@@ -841,7 +841,7 @@ int get_cpuinfo(char *buffer)
                       hwrpb->pagesize,
                       hwrpb->pa_bits,
                       hwrpb->max_asn,
-                      loops_per_sec / 500000, (loops_per_sec / 5000) % 100,
+                      loops_per_jiffy * HZ / 500000, (loops_per_jiffy * HZ / 5000) % 100,
                       unaligned[0].count, unaligned[0].pc, unaligned[0].va,
                       unaligned[1].count, unaligned[1].pc, unaligned[1].va,
                       platform_string(), nr_processors);
index 092194bcdc8aa559887ed38d0e9865a8702c7401..65664c76bda748059e6880799d4f35b09fff14de 100644 (file)
@@ -94,7 +94,7 @@ smp_setup(char *str, int *ints)
 static inline void __init
 smp_store_cpu_info(int cpuid)
 {
-       cpu_data[cpuid].loops_per_sec = loops_per_sec;
+       cpu_data[cpuid].loops_per_jiffy = loops_per_jiffy;
        cpu_data[cpuid].last_asn
          = (cpuid << WIDTH_HARDWARE_ASN) + ASN_FIRST_VERSION;
 
index b5fc3776568a7a6f8e1e8aade709a537d5ffddb0..91e5ba660ecc4f7829730b6639cb6206f956c849 100644 (file)
@@ -8,7 +8,7 @@
 # Note 2! The CFLAGS definition is now in the main makefile...
 
 O_TARGET := math-emu.o
-O_OBJS   := math.o
+O_OBJS   := math.o qrnnd.o
 CFLAGS += -I. -I$(TOPDIR)/include/math-emu -w
 
 ifeq ($(CONFIG_MATHEMU),m)
index 8434e46b1d65600eb53961b7fe6cf9215940c628..61f22c6181118dbbf91ee87c5cad2ba11b7afb84 100644 (file)
@@ -84,66 +84,6 @@ void cleanup_module(void)
 
 #endif /* MODULE */
 
-/* For 128-bit division.  */
-
-void
-udiv128(unsigned long divisor_f0, unsigned long divisor_f1,
-       unsigned long dividend_f0, unsigned long dividend_f1,
-       unsigned long *quot, unsigned long *remd)
-{
-       _FP_FRAC_DECL_2(quo);
-       _FP_FRAC_DECL_2(rem);
-       _FP_FRAC_DECL_2(tmp);
-       unsigned long i, num_bits, bit;
-
-       _FP_FRAC_SET_2(rem, _FP_ZEROFRAC_2);
-       _FP_FRAC_SET_2(quo, _FP_ZEROFRAC_2);
-
-       if (_FP_FRAC_ZEROP_2(divisor))
-               goto out;
-
-       if (_FP_FRAC_GT_2(divisor, dividend)) {
-               _FP_FRAC_COPY_2(rem, dividend);
-               goto out;
-       }
-
-       if (_FP_FRAC_EQ_2(divisor, dividend)) {
-               __FP_FRAC_SET_2(quo, 0, 1);
-               goto out;
-       }
-
-       num_bits = 128;
-       while (1) {
-               bit = _FP_FRAC_NEGP_2(dividend);
-               _FP_FRAC_COPY_2(tmp, rem);
-               _FP_FRAC_SLL_2(tmp, 1);
-               _FP_FRAC_LOW_2(tmp) |= bit;
-               if (! _FP_FRAC_GE_2(tmp, divisor))
-                       break;
-               _FP_FRAC_COPY_2(rem, tmp);
-               _FP_FRAC_SLL_2(dividend, 1);
-               num_bits--;
-       }
-
-       for (i = 0; i < num_bits; i++) {
-               bit = _FP_FRAC_NEGP_2(dividend);
-               _FP_FRAC_SLL_2(rem, 1);
-               _FP_FRAC_LOW_2(rem) |= bit;
-               _FP_FRAC_SUB_2(tmp, rem, divisor);
-               bit = _FP_FRAC_NEGP_2(tmp);
-               _FP_FRAC_SLL_2(dividend, 1);
-               _FP_FRAC_SLL_2(quo, 1);
-               if (!bit) {
-                       _FP_FRAC_LOW_2(quo) |= 1;
-                       _FP_FRAC_COPY_2(rem, tmp);
-               }
-       }
-
-out:
-       *quot = quo_f1;
-       *remd = rem_f1;
-       return;
-}
 
 /*
  * Emulate the floating point instruction at address PC.  Returns 0 if
diff --git a/arch/alpha/math-emu/qrnnd.S b/arch/alpha/math-emu/qrnnd.S
new file mode 100644 (file)
index 0000000..d6373ec
--- /dev/null
@@ -0,0 +1,163 @@
+ # Alpha 21064 __udiv_qrnnd
+ # Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc.
+
+ # This file is part of GCC.
+
+ # The GNU MP Library 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.
+
+ # In addition to the permissions in the GNU General Public License, the
+ # Free Software Foundation gives you unlimited permission to link the
+ # compiled version of this file with other programs, and to distribute
+ # those programs without any restriction coming from the use of this
+ # file.  (The General Public License restrictions do apply in other
+ # respects; for example, they cover modification of the file, and
+ # distribution when not linked into another program.)
+
+ # This file is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU General Public License
+ # along with GCC; see the file COPYING.  If not, write to the 
+ # Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
+
+        .set noreorder
+        .set noat
+
+       .text
+
+       .globl __udiv_qrnnd
+       .ent __udiv_qrnnd
+__udiv_qrnnd:
+       .frame $30,0,$26,0
+       .prologue 0
+
+#define cnt    $2
+#define tmp    $3
+#define rem_ptr        $16
+#define n1     $17
+#define n0     $18
+#define d      $19
+#define qb     $20
+#define AT     $at
+
+       ldiq    cnt,16
+       blt     d,$largedivisor
+
+$loop1:        cmplt   n0,0,tmp
+       addq    n1,n1,n1
+       bis     n1,tmp,n1
+       addq    n0,n0,n0
+       cmpule  d,n1,qb
+       subq    n1,d,tmp
+       cmovne  qb,tmp,n1
+       bis     n0,qb,n0
+       cmplt   n0,0,tmp
+       addq    n1,n1,n1
+       bis     n1,tmp,n1
+       addq    n0,n0,n0
+       cmpule  d,n1,qb
+       subq    n1,d,tmp
+       cmovne  qb,tmp,n1
+       bis     n0,qb,n0
+       cmplt   n0,0,tmp
+       addq    n1,n1,n1
+       bis     n1,tmp,n1
+       addq    n0,n0,n0
+       cmpule  d,n1,qb
+       subq    n1,d,tmp
+       cmovne  qb,tmp,n1
+       bis     n0,qb,n0
+       cmplt   n0,0,tmp
+       addq    n1,n1,n1
+       bis     n1,tmp,n1
+       addq    n0,n0,n0
+       cmpule  d,n1,qb
+       subq    n1,d,tmp
+       cmovne  qb,tmp,n1
+       bis     n0,qb,n0
+       subq    cnt,1,cnt
+       bgt     cnt,$loop1
+       stq     n1,0(rem_ptr)
+       bis     $31,n0,$0
+       ret     $31,($26),1
+
+$largedivisor:
+       and     n0,1,$4
+
+       srl     n0,1,n0
+       sll     n1,63,tmp
+       or      tmp,n0,n0
+       srl     n1,1,n1
+
+       and     d,1,$6
+       srl     d,1,$5
+       addq    $5,$6,$5
+
+$loop2:        cmplt   n0,0,tmp
+       addq    n1,n1,n1
+       bis     n1,tmp,n1
+       addq    n0,n0,n0
+       cmpule  $5,n1,qb
+       subq    n1,$5,tmp
+       cmovne  qb,tmp,n1
+       bis     n0,qb,n0
+       cmplt   n0,0,tmp
+       addq    n1,n1,n1
+       bis     n1,tmp,n1
+       addq    n0,n0,n0
+       cmpule  $5,n1,qb
+       subq    n1,$5,tmp
+       cmovne  qb,tmp,n1
+       bis     n0,qb,n0
+       cmplt   n0,0,tmp
+       addq    n1,n1,n1
+       bis     n1,tmp,n1
+       addq    n0,n0,n0
+       cmpule  $5,n1,qb
+       subq    n1,$5,tmp
+       cmovne  qb,tmp,n1
+       bis     n0,qb,n0
+       cmplt   n0,0,tmp
+       addq    n1,n1,n1
+       bis     n1,tmp,n1
+       addq    n0,n0,n0
+       cmpule  $5,n1,qb
+       subq    n1,$5,tmp
+       cmovne  qb,tmp,n1
+       bis     n0,qb,n0
+       subq    cnt,1,cnt
+       bgt     cnt,$loop2
+
+       addq    n1,n1,n1
+       addq    $4,n1,n1
+       bne     $6,$Odd
+       stq     n1,0(rem_ptr)
+       bis     $31,n0,$0
+       ret     $31,($26),1
+
+$Odd:
+       /* q' in n0. r' in n1 */
+       addq    n1,n0,n1
+
+       cmpult  n1,n0,tmp       # tmp := carry from addq
+       subq    n1,d,AT
+       addq    n0,tmp,n0
+       cmovne  tmp,AT,n1
+
+       cmpult  n1,d,tmp
+       addq    n0,1,AT
+       cmoveq  tmp,AT,n0
+       subq    n1,d,AT
+       cmoveq  tmp,AT,n1
+
+       stq     n1,0(rem_ptr)
+       bis     $31,n0,$0
+       ret     $31,($26),1
+
+       .end    __udiv_qrnnd
index 7a6a8cf45d49840dbdd8e007c6206f18fc684405..f53707f7745569c3a1ab48526ccf5d6753a1221e 100644 (file)
           : "r" ((UDItype)(u)),                \
             "r" ((UDItype)(v)))
 
-extern void udiv128(unsigned long, unsigned long,
-                   unsigned long, unsigned long,
-                   unsigned long *,
-                   unsigned long *);
-
-#define udiv_qrnnd(q, r, n1, n0, d)            \
-  do {                                         \
-    unsigned long xr, xi;                      \
-    udiv128((n0), (n1), 0, (d), &xr, &xi);     \
-    (q) = xr;                                  \
-    (r) = xi;                                  \
+#define udiv_qrnnd(q, r, n1, n0, d)                            \
+  do { unsigned long __r;                                      \
+    (q) = __udiv_qrnnd (&__r, (n1), (n0), (d));                        \
+    (r) = __r;                                                 \
   } while (0)
+extern unsigned long __udiv_qrnnd (unsigned long *, unsigned long,
+                                  unsigned long , unsigned long);
 
 #define UDIV_NEEDS_NORMALIZATION 1  
 
index 3f5b82b44247ea23d1b39a47546ed7086174939b..4a1c1c59e2dc87fc7026749e092dd53d7b6bd6bf 100644 (file)
@@ -20,10 +20,10 @@ compressed/vmlinux: $(TOPDIR)/vmlinux dep
        @$(MAKE) -C compressed vmlinux
 
 install: $(CONFIGURE) Image
-       sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL).$(EXTRAVERSION) Image $(TOPDIR)/System.map "$(INSTALL_PATH)"
+       sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) Image $(TOPDIR)/System.map "$(INSTALL_PATH)"
 
 zinstall: $(CONFIGURE) zImage
-       sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL).$(EXTRAVERSION) zImage $(TOPDIR)/System.map "$(INSTALL_PATH)"
+       sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) zImage $(TOPDIR)/System.map "$(INSTALL_PATH)"
 
 clean:
        rm -f Image zImage
index 8995b822d7f6e6d1d4d6b6da4bae0bb84dc61d48..273d46598bdbc30700314cf515648e4399783611 100644 (file)
@@ -140,14 +140,10 @@ ecard_task_reset(struct ecard_request *req)
                ecard_t *ec;
 
                for (ec = cards; ec; ec = ec->next) {
-                       printk(KERN_DEBUG "Resetting card %d\n",
-                              ec->slot_no);
-
                        if (ec->loader)
                                ecard_loader_reset(POD_INT_ADDR(ec->podaddr),
                                                   ec->loader);
                }
-               printk(KERN_DEBUG "All cards reset\n");
        } else if (req->ec->loader)
                ecard_loader_reset(POD_INT_ADDR(req->ec->podaddr),
                                   req->ec->loader);
index c9a672a321c44fe598f708ede9745f5bfd9649f7..ab73f6f53a76722fe38d7e7ceb5c683f66cefcb4 100644 (file)
@@ -22,8 +22,8 @@
  */
 static void iic_delay(void)
 {
-       extern unsigned long loops_per_sec;
-       if (loops_per_sec != (1 << 12)) {
+       extern unsigned long loops_per_jiffy;
+       if (loops_per_jiffy != (1 << 12)) {
                udelay(100); /* was 10 */
                return;
        } else {
index 8047928b8abc4ff87a264f4e797e69fb528dc32a..c60eb31c47a77a0f9097b6e0451016a41f94f4bc 100644 (file)
@@ -522,8 +522,8 @@ int get_cpuinfo(char * buffer)
                     (int)processor_id & 15, elf_platform);
 
        p += sprintf(p, "BogoMIPS\t: %lu.%02lu\n",
-                    (loops_per_sec+2500) / 500000,
-                    ((loops_per_sec+2500) / 5000) % 100);
+                    (loops_per_jiffy+2500) / (500000/HZ),
+                    ((loops_per_jiffy+2500) / (5000/HZ)) % 100);
 
        p += sprintf(p, "Hardware\t: %s\n", machine_name);
 
index 72dab5a9569011d536f677b7daa84b1c427b080f..2e884c7c7e51aa5939f00357b1a5e1b1cb95f6fb 100644 (file)
@@ -7,7 +7,7 @@
 #include <asm/assembler.h>
                .text
 
-LC0:           .word   SYMBOL_NAME(loops_per_sec)
+LC0:           .word   SYMBOL_NAME(loops_per_jiffy)
 
 ENTRY(udelay)
                mov     r2, #0x1000
index 59ec365740ffe940699629c42410e80a2d024cf3..51ccc60160fd5fc7157d5cfd29c5d472459bf345 100644 (file)
@@ -1,80 +1,80 @@
 /*
- * linux/arch/arm/lib/memzero.S
+ *  linux/arch/arm/lib/memzero.S
  *
- * Copyright (C) 1995-1999 Russell King
+ *  Copyright (C) 1995-2000 Russell King
+ *
+ * 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.
  */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include "constants.h"
-
-               .text
 
+       .text
+       .align  5
+       .word   0
 /*
- * Prototype: void memzero(void *d, size_t n)
+ * Align the pointer in r0.  r3 contains the number of bytes that we are
+ * mis-aligned by, and r1 is the number of bytes.  If r1 < 4, then we
+ * don't bother; we use byte stores instead.
+ */
+1:     subs    r1, r1, #4              @ 1 do we have enough
+       blt     5f                      @ 1 bytes to align with?
+       cmp     r3, #2                  @ 1
+       strltb  r2, [r0], #1            @ 1
+       strleb  r2, [r0], #1            @ 1
+       strb    r2, [r0], #1            @ 1
+       add     r1, r1, r3              @ 1 (r1 = r1 - (4 - r3))
+/*
+ * The pointer is now aligned and the length is adjusted.  Try doing the
+ * memzero again.
  */
-1:             @ 4 <= r1
-               cmp     ip, #2                          @       1
-               strltb  r2, [r0], #1                    @       1
-               strleb  r2, [r0], #1                    @       1
-               strb    r2, [r0], #1                    @       1
-               rsb     ip, ip, #4                      @       1
-               sub     r1, r1, ip                      @       1
-               cmp     r1, #3                          @       1
-               bgt     2f                              @       1       @ +8
-               b       4f                              @       1       @ +9
-
-               .align  5
 
 ENTRY(__memzero)
-               mov     r2, #0                          @       1
-               cmp     r1, #4                          @       1
-               blt     4f                              @       1       @ = 3
-
-               @ r1 >= 4
-
-               ands    ip, r0, #3                      @       1
-               bne     1b                              @       1       @ = 5
-
-2:             @ r1 >= 4 && (r0 & 3) = 0                               @ = 5 or 11
-
-               str     lr, [sp, #-4]!                  @       1
-               mov     r3, #0                          @       1
-               mov     ip, #0                          @       1
-               mov     lr, #0                          @       1
-
-               @ 4 <= r1 <= 32                                         @ = 9 or 15
-
-3:             subs    r1, r1, #32                     @       1
-               stmgeia r0!, {r2, r3, ip, lr}           @       4
-               stmgeia r0!, {r2, r3, ip, lr}           @       4
-               bgt     3b                              @       1
-               LOADREGS(eqfd, sp!, {pc})               @       1/2
-
-               @ -28 <= r1 <= -1
-
-               cmp     r1, #-16                        @       1
-               stmgeia r0!, {r2, r3, ip, lr}           @       4
-               ldr     lr, [sp], #4                    @       1
-               addlts  r1, r1, #16                     @       1
-               RETINSTR(moveq,pc,lr)                   @       1
-
-               @ -12 <= r1 <= -1
-
-               cmp     r1, #-8                         @       1
-               stmgeia r0!, {r2, r3}                   @       2
-               addlts  r1, r1, #8                      @       1
-               RETINSTR(moveq,pc,lr)                   @       1
-
-               @ -4 <= r1 <= -1
-
-               cmp     r1, #-4                         @       1
-               strge   r2, [r0], #4                    @       1
-               adds    r1, r1, #4                      @       1
-               RETINSTR(moveq,pc,lr)                   @       1
-
-4:             @ 1 <= r1 <= 3
-               cmp     r1, #2                          @       1
-               strgtb  r2, [r0], #1                    @       1
-               strgeb  r2, [r0], #1                    @       1
-               strb    r2, [r0], #1                    @       1
-               RETINSTR(mov,pc,lr)                     @       1
+       mov     r2, #0                  @ 1
+       ands    r3, r0, #3              @ 1 unaligned?
+       bne     1b                      @ 1
+/*
+ * r3 = 0, and we know that the pointer in r0 is aligned to a word boundary.
+ */
+       cmp     r1, #16                 @ 1 we can skip this chunk if we
+       blt     4f                      @ 1 have < 16 bytes
+/*
+ * We need an extra register for this loop - save the return address and
+ * use the LR
+ */
+       str     lr, [sp, #-4]!          @ 1
+       mov     ip, r2                  @ 1
+       mov     lr, r2                  @ 1
+
+3:     subs    r1, r1, #64             @ 1 write 32 bytes out per loop
+       stmgeia r0!, {r2, r3, ip, lr}   @ 4
+       stmgeia r0!, {r2, r3, ip, lr}   @ 4
+       stmgeia r0!, {r2, r3, ip, lr}   @ 4
+       stmgeia r0!, {r2, r3, ip, lr}   @ 4
+       bgt     3b                      @ 1
+       LOADREGS(eqfd, sp!, {pc})       @ 1/2 quick exit
+/*
+ * No need to correct the count; we're only testing bits from now on
+ */
+       tst     r1, #32                 @ 1
+       stmneia r0!, {r2, r3, ip, lr}   @ 4
+       stmneia r0!, {r2, r3, ip, lr}   @ 4
+       tst     r1, #16                 @ 1 16 bytes or more?
+       stmneia r0!, {r2, r3, ip, lr}   @ 4
+       ldr     lr, [sp], #4            @ 1
+
+4:     tst     r1, #8                  @ 1 8 bytes or more?
+       stmneia r0!, {r2, r3}           @ 2
+       tst     r1, #4                  @ 1 4 bytes or more?
+       strne   r2, [r0], #4            @ 1
+/*
+ * When we get here, we've got less than 4 bytes to zero.  We
+ * may have an unaligned pointer as well.
+ */
+5:     tst     r1, #2                  @ 1 2 bytes or more?
+       strneb  r2, [r0], #1            @ 1
+       strneb  r2, [r0], #1            @ 1
+       tst     r1, #1                  @ 1 a byte left over
+       strneb  r2, [r0], #1            @ 1
+       RETINSTR(mov,pc,lr)             @ 1
index bea2492b9da96735faab8754232c4a6e265a3728..aac897c7ee686b8e7f5a3fc9058187311d817703 100644 (file)
@@ -6,55 +6,87 @@ OUTPUT_ARCH(arm)
 ENTRY(_start)
 SECTIONS
 {
-  _text = .;                   /* Text and read-only data */
-  .text : {
-       *(.text)
-       *(.fixup)
-       *(.gnu.warning)
-       } = 0x9090
-  .text.lock : { *(.text.lock) }       /* out-of-line lock text */
-  .rodata : { *(.rodata) }
-  .kstrtab : { *(.kstrtab) }
-
-  . = ALIGN(16);               /* Exception table */
-  __start___ex_table = .;
-  __ex_table : { *(__ex_table) }
-  __stop___ex_table = .;
-
-  __start___ksymtab = .;       /* Kernel symbol table */
-  __ksymtab : { *(__ksymtab) }
-  __stop___ksymtab = .;
-
-  _etext = .;                  /* End of text section */
-
-  . = ALIGN(8192);
-  .data : {                    /* Data */
-       *(.init.task)
-       *(.data)
-       CONSTRUCTORS
+       . = TEXTADDR;
+
+       .init : {
+               __init_begin = .;       /* Init code and data           */
+                       *(.text.init)
+               __proc_info_begin = .;
+                       *(.proc.info)
+               __proc_info_end = .;
+                       *(.data.init)
+               . = ALIGN(16);
+               __setup_start = .;
+                       *(.setup.init)
+               __setup_end = .;
+               __initcall_start = .;
+                       *(.initcall.init)
+               __initcall_end = .;
+               . = ALIGN(32768);
+               __init_end = .;
+       }
+
+       .init.task : {
+               *(.init.task)
        }
 
-  _edata = .;                  /* End of data section */
+       /DISCARD/ : {                   /* Exit code and data           */
+               *(.text.exit)
+               *(.data.exit)
+               *(.exitcall.exit)
+       }
 
-  . = ALIGN(32768);            /* Init code and data */
-  __init_begin = .;
-  .text.init : { *(.text.init) }
-  .data.init : { *(.data.init) }
-  . = ALIGN(32768);
-  __init_end = .;
+       .text : {
+               _text = .;              /* Text and read-only data      */
+                       *(.text)
+                       *(.fixup)
+                       *(.gnu.warning)
+                       *(.text.lock)   /* out-of-line lock text        */
+                       *(.rodata)
+                       *(.kstrtab)
+               . = ALIGN(16);          /* Exception table              */
+               __start___ex_table = .;
+                       *(__ex_table)
+               __stop___ex_table = .;
 
-  __bss_start = .;             /* BSS */
-  .bss : {
-       *(.bss)
+               __start___ksymtab = .;  /* Kernel symbol table          */
+                       *(__ksymtab)
+               __stop___ksymtab = .;
+
+               *(.got)                 /* Global offset table          */
+
+               _etext = .;             /* End of text section          */
        }
-  _end = . ;
-
-  /* Stabs debugging sections.  */
-  .stab 0 : { *(.stab) }
-  .stabstr 0 : { *(.stabstr) }
-  .stab.excl 0 : { *(.stab.excl) }
-  .stab.exclstr 0 : { *(.stab.exclstr) }
-  .stab.index 0 : { *(.stab.index) }
-  .stab.indexstr 0 : { *(.stab.indexstr) }
-  .comment 0 : { *(.comment) }
+
+       .data : {                       /* Data */
+               /*
+                * The cacheline aligned data
+                */
+               . = ALIGN(32);
+               *(.data.cacheline_aligned)
+
+               /*
+                * and the usual data section
+                */
+               *(.data)
+               CONSTRUCTORS
+
+               _edata = .;
+       }
+
+       .bss : {
+               __bss_start = .;        /* BSS                          */
+               *(.bss)
+               *(COMMON)
+               _end = . ;
+       }
+
+                                       /* Stabs debugging sections.  */
+       .stab 0 : { *(.stab) }
+       .stabstr 0 : { *(.stabstr) }
+       .stab.excl 0 : { *(.stab.excl) }
+       .stab.exclstr 0 : { *(.stab.exclstr) }
+       .stab.index 0 : { *(.stab.index) }
+       .stab.indexstr 0 : { *(.stab.indexstr) }
+       .comment 0 : { *(.comment) }
 }
index 060431bd8295d084198e9f93bd8b302bd4ef7af2..3843059bd99d3bfe00739c21b9eac2fd65a72b5b 100644 (file)
@@ -14,10 +14,23 @@ SECTIONS
                        *(.proc.info)
                __proc_info_end = .;
                        *(.data.init)
+               . = ALIGN(16);
+               __setup_start = .;
+                       *(.setup.init)
+               __setup_end = .;
+               __initcall_start = .;
+                       *(.initcall.init)
+               __initcall_end = .;
                . = ALIGN(4096);
                __init_end = .;
        }
 
+       /DISCARD/ : {                   /* Exit code and data           */
+               *(.text.exit)
+               *(.data.exit)
+               *(.exitcall.exit)
+       }
+
        __ebsa285_begin = .;
        .text.ebsa285 : { *(.text.ebsa285) }
        .data.ebsa285 : { *(.data.ebsa285) }
index 36d1f2f65b6086b1b3b7c20e975b57ad820b0c4f..ec85ca63897e6eaa719176c61dabe617761e5c81 100644 (file)
@@ -1257,8 +1257,8 @@ int get_cpuinfo(char * buffer)
                        if ( c->x86_capability & (1 << i) )
                                p += sprintf(p, " %s", x86_cap_flags[i]);
                p += sprintf(p, "\nbogomips\t: %lu.%02lu\n\n",
-                            (c->loops_per_jiffy+2500)/(500000/HZ),
-                            ((c->loops_per_jiffy+2500)/(5000/HZ)) % 100);
+                            c->loops_per_jiffy/(500000/HZ),
+                            (c->loops_per_jiffy/(5000/HZ)) % 100);
        }
        return p - buffer;
 }
index 1028b15d8872ecc05a3493f71006a1eb30cefec8..cbc09a5a5972196d7e71d6a793406b4a78fb90ac 100644 (file)
@@ -1600,8 +1600,8 @@ void __init smp_boot_cpus(void)
                }
                printk(KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n",
                        cpucount+1,
-                       (bogosum+2500)/(500000/HZ),
-                       ((bogosum+2500)/(5000/HZ))%100);
+                       bogosum/(500000/HZ),
+                       (bogosum/(5000/HZ))%100);
                SMP_PRINTK(("Before bogocount - setting activated=1.\n"));
                smp_activated=1;
                smp_num_cpus=cpucount+1;
@@ -1813,7 +1813,7 @@ static inline void send_IPI_single(int dest, int vector)
 void smp_flush_tlb(void)
 {
        int cpu = smp_processor_id();
-       int stuck;
+       long long stuck;
        unsigned long flags;
 
        /*
index b1433046f2d348343da218679091c8ff8158f25f..8cad4ba9359271e90f7ac2dbdfe9467520840ac8 100644 (file)
@@ -411,7 +411,7 @@ extern int slm_init( void );
  * 6), the timeout is based on the 'jiffies' variable to provide exact
  * timeouts for device probing etc.
  * If interrupts are disabled, the number of tries is based on the
- * 'loops_per_sec' variable. A rough estimation is sufficient here...
+ * 'loops_per_jiffy' variable. A rough estimation is sufficient here...
  */
 
 #define INT_LEVEL                                                                                                      \
@@ -429,7 +429,7 @@ int acsi_wait_for_IRQ( unsigned timeout )
                        if (!(mfp.par_dt_reg & 0x20)) return( 1 );
        }
        else {
-               long tries = loops_per_sec / HZ / 8 * timeout;
+               long tries = loops_per_jiffy / 8 * timeout;
                while( --tries >= 0 )
                        if (!(mfp.par_dt_reg & 0x20)) return( 1 );
        }               
@@ -446,7 +446,7 @@ int acsi_wait_for_noIRQ( unsigned timeout )
                        if (mfp.par_dt_reg & 0x20) return( 1 );
        }
        else {
-               long tries = loops_per_sec * timeout / HZ / 8;
+               long tries = loops_per_jiffy / 8 * timeout;
                while( tries-- >= 0 )
                        if (mfp.par_dt_reg & 0x20) return( 1 );
        }               
index 949e9dba0cc5cdf3c51d8689d30e51c44e1b7f17..2e32b34e622ac6112d8f55451635a1918fa5006f 100644 (file)
  *                         patch thanks to "Eddie C. Dost" <ecd@skynet.be>
  *
  * 4.50  Oct 19, 1998  -- New maintainers!
- *                         Jens Axboe <axboe@image.dk>
+ *                         Jens Axboe <axboe@suse.de>
  *                         Chris Zwilling <chris@cloudnet.com>
  *
- * 4.51  Dec 23, 1998  -- Jens Axboe <axboe@image.dk>
+ * 4.51  Dec 23, 1998  -- Jens Axboe <axboe@suse.de>
  *                      - ide_cdrom_reset enabled since the ide subsystem
- *                         handles resets fine now. <axboe@image.dk>
+ *                         handles resets fine now. <axboe@suse.de>
  *                      - Transfer size fix for Samsung CD-ROMs, thanks to
  *                        "Ville Hallik" <ville.hallik@mail.ee>.
  *                      - other minor stuff.
  *
- * 4.52  Jan 19, 1999  -- Jens Axboe <axboe@image.dk>
+ * 4.52  Jan 19, 1999  -- Jens Axboe <axboe@suse.de>
  *                      - Detect DVD-ROM/RAM drives
  *
  * 4.53  Feb 22, 1999   - Include other model Samsung and one Goldstar
@@ -1835,9 +1835,9 @@ static int cdrom_play_audio(ide_drive_t *drive, int lba_start, int lba_end)
        memset(&pc, 0, sizeof (pc));
        pc.sense = &sense;
 
-       pc.c[0] = GPCMD_PLAY_AUDIO_10;
-       put_unaligned(cpu_to_be32(lba_start), (unsigned int *) &pc.c[2]);
-       put_unaligned(cpu_to_be16(lba_end - lba_start), (unsigned int *) &pc.c[7]);
+       pc.c[0] = GPCMD_PLAY_AUDIO_MSF;
+       lba_to_msf(lba_start, &pc.c[3], &pc.c[4], &pc.c[5]);
+       lba_to_msf(lba_end-1, &pc.c[6], &pc.c[7], &pc.c[8]);
 
        return cdrom_queue_packet_command(drive, &pc);
 }
@@ -1944,14 +1944,15 @@ int ide_cdrom_audio_ioctl (struct cdrom_device_info *cdi,
 {
        ide_drive_t *drive = (ide_drive_t*) cdi->handle;
        struct cdrom_info *info = drive->driver_data;
+       int stat;
 
        switch (cmd) {
        /*
-        * emulate PLAY_AUDIO_TI command with PLAY_AUDIO_10, since
+        * emulate PLAY_AUDIO_TI command with PLAY_AUDIO_MSF, since
         * atapi doesn't support it
         */
        case CDROMPLAYTRKIND: {
-               int stat, lba_start, lba_end;
+               int lba_start, lba_end;
                struct cdrom_ti *ti = (struct cdrom_ti *)arg;
                struct atapi_toc_entry *first_toc, *last_toc;
 
@@ -1975,7 +1976,6 @@ int ide_cdrom_audio_ioctl (struct cdrom_device_info *cdi,
        }
 
        case CDROMREADTOCHDR: {
-               int stat;
                struct cdrom_tochdr *tochdr = (struct cdrom_tochdr *) arg;
                struct atapi_toc *toc;
 
@@ -1991,7 +1991,6 @@ int ide_cdrom_audio_ioctl (struct cdrom_device_info *cdi,
        }
 
        case CDROMREADTOCENTRY: {
-               int stat;
                struct cdrom_tocentry *tocentry = (struct cdrom_tocentry*) arg;
                struct atapi_toc_entry *toce;
 
index 25a6c5e056df5990962429d0f0c0409f395f5a84..d39af4f01666acbd732c9e69687755ca3edcd838 100644 (file)
@@ -653,7 +653,9 @@ __initfunc(void initrd_load(void))
 
 #define OF(args)  args
 
+#ifndef memzero
 #define memzero(s, n)     memset ((s), 0, (n))
+#endif
 
 
 typedef unsigned char  uch;
index 8739c152c78a44a9bcfef99a00655e276efdb524..0ae2740ebb1c5ad7ee10ab4c1652ee8d76deb366 100644 (file)
   Thanks to Grant R. Guenther <grant@torque.net> for spotting this bug.
   -- Made a few things more pedanticly correct.
 
-2.50 Oct 19, 1998 - Jens Axboe <axboe@image.dk>
+2.50 Oct 19, 1998 - Jens Axboe <axboe@suse.de>
   -- New maintainers! Erik was too busy to continue the work on the driver,
-  so now Chris Zwilling <chris@cloudnet.com> and Jens Axboe <axboe@image.dk>
+  so now Chris Zwilling <chris@cloudnet.com> and Jens Axboe <axboe@suse.de>
   will do their best to follow in his footsteps
   
-  2.51 Dec 20, 1998 - Jens Axboe <axboe@image.dk>
+  2.51 Dec 20, 1998 - Jens Axboe <axboe@suse.de>
   -- Check if drive is capable of doing what we ask before blindly changing
   cdi->options in various ioctl.
   -- Added version to proc entry.
   
-  2.52 Jan 16, 1999 - Jens Axboe <axboe@image.dk>
+  2.52 Jan 16, 1999 - Jens Axboe <axboe@suse.de>
   -- Fixed an error in open_for_data where we would sometimes not return
   the correct error value. Thanks Huba Gaspar <huba@softcell.hu>.
   -- Fixed module usage count - usage was based on /proc/sys/dev
   dev would be removed even though it was used. cdrom.c just illuminated
   that bug.
   
-  2.53 Feb 22, 1999 - Jens Axboe <axboe@image.dk>
+  2.53 Feb 22, 1999 - Jens Axboe <axboe@suse.de>
   -- Fixup of several ioctl calls, in particular CDROM_SET_OPTIONS has
   been "rewritten" because capabilities and options aren't in sync. They
   should be...
   -- Added CDROM_GET_CAPABILITY ioctl. This relieves userspace programs
   from parsing /proc/sys/dev/cdrom/info.
   
-  2.54 Mar 15, 1999 - Jens Axboe <axboe@image.dk>
+  2.54 Mar 15, 1999 - Jens Axboe <axboe@suse.de>
   -- Check capability mask from low level driver when counting tracks as
   per suggestion from Corey J. Scotts <cstotts@blue.weeg.uiowa.edu>.
   
-  2.55 Apr 25, 1999 - Jens Axboe <axboe@image.dk>
+  2.55 Apr 25, 1999 - Jens Axboe <axboe@suse.de>
   -- autoclose was mistakenly checked against CDC_OPEN_TRAY instead of
   CDC_CLOSE_TRAY.
   -- proc info didn't mask against capabilities mask.
   
-  3.00 Aug 5, 1999 - Jens Axboe <axboe@image.dk>
+  3.00 Aug 5, 1999 - Jens Axboe <axboe@suse.de>
   -- Unified audio ioctl handling across CD-ROM drivers. A lot of the
   code was duplicated before. Drives that support the generic packet
   interface are now being fed packets from here instead.
   -- CDROM_SEND_PACKET ioctl added. The infrastructure was in place for
   doing this anyway, with the generic_packet addition.
   
-  3.01 Aug 6, 1999 - Jens Axboe <axboe@image.dk>
+  3.01 Aug 6, 1999 - Jens Axboe <axboe@suse.de>
   -- Fix up the sysctl handling so that the option flags get set
   correctly.
   -- Fix up ioctl handling so the device specific ones actually get
   called :).
   
-  3.02 Aug 8, 1999 - Jens Axboe <axboe@image.dk>
+  3.02 Aug 8, 1999 - Jens Axboe <axboe@suse.de>
   -- Fixed volume control on SCSI drives (or others with longer audio
   page).
   -- Fixed a couple of DVD minors. Thanks to Andrew T. Veliath
   DVD patches for ide-cd and while I rearranged and unified them, the
   interface is still the same.
   
-  3.03 Sep 1, 1999 - Jens Axboe <axboe@image.dk>
+  3.03 Sep 1, 1999 - Jens Axboe <axboe@suse.de>
   -- Moved the rest of the audio ioctls from the CD-ROM drivers here. Only
   CDROMREADTOCENTRY and CDROMREADTOCHDR are left.
   -- Moved the CDROMREADxxx ioctls in here.
   drivers are updated as well.
   -- Various other cleanups.
 
-  3.04 Sep 12, 1999 - Jens Axboe <axboe@image.dk>
+  3.04 Sep 12, 1999 - Jens Axboe <axboe@suse.de>
   -- Fixed a couple of possible memory leaks (if an operation failed and
   we didn't free the buffer before returning the error).
   -- Integrated Uniform CD Changer handling from Richard Sharman
   -- Export cdrom_mode_sense and cdrom_mode_select.
   -- init_cdrom_command() for setting up a cgc command.
   
-  3.05 Oct 24, 1999 - Jens Axboe <axboe@image.dk>
+  3.05 Oct 24, 1999 - Jens Axboe <axboe@suse.de>
   -- Changed the interface for CDROM_SEND_PACKET. Before it was virtually
   impossible to send the drive data in a sensible way.
   -- Lowered stack usage in mmc_ioctl(), dvd_read_disckey(), and
   -- Fixed CDDA ripping with cdda2wav - accept much larger requests of
   number of frames and split the reads in blocks of 8.
 
-  3.06 Dec 13, 1999 - Jens Axboe <axboe@image.dk>
+  3.06 Dec 13, 1999 - Jens Axboe <axboe@suse.de>
   -- Added support for changing the region of DVD drives.
   -- Added sense data to generic command.
 
@@ -1107,6 +1107,7 @@ static int dvd_do_auth(struct cdrom_device_info *cdi, dvd_authinfo *ai)
                setup_report_key(&cgc, 0, 8);
                memset(&rpc_state, 0, sizeof(rpc_state_t));
                cgc.buffer = (char *) &rpc_state;
+               cgc.buffer = (char *) &rpc_state;
 
                if ((ret = cdo->generic_packet(cdi, &cgc)))
                        return ret;
@@ -2553,6 +2554,7 @@ static struct ctl_table_header *cdrom_sysctl_header;
  * Note: only the top-level directory needs to do this; if
  * a lower level is referenced, the parent will be as well.
  */
+#ifdef CONFIG_PROC_FS
 static void cdrom_procfs_modcount(struct inode *inode, int fill)
 {
        if (fill) {
@@ -2561,6 +2563,7 @@ static void cdrom_procfs_modcount(struct inode *inode, int fill)
                MOD_DEC_USE_COUNT;
        }
 }
+#endif
 
 static void cdrom_sysctl_register(void)
 {
@@ -2570,7 +2573,9 @@ static void cdrom_sysctl_register(void)
                return;
 
        cdrom_sysctl_header = register_sysctl_table(cdrom_root_table, 1);
+#ifdef CONFIG_PROC_FS
        cdrom_root_table->child->de->fill_inode = &cdrom_procfs_modcount;
+#endif
 
        /* set the defaults */
        cdrom_sysctl_settings.autoclose = autoclose;
index 9ff09f5811073a8bf65d4e21f2ed42171eb6a468..b60aec8d752376eb24ff13c33bb1badd0f781778 100644 (file)
@@ -61,7 +61,7 @@
 #include <linux/mm.h>          /* for verify_area */
 #include <linux/errno.h>       /* for -EBUSY */
 #include <linux/ioport.h>      /* for check_region, request_region */
-#include <linux/delay.h>       /* for loops_per_sec */
+#include <linux/delay.h>       /* for loops_per_jiffy */
 #include <asm/segment.h>       /* for put_user_byte */
 #include <asm/io.h>            /* for inb_p, outb_p, inb, outb, etc. */
 #include <asm/uaccess.h>       /* for get_user, etc. */
index 4d036539a7f566a59aad1610e49f0570a1ee2cd5..581fd781fcce5cb0487c7f555b85920f660bd5c1 100644 (file)
@@ -1825,8 +1825,8 @@ int pc_init(void)
        /* --------------------------------------------------------------------- 
           loops_per_sec hasn't been set at this point :-(, so fake it out... 
           I set it, so that I can use the __delay() function.
-           
-          Yes it is nowdays
+          
+          We don't use __delay(), so we don't need to fake it.
           
        ------------------------------------------------------------------------ */
 
index 3853ce1840ef45e7442b90502607a885abea4eae..2da87e63b96c9a676f720e96c87db70f82185670 100644 (file)
@@ -617,7 +617,7 @@ static int irq_probe_ECP(struct parport *pb)
 
        sti();
        irqs = probe_irq_on();
-               
+
        parport_pc_write_econtrol(pb, 0x00);    /* Reset FIFO */
        parport_pc_write_econtrol(pb, 0xd0);    /* TEST FIFO + nErrIntrEn */
 
@@ -948,6 +948,7 @@ static int parport_pc_init_pci (int irq, int dma)
                }
        }
 
+#ifdef CONFIG_PCI
        /* Look for parallel controllers that we don't know about. */
        for (pcidev = pci_devices; pcidev; pcidev = pcidev->next) {
                const int class_noprogif = pcidev->class & ~0xff;
@@ -968,6 +969,7 @@ static int parport_pc_init_pci (int irq, int dma)
                        "tim@cyberelk.demon.co.uk\n",
                        pcidev->vendor, pcidev->device);
        }
+#endif
 
        return count;
 }
index 4e0f00318311cd8072113838675ce0b5b963ba93..92f1dbd59b85c59c3115e5cfdca72ac3a5709158 100644 (file)
@@ -38,35 +38,29 @@ static unsigned int net_debug = NET_DEBUG;
 static void
 am79c961_setmulticastlist (struct device *dev);
 
-static char *version = "am79c961 ethernet driver (c) 1995 R.M.King v0.00\n";
-
-#define FUNC_PROLOGUE \
-       struct dev_priv *priv = (struct dev_priv *)dev->priv
+static char *version = "am79c961 ethernet driver (c) 1995 R.M.King v0.01\n";
 
 /* --------------------------------------------------------------------------- */
 
+#ifdef __arm__
 static void
 write_rreg (unsigned long base, unsigned int reg, unsigned short val)
 {
-       __asm__("
-               strh    %1, [%2]        @ NET_RAP
-               strh    %0, [%2, #-4]   @ NET_RDP
+       __asm__("str%?h %1, [%2]        @ NET_RAP
+               str%?h  %0, [%2, #-4]   @ NET_RDP
                " : : "r" (val), "r" (reg), "r" (0xf0000464));
 }
 
 static inline void
 write_ireg (unsigned long base, unsigned int reg, unsigned short val)
 {
-       __asm__("
-               strh    %1, [%2]        @ NET_RAP
-               strh    %0, [%2, #8]    @ NET_RDP
+       __asm__("str%?h %1, [%2]        @ NET_RAP
+               str%?h  %0, [%2, #8]    @ NET_RDP
                " : : "r" (val), "r" (reg), "r" (0xf0000464));
 }
 
 #define am_writeword(dev,off,val)\
-       __asm__("\
-               strh    %0, [%1]\
-               " : : "r" ((val) & 0xffff), "r" (0xe0000000 + ((off) << 1)));
+       __asm__("str%?h %0, [%1]" : : "r" ((val) & 0xffff), "r" (0xe0000000 + ((off) << 1)));
 
 static inline void
 am_writebuffer(struct device *dev, unsigned int offset, unsigned char *buf, unsigned int length)
@@ -74,30 +68,28 @@ am_writebuffer(struct device *dev, unsigned int offset, unsigned char *buf, unsi
        offset = 0xe0000000 + (offset << 1);
        length = (length + 1) & ~1;
        if ((int)buf & 2) {
-               __asm__ __volatile__("
-                       strh    %2, [%0], #4
-               " : "=&r" (offset) : "0" (offset), "r" (buf[0] | (buf[1] << 8)));
+               __asm__ __volatile__("str%?h    %2, [%0], #4"
+                : "=&r" (offset) : "0" (offset), "r" (buf[0] | (buf[1] << 8)));
                buf += 2;
                length -= 2;
        }
        while (length > 8) {
                unsigned int tmp, tmp2;
                __asm__ __volatile__("
-                       ldmia   %1!, {%2, %3}
-                       strh    %2, [%0], #4
-                       mov     %2, %2, lsr #16
-                       strh    %2, [%0], #4
-                       strh    %3, [%0], #4
-                       mov     %3, %3, lsr #16
-                       strh    %3, [%0], #4
-               " : "=&r" (offset), "=&r" (buf), "=r" (tmp), "=r" (tmp2)
+                       ldm%?ia %1!, {%2, %3}
+                       str%?h  %2, [%0], #4
+                       mov%?   %2, %2, lsr #16
+                       str%?h  %2, [%0], #4
+                       str%?h  %3, [%0], #4
+                       mov%?   %3, %3, lsr #16
+                       str%?h  %3, [%0], #4
+               " : "=&r" (offset), "=&r" (buf), "=&r" (tmp), "=&r" (tmp2)
                  : "0" (offset), "1" (buf));
                length -= 8;
        }
        while (length > 0) {
-               __asm__ __volatile__("
-                       strh    %2, [%0], #4
-               " : "=&r" (offset) : "0" (offset), "r" (buf[0] | (buf[1] << 8)));
+               __asm__ __volatile__("str%?h    %2, [%0], #4"
+                : "=&r" (offset) : "0" (offset), "r" (buf[0] | (buf[1] << 8)));
                buf += 2;
                length -= 2;
        }
@@ -107,9 +99,8 @@ static inline unsigned short
 read_rreg (unsigned int base_addr, unsigned int reg)
 {
        unsigned short v;
-       __asm__("
-               strh    %1, [%2]        @ NET_RAP
-               ldrh    %0, [%2, #-4]   @ NET_IDP
+       __asm__("str%?h %1, [%2]        @ NET_RAP
+               ldr%?h  %0, [%2, #-4]   @ NET_IDP
                " : "=r" (v): "r" (reg), "r" (0xf0000464));
        return v;
 }
@@ -120,9 +111,7 @@ am_readword (struct device *dev, unsigned long off)
        unsigned long address = 0xe0000000 + (off << 1);
        unsigned short val;
 
-       __asm__("
-               ldrh    %0, [%1]
-               " : "=r" (val): "r" (address));
+       __asm__("ldr%?h %0, [%1]" : "=r" (val): "r" (address));
        return val;
 }
 
@@ -134,38 +123,41 @@ am_readbuffer(struct device *dev, unsigned int offset, unsigned char *buf, unsig
        if ((int)buf & 2) {
                unsigned int tmp;
                __asm__ __volatile__("
-                       ldrh    %2, [%0], #4
-                       strb    %2, [%1], #1
-                       mov     %2, %2, lsr #8
-                       strb    %2, [%1], #1
+                       ldr%?h  %2, [%0], #4
+                       str%?b  %2, [%1], #1
+                       mov%?   %2, %2, lsr #8
+                       str%?b  %2, [%1], #1
                " : "=&r" (offset), "=&r" (buf), "=r" (tmp): "0" (offset), "1" (buf));
                length -= 2;
        }
        while (length > 8) {
                unsigned int tmp, tmp2, tmp3;
                __asm__ __volatile__("
-                       ldrh    %2, [%0], #4
-                       ldrh    %3, [%0], #4
-                       orr     %2, %2, %3, lsl #16
-                       ldrh    %3, [%0], #4
-                       ldrh    %4, [%0], #4
-                       orr     %3, %3, %4, lsl #16
-                       stmia   %1!, {%2, %3}
-               " : "=&r" (offset), "=&r" (buf), "=r" (tmp), "=r" (tmp2), "=r" (tmp3)
+                       ldr%?h  %2, [%0], #4
+                       ldr%?h  %3, [%0], #4
+                       orr%?   %2, %2, %3, lsl #16
+                       ldr%?h  %3, [%0], #4
+                       ldr%?h  %4, [%0], #4
+                       orr%?   %3, %3, %4, lsl #16
+                       stm%?ia %1!, {%2, %3}
+               " : "=&r" (offset), "=&r" (buf), "=&r" (tmp), "=&r" (tmp2), "=&r" (tmp3)
                  : "0" (offset), "1" (buf));
                length -= 8;
        }
        while (length > 0) {
                unsigned int tmp;
                __asm__ __volatile__("
-                       ldrh    %2, [%0], #4
-                       strb    %2, [%1], #1
-                       mov     %2, %2, lsr #8
-                       strb    %2, [%1], #1
+                       ldr%?h  %2, [%0], #4
+                       str%?b  %2, [%1], #1
+                       mov%?   %2, %2, lsr #8
+                       str%?b  %2, [%1], #1
                " : "=&r" (offset), "=&r" (buf), "=r" (tmp) : "0" (offset), "1" (buf));
                length -= 2;
        }
 }
+#else
+#error Not compatable
+#endif
 
 static int
 am79c961_ramtest(struct device *dev, unsigned int val)
@@ -259,7 +251,7 @@ am79c961_init_for_open(struct device *dev)
        write_rreg (dev->base_addr, SIZERXR, -RX_BUFFERS);
        write_rreg (dev->base_addr, SIZETXR, -TX_BUFFERS);
        write_rreg (dev->base_addr, CSR0, CSR0_STOP);
-       write_rreg (dev->base_addr, CSR3, CSR3_IDONM|CSR3_BABLM);
+       write_rreg (dev->base_addr, CSR3, CSR3_IDONM|CSR3_BABLM|CSR3_DXSUFLO);
        write_rreg (dev->base_addr, CSR0, CSR0_IENA|CSR0_STRT);
 }
 
@@ -304,7 +296,7 @@ am79c961_probe1(struct device *dev)
        /*
         * The PNP initialisation should have been done by the ether bootp loader.
         */
-       inb ((dev->base_addr + NET_RESET) >> 1);        /* reset the device */
+       inb((dev->base_addr + NET_RESET) >> 1); /* reset the device */
 
        udelay (5);
 
@@ -420,26 +412,105 @@ static struct enet_statistics *am79c961_getstats (struct device *dev)
        return &priv->stats;
 }
 
+static inline u32 update_crc(u32 crc, u8 byte)
+{
+       int i;
+
+       for (i = 8; i != 0; i--) {
+               byte ^= crc & 1;
+               crc >>= 1;
+
+               if (byte & 1)
+                       crc ^= 0xedb88320;
+
+               byte >>= 1;
+       }
+
+       return crc;
+}
+
+static void am79c961_mc_hash(struct dev_mc_list *dmi, unsigned short *hash)
+{
+       if (dmi->dmi_addrlen == ETH_ALEN && dmi->dmi_addr[0] & 0x01) {
+               int i, idx, bit;
+               u32 crc;
+
+               crc = 0xffffffff;
+
+               for (i = 0; i < ETH_ALEN; i++)
+                       crc = update_crc(crc, dmi->dmi_addr[i]);
+
+               idx = crc >> 30;
+               bit = (crc >> 26) & 15;
+
+               hash[idx] |= 1 << bit;
+       }
+}
+
 /*
  * Set or clear promiscuous/multicast mode filter for this adaptor.
- *
- * We don't attempt any packet filtering.  The card may have a SEEQ 8004
- * in which does not have the other ethernet address registers present...
+ * We don't attempt any packet filtering.
  */
 static void am79c961_setmulticastlist (struct device *dev)
 {
        unsigned long flags;
-       int i;
+       unsigned short multi_hash[4], mode;
+       int i, stopped;
 
-       dev->flags &= ~IFF_ALLMULTI;
+       mode = MODE_PORT0;
 
-       i = MODE_PORT0;
-       if (dev->flags & IFF_PROMISC)
-               i |= MODE_PROMISC;
+       if (dev->flags & IFF_PROMISC) {
+               mode |= MODE_PROMISC;
+       } else if (dev->flags & IFF_ALLMULTI) {
+               memset(multi_hash, 0xff, sizeof(multi_hash));
+       } else {
+               struct dev_mc_list *dmi;
 
-       save_flags_cli (flags);
-       write_rreg (dev->base_addr, MODE, i);
-       restore_flags (flags);
+               memset(multi_hash, 0x00, sizeof(multi_hash));
+
+               for (dmi = dev->mc_list; dmi; dmi = dmi->next)
+                       am79c961_mc_hash(dmi, multi_hash);
+       }
+
+       save_flags_cli(flags);
+
+       stopped = read_rreg(dev->base_addr, CSR0) & CSR0_STOP;
+
+       if (!stopped) {
+               /*
+                * Put the chip into suspend mode
+                */
+               write_rreg(dev->base_addr, CTRL1, CTRL1_SPND);
+
+               /*
+                * Spin waiting for chip to report suspend mode
+                */
+               while ((read_rreg(dev->base_addr, CTRL1) & CTRL1_SPND) == 0) {
+                       restore_flags(flags);
+                       nop();
+                       save_flags_cli(flags);
+               }
+       }
+
+       /*
+        * Update the multicast hash table
+        */
+       for (i = 0; i < sizeof(multi_hash) / sizeof(multi_hash[0]); i++)
+               write_rreg(dev->base_addr, i + LADRL, multi_hash[i]);
+
+       /*
+        * Write the mode register
+        */
+       write_rreg(dev->base_addr, MODE, mode);
+
+       if (!stopped) {
+               /*
+                * Put the chip back into running mode
+                */
+               write_rreg(dev->base_addr, CTRL1, 0);
+       }
+
+       restore_flags(flags);
 }
 
 /*
@@ -455,17 +526,20 @@ again:
                if (!test_and_set_bit(0, (void*)&dev->tbusy)) {
                        unsigned int length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN;
                        unsigned int hdraddr, bufaddr;
+                       unsigned int head;
                        unsigned long flags;
 
-                       hdraddr = priv->txhdr + (priv->txhead << 3);
-                       bufaddr = priv->txbuffer[priv->txhead];
-                       priv->txhead ++;
-                       if (priv->txhead >= TX_BUFFERS)
-                               priv->txhead = 0;
+                       head = priv->txhead;
+                       hdraddr = priv->txhdr + (head << 3);
+                       bufaddr = priv->txbuffer[head];
+                       head += 1;
+                       if (head >= TX_BUFFERS)
+                               head = 0;
 
                        am_writebuffer (dev, bufaddr, skb->data, length);
                        am_writeword (dev, hdraddr + 4, -length);
                        am_writeword (dev, hdraddr + 2, TMD_OWN|TMD_STP|TMD_ENP);
+                       priv->txhead = head;
 
                        save_flags_cli (flags);
                        write_rreg (dev->base_addr, CSR0, CSR0_TDMD|CSR0_IENA);
@@ -483,10 +557,14 @@ again:
                int tickssofar = jiffies - dev->trans_start;
                if (tickssofar < 5)
                        return 1;
-               printk (KERN_WARNING "%s: transmit timed out, network cable problem?\n", dev->name);
+               printk(KERN_WARNING "%s: transmit timed out, network cable problem?\n", dev->name);
                /* Try to restart the adaptor. */
+               disable_irq(dev->irq);
+               am79c961_init(dev);
+               am79c961_init_for_open(dev);
                dev->tbusy = 0;
                dev->trans_start = jiffies;
+               enable_irq(dev->irq);
                goto again;
        }
 }
@@ -613,7 +691,7 @@ am79c961_tx(struct device *dev, struct dev_priv *priv)
                        am_writeword (dev, hdraddr + 6, 0);
 
                        if (status2 & TST_RTRY)
-                               priv->stats.collisions += 1;
+                               priv->stats.collisions += 16;
                        if (status2 & TST_LCOL)
                                priv->stats.tx_window_errors ++;
                        if (status2 & TST_LCAR)
index 4c15f8a8a46ac5730a0f453ddb6086b1a049c157..a29bf12fa0b2d1b8ad928b640f8a7f7a00b0e887 100644 (file)
@@ -45,6 +45,7 @@
 #define CSR3_EMBA      0x0008
 #define CSR3_DXMT2PD   0x0010
 #define CSR3_LAPPEN    0x0020
+#define CSR3_DXSUFLO   0x0040
 #define CSR3_IDONM     0x0100
 #define CSR3_TINTM     0x0200
 #define CSR3_RINTM     0x0400
@@ -53,6 +54,9 @@
 #define CSR3_BABLM     0x4000
 #define CSR3_MASKALL   0x5F00
 
+#define CTRL1          5
+#define CTRL1_SPND     0x0001
+
 #define LADRL          8
 #define LADRM1         9
 #define LADRM2         10
 #define TMD_ERR                0x4000
 #define TMD_OWN                0x8000
 
-#define TST_RTRY       0x0200
-#define TST_LCAR       0x0400
+#define TST_RTRY       0x0400
+#define TST_LCAR       0x0800
 #define TST_LCOL       0x1000
 #define TST_UFLO       0x4000
 
index 09cc7c02199f34ec6bf8ab300728eccd75cdf0a9..dabab8c626f3cc2d19e24297130302c64dab1274 100644 (file)
@@ -2242,7 +2242,7 @@ static void reset_ichip(struct fc_info *fi)
        /* (i)chip reset */
        writel(ICHIP_HCR_RESET, fi->i_r.ptr_ichip_hw_control_reg);
        /*wait for chip to get reset */
-       udelay(10000);
+       mdelay(10);
        /*de-assert reset */
        writel(ICHIP_HCR_DERESET, fi->i_r.ptr_ichip_hw_control_reg);
        
@@ -3884,7 +3884,7 @@ struct pci_dev *pdev = NULL;
        /* This is to make sure that the ACC to the PRLI comes in 
         * for the last ALPA. 
         */
-       udelay(1000000); /* Ugly! Let the Gods forgive me */
+       mdelay(1000); /* Ugly! Let the Gods forgive me */
 
        DPRINTK1("leaving iph5526_detect\n");
        return no_of_hosts;
index 21014e150d76fdc23229eeb96825abb68c9b9600..c0567fffb6b42eaa9f202e5a777d5ba1bec7fd76 100644 (file)
@@ -344,6 +344,8 @@ static struct pci_id_info pci_tbl[] __initdata = {
        0x11AD, 0xc115, 0xffff, PCI_ADDR0_IO, 256, 32, tulip_probe1 },
   { "ADMtek AN981 Comet",
        0x1317, 0x0981, 0xffff, PCI_ADDR0_IO, 256, 32, tulip_probe1 },
+  { "ADMtek AN985 Comet",
+       0x1317, 0x0981, 0xffff, PCI_ADDR0_IO, 256, 32, tulip_probe1 },
   { "Compex RL100-TX",
        0x11F6, 0x9881, 0xffff, PCI_ADDR0_IO, 128, 32, tulip_probe1 },
   { "Intel 21145 Tulip",
index c8ee6dd46279b2d43d9bbcf1046fb72868c77b67..c439b2308db3f1dbc34668b819d8621303573c37 100644 (file)
@@ -406,8 +406,6 @@ struct proc_dir_entry proc_scsi_aha152x =
 
 /* END OF DEFINES */
 
-extern long loops_per_sec;
-
 #define DELAY_DEFAULT 100
 
 /* some additional "phases" for getphase() */
index 2680228a411e396c769c3904f3208dbf1205ffaa..bfc5bf4f4df1c2568d509d08baf97414c418ac2a 100644 (file)
@@ -83,7 +83,9 @@
 #define CPQFCTS_CMD_PER_LUN 15 // power of 2 -1, must be >0 
 #define CPQFCTS_REQ_QUEUE_LEN (TACH_SEST_LEN/2) // must be < TACH_SEST_LEN
 
+#ifndef LinuxVersionCode
 #define LinuxVersionCode(v, p, s) (((v)<<16)+((p)<<8)+(s))
+#endif
 #ifndef DECLARE_MUTEX_LOCKED
 #define DECLARE_MUTEX_LOCKED(sem) struct semaphore sem = MUTEX_LOCKED
 #endif
@@ -104,8 +106,25 @@ typedef struct
                             // the fields shared with ODB
                             // need to have same value
 
+// Queues for TachLite not in original Tachyon
+// ERQ       - Exchange Request Queue (for outbound commands)
+// SFQ       - Single Frame Queue (for incoming frames)
+
+                            // Define Tachyon Outbound Command Que
+                            // (Since many Tachyon registers are Read
+                            // only, maintain copies for debugging)
+                            // most Tach ques need power-of-2 sizes,
+                            // where registers are loaded with po2 -1
+#define TACH_SEST_LEN 512   // TachLite SEST
+
+#define ELS_EXCHANGES 64    // e.g. PLOGI, RSCN, ...
+// define the total number of outstanding (simultaneous) exchanges
+#define TACH_MAX_XID (TACH_SEST_LEN + ELS_EXCHANGES)  // ELS exchanges
+
+#define ERQ_LEN 128         // power of 2, max 4096
 
 
+#ifndef HOSTS_C
 
 #ifndef BYTE
 //typedef UCHAR BYTE;
@@ -307,22 +326,6 @@ typedef struct              // each entry 8 words (32 bytes)
 } TachyonIMQE;
 
 
-// Queues for TachLite not in original Tachyon
-// ERQ       - Exchange Request Queue (for outbound commands)
-// SFQ       - Single Frame Queue (for incoming frames)
-
-                            // Define Tachyon Outbound Command Que
-                            // (Since many Tachyon registers are Read
-                            // only, maintain copies for debugging)
-                            // most Tach ques need power-of-2 sizes,
-                            // where registers are loaded with po2 -1
-#define TACH_SEST_LEN 512   // TachLite SEST
-
-#define ELS_EXCHANGES 64    // e.g. PLOGI, RSCN, ...
-// define the total number of outstanding (simultaneous) exchanges
-#define TACH_MAX_XID (TACH_SEST_LEN + ELS_EXCHANGES)  // ELS exchanges
-
-#define ERQ_LEN 128         // power of 2, max 4096
 
 // Inbound Message Queue structures...
 #define IMQ_LEN 512              // minimum 4 entries [(power of 2) - 1]
@@ -1489,6 +1492,6 @@ typedef struct {
 #define BA_SEQUENCE_ABORTED    0x00000500
 
 
-
+#endif
 #endif /* CPQFCTSSTRUCTS_H     */
 
index 2dacce3c8d247279e80b6a20d70b8b21a624ff41..91bc0e88955db09451aa617bfa4a2dda089e27cf 100644 (file)
@@ -20,7 +20,7 @@
  *          Modified by Gerd Knorr <kraxel@cs.tu-berlin.de> to support the
  *          generic cdrom interface
  *
- *       Modified by Jens Axboe <axboe@image.dk> - Uniform sr_packet()
+ *       Modified by Jens Axboe <axboe@suse.de> - Uniform sr_packet()
  *       interface, capabilities probe additions, ioctl cleanups, etc.
  *
  *     Modified by Jens Axboe <axboe@suse.de> - support DVD-RAM
index 643aac4ef93c242009e2c83fbf3e5b5940dce30e..c23c1d44259ce968e7b587b757ddce147f67a594 100644 (file)
@@ -122,7 +122,7 @@ pas2-objs   := pas2_card.o pas2_midi.o pas2_mixer.o pas2_pcm.o
 sb-objs                := sb_audio.o sb_card.o sb_common.o sb_midi.o sb_mixer.o        \
                           sb_ess.o
 softoss2-objs  := softoss.o softoss_rs.o
-vidc_mod-objs  := vidc.o vidc_audio.o vidc_fill.o vidc_mixer.o vidc_synth.o
+vidc_mod-objs  := vidc.o vidc_fill.o vidc_synth.o
 wavefront-objs  := wavfront.o wf_midi.o yss225.o
 nm256-objs     := nm256_audio.o ac97.o
 via82cxxx-objs  := via82cxxx_audio.o ac97.o
index 36a4eafb1c42548e934d662fc0d5459cfcc192f7..c5e70cb5bb1fd970808b56f02c50cfda38d89009 100644 (file)
 /*
- *     drivers/sound/vidc.c
+ * drivers/sound/vidc.c
  *
- *     Detection routine for the VIDC.
+ * VIDC20 audio driver.
  *
- *     Copyright (C) 1997 by Russell King <rmk@arm.uk.linux.org>
+ * Copyright (C) 1997-2000 by Russell King <rmk@arm.linux.org.uk>
+ *
+ * The VIDC20 sound hardware consists of the VIDC20 itself, a DAC and a DMA
+ * engine.  The DMA transfers fixed-format (16-bit little-endian linear)
+ * samples to the VIDC20, which then transfers this data serially to the
+ * DACs.  The samplerate is controlled by the VIDC.
+ *
+ * We currently support a mixer device, but it is currently non-functional.
  */
 
 #include <linux/module.h>
 #include <linux/kernel.h>
 
-#include <asm/io.h>
+#include <asm/hardware.h>
 #include <asm/dma.h>
+#include <asm/io.h>
+#include <asm/iomd.h>
+#include <asm/system.h>
+
 #include "sound_config.h"
 #include "soundmodule.h"
 #include "vidc.h"
 
-int vidc_busy;
+#ifndef _SIOC_TYPE
+#define _SIOC_TYPE(x)  _IOC_TYPE(x)
+#endif
+#ifndef _SIOC_NR
+#define _SIOC_NR(x)    _IOC_NR(x)
+#endif
 
-void vidc_update_filler(int format, int channels)
+#define VIDC_SOUND_CLOCK       (250000)
+
+/*
+ * When using SERIAL SOUND mode (external DAC), the number of physical
+ * channels is fixed at 2.
+ */
+static int             vidc_busy;
+static int             vidc_adev;
+static int             vidc_audio_rate;
+static char            vidc_audio_format;
+static char            vidc_audio_channels;
+
+static unsigned char   vidc_level_l[SOUND_MIXER_NRDEVICES] = {
+       85,             /* master       */
+       50,             /* bass         */
+       50,             /* treble       */
+       0,              /* synth        */
+       75,             /* pcm          */
+       0,              /* speaker      */
+       100,            /* ext line     */
+       0,              /* mic          */
+       100,            /* CD           */
+       0,
+};
+
+static unsigned char   vidc_level_r[SOUND_MIXER_NRDEVICES] = {
+       85,             /* master       */
+       50,             /* bass         */
+       50,             /* treble       */
+       0,              /* synth        */
+       75,             /* pcm          */
+       0,              /* speaker      */
+       100,            /* ext line     */
+       0,              /* mic          */
+       100,            /* CD           */
+       0,
+};
+
+static unsigned int    vidc_audio_volume_l;    /* left PCM vol, 0 - 65536 */
+static unsigned int    vidc_audio_volume_r;    /* right PCM vol, 0 - 65536 */
+
+static void    (*old_mksound)(unsigned int hz, unsigned int ticks);
+extern void    (*kd_mksound)(unsigned int hz, unsigned int ticks);
+extern void    vidc_update_filler(int bits, int channels);
+
+static void
+vidc_mksound(unsigned int hz, unsigned int ticks)
+{
+
+}
+
+static void
+vidc_mixer_set(int mdev, unsigned int level)
+{
+       unsigned int lev_l = level & 0x007f;
+       unsigned int lev_r = (level & 0x7f00) >> 8;
+       unsigned int mlev_l, mlev_r;
+
+       if (lev_l > 100)
+               lev_l = 100;
+       if (lev_r > 100)
+               lev_r = 100;
+
+#define SCALE(lev,master)      ((lev) * (master) * 65536 / 10000)
+
+       mlev_l = vidc_level_l[SOUND_MIXER_VOLUME];
+       mlev_r = vidc_level_r[SOUND_MIXER_VOLUME];
+
+       switch (mdev) {
+       case SOUND_MIXER_VOLUME:
+       case SOUND_MIXER_PCM:
+               vidc_level_l[mdev] = lev_l;
+               vidc_level_r[mdev] = lev_r;
+
+               vidc_audio_volume_l = SCALE(lev_l, mlev_l);
+               vidc_audio_volume_r = SCALE(lev_r, mlev_r);
+
+               break;
+       }
+#undef SCALE
+}
+
+static int vidc_mixer_ioctl(int dev, unsigned int cmd, caddr_t arg)
+{
+       unsigned int val;
+       unsigned int mdev;
+
+       if (_SIOC_TYPE(cmd) != 'M')
+               return -EINVAL;
+
+       mdev = _SIOC_NR(cmd);
+
+       if (_SIOC_DIR(cmd) & _SIOC_WRITE) {
+               if (get_user(val, (unsigned int *)arg))
+                       return -EFAULT;
+
+               if (mdev < SOUND_MIXER_NRDEVICES)
+                       vidc_mixer_set(mdev, val);
+               else
+                       return -EINVAL;
+       }
+
+       /*
+        * Return parameters
+        */
+       switch (mdev) {
+       case SOUND_MIXER_RECSRC:
+               val = 0;
+               break;
+
+       case SOUND_MIXER_DEVMASK:
+               val = SOUND_MASK_VOLUME | SOUND_MASK_PCM | SOUND_MASK_SYNTH;
+               break;
+
+       case SOUND_MIXER_STEREODEVS:
+               val = SOUND_MASK_VOLUME | SOUND_MASK_PCM | SOUND_MASK_SYNTH;
+               break;
+
+       case SOUND_MIXER_RECMASK:
+               val = 0;
+               break;
+
+       case SOUND_MIXER_CAPS:
+               val = 0;
+               break;
+
+       default:
+               if (mdev < SOUND_MIXER_NRDEVICES)
+                       val = vidc_level_l[mdev] | vidc_level_r[mdev] << 8;
+               else
+                       return -EINVAL;
+       }
+
+       return put_user(val, (unsigned int *)arg) ? -EFAULT : 0;
+}
+
+static struct mixer_operations vidc_mixer_operations = {
+       "VIDC",
+       "VIDCsound",
+       vidc_mixer_ioctl        /* ioctl                */
+};
+
+static unsigned int vidc_audio_set_format(int dev, unsigned int fmt)
+{
+       switch (fmt) {
+       default:
+               fmt = AFMT_S16_LE;
+       case AFMT_U8:
+       case AFMT_S8:
+       case AFMT_S16_LE:
+               vidc_audio_format = fmt;
+               vidc_update_filler(vidc_audio_format, vidc_audio_channels);
+       case AFMT_QUERY:
+               break;
+       }
+       return vidc_audio_format;
+}
+
+static int vidc_audio_set_speed(int dev, int rate)
+{
+       if (rate) {
+               unsigned int hwctrl, hwrate;
+               unsigned int newsize, new2size;
+
+               /*
+                * If we have selected 44.1kHz, use the DAC clock.
+                */
+               if (0 && rate == 44100) {
+                       hwctrl = 0x00000002;
+                       hwrate = 3;
+               } else {
+                       hwctrl = 0x00000003;
+
+                       hwrate = (((VIDC_SOUND_CLOCK * 2) / rate) + 1) >> 1;
+                       if (hwrate < 3)
+                               hwrate = 3;
+                       if (hwrate > 255)
+                               hwrate = 255;
+
+                       rate = VIDC_SOUND_CLOCK / hwrate;
+               }
+
+               outl(0xb0000000 | (hwrate - 2), IO_VIDC_BASE);
+               outl(0xb1000000 | hwctrl, IO_VIDC_BASE);
+
+               newsize = (10000 / hwrate) & ~3;
+               if (newsize < 208)
+                       newsize = 208;
+               if (newsize > 4096)
+                       newsize = 4096;
+               for (new2size = 128; new2size < newsize; new2size <<= 1);
+               if (new2size - newsize > newsize - (new2size >> 1))
+                       new2size >>= 1;
+               if (new2size > 4096) {
+                       printk(KERN_ERR "VIDC: error: dma buffer (%d) %d > 4K\n",
+                               newsize, new2size);
+                       new2size = 4096;
+               }
+               dma_bufsize = new2size;
+               vidc_audio_rate = rate;
+       }
+       return vidc_audio_rate;
+}
+
+static short vidc_audio_set_channels(int dev, short channels)
+{
+       switch (channels) {
+       default:
+               channels = 2;
+       case 1:
+       case 2:
+               vidc_audio_channels = channels;
+               vidc_update_filler(vidc_audio_format, vidc_audio_channels);
+       case 0:
+               break;
+       }
+       return vidc_audio_channels;
+}
+
+/*
+ * Open the device
+ */
+static int vidc_audio_open(int dev, int mode)
+{
+       /* This audio device does not have recording capability */
+       if (mode == OPEN_READ)
+               return -EPERM;
+
+       if (vidc_busy)
+               return -EBUSY;
+
+       vidc_busy = 1;
+       return 0;
+}
+
+/*
+ * Close the device
+ */
+static void vidc_audio_close(int dev)
+{
+       vidc_busy = 0;
+}
+
+/*
+ * Output a block via DMA to sound device.
+ *
+ * We just set the DMA start and count; the DMA interrupt routine
+ * will take care of formatting the samples (via the appropriate
+ * vidc_filler routine), and flag via vidc_audio_dma_interrupt when
+ * more data is required.
+ */
+static void
+vidc_audio_output_block(int dev, unsigned long buf, int total_count, int one)
+{
+       struct dma_buffparms *dmap = audio_devs[dev]->dmap_out;
+       unsigned long flags;
+
+       save_flags_cli(flags);
+       dma_start = buf - (unsigned long)dmap->raw_buf_phys + (unsigned long)dmap->raw_buf;
+       dma_count = total_count;
+       restore_flags(flags);
+}
+
+static void
+vidc_audio_start_input(int dev, unsigned long buf, int count, int intrflag)
+{
+}
+
+static int vidc_audio_prepare_for_input(int dev, int bsize, int bcount)
+{
+       return -EINVAL;
+}
+
+static void vidc_audio_dma_interrupt(void)
+{
+       DMAbuf_outputintr(vidc_adev, 1);
+}
+
+/*
+ * Prepare for outputting samples.
+ *
+ * Each buffer that will be passed will be `bsize' bytes long,
+ * with a total of `bcount' buffers.
+ */
+static int vidc_audio_prepare_for_output(int dev, int bsize, int bcount)
+{
+       struct audio_operations *adev = audio_devs[dev];
+
+       dma_interrupt = NULL;
+       adev->dmap_out->flags |= DMA_NODMA;
+
+       return 0;
+}
+
+/*
+ * Stop our current operation.
+ */
+static void vidc_audio_reset(int dev)
+{
+       dma_interrupt = NULL;
+}
+
+static int vidc_audio_local_qlen(int dev)
+{
+       return /*dma_count !=*/ 0;
+}
+
+static void vidc_audio_trigger(int dev, int enable_bits)
 {
-       int fillertype;
+       struct audio_operations *adev = audio_devs[dev];
 
+       if (enable_bits & PCM_ENABLE_OUTPUT) {
+               if (!(adev->flags & DMA_ACTIVE)) {
+                       unsigned long flags;
+
+                       save_flags_cli(flags);
+
+                       /* prevent recusion */
+                       adev->flags |= DMA_ACTIVE;
+
+                       dma_interrupt = vidc_audio_dma_interrupt;
+                       vidc_sound_dma_irq(0, NULL, NULL);
+                       outb(DMA_CR_E | 0x10, IOMD_SD0CR);
+
+                       restore_flags(flags);
+               }
+       }
+}
+
+static struct audio_driver vidc_audio_driver =
+{
+       vidc_audio_open,                /* open                 */
+       vidc_audio_close,               /* close                */
+       vidc_audio_output_block,        /* output_block         */
+       vidc_audio_start_input,         /* start_input          */
+       NULL,                           /* ioctl                */
+       vidc_audio_prepare_for_input,   /* prepare_for_input    */
+       vidc_audio_prepare_for_output,  /* prepare_for_output   */
+       vidc_audio_reset,               /* halt_io              */
+       vidc_audio_local_qlen,          /* local_qlen           */
+       NULL,                           /* copy_user            */
+       NULL,                           /* halt_input           */
+       NULL,                           /* halt_output          */
+       vidc_audio_trigger,             /* trigger              */
+       vidc_audio_set_speed,           /* set_speed            */
+       vidc_audio_set_format,          /* set_bits             */
+       vidc_audio_set_channels,        /* set_channels         */
+       NULL,                           /* postprocess_write    */
+       NULL,                           /* postprocess_read     */
+       NULL                            /* mmap                 */
+};
+
+void vidc_update_filler(int format, int channels)
+{
 #define TYPE(fmt,ch) (((fmt)<<2) | ((ch)&3))
 
-       fillertype = TYPE(format, channels);
-printk("filler type: %X\n", fillertype);
-       switch (fillertype)
-       {
-               default:
-               case TYPE(AFMT_U8, 1):
-                       vidc_filler = vidc_fill_1x8_u;
-                       break;
-
-               case TYPE(AFMT_U8, 2):
-                       vidc_filler = vidc_fill_2x8_u;
-                       break;
-
-               case TYPE(AFMT_S8, 1):
-                       vidc_filler = vidc_fill_1x8_s;
-                       break;
-
-               case TYPE(AFMT_S8, 2):
-                       vidc_filler = vidc_fill_2x8_s;
-                       break;
-
-               case TYPE(AFMT_S16_LE, 1):
-                       vidc_filler = vidc_fill_1x16_s;
-                       break;
-
-               case TYPE(AFMT_S16_LE, 2):
-                       vidc_filler = vidc_fill_2x16_s;
-                       break;
+       switch (TYPE(format, channels)) {
+       default:
+       case TYPE(AFMT_U8, 1):
+               vidc_filler = vidc_fill_1x8_u;
+               break;
+
+       case TYPE(AFMT_U8, 2):
+               vidc_filler = vidc_fill_2x8_u;
+               break;
+
+       case TYPE(AFMT_S8, 1):
+               vidc_filler = vidc_fill_1x8_s;
+               break;
+
+       case TYPE(AFMT_S8, 2):
+               vidc_filler = vidc_fill_2x8_s;
+               break;
+
+       case TYPE(AFMT_S16_LE, 1):
+               vidc_filler = vidc_fill_1x16_s;
+               break;
+
+       case TYPE(AFMT_S16_LE, 2):
+               vidc_filler = vidc_fill_2x16_s;
+               break;
        }
 }
 
 void attach_vidc(struct address_info *hw_config)
 {
        char name[32];
-       int i;
+       int i, adev;
 
        sprintf(name, "VIDC %d-bit sound", hw_config->card_subtype);
        conf_printf(name, hw_config);
+       memset(dma_buf, 0, sizeof(dma_buf));
 
-       for (i = 0; i < 2; i++)
-       {
+       adev = sound_install_audiodrv(AUDIO_DRIVER_VERSION, name,
+                       &vidc_audio_driver, sizeof(vidc_audio_driver),
+                       DMA_AUTOMODE, AFMT_U8 | AFMT_S8 | AFMT_S16_LE,
+                       NULL, hw_config->dma, hw_config->dma2);
+
+       if (adev < 0)
+               goto audio_failed;
+
+       /*
+        * 1024 bytes => 64 buffers
+        */
+       audio_devs[adev]->min_fragment = 10;
+       audio_devs[adev]->mixer_dev = num_mixers;
+
+       audio_devs[adev]->mixer_dev =
+               sound_install_mixer(MIXER_DRIVER_VERSION,
+                               name, &vidc_mixer_operations,
+                               sizeof(vidc_mixer_operations), NULL);
+
+       if (audio_devs[adev]->mixer_dev < 0)
+               goto mixer_failed;
+
+       for (i = 0; i < 2; i++) {
                dma_buf[i] = get_free_page(GFP_KERNEL);
+               if (!dma_buf[i]) {
+                       printk(KERN_ERR "%s: can't allocate required buffers\n",
+                               name);
+                       goto mem_failed;
+               }
                dma_pbuf[i] = virt_to_phys(dma_buf[i]);
        }
 
-       if (sound_alloc_dma(hw_config->dma, "VIDCsound"))
-       {
-               printk(KERN_ERR "VIDCsound: can't allocate virtual DMA channel\n");
-               return;
+       if (sound_alloc_dma(hw_config->dma, hw_config->name)) {
+               printk(KERN_ERR "%s: DMA %d is in  use\n", name, hw_config->dma);
+               goto dma_failed;
        }
-       if (request_irq(hw_config->irq, vidc_sound_dma_irq, 0, "VIDCsound", &dma_start))
-       {
-               printk(KERN_ERR "VIDCsound: can't allocate DMA interrupt\n");
-               return;
+
+       if (request_irq(hw_config->irq, vidc_sound_dma_irq, 0,
+                       hw_config->name, &dma_start)) {
+               printk(KERN_ERR "%s: IRQ %d is in use\n", name, hw_config->irq);
+               goto irq_failed;
        }
-//     vidc_synth_init(hw_config);
-       vidc_audio_init(hw_config);
-       vidc_mixer_init(hw_config);
+       old_mksound = kd_mksound;
+       kd_mksound = vidc_mksound;
+       vidc_adev = adev;
+       vidc_mixer_set(SOUND_MIXER_VOLUME, (85 | 85 << 8));
+       return;
+
+irq_failed:
+       sound_free_dma(hw_config->dma);
+dma_failed:
+mem_failed:
+       for (i = 0; i < 2; i++)
+               free_page(dma_buf[i]);
+       sound_unload_mixerdev(audio_devs[adev]->mixer_dev);
+mixer_failed:
+       sound_unload_audiodev(adev);
+audio_failed:
+       return;
 }
 
 int probe_vidc(struct address_info *hw_config)
 {
-       hw_config->irq = IRQ_DMAS0;
-       hw_config->dma = DMA_VIRTUAL_SOUND;
-       hw_config->dma2 = -1;
-       hw_config->card_subtype = 16;
+       hw_config->irq          = IRQ_DMAS0;
+       hw_config->dma          = DMA_VIRTUAL_SOUND;
+       hw_config->dma2         = -1;
+       hw_config->card_subtype = 16;
+       hw_config->name         = "VIDC20";
        return 1;
 }
 
 void unload_vidc(struct address_info *hw_config)
 {
-       int i;
+       int i, adev = vidc_adev;
 
-       free_irq(hw_config->irq, NULL);
+       vidc_adev = -1;
+
+       if (old_mksound)
+               kd_mksound = old_mksound;
+
+       free_irq(hw_config->irq, &dma_start);
        sound_free_dma(hw_config->dma);
 
-       for (i = 0; i < 2; i++)
-               free_page(dma_buf[i]);
+       if (adev >= 0) {
+               sound_unload_mixerdev(audio_devs[adev]->mixer_dev);
+               sound_unload_audiodev(adev);
+               for (i = 0; i < 2; i++)
+                       free_page(dma_buf[i]);
+       }
 }
 
 #ifdef MODULE
 static struct address_info config;
+/*
+ * Note! Module use count is handled by SOUNDLOCK/SOUND_LOCK_END
+ */
 
 int init_module(void)
 {
        if (probe_vidc(&config) == 0)
                return -ENODEV;
-       printk("VIDC 16-bit serial sound\n");
+
        SOUND_LOCK;
        attach_vidc(&config);
+
        return 0;
 }
 
index a79bdc85d6eb0422170365c64cd02ecdc277a546..0b56e8b7aa58c587aedb7dc76e27de5939dbf9b5 100644 (file)
@@ -55,18 +55,9 @@ extern void     (*dma_interrupt) (void);
 extern unsigned long dma_start, dma_count, dma_bufsize;
 extern unsigned long dma_buf[2], dma_pbuf[2];
 
-/* vidc_audio.c */
-
-extern void     vidc_audio_init(struct address_info *hw_config);
-extern int      vidc_audio_get_volume(void);
-extern int      vidc_audio_set_volume(int vol);
-
-/* vidc_mixer.c */
-
-extern void     vidc_mixer_init(struct address_info *hw_config);
-
 /* vidc_synth.c */
 
 extern void     vidc_synth_init(struct address_info *hw_config);
+extern void    vidc_synth_exit(struct address_info *hw_config);
 extern int      vidc_synth_get_volume(void);
 extern int      vidc_synth_set_volume(int vol);
diff --git a/drivers/sound/vidc_audio.c b/drivers/sound/vidc_audio.c
deleted file mode 100644 (file)
index 919a2ea..0000000
+++ /dev/null
@@ -1,313 +0,0 @@
-/*
- * drivers/sound/vidc_audio.c
- *
- * Audio routines for the VIDC
- *
- * Copyright (C) 1997 Russell King <rmk@arm.uk.linux.org>
- */
-
-#include <asm/hardware.h>
-#include <asm/io.h>
-#include <asm/system.h>
-
-#include "sound_config.h"
-#include "vidc.h"
-
-/*
- * VIDC sound
- *
- * When using SERIAL SOUND mode (external DAC), the number of physical
- * channels is fixed at 2.  Therefore, the sample rate = vidc sample rate.
- */
-
-static int      vidc_adev;
-
-static int      vidc_audio_volume;
-static int      vidc_audio_rate;
-static char     vidc_audio_format;
-static char     vidc_audio_channels;
-
-extern void     vidc_update_filler(int bits, int channels);
-
-int  vidc_audio_get_volume(void)
-{
-       return vidc_audio_volume;
-}
-
-int vidc_audio_set_volume(int newvol)
-{
-       vidc_audio_volume = newvol;
-       return vidc_audio_volume;
-}
-
-static int vidc_audio_set_bits(int fmt)
-{
-printk("setting format: %d\n", fmt);
-       switch (fmt)
-       {
-               case AFMT_QUERY:
-                       break;
-               case AFMT_U8:
-               case AFMT_S8:
-               case AFMT_S16_LE:
-                       vidc_audio_format = fmt;
-                       vidc_update_filler(vidc_audio_format, vidc_audio_channels);
-                       break;
-               default:
-                       vidc_audio_format = AFMT_S16_LE;
-                       vidc_update_filler(vidc_audio_format, vidc_audio_channels);
-                       break;
-       }
-       return vidc_audio_format;
-}
-
-static int vidc_audio_set_rate(int rate)
-{
-       if (rate)
-       {
-               int newsize, new2size;
-
-               vidc_audio_rate = ((500000 / rate) + 1) >> 1;
-               if (vidc_audio_rate < 3)
-                       vidc_audio_rate = 3;
-               if (vidc_audio_rate > 255)
-                       vidc_audio_rate = 255;
-               outl((vidc_audio_rate - 2) | 0xb0000000, IO_VIDC_BASE);
-               outl(0xb1000003, IO_VIDC_BASE);
-               newsize = (10000 / vidc_audio_rate) & ~3;
-               if (newsize < 208)
-                       newsize = 208;
-               if (newsize > 4096)
-                       newsize = 4096;
-               for (new2size = 128; new2size < newsize; new2size <<= 1);
-               if (new2size - newsize > newsize - (new2size >> 1))
-                       new2size >>= 1;
-               dma_bufsize = new2size;
-       }
-       return 250000 / vidc_audio_rate;
-}
-
-static int vidc_audio_set_channels(int channels)
-{
-       switch (channels)
-       {
-               case 0:
-                       break;
-               case 1:
-               case 2:
-                       vidc_audio_channels = channels;
-                       vidc_update_filler(vidc_audio_format, vidc_audio_channels);
-                       break;
-               default:
-                       vidc_audio_channels = 2;
-                       vidc_update_filler(vidc_audio_format, vidc_audio_channels);
-                       break;
-       }
-       return vidc_audio_channels;
-}
-
-/*
- * Open the device
- *
- * dev  - device
- * mode - mode to open device (logical OR of OPEN_READ and OPEN_WRITE)
- *
- * Called when opening the DMAbuf               (dmabuf.c:259)
- */
-static int vidc_audio_open(int dev, int mode)
-{
-       if (vidc_busy)
-               return -EBUSY;
-
-       if ((mode & OPEN_READ) && (!mode & OPEN_WRITE))
-       {
-               /* This audio device doesn't have recording capability */
-               return -EIO;
-       }
-       vidc_busy = 1;
-       return 0;
-}
-
-/*
- * Close the device
- *
- * dev  - device
- *
- * Called when closing the DMAbuf               (dmabuf.c:477)
- *      after halt_xfer
- */
-static void vidc_audio_close(int dev)
-{
-       vidc_busy = 0;
-}
-
-static int vidc_audio_ioctl(int dev, unsigned int cmd, caddr_t arg)
-{
-       int ret;
-
-       switch (cmd)
-       {
-               case SOUND_PCM_WRITE_RATE:
-                       if (get_user(ret, (int *) arg))
-                               return -EFAULT;
-                       ret = vidc_audio_set_rate(ret);
-                       break;
-
-               case SOUND_PCM_READ_RATE:
-                       ret = vidc_audio_set_rate(0);
-                       break;
-
-               case SNDCTL_DSP_STEREO:
-                       if (get_user(ret, (int *) arg))
-                               return -EFAULT;
-                       ret = vidc_audio_set_channels(ret + 1) - 1;
-                       break;
-
-               case SOUND_PCM_WRITE_CHANNELS:
-                       if (get_user(ret, (int *) arg))
-                               return -EFAULT;
-                       ret = vidc_audio_set_channels(ret);
-                       break;
-
-               case SOUND_PCM_READ_CHANNELS:
-                       ret = vidc_audio_set_channels(0);
-                       break;
-
-               case SNDCTL_DSP_SETFMT:
-                       if (get_user(ret, (int *) arg))
-                               return -EFAULT;
-                       ret = vidc_audio_set_bits(ret);
-                       break;
-
-               case SOUND_PCM_READ_BITS:
-                       ret = vidc_audio_set_bits(0);
-                       break;
-
-               case SOUND_PCM_WRITE_FILTER:
-               case SOUND_PCM_READ_FILTER:
-                       return -EINVAL;
-
-               default:
-                       return -EINVAL;
-       }
-       return put_user(ret, (int *) arg);
-}
-
-/*
- * Output a block via DMA to sound device
- *
- * dev          - device number
- * buf          - physical address of buffer
- * total_count  - total byte count in buffer
- * intrflag     - set if this has been called from an interrupt (via DMAbuf_outputintr)
- * restart_dma  - set if DMA needs to be re-initialised
- *
- * Called when:
- *  1. Starting output                                  (dmabuf.c:1327)
- *  2.                                                  (dmabuf.c:1504)
- *  3. A new buffer needs to be sent to the device      (dmabuf.c:1579)
- */
-static void vidc_audio_output_block(int dev, unsigned long buf, int total_count,
-                       int intrflag)
-{
-       struct audio_operations *adev = audio_devs[dev];
-       struct dma_buffparms *dmap = adev->dmap_out;
-
-       dma_start = buf - (unsigned long)dmap->raw_buf_phys + (unsigned long)dmap->raw_buf;
-       dma_count = total_count;
-
-       if (!(adev->flags & DMA_ACTIVE))
-       {
-               unsigned long flags;
-printk("kicking output: %lX+%lX [%lX]\n", dma_start, dma_count, *(unsigned long *)dma_start);
-               save_flags_cli(flags);
-               vidc_sound_dma_irq(0, NULL, NULL);
-               outb(DMA_CR_E | 0x10, IOMD_SD0CR);
-               restore_flags(flags);
-       }
-}
-
-static void vidc_audio_start_input(int dev, unsigned long buf, int count,
-                      int intrflag)
-{
-}
-
-static int vidc_audio_prepare_for_input(int dev, int bsize, int bcount)
-{
-       return -EINVAL;
-}
-
-static void vidc_audio_dma_interrupt(void)
-{
-       DMAbuf_outputintr(vidc_adev, 1);
-}
-
-/*
- * Prepare for outputting samples to `dev'
- *
- * Each buffer that will be passed will be `bsize' bytes long,
- * with a total of `bcount' buffers.
- *
- * Called when:
- *  1. A trigger enables audio output                   (dmabuf.c:978)
- *  2. We get a write buffer without dma_mode setup     (dmabuf.c:1152)
- *  3. We restart a transfer                            (dmabuf.c:1324)
- */
-static int vidc_audio_prepare_for_output(int dev, int bsize, int bcount)
-{
-       audio_devs[dev]->dmap_out->flags |= DMA_NODMA;
-       dma_interrupt = vidc_audio_dma_interrupt;
-       return 0;
-}
-
-/*
- * Stop our current operation.
- */
-static void vidc_audio_reset(int dev)
-{
-       /* stop interrupts.  Our real interrupt routine
-        * will close DMA down for us
-        */
-       dma_interrupt = NULL;
-}
-
-static int vidc_audio_local_qlen(int dev)
-{
-       return /*dma_count !=*/ 0;
-}
-
-static struct audio_driver vidc_audio_driver =
-{
-       vidc_audio_open,                /* open                 */
-       vidc_audio_close,               /* close                */
-       vidc_audio_output_block,        /* output_block         */
-       vidc_audio_start_input,         /* start_input          */
-       vidc_audio_ioctl,               /* ioctl                */
-       vidc_audio_prepare_for_input,   /* prepare_for_input    */
-       vidc_audio_prepare_for_output,  /* prepare_for_output   */
-       vidc_audio_reset,               /* reset                */
-       vidc_audio_local_qlen,          /*+local_qlen           */
-       NULL,                           /*+copy_from_user       */
-       NULL,                           /*+halt_input           */
-       NULL,                           /* halt_output          */
-       NULL,                           /*+trigger              */
-       NULL,                           /*+set_speed            */
-       NULL,                           /*+set_bits             */
-       NULL,                           /*+set_channels         */
-};
-
-void vidc_audio_init(struct address_info *hw_config)
-{
-       vidc_audio_volume = 100 | (100 << 8);
-
-       if ((vidc_adev = sound_install_audiodrv(AUDIO_DRIVER_VERSION,
-                               "VIDCsound", &vidc_audio_driver,
-                               sizeof(struct audio_driver),
-                               DMA_AUTOMODE, AFMT_U8 | AFMT_S8 | AFMT_S16_LE,
-                               NULL, hw_config->dma, hw_config->dma2)) >= 0)
-       {
-               audio_devs[vidc_adev]->min_fragment = 10;       /* 1024 bytes => 64 buffers */
-               audio_devs[vidc_adev]->mixer_dev = num_mixers;
-       }
-       else printk(KERN_ERR "VIDCsound: Too many PCM devices available\n");
-}
index b8b1e6620e7ab5a4cff02ca964f565694c19e7b7..c198b72c69bc8bcbbf478b47b9e5ec0940782168 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/hardware.h>
+#include <asm/iomd.h>
 
                .text
 
@@ -190,24 +191,24 @@ ENTRY(vidc_sound_dma_irq)
                .data
                .globl  SYMBOL_NAME(dma_interrupt)
 SYMBOL_NAME(dma_interrupt):
-               .long   0
+               .long   0                               @ r3
                .globl  SYMBOL_NAME(dma_pbuf)
 SYMBOL_NAME(dma_pbuf):
-               .long   0
-               .long   0
+               .long   0                               @ r4
+               .long   0                               @ r5
                .globl  SYMBOL_NAME(dma_start)
 SYMBOL_NAME(dma_start):
-               .long   0
+               .long   0                               @ r0
                .globl  SYMBOL_NAME(dma_count)
 SYMBOL_NAME(dma_count):
-               .long   0
+               .long   0                               @ r1
                .globl  SYMBOL_NAME(dma_buf)
 SYMBOL_NAME(dma_buf):
-               .long   0
-               .long   0
+               .long   0                               @ r2
+               .long   0                               @ r3
                .globl  SYMBOL_NAME(vidc_filler)
 SYMBOL_NAME(vidc_filler):
-               .long   SYMBOL_NAME(vidc_fill_noaudio)
+               .long   SYMBOL_NAME(vidc_fill_noaudio)  @ r4
                .globl  SYMBOL_NAME(dma_bufsize)
 SYMBOL_NAME(dma_bufsize):
-               .long   0x1000
+               .long   0x1000                          @ r5
diff --git a/drivers/sound/vidc_mixer.c b/drivers/sound/vidc_mixer.c
deleted file mode 100644 (file)
index 01be492..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * drivers/sound/vidc_mixer.c
- *
- * Mixer routines for VIDC
- *
- * Copyright (C) 1997 Russell King <rmk@arm.uk.linux.org>
- */
-
-#include "sound_config.h"
-#include "vidc.h"
-
-int vidc_volume;
-
-static int vidc_get_volume(void)
-{
-       return vidc_volume;
-}
-
-static int vidc_set_volume(int newvol)
-{
-       vidc_volume = newvol;
-/*  printk ("vidc_set_volume: %X\n", newvol); */
-       return newvol;
-}
-
-static int vidc_default_mixer_ioctl(int dev, unsigned int cmd, caddr_t arg)
-{
-       int ret;
-
-       switch (cmd)
-       {
-               case SOUND_MIXER_READ_VOLUME:
-                       ret = vidc_get_volume();
-                       break;
-
-               case SOUND_MIXER_WRITE_VOLUME:
-                       if (get_user(ret, (int *) arg))
-                               return -EINVAL;
-                       ret = vidc_set_volume(ret);
-                       break;
-
-               case SOUND_MIXER_READ_BASS:
-               case SOUND_MIXER_WRITE_BASS:
-               case SOUND_MIXER_READ_TREBLE:
-               case SOUND_MIXER_WRITE_TREBLE:
-                       ret = 50;
-                       break;
-
-               case SOUND_MIXER_READ_SYNTH:
-//                     ret = vidc_synth_get_volume();
-                       ret = 0;
-                       break;
-
-               case SOUND_MIXER_WRITE_SYNTH:
-                       if (get_user(ret, (int *) arg))
-                               return -EINVAL;
-//                     ret = vidc_synth_set_volume(ret);
-                       ret = 0;
-                       break;
-
-               case SOUND_MIXER_READ_PCM:
-                       ret = vidc_audio_get_volume();
-                       break;
-
-               case SOUND_MIXER_WRITE_PCM:
-                       if (get_user(ret, (int *) arg))
-                               return -EINVAL;
-                       ret = vidc_audio_set_volume(ret);
-                       break;
-
-               case SOUND_MIXER_READ_SPEAKER:
-                       ret = 100;
-                       break;
-
-               case SOUND_MIXER_WRITE_SPEAKER:
-                       ret = 100;
-                       break;
-
-               case SOUND_MIXER_READ_LINE:
-               case SOUND_MIXER_WRITE_LINE:
-               case SOUND_MIXER_READ_MIC:
-               case SOUND_MIXER_WRITE_MIC:
-                       ret = 0;
-                       break;
-
-               case SOUND_MIXER_READ_CD:
-               case SOUND_MIXER_WRITE_CD:
-                       ret = 100 | (100 << 8);
-                       break;
-
-               case SOUND_MIXER_READ_IMIX:
-               case SOUND_MIXER_WRITE_IMIX:
-               case SOUND_MIXER_READ_ALTPCM:
-               case SOUND_MIXER_WRITE_ALTPCM:
-               case SOUND_MIXER_READ_LINE1:
-               case SOUND_MIXER_WRITE_LINE1:
-               case SOUND_MIXER_READ_LINE2:
-               case SOUND_MIXER_WRITE_LINE2:
-               case SOUND_MIXER_READ_LINE3:
-               case SOUND_MIXER_WRITE_LINE3:
-                       ret = 0;
-                       break;
-
-               case SOUND_MIXER_READ_RECSRC:
-                       ret = 0;
-                       break;
-
-               case SOUND_MIXER_WRITE_RECSRC:
-                       return -EINVAL;
-                       break;
-
-               case SOUND_MIXER_READ_DEVMASK:
-                       ret = SOUND_MASK_VOLUME | SOUND_MASK_PCM | SOUND_MASK_SYNTH;
-                       break;
-
-               case SOUND_MIXER_READ_RECMASK:
-                       ret = 0;
-                       break;
-
-               case SOUND_MIXER_READ_STEREODEVS:
-                       ret = SOUND_MASK_VOLUME | SOUND_MASK_PCM | SOUND_MASK_SYNTH;
-                       break;
-
-               case SOUND_MIXER_READ_CAPS:
-                       ret = 0;
-                       break;
-
-               case SOUND_MIXER_READ_MUTE:
-                       return -EINVAL;
-                       break;
-
-               default:
-                       return -EINVAL;
-                       break;
-       }
-       return put_user(ret, (int *) arg);
-}
-
-static struct mixer_operations vidc_mixer_operations = {
-       "VIDC",
-       "VIDCsound",
-       vidc_default_mixer_ioctl        /* ioctl                */
-};
-
-void vidc_mixer_init(struct address_info *hw_config)
-{
-       int vidc_mixer = sound_alloc_mixerdev();
-       vidc_volume = 100 | (100 << 8);
-       if (num_mixers < MAX_MIXER_DEV)
-               mixer_devs[vidc_mixer] = &vidc_mixer_operations;
-}
index ba94f0bc6dbb9a3c7e3c47639a266ff1bca827b0..c071cc70c513dc853f6f867e1ee63142944e85db 100644 (file)
@@ -88,4 +88,8 @@ void vidc_synth_init(struct address_info *hw_config)
        else
                printk(KERN_ERR "VIDCsound: Too many synthesizers\n");
 }
+
+void vidc_synth_exit(struct address_info *hw_config)
+{
+}
 #endif
index 4206562a3481510ea990ef1da3db6bbc7875190e..7a0f318d53e20ece992f19ec6b1cfbf380ab93ab 100644 (file)
@@ -87,9 +87,9 @@
  
 #if defined(__alpha__)
 #ifdef __SMP__
-#define LOOPS_PER_TICK (cpu_data[smp_processor_id()].loops_per_jiffy/HZ)
+#define LOOPS_PER_TICK (cpu_data[smp_processor_id()].loops_per_jiffy)
 #else
-#define LOOPS_PER_TICK (loops_per_jiffy/HZ)
+#define LOOPS_PER_TICK (loops_per_jiffy)
 #endif
 #endif
 
@@ -459,7 +459,7 @@ wavefront_wait (int mask)
 
        if (short_loop_cnt == 0) {
                short_loop_cnt = wait_usecs *
-                       (LOOPS_PER_TICK / 1000000);
+                       (LOOPS_PER_TICK / (1000000 / HZ));
        }
 
        /* Spin for a short period of time, because >99% of all
index 044087d83f9864bb5a0e70dd2ec48d1fae2daad9..865f5914b66d658a780fe48c86727b88b2424e40 100644 (file)
@@ -668,10 +668,10 @@ static void ymf_pcm_interrupt(ymfpci_t *codec, ymfpci_voice_t *voice)
                                /*
                                 * Normal end of DMA.
                                 */
-                               printk("ymfpci%d: %d: done: delta %d"
-                                   " hwptr %d swptr %d distance %d count %d\n",
-                                   codec->inst, voice->number, delta,
-                                   dmabuf->hwptr, swptr, distance, dmabuf->count);
+//                             printk("ymfpci%d: %d: done: delta %d"
+//                                 " hwptr %d swptr %d distance %d count %d\n",
+//                                 codec->inst, voice->number, delta,
+//                                 dmabuf->hwptr, swptr, distance, dmabuf->count);
                        }
                        played = dmabuf->count;
                        if (ypcm->running) {
@@ -826,8 +826,8 @@ static void ymf_pcm_init_voice(ymfpci_voice_t *voice, int stereo,
                end >>= 1;
        if (w_16)
                end >>= 1;
-/* P3 */ printk("ymf_pcm_init_voice: %d: Rate %d Format 0x%08x Delta 0x%x End 0x%x\n",
-  voice->number, rate, format, delta, end);
+/* P3 */ // printk("ymf_pcm_init_voice: %d: Rate %d Format 0x%08x Delta 0x%x End 0x%x\n",
+//  voice->number, rate, format, delta, end);
        for (nbank = 0; nbank < 2; nbank++) {
                bank = &voice->bank[nbank];
                bank->format = format;
@@ -1710,7 +1710,7 @@ static int ymf_ioctl(struct inode *inode, struct file *file,
        case SNDCTL_DSP_SETFRAGMENT:
                get_user_ret(val, (int *)arg, -EFAULT);
        /* P3: these frags are for Doom. Amasingly, it sets [2,2**11]. */
-       /* P3 */ printk("ymfpci: ioctl SNDCTL_DSP_SETFRAGMENT 0x%x\n", val);
+       /* P3 */ // printk("ymfpci: ioctl SNDCTL_DSP_SETFRAGMENT 0x%x\n", val);
 
                dmabuf->ossfragshift = val & 0xffff;
                dmabuf->ossmaxfrags = (val >> 16) & 0xffff;
index 8924ee1724b825cfe67126cb874e51faf8313829..188c0890927e99b47b156a82f9c816a2f9a182df 100644 (file)
@@ -438,8 +438,7 @@ struct super_block *adfs_read_super(struct super_block *sb, void *data, int sile
                kfree(sb->u.adfs_sb.s_map);
                adfs_error(sb, "get root inode failed\n");
                goto error_dec_use;
-       }
-       else
+       } else
                sb->s_root->d_op = &adfs_dentry_operations;
        return sb;
 
index e89940bff1bfb80d6c904f6127b830bb1ff996e4..488de6ca82f66bdd6588099c0a096a4b5e55b73f 100644 (file)
@@ -216,7 +216,7 @@ static int parse_options(char *options,int *fat, int *blksize, int *debug,
        opts->quiet = opts->sys_immutable = opts->dotsOK = opts->showexec = 0;
        opts->codepage = 0;
        opts->utf8 = 0;
-       opts->small_letter = 0;
+       opts->small_letter = 1;         /* Default to old behaviour */
        opts->iocharset = NULL;
        *debug = *fat = 0;
 
@@ -265,6 +265,9 @@ static int parse_options(char *options,int *fat, int *blksize, int *debug,
                else if (!strcmp(this_char,"small")) {
                        opts->small_letter = 1;
                }
+               else if (!strcmp(this_char,"big")) {
+                       opts->small_letter = 0;
+               }
                else if (!strcmp(this_char,"dotsOK") && value) {
                        if (!strcmp(value,"yes")) opts->dotsOK = 1;
                        else if (!strcmp(value,"no")) opts->dotsOK = 0;
index 79fe743617dd119f6f2beafe6f3bd9da9604604b..473b01e04bbf88c92cbd3fb86d3ed356b0876668 100644 (file)
@@ -380,7 +380,7 @@ void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int boundl
        return;
 }
 
-void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 7a8dddafa5fef73e0770d0942cbc3a8c7f1eadfc..5cef80a3423190a83bc0acdc81e7e095027320c8 100644 (file)
@@ -409,7 +409,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 5987de7425da4fc46453631f4feeadbbe57fef69..fe6b0d72724e2d93486ac32868eab2e71bac1007 100644 (file)
@@ -337,7 +337,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 4418dc577fbebc934ce5336027fb8e7ee80a63ac..9a9985e4e691a21efa79a42cb697285fc14e54dc 100644 (file)
@@ -337,7 +337,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 4f389544ff79994087a8cbfa55c2c9095dedb797..3ff66221294595e94c13f41a397f6844ecb440ec 100644 (file)
@@ -301,7 +301,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index e0c2930acf126e6fb3dd6a1bf361f2b0044a51c3..543831fa6d7d60946ca539d965bf16822b370557 100644 (file)
@@ -301,7 +301,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 59e24c9a78d1f94486999e387560bc1019e7d565..fe60ae81f1b4e680eb6d8cc62bb0e5beb58a8a70 100644 (file)
@@ -301,7 +301,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index ffff1a97d3aab02c5ae460c319ab949b54f34b5d..7eb725a6b7fa03f4261f46b797e750b7a1aa6da7 100644 (file)
@@ -265,7 +265,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index f0fecce3401545ffc084d6455105df880c0b66ee..c032393c468053619ea10861c0c3af34241ab649 100644 (file)
@@ -373,7 +373,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index c7a8a9e17a986579611a1f1f33d009fda324dfe7..abb8c802e19b15dd6d3756b8562b5428bdea40f7 100644 (file)
@@ -409,7 +409,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index c59d81748c5949d2b305ad2a8fbd81b95ba5d64e..c0d3ba92b254d0b88f89a577b1edd934a1361db5 100644 (file)
@@ -445,7 +445,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index db86fd52975cb2c0b435a71f065129d5170971c1..e87e51d21124195e4dc825f2cccd8d5bceb1df85 100644 (file)
@@ -409,7 +409,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 01cbf3cd5648ca09d8fc7c6e785e90188afd9b02..b4d829d791772f94d96fd5a54f18b4e87d24fc53 100644 (file)
@@ -400,7 +400,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index a303205ebd1eb96f56b21febe214c0417ad1c879..97cc75addffe38923aec0e270edca8b9936fe12b 100644 (file)
@@ -409,7 +409,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 2218ced401b6039777cb2dd719d93f2949d7aa6e..547206982f28cbd9b1933281c133646c23f70c8f 100644 (file)
@@ -337,7 +337,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 968d2f34d3198f5d38e8833b991772843f0aad55..292d5de7badcf858ac3ce77e4b6773df2e5e087b 100644 (file)
@@ -301,7 +301,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 71b69aa29ac6ba0a5c1d265a0c6283cd3a0b600b..23d59592947f88d4032b5d8ff1c0688e18922b75 100644 (file)
@@ -265,7 +265,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index bf99153dbd78e95933e2c42bae5af83bca43120e..4915dd1c66aaccaeb35927c52b5ced9ed4a70636 100644 (file)
@@ -9806,7 +9806,7 @@ static unsigned char *page_uni2charset[256] = {
        NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
        NULL,   u2c_F9, u2c_FA, NULL,   NULL,   NULL,   NULL,   u2c_FF, };
 
-static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int boundlen, int *outlen)
+static void uni2char(const unsigned char ch, unsigned char cl, unsigned char *out, int boundlen, int *outlen)
 {
        unsigned char *uni2charset;
 
@@ -9844,7 +9844,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        unsigned char ch, cl;
        struct nls_unicode *charset2uni;
@@ -9942,7 +9942,7 @@ static void uni2char_euc_jp(unsigned char ch, unsigned char cl, unsigned char *
        return;
 }
 
-static void char2uni_euc_jp(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni_euc_jp(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        unsigned char ch, cl;
        unsigned char sjis_temp[2];
index 498a5a448155017091738b6bbf15ba43e4c3d333..c74e98801ffdda2670d6ec4f22d8f41e06c623a4 100644 (file)
@@ -15609,7 +15609,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        unsigned char ch, cl;
        struct nls_unicode *charset2uni;
index cd777ccc92bd72e2ec9b7ffde0aef9cfc05dd875..4f38902e035f9ec09fdf3f96048350508c6ccac3 100644 (file)
@@ -18465,7 +18465,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        unsigned char ch, cl;
        struct nls_unicode *charset2uni;
index 7f2661bef186fae7a37267b7482ccd10b9bff853..63ac8107f8758efb7d89f25c1a5aef4cae9baaf3 100644 (file)
@@ -12753,7 +12753,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        unsigned char ch, cl;
        struct nls_unicode *charset2uni;
index bb86de370c19156c1b68c82192fa2192abf0dd4a..19faab58d6f78c3e4f1d29276567a6e655935967 100644 (file)
@@ -189,7 +189,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 538ce8bcb2910cf9a0f83a272ce27cbc6317c22c..ebfe3e7aec1e3358441c0fe73ca1615271856ea9 100644 (file)
@@ -236,7 +236,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 9a0ae2ede432ba8c1e6b0ac9ab27d01cc1f6e566..f4b4effb6fc7363cf6b1e256d9b34c715893339c 100644 (file)
@@ -229,7 +229,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 6baddfc4859662e2d62650bb05a1ff2263b69f90..00b4d945edc9f284ff7f1546886c74da99fbb148 100644 (file)
@@ -261,7 +261,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 1576aeac4e782cfcfbf1f9109478f08cb788bf01..c7d52f127c40daa365e532e0adc46835bf7272da 100644 (file)
@@ -261,7 +261,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 7d79070bc8c535819c2a0f391652e2d3af4aadbe..b7f79c43250c5398775ccabe7388295781847519 100644 (file)
@@ -261,7 +261,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 724149fa1e0d88ccc5c2b3300ed18dc61ca27145..034280dbbe7d72faee89906f6e2fb23898fdf29c 100644 (file)
@@ -265,7 +265,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index f4800a924eddf2872765775eea7f373c696dfb81..b1c877503ab271cdf1c016df99a98acd746aa0cc 100644 (file)
@@ -225,7 +225,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index f5f66c008437cb5f0f77e34506073ed308cd8f33..190214d43e66481d786472f0c82646f689c1b23d 100644 (file)
@@ -301,7 +301,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 987e719370ffd03dc2b00b4ff1d8fc4632840cfb..d0c35737163f14be9bccb9baf6f6fb2decf5f2f3 100644 (file)
@@ -265,7 +265,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index eecc051b64311a8e4927206521a1918d6ea9a39a..408bb48432410e1b4c9c43cbb4f75d62e138dfff 100644 (file)
@@ -225,7 +225,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index 1cff830db1d5bee5abc3fa614bc12cc566b91cfd..22c9b18ab162eda42149c8d8ee0ccad1bb0a82bf 100644 (file)
@@ -337,7 +337,7 @@ static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int
        return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
        *uni1 = charset2uni[*rawstring].uni1;
        *uni2 = charset2uni[*rawstring].uni2;
index b8b69d90f8f25552ef7bb0b9d8934174e8c91df8..ac44f48a21f92fed2fbf2bbc8005c40838c8fdca 100644 (file)
@@ -40,7 +40,7 @@ __delay(unsigned long loops)
 extern __inline__ void
 __udelay(unsigned long usecs, unsigned long lps)
 {
-       /* compute (usecs * 2**64 / 10**6) * loops_per_sec / 2**64 */
+       /* compute (usecs * 2**64 / 10**6) * loops_per_jiffy * HZ / 2**64 */
 
        usecs *= 0x000010c6f7a0b5edUL;          /* 2**64 / 1000000 */
        __asm__("umulh %1,%2,%0" :"=r" (usecs) :"r" (usecs),"r" (lps));
@@ -50,7 +50,7 @@ __udelay(unsigned long usecs, unsigned long lps)
 extern __inline__ void
 __small_const_udelay(unsigned long usecs, unsigned long lps)
 {
-       /* compute (usecs * 2**32 / 10**6) * loops_per_sec / 2**32 */
+       /* compute (usecs * 2**32 / 10**6) * loops_per_jiffy * HZ / 2**32 */
 
         usecs *= 0x10c6;                /* 2^32 / 10^6 */
        usecs *= lps;
@@ -62,15 +62,16 @@ __small_const_udelay(unsigned long usecs, unsigned long lps)
 #define udelay(usecs)                                          \
        (__builtin_constant_p(usecs) && usecs < 0x100000000UL   \
         ? __small_const_udelay(usecs,                          \
-               cpu_data[smp_processor_id()].loops_per_sec)     \
+               cpu_data[smp_processor_id()].loops_per_jiffy*HZ)        \
         : __udelay(usecs,                                      \
-               cpu_data[smp_processor_id()].loops_per_sec))
+               cpu_data[smp_processor_id()].loops_per_jiffy*HZ))
 #else
 #define udelay(usecs)                                          \
        (__builtin_constant_p(usecs) && usecs < 0x100000000UL   \
-        ? __small_const_udelay(usecs, loops_per_sec)           \
-        : __udelay(usecs, loops_per_sec))
+        ? __small_const_udelay(usecs, loops_per_jiffy*HZ)              \
+        : __udelay(usecs, loops_per_jiffy*HZ))
 #endif
 
 
 #endif /* defined(__ALPHA_DELAY_H) */
+
index 9406e6248efef4ac848b05c5a06f38bc076ab04a..ee2f5d04aa0715bf41bea717c9793340c3db83cf 100644 (file)
@@ -9,7 +9,7 @@
 
 /* make a multiple of 64-bytes */
 struct cpuinfo_alpha {
-       unsigned long loops_per_sec;
+       unsigned long loops_per_jiffy;
        unsigned long last_asn;
        unsigned long *pgd_cache;
        unsigned long *pte_cache;
index 8b355d9ea0783f31eca2a4e74034df892037f7d0..ef4c97056f49593f5c3ee7e93020441942d8b135 100644 (file)
@@ -40,7 +40,8 @@ struct i2c_device;
        /* 2 is used in 2.3.x */
 #define I2C_BUSID_BUZ          3       /* I2C bus on a BUZ */
 #define I2C_BUSID_ZORAN                4       /* I2C bus on a Zoran */
-#define I2C_BUSID_SGIVWFB      5       /* Moved to be unique */
+#define I2C_BUSID_CYBER2000    5       /* I2C bus on a Cyber2000 */
+#define I2C_BUSID_SGIVWFB      6       /* Moved to be unique */
 
 /*
  * struct for a driver for a i2c chip (tuner, soundprocessor,
index c76cada085223e4aca6155190263057f2bef32c2..2de251a0a2dcab4a5d5a9d17f76dc2faa45b6d34 100644 (file)
@@ -30,7 +30,9 @@
 #include <linux/if.h>
 #include <linux/if_ether.h>
 #include <linux/if_packet.h>
+#ifdef __KERNEL__
 #include <net/divert.h>
+#endif
 
 #include <asm/atomic.h>
 
index cf2142f62bab58293c6a92f311c7c7bdf7daf00b..4083f71bdedad561ace3354bce10891d2db16236 100644 (file)
@@ -6,7 +6,7 @@ struct nls_unicode {
 struct nls_table {
        char *charset;
        void (*uni2char) (unsigned char ch, unsigned char cl, unsigned char *out, int boundlen, int *outlen);
-       void (*char2uni) (unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2);
+       void (*char2uni) (const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2);
 
        void (*inc_use_count) (void);
        void (*dec_use_count) (void);
index 4a086b242f4388dbb1f227e3b4db495d1a9cde15..0a2bfc3abf39060f8d93c4189dbc915bde92e7e1 100644 (file)
@@ -1230,8 +1230,8 @@ void __init calibrate_delay(void)
 
 /* Round the value and print it */     
        printk("%lu.%02lu BogoMIPS\n",
-               (loops_per_jiffy+2500)/(500000/HZ),
-               ((loops_per_jiffy+2500)/(5000/HZ)) % 100);
+               loops_per_jiffy/(500000/HZ),
+               (loops_per_jiffy/(5000/HZ)) % 100);
 }
 
 /*