]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
authorLinus Torvalds <torvalds@g5.osdl.org>
Tue, 10 Jan 2006 01:06:53 +0000 (17:06 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 10 Jan 2006 01:06:53 +0000 (17:06 -0800)
213 files changed:
Documentation/kernel-parameters.txt
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/boot/compressed/Makefile
arch/arm/boot/compressed/head-at91rm9200.S [new file with mode: 0644]
arch/arm/boot/compressed/head-epxa10db.S [deleted file]
arch/arm/configs/assabet_defconfig
arch/arm/configs/badge4_defconfig
arch/arm/configs/bast_defconfig
arch/arm/configs/cerfcube_defconfig
arch/arm/configs/clps7500_defconfig
arch/arm/configs/collie_defconfig
arch/arm/configs/corgi_defconfig
arch/arm/configs/ebsa110_defconfig
arch/arm/configs/edb7211_defconfig
arch/arm/configs/enp2611_defconfig
arch/arm/configs/ep80219_defconfig
arch/arm/configs/epxa10db_defconfig [deleted file]
arch/arm/configs/footbridge_defconfig
arch/arm/configs/fortunet_defconfig
arch/arm/configs/h3600_defconfig
arch/arm/configs/h7201_defconfig
arch/arm/configs/h7202_defconfig
arch/arm/configs/hackkit_defconfig
arch/arm/configs/integrator_defconfig
arch/arm/configs/iq31244_defconfig
arch/arm/configs/iq80321_defconfig
arch/arm/configs/iq80331_defconfig
arch/arm/configs/iq80332_defconfig
arch/arm/configs/ixdp2400_defconfig
arch/arm/configs/ixdp2401_defconfig
arch/arm/configs/ixdp2800_defconfig
arch/arm/configs/ixdp2801_defconfig
arch/arm/configs/ixp4xx_defconfig
arch/arm/configs/jornada720_defconfig
arch/arm/configs/lart_defconfig
arch/arm/configs/lpd7a400_defconfig
arch/arm/configs/lpd7a404_defconfig
arch/arm/configs/lubbock_defconfig
arch/arm/configs/lusl7200_defconfig
arch/arm/configs/mainstone_defconfig
arch/arm/configs/mx1ads_defconfig
arch/arm/configs/neponset_defconfig
arch/arm/configs/netwinder_defconfig
arch/arm/configs/omap_h2_1610_defconfig
arch/arm/configs/pleb_defconfig
arch/arm/configs/pxa255-idp_defconfig
arch/arm/configs/realview_defconfig
arch/arm/configs/rpc_defconfig
arch/arm/configs/s3c2410_defconfig
arch/arm/configs/shannon_defconfig
arch/arm/configs/shark_defconfig
arch/arm/configs/simpad_defconfig
arch/arm/configs/smdk2410_defconfig
arch/arm/configs/spitz_defconfig
arch/arm/configs/versatile_defconfig
arch/arm/kernel/irq.c
arch/arm/mach-at91rm9200/Kconfig [new file with mode: 0644]
arch/arm/mach-at91rm9200/Makefile [new file with mode: 0644]
arch/arm/mach-at91rm9200/Makefile.boot [new file with mode: 0644]
arch/arm/mach-at91rm9200/clock.c [new file with mode: 0644]
arch/arm/mach-at91rm9200/common.c [new file with mode: 0644]
arch/arm/mach-at91rm9200/devices.c [new file with mode: 0644]
arch/arm/mach-at91rm9200/generic.h [new file with mode: 0644]
arch/arm/mach-at91rm9200/gpio.c [new file with mode: 0644]
arch/arm/mach-at91rm9200/irq.c [new file with mode: 0644]
arch/arm/mach-at91rm9200/time.c [new file with mode: 0644]
arch/arm/mach-epxa10db/Kconfig [deleted file]
arch/arm/mach-epxa10db/Makefile [deleted file]
arch/arm/mach-epxa10db/Makefile.boot [deleted file]
arch/arm/mach-epxa10db/arch.c [deleted file]
arch/arm/mach-epxa10db/irq.c [deleted file]
arch/arm/mach-epxa10db/mm.c [deleted file]
arch/arm/mach-epxa10db/time.c [deleted file]
arch/arm/mach-s3c2410/clock.c
arch/arm/mm/Kconfig
arch/arm/mm/ioremap.c
arch/arm/tools/mach-types
arch/i386/crypto/aes-i586-asm.S
arch/i386/crypto/aes.c
arch/sparc64/defconfig
arch/sparc64/kernel/entry.S
arch/sparc64/kernel/power.c
arch/x86_64/crypto/aes.c
crypto/Kconfig
crypto/aes.c
crypto/anubis.c
crypto/api.c
crypto/blowfish.c
crypto/cast5.c
crypto/cast6.c
crypto/cipher.c
crypto/crc32c.c
crypto/des.c
crypto/internal.h
crypto/khazad.c
crypto/md4.c
crypto/md5.c
crypto/michael_mic.c
crypto/proc.c
crypto/serpent.c
crypto/sha1.c
crypto/sha256.c
crypto/sha512.c
crypto/tea.c
crypto/tgr192.c
crypto/twofish.c
crypto/wp512.c
drivers/amba/bus.c
drivers/crypto/padlock-aes.c
drivers/crypto/padlock.h
drivers/input/serio/sa1111ps2.c
drivers/mmc/mmc.c
drivers/mmc/mmc_block.c
drivers/mmc/wbsd.c
drivers/mtd/maps/Kconfig
drivers/mtd/maps/Makefile
drivers/mtd/maps/epxa10db-flash.c [deleted file]
drivers/net/Kconfig
drivers/net/Makefile
drivers/net/arm/Kconfig
drivers/net/arm/Makefile
drivers/net/arm/am79c961a.c
drivers/net/arm/ether00.c [deleted file]
drivers/net/arm/ether3.c
drivers/net/arm/etherh.c
drivers/net/hamradio/mkiss.c
drivers/net/ifb.c [new file with mode: 0644]
drivers/scsi/arm/acornscsi.c
drivers/scsi/arm/arxescsi.c
drivers/scsi/arm/cumana_1.c
drivers/scsi/arm/cumana_2.c
drivers/scsi/arm/eesox.c
drivers/scsi/arm/powertec.c
drivers/serial/8250.c
drivers/serial/Kconfig
drivers/serial/Makefile
drivers/serial/serial_core.c
drivers/serial/uart00.c [deleted file]
drivers/video/cyber2000fb.c
drivers/video/sa1100fb.c
fs/partitions/Kconfig
include/asm-arm/arch-at91rm9200/at91rm9200.h [new file with mode: 0644]
include/asm-arm/arch-at91rm9200/at91rm9200_sys.h [new file with mode: 0644]
include/asm-arm/arch-at91rm9200/board.h [new file with mode: 0644]
include/asm-arm/arch-at91rm9200/debug-macro.S [new file with mode: 0644]
include/asm-arm/arch-at91rm9200/dma.h [moved from include/asm-arm/arch-epxa10db/dma.h with 89% similarity]
include/asm-arm/arch-at91rm9200/entry-macro.S [new file with mode: 0644]
include/asm-arm/arch-at91rm9200/gpio.h [new file with mode: 0644]
include/asm-arm/arch-at91rm9200/hardware.h [new file with mode: 0644]
include/asm-arm/arch-at91rm9200/io.h [moved from include/asm-arm/arch-epxa10db/io.h with 63% similarity]
include/asm-arm/arch-at91rm9200/irqs.h [new file with mode: 0644]
include/asm-arm/arch-at91rm9200/memory.h [moved from include/asm-arm/arch-epxa10db/memory.h with 78% similarity]
include/asm-arm/arch-at91rm9200/param.h [moved from include/asm-arm/arch-epxa10db/param.h with 80% similarity]
include/asm-arm/arch-at91rm9200/pio.h [new file with mode: 0644]
include/asm-arm/arch-at91rm9200/system.h [moved from include/asm-arm/arch-epxa10db/system.h with 55% similarity]
include/asm-arm/arch-at91rm9200/timex.h [moved from include/asm-arm/arch-epxa10db/timex.h with 77% similarity]
include/asm-arm/arch-at91rm9200/uncompress.h [new file with mode: 0644]
include/asm-arm/arch-at91rm9200/vmalloc.h [moved from include/asm-arm/arch-epxa10db/vmalloc.h with 78% similarity]
include/asm-arm/arch-epxa10db/debug-macro.S [deleted file]
include/asm-arm/arch-epxa10db/entry-macro.S [deleted file]
include/asm-arm/arch-epxa10db/ether00.h [deleted file]
include/asm-arm/arch-epxa10db/excalibur.h [deleted file]
include/asm-arm/arch-epxa10db/hardware.h [deleted file]
include/asm-arm/arch-epxa10db/int_ctrl00.h [deleted file]
include/asm-arm/arch-epxa10db/irqs.h [deleted file]
include/asm-arm/arch-epxa10db/mode_ctrl00.h [deleted file]
include/asm-arm/arch-epxa10db/platform.h [deleted file]
include/asm-arm/arch-epxa10db/pld_conf00.h [deleted file]
include/asm-arm/arch-epxa10db/tdkphy.h [deleted file]
include/asm-arm/arch-epxa10db/timer00.h [deleted file]
include/asm-arm/arch-epxa10db/uart00.h [deleted file]
include/asm-arm/arch-epxa10db/uncompress.h [deleted file]
include/asm-arm/io.h
include/asm-arm/mach/map.h
include/asm-arm/memory.h
include/linux/crypto.h
include/linux/mmc/mmc.h
include/net/act_api.h
include/net/pkt_sched.h
kernel/rcupdate.c
net/core/dev.c
net/core/skbuff.c
net/ipv4/icmp.c
net/ipv4/inet_diag.c
net/ipv4/inetpeer.c
net/ipv4/ip_gre.c
net/ipv4/ip_output.c
net/ipv4/ipip.c
net/ipv4/ipmr.c
net/ipv4/tcp_input.c
net/ipv6/ip6_output.c
net/ipv6/ip6_tunnel.c
net/ipv6/sit.c
net/key/af_key.c
net/sched/Makefile
net/sched/act_api.c
net/sched/act_gact.c [moved from net/sched/gact.c with 98% similarity]
net/sched/act_ipt.c [moved from net/sched/ipt.c with 96% similarity]
net/sched/act_mirred.c [moved from net/sched/mirred.c with 98% similarity]
net/sched/act_pedit.c [moved from net/sched/pedit.c with 98% similarity]
net/sched/act_police.c [moved from net/sched/police.c with 97% similarity]
net/sched/act_simple.c [moved from net/sched/simple.c with 94% similarity]
net/sched/sch_cbq.c
net/sched/sch_hfsc.c
net/sched/sch_htb.c
net/sched/sch_prio.c
net/sched/sch_teql.c
net/sctp/sm_sideeffect.c
net/sunrpc/cache.c
net/sunrpc/svc.c
net/xfrm/xfrm_algo.c
net/xfrm/xfrm_policy.c

index acb010bb087b57f57f8d984aa10061751225eff0..0dc848bf0b56bb59b0c69eacfc3fb4d6a593fb7c 100644 (file)
@@ -998,6 +998,8 @@ running once the system is up.
 
        nowb            [ARM]
 
+       nr_uarts=       [SERIAL] maximum number of UARTs to be registered.
+
        opl3=           [HW,OSS]
                        Format: <io>
 
index 7a74e3e5f9161941d9d3e3613053332ec7e342a5..50b9afa8ae6d09cbb9655cb5654d04dc7ec162e9 100644 (file)
@@ -99,13 +99,6 @@ config ARCH_EBSA110
          Ethernet interface, two PCMCIA sockets, two serial ports and a
          parallel port.
 
-config ARCH_CAMELOT
-       bool "Epxa10db"
-       help
-         This enables support for Altera's Excalibur XA10 development board.
-         If you would like to build your kernel to run on one of these boards
-         then you must say 'Y' here. Otherwise say 'N'
-
 config ARCH_FOOTBRIDGE
        bool "FootBridge"
        select FOOTBRIDGE
@@ -213,12 +206,16 @@ config ARCH_AAEC2000
        help
          This enables support for systems based on the Agilent AAEC-2000
 
+config ARCH_AT91RM9200
+       bool "AT91RM9200"
+       help
+         Say Y here if you intend to run this kernel on an AT91RM9200-based
+         board.
+
 endchoice
 
 source "arch/arm/mach-clps711x/Kconfig"
 
-source "arch/arm/mach-epxa10db/Kconfig"
-
 source "arch/arm/mach-footbridge/Kconfig"
 
 source "arch/arm/mach-integrator/Kconfig"
@@ -253,6 +250,8 @@ source "arch/arm/mach-aaec2000/Kconfig"
 
 source "arch/arm/mach-realview/Kconfig"
 
+source "arch/arm/mach-at91rm9200/Kconfig"
+
 # Definitions to make life easier
 config ARCH_ACORN
        bool
@@ -418,7 +417,8 @@ config LEDS
                   ARCH_EBSA285 || ARCH_IMX || ARCH_INTEGRATOR || \
                   ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \
                   ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \
-                  ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE
+                  ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \
+                  ARCH_AT91RM9200
        help
          If you say Y here, the LEDs on your machine will be used
          to provide useful information about your current system status.
index afaf3a1e903ca8194b99c3c6896314090d3fb35c..1fa2a1011584574c9f1ef9697145ee955d98216b 100644 (file)
@@ -84,7 +84,6 @@ endif
  machine-$(CONFIG_ARCH_PXA)       := pxa
  machine-$(CONFIG_ARCH_L7200)     := l7200
  machine-$(CONFIG_ARCH_INTEGRATOR) := integrator
- machine-$(CONFIG_ARCH_CAMELOT)           := epxa10db
  textofs-$(CONFIG_ARCH_CLPS711X)   := 0x00028000
  machine-$(CONFIG_ARCH_CLPS711X)   := clps711x
  machine-$(CONFIG_ARCH_IOP3XX)    := iop3xx
@@ -100,6 +99,7 @@ endif
  machine-$(CONFIG_ARCH_H720X)     := h720x
  machine-$(CONFIG_ARCH_AAEC2000)   := aaec2000
  machine-$(CONFIG_ARCH_REALVIEW)   := realview
+ machine-$(CONFIG_ARCH_AT91RM9200) := at91rm9200
 
 ifeq ($(CONFIG_ARCH_EBSA110),y)
 # This is what happens if you forget the IOCS16 line.
index 6b505ce41a75623765dbf3e78ba527f36e1f9178..35ffe0f4ece78720c15a448061e0ad55d55af235 100644 (file)
@@ -21,10 +21,6 @@ ifeq ($(CONFIG_ARCH_SHARK),y)
 OBJS           += head-shark.o ofw-shark.o
 endif
 
-ifeq ($(CONFIG_ARCH_CAMELOT),y)
-OBJS           += head-epxa10db.o
-endif
-
 ifeq ($(CONFIG_ARCH_L7200),y)
 OBJS           += head-l7200.o
 endif
@@ -50,6 +46,10 @@ ifeq ($(CONFIG_PXA_SHARPSL),y)
 OBJS           += head-sharpsl.o
 endif
 
+ifeq ($(CONFIG_ARCH_AT91RM9200),y)
+OBJS           += head-at91rm9200.o
+endif
+
 ifeq ($(CONFIG_DEBUG_ICEDCC),y)
 OBJS            += ice-dcc.o
 endif
diff --git a/arch/arm/boot/compressed/head-at91rm9200.S b/arch/arm/boot/compressed/head-at91rm9200.S
new file mode 100644 (file)
index 0000000..2119ea6
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * linux/arch/arm/boot/compressed/head-at91rm9200.S
+ *
+ *  Copyright (C) 2003 SAN People
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ */
+#include <asm/mach-types.h>
+
+               .section        ".start", "ax"
+
+               @ Atmel AT91RM9200-DK : 262
+               mov     r3,     #(MACH_TYPE_AT91RM9200DK & 0xff)
+               orr     r3, r3, #(MACH_TYPE_AT91RM9200DK & 0xff00)
+               cmp     r7, r3
+               beq     99f
+
+               @ Cogent CSB337 : 399
+               mov     r3,     #(MACH_TYPE_CSB337 & 0xff)
+               orr     r3, r3, #(MACH_TYPE_CSB337 & 0xff00)
+               cmp     r7, r3
+               beq     99f
+
+               @ Cogent CSB637 : 648
+               mov     r3,     #(MACH_TYPE_CSB637 & 0xff)
+               orr     r3, r3, #(MACH_TYPE_CSB637 & 0xff00)
+               cmp     r7, r3
+               beq     99f
+
+               @ Atmel AT91RM9200-EK : 705
+               mov     r3,     #(MACH_TYPE_AT91RM9200EK & 0xff)
+               orr     r3, r3, #(MACH_TYPE_AT91RM9200EK & 0xff00)
+               cmp     r7, r3
+               beq     99f
+
+               @ Conitec Carmeva : 769
+               mov     r3,     #(MACH_TYPE_CARMEVA & 0xff)
+               orr     r3, r3, #(MACH_TYPE_CARMEVA & 0xff00)
+               cmp     r7, r3
+               beq     99f
+
+               @ KwikByte KB920x : 612
+               mov     r3,     #(MACH_TYPE_KB9200 & 0xff)
+               orr     r3, r3, #(MACH_TYPE_KB9200 & 0xff00)
+               cmp     r7, r3
+               beq     99f
+
+               @ Unknown board, use the AT91RM9200DK board
+               @ mov   r7, #MACH_TYPE_AT91RM9200
+               mov     r7,     #(MACH_TYPE_AT91RM9200DK & 0xff)
+               orr     r7, r7, #(MACH_TYPE_AT91RM9200DK & 0xff00)
+
+99:
diff --git a/arch/arm/boot/compressed/head-epxa10db.S b/arch/arm/boot/compressed/head-epxa10db.S
deleted file mode 100644 (file)
index 757681f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <asm/mach-types.h>
-#include <asm/arch/excalibur.h>
-
-               .section        ".start", "ax"
-               mov     r7, #MACH_TYPE_CAMELOT
index ccbb4c0d58c48694d6275b2bdaf9a63af7d59985..089c9d598409ca4ce27d23beee02519c9e2507d4 100644 (file)
@@ -63,7 +63,6 @@ CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 5d92af975d870ae59b162d33e7ca49e56cca924d..cfe6bd8e81cdbccc14873a221f2ecb81b3aa5cfa 100644 (file)
@@ -66,7 +66,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 35e3a99bcbb688e0ab9a6c096c9421db4021ef8d..6886001b53666acc69f1adc802e73b7c8883446f 100644 (file)
@@ -64,7 +64,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index d8fe0f40408f68c98cb9d3ba9749807d7138b841..f81a60005cd306eaa965c502c19e427790de576a 100644 (file)
@@ -65,7 +65,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 9087583714058469618c547f7fdd1c2d1f71131d..af9ae5389131b06df21d41b2fb62b1f1c5fbd725 100644 (file)
@@ -57,7 +57,6 @@ CONFIG_ARCH_CLPS7500=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 40dfe07a8bcee0d947e170e1450a61c868204672..15468a0cf70e8de3583c2ad531f34e1a8992e884 100644 (file)
@@ -71,7 +71,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 06229026f78bf7b450bfe2f7b6122f3d0aa59b33..3c3461e83398c1d78bec1f7c22e783c570252100 100644 (file)
@@ -87,7 +87,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 6f61929b97a89b3afea9dc3114e1e5f5e25419d9..afcfff6140f275ca518a1b765ecb62c5d377fc17 100644 (file)
@@ -63,7 +63,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 CONFIG_ARCH_EBSA110=y
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 78b08ed4d5f44798b8236a3ad12efe9637e181a7..6ba7355ff85b7765e584ef76249cdda9ddb8913a 100644 (file)
@@ -57,7 +57,6 @@ CONFIG_BASE_SMALL=0
 CONFIG_ARCH_CLPS711X=y
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index fd7c0042bccaad22b1ba820104b5e30d9e905468..9592e3925c7925906a7bca0399db015ee374ff0d 100644 (file)
@@ -86,7 +86,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 96342afa9c5f88570ababd51d9a4ff582bd9227a..fbe312e757cb17f4267b3ee8b5ee477280083d0b 100644 (file)
@@ -64,7 +64,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 CONFIG_ARCH_IOP3XX=y
diff --git a/arch/arm/configs/epxa10db_defconfig b/arch/arm/configs/epxa10db_defconfig
deleted file mode 100644 (file)
index 9fb8b58..0000000
+++ /dev/null
@@ -1,644 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.12-rc1-bk2
-# Sun Mar 27 22:46:51 2005
-#
-CONFIG_ARM=y
-CONFIG_MMU=y
-CONFIG_UID16=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_GENERIC_IOMAP=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-CONFIG_BROKEN_ON_SMP=y
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-# CONFIG_POSIX_MQUEUE is not set
-# CONFIG_BSD_PROCESS_ACCT is not set
-CONFIG_SYSCTL=y
-# CONFIG_AUDIT is not set
-# CONFIG_HOTPLUG is not set
-CONFIG_KOBJECT_UEVENT=y
-# CONFIG_IKCONFIG is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-# CONFIG_MODVERSIONS is not set
-# CONFIG_MODULE_SRCVERSION_ALL is not set
-# CONFIG_KMOD is not set
-
-#
-# System Type
-#
-# CONFIG_ARCH_CLPS7500 is not set
-# CONFIG_ARCH_CLPS711X is not set
-# CONFIG_ARCH_CO285 is not set
-# CONFIG_ARCH_EBSA110 is not set
-CONFIG_ARCH_CAMELOT=y
-# CONFIG_ARCH_FOOTBRIDGE is not set
-# CONFIG_ARCH_INTEGRATOR is not set
-# CONFIG_ARCH_IOP3XX is not set
-# CONFIG_ARCH_IXP4XX is not set
-# CONFIG_ARCH_IXP2000 is not set
-# CONFIG_ARCH_L7200 is not set
-# CONFIG_ARCH_PXA is not set
-# CONFIG_ARCH_RPC is not set
-# CONFIG_ARCH_SA1100 is not set
-# CONFIG_ARCH_S3C2410 is not set
-# CONFIG_ARCH_SHARK is not set
-# CONFIG_ARCH_LH7A40X is not set
-# CONFIG_ARCH_OMAP is not set
-# CONFIG_ARCH_VERSATILE is not set
-# CONFIG_ARCH_IMX is not set
-# CONFIG_ARCH_H720X is not set
-
-#
-# Epxa10db
-#
-
-#
-# PLD hotswap support
-#
-CONFIG_PLD=y
-# CONFIG_PLD_HOTSWAP is not set
-
-#
-# Processor Type
-#
-CONFIG_CPU_32=y
-CONFIG_CPU_ARM922T=y
-CONFIG_CPU_32v4=y
-CONFIG_CPU_ABRT_EV4T=y
-CONFIG_CPU_CACHE_V4WT=y
-CONFIG_CPU_CACHE_VIVT=y
-CONFIG_CPU_COPY_V4WB=y
-CONFIG_CPU_TLB_V4WBI=y
-
-#
-# Processor Features
-#
-# CONFIG_ARM_THUMB is not set
-# CONFIG_CPU_ICACHE_DISABLE is not set
-# CONFIG_CPU_DCACHE_DISABLE is not set
-# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
-
-#
-# Bus support
-#
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-# CONFIG_PCCARD is not set
-
-#
-# Kernel Features
-#
-# CONFIG_PREEMPT is not set
-CONFIG_ALIGNMENT_TRAP=y
-
-#
-# Boot options
-#
-CONFIG_ZBOOT_ROM_TEXT=0x0
-CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE="mem=32M console=ttyUA0,115200 initrd=0x00200000,8M root=/dev/ram0 rw"
-# CONFIG_XIP_KERNEL is not set
-
-#
-# Floating point emulation
-#
-
-#
-# At least one emulation must be selected
-#
-CONFIG_FPE_NWFPE=y
-# CONFIG_FPE_NWFPE_XP is not set
-# CONFIG_FPE_FASTFPE is not set
-
-#
-# Userspace binary formats
-#
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_AOUT is not set
-# CONFIG_BINFMT_MISC is not set
-# CONFIG_ARTHUR is not set
-
-#
-# Power management options
-#
-# CONFIG_PM is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_FW_LOADER is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
-# CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-
-#
-# Block devices
-#
-# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=y
-# CONFIG_BLK_DEV_CRYPTOLOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=8192
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
-# CONFIG_CDROM_PKTCDVD is not set
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_ATA_OVER_ETH is not set
-
-#
-# SCSI device support
-#
-# CONFIG_SCSI is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
-
-#
-# IEEE 1394 (FireWire) support
-#
-
-#
-# I2O device support
-#
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-# CONFIG_NETLINK_DEV is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
-# CONFIG_IP_PNP_BOOTP is not set
-# CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_INET_TUNNEL is not set
-# CONFIG_IP_TCPDIAG is not set
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
-CONFIG_NETDEVICES=y
-# CONFIG_DUMMY is not set
-# CONFIG_BONDING is not set
-# CONFIG_EQUALIZER is not set
-# CONFIG_TUN is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-# CONFIG_NET_ETHERNET is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-
-#
-# Ethernet (10000 Mbit)
-#
-
-#
-# Token Ring devices
-#
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-CONFIG_PPP=y
-CONFIG_PPP_MULTILINK=y
-# CONFIG_PPP_FILTER is not set
-CONFIG_PPP_ASYNC=y
-CONFIG_PPP_SYNC_TTY=y
-CONFIG_PPP_DEFLATE=y
-# CONFIG_PPP_BSDCOMP is not set
-# CONFIG_PPPOE is not set
-# CONFIG_SLIP is not set
-# CONFIG_SHAPER is not set
-# CONFIG_NETCONSOLE is not set
-
-#
-# ISDN subsystem
-#
-# CONFIG_ISDN is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-# CONFIG_INPUT_EVDEV is not set
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-# CONFIG_INPUT_KEYBOARD is not set
-# CONFIG_INPUT_MOUSE is not set
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-# CONFIG_INPUT_MISC is not set
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_RAW is not set
-# CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-# CONFIG_SERIAL_NONSTANDARD is not set
-
-#
-# Serial drivers
-#
-# CONFIG_SERIAL_8250 is not set
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_UART00=y
-CONFIG_SERIAL_UART00_CONSOLE=y
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-
-#
-# IPMI
-#
-# CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-# CONFIG_WATCHDOG is not set
-# CONFIG_NVRAM is not set
-# CONFIG_RTC is not set
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_DRM is not set
-# CONFIG_RAW_DRIVER is not set
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-
-#
-# I2C support
-#
-# CONFIG_I2C is not set
-
-#
-# Misc devices
-#
-
-#
-# Multimedia devices
-#
-# CONFIG_VIDEO_DEV is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-
-#
-# Graphics support
-#
-# CONFIG_FB is not set
-
-#
-# Console display driver support
-#
-# CONFIG_VGA_CONSOLE is not set
-CONFIG_DUMMY_CONSOLE=y
-
-#
-# Sound
-#
-# CONFIG_SOUND is not set
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-# CONFIG_USB_ARCH_HAS_OHCI is not set
-# CONFIG_USB is not set
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-# CONFIG_MMC is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-# CONFIG_EXT2_FS_XATTR is not set
-# CONFIG_EXT3_FS is not set
-# CONFIG_JBD is not set
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-
-#
-# XFS support
-#
-# CONFIG_XFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-# CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
-CONFIG_AUTOFS_FS=y
-CONFIG_AUTOFS4_FS=y
-
-#
-# CD-ROM/DVD Filesystems
-#
-# CONFIG_ISO9660_FS is not set
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
-# CONFIG_DEVPTS_FS_XATTR is not set
-# CONFIG_TMPFS is not set
-# CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-# CONFIG_NFS_FS is not set
-# CONFIG_NFSD is not set
-CONFIG_SMB_FS=y
-# CONFIG_SMB_NLS_DEFAULT is not set
-# CONFIG_CIFS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-# CONFIG_PARTITION_ADVANCED is not set
-CONFIG_MSDOS_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="iso8859-1"
-# CONFIG_NLS_CODEPAGE_437 is not set
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ASCII is not set
-# CONFIG_NLS_ISO8859_1 is not set
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
-
-#
-# Profiling support
-#
-# CONFIG_PROFILING is not set
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-# CONFIG_DEBUG_KERNEL is not set
-CONFIG_LOG_BUF_SHIFT=14
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_FRAME_POINTER=y
-# CONFIG_DEBUG_USER is not set
-
-#
-# Security options
-#
-# CONFIG_KEYS is not set
-# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
-# CONFIG_CRYPTO is not set
-
-#
-# Hardware crypto devices
-#
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=y
-CONFIG_CRC32=y
-# CONFIG_LIBCRC32C is not set
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=y
index 9737c48507210685db7a980e88cfe2a9c9b97329..2a612d23120b0d01d2e3a13d40779287f2b76600 100644 (file)
@@ -63,7 +63,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 CONFIG_ARCH_FOOTBRIDGE=y
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index b6f688d850dcb57573081fd9d5b51fd955fcff56..65dc73a88c439276d6e4df0cc2768b73fd18d890 100644 (file)
@@ -57,7 +57,6 @@ CONFIG_BASE_SMALL=0
 CONFIG_ARCH_CLPS711X=y
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index b9de07de80feac1f708039d39940864c5192c94b..7a0da0b7facb09b65bcc949ca997fe8d2c170278 100644 (file)
@@ -65,7 +65,6 @@ CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 39c13a354541739f2308fc1afd205efff259cdb5..116920aecef7847a8164b16bb00f3b8753fa0640 100644 (file)
@@ -60,7 +60,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index fbf5c244c696f46a47d0aeb24e837582cf92d4eb..9d62ed16bf57b016da6861bee0aa5d68d243c240 100644 (file)
@@ -63,7 +63,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index fb41a36a5a68fe42ce39f08a3367b9abf984ac6b..a45b57582b86e1809408ac7d3fa46296246533e9 100644 (file)
@@ -66,7 +66,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 27ee768252547883922675ea816dc3070d72b400..d1ba7fdde818f1cf74af8a1ebefe0384e32076ae 100644 (file)
@@ -65,7 +65,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 CONFIG_ARCH_INTEGRATOR=y
 # CONFIG_ARCH_IOP3XX is not set
index e71443b9739088d939bd519c38fa26f411c1008e..c07628ceaf0c46aa60ded382c7db861a116bbcbe 100644 (file)
@@ -65,7 +65,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 CONFIG_ARCH_IOP3XX=y
index ab5ad23b27da03a329c9ac516a4ae864c7649880..18fa1615fdfdd7f64c6cd46152cb6d3a0d4aee25 100644 (file)
@@ -64,7 +64,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 CONFIG_ARCH_IOP3XX=y
index bb536133ef87d79cad96cb421f98e5c89d8428fd..f50035de1fff2196e2dd03e966d3fdd7b8c3e3ee 100644 (file)
@@ -64,7 +64,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 CONFIG_ARCH_IOP3XX=y
index 305f01f3a7299c64666a0d7da9d60ee57bb7361a..18b3f372ed68a46eb9618abe67c5fac216b8b5d0 100644 (file)
@@ -64,7 +64,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 CONFIG_ARCH_IOP3XX=y
index e6a4d2656fe53d17ad605a9ce83690074b41b797..d9d6bb86a6fa3829702cd02b1aad1a374cb37614 100644 (file)
@@ -86,7 +86,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 5572cf95d5f852aed0c7066e53b3739a2eeb92b0..2dc9d499c7d787dac9deea92b918c4f09c4506f5 100644 (file)
@@ -86,7 +86,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 0fddbde858359c6a7b09d2a31e80e0bfa2557278..4248123815e98ebc18ffc130a3460c5daa5e9ff5 100644 (file)
@@ -86,7 +86,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 89b9aa06aa9108898fbca8ebc511ebb8fc4e4b46..ea8f4b478fa3f91fa2eb761f7007e27b9503e651 100644 (file)
@@ -86,7 +86,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 613afab62720a1ca89182a44095173b9ced4826b..4975b914f923407667579aee4aae907c80f4bdb8 100644 (file)
@@ -85,7 +85,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index b88aeba82bc0dda567f6571f330cb7a46325ed63..ad1048db96fbd69ef1d1abf23808e53aa21f5028 100644 (file)
@@ -63,7 +63,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 7033829ed1452a11e6d20e7632fd1c286c74de70..c3a932844160eeef9b8a87ed2c4d32f5a067be72 100644 (file)
@@ -62,7 +62,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index d64706d3ff359b1d410ed3fd546fdf6fb86b7230..67eaa26c2647ea83969238ddf26c941a813d0e72 100644 (file)
@@ -60,7 +60,6 @@ CONFIG_BASE_SMALL=0
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 87cbedfb303f51a77616feaae09628cb1d348457..208d591ebfcec722567c0475da4bad8f2b6efea1 100644 (file)
@@ -60,7 +60,6 @@ CONFIG_BASE_SMALL=0
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 4bc8717c6f57922da4784371457e26863ca38230..81daadcbe0ba3f4f202fd8cd8d520302cba71ec6 100644 (file)
@@ -63,7 +63,6 @@ CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 3ca64cabc92c8161e00e980764cb68f17890c62e..42f6a77bc3c0af6c5d1c12c78df50ea7e9ef2c4c 100644 (file)
@@ -62,7 +62,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 153d68594beb542f28a2a0d8b538b2a99e5a7b62..b112bd75bda2f5a302785302c8d0091e3413a32f 100644 (file)
@@ -63,7 +63,6 @@ CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 6517d167acf09e111f2d247f7a6f176bcff1a65f..d16f6cd6e0390affdc5b865463fa691d89b3591f 100644 (file)
@@ -63,7 +63,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 7fb1f7c7bf433bc1bc03ed48f7b68bef4ae989fe..3d35255c64ed7a10052c639872b3f6a826ca4375 100644 (file)
@@ -65,7 +65,6 @@ CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 6e81acf94c2f1c47817129c5393e118a0d4ca2b7..2cae1ead9f9bdccc0b8e739583587210a76e0e67 100644 (file)
@@ -58,7 +58,6 @@ CONFIG_BASE_SMALL=0
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 CONFIG_ARCH_FOOTBRIDGE=y
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 529f0f72e1e9ca60d5fde4cabf9ff2d9fa4543ef..ee3ecbd9002d0c9e890bdced3087da122b047902 100644 (file)
@@ -85,7 +85,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 10fec890578dd9b69b0b3e3162074d9315a43be3..24e8bdd4cb91c1e67d6c88fc030bdb294542e482 100644 (file)
@@ -63,7 +63,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 21c327883d8cd167ea6f55dd9fbdf01f497fe851..b71d31a4bb56632eb379e53f1abdc70eeaae5acd 100644 (file)
@@ -63,7 +63,6 @@ CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 0485b2f1cc2021494bbe23f6cd51125db04d4aa4..3f1ec4e304f7f532209298db418867a72e81f40d 100644 (file)
@@ -65,7 +65,6 @@ CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 19184c1010adff886530ebd0c5c471d8532a423a..b498afdc03b6b19ca98aecc119bbca7ec4c4b76c 100644 (file)
@@ -66,7 +66,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 3f97590c91f22b7d17cf5af8b6ec59af9ec329e7..33f31080a98c4e0a54833f324d498beaf72ce13f 100644 (file)
@@ -85,7 +85,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index e3facc4fe792c1743a86723369972e03b42dec3d..d052c8f80515bd89d92b4f6fe343966a4c45242f 100644 (file)
@@ -62,7 +62,6 @@ CONFIG_OBSOLETE_MODPARM=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 271823f0d70827f30f3c48f5f42cfec6faa16c00..c48d17062262e0c5d4b49cd17e75352cfcb9ec82 100644 (file)
@@ -66,7 +66,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 5373eeb7d578f39b89011452865cdf22fcb62a28..2e5a616cc98dde92d1e1dc1a4d5a1dc1c9b4d4a7 100644 (file)
@@ -64,7 +64,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 2c60865fda19ecd8faa5b8eb6ff18d025e18600f..4d123d33c7df51c6c2fc6fefaed6ac8e30b11cbf 100644 (file)
@@ -58,7 +58,6 @@ CONFIG_BASE_SMALL=0
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index 9895539533d6676bcbe84e772fa175f15fdb41ba..d1ace3abfd8a603067c94a79a394eec5bfa821c1 100644 (file)
@@ -87,7 +87,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index d72f2c754268e1a42108b7174c32e1035b7e8a4a..2687a225aa6ac20fe4c4e5c6c2a26a273c4de378 100644 (file)
@@ -64,7 +64,6 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
 # CONFIG_ARCH_EBSA110 is not set
-# CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
 # CONFIG_ARCH_IOP3XX is not set
index b5645c4462cffa95f5887d2cf8b8c9cfcbd2e4a1..1d50d2b98f55a6a0d2835e506c94e6c06dfda0c4 100644 (file)
@@ -710,7 +710,8 @@ int setup_irq(unsigned int irq, struct irqaction *new)
                desc->pending = 0;
                desc->disable_depth = 1;
 
-               if (new->flags & SA_TRIGGER_MASK) {
+               if (new->flags & SA_TRIGGER_MASK &&
+                   desc->chip->set_type) {
                        unsigned int type = new->flags & SA_TRIGGER_MASK;
                        desc->chip->set_type(irq, type);
                }
diff --git a/arch/arm/mach-at91rm9200/Kconfig b/arch/arm/mach-at91rm9200/Kconfig
new file mode 100644 (file)
index 0000000..4b7218f
--- /dev/null
@@ -0,0 +1,54 @@
+if ARCH_AT91RM9200
+
+menu "AT91RM9200 Implementations"
+
+comment "AT91RM9200 Board Type"
+
+config ARCH_AT91RM9200DK
+       bool "Atmel AT91RM9200-DK Development board"
+       depends on ARCH_AT91RM9200
+       help
+         Select this if you are using Atmel's AT91RM9200-DK Development board
+
+config MACH_AT91RM9200EK
+       bool "Atmel AT91RM9200-EK Evaluation Kit"
+       depends on ARCH_AT91RM9200
+       help
+         Select this if you are using Atmel's AT91RM9200-EK Evaluation Kit
+
+config MACH_CSB337
+       bool "Cogent CSB337 board"
+       depends on ARCH_AT91RM9200
+       help
+         Select this if you are using Cogent's CSB337 board
+
+config MACH_CSB637
+       bool "Cogent CSB637 board"
+       depends on ARCH_AT91RM9200
+       help
+         Select this if you are using Cogent's CSB637 board
+
+config MACH_CARMEVA
+       bool "Conitec's ARM&EVA"
+       depends on ARCH_AT91RM9200
+       help
+         Select this if you are using Conitec's AT91RM9200-MCU-Module
+
+config MACH_KB9200
+       bool "KwikByte's KB920x"
+       depends on ARCH_AT91RM9200
+       help
+         Select this if you are using KwikByte's KB920x board
+
+
+comment "AT91RM9200 Feature Selections"
+
+config AT91_PROGRAMMABLE_CLOCKS
+       bool "Programmable Clocks"
+       help
+         Select this if you need to program one or more of the PCK0..PCK3
+         programmable clock outputs.
+
+endmenu
+
+endif
diff --git a/arch/arm/mach-at91rm9200/Makefile b/arch/arm/mach-at91rm9200/Makefile
new file mode 100644 (file)
index 0000000..1f2805c
--- /dev/null
@@ -0,0 +1,27 @@
+#
+# Makefile for the linux kernel.
+#
+
+obj-y          := clock.o irq.o time.o gpio.o common.o devices.o
+obj-m          :=
+obj-n          :=
+obj-           :=
+
+# Board-specific support
+#obj-$(CONFIG_ARCH_AT91RM9200DK)       += board-dk.o
+#obj-$(CONFIG_MACH_AT91RM9200EK)       += board-ek.o
+#obj-$(CONFIG_MACH_CSB337)     += board-csb337.o
+#obj-$(CONFIG_MACH_CSB637)     += board-csb637.o
+#obj-$(CONFIG_MACH_CARMEVA)    += board-carmeva.o
+#obj-$(CONFIG_MACH_KB9200)     += board-kb9202.o
+
+# LEDs support
+#led-$(CONFIG_ARCH_AT91RM9200DK)       += leds.o
+#led-$(CONFIG_MACH_AT91RM9200EK)       += leds.o
+#led-$(CONFIG_MACH_CSB337)     += leds.o
+#led-$(CONFIG_MACH_CSB637)     += leds.o
+#led-$(CONFIG_MACH_KB9200)     += leds.o
+obj-$(CONFIG_LEDS) += $(led-y)
+
+# VGA support
+#obj-$(CONFIG_FB_S1D13XXX)     += ics1523.o
diff --git a/arch/arm/mach-at91rm9200/Makefile.boot b/arch/arm/mach-at91rm9200/Makefile.boot
new file mode 100644 (file)
index 0000000..e667dcc
--- /dev/null
@@ -0,0 +1,9 @@
+# Note: the following conditions must always be true:
+#   ZRELADDR == virt_to_phys(TEXTADDR)
+#   PARAMS_PHYS must be within 4MB of ZRELADDR
+#   INITRD_PHYS must be in RAM
+
+   zreladdr-y  := 0x20008000
+params_phys-y  := 0x20000100
+initrd_phys-y  := 0x20410000
+
diff --git a/arch/arm/mach-at91rm9200/clock.c b/arch/arm/mach-at91rm9200/clock.c
new file mode 100644 (file)
index 0000000..ec8195a
--- /dev/null
@@ -0,0 +1,620 @@
+/*
+ * linux/arch/arm/mach-at91rm9200/clock.c
+ *
+ * Copyright (C) 2005 David Brownell
+ * Copyright (C) 2005 Ivan Kokshaysky
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/fs.h>
+#include <linux/debugfs.h>
+#include <linux/seq_file.h>
+#include <linux/list.h>
+#include <linux/errno.h>
+#include <linux/err.h>
+#include <linux/spinlock.h>
+#include <linux/delay.h>
+#include <linux/clk.h>
+
+#include <asm/semaphore.h>
+#include <asm/io.h>
+#include <asm/mach-types.h>
+
+#include <asm/arch/hardware.h>
+#include <asm/arch/board.h>            /* for master clock global */
+
+#include "generic.h"
+
+#undef DEBUG
+
+/*
+ * There's a lot more which can be done with clocks, including cpufreq
+ * integration, slow clock mode support (for system suspend), letting
+ * PLLB be used at other rates (on boards that don't need USB), etc.
+ */
+
+struct clk {
+       const char      *name;
+       unsigned long   rate_hz;
+       struct clk      *parent;
+       u32             pmc_mask;
+       void            (*mode)(struct clk *, int);
+       unsigned        id:2;           /* PCK0..3, or 32k/main/a/b */
+       unsigned        primary:1;
+       unsigned        pll:1;
+       unsigned        programmable:1;
+       u16             users;
+};
+
+static spinlock_t      clk_lock;
+static u32             at91_pllb_usb_init;
+
+/*
+ * Four primary clock sources:  two crystal oscillators (32K, main), and
+ * two PLLs.  PLLA usually runs the master clock; and PLLB must run at
+ * 48 MHz (unless no USB function clocks are needed).  The main clock and
+ * both PLLs are turned off to run in "slow clock mode" (system suspend).
+ */
+static struct clk clk32k = {
+       .name           = "clk32k",
+       .rate_hz        = AT91_SLOW_CLOCK,
+       .users          = 1,            /* always on */
+       .id             = 0,
+       .primary        = 1,
+};
+static struct clk main_clk = {
+       .name           = "main",
+       .pmc_mask       = 1 << 0,       /* in PMC_SR */
+       .users          = 1,
+       .id             = 1,
+       .primary        = 1,
+};
+static struct clk plla = {
+       .name           = "plla",
+       .parent         = &main_clk,
+       .pmc_mask       = 1 << 1,       /* in PMC_SR */
+       .id             = 2,
+       .primary        = 1,
+       .pll            = 1,
+};
+
+static void pllb_mode(struct clk *clk, int is_on)
+{
+       u32     value;
+
+       if (is_on) {
+               is_on = AT91_PMC_LOCKB;
+               value = at91_pllb_usb_init;
+       } else
+               value = 0;
+
+       at91_sys_write(AT91_CKGR_PLLBR, value);
+
+       do {
+               cpu_relax();
+       } while ((at91_sys_read(AT91_PMC_SR) & AT91_PMC_LOCKB) != is_on);
+}
+
+static struct clk pllb = {
+       .name           = "pllb",
+       .parent         = &main_clk,
+       .pmc_mask       = 1 << 2,       /* in PMC_SR */
+       .mode           = pllb_mode,
+       .id             = 3,
+       .primary        = 1,
+       .pll            = 1,
+};
+
+static void pmc_sys_mode(struct clk *clk, int is_on)
+{
+       if (is_on)
+               at91_sys_write(AT91_PMC_SCER, clk->pmc_mask);
+       else
+               at91_sys_write(AT91_PMC_SCDR, clk->pmc_mask);
+}
+
+/* USB function clocks (PLLB must be 48 MHz) */
+static struct clk udpck = {
+       .name           = "udpck",
+       .parent         = &pllb,
+       .pmc_mask       = AT91_PMC_UDP,
+       .mode           = pmc_sys_mode,
+};
+static struct clk uhpck = {
+       .name           = "uhpck",
+       .parent         = &pllb,
+       .pmc_mask       = AT91_PMC_UHP,
+       .mode           = pmc_sys_mode,
+};
+
+#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
+/*
+ * The four programmable clocks can be parented by any primary clock.
+ * You must configure pin multiplexing to bring these signals out.
+ */
+static struct clk pck0 = {
+       .name           = "pck0",
+       .pmc_mask       = AT91_PMC_PCK0,
+       .mode           = pmc_sys_mode,
+       .programmable   = 1,
+       .id             = 0,
+};
+static struct clk pck1 = {
+       .name           = "pck1",
+       .pmc_mask       = AT91_PMC_PCK1,
+       .mode           = pmc_sys_mode,
+       .programmable   = 1,
+       .id             = 1,
+};
+static struct clk pck2 = {
+       .name           = "pck2",
+       .pmc_mask       = AT91_PMC_PCK2,
+       .mode           = pmc_sys_mode,
+       .programmable   = 1,
+       .id             = 2,
+};
+static struct clk pck3 = {
+       .name           = "pck3",
+       .pmc_mask       = AT91_PMC_PCK3,
+       .mode           = pmc_sys_mode,
+       .programmable   = 1,
+       .id             = 3,
+};
+#endif /* CONFIG_AT91_PROGRAMMABLE_CLOCKS */
+
+
+/*
+ * The master clock is divided from the CPU clock (by 1-4).  It's used for
+ * memory, interfaces to on-chip peripherals, the AIC, and sometimes more
+ * (e.g baud rate generation).  It's sourced from one of the primary clocks.
+ */
+static struct clk mck = {
+       .name           = "mck",
+       .pmc_mask       = 1 << 3,       /* in PMC_SR */
+       .users          = 1,            /* (must be) always on */
+};
+
+static void pmc_periph_mode(struct clk *clk, int is_on)
+{
+       if (is_on)
+               at91_sys_write(AT91_PMC_PCER, clk->pmc_mask);
+       else
+               at91_sys_write(AT91_PMC_PCDR, clk->pmc_mask);
+}
+
+static struct clk udc_clk = {
+       .name           = "udc_clk",
+       .parent         = &mck,
+       .pmc_mask       = 1 << AT91_ID_UDP,
+       .mode           = pmc_periph_mode,
+};
+static struct clk ohci_clk = {
+       .name           = "ohci_clk",
+       .parent         = &mck,
+       .pmc_mask       = 1 << AT91_ID_UHP,
+       .mode           = pmc_periph_mode,
+};
+
+static struct clk *const clock_list[] = {
+       /* four primary clocks -- MUST BE FIRST! */
+       &clk32k,
+       &main_clk,
+       &plla,
+       &pllb,
+
+       /* PLLB children (USB) */
+       &udpck,
+       &uhpck,
+
+#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
+       /* programmable clocks */
+       &pck0,
+       &pck1,
+       &pck2,
+       &pck3,
+#endif /* CONFIG_AT91_PROGRAMMABLE_CLOCKS */
+
+       /* MCK and peripherals */
+       &mck,
+       // usart0..usart3
+       // mmc
+       &udc_clk,
+       // i2c
+       // spi
+       // ssc0..ssc2
+       // tc0..tc5
+       &ohci_clk,
+       // ether
+};
+
+
+/* clocks are all static for now; no refcounting necessary */
+struct clk *clk_get(struct device *dev, const char *id)
+{
+       int i;
+
+       for (i = 0; i < ARRAY_SIZE(clock_list); i++) {
+               if (strcmp(id, clock_list[i]->name) == 0)
+                       return clock_list[i];
+       }
+
+       return ERR_PTR(-ENOENT);
+}
+EXPORT_SYMBOL(clk_get);
+
+void clk_put(struct clk *clk)
+{
+}
+EXPORT_SYMBOL(clk_put);
+
+static void __clk_enable(struct clk *clk)
+{
+       if (clk->parent)
+               __clk_enable(clk->parent);
+       if (clk->users++ == 0 && clk->mode)
+               clk->mode(clk, 1);
+}
+
+int clk_enable(struct clk *clk)
+{
+       unsigned long   flags;
+
+       spin_lock_irqsave(&clk_lock, flags);
+       __clk_enable(clk);
+       spin_unlock_irqrestore(&clk_lock, flags);
+       return 0;
+}
+EXPORT_SYMBOL(clk_enable);
+
+static void __clk_disable(struct clk *clk)
+{
+       BUG_ON(clk->users == 0);
+       if (--clk->users == 0 && clk->mode)
+               clk->mode(clk, 0);
+       if (clk->parent)
+               __clk_disable(clk->parent);
+}
+
+void clk_disable(struct clk *clk)
+{
+       unsigned long   flags;
+
+       spin_lock_irqsave(&clk_lock, flags);
+       __clk_disable(clk);
+       spin_unlock_irqrestore(&clk_lock, flags);
+}
+EXPORT_SYMBOL(clk_disable);
+
+unsigned long clk_get_rate(struct clk *clk)
+{
+       unsigned long   flags;
+       unsigned long   rate;
+
+       spin_lock_irqsave(&clk_lock, flags);
+       for (;;) {
+               rate = clk->rate_hz;
+               if (rate || !clk->parent)
+                       break;
+               clk = clk->parent;
+       }
+       spin_unlock_irqrestore(&clk_lock, flags);
+       return rate;
+}
+EXPORT_SYMBOL(clk_get_rate);
+
+/*------------------------------------------------------------------------*/
+
+#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
+
+/*
+ * For now, only the programmable clocks support reparenting (MCK could
+ * do this too, with care) or rate changing (the PLLs could do this too,
+ * ditto MCK but that's more for cpufreq).  Drivers may reparent to get
+ * a better rate match; we don't.
+ */
+
+long clk_round_rate(struct clk *clk, unsigned long rate)
+{
+       unsigned long   flags;
+       unsigned        prescale;
+       unsigned long   actual;
+
+       if (!clk->programmable)
+               return -EINVAL;
+       spin_lock_irqsave(&clk_lock, flags);
+
+       actual = clk->parent->rate_hz;
+       for (prescale = 0; prescale < 7; prescale++) {
+               if (actual && actual <= rate)
+                       break;
+               actual >>= 1;
+       }
+
+       spin_unlock_irqrestore(&clk_lock, flags);
+       return (prescale < 7) ? actual : -ENOENT;
+}
+EXPORT_SYMBOL(clk_round_rate);
+
+int clk_set_rate(struct clk *clk, unsigned long rate)
+{
+       unsigned long   flags;
+       unsigned        prescale;
+       unsigned long   actual;
+
+       if (!clk->programmable)
+               return -EINVAL;
+       if (clk->users)
+               return -EBUSY;
+       spin_lock_irqsave(&clk_lock, flags);
+
+       actual = clk->parent->rate_hz;
+       for (prescale = 0; prescale < 7; prescale++) {
+               if (actual && actual <= rate) {
+                       u32     pckr;
+
+                       pckr = at91_sys_read(AT91_PMC_PCKR(clk->id));
+                       pckr &= 0x03;
+                       pckr |= prescale << 2;
+                       at91_sys_write(AT91_PMC_PCKR(clk->id), pckr);
+                       clk->rate_hz = actual;
+                       break;
+               }
+               actual >>= 1;
+       }
+
+       spin_unlock_irqrestore(&clk_lock, flags);
+       return (prescale < 7) ? actual : -ENOENT;
+}
+EXPORT_SYMBOL(clk_set_rate);
+
+struct clk *clk_get_parent(struct clk *clk)
+{
+       return clk->parent;
+}
+EXPORT_SYMBOL(clk_get_parent);
+
+int clk_set_parent(struct clk *clk, struct clk *parent)
+{
+       unsigned long   flags;
+
+       if (clk->users)
+               return -EBUSY;
+       if (!parent->primary || !clk->programmable)
+               return -EINVAL;
+       spin_lock_irqsave(&clk_lock, flags);
+
+       clk->rate_hz = parent->rate_hz;
+       clk->parent = parent;
+       at91_sys_write(AT91_PMC_PCKR(clk->id), parent->id);
+
+       spin_unlock_irqrestore(&clk_lock, flags);
+       return 0;
+}
+EXPORT_SYMBOL(clk_set_parent);
+
+#endif /* CONFIG_AT91_PROGRAMMABLE_CLOCKS */
+
+/*------------------------------------------------------------------------*/
+
+#ifdef CONFIG_DEBUG_FS
+
+static int at91_clk_show(struct seq_file *s, void *unused)
+{
+       u32             scsr, pcsr, sr;
+       unsigned        i;
+
+       seq_printf(s, "SCSR = %8x\n", scsr = at91_sys_read(AT91_PMC_SCSR));
+       seq_printf(s, "PCSR = %8x\n", pcsr = at91_sys_read(AT91_PMC_PCSR));
+
+       seq_printf(s, "MOR  = %8x\n", at91_sys_read(AT91_CKGR_MOR));
+       seq_printf(s, "MCFR = %8x\n", at91_sys_read(AT91_CKGR_MCFR));
+       seq_printf(s, "PLLA = %8x\n", at91_sys_read(AT91_CKGR_PLLAR));
+       seq_printf(s, "PLLB = %8x\n", at91_sys_read(AT91_CKGR_PLLBR));
+
+       seq_printf(s, "MCKR = %8x\n", at91_sys_read(AT91_PMC_MCKR));
+       for (i = 0; i < 4; i++)
+               seq_printf(s, "PCK%d = %8x\n", i, at91_sys_read(AT91_PMC_PCKR(i)));
+       seq_printf(s, "SR   = %8x\n", sr = at91_sys_read(AT91_PMC_SR));
+
+       seq_printf(s, "\n");
+
+       for (i = 0; i < ARRAY_SIZE(clock_list); i++) {
+               char            *state;
+               struct clk      *clk = clock_list[i];
+
+               if (clk->mode == pmc_sys_mode)
+                       state = (scsr & clk->pmc_mask) ? "on" : "off";
+               else if (clk->mode == pmc_periph_mode)
+                       state = (pcsr & clk->pmc_mask) ? "on" : "off";
+               else if (clk->pmc_mask)
+                       state = (sr & clk->pmc_mask) ? "on" : "off";
+               else if (clk == &clk32k || clk == &main_clk)
+                       state = "on";
+               else
+                       state = "";
+
+               seq_printf(s, "%-10s users=%d %-3s %9ld Hz %s\n",
+                       clk->name, clk->users, state, clk_get_rate(clk),
+                       clk->parent ? clk->parent->name : "");
+       }
+       return 0;
+}
+
+static int at91_clk_open(struct inode *inode, struct file *file)
+{
+       return single_open(file, at91_clk_show, NULL);
+}
+
+static struct file_operations at91_clk_operations = {
+       .open           = at91_clk_open,
+       .read           = seq_read,
+       .llseek         = seq_lseek,
+       .release        = single_release,
+};
+
+static int __init at91_clk_debugfs_init(void)
+{
+       /* /sys/kernel/debug/at91_clk */
+       (void) debugfs_create_file("at91_clk", S_IFREG | S_IRUGO, NULL, NULL, &at91_clk_operations);
+
+       return 0;
+}
+postcore_initcall(at91_clk_debugfs_init);
+
+#endif
+
+/*------------------------------------------------------------------------*/
+
+static u32 __init at91_pll_rate(struct clk *pll, u32 freq, u32 reg)
+{
+       unsigned mul, div;
+
+       div = reg & 0xff;
+       mul = (reg >> 16) & 0x7ff;
+       if (div && mul) {
+               freq /= div;
+               freq *= mul + 1;
+       } else
+               freq = 0;
+       if (pll == &pllb && (reg & (1 << 28)))
+               freq /= 2;
+       return freq;
+}
+
+static unsigned __init at91_pll_calc(unsigned main_freq, unsigned out_freq)
+{
+       unsigned i, div = 0, mul = 0, diff = 1 << 30;
+       unsigned ret = (out_freq > 155000000) ? 0xbe00 : 0x3e00;
+
+       /* PLL output max 240 MHz (or 180 MHz per errata) */
+       if (out_freq > 240000000)
+               goto fail;
+
+       for (i = 1; i < 256; i++) {
+               int diff1;
+               unsigned input, mul1;
+
+               /*
+                * PLL input between 1MHz and 32MHz per spec, but lower
+                * frequences seem necessary in some cases so allow 100K.
+                */
+               input = main_freq / i;
+               if (input < 100000)
+                       continue;
+               if (input > 32000000)
+                       continue;
+
+               mul1 = out_freq / input;
+               if (mul1 > 2048)
+                       continue;
+               if (mul1 < 2)
+                       goto fail;
+
+               diff1 = out_freq - input * mul1;
+               if (diff1 < 0)
+                       diff1 = -diff1;
+               if (diff > diff1) {
+                       diff = diff1;
+                       div = i;
+                       mul = mul1;
+                       if (diff == 0)
+                               break;
+               }
+       }
+       if (i == 256 && diff > (out_freq >> 5))
+               goto fail;
+       return ret | ((mul - 1) << 16) | div;
+fail:
+       return 0;
+}
+
+int __init at91_clock_init(unsigned long main_clock)
+{
+       unsigned tmp, freq, mckr;
+
+       spin_lock_init(&clk_lock);
+
+       /*
+        * When the bootloader initialized the main oscillator correctly,
+        * there's no problem using the cycle counter.  But if it didn't,
+        * or when using oscillator bypass mode, we must be told the speed
+        * of the main clock.
+        */
+       if (!main_clock) {
+               do {
+                       tmp = at91_sys_read(AT91_CKGR_MCFR);
+               } while (!(tmp & 0x10000));
+               main_clock = (tmp & 0xffff) * (AT91_SLOW_CLOCK / 16);
+       }
+       main_clk.rate_hz = main_clock;
+
+       /* report if PLLA is more than mildly overclocked */
+       plla.rate_hz = at91_pll_rate(&plla, main_clock, at91_sys_read(AT91_CKGR_PLLAR));
+       if (plla.rate_hz > 209000000)
+               pr_info("Clocks: PLLA overclocked, %ld MHz\n", plla.rate_hz / 1000000);
+
+       /*
+        * USB clock init:  choose 48 MHz PLLB value, turn all clocks off,
+        * disable 48MHz clock during usb peripheral suspend.
+        *
+        * REVISIT:  assumes MCK doesn't derive from PLLB!
+        */
+       at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | 0x10000000;
+       pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init);
+       at91_sys_write(AT91_PMC_PCDR, (1 << AT91_ID_UHP) | (1 << AT91_ID_UDP));
+       at91_sys_write(AT91_PMC_SCDR, AT91_PMC_UHP | AT91_PMC_UDP);
+       at91_sys_write(AT91_CKGR_PLLBR, 0);
+       at91_sys_write(AT91_PMC_SCER, AT91_PMC_MCKUDP);
+
+       /*
+        * MCK and CPU derive from one of those primary clocks.
+        * For now, assume this parentage won't change.
+        */
+       mckr = at91_sys_read(AT91_PMC_MCKR);
+       mck.parent = clock_list[mckr & AT91_PMC_CSS];
+       mck.parent->users++;
+       freq = mck.parent->rate_hz;
+       freq /= (1 << ((mckr >> 2) & 3));               /* prescale */
+       mck.rate_hz = freq / (1 + ((mckr >> 8) & 3));   /* mdiv */
+
+       printk("Clocks: CPU %u MHz, master %u MHz, main %u.%03u MHz\n",
+               freq / 1000000, (unsigned) mck.rate_hz / 1000000,
+               (unsigned) main_clock / 1000000,
+               ((unsigned) main_clock % 1000000) / 1000);
+
+       /* FIXME get rid of master_clock global */
+       at91_master_clock = mck.rate_hz;
+
+#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
+       /* establish PCK0..PCK3 parentage */
+       for (tmp = 0; tmp < ARRAY_SIZE(clock_list); tmp++) {
+               struct clk      *clk = clock_list[tmp], *parent;
+               u32             pckr;
+
+               if (!clk->programmable)
+                       continue;
+
+               pckr = at91_sys_read(AT91_PMC_PCKR(clk->id));
+               parent = clock_list[pckr & 3];
+               clk->parent = parent;
+               clk->rate_hz = parent->rate_hz / (1 << ((pckr >> 2) & 3));
+       }
+#else
+       /* disable unused clocks */
+       at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK0 | AT91_PMC_PCK1 | AT91_PMC_PCK2 | AT91_PMC_PCK3);
+#endif /* CONFIG_AT91_PROGRAMMABLE_CLOCKS */
+
+       /* FIXME several unused clocks may still be active...  provide
+        * a CONFIG option to turn off all unused clocks at some point
+        * before driver init starts.
+        */
+
+       return 0;
+}
diff --git a/arch/arm/mach-at91rm9200/common.c b/arch/arm/mach-at91rm9200/common.c
new file mode 100644 (file)
index 0000000..3848fd2
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * arch/arm/mach-at91rm9200/common.c
+ *
+ *  Copyright (C) 2005 SAN People
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+
+#include <asm/arch/hardware.h>
+
+static struct map_desc at91rm9200_io_desc[] __initdata = {
+       {
+               .virtual        = AT91_VA_BASE_SYS,
+               .pfn            = __phys_to_pfn(AT91_BASE_SYS),
+               .length         = SZ_4K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = AT91_VA_BASE_SPI,
+               .pfn            = __phys_to_pfn(AT91_BASE_SPI),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = AT91_VA_BASE_SSC2,
+               .pfn            = __phys_to_pfn(AT91_BASE_SSC2),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = AT91_VA_BASE_SSC1,
+               .pfn            = __phys_to_pfn(AT91_BASE_SSC1),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = AT91_VA_BASE_SSC0,
+               .pfn            = __phys_to_pfn(AT91_BASE_SSC0),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = AT91_VA_BASE_US3,
+               .pfn            = __phys_to_pfn(AT91_BASE_US3),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = AT91_VA_BASE_US2,
+               .pfn            = __phys_to_pfn(AT91_BASE_US2),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = AT91_VA_BASE_US1,
+               .pfn            = __phys_to_pfn(AT91_BASE_US1),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = AT91_VA_BASE_US0,
+               .pfn            = __phys_to_pfn(AT91_BASE_US0),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = AT91_VA_BASE_EMAC,
+               .pfn            = __phys_to_pfn(AT91_BASE_EMAC),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = AT91_VA_BASE_TWI,
+               .pfn            = __phys_to_pfn(AT91_BASE_TWI),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = AT91_VA_BASE_MCI,
+               .pfn            = __phys_to_pfn(AT91_BASE_MCI),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = AT91_VA_BASE_UDP,
+               .pfn            = __phys_to_pfn(AT91_BASE_UDP),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = AT91_VA_BASE_TCB1,
+               .pfn            = __phys_to_pfn(AT91_BASE_TCB1),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       }, {
+               .virtual        = AT91_VA_BASE_TCB0,
+               .pfn            = __phys_to_pfn(AT91_BASE_TCB0),
+               .length         = SZ_16K,
+               .type           = MT_DEVICE,
+       },
+};
+
+void __init at91rm9200_map_io(void)
+{
+       iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc));
+}
+
+
+unsigned long at91_master_clock;
+
+EXPORT_SYMBOL(at91_master_clock);
+
+
+int at91_serial_map[AT91_NR_UART];
+int at91_console_port;
+
+EXPORT_SYMBOL(at91_serial_map);
+EXPORT_SYMBOL(at91_console_port);
diff --git a/arch/arm/mach-at91rm9200/devices.c b/arch/arm/mach-at91rm9200/devices.c
new file mode 100644 (file)
index 0000000..8df3e52
--- /dev/null
@@ -0,0 +1,291 @@
+/*
+ * arch/arm/mach-at91rm9200/devices.c
+ *
+ *  Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org>
+ *  Copyright (C) 2005 David Brownell
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ */
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+
+#include <linux/config.h>
+#include <linux/platform_device.h>
+
+#include <asm/arch/board.h>
+#include <asm/arch/pio.h>
+
+
+/* --------------------------------------------------------------------
+ *  USB Host
+ * -------------------------------------------------------------------- */
+
+#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+static u64 ohci_dmamask = 0xffffffffUL;
+static struct at91_usbh_data usbh_data;
+
+static struct resource at91rm9200_usbh_resource[] = {
+       [0] = {
+               .start  = AT91_UHP_BASE,
+               .end    = AT91_UHP_BASE + SZ_1M -1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = AT91_ID_UHP,
+               .end    = AT91_ID_UHP,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device at91rm9200_usbh_device = {
+       .name           = "at91rm9200-ohci",
+       .id             = -1,
+       .dev            = {
+                               .dma_mask               = &ohci_dmamask,
+                               .coherent_dma_mask      = 0xffffffff,
+                               .platform_data          = &usbh_data,
+       },
+       .resource       = at91rm9200_usbh_resource,
+       .num_resources  = ARRAY_SIZE(at91rm9200_usbh_resource),
+};
+
+void __init at91_add_device_usbh(struct at91_usbh_data *data)
+{
+       if (!data)
+               return;
+
+       usbh_data = *data;
+       platform_device_register(&at91rm9200_usbh_device);
+}
+#else
+void __init at91_add_device_usbh(struct at91_usbh_data *data) {}
+#endif
+
+
+/* --------------------------------------------------------------------
+ *  USB Device (Gadget)
+ * -------------------------------------------------------------------- */
+
+#ifdef CONFIG_USB_GADGET_AT91
+static struct at91_udc_data udc_data;
+
+static struct resource at91_udc_resources[] = {
+       {
+               .start  = AT91_BASE_UDP,
+               .end    = AT91_BASE_UDP + SZ_16K - 1,
+               .flags  = IORESOURCE_MEM,
+       }
+};
+
+static struct platform_device at91rm9200_udc_device = {
+       .name           = "at91_udc",
+       .id             = -1,
+       .dev            = {
+                               .platform_data          = &udc_data,
+       },
+       .resource       = at91_udc_resources,
+       .num_resources  = ARRAY_SIZE(at91_udc_resources),
+};
+
+void __init at91_add_device_udc(struct at91_udc_data *data)
+{
+       if (!data)
+               return;
+
+       if (data->vbus_pin) {
+               at91_set_gpio_input(data->vbus_pin, 0);
+               at91_set_deglitch(data->vbus_pin, 1);
+       }
+       if (data->pullup_pin)
+               at91_set_gpio_output(data->pullup_pin, 0);
+
+       udc_data = *data;
+       platform_device_register(&at91rm9200_udc_device);
+}
+#else
+void __init at91_add_device_udc(struct at91_udc_data *data) {}
+#endif
+
+
+/* --------------------------------------------------------------------
+ *  Ethernet
+ * -------------------------------------------------------------------- */
+
+#if defined(CONFIG_ARM_AT91_ETHER) || defined(CONFIG_ARM_AT91_ETHER_MODULE)
+static u64 eth_dmamask = 0xffffffffUL;
+static struct at91_eth_data eth_data;
+
+static struct platform_device at91rm9200_eth_device = {
+       .name           = "at91_ether",
+       .id             = -1,
+       .dev            = {
+                               .dma_mask               = &eth_dmamask,
+                               .coherent_dma_mask      = 0xffffffff,
+                               .platform_data          = &eth_data,
+       },
+       .num_resources  = 0,
+};
+
+void __init at91_add_device_eth(struct at91_eth_data *data)
+{
+       if (!data)
+               return;
+
+       if (data->phy_irq_pin) {
+               at91_set_gpio_input(data->phy_irq_pin, 0);
+               at91_set_deglitch(data->phy_irq_pin, 1);
+       }
+
+       /* Pins used for MII and RMII */
+       at91_set_A_periph(AT91_PIN_PA16, 0);    /* EMDIO */
+       at91_set_A_periph(AT91_PIN_PA15, 0);    /* EMDC */
+       at91_set_A_periph(AT91_PIN_PA14, 0);    /* ERXER */
+       at91_set_A_periph(AT91_PIN_PA13, 0);    /* ERX1 */
+       at91_set_A_periph(AT91_PIN_PA12, 0);    /* ERX0 */
+       at91_set_A_periph(AT91_PIN_PA11, 0);    /* ECRS_ECRSDV */
+       at91_set_A_periph(AT91_PIN_PA10, 0);    /* ETX1 */
+       at91_set_A_periph(AT91_PIN_PA9, 0);     /* ETX0 */
+       at91_set_A_periph(AT91_PIN_PA8, 0);     /* ETXEN */
+       at91_set_A_periph(AT91_PIN_PA7, 0);     /* ETXCK_EREFCK */
+
+       if (!data->is_rmii) {
+               at91_set_B_periph(AT91_PIN_PB19, 0);    /* ERXCK */
+               at91_set_B_periph(AT91_PIN_PB18, 0);    /* ECOL */
+               at91_set_B_periph(AT91_PIN_PB17, 0);    /* ERXDV */
+               at91_set_B_periph(AT91_PIN_PB16, 0);    /* ERX3 */
+               at91_set_B_periph(AT91_PIN_PB15, 0);    /* ERX2 */
+               at91_set_B_periph(AT91_PIN_PB14, 0);    /* ETXER */
+               at91_set_B_periph(AT91_PIN_PB13, 0);    /* ETX3 */
+               at91_set_B_periph(AT91_PIN_PB12, 0);    /* ETX2 */
+       }
+
+       eth_data = *data;
+       platform_device_register(&at91rm9200_eth_device);
+}
+#else
+void __init at91_add_device_eth(struct at91_eth_data *data) {}
+#endif
+
+
+/* --------------------------------------------------------------------
+ *  Compact Flash / PCMCIA
+ * -------------------------------------------------------------------- */
+
+#if defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE)
+static struct at91_cf_data cf_data;
+
+static struct platform_device at91rm9200_cf_device = {
+       .name           = "at91_cf",
+       .id             = -1,
+       .dev            = {
+                               .platform_data          = &cf_data,
+       },
+       .num_resources  = 0,
+};
+
+void __init at91_add_device_cf(struct at91_cf_data *data)
+{
+       if (!data)
+               return;
+
+       /* input/irq */
+       if (data->irq_pin) {
+               at91_set_gpio_input(data->irq_pin, 1);
+               at91_set_deglitch(data->irq_pin, 1);
+       }
+       at91_set_gpio_input(data->det_pin, 1);
+       at91_set_deglitch(data->det_pin, 1);
+
+       /* outputs, initially off */
+       if (data->vcc_pin)
+               at91_set_gpio_output(data->vcc_pin, 0);
+       at91_set_gpio_output(data->rst_pin, 0);
+
+       cf_data = *data;
+       platform_device_register(&at91rm9200_cf_device);
+}
+#else
+void __init at91_add_device_cf(struct at91_cf_data *data) {}
+#endif
+
+
+/* --------------------------------------------------------------------
+ *  MMC / SD
+ * -------------------------------------------------------------------- */
+
+#if defined(CONFIG_MMC_AT91RM9200) || defined(CONFIG_MMC_AT91RM9200_MODULE)
+static u64 mmc_dmamask = 0xffffffffUL;
+static struct at91_mmc_data mmc_data;
+
+static struct resource at91_mmc_resources[] = {
+       {
+               .start  = AT91_BASE_MCI,
+               .end    = AT91_BASE_MCI + SZ_16K - 1,
+               .flags  = IORESOURCE_MEM,
+       }
+};
+
+static struct platform_device at91rm9200_mmc_device = {
+       .name           = "at91rm9200_mci",
+       .id             = -1,
+       .dev            = {
+                               .dma_mask               = &mmc_dmamask,
+                               .coherent_dma_mask      = 0xffffffff,
+                               .platform_data          = &mmc_data,
+       },
+       .resource       = at91_mmc_resources,
+       .num_resources  = ARRAY_SIZE(at91_mmc_resources),
+};
+
+void __init at91_add_device_mmc(struct at91_mmc_data *data)
+{
+       if (!data)
+               return;
+
+       /* input/irq */
+       if (data->det_pin) {
+               at91_set_gpio_input(data->det_pin, 1);
+               at91_set_deglitch(data->det_pin, 1);
+       }
+       if (data->wp_pin)
+               at91_set_gpio_input(data->wp_pin, 1);
+
+       /* CLK */
+       at91_set_A_periph(AT91_PIN_PA27, 0);
+
+       if (data->is_b) {
+               /* CMD */
+               at91_set_B_periph(AT91_PIN_PA8, 0);
+
+               /* DAT0, maybe DAT1..DAT3 */
+               at91_set_B_periph(AT91_PIN_PA9, 0);
+               if (data->wire4) {
+                       at91_set_B_periph(AT91_PIN_PA10, 0);
+                       at91_set_B_periph(AT91_PIN_PA11, 0);
+                       at91_set_B_periph(AT91_PIN_PA12, 0);
+               }
+       } else {
+               /* CMD */
+               at91_set_A_periph(AT91_PIN_PA28, 0);
+
+               /* DAT0, maybe DAT1..DAT3 */
+               at91_set_A_periph(AT91_PIN_PA29, 0);
+               if (data->wire4) {
+                       at91_set_B_periph(AT91_PIN_PB3, 0);
+                       at91_set_B_periph(AT91_PIN_PB4, 0);
+                       at91_set_B_periph(AT91_PIN_PB5, 0);
+               }
+       }
+
+       mmc_data = *data;
+       platform_device_register(&at91rm9200_mmc_device);
+}
+#else
+void __init at91_add_device_mmc(struct at91_mmc_data *data) {}
+#endif
+
+/* -------------------------------------------------------------------- */
diff --git a/arch/arm/mach-at91rm9200/generic.h b/arch/arm/mach-at91rm9200/generic.h
new file mode 100644 (file)
index 0000000..9bd541e
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * linux/arch/arm/mach-at91rm9200/generic.h
+ *
+ *  Copyright (C) 2005 David Brownell
+ *
+ * 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.
+ */
+
+void at91_gpio_irq_setup(unsigned banks);
+
+struct sys_timer;
+extern struct sys_timer at91rm9200_timer;
+
+extern void __init at91rm9200_map_io(void);
+
+extern int __init at91_clock_init(unsigned long main_clock);
diff --git a/arch/arm/mach-at91rm9200/gpio.c b/arch/arm/mach-at91rm9200/gpio.c
new file mode 100644 (file)
index 0000000..2fd2ef5
--- /dev/null
@@ -0,0 +1,302 @@
+/*
+ * linux/arch/arm/mach-at91rm9200/gpio.c
+ *
+ * Copyright (C) 2005 HP Labs
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/errno.h>
+#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/module.h>
+
+#include <asm/io.h>
+#include <asm/mach/irq.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/gpio.h>
+
+static const u32 pio_controller_offset[4] = {
+       AT91_PIOA,
+       AT91_PIOB,
+       AT91_PIOC,
+       AT91_PIOD,
+};
+
+static inline void __iomem *pin_to_controller(unsigned pin)
+{
+       void __iomem *sys_base = (void __iomem *) AT91_VA_BASE_SYS;
+
+       pin -= PIN_BASE;
+       pin /= 32;
+       if (likely(pin < BGA_GPIO_BANKS))
+               return sys_base + pio_controller_offset[pin];
+
+       return NULL;
+}
+
+static inline unsigned pin_to_mask(unsigned pin)
+{
+       pin -= PIN_BASE;
+       return 1 << (pin % 32);
+}
+
+
+/*--------------------------------------------------------------------------*/
+
+/* Not all hardware capabilities are exposed through these calls; they
+ * only encapsulate the most common features and modes.  (So if you
+ * want to change signals in groups, do it directly.)
+ *
+ * Bootloaders will usually handle some of the pin multiplexing setup.
+ * The intent is certainly that by the time Linux is fully booted, all
+ * pins should have been fully initialized.  These setup calls should
+ * only be used by board setup routines, or possibly in driver probe().
+ *
+ * For bootloaders doing all that setup, these calls could be inlined
+ * as NOPs so Linux won't duplicate any setup code
+ */
+
+
+/*
+ * mux the pin to the "A" internal peripheral role.
+ */
+int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup)
+{
+       void __iomem    *pio = pin_to_controller(pin);
+       unsigned        mask = pin_to_mask(pin);
+
+       if (!pio)
+               return -EINVAL;
+
+       __raw_writel(mask, pio + PIO_IDR);
+       __raw_writel(mask, pio + (use_pullup ? PIO_PUER : PIO_PUDR));
+       __raw_writel(mask, pio + PIO_ASR);
+       __raw_writel(mask, pio + PIO_PDR);
+       return 0;
+}
+EXPORT_SYMBOL(at91_set_A_periph);
+
+
+/*
+ * mux the pin to the "B" internal peripheral role.
+ */
+int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup)
+{
+       void __iomem    *pio = pin_to_controller(pin);
+       unsigned        mask = pin_to_mask(pin);
+
+       if (!pio)
+               return -EINVAL;
+
+       __raw_writel(mask, pio + PIO_IDR);
+       __raw_writel(mask, pio + (use_pullup ? PIO_PUER : PIO_PUDR));
+       __raw_writel(mask, pio + PIO_BSR);
+       __raw_writel(mask, pio + PIO_PDR);
+       return 0;
+}
+EXPORT_SYMBOL(at91_set_B_periph);
+
+
+/*
+ * mux the pin to the gpio controller (instead of "A" or "B" peripheral), and
+ * configure it for an input.
+ */
+int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup)
+{
+       void __iomem    *pio = pin_to_controller(pin);
+       unsigned        mask = pin_to_mask(pin);
+
+       if (!pio)
+               return -EINVAL;
+
+       __raw_writel(mask, pio + PIO_IDR);
+       __raw_writel(mask, pio + (use_pullup ? PIO_PUER : PIO_PUDR));
+       __raw_writel(mask, pio + PIO_ODR);
+       __raw_writel(mask, pio + PIO_PER);
+       return 0;
+}
+EXPORT_SYMBOL(at91_set_gpio_input);
+
+
+/*
+ * mux the pin to the gpio controller (instead of "A" or "B" peripheral),
+ * and configure it for an output.
+ */
+int __init_or_module at91_set_gpio_output(unsigned pin, int value)
+{
+       void __iomem    *pio = pin_to_controller(pin);
+       unsigned        mask = pin_to_mask(pin);
+
+       if (!pio)
+               return -EINVAL;
+
+       __raw_writel(mask, pio + PIO_IDR);
+       __raw_writel(mask, pio + PIO_PUDR);
+       __raw_writel(mask, pio + (value ? PIO_SODR : PIO_CODR));
+       __raw_writel(mask, pio + PIO_OER);
+       __raw_writel(mask, pio + PIO_PER);
+       return 0;
+}
+EXPORT_SYMBOL(at91_set_gpio_output);
+
+
+/*
+ * enable/disable the glitch filter; mostly used with IRQ handling.
+ */
+int __init_or_module at91_set_deglitch(unsigned pin, int is_on)
+{
+       void __iomem    *pio = pin_to_controller(pin);
+       unsigned        mask = pin_to_mask(pin);
+
+       if (!pio)
+               return -EINVAL;
+       __raw_writel(mask, pio + (is_on ? PIO_IFER : PIO_IFDR));
+       return 0;
+}
+EXPORT_SYMBOL(at91_set_deglitch);
+
+/*--------------------------------------------------------------------------*/
+
+
+/*
+ * assuming the pin is muxed as a gpio output, set its value.
+ */
+int at91_set_gpio_value(unsigned pin, int value)
+{
+       void __iomem    *pio = pin_to_controller(pin);
+       unsigned        mask = pin_to_mask(pin);
+
+       if (!pio)
+               return -EINVAL;
+       __raw_writel(mask, pio + (value ? PIO_SODR : PIO_CODR));
+       return 0;
+}
+EXPORT_SYMBOL(at91_set_gpio_value);
+
+
+/*
+ * read the pin's value (works even if it's not muxed as a gpio).
+ */
+int at91_get_gpio_value(unsigned pin)
+{
+       void __iomem    *pio = pin_to_controller(pin);
+       unsigned        mask = pin_to_mask(pin);
+       u32             pdsr;
+
+       if (!pio)
+               return -EINVAL;
+       pdsr = __raw_readl(pio + PIO_PDSR);
+       return (pdsr & mask) != 0;
+}
+EXPORT_SYMBOL(at91_get_gpio_value);
+
+/*--------------------------------------------------------------------------*/
+
+
+/* Several AIC controller irqs are dispatched through this GPIO handler.
+ * To use any AT91_PIN_* as an externally triggered IRQ, first call
+ * at91_set_gpio_input() then maybe enable its glitch filter.
+ * Then just request_irq() with the pin ID; it works like any ARM IRQ
+ * handler, though it always triggers on rising and falling edges.
+ *
+ * Alternatively, certain pins may be used directly as IRQ0..IRQ6 after
+ * configuring them with at91_set_a_periph() or at91_set_b_periph().
+ * IRQ0..IRQ6 should be configurable, e.g. level vs edge triggering.
+ */
+
+static void gpio_irq_mask(unsigned pin)
+{
+       void __iomem    *pio = pin_to_controller(pin);
+       unsigned        mask = pin_to_mask(pin);
+
+       if (pio)
+               __raw_writel(mask, pio + PIO_IDR);
+}
+
+static void gpio_irq_unmask(unsigned pin)
+{
+       void __iomem    *pio = pin_to_controller(pin);
+       unsigned        mask = pin_to_mask(pin);
+
+       if (pio)
+               __raw_writel(mask, pio + PIO_IER);
+}
+
+static int gpio_irq_type(unsigned pin, unsigned type)
+{
+       return (type == IRQT_BOTHEDGE) ? 0 : -EINVAL;
+}
+
+static struct irqchip gpio_irqchip = {
+       .mask           = gpio_irq_mask,
+       .unmask         = gpio_irq_unmask,
+       .set_type       = gpio_irq_type,
+};
+
+static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs *regs)
+{
+       unsigned        pin;
+       struct irqdesc  *gpio;
+       void __iomem    *pio;
+       u32             isr;
+
+       pio = (void __force __iomem *) desc->chipdata;
+
+       /* temporarily mask (level sensitive) parent IRQ */
+       desc->chip->ack(irq);
+       for (;;) {
+               isr = __raw_readl(pio + PIO_ISR) & __raw_readl(pio + PIO_IMR);
+               if (!isr)
+                       break;
+
+               pin = (unsigned) desc->data;
+               gpio = &irq_desc[pin];
+
+               while (isr) {
+                       if (isr & 1)
+                               gpio->handle(pin, gpio, regs);
+                       pin++;
+                       gpio++;
+                       isr >>= 1;
+               }
+       }
+       desc->chip->unmask(irq);
+       /* now it may re-trigger */
+}
+
+/* call this from board-specific init_irq */
+void __init at91_gpio_irq_setup(unsigned banks)
+{
+       unsigned        pioc, pin, id;
+
+       if (banks > 4)
+               banks = 4;
+       for (pioc = 0, pin = PIN_BASE, id = AT91_ID_PIOA;
+                       pioc < banks;
+                       pioc++, id++) {
+               void __iomem    *controller;
+               unsigned        i;
+
+               controller = (void __iomem *) AT91_VA_BASE_SYS + pio_controller_offset[pioc];
+               __raw_writel(~0, controller + PIO_IDR);
+
+               set_irq_data(id, (void *) pin);
+               set_irq_chipdata(id, (void __force *) controller);
+
+               for (i = 0; i < 32; i++, pin++) {
+                       set_irq_chip(pin, &gpio_irqchip);
+                       set_irq_handler(pin, do_simple_IRQ);
+                       set_irq_flags(pin, IRQF_VALID);
+               }
+
+               set_irq_chained_handler(id, gpio_irq_handler);
+
+               /* enable the PIO peripheral clock */
+               at91_sys_write(AT91_PMC_PCER, 1 << id);
+       }
+       pr_info("AT91: %d gpio irqs in %d banks\n", pin - PIN_BASE, banks);
+}
diff --git a/arch/arm/mach-at91rm9200/irq.c b/arch/arm/mach-at91rm9200/irq.c
new file mode 100644 (file)
index 0000000..cb62bc8
--- /dev/null
@@ -0,0 +1,170 @@
+/*
+ * linux/arch/arm/mach-at91rm9200/irq.c
+ *
+ *  Copyright (C) 2004 SAN People
+ *  Copyright (C) 2004 ATMEL
+ *  Copyright (C) Rick Bronson
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/mm.h>
+#include <linux/types.h>
+
+#include <asm/hardware.h>
+#include <asm/irq.h>
+#include <asm/mach-types.h>
+#include <asm/setup.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/irq.h>
+#include <asm/mach/map.h>
+
+#include "generic.h"
+
+/*
+ * The default interrupt priority levels (0 = lowest, 7 = highest).
+ */
+static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = {
+       7,      /* Advanced Interrupt Controller */
+       7,      /* System Peripheral */
+       0,      /* Parallel IO Controller A */
+       0,      /* Parallel IO Controller B */
+       0,      /* Parallel IO Controller C */
+       0,      /* Parallel IO Controller D */
+       6,      /* USART 0 */
+       6,      /* USART 1 */
+       6,      /* USART 2 */
+       6,      /* USART 3 */
+       0,      /* Multimedia Card Interface */
+       4,      /* USB Device Port */
+       0,      /* Two-Wire Interface */
+       6,      /* Serial Peripheral Interface */
+       5,      /* Serial Synchronous Controller */
+       5,      /* Serial Synchronous Controller */
+       5,      /* Serial Synchronous Controller */
+       0,      /* Timer Counter 0 */
+       0,      /* Timer Counter 1 */
+       0,      /* Timer Counter 2 */
+       0,      /* Timer Counter 3 */
+       0,      /* Timer Counter 4 */
+       0,      /* Timer Counter 5 */
+       3,      /* USB Host port */
+       3,      /* Ethernet MAC */
+       0,      /* Advanced Interrupt Controller */
+       0,      /* Advanced Interrupt Controller */
+       0,      /* Advanced Interrupt Controller */
+       0,      /* Advanced Interrupt Controller */
+       0,      /* Advanced Interrupt Controller */
+       0,      /* Advanced Interrupt Controller */
+       0       /* Advanced Interrupt Controller */
+};
+
+
+static void at91rm9200_mask_irq(unsigned int irq)
+{
+       /* Disable interrupt on AIC */
+       at91_sys_write(AT91_AIC_IDCR, 1 << irq);
+}
+
+static void at91rm9200_unmask_irq(unsigned int irq)
+{
+       /* Enable interrupt on AIC */
+       at91_sys_write(AT91_AIC_IECR, 1 << irq);
+}
+
+static int at91rm9200_irq_type(unsigned irq, unsigned type)
+{
+       unsigned int smr, srctype;
+
+       /* change triggering only for FIQ and external IRQ0..IRQ6 */
+       if ((irq < AT91_ID_IRQ0) && (irq != AT91_ID_FIQ))
+               return -EINVAL;
+
+       switch (type) {
+       case IRQT_HIGH:
+               srctype = AT91_AIC_SRCTYPE_HIGH;
+               break;
+       case IRQT_RISING:
+               srctype = AT91_AIC_SRCTYPE_RISING;
+               break;
+       case IRQT_LOW:
+               srctype = AT91_AIC_SRCTYPE_LOW;
+               break;
+       case IRQT_FALLING:
+               srctype = AT91_AIC_SRCTYPE_FALLING;
+               break;
+       default:
+               return -EINVAL;
+       }
+
+       smr = at91_sys_read(AT91_AIC_SMR(irq)) & ~AT91_AIC_SRCTYPE;
+       at91_sys_write(AT91_AIC_SMR(irq), smr | srctype);
+       return 0;
+}
+
+static struct irqchip at91rm9200_irq_chip = {
+       .ack            = at91rm9200_mask_irq,
+       .mask           = at91rm9200_mask_irq,
+       .unmask         = at91rm9200_unmask_irq,
+       .set_type       = at91rm9200_irq_type,
+};
+
+/*
+ * Initialize the AIC interrupt controller.
+ */
+void __init at91rm9200_init_irq(unsigned int priority[NR_AIC_IRQS])
+{
+       unsigned int i;
+
+       /* No priority list specified for this board -> use defaults */
+       if (priority == NULL)
+               priority = at91rm9200_default_irq_priority;
+
+       /*
+        * The IVR is used by macro get_irqnr_and_base to read and verify.
+        * The irq number is NR_AIC_IRQS when a spurious interrupt has occurred.
+        */
+       for (i = 0; i < NR_AIC_IRQS; i++) {
+               /* Put irq number in Source Vector Register: */
+               at91_sys_write(AT91_AIC_SVR(i), i);
+               /* Store the Source Mode Register as defined in table above */
+               at91_sys_write(AT91_AIC_SMR(i), AT91_AIC_SRCTYPE_LOW | priority[i]);
+
+               set_irq_chip(i, &at91rm9200_irq_chip);
+               set_irq_handler(i, do_level_IRQ);
+               set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
+
+               /* Perform 8 End Of Interrupt Command to make sure AIC will not Lock out nIRQ */
+               if (i < 8)
+                       at91_sys_write(AT91_AIC_EOICR, 0);
+       }
+
+       /*
+        * Spurious Interrupt ID in Spurious Vector Register is NR_AIC_IRQS
+        * When there is no current interrupt, the IRQ Vector Register reads the value stored in AIC_SPU
+        */
+       at91_sys_write(AT91_AIC_SPU, NR_AIC_IRQS);
+
+       /* No debugging in AIC: Debug (Protect) Control Register */
+       at91_sys_write(AT91_AIC_DCR, 0);
+
+       /* Disable and clear all interrupts initially */
+       at91_sys_write(AT91_AIC_IDCR, 0xFFFFFFFF);
+       at91_sys_write(AT91_AIC_ICCR, 0xFFFFFFFF);
+}
diff --git a/arch/arm/mach-at91rm9200/time.c b/arch/arm/mach-at91rm9200/time.c
new file mode 100644 (file)
index 0000000..1b6dd2d
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * linux/arch/arm/mach-at91rm9200/time.c
+ *
+ *  Copyright (C) 2003 SAN People
+ *  Copyright (C) 2003 ATMEL
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/time.h>
+
+#include <asm/hardware.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/mach/time.h>
+
+/*
+ * The ST_CRTR is updated asynchronously to the master clock.  It is therefore
+ *  necessary to read it twice (with the same value) to ensure accuracy.
+ */
+static inline unsigned long read_CRTR(void) {
+       unsigned long x1, x2;
+
+       do {
+               x1 = at91_sys_read(AT91_ST_CRTR);
+               x2 = at91_sys_read(AT91_ST_CRTR);
+       } while (x1 != x2);
+
+       return x1;
+}
+
+/*
+ * Returns number of microseconds since last timer interrupt.  Note that interrupts
+ * will have been disabled by do_gettimeofday()
+ *  'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy.
+ *  'tick' is usecs per jiffy (linux/timex.h).
+ */
+static unsigned long at91rm9200_gettimeoffset(void)
+{
+       unsigned long elapsed;
+
+       elapsed = (read_CRTR() - at91_sys_read(AT91_ST_RTAR)) & AT91_ST_ALMV;
+
+       return (unsigned long)(elapsed * (tick_nsec / 1000)) / LATCH;
+}
+
+/*
+ * IRQ handler for the timer.
+ */
+static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+       unsigned long rtar;
+
+       if (at91_sys_read(AT91_ST_SR) & AT91_ST_PITS) { /* This is a shared interrupt */
+               write_seqlock(&xtime_lock);
+
+               do {
+                       timer_tick(regs);
+                       rtar = (at91_sys_read(AT91_ST_RTAR) + LATCH) & AT91_ST_ALMV;
+                       at91_sys_write(AT91_ST_RTAR, rtar);
+               } while (((read_CRTR() - at91_sys_read(AT91_ST_RTAR)) & AT91_ST_ALMV) >= LATCH);
+
+               write_sequnlock(&xtime_lock);
+
+               return IRQ_HANDLED;
+       }
+       else
+               return IRQ_NONE;                /* not handled */
+}
+
+static struct irqaction at91rm9200_timer_irq = {
+       .name           = "at91_tick",
+       .flags          = SA_SHIRQ | SA_INTERRUPT,
+       .handler        = at91rm9200_timer_interrupt
+};
+
+/*
+ * Set up timer interrupt.
+ */
+void __init at91rm9200_timer_init(void)
+{
+       /* Disable all timer interrupts */
+       at91_sys_write(AT91_ST_IDR, AT91_ST_PITS | AT91_ST_WDOVF | AT91_ST_RTTINC | AT91_ST_ALMS);
+       (void) at91_sys_read(AT91_ST_SR);       /* Clear any pending interrupts */
+
+       /*
+        * Make IRQs happen for the system timer.
+        */
+       setup_irq(AT91_ID_SYS, &at91rm9200_timer_irq);
+
+       /* Set initial alarm to 0 */
+       at91_sys_write(AT91_ST_RTAR, 0);
+
+       /* Real time counter incremented every 30.51758 microseconds */
+       at91_sys_write(AT91_ST_RTMR, 1);
+
+       /* Set Period Interval timer */
+       at91_sys_write(AT91_ST_PIMR, LATCH);
+
+       /* Change the kernel's 'tick' value to 10009 usec. (the default is 10000) */
+       tick_usec = (LATCH * 1000000) / CLOCK_TICK_RATE;
+
+       /* Enable Period Interval Timer interrupt */
+       at91_sys_write(AT91_ST_IER, AT91_ST_PITS);
+}
+
+struct sys_timer at91rm9200_timer = {
+       .init           = at91rm9200_timer_init,
+       .offset         = at91rm9200_gettimeoffset,
+};
diff --git a/arch/arm/mach-epxa10db/Kconfig b/arch/arm/mach-epxa10db/Kconfig
deleted file mode 100644 (file)
index 55d896d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-if ARCH_CAMELOT
-
-menu "Epxa10db"
-
-comment "PLD hotswap support"
-
-config PLD
-       bool
-       default y
-
-config PLD_HOTSWAP
-       bool "Support for PLD device hotplugging (experimental)"
-       depends on EXPERIMENTAL
-       help
-         This enables support for the dynamic loading and configuration of
-         compatible drivers when the contents of the PLD are changed. This
-         is still experimental and requires configuration tools which are
-         not yet generally available. Say N here. You must enable the kernel
-         module loader for this feature to work.
-
-endmenu
-
-endif
diff --git a/arch/arm/mach-epxa10db/Makefile b/arch/arm/mach-epxa10db/Makefile
deleted file mode 100644 (file)
index 24fbd7d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# Makefile for the linux kernel.
-#
-
-# Object file lists.
-
-obj-y                  := arch.o irq.o mm.o time.o 
-obj-m                  :=
-obj-n                  :=
-obj-                   :=
-
diff --git a/arch/arm/mach-epxa10db/Makefile.boot b/arch/arm/mach-epxa10db/Makefile.boot
deleted file mode 100644 (file)
index 28bec7d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-   zreladdr-y  := 0x00008000
-
diff --git a/arch/arm/mach-epxa10db/arch.c b/arch/arm/mach-epxa10db/arch.c
deleted file mode 100644 (file)
index 44c5657..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- *  linux/arch/arm/mach-epxa10db/arch.c
- *
- *  Copyright (C) 2000 Deep Blue Solutions Ltd
- *  Copyright (C) 2001 Altera Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#include <linux/types.h>
-#include <linux/init.h>
-#include <linux/serial_8250.h>
-
-#include <asm/hardware.h>
-#include <asm/setup.h>
-#include <asm/mach-types.h>
-
-#include <asm/mach/arch.h>
-
-static struct plat_serial8250_port serial_platform_data[] = {
-       {
-               .iobase         = 0x3f8,
-               .irq            = IRQ_UARTINT0,
-#error FIXME
-               .uartclk        = 0,
-               .regshift       = 0,
-               .iotype         = UPIO_PORT,
-               .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
-       },
-       {
-               .iobase         = 0x2f8,
-               .irq            = IRQ_UARTINT1,
-#error FIXME
-               .uartclk        = 0,
-               .regshift       = 0,
-               .iotype         = UPIO_PORT,
-               .flags          = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
-       },
-       { },
-};
-
-static struct platform_device serial_device = {
-       .name                   = "serial8250",
-       .id                     = PLAT8250_DEV_PLATFORM,
-       .dev                    = {
-               .platform_data  = serial_platform_data,
-       },
-};
-
-extern void epxa10db_map_io(void);
-extern void epxa10db_init_irq(void);
-extern struct sys_timer epxa10db_timer;
-
-MACHINE_START(CAMELOT, "Altera Epxa10db")
-       /* Maintainer: Altera Corporation */
-       .phys_ram       = 0x00000000,
-       .phys_io        = 0x7fffc000,
-       .io_pg_offst    = ((0xffffc000) >> 18) & 0xfffc,
-       .map_io         = epxa10db_map_io,
-       .init_irq       = epxa10db_init_irq,
-       .timer          = &epxa10db_timer,
-MACHINE_END
-
diff --git a/arch/arm/mach-epxa10db/irq.c b/arch/arm/mach-epxa10db/irq.c
deleted file mode 100644 (file)
index 9bf927e..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- *  linux/arch/arm/mach-epxa10db/irq.c
- *
- *  Copyright (C) 2001 Altera Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#include <linux/init.h>
-#include <linux/ioport.h>
-#include <linux/stddef.h>
-#include <linux/timer.h>
-#include <linux/list.h>
-#include <asm/io.h>
-#include <asm/hardware.h>
-#include <asm/irq.h>
-#include <asm/mach/irq.h>
-#include <asm/arch/platform.h>
-#include <asm/arch/int_ctrl00.h>
-
-
-static void epxa_mask_irq(unsigned int irq)
-{
-        writel(1 << irq, INT_MC(IO_ADDRESS(EXC_INT_CTRL00_BASE)));
-}
-
-static void epxa_unmask_irq(unsigned int irq)
-{
-        writel(1 << irq, INT_MS(IO_ADDRESS(EXC_INT_CTRL00_BASE)));
-}
-
-static struct irqchip epxa_irq_chip = {
-       .ack            = epxa_mask_irq,
-       .mask           = epxa_mask_irq,
-       .unmask         = epxa_unmask_irq,
-};
-
-static struct resource irq_resource = {
-       .name   = "irq_handler",
-       .start  = IO_ADDRESS(EXC_INT_CTRL00_BASE),
-       .end    = IO_ADDRESS(INT_PRIORITY_FC(EXC_INT_CTRL00_BASE))+4,
-};
-
-void __init epxa10db_init_irq(void)
-{
-       unsigned int i;
-       
-       request_resource(&iomem_resource, &irq_resource);
-
-       /*
-        * This bit sets up the interrupt controller using 
-        * the 6 PLD interrupts mode (the default) each 
-        * irqs is assigned a priority which is the same
-        * as its interrupt number. This scheme is used because 
-        * its easy, but you may want to change it depending
-        * on the contents of your PLD
-        */
-
-       writel(3,INT_MODE(IO_ADDRESS(EXC_INT_CTRL00_BASE)));
-       for (i = 0; i < NR_IRQS; i++){
-               writel(i+1, INT_PRIORITY_P0(IO_ADDRESS(EXC_INT_CTRL00_BASE)) + (4*i));
-               set_irq_chip(i,&epxa_irq_chip);
-               set_irq_handler(i,do_level_IRQ);
-               set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
-       }
-
-       /* Disable all interrupts */
-       writel(-1,INT_MC(IO_ADDRESS(EXC_INT_CTRL00_BASE)));
-
-}
diff --git a/arch/arm/mach-epxa10db/mm.c b/arch/arm/mach-epxa10db/mm.c
deleted file mode 100644 (file)
index cfd0d21..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- *  linux/arch/arm/mach-epxa10db/mm.c
- *
- *  MM routines for Altera'a Epxa10db board
- *
- *  Copyright (C) 2001 Altera Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#include <linux/kernel.h>
-#include <linux/init.h>
-
-#include <asm/hardware.h>
-#include <asm/io.h>
-#include <asm/sizes.h>
-#include <asm/page.h>
-#include <asm/mach/map.h>
-
-/* Page table mapping for I/O region */
-static struct map_desc epxa10db_io_desc[] __initdata = {
-       {
-               .virtual        = IO_ADDRESS(EXC_REGISTERS_BASE),
-               .pfn            = __phys_to_pfn(EXC_REGISTERS_BASE),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE
-       }, {
-               .virtual        = IO_ADDRESS(EXC_PLD_BLOCK0_BASE),
-               .pfn            = __phys_to_pfn(EXC_PLD_BLOCK0_BASE),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE
-       }, {
-               .virtual        = IO_ADDRESS(EXC_PLD_BLOCK1_BASE),
-               .pfn            =__phys_to_pfn(EXC_PLD_BLOCK1_BASE),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE
-       }, {
-               .virtual        = IO_ADDRESS(EXC_PLD_BLOCK2_BASE),
-               .physical       = __phys_to_pfn(EXC_PLD_BLOCK2_BASE),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE
-       }, {
-               .virtual        = IO_ADDRESS(EXC_PLD_BLOCK3_BASE),
-               .pfn            = __phys_to_pfn(EXC_PLD_BLOCK3_BASE),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE
-       }, {
-               .virtual        = FLASH_VADDR(EXC_EBI_BLOCK0_BASE),
-               .pfn            = __phys_to_pfn(EXC_EBI_BLOCK0_BASE),
-               .length         = SZ_16M,
-               .type           = MT_DEVICE
-       }
-};
-
-void __init epxa10db_map_io(void)
-{
-       iotable_init(epxa10db_io_desc, ARRAY_SIZE(epxa10db_io_desc));
-}
diff --git a/arch/arm/mach-epxa10db/time.c b/arch/arm/mach-epxa10db/time.c
deleted file mode 100644 (file)
index 4b1084d..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- *  linux/arch/arm/mach-epxa10db/time.c
- *
- *  Copyright (C) 2000 Deep Blue Solutions
- *  Copyright (C) 2001 Altera Corporation
- *
- * 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/kernel.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/sched.h>
-
-#include <asm/hardware.h>
-#include <asm/system.h>
-#include <asm/leds.h>
-
-#include <asm/mach/time.h>
-
-#define TIMER00_TYPE (volatile unsigned int*)
-#include <asm/arch/timer00.h>
-
-static int epxa10db_set_rtc(void)
-{
-       return 1;
-}
-
-static int epxa10db_rtc_init(void)
-{
-       set_rtc = epxa10db_set_rtc;
-
-       return 0;
-}
-
-__initcall(epxa10db_rtc_init);
-
-
-/*
- * IRQ handler for the timer
- */
-static irqreturn_t
-epxa10db_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-{
-       write_seqlock(&xtime_lock);
-
-       // ...clear the interrupt
-       *TIMER0_CR(IO_ADDRESS(EXC_TIMER00_BASE))|=TIMER0_CR_CI_MSK;
-
-       timer_tick(regs);
-       write_sequnlock(&xtime_lock);
-
-       return IRQ_HANDLED;
-}
-
-static struct irqaction epxa10db_timer_irq = {
-       .name           = "Excalibur Timer Tick",
-       .flags          = SA_INTERRUPT | SA_TIMER,
-       .handler        = epxa10db_timer_interrupt,
-};
-
-/*
- * Set up timer interrupt, and return the current time in seconds.
- */
-static void __init epxa10db_timer_init(void)
-{
-       /* Start the timer */
-       *TIMER0_LIMIT(IO_ADDRESS(EXC_TIMER00_BASE))=(unsigned int)(EXC_AHB2_CLK_FREQUENCY/200);
-       *TIMER0_PRESCALE(IO_ADDRESS(EXC_TIMER00_BASE))=1;
-       *TIMER0_CR(IO_ADDRESS(EXC_TIMER00_BASE))=TIMER0_CR_IE_MSK | TIMER0_CR_S_MSK;
-
-       setup_irq(IRQ_TIMER0, &epxa10db_timer_irq);
-}
-
-struct sys_timer epxa10db_timer = {
-       .init           = epxa10db_timer_init,
-};
index 5830ae3ddd19d721d722e00c03ed417e19ff3320..fc09ba92d66a4673eae8f594ca91ae60d66476b1 100644 (file)
@@ -253,100 +253,101 @@ struct clk s3c24xx_uclk = {
 /* clock definitions */
 
 static struct clk init_clocks[] = {
-       { .name    = "nand",
-         .id      = -1,
-         .parent  = &clk_h,
-         .enable  = s3c24xx_clkcon_enable,
-         .ctrlbit = S3C2410_CLKCON_NAND
-       },
-       { .name    = "lcd",
-         .id      = -1,
-         .parent  = &clk_h,
-         .enable  = s3c24xx_clkcon_enable,
-         .ctrlbit = S3C2410_CLKCON_LCDC
-       },
-       { .name    = "usb-host",
-         .id      = -1,
-         .parent  = &clk_h,
-         .enable  = s3c24xx_clkcon_enable,
-         .ctrlbit = S3C2410_CLKCON_USBH
-       },
-       { .name    = "usb-device",
-         .id      = -1,
-         .parent  = &clk_h,
-         .enable  = s3c24xx_clkcon_enable,
-         .ctrlbit = S3C2410_CLKCON_USBD
-       },
-       { .name    = "timers",
-         .id      = -1,
-         .parent  = &clk_p,
-         .enable  = s3c24xx_clkcon_enable,
-         .ctrlbit = S3C2410_CLKCON_PWMT
-       },
-       { .name    = "sdi",
-         .id      = -1,
-         .parent  = &clk_p,
-         .enable  = s3c24xx_clkcon_enable,
-         .ctrlbit = S3C2410_CLKCON_SDI
-       },
-       { .name    = "uart",
-         .id      = 0,
-         .parent  = &clk_p,
-         .enable  = s3c24xx_clkcon_enable,
-         .ctrlbit = S3C2410_CLKCON_UART0
-       },
-       { .name    = "uart",
-         .id      = 1,
-         .parent  = &clk_p,
-         .enable  = s3c24xx_clkcon_enable,
-         .ctrlbit = S3C2410_CLKCON_UART1
-       },
-       { .name    = "uart",
-         .id      = 2,
-         .parent  = &clk_p,
-         .enable  = s3c24xx_clkcon_enable,
-         .ctrlbit = S3C2410_CLKCON_UART2
-       },
-       { .name    = "gpio",
-         .id      = -1,
-         .parent  = &clk_p,
-         .enable  = s3c24xx_clkcon_enable,
-         .ctrlbit = S3C2410_CLKCON_GPIO
-       },
-       { .name    = "rtc",
-         .id      = -1,
-         .parent  = &clk_p,
-         .enable  = s3c24xx_clkcon_enable,
-         .ctrlbit = S3C2410_CLKCON_RTC
-       },
-       { .name    = "adc",
-         .id      = -1,
-         .parent  = &clk_p,
-         .enable  = s3c24xx_clkcon_enable,
-         .ctrlbit = S3C2410_CLKCON_ADC
-       },
-       { .name    = "i2c",
-         .id      = -1,
-         .parent  = &clk_p,
-         .enable  = s3c24xx_clkcon_enable,
-         .ctrlbit = S3C2410_CLKCON_IIC
-       },
-       { .name    = "iis",
-         .id      = -1,
-         .parent  = &clk_p,
-         .enable  = s3c24xx_clkcon_enable,
-         .ctrlbit = S3C2410_CLKCON_IIS
-       },
-       { .name    = "spi",
-         .id      = -1,
-         .parent  = &clk_p,
-         .enable  = s3c24xx_clkcon_enable,
-         .ctrlbit = S3C2410_CLKCON_SPI
-       },
-       { .name    = "watchdog",
-         .id      = -1,
-         .parent  = &clk_p,
-         .ctrlbit = 0
+       {
+               .name           = "nand",
+               .id             = -1,
+               .parent         = &clk_h,
+               .enable         = s3c24xx_clkcon_enable,
+               .ctrlbit        = S3C2410_CLKCON_NAND,
+       }, {
+               .name           = "lcd",
+               .id             = -1,
+               .parent         = &clk_h,
+               .enable         = s3c24xx_clkcon_enable,
+               .ctrlbit        = S3C2410_CLKCON_LCDC,
+       }, {
+               .name           = "usb-host",
+               .id             = -1,
+               .parent         = &clk_h,
+               .enable         = s3c24xx_clkcon_enable,
+               .ctrlbit        = S3C2410_CLKCON_USBH,
+       }, {
+               .name           = "usb-device",
+               .id             = -1,
+               .parent         = &clk_h,
+               .enable         = s3c24xx_clkcon_enable,
+               .ctrlbit        = S3C2410_CLKCON_USBD,
+       }, {
+               .name           = "timers",
+               .id             = -1,
+               .parent         = &clk_p,
+               .enable         = s3c24xx_clkcon_enable,
+               .ctrlbit        = S3C2410_CLKCON_PWMT,
+       }, {
+               .name           = "sdi",
+               .id             = -1,
+               .parent         = &clk_p,
+               .enable         = s3c24xx_clkcon_enable,
+               .ctrlbit        = S3C2410_CLKCON_SDI,
+       }, {
+               .name           = "uart",
+               .id             = 0,
+               .parent         = &clk_p,
+               .enable         = s3c24xx_clkcon_enable,
+               .ctrlbit        = S3C2410_CLKCON_UART0,
+       }, {
+               .name           = "uart",
+               .id             = 1,
+               .parent         = &clk_p,
+               .enable         = s3c24xx_clkcon_enable,
+               .ctrlbit        = S3C2410_CLKCON_UART1,
+       }, {
+               .name           = "uart",
+               .id             = 2,
+               .parent         = &clk_p,
+               .enable         = s3c24xx_clkcon_enable,
+               .ctrlbit        = S3C2410_CLKCON_UART2,
+       }, {
+               .name           = "gpio",
+               .id             = -1,
+               .parent         = &clk_p,
+               .enable         = s3c24xx_clkcon_enable,
+               .ctrlbit        = S3C2410_CLKCON_GPIO,
+       }, {
+               .name           = "rtc",
+               .id             = -1,
+               .parent         = &clk_p,
+               .enable         = s3c24xx_clkcon_enable,
+               .ctrlbit        = S3C2410_CLKCON_RTC,
+       }, {
+               .name           = "adc",
+               .id             = -1,
+               .parent         = &clk_p,
+               .enable         = s3c24xx_clkcon_enable,
+               .ctrlbit        = S3C2410_CLKCON_ADC,
+       }, {
+               .name           = "i2c",
+               .id             = -1,
+               .parent         = &clk_p,
+               .enable         = s3c24xx_clkcon_enable,
+               .ctrlbit        = S3C2410_CLKCON_IIC,
+       }, {
+               .name           = "iis",
+               .id             = -1,
+               .parent         = &clk_p,
+               .enable         = s3c24xx_clkcon_enable,
+               .ctrlbit        = S3C2410_CLKCON_IIS,
+       }, {
+               .name           = "spi",
+               .id             = -1,
+               .parent         = &clk_p,
+               .enable         = s3c24xx_clkcon_enable,
+               .ctrlbit        = S3C2410_CLKCON_SPI,
+       }, {
+               .name           = "watchdog",
+               .id             = -1,
+               .parent         = &clk_p,
+               .ctrlbit        = 0,
        }
 };
 
@@ -390,16 +391,15 @@ int __init s3c24xx_setup_clocks(unsigned long xtal,
        clk_p.rate = pclk;
        clk_f.rate = fclk;
 
-       /* it looks like just setting the register here is not good
-        * enough, and causes the odd hang at initial boot time, so
-        * do all of them indivdually.
+       /* We must be careful disabling the clocks we are not intending to
+        * be using at boot time, as subsytems such as the LCD which do
+        * their own DMA requests to the bus can cause the system to lockup
+        * if they where in the middle of requesting bus access.
         *
-        * I think disabling the LCD clock if the LCD is active is
-        * very dangerous, and therefore the bootloader should be
-        * careful to not enable the LCD clock if it is not needed.
-        *
-        * and of course, this looks neater
-        */
+        * Disabling the LCD clock if the LCD is active is very dangerous,
+        * and therefore the bootloader should be  careful to not enable
+        * the LCD clock if it is not needed.
+       */
 
        s3c24xx_clk_enable(S3C2410_CLKCON_NAND, 0);
        s3c24xx_clk_enable(S3C2410_CLKCON_USBH, 0);
index e84fdde6edf8ac680d6ddf5f0821f62f1a6f2ce9..3b79d0e234559666d52b8da4bf72cfe6028e7c9e 100644 (file)
@@ -62,8 +62,8 @@ config CPU_ARM720T
 # ARM920T
 config CPU_ARM920T
        bool "Support ARM920T processor" if !ARCH_S3C2410
-       depends on ARCH_INTEGRATOR || ARCH_S3C2410 || ARCH_IMX || ARCH_AAEC2000
-       default y if ARCH_S3C2410
+       depends on ARCH_INTEGRATOR || ARCH_S3C2410 || ARCH_IMX || ARCH_AAEC2000 || ARCH_AT91RM9200
+       default y if ARCH_S3C2410 || ARCH_AT91RM9200
        select CPU_32v4
        select CPU_ABRT_EV4T
        select CPU_CACHE_V4WT
@@ -83,8 +83,8 @@ config CPU_ARM920T
 # ARM922T
 config CPU_ARM922T
        bool "Support ARM922T processor" if ARCH_INTEGRATOR
-       depends on ARCH_CAMELOT || ARCH_LH7A40X || ARCH_INTEGRATOR
-       default y if ARCH_CAMELOT || ARCH_LH7A40X
+       depends on ARCH_LH7A40X || ARCH_INTEGRATOR
+       default y if ARCH_LH7A40X
        select CPU_32v4
        select CPU_ABRT_EV4T
        select CPU_CACHE_V4WT
index 10901398e4a28787abd2392f19a1b109ab070706..de3ce1eec2ece4d222a2293bfa325fb585104433 100644 (file)
@@ -86,11 +86,12 @@ remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size,
 }
 
 static int
-remap_area_pages(unsigned long start, unsigned long phys_addr,
+remap_area_pages(unsigned long start, unsigned long pfn,
                 unsigned long size, unsigned long flags)
 {
        unsigned long address = start;
        unsigned long end = start + size;
+       unsigned long phys_addr = __pfn_to_phys(pfn);
        int err = 0;
        pgd_t * dir;
 
@@ -129,37 +130,45 @@ remap_area_pages(unsigned long start, unsigned long phys_addr,
  * 'flags' are the extra L_PTE_ flags that you want to specify for this
  * mapping.  See include/asm-arm/proc-armv/pgtable.h for more information.
  */
+void __iomem *
+__ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
+             unsigned long flags)
+{
+       unsigned long addr;
+       struct vm_struct * area;
+
+       area = get_vm_area(size, VM_IOREMAP);
+       if (!area)
+               return NULL;
+       addr = (unsigned long)area->addr;
+       if (remap_area_pages(addr, pfn, size, flags)) {
+               vfree(addr);
+               return NULL;
+       }
+       return (void __iomem *) (offset + (char *)addr);
+}
+EXPORT_SYMBOL(__ioremap_pfn);
+
 void __iomem *
 __ioremap(unsigned long phys_addr, size_t size, unsigned long flags)
 {
-       void * addr;
-       struct vm_struct * area;
-       unsigned long offset, last_addr;
+       unsigned long last_addr;
+       unsigned long offset = phys_addr & ~PAGE_MASK;
+       unsigned long pfn = __phys_to_pfn(phys_addr);
 
-       /* Don't allow wraparound or zero size */
+       /*
+        * Don't allow wraparound or zero size
+        */
        last_addr = phys_addr + size - 1;
        if (!size || last_addr < phys_addr)
                return NULL;
 
        /*
-        * Mappings have to be page-aligned
+        * Page align the mapping size
         */
-       offset = phys_addr & ~PAGE_MASK;
-       phys_addr &= PAGE_MASK;
        size = PAGE_ALIGN(last_addr + 1) - phys_addr;
 
-       /*
-        * Ok, go for it..
-        */
-       area = get_vm_area(size, VM_IOREMAP);
-       if (!area)
-               return NULL;
-       addr = area->addr;
-       if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) {
-               vfree(addr);
-               return NULL;
-       }
-       return (void __iomem *) (offset + (char *)addr);
+       return __ioremap_pfn(pfn, offset, size, flags);
 }
 EXPORT_SYMBOL(__ioremap);
 
index 465487470d0e2494025f32edd9a41eee92a4ad84..d0f9bb5e9023033b73ece7e928dd7aeba9930165 100644 (file)
@@ -12,7 +12,7 @@
 #
 #   http://www.arm.linux.org.uk/developer/machines/?action=new
 #
-# Last update: Fri Nov 25 14:43:04 2005
+# Last update: Mon Jan 9 12:56:42 2006
 #
 # machine_is_xxx       CONFIG_xxxx             MACH_TYPE_xxx           number
 #
@@ -910,3 +910,31 @@ mbus                       MACH_MBUS               MBUS                    896
 nadia2vb               MACH_NADIA2VB           NADIA2VB                897
 r1000                  MACH_R1000              R1000                   898
 hw90250                        MACH_HW90250            HW90250                 899
+omap_2430sdp           MACH_OMAP_2430SDP       OMAP_2430SDP            900
+davinci_evm            MACH_DAVINCI_EVM        DAVINCI_EVM             901
+omap_tornado           MACH_OMAP_TORNADO       OMAP_TORNADO            902
+olocreek               MACH_OLOCREEK           OLOCREEK                903
+palmz72                        MACH_PALMZ72            PALMZ72                 904
+nxdb500                        MACH_NXDB500            NXDB500                 905
+apf9328                        MACH_APF9328            APF9328                 906
+omap_wipoq             MACH_OMAP_WIPOQ         OMAP_WIPOQ              907
+omap_twip              MACH_OMAP_TWIP          OMAP_TWIP               908
+xscale_treo650         MACH_XSCALE_PALMTREO650 XSCALE_PALMTREO650      909
+acumen                 MACH_ACUMEN             ACUMEN                  910
+xp100                  MACH_XP100              XP100                   911
+fs2410                 MACH_FS2410             FS2410                  912
+pxa270_cerf            MACH_PXA270_CERF        PXA270_CERF             913
+sq2ftlpalm             MACH_SQ2FTLPALM         SQ2FTLPALM              914
+bsemserver             MACH_BSEMSERVER         BSEMSERVER              915
+netclient              MACH_NETCLIENT          NETCLIENT               916
+xscale_palmtt5         MACH_XSCALE_PALMTT5     XSCALE_PALMTT5          917
+xscale_palmtc          MACH_OMAP_PALMTC        OMAP_PALMTC             918
+omap_apollon           MACH_OMAP_APOLLON       OMAP_APOLLON            919
+argonlvevb             MACH_ARGONLVEVB         ARGONLVEVB              920
+rea_2d                 MACH_REA_2D             REA_2D                  921
+eti3e524               MACH_TI3E524            TI3E524                 922
+ateb9200               MACH_ATEB9200           ATEB9200                923
+auckland               MACH_AUCKLAND           AUCKLAND                924
+ak3220m                        MACH_AK3320M            AK3320M                 925
+duramax                        MACH_DURAMAX            DURAMAX                 926
+n35                    MACH_N35                N35                     927
index 7b73c67cb4e81802cde151ce3733e2f34db7f956..911b15377f2efeded7a46a13c692770b232a79af 100644 (file)
@@ -255,18 +255,17 @@ aes_enc_blk:
        xor     8(%ebp),%r4
        xor     12(%ebp),%r5
 
-       sub     $8,%esp           // space for register saves on stack
-       add     $16,%ebp          // increment to next round key
-       sub     $10,%r3          
-       je      4f              // 10 rounds for 128-bit key
-       add     $32,%ebp
-       sub     $2,%r3
-       je      3f              // 12 rounds for 128-bit key
-       add     $32,%ebp
-
-2:     fwd_rnd1( -64(%ebp) ,ft_tab)    // 14 rounds for 128-bit key
+       sub     $8,%esp         // space for register saves on stack
+       add     $16,%ebp        // increment to next round key
+       cmp     $12,%r3
+       jb      4f              // 10 rounds for 128-bit key
+       lea     32(%ebp),%ebp
+       je      3f              // 12 rounds for 192-bit key
+       lea     32(%ebp),%ebp
+
+2:     fwd_rnd1( -64(%ebp) ,ft_tab)    // 14 rounds for 256-bit key
        fwd_rnd2( -48(%ebp) ,ft_tab)
-3:     fwd_rnd1( -32(%ebp) ,ft_tab)    // 12 rounds for 128-bit key
+3:     fwd_rnd1( -32(%ebp) ,ft_tab)    // 12 rounds for 192-bit key
        fwd_rnd2( -16(%ebp) ,ft_tab)
 4:     fwd_rnd1(    (%ebp) ,ft_tab)    // 10 rounds for 128-bit key
        fwd_rnd2( +16(%ebp) ,ft_tab)
@@ -334,18 +333,17 @@ aes_dec_blk:
        xor     8(%ebp),%r4
        xor     12(%ebp),%r5
 
-       sub     $8,%esp         // space for register saves on stack
-       sub     $16,%ebp        // increment to next round key
-       sub     $10,%r3          
-       je      4f              // 10 rounds for 128-bit key
-       sub     $32,%ebp
-       sub     $2,%r3
-       je      3f              // 12 rounds for 128-bit key
-       sub     $32,%ebp
+       sub     $8,%esp         // space for register saves on stack
+       sub     $16,%ebp        // increment to next round key
+       cmp     $12,%r3
+       jb      4f              // 10 rounds for 128-bit key
+       lea     -32(%ebp),%ebp
+       je      3f              // 12 rounds for 192-bit key
+       lea     -32(%ebp),%ebp
 
-2:     inv_rnd1( +64(%ebp), it_tab)    // 14 rounds for 128-bit key
+2:     inv_rnd1( +64(%ebp), it_tab)    // 14 rounds for 256-bit key
        inv_rnd2( +48(%ebp), it_tab)
-3:     inv_rnd1( +32(%ebp), it_tab)    // 12 rounds for 128-bit key
+3:     inv_rnd1( +32(%ebp), it_tab)    // 12 rounds for 192-bit key
        inv_rnd2( +16(%ebp), it_tab)
 4:     inv_rnd1(    (%ebp), it_tab)    // 10 rounds for 128-bit key
        inv_rnd2( -16(%ebp), it_tab)
index 88ee85c3b43be94868e0229286a6db51cc9229cf..a50397b1d5c7b28ea05767ede5dca98dd40a898e 100644 (file)
@@ -36,6 +36,8 @@
  * Copyright (c) 2004 Red Hat, Inc., James Morris <jmorris@redhat.com>
  *
  */
+
+#include <asm/byteorder.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
@@ -59,7 +61,6 @@ struct aes_ctx {
 };
 
 #define WPOLY 0x011b
-#define u32_in(x) le32_to_cpup((const __le32 *)(x))
 #define bytes2word(b0, b1, b2, b3)  \
        (((u32)(b3) << 24) | ((u32)(b2) << 16) | ((u32)(b1) << 8) | (b0))
 
@@ -93,7 +94,6 @@ static u32 rcon_tab[RC_LENGTH];
 
 u32 ft_tab[4][256];
 u32 fl_tab[4][256];
-static u32 ls_tab[4][256];
 static u32 im_tab[4][256];
 u32 il_tab[4][256];
 u32 it_tab[4][256];
@@ -144,15 +144,6 @@ static void gen_tabs(void)
                fl_tab[2][i] = upr(w, 2);
                fl_tab[3][i] = upr(w, 3);
                
-               /*
-                * table for key schedule if fl_tab above is
-                * not of the required form
-                */
-               ls_tab[0][i] = w;
-               ls_tab[1][i] = upr(w, 1);
-               ls_tab[2][i] = upr(w, 2);
-               ls_tab[3][i] = upr(w, 3);
-               
                b = fi(inv_affine((u8)i));
                w = bytes2word(fe(b), f9(b), fd(b), fb(b));
 
@@ -393,13 +384,14 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
        int i;
        u32 ss[8];
        struct aes_ctx *ctx = ctx_arg;
+       const __le32 *key = (const __le32 *)in_key;
 
        /* encryption schedule */
        
-       ctx->ekey[0] = ss[0] = u32_in(in_key);
-       ctx->ekey[1] = ss[1] = u32_in(in_key + 4);
-       ctx->ekey[2] = ss[2] = u32_in(in_key + 8);
-       ctx->ekey[3] = ss[3] = u32_in(in_key + 12);
+       ctx->ekey[0] = ss[0] = le32_to_cpu(key[0]);
+       ctx->ekey[1] = ss[1] = le32_to_cpu(key[1]);
+       ctx->ekey[2] = ss[2] = le32_to_cpu(key[2]);
+       ctx->ekey[3] = ss[3] = le32_to_cpu(key[3]);
 
        switch(key_len) {
        case 16:
@@ -410,8 +402,8 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
                break;
                
        case 24:
-               ctx->ekey[4] = ss[4] = u32_in(in_key + 16);
-               ctx->ekey[5] = ss[5] = u32_in(in_key + 20);
+               ctx->ekey[4] = ss[4] = le32_to_cpu(key[4]);
+               ctx->ekey[5] = ss[5] = le32_to_cpu(key[5]);
                for (i = 0; i < 7; i++)
                        ke6(ctx->ekey, i);
                kel6(ctx->ekey, 7); 
@@ -419,10 +411,10 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
                break;
 
        case 32:
-               ctx->ekey[4] = ss[4] = u32_in(in_key + 16);
-               ctx->ekey[5] = ss[5] = u32_in(in_key + 20);
-               ctx->ekey[6] = ss[6] = u32_in(in_key + 24);
-               ctx->ekey[7] = ss[7] = u32_in(in_key + 28);
+               ctx->ekey[4] = ss[4] = le32_to_cpu(key[4]);
+               ctx->ekey[5] = ss[5] = le32_to_cpu(key[5]);
+               ctx->ekey[6] = ss[6] = le32_to_cpu(key[6]);
+               ctx->ekey[7] = ss[7] = le32_to_cpu(key[7]);
                for (i = 0; i < 6; i++)
                        ke8(ctx->ekey, i);
                kel8(ctx->ekey, 6);
@@ -436,10 +428,10 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
        
        /* decryption schedule */
        
-       ctx->dkey[0] = ss[0] = u32_in(in_key);
-       ctx->dkey[1] = ss[1] = u32_in(in_key + 4);
-       ctx->dkey[2] = ss[2] = u32_in(in_key + 8);
-       ctx->dkey[3] = ss[3] = u32_in(in_key + 12);
+       ctx->dkey[0] = ss[0] = le32_to_cpu(key[0]);
+       ctx->dkey[1] = ss[1] = le32_to_cpu(key[1]);
+       ctx->dkey[2] = ss[2] = le32_to_cpu(key[2]);
+       ctx->dkey[3] = ss[3] = le32_to_cpu(key[3]);
 
        switch (key_len) {
        case 16:
@@ -450,8 +442,8 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
                break;
                
        case 24:
-               ctx->dkey[4] = ff(ss[4] = u32_in(in_key + 16));
-               ctx->dkey[5] = ff(ss[5] = u32_in(in_key + 20));
+               ctx->dkey[4] = ff(ss[4] = le32_to_cpu(key[4]));
+               ctx->dkey[5] = ff(ss[5] = le32_to_cpu(key[5]));
                kdf6(ctx->dkey, 0);
                for (i = 1; i < 7; i++)
                        kd6(ctx->dkey, i);
@@ -459,10 +451,10 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
                break;
 
        case 32:
-               ctx->dkey[4] = ff(ss[4] = u32_in(in_key + 16));
-               ctx->dkey[5] = ff(ss[5] = u32_in(in_key + 20));
-               ctx->dkey[6] = ff(ss[6] = u32_in(in_key + 24));
-               ctx->dkey[7] = ff(ss[7] = u32_in(in_key + 28));
+               ctx->dkey[4] = ff(ss[4] = le32_to_cpu(key[4]));
+               ctx->dkey[5] = ff(ss[5] = le32_to_cpu(key[5]));
+               ctx->dkey[6] = ff(ss[6] = le32_to_cpu(key[6]));
+               ctx->dkey[7] = ff(ss[7] = le32_to_cpu(key[7]));
                kdf8(ctx->dkey, 0);
                for (i = 1; i < 6; i++)
                        kd8(ctx->dkey, i);
@@ -484,6 +476,8 @@ static inline void aes_decrypt(void *ctx, u8 *dst, const u8 *src)
 
 static struct crypto_alg aes_alg = {
        .cra_name               =       "aes",
+       .cra_driver_name        =       "aes-i586",
+       .cra_priority           =       200,
        .cra_flags              =       CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize          =       AES_BLOCK_SIZE,
        .cra_ctxsize            =       sizeof(struct aes_ctx),
index 46a6ad60a8f5a12ad117664ad6b2625f86eff5f4..a3fb3376ffa06c744e96338d17ecc519c237c24f 100644 (file)
@@ -1,46 +1,67 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.11
-# Sun Mar  6 20:47:29 2005
+# Linux kernel version: 2.6.15
+# Mon Jan  9 14:36:29 2006
 #
+CONFIG_SPARC=y
+CONFIG_SPARC64=y
 CONFIG_64BIT=y
 CONFIG_MMU=y
 CONFIG_TIME_INTERPOLATION=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_SPARC64_PAGE_SIZE_8KB=y
+# CONFIG_SPARC64_PAGE_SIZE_64KB is not set
+# CONFIG_SPARC64_PAGE_SIZE_512KB is not set
+# CONFIG_SPARC64_PAGE_SIZE_4MB is not set
+CONFIG_SECCOMP=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
 
 #
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
 CONFIG_CLEAN_COMPILE=y
-CONFIG_LOCK_KERNEL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
 
 #
 # General setup
 #
 CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 # CONFIG_AUDIT is not set
-CONFIG_LOG_BUF_SHIFT=15
-CONFIG_HOTPLUG=y
-CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_UID16=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SHMEM=y
 CONFIG_CC_ALIGN_FUNCTIONS=0
 CONFIG_CC_ALIGN_LABELS=0
 CONFIG_CC_ALIGN_LOOPS=0
 CONFIG_CC_ALIGN_JUMPS=0
+CONFIG_SLAB=y
 # CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
 
 #
 # Loadable module support
@@ -52,20 +73,32 @@ CONFIG_OBSOLETE_MODPARM=y
 CONFIG_MODVERSIONS=y
 CONFIG_MODULE_SRCVERSION_ALL=y
 CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
+
+#
+# Block layer
+#
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
 CONFIG_SYSVIPC_COMPAT=y
 
 #
 # General machine setup
 #
-CONFIG_BBC_I2C=m
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SMP=y
+# CONFIG_SMP is not set
 # CONFIG_PREEMPT is not set
-CONFIG_NR_CPUS=4
 CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=m
 # CONFIG_CPU_FREQ_DEBUG is not set
 CONFIG_CPU_FREQ_STAT=m
 CONFIG_CPU_FREQ_STAT_DETAILS=y
@@ -75,15 +108,22 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
 CONFIG_CPU_FREQ_GOV_POWERSAVE=m
 CONFIG_CPU_FREQ_GOV_USERSPACE=m
 CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_TABLE=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
 CONFIG_US3_FREQ=m
 CONFIG_US2E_FREQ=m
-CONFIG_SPARC64=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_HUGETLB_PAGE_SIZE_4MB=y
 # CONFIG_HUGETLB_PAGE_SIZE_512K is not set
 # CONFIG_HUGETLB_PAGE_SIZE_64K is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_SBUS=y
 CONFIG_SBUSCHAR=y
@@ -91,141 +131,161 @@ CONFIG_SUN_AUXIO=y
 CONFIG_SUN_IO=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
-CONFIG_RTC=y
 # CONFIG_PCI_LEGACY_PROC is not set
-# CONFIG_PCI_NAMES is not set
+# CONFIG_PCI_DEBUG is not set
 CONFIG_SUN_OPENPROMFS=m
 CONFIG_SPARC32_COMPAT=y
 CONFIG_COMPAT=y
-CONFIG_UID16=y
 CONFIG_BINFMT_ELF32=y
 # CONFIG_BINFMT_AOUT32 is not set
+
+#
+# Executable file formats
+#
 CONFIG_BINFMT_ELF=y
 CONFIG_BINFMT_MISC=m
-CONFIG_SOLARIS_EMUL=m
+# CONFIG_SOLARIS_EMUL is not set
+# CONFIG_CMDLINE_BOOL is not set
 
 #
-# Parallel port support
+# Networking
 #
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_PC_FIFO=y
-# CONFIG_PARPORT_PC_SUPERIO is not set
-# CONFIG_PARPORT_SUNBPP is not set
-# CONFIG_PARPORT_OTHER is not set
-CONFIG_PARPORT_1284=y
-CONFIG_PRINTER=m
-CONFIG_ENVCTRL=m
-CONFIG_DISPLAY7SEG=m
-# CONFIG_CMDLINE_BOOL is not set
+CONFIG_NET=y
 
 #
-# Generic Driver Options
+# Networking options
 #
-CONFIG_STANDALONE=y
-# CONFIG_PREVENT_FIRMWARE_BUILD is not set
-CONFIG_FW_LOADER=m
-# CONFIG_DEBUG_DRIVER is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+CONFIG_NET_KEY=m
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+CONFIG_NET_IPGRE_BROADCAST=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+CONFIG_ARPD=y
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=y
+CONFIG_INET_ESP=y
+CONFIG_INET_IPCOMP=y
+CONFIG_INET_TUNNEL=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+CONFIG_TCP_CONG_ADVANCED=y
 
 #
-# Graphics support
+# TCP congestion control
 #
-CONFIG_FB=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-# CONFIG_FB_CIRRUS is not set
-CONFIG_FB_PM2=y
-# CONFIG_FB_PM2_FIFO_DISCONNECT is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-# CONFIG_FB_BW2 is not set
-# CONFIG_FB_CG3 is not set
-CONFIG_FB_CG6=y
-# CONFIG_FB_RIVA is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-CONFIG_FB_ATY=y
-CONFIG_FB_ATY_CT=y
-# CONFIG_FB_ATY_GENERIC_LCD is not set
-# CONFIG_FB_ATY_XL_INIT is not set
-CONFIG_FB_ATY_GX=y
-# CONFIG_FB_SAVAGE is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-# CONFIG_FB_KYRO is not set
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-CONFIG_FB_SBUS=y
-CONFIG_FB_FFB=y
-# CONFIG_FB_TCX is not set
-# CONFIG_FB_CG14 is not set
-# CONFIG_FB_P9100 is not set
-# CONFIG_FB_LEO is not set
-# CONFIG_FB_PCI is not set
-# CONFIG_FB_VIRTUAL is not set
+CONFIG_TCP_CONG_BIC=y
+CONFIG_TCP_CONG_CUBIC=m
+CONFIG_TCP_CONG_WESTWOOD=m
+CONFIG_TCP_CONG_HTCP=m
+CONFIG_TCP_CONG_HSTCP=m
+CONFIG_TCP_CONG_HYBLA=m
+CONFIG_TCP_CONG_VEGAS=m
+CONFIG_TCP_CONG_SCALABLE=m
+CONFIG_IPV6=m
+CONFIG_IPV6_PRIVACY=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_NETFILTER is not set
 
 #
-# Console display driver support
+# DCCP Configuration (EXPERIMENTAL)
 #
-# CONFIG_PROM_CONSOLE is not set
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FONTS=y
-# CONFIG_FONT_8x8 is not set
-# CONFIG_FONT_8x16 is not set
-# CONFIG_FONT_6x11 is not set
-# CONFIG_FONT_PEARL_8x8 is not set
-# CONFIG_FONT_ACORN_8x8 is not set
-CONFIG_FONT_SUN8x16=y
-# CONFIG_FONT_SUN12x22 is not set
+CONFIG_IP_DCCP=m
+CONFIG_INET_DCCP_DIAG=m
 
 #
-# Logo configuration
+# DCCP CCIDs Configuration (EXPERIMENTAL)
 #
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-# CONFIG_LOGO_LINUX_CLUT224 is not set
-CONFIG_LOGO_SUN_CLUT224=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+CONFIG_IP_DCCP_CCID3=m
+CONFIG_IP_DCCP_TFRC_LIB=m
 
 #
-# Serial drivers
+# DCCP Kernel Hacking
 #
+# CONFIG_IP_DCCP_DEBUG is not set
+# CONFIG_IP_DCCP_UNLOAD_HACK is not set
 
 #
-# Non-8250 serial port support
+# SCTP Configuration (EXPERIMENTAL)
 #
-CONFIG_SERIAL_SUNCORE=y
-CONFIG_SERIAL_SUNZILOG=y
-CONFIG_SERIAL_SUNZILOG_CONSOLE=y
-CONFIG_SERIAL_SUNSU=y
-CONFIG_SERIAL_SUNSU_CONSOLE=y
-CONFIG_SERIAL_SUNSAB=m
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+CONFIG_VLAN_8021Q=m
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
 
 #
-# Misc Linux/SPARC drivers
+# QoS and/or fair queueing
 #
-CONFIG_SUN_OPENPROMIO=m
-CONFIG_SUN_MOSTEK_RTC=y
-CONFIG_OBP_FLASH=m
-# CONFIG_SUN_BPP is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+CONFIG_CONNECTOR=m
 
 #
 # Memory Technology Devices (MTD)
 #
 # CONFIG_MTD is not set
 
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
 #
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
-# CONFIG_PARIDE is not set
 # CONFIG_BLK_CPQ_DA is not set
 # CONFIG_BLK_CPQ_CISS_DA is not set
 # CONFIG_BLK_DEV_DAC960 is not set
@@ -234,22 +294,13 @@ CONFIG_OBP_FLASH=m
 CONFIG_BLK_DEV_LOOP=m
 CONFIG_BLK_DEV_CRYPTOLOOP=m
 CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
+# CONFIG_BLK_DEV_SX8 is not set
 CONFIG_BLK_DEV_UB=m
 # CONFIG_BLK_DEV_RAM is not set
 CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_INITRAMFS_SOURCE=""
 CONFIG_CDROM_PKTCDVD=m
 CONFIG_CDROM_PKTCDVD_BUFFERS=8
 CONFIG_CDROM_PKTCDVD_WCACHE=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
 CONFIG_ATA_OVER_ETH=m
 
 #
@@ -265,7 +316,7 @@ CONFIG_BLK_DEV_IDE=y
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
 CONFIG_BLK_DEV_IDECD=y
-CONFIG_BLK_DEV_IDETAPE=m
+# CONFIG_BLK_DEV_IDETAPE is not set
 # CONFIG_BLK_DEV_IDEFLOPPY is not set
 # CONFIG_BLK_DEV_IDESCSI is not set
 # CONFIG_IDE_TASK_IOCTL is not set
@@ -278,7 +329,7 @@ CONFIG_BLK_DEV_IDEPCI=y
 # CONFIG_IDEPCI_SHARE_IRQ is not set
 # CONFIG_BLK_DEV_OFFBOARD is not set
 # CONFIG_BLK_DEV_GENERIC is not set
-CONFIG_BLK_DEV_OPTI621=m
+# CONFIG_BLK_DEV_OPTI621 is not set
 CONFIG_BLK_DEV_IDEDMA_PCI=y
 # CONFIG_BLK_DEV_IDEDMA_FORCED is not set
 CONFIG_IDEDMA_PCI_AUTO=y
@@ -286,27 +337,25 @@ CONFIG_IDEDMA_ONLYDISK=y
 # CONFIG_BLK_DEV_AEC62XX is not set
 CONFIG_BLK_DEV_ALI15X3=y
 # CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=m
-CONFIG_BLK_DEV_CMD64X=m
-CONFIG_BLK_DEV_TRIFLEX=m
-CONFIG_BLK_DEV_CY82C693=m
-CONFIG_BLK_DEV_CS5520=m
-CONFIG_BLK_DEV_CS5530=m
-CONFIG_BLK_DEV_HPT34X=m
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=m
-CONFIG_BLK_DEV_SC1200=m
-CONFIG_BLK_DEV_PIIX=m
-CONFIG_BLK_DEV_NS87415=m
-CONFIG_BLK_DEV_PDC202XX_OLD=m
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=m
-# CONFIG_PDC202XX_FORCE is not set
-CONFIG_BLK_DEV_SVWKS=m
-CONFIG_BLK_DEV_SIIMAGE=m
-CONFIG_BLK_DEV_SLC90E66=m
-CONFIG_BLK_DEV_TRM290=m
-CONFIG_BLK_DEV_VIA82CXXX=m
+# CONFIG_BLK_DEV_AMD74XX is not set
+# CONFIG_BLK_DEV_CMD64X is not set
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CY82C693 is not set
+# CONFIG_BLK_DEV_CS5520 is not set
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+# CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_IT821X is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+# CONFIG_BLK_DEV_PDC202XX_NEW is not set
+# CONFIG_BLK_DEV_SVWKS is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
 # CONFIG_IDE_ARM is not set
 CONFIG_BLK_DEV_IDEDMA=y
 # CONFIG_IDEDMA_IVB is not set
@@ -316,6 +365,7 @@ CONFIG_IDEDMA_AUTO=y
 #
 # SCSI device support
 #
+CONFIG_RAID_ATTRS=m
 CONFIG_SCSI=y
 CONFIG_SCSI_PROC_FS=y
 
@@ -323,11 +373,12 @@ CONFIG_SCSI_PROC_FS=y
 # SCSI support type (disk, tape, CD-ROM)
 #
 CONFIG_BLK_DEV_SD=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
 CONFIG_BLK_DEV_SR=m
 CONFIG_BLK_DEV_SR_VENDOR=y
 CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
 
 #
 # Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -340,89 +391,42 @@ CONFIG_SCSI_CONSTANTS=y
 # SCSI Transport Attributes
 #
 CONFIG_SCSI_SPI_ATTRS=y
-CONFIG_SCSI_FC_ATTRS=m
+CONFIG_SCSI_FC_ATTRS=y
 CONFIG_SCSI_ISCSI_ATTRS=m
+# CONFIG_SCSI_SAS_ATTRS is not set
 
 #
 # SCSI low-level drivers
 #
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
+CONFIG_ISCSI_TCP=m
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_3W_9XXX is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AACRAID is not set
 # CONFIG_SCSI_AIC7XXX is not set
 # CONFIG_SCSI_AIC7XXX_OLD is not set
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
+# CONFIG_SCSI_AIC79XX is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
-CONFIG_SCSI_SATA=y
-CONFIG_SCSI_SATA_AHCI=m
-CONFIG_SCSI_SATA_SVW=m
-CONFIG_SCSI_ATA_PIIX=m
-CONFIG_SCSI_SATA_NV=m
-CONFIG_SCSI_SATA_PROMISE=m
-CONFIG_SCSI_SATA_QSTOR=m
-CONFIG_SCSI_SATA_SX4=m
-CONFIG_SCSI_SATA_SIL=m
-CONFIG_SCSI_SATA_SIS=m
-CONFIG_SCSI_SATA_ULI=m
-CONFIG_SCSI_SATA_VIA=m
-CONFIG_SCSI_SATA_VITESSE=m
-CONFIG_SCSI_DMX3191D=m
-CONFIG_SCSI_EATA_PIO=m
+# CONFIG_MEGARAID_SAS is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-CONFIG_SCSI_INIA100=m
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_SYM53C8XX_2=y
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
+# CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
 # CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_ISP=m
-CONFIG_SCSI_QLOGIC_FC=y
-CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
+# CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
-CONFIG_SCSI_QLOGICPTI=m
+# CONFIG_SCSI_QLOGICPTI is not set
 CONFIG_SCSI_QLA2XXX=y
-# CONFIG_SCSI_QLA21XX is not set
-# CONFIG_SCSI_QLA22XX is not set
-# CONFIG_SCSI_QLA2300 is not set
-# CONFIG_SCSI_QLA2322 is not set
-# CONFIG_SCSI_QLA6312 is not set
-CONFIG_SCSI_DC395x=m
+# CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE is not set
+# CONFIG_SCSI_LPFC is not set
+# CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
-CONFIG_SCSI_DEBUG=m
-CONFIG_SCSI_SUNESP=y
-
-#
-# Fibre Channel support
-#
-CONFIG_FC4=m
-
-#
-# FC4 drivers
-#
-CONFIG_FC4_SOC=m
-CONFIG_FC4_SOCAL=m
-
-#
-# FC4 targets
-#
-CONFIG_SCSI_PLUTO=m
-CONFIG_SCSI_FCAL=m
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SUNESP is not set
 
 #
 # Multi-device support (RAID and LVM)
@@ -442,657 +446,142 @@ CONFIG_DM_CRYPT=m
 CONFIG_DM_SNAPSHOT=m
 CONFIG_DM_MIRROR=m
 CONFIG_DM_ZERO=m
+# CONFIG_DM_MULTIPATH is not set
 
 #
 # Fusion MPT device support
 #
-CONFIG_FUSION=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
+# CONFIG_FUSION is not set
+# CONFIG_FUSION_SPI is not set
+# CONFIG_FUSION_FC is not set
+# CONFIG_FUSION_SAS is not set
 
 #
 # IEEE 1394 (FireWire) support
 #
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-CONFIG_IEEE1394_OUI_DB=y
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
+# CONFIG_IEEE1394 is not set
 
 #
-# Networking support
+# I2O device support
 #
-CONFIG_NET=y
+# CONFIG_I2O is not set
 
 #
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=y
-CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-CONFIG_ARPD=y
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=y
-CONFIG_INET_ESP=y
-CONFIG_INET_IPCOMP=y
-CONFIG_INET_TUNNEL=y
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-
+# Network device support
 #
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_REALM=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_MATCH_COMMENT=m
-CONFIG_IP_NF_MATCH_CONNMARK=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_TARGET_CONNMARK=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_TARGET_NOTRACK=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration
-#
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_PHYSDEV=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# DECnet: Netfilter Configuration
-#
-CONFIG_DECNET_NF_GRABULATOR=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_ATM=y
-CONFIG_ATM_CLIP=y
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-CONFIG_ATM_MPOA=m
-CONFIG_ATM_BR2684=m
-CONFIG_ATM_BR2684_IPFILTER=y
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-CONFIG_DECNET=m
-CONFIG_DECNET_ROUTER=y
-CONFIG_DECNET_ROUTE_FWMARK=y
-CONFIG_LLC=m
-CONFIG_LLC2=m
-CONFIG_IPX=m
-# CONFIG_IPX_INTERN is not set
-CONFIG_ATALK=m
-# CONFIG_DEV_APPLETALK is not set
-CONFIG_X25=m
-CONFIG_LAPB=m
-CONFIG_NET_DIVERT=y
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-# CONFIG_NET_SCH_CLK_JIFFIES is not set
-# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
-CONFIG_NET_SCH_CLK_CPU=y
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=y
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_NET_CLS_IND=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-# CONFIG_NETPOLL_TRAP is not set
-CONFIG_NET_POLL_CONTROLLER=y
-CONFIG_HAMRADIO=y
-
-#
-# Packet Radio protocols
-#
-CONFIG_AX25=m
-CONFIG_AX25_DAMA_SLAVE=y
-CONFIG_NETROM=m
-CONFIG_ROSE=m
-
-#
-# AX.25 network device drivers
-#
-# CONFIG_BPQETHER is not set
-# CONFIG_BAYCOM_SER_FDX is not set
-# CONFIG_BAYCOM_SER_HDX is not set
-# CONFIG_BAYCOM_PAR is not set
-# CONFIG_YAM is not set
-CONFIG_IRDA=m
-
-#
-# IrDA protocols
-#
-CONFIG_IRLAN=m
-CONFIG_IRNET=m
-CONFIG_IRCOMM=m
-CONFIG_IRDA_ULTRA=y
-
-#
-# IrDA options
-#
-CONFIG_IRDA_CACHE_LAST_LSAP=y
-CONFIG_IRDA_FAST_RR=y
-# CONFIG_IRDA_DEBUG is not set
-
-#
-# Infrared-port device drivers
-#
-
-#
-# SIR device drivers
-#
-# CONFIG_IRTTY_SIR is not set
-
-#
-# Dongle support
-#
-
-#
-# Old SIR device drivers
-#
-
-#
-# Old Serial dongle support
-#
-
-#
-# FIR device drivers
-#
-# CONFIG_USB_IRDA is not set
-CONFIG_SIGMATEL_FIR=m
-# CONFIG_VLSI_FIR is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIUART_BCSP_TXCRC=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIVHCI=m
 CONFIG_NETDEVICES=y
 CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-# CONFIG_ETHERTAP is not set
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_SUNLANCE=y
-CONFIG_HAPPYMEAL=y
-CONFIG_SUNBMAC=m
-CONFIG_SUNQE=m
-CONFIG_SUNGEM=y
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-CONFIG_TULIP_NAPI_HW_MITIGATION=y
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-# CONFIG_DM9102 is not set
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-# CONFIG_AMD8111_ETH is not set
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-CONFIG_DGRS=m
-CONFIG_EEPRO100=m
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-# CONFIG_8139CP is not set
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 is not set
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-CONFIG_SUNDANCE=m
-CONFIG_SUNDANCE_MMIO=y
-CONFIG_VIA_RHINE=m
-# CONFIG_VIA_RHINE_MMIO is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-CONFIG_MYRI_SBUS=m
-CONFIG_NS83820=m
-CONFIG_HAMACHI=m
-CONFIG_YELLOWFIN=m
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_R8169_VLAN=y
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_2BUFF_MODE=y
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
 
 #
-# Token Ring devices
-#
-# CONFIG_TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_NET_WIRELESS=y
-
-#
-# Wan interfaces
+# ARCnet devices
 #
-# CONFIG_WAN is not set
+# CONFIG_ARCNET is not set
 
 #
-# ATM drivers
-#
-CONFIG_ATM_TCP=m
-# CONFIG_ATM_LANAI is not set
-# CONFIG_ATM_ENI is not set
-# CONFIG_ATM_FIRESTREAM is not set
-# CONFIG_ATM_ZATM is not set
-# CONFIG_ATM_IDT77252 is not set
-# CONFIG_ATM_AMBASSADOR is not set
-# CONFIG_ATM_HORIZON is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-CONFIG_ATM_FORE200E_PCA=y
-CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
-CONFIG_ATM_FORE200E_SBA=y
-CONFIG_ATM_FORE200E_SBA_DEFAULT_FW=y
-CONFIG_ATM_FORE200E_USE_TASKLET=y
-CONFIG_ATM_FORE200E_TX_RETRY=16
-CONFIG_ATM_FORE200E_DEBUG=0
-CONFIG_ATM_FORE200E=m
-CONFIG_ATM_HE=m
-CONFIG_ATM_HE_USE_SUNI=y
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-CONFIG_SKFP=m
-CONFIG_HIPPI=y
-# CONFIG_ROADRUNNER is not set
-CONFIG_PLIP=m
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-CONFIG_NET_FC=y
-CONFIG_SHAPER=m
-CONFIG_NETCONSOLE=m
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
 
 #
-# ISDN subsystem
+# Ethernet (10 or 100Mbit)
 #
-CONFIG_ISDN=m
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+# CONFIG_SUNLANCE is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNBMAC is not set
+# CONFIG_SUNQE is not set
+# CONFIG_SUNGEM is not set
+CONFIG_CASSINI=m
+# CONFIG_NET_VENDOR_3COM is not set
 
 #
-# Old ISDN4Linux
+# Tulip family network device support
 #
-# CONFIG_ISDN_I4L is not set
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+CONFIG_NET_PCI=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
+# CONFIG_FORCEDETH is not set
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+# CONFIG_E100 is not set
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_8139CP is not set
+# CONFIG_8139TOO is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_VIA_RHINE is not set
 
 #
-# CAPI subsystem
+# Ethernet (1000 Mbit)
 #
-CONFIG_ISDN_CAPI=m
-# CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON is not set
-# CONFIG_ISDN_CAPI_MIDDLEWARE is not set
-CONFIG_ISDN_CAPI_CAPI20=m
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+# CONFIG_MYRI_SBUS is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_VIA_VELOCITY is not set
+CONFIG_TIGON3=m
+CONFIG_BNX2=m
 
 #
-# CAPI hardware drivers
+# Ethernet (10000 Mbit)
 #
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
 
 #
-# Active AVM cards
+# Token Ring devices
 #
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
+# CONFIG_TR is not set
 
 #
-# Active Eicon DIVA Server cards
+# Wireless LAN (non-hamradio)
 #
-CONFIG_CAPI_EICON=y
-CONFIG_ISDN_DIVAS=m
-CONFIG_ISDN_DIVAS_BRIPCI=y
-CONFIG_ISDN_DIVAS_PRIPCI=y
-CONFIG_ISDN_DIVAS_DIVACAPI=m
-CONFIG_ISDN_DIVAS_USERIDI=m
-CONFIG_ISDN_DIVAS_MAINT=m
+# CONFIG_NET_RADIO is not set
 
 #
-# Telephony Support
+# Wan interfaces
 #
-CONFIG_PHONE=m
-CONFIG_PHONE_IXJ=m
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_NET_FC is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
 
 #
-# Unix98 PTY support
+# ISDN subsystem
 #
-CONFIG_UNIX98_PTYS=y
-CONFIG_UNIX98_PTY_COUNT=256
+# CONFIG_ISDN is not set
 
 #
-# XFree86 DRI support
+# Telephony Support
 #
-CONFIG_DRM=y
-CONFIG_DRM_TDFX=m
-# CONFIG_DRM_R128 is not set
+# CONFIG_PHONE is not set
 
 #
 # Input device support
@@ -1111,26 +600,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 CONFIG_INPUT_EVDEV=y
 # CONFIG_INPUT_EVBUG is not set
 
-#
-# Input I/O drivers
-#
-CONFIG_GAMEPORT=m
-CONFIG_SOUND_GAMEPORT=m
-# CONFIG_GAMEPORT_NS558 is not set
-# CONFIG_GAMEPORT_L4 is not set
-# CONFIG_GAMEPORT_EMU10K1 is not set
-# CONFIG_GAMEPORT_VORTEX is not set
-# CONFIG_GAMEPORT_FM801 is not set
-CONFIG_GAMEPORT_CS461X=m
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-# CONFIG_SERIO_SERPORT is not set
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-CONFIG_SERIO_PCIPS2=m
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-
 #
 # Input Device Drivers
 #
@@ -1143,7 +612,7 @@ CONFIG_KEYBOARD_LKKBD=m
 CONFIG_INPUT_MOUSE=y
 CONFIG_MOUSE_PS2=y
 CONFIG_MOUSE_SERIAL=y
-CONFIG_MOUSE_VSXXXAA=m
+# CONFIG_MOUSE_VSXXXAA is not set
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
 CONFIG_INPUT_MISC=y
@@ -1151,406 +620,250 @@ CONFIG_INPUT_SPARCSPKR=y
 # CONFIG_INPUT_UINPUT is not set
 
 #
-# I2C support
+# Hardware I/O ports
 #
-CONFIG_I2C=y
-CONFIG_I2C_CHARDEV=m
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+# CONFIG_SERIO_SERPORT is not set
+CONFIG_SERIO_PCIPS2=m
+CONFIG_SERIO_LIBPS2=y
+CONFIG_SERIO_RAW=m
+# CONFIG_GAMEPORT is not set
 
 #
-# I2C Algorithms
+# Character devices
 #
-CONFIG_I2C_ALGOBIT=y
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
 
 #
-# I2C Hardware Bus support
+# Serial drivers
 #
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-# CONFIG_I2C_AMD756_S4882 is not set
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-CONFIG_SCx200_ACB=m
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-CONFIG_I2C_PCA_ISA=m
-
-#
-# Hardware Sensors Chip support
-#
-CONFIG_I2C_SENSOR=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-
-#
-# Other I2C Chip support
-#
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_RTC8564=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
 
 #
-# File systems
+# Non-8250 serial port support
 #
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=y
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-CONFIG_JFS_FS=m
-CONFIG_JFS_POSIX_ACL=y
-CONFIG_JFS_SECURITY=y
-# CONFIG_JFS_DEBUG is not set
-# CONFIG_JFS_STATISTICS is not set
-CONFIG_FS_POSIX_ACL=y
+CONFIG_SERIAL_SUNCORE=y
+# CONFIG_SERIAL_SUNZILOG is not set
+CONFIG_SERIAL_SUNSU=y
+CONFIG_SERIAL_SUNSU_CONSOLE=y
+CONFIG_SERIAL_SUNSAB=m
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
 
 #
-# XFS support
+# IPMI
 #
-CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
-# CONFIG_XFS_RT is not set
-CONFIG_XFS_QUOTA=y
-CONFIG_XFS_SECURITY=y
-CONFIG_XFS_POSIX_ACL=y
-CONFIG_MINIX_FS=m
-CONFIG_ROMFS_FS=m
-# CONFIG_QUOTA is not set
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
+# CONFIG_IPMI_HANDLER is not set
 
 #
-# CD-ROM/DVD Filesystems
+# Watchdog Cards
 #
-CONFIG_ISO9660_FS=m
-CONFIG_JOLIET=y
-# CONFIG_ZISOFS is not set
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
+# CONFIG_WATCHDOG is not set
+CONFIG_RTC=y
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
 
 #
-# DOS/FAT/NT Filesystems
+# Ftape, the floppy tape device driver
 #
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-# CONFIG_NTFS_FS is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
 
 #
-# Pseudo filesystems
+# TPM devices
 #
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_DEVFS_FS=y
-CONFIG_DEVFS_MOUNT=y
-# CONFIG_DEVFS_DEBUG is not set
-CONFIG_DEVPTS_FS_XATTR=y
-# CONFIG_DEVPTS_FS_SECURITY is not set
-CONFIG_TMPFS=y
-CONFIG_TMPFS_XATTR=y
-CONFIG_TMPFS_SECURITY=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
+# CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
 
 #
-# Miscellaneous filesystems
+# I2C support
 #
-CONFIG_ADFS_FS=m
-# CONFIG_ADFS_FS_RW is not set
-CONFIG_AFFS_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-CONFIG_BEFS_FS=m
-# CONFIG_BEFS_DEBUG is not set
-CONFIG_BFS_FS=m
-CONFIG_EFS_FS=m
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-CONFIG_HPFS_FS=m
-CONFIG_QNX4FS_FS=m
-CONFIG_SYSV_FS=m
-CONFIG_UFS_FS=m
-CONFIG_UFS_FS_WRITE=y
+CONFIG_I2C=y
+# CONFIG_I2C_CHARDEV is not set
 
 #
-# Network File Systems
+# I2C Algorithms
 #
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-# CONFIG_SMB_NLS_DEFAULT is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-# CONFIG_CIFS_XATTR is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
-CONFIG_NCP_FS=m
-# CONFIG_NCPFS_PACKET_SIGNING is not set
-# CONFIG_NCPFS_IOCTL_LOCKING is not set
-# CONFIG_NCPFS_STRONG is not set
-# CONFIG_NCPFS_NFS_NS is not set
-# CONFIG_NCPFS_OS2_NS is not set
-# CONFIG_NCPFS_SMALLDOS is not set
-# CONFIG_NCPFS_NLS is not set
-# CONFIG_NCPFS_EXTRAS is not set
-CONFIG_CODA_FS=m
-# CONFIG_CODA_FS_OLD_API is not set
-CONFIG_AFS_FS=m
-CONFIG_RXRPC=m
+CONFIG_I2C_ALGOBIT=y
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
 
 #
-# Partition Types
+# I2C Hardware Bus support
 #
-# CONFIG_PARTITION_ADVANCED is not set
-CONFIG_MSDOS_PARTITION=y
-CONFIG_SUN_PARTITION=y
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_SCx200_ACB is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_RTC_X1205_I2C is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
 
 #
-# Native Language Support
+# Dallas's 1-wire bus
 #
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="iso8859-1"
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=m
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
+# CONFIG_W1 is not set
 
 #
-# Multimedia devices
+# Hardware Monitoring support
 #
-CONFIG_VIDEO_DEV=y
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_FSCPOS is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_SIS5595 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_VT8231 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
 
 #
-# Video For Linux
+# Misc devices
 #
 
 #
-# Video Adapters
+# Multimedia Capabilities Port drivers
 #
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_BWQCAM=m
-CONFIG_VIDEO_CQCAM=m
-CONFIG_VIDEO_W9966=m
-CONFIG_VIDEO_CPIA=m
-CONFIG_VIDEO_CPIA_PP=m
-CONFIG_VIDEO_CPIA_USB=m
-CONFIG_VIDEO_SAA5246A=m
-CONFIG_VIDEO_SAA5249=m
-CONFIG_TUNER_3036=m
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-CONFIG_VIDEO_MXB=m
-CONFIG_VIDEO_DPC=m
-CONFIG_VIDEO_HEXIUM_ORION=m
-CONFIG_VIDEO_HEXIUM_GEMINI=m
-CONFIG_VIDEO_CX88=m
-CONFIG_VIDEO_OVCAMCHIP=m
 
 #
-# Radio Adapters
+# Multimedia devices
 #
-CONFIG_RADIO_GEMTEK_PCI=m
-CONFIG_RADIO_MAXIRADIO=m
-CONFIG_RADIO_MAESTRO=m
+# CONFIG_VIDEO_DEV is not set
 
 #
 # Digital Video Broadcasting Devices
 #
-CONFIG_DVB=y
-CONFIG_DVB_CORE=m
-
-#
-# Supported SAA7146 based PCI Adapters
-#
-CONFIG_DVB_AV7110=m
-# CONFIG_DVB_AV7110_OSD is not set
-CONFIG_DVB_BUDGET=m
-CONFIG_DVB_BUDGET_CI=m
-CONFIG_DVB_BUDGET_AV=m
-CONFIG_DVB_BUDGET_PATCH=m
-
-#
-# Supported USB Adapters
-#
-# CONFIG_DVB_TTUSB_BUDGET is not set
-CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_DIBUSB=m
-# CONFIG_DVB_DIBUSB_MISDESIGNED_DEVICES is not set
-CONFIG_DVB_DIBCOM_DEBUG=y
-CONFIG_DVB_CINERGYT2=m
-# CONFIG_DVB_CINERGYT2_TUNING is not set
-
-#
-# Supported FlexCopII (B2C2) Adapters
-#
-CONFIG_DVB_B2C2_SKYSTAR=m
-CONFIG_DVB_B2C2_USB=m
-
-#
-# Supported BT878 Adapters
-#
-CONFIG_DVB_BT8XX=m
-
-#
-# Supported DVB Frontends
-#
-
-#
-# Customise DVB Frontends
-#
-
-#
-# DVB-S (satellite) frontends
-#
-CONFIG_DVB_STV0299=m
-CONFIG_DVB_CX24110=m
-CONFIG_DVB_TDA8083=m
-CONFIG_DVB_TDA80XX=m
-CONFIG_DVB_MT312=m
-CONFIG_DVB_VES1X93=m
+# CONFIG_DVB is not set
 
 #
-# DVB-T (terrestrial) frontends
+# Graphics support
 #
-CONFIG_DVB_SP8870=m
-CONFIG_DVB_SP887X=m
-CONFIG_DVB_CX22700=m
-CONFIG_DVB_CX22702=m
-CONFIG_DVB_L64781=m
-CONFIG_DVB_TDA1004X=m
-CONFIG_DVB_NXT6000=m
-CONFIG_DVB_MT352=m
-CONFIG_DVB_DIB3000MB=m
-CONFIG_DVB_DIB3000MC=m
+CONFIG_FB=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_MACMODES is not set
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_TILEBLITTING=y
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_SBUS is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON_OLD is not set
+CONFIG_FB_RADEON=y
+CONFIG_FB_RADEON_I2C=y
+# CONFIG_FB_RADEON_DEBUG is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_PCI is not set
+# CONFIG_FB_VIRTUAL is not set
 
 #
-# DVB-C (cable) frontends
+# Console display driver support
 #
-CONFIG_DVB_ATMEL_AT76C651=m
-CONFIG_DVB_VES1820=m
-CONFIG_DVB_TDA10021=m
-CONFIG_DVB_STV0297=m
+# CONFIG_PROM_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+CONFIG_FONT_SUN8x16=y
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
 
 #
-# ATSC (North American/Korean Terresterial DTV) frontends
+# Logo configuration
 #
-CONFIG_DVB_NXT2002=m
-CONFIG_VIDEO_SAA7146=m
-CONFIG_VIDEO_SAA7146_VV=m
-CONFIG_VIDEO_VIDEOBUF=m
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_SUN_CLUT224=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
 
 #
 # Sound
@@ -1563,7 +876,6 @@ CONFIG_SOUND=m
 CONFIG_SND=m
 CONFIG_SND_TIMER=m
 CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
 CONFIG_SND_RAWMIDI=m
 CONFIG_SND_SEQUENCER=m
 CONFIG_SND_SEQ_DUMMY=m
@@ -1571,8 +883,9 @@ CONFIG_SND_OSSEMUL=y
 CONFIG_SND_MIXER_OSS=m
 CONFIG_SND_PCM_OSS=m
 CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_BIT32_EMUL=m
 # CONFIG_SND_RTCTIMER is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
 # CONFIG_SND_VERBOSE_PRINTK is not set
 # CONFIG_SND_DEBUG is not set
 
@@ -1580,59 +893,58 @@ CONFIG_SND_BIT32_EMUL=m
 # Generic devices
 #
 CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
+CONFIG_SND_AC97_CODEC=m
+CONFIG_SND_AC97_BUS=m
 CONFIG_SND_DUMMY=m
 CONFIG_SND_VIRMIDI=m
-# CONFIG_SND_MTPAV is not set
+CONFIG_SND_MTPAV=m
 # CONFIG_SND_SERIAL_U16550 is not set
 # CONFIG_SND_MPU401 is not set
 
 #
 # PCI devices
 #
-CONFIG_SND_AC97_CODEC=m
+# CONFIG_SND_AD1889 is not set
 CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CS46XX=m
-# CONFIG_SND_CS46XX_NEW_DSP is not set
-CONFIG_SND_CS4281=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_CA0106=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
+# CONFIG_SND_ATIIXP is not set
+# CONFIG_SND_ATIIXP_MODEM is not set
+# CONFIG_SND_AU8810 is not set
+# CONFIG_SND_AU8820 is not set
+# CONFIG_SND_AU8830 is not set
+# CONFIG_SND_AZT3328 is not set
+# CONFIG_SND_BT87X is not set
+# CONFIG_SND_CA0106 is not set
+# CONFIG_SND_CMIPCI is not set
+# CONFIG_SND_CS4281 is not set
+# CONFIG_SND_CS46XX is not set
+# CONFIG_SND_EMU10K1 is not set
+# CONFIG_SND_EMU10K1X is not set
+# CONFIG_SND_ENS1370 is not set
+# CONFIG_SND_ENS1371 is not set
+# CONFIG_SND_ES1938 is not set
+# CONFIG_SND_ES1968 is not set
+# CONFIG_SND_FM801 is not set
+# CONFIG_SND_HDA_INTEL is not set
+# CONFIG_SND_HDSP is not set
+# CONFIG_SND_HDSPM is not set
+# CONFIG_SND_ICE1712 is not set
+# CONFIG_SND_ICE1724 is not set
+# CONFIG_SND_INTEL8X0 is not set
+# CONFIG_SND_INTEL8X0M is not set
+# CONFIG_SND_KORG1212 is not set
+# CONFIG_SND_MAESTRO3 is not set
+# CONFIG_SND_MIXART is not set
+# CONFIG_SND_NM256 is not set
+# CONFIG_SND_PCXHR is not set
 # CONFIG_SND_RME32 is not set
 # CONFIG_SND_RME96 is not set
 # CONFIG_SND_RME9652 is not set
-# CONFIG_SND_HDSP is not set
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_ICE1712=m
-# CONFIG_SND_ICE1724 is not set
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_SONICVIBES=m
+# CONFIG_SND_SONICVIBES is not set
+# CONFIG_SND_TRIDENT is not set
 # CONFIG_SND_VIA82XX is not set
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
+# CONFIG_SND_VIA82XX_MODEM is not set
+# CONFIG_SND_VX222 is not set
+# CONFIG_SND_YMFPCI is not set
 
 #
 # USB devices
@@ -1642,12 +954,20 @@ CONFIG_SND_VX222=m
 #
 # ALSA Sparc devices
 #
-CONFIG_SND_SUN_AMD7930=m
+# CONFIG_SND_SUN_AMD7930 is not set
 CONFIG_SND_SUN_CS4231=m
+# CONFIG_SND_SUN_DBRI is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
 
 #
 # USB support
 #
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
 CONFIG_USB=y
 # CONFIG_USB_DEBUG is not set
 
@@ -1658,8 +978,6 @@ CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_BANDWIDTH is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
 # CONFIG_USB_OTG is not set
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
 
 #
 # USB Host Controller Drivers
@@ -1667,36 +985,29 @@ CONFIG_USB_ARCH_HAS_OHCI=y
 CONFIG_USB_EHCI_HCD=m
 # CONFIG_USB_EHCI_SPLIT_ISO is not set
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+# CONFIG_USB_ISP116X_HCD is not set
 CONFIG_USB_OHCI_HCD=y
+# CONFIG_USB_OHCI_BIG_ENDIAN is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
 CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
+# CONFIG_USB_SL811_HCD is not set
 
 #
 # USB Device Class drivers
 #
-# CONFIG_USB_AUDIO is not set
+# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
 
 #
-# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
 #
-# CONFIG_USB_MIDI is not set
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
 
 #
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
+# may also be needed; see USB_STORAGE Help for more information
 #
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_RW_DETECT=y
-# CONFIG_USB_STORAGE_DATAFAB is not set
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_HP8200e=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE is not set
+# CONFIG_USB_LIBUSUAL is not set
 
 #
 # USB Input Devices
@@ -1706,186 +1017,261 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_HID_FF is not set
 CONFIG_USB_HIDDEV=y
 # CONFIG_USB_AIPTEK is not set
-CONFIG_USB_WACOM=m
-CONFIG_USB_KBTAB=m
+# CONFIG_USB_WACOM is not set
+# CONFIG_USB_ACECAD is not set
+# CONFIG_USB_KBTAB is not set
 # CONFIG_USB_POWERMATE is not set
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_EGALAX=m
+# CONFIG_USB_MTOUCH is not set
+# CONFIG_USB_ITMTOUCH is not set
+# CONFIG_USB_EGALAX is not set
+# CONFIG_USB_YEALINK is not set
 # CONFIG_USB_XPAD is not set
-CONFIG_USB_ATI_REMOTE=m
+# CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_ATI_REMOTE2 is not set
+# CONFIG_USB_KEYSPAN_REMOTE is not set
+# CONFIG_USB_APPLETOUCH is not set
 
 #
 # USB Imaging devices
 #
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
 
 #
 # USB Multimedia devices
 #
 # CONFIG_USB_DABUSB is not set
-# CONFIG_USB_VICAM is not set
-# CONFIG_USB_DSBR is not set
-# CONFIG_USB_IBMCAM is not set
-# CONFIG_USB_KONICAWC is not set
-# CONFIG_USB_OV511 is not set
-# CONFIG_USB_SE401 is not set
-CONFIG_USB_SN9C102=m
-# CONFIG_USB_STV680 is not set
-CONFIG_USB_W9968CF=m
 
 #
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-
-#
-# USB Host-to-Host Cables
+# Video4Linux support is needed for USB Multimedia device support
 #
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_GENESYS=y
-CONFIG_USB_NET1080=y
-CONFIG_USB_PL2301=y
-CONFIG_USB_KC2190=y
-
-#
-# Intelligent USB Devices/Gadgets
-#
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_ZAURUS=y
-CONFIG_USB_CDCETHER=y
 
 #
 # USB Network Adapters
 #
-CONFIG_USB_AX8817X=y
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_USB_MON is not set
 
 #
 # USB port drivers
 #
-CONFIG_USB_USS720=m
 
 #
 # USB Serial Converter support
 #
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-# CONFIG_USB_SERIAL_VISOR is not set
-CONFIG_USB_SERIAL_IPAQ=m
-# CONFIG_USB_SERIAL_IR is not set
-CONFIG_USB_SERIAL_EDGEPORT=m
-# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
-# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
-CONFIG_USB_SERIAL_KLSI=m
-# CONFIG_USB_SERIAL_KOBIL_SCT is not set
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-# CONFIG_USB_SERIAL_SAFE is not set
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
+# CONFIG_USB_SERIAL is not set
 
 #
 # USB Miscellaneous drivers
 #
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-CONFIG_USB_CYTHERM=m
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_TEST=m
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGETKIT is not set
+# CONFIG_USB_PHIDGETSERVO is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TEST is not set
 
 #
-# USB ATM/DSL drivers
+# USB DSL modem support
 #
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
 
 #
 # USB Gadget Support
 #
 # CONFIG_USB_GADGET is not set
 
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
 #
 # InfiniBand support
 #
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_MTHCA=m
-# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
+# CONFIG_INFINIBAND is not set
 
 #
-# Watchdog Cards
+# SN Devices
+#
+
+#
+# Misc Linux/SPARC drivers
+#
+CONFIG_SUN_OPENPROMIO=m
+CONFIG_SUN_MOSTEK_RTC=y
+# CONFIG_OBP_FLASH is not set
+# CONFIG_SUN_BPP is not set
+# CONFIG_BBC_I2C is not set
+# CONFIG_ENVCTRL is not set
+# CONFIG_DISPLAY7SEG is not set
+
+#
+# Fibre Channel support
+#
+# CONFIG_FC4 is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
 #
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_RAMFS=y
+CONFIG_RELAYFS_FS=m
+# CONFIG_CONFIGFS_FS is not set
 
 #
-# Watchdog Device Drivers
+# Miscellaneous filesystems
 #
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_WATCHDOG_CP1XXX=m
-CONFIG_WATCHDOG_RIO=m
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
 
 #
-# PCI-based Watchdog Cards
+# Network File Systems
 #
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
+# CONFIG_NFS_FS is not set
+# CONFIG_NFSD is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
 
 #
-# USB-based Watchdog Cards
+# Partition Types
 #
-CONFIG_USBPCWATCHDOG=m
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_SUN_PARTITION=y
 
 #
-# Profiling support
+# Native Language Support
+#
+CONFIG_NLS=m
+CONFIG_NLS_DEFAULT="iso8859-1"
+# CONFIG_NLS_CODEPAGE_437 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# Instrumentation Support
 #
 CONFIG_PROFILING=y
 CONFIG_OPROFILE=m
+CONFIG_KPROBES=y
 
 #
 # Kernel hacking
 #
+CONFIG_PRINTK_TIME=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_LOG_BUF_SHIFT=18
+CONFIG_DETECT_SOFTLOCKUP=y
 CONFIG_SCHEDSTATS=y
 # CONFIG_DEBUG_SLAB is not set
 # CONFIG_DEBUG_SPINLOCK is not set
@@ -1894,12 +1280,13 @@ CONFIG_SCHEDSTATS=y
 CONFIG_DEBUG_BUGVERBOSE=y
 # CONFIG_DEBUG_INFO is not set
 CONFIG_DEBUG_FS=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
-CONFIG_KPROBES=y
 # CONFIG_DEBUG_DCFLUSH is not set
 # CONFIG_STACK_DEBUG is not set
 # CONFIG_DEBUG_BOOTMEM is not set
-CONFIG_HAVE_DEC_LOCK=y
+# CONFIG_DEBUG_PAGEALLOC is not set
 
 #
 # Security options
@@ -1945,6 +1332,7 @@ CONFIG_CRYPTO_TEST=m
 # Library routines
 #
 CONFIG_CRC_CCITT=m
+CONFIG_CRC16=m
 CONFIG_CRC32=y
 CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=y
index 11a848402fb1a14f032fee7a434cdbe574b30467..710002991888b0faf15438696e16e486adffa6c7 100644 (file)
@@ -1657,13 +1657,10 @@ ret_sys_call:
        /* Check if force_successful_syscall_return()
         * was invoked.
         */
-       ldub            [%curptr + TI_SYS_NOERROR], %l0
-       brz,pt          %l0, 1f
-        nop
-       ba,pt           %xcc, 80f
+       ldub            [%curptr + TI_SYS_NOERROR], %l2
+       brnz,a,pn       %l2, 80f
         stb            %g0, [%curptr + TI_SYS_NOERROR]
 
-1:
        cmp             %o0, -ERESTART_RESTARTBLOCK
        bgeu,pn         %xcc, 1f
         andcc          %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6
index 9e8362ea3104a821aa07317965b62045fc230f33..30bcaf58e3abd5dae329bc363072d9c946259bc5 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/signal.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
+#include <linux/pm.h>
 
 #include <asm/system.h>
 #include <asm/ebus.h>
@@ -70,6 +71,9 @@ void machine_power_off(void)
        machine_halt();
 }
 
+void (*pm_power_off)(void) = machine_power_off;
+EXPORT_SYMBOL(pm_power_off);
+
 #ifdef CONFIG_PCI
 static int powerd(void *__unused)
 {
index acfdaa28791ed049abbdec7cecd02fcd6ffdd66b..fb1b961a2e2f185143fbbea09e2e6a43606b72fb 100644 (file)
@@ -74,8 +74,6 @@ static inline u8 byte(const u32 x, const unsigned n)
        return x >> (n << 3);
 }
 
-#define u32_in(x) le32_to_cpu(*(const __le32 *)(x))
-
 struct aes_ctx
 {
        u32 key_length;
@@ -234,6 +232,7 @@ static int aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len,
                       u32 *flags)
 {
        struct aes_ctx *ctx = ctx_arg;
+       const __le32 *key = (const __le32 *)in_key;
        u32 i, j, t, u, v, w;
 
        if (key_len != 16 && key_len != 24 && key_len != 32) {
@@ -243,10 +242,10 @@ static int aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len,
 
        ctx->key_length = key_len;
 
-       D_KEY[key_len + 24] = E_KEY[0] = u32_in(in_key);
-       D_KEY[key_len + 25] = E_KEY[1] = u32_in(in_key + 4);
-       D_KEY[key_len + 26] = E_KEY[2] = u32_in(in_key + 8);
-       D_KEY[key_len + 27] = E_KEY[3] = u32_in(in_key + 12);
+       D_KEY[key_len + 24] = E_KEY[0] = le32_to_cpu(key[0]);
+       D_KEY[key_len + 25] = E_KEY[1] = le32_to_cpu(key[1]);
+       D_KEY[key_len + 26] = E_KEY[2] = le32_to_cpu(key[2]);
+       D_KEY[key_len + 27] = E_KEY[3] = le32_to_cpu(key[3]);
 
        switch (key_len) {
        case 16:
@@ -256,17 +255,17 @@ static int aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len,
                break;
 
        case 24:
-               E_KEY[4] = u32_in(in_key + 16);
-               t = E_KEY[5] = u32_in(in_key + 20);
+               E_KEY[4] = le32_to_cpu(key[4]);
+               t = E_KEY[5] = le32_to_cpu(key[5]);
                for (i = 0; i < 8; ++i)
                        loop6 (i);
                break;
 
        case 32:
-               E_KEY[4] = u32_in(in_key + 16);
-               E_KEY[5] = u32_in(in_key + 20);
-               E_KEY[6] = u32_in(in_key + 24);
-               t = E_KEY[7] = u32_in(in_key + 28);
+               E_KEY[4] = le32_to_cpu(key[4]);
+               E_KEY[5] = le32_to_cpu(key[5]);
+               E_KEY[6] = le32_to_cpu(key[6]);
+               t = E_KEY[7] = le32_to_cpu(key[7]);
                for (i = 0; i < 7; ++i)
                        loop8(i);
                break;
@@ -290,6 +289,8 @@ extern void aes_decrypt(void *ctx_arg, u8 *out, const u8 *in);
 
 static struct crypto_alg aes_alg = {
        .cra_name               =       "aes",
+       .cra_driver_name        =       "aes-x86_64",
+       .cra_priority           =       200,
        .cra_flags              =       CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize          =       AES_BLOCK_SIZE,
        .cra_ctxsize            =       sizeof(struct aes_ctx),
index 52e1d4108a99bef096d877d5ba5bd1512545a32d..c442f2e7ce463cc6c900ae298e3ae0203d7eebf1 100644 (file)
@@ -157,7 +157,7 @@ config CRYPTO_SERPENT
 
 config CRYPTO_AES
        tristate "AES cipher algorithms"
-       depends on CRYPTO && !(X86 || UML_X86)
+       depends on CRYPTO
        help
          AES cipher algorithms (FIPS-197). AES uses the Rijndael 
          algorithm.
index 5df92888ef5a81b78fc34482c6d7261eb586ab2d..0a6a5c14368684937bf8ca9b4bd866fea06d0e15 100644 (file)
@@ -73,9 +73,6 @@ byte(const u32 x, const unsigned n)
        return x >> (n << 3);
 }
 
-#define u32_in(x) le32_to_cpu(*(const u32 *)(x))
-#define u32_out(to, from) (*(u32 *)(to) = cpu_to_le32(from))
-
 struct aes_ctx {
        int key_length;
        u32 E[60];
@@ -256,6 +253,7 @@ static int
 aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
 {
        struct aes_ctx *ctx = ctx_arg;
+       const __le32 *key = (const __le32 *)in_key;
        u32 i, t, u, v, w;
 
        if (key_len != 16 && key_len != 24 && key_len != 32) {
@@ -265,10 +263,10 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
 
        ctx->key_length = key_len;
 
-       E_KEY[0] = u32_in (in_key);
-       E_KEY[1] = u32_in (in_key + 4);
-       E_KEY[2] = u32_in (in_key + 8);
-       E_KEY[3] = u32_in (in_key + 12);
+       E_KEY[0] = le32_to_cpu(key[0]);
+       E_KEY[1] = le32_to_cpu(key[1]);
+       E_KEY[2] = le32_to_cpu(key[2]);
+       E_KEY[3] = le32_to_cpu(key[3]);
 
        switch (key_len) {
        case 16:
@@ -278,17 +276,17 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
                break;
 
        case 24:
-               E_KEY[4] = u32_in (in_key + 16);
-               t = E_KEY[5] = u32_in (in_key + 20);
+               E_KEY[4] = le32_to_cpu(key[4]);
+               t = E_KEY[5] = le32_to_cpu(key[5]);
                for (i = 0; i < 8; ++i)
                        loop6 (i);
                break;
 
        case 32:
-               E_KEY[4] = u32_in (in_key + 16);
-               E_KEY[5] = u32_in (in_key + 20);
-               E_KEY[6] = u32_in (in_key + 24);
-               t = E_KEY[7] = u32_in (in_key + 28);
+               E_KEY[4] = le32_to_cpu(key[4]);
+               E_KEY[5] = le32_to_cpu(key[5]);
+               E_KEY[6] = le32_to_cpu(key[6]);
+               t = E_KEY[7] = le32_to_cpu(key[7]);
                for (i = 0; i < 7; ++i)
                        loop8 (i);
                break;
@@ -324,13 +322,15 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
 static void aes_encrypt(void *ctx_arg, u8 *out, const u8 *in)
 {
        const struct aes_ctx *ctx = ctx_arg;
+       const __le32 *src = (const __le32 *)in;
+       __le32 *dst = (__le32 *)out;
        u32 b0[4], b1[4];
        const u32 *kp = E_KEY + 4;
 
-       b0[0] = u32_in (in) ^ E_KEY[0];
-       b0[1] = u32_in (in + 4) ^ E_KEY[1];
-       b0[2] = u32_in (in + 8) ^ E_KEY[2];
-       b0[3] = u32_in (in + 12) ^ E_KEY[3];
+       b0[0] = le32_to_cpu(src[0]) ^ E_KEY[0];
+       b0[1] = le32_to_cpu(src[1]) ^ E_KEY[1];
+       b0[2] = le32_to_cpu(src[2]) ^ E_KEY[2];
+       b0[3] = le32_to_cpu(src[3]) ^ E_KEY[3];
 
        if (ctx->key_length > 24) {
                f_nround (b1, b0, kp);
@@ -353,10 +353,10 @@ static void aes_encrypt(void *ctx_arg, u8 *out, const u8 *in)
        f_nround (b1, b0, kp);
        f_lround (b0, b1, kp);
 
-       u32_out (out, b0[0]);
-       u32_out (out + 4, b0[1]);
-       u32_out (out + 8, b0[2]);
-       u32_out (out + 12, b0[3]);
+       dst[0] = cpu_to_le32(b0[0]);
+       dst[1] = cpu_to_le32(b0[1]);
+       dst[2] = cpu_to_le32(b0[2]);
+       dst[3] = cpu_to_le32(b0[3]);
 }
 
 /* decrypt a block of text */
@@ -377,14 +377,16 @@ static void aes_encrypt(void *ctx_arg, u8 *out, const u8 *in)
 static void aes_decrypt(void *ctx_arg, u8 *out, const u8 *in)
 {
        const struct aes_ctx *ctx = ctx_arg;
+       const __le32 *src = (const __le32 *)in;
+       __le32 *dst = (__le32 *)out;
        u32 b0[4], b1[4];
        const int key_len = ctx->key_length;
        const u32 *kp = D_KEY + key_len + 20;
 
-       b0[0] = u32_in (in) ^ E_KEY[key_len + 24];
-       b0[1] = u32_in (in + 4) ^ E_KEY[key_len + 25];
-       b0[2] = u32_in (in + 8) ^ E_KEY[key_len + 26];
-       b0[3] = u32_in (in + 12) ^ E_KEY[key_len + 27];
+       b0[0] = le32_to_cpu(src[0]) ^ E_KEY[key_len + 24];
+       b0[1] = le32_to_cpu(src[1]) ^ E_KEY[key_len + 25];
+       b0[2] = le32_to_cpu(src[2]) ^ E_KEY[key_len + 26];
+       b0[3] = le32_to_cpu(src[3]) ^ E_KEY[key_len + 27];
 
        if (key_len > 24) {
                i_nround (b1, b0, kp);
@@ -407,18 +409,21 @@ static void aes_decrypt(void *ctx_arg, u8 *out, const u8 *in)
        i_nround (b1, b0, kp);
        i_lround (b0, b1, kp);
 
-       u32_out (out, b0[0]);
-       u32_out (out + 4, b0[1]);
-       u32_out (out + 8, b0[2]);
-       u32_out (out + 12, b0[3]);
+       dst[0] = cpu_to_le32(b0[0]);
+       dst[1] = cpu_to_le32(b0[1]);
+       dst[2] = cpu_to_le32(b0[2]);
+       dst[3] = cpu_to_le32(b0[3]);
 }
 
 
 static struct crypto_alg aes_alg = {
        .cra_name               =       "aes",
+       .cra_driver_name        =       "aes-generic",
+       .cra_priority           =       100,
        .cra_flags              =       CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize          =       AES_BLOCK_SIZE,
        .cra_ctxsize            =       sizeof(struct aes_ctx),
+       .cra_alignmask          =       3,
        .cra_module             =       THIS_MODULE,
        .cra_list               =       LIST_HEAD_INIT(aes_alg.cra_list),
        .cra_u                  =       {
index 3925eb0133cb18848ae797832b187036516024b9..2c796bdb91a6e7f6e60f3bf302250fa6c70d668b 100644 (file)
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
+#include <asm/byteorder.h>
 #include <asm/scatterlist.h>
 #include <linux/crypto.h>
+#include <linux/types.h>
 
 #define ANUBIS_MIN_KEY_SIZE    16
 #define ANUBIS_MAX_KEY_SIZE    40
@@ -461,8 +463,8 @@ static const u32 rc[] = {
 static int anubis_setkey(void *ctx_arg, const u8 *in_key,
                         unsigned int key_len, u32 *flags)
 {
-
-       int N, R, i, pos, r;
+       const __be32 *key = (const __be32 *)in_key;
+       int N, R, i, r;
        u32 kappa[ANUBIS_MAX_N];
        u32 inter[ANUBIS_MAX_N];
 
@@ -483,13 +485,8 @@ static int anubis_setkey(void *ctx_arg, const u8 *in_key,
        ctx->R = R = 8 + N;
 
        /* * map cipher key to initial key state (mu): */
-               for (i = 0, pos = 0; i < N; i++, pos += 4) {
-               kappa[i] =
-                       (in_key[pos    ] << 24) ^
-                       (in_key[pos + 1] << 16) ^
-                       (in_key[pos + 2] <<  8) ^
-                       (in_key[pos + 3]      );
-       }
+       for (i = 0; i < N; i++)
+               kappa[i] = be32_to_cpu(key[i]);
 
        /*
         * generate R + 1 round keys:
@@ -578,7 +575,9 @@ static int anubis_setkey(void *ctx_arg, const u8 *in_key,
 static void anubis_crypt(u32 roundKey[ANUBIS_MAX_ROUNDS + 1][4],
                u8 *ciphertext, const u8 *plaintext, const int R)
 {
-       int i, pos, r;
+       const __be32 *src = (const __be32 *)plaintext;
+       __be32 *dst = (__be32 *)ciphertext;
+       int i, r;
        u32 state[4];
        u32 inter[4];
 
@@ -586,14 +585,8 @@ static void anubis_crypt(u32 roundKey[ANUBIS_MAX_ROUNDS + 1][4],
         * map plaintext block to cipher state (mu)
         * and add initial round key (sigma[K^0]):
         */
-       for (i = 0, pos = 0; i < 4; i++, pos += 4) {
-               state[i] =
-                       (plaintext[pos    ] << 24) ^
-                       (plaintext[pos + 1] << 16) ^
-                       (plaintext[pos + 2] <<  8) ^
-                       (plaintext[pos + 3]      ) ^
-                       roundKey[0][i];
-       }
+       for (i = 0; i < 4; i++)
+               state[i] = be32_to_cpu(src[i]) ^ roundKey[0][i];
 
        /*
         * R - 1 full rounds:
@@ -663,13 +656,8 @@ static void anubis_crypt(u32 roundKey[ANUBIS_MAX_ROUNDS + 1][4],
         * map cipher state to ciphertext block (mu^{-1}):
         */
 
-       for (i = 0, pos = 0; i < 4; i++, pos += 4) {
-               u32 w = inter[i];
-               ciphertext[pos    ] = (u8)(w >> 24);
-               ciphertext[pos + 1] = (u8)(w >> 16);
-               ciphertext[pos + 2] = (u8)(w >>  8);
-               ciphertext[pos + 3] = (u8)(w      );
-       }
+       for (i = 0; i < 4; i++)
+               dst[i] = cpu_to_be32(inter[i]);
 }
 
 static void anubis_encrypt(void *ctx_arg, u8 *dst, const u8 *src)
@@ -689,6 +677,7 @@ static struct crypto_alg anubis_alg = {
        .cra_flags              =       CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize          =       ANUBIS_BLOCK_SIZE,
        .cra_ctxsize            =       sizeof (struct anubis_ctx),
+       .cra_alignmask          =       3,
        .cra_module             =       THIS_MODULE,
        .cra_list               =       LIST_HEAD_INIT(anubis_alg.cra_list),
        .cra_u                  =       { .cipher = {
index 40ae42e9b6a62acd1047f8be7ecb09600f794e97..e26156f718395393bc50883bc61edc7b2a7e2d22 100644 (file)
@@ -3,6 +3,7 @@
  *
  * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
  * Copyright (c) 2002 David S. Miller (davem@redhat.com)
+ * Copyright (c) 2005 Herbert Xu <herbert@gondor.apana.org.au>
  *
  * Portions derived from Cryptoapi, by Alexander Kjeldaas <astor@fast.no>
  * and Nettle, by Niels Möller.
 #include <linux/init.h>
 #include <linux/crypto.h>
 #include <linux/errno.h>
+#include <linux/kernel.h>
 #include <linux/kmod.h>
 #include <linux/rwsem.h>
 #include <linux/slab.h>
+#include <linux/string.h>
 #include "internal.h"
 
 LIST_HEAD(crypto_alg_list);
@@ -39,6 +42,7 @@ static inline void crypto_alg_put(struct crypto_alg *alg)
 static struct crypto_alg *crypto_alg_lookup(const char *name)
 {
        struct crypto_alg *q, *alg = NULL;
+       int best = -1;
 
        if (!name)
                return NULL;
@@ -46,11 +50,23 @@ static struct crypto_alg *crypto_alg_lookup(const char *name)
        down_read(&crypto_alg_sem);
        
        list_for_each_entry(q, &crypto_alg_list, cra_list) {
-               if (!(strcmp(q->cra_name, name))) {
-                       if (crypto_alg_get(q))
-                               alg = q;
+               int exact, fuzzy;
+
+               exact = !strcmp(q->cra_driver_name, name);
+               fuzzy = !strcmp(q->cra_name, name);
+               if (!exact && !(fuzzy && q->cra_priority > best))
+                       continue;
+
+               if (unlikely(!crypto_alg_get(q)))
+                       continue;
+
+               best = q->cra_priority;
+               if (alg)
+                       crypto_alg_put(alg);
+               alg = q;
+
+               if (exact)
                        break;
-               }
        }
        
        up_read(&crypto_alg_sem);
@@ -207,9 +223,26 @@ void crypto_free_tfm(struct crypto_tfm *tfm)
        kfree(tfm);
 }
 
+static inline int crypto_set_driver_name(struct crypto_alg *alg)
+{
+       static const char suffix[] = "-generic";
+       char *driver_name = (char *)alg->cra_driver_name;
+       int len;
+
+       if (*driver_name)
+               return 0;
+
+       len = strlcpy(driver_name, alg->cra_name, CRYPTO_MAX_ALG_NAME);
+       if (len + sizeof(suffix) > CRYPTO_MAX_ALG_NAME)
+               return -ENAMETOOLONG;
+
+       memcpy(driver_name + len, suffix, sizeof(suffix));
+       return 0;
+}
+
 int crypto_register_alg(struct crypto_alg *alg)
 {
-       int ret = 0;
+       int ret;
        struct crypto_alg *q;
 
        if (alg->cra_alignmask & (alg->cra_alignmask + 1))
@@ -218,13 +251,20 @@ int crypto_register_alg(struct crypto_alg *alg)
        if (alg->cra_alignmask & alg->cra_blocksize)
                return -EINVAL;
 
-       if (alg->cra_blocksize > PAGE_SIZE)
+       if (alg->cra_blocksize > PAGE_SIZE / 8)
+               return -EINVAL;
+
+       if (alg->cra_priority < 0)
                return -EINVAL;
        
+       ret = crypto_set_driver_name(alg);
+       if (unlikely(ret))
+               return ret;
+
        down_write(&crypto_alg_sem);
        
        list_for_each_entry(q, &crypto_alg_list, cra_list) {
-               if (!(strcmp(q->cra_name, alg->cra_name))) {
+               if (!strcmp(q->cra_driver_name, alg->cra_driver_name)) {
                        ret = -EEXIST;
                        goto out;
                }
index a8b29d54e7d8180ebb90391493f1302b85c220cb..7f710b201f2059cf66f8e2ffb4c2002cd8e14115 100644 (file)
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
+#include <asm/byteorder.h>
 #include <asm/scatterlist.h>
 #include <linux/crypto.h>
+#include <linux/types.h>
 
 #define BF_BLOCK_SIZE 8
 #define BF_MIN_KEY_SIZE 4
@@ -451,6 +453,7 @@ static struct crypto_alg alg = {
        .cra_flags              =       CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize          =       BF_BLOCK_SIZE,
        .cra_ctxsize            =       sizeof(struct bf_ctx),
+       .cra_alignmask          =       3,
        .cra_module             =       THIS_MODULE,
        .cra_list               =       LIST_HEAD_INIT(alg.cra_list),
        .cra_u                  =       { .cipher = {
index bc42f42b4fe304fc2109f4cf9543ed0835ef8c81..8834c8580c04c0b3cf0f2931900bb2c28df6d606 100644 (file)
 */
 
 
+#include <asm/byteorder.h>
 #include <linux/init.h>
 #include <linux/crypto.h>
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define CAST5_BLOCK_SIZE 8
 #define CAST5_MIN_KEY_SIZE 5
@@ -578,6 +580,8 @@ static const u32 sb8[256] = {
 static void cast5_encrypt(void *ctx, u8 * outbuf, const u8 * inbuf)
 {
        struct cast5_ctx *c = (struct cast5_ctx *) ctx;
+       const __be32 *src = (const __be32 *)inbuf;
+       __be32 *dst = (__be32 *)outbuf;
        u32 l, r, t;
        u32 I;                  /* used by the Fx macros */
        u32 *Km;
@@ -589,8 +593,8 @@ static void cast5_encrypt(void *ctx, u8 * outbuf, const u8 * inbuf)
        /* (L0,R0) <-- (m1...m64).  (Split the plaintext into left and
         * right 32-bit halves L0 = m1...m32 and R0 = m33...m64.)
         */
-       l = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3];
-       r = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7];
+       l = be32_to_cpu(src[0]);
+       r = be32_to_cpu(src[1]);
 
        /* (16 rounds) for i from 1 to 16, compute Li and Ri as follows:
         *  Li = Ri-1;
@@ -634,19 +638,15 @@ static void cast5_encrypt(void *ctx, u8 * outbuf, const u8 * inbuf)
 
        /* c1...c64 <-- (R16,L16).  (Exchange final blocks L16, R16 and
         *  concatenate to form the ciphertext.) */
-       outbuf[0] = (r >> 24) & 0xff;
-       outbuf[1] = (r >> 16) & 0xff;
-       outbuf[2] = (r >> 8) & 0xff;
-       outbuf[3] = r & 0xff;
-       outbuf[4] = (l >> 24) & 0xff;
-       outbuf[5] = (l >> 16) & 0xff;
-       outbuf[6] = (l >> 8) & 0xff;
-       outbuf[7] = l & 0xff;
+       dst[0] = cpu_to_be32(r);
+       dst[1] = cpu_to_be32(l);
 }
 
 static void cast5_decrypt(void *ctx, u8 * outbuf, const u8 * inbuf)
 {
        struct cast5_ctx *c = (struct cast5_ctx *) ctx;
+       const __be32 *src = (const __be32 *)inbuf;
+       __be32 *dst = (__be32 *)outbuf;
        u32 l, r, t;
        u32 I;
        u32 *Km;
@@ -655,8 +655,8 @@ static void cast5_decrypt(void *ctx, u8 * outbuf, const u8 * inbuf)
        Km = c->Km;
        Kr = c->Kr;
 
-       l = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3];
-       r = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7];
+       l = be32_to_cpu(src[0]);
+       r = be32_to_cpu(src[1]);
 
        if (!(c->rr)) {
                t = l; l = r; r = t ^ F1(r, Km[15], Kr[15]);
@@ -690,14 +690,8 @@ static void cast5_decrypt(void *ctx, u8 * outbuf, const u8 * inbuf)
                t = l; l = r; r = t ^ F1(r, Km[0], Kr[0]);
        }
 
-       outbuf[0] = (r >> 24) & 0xff;
-       outbuf[1] = (r >> 16) & 0xff;
-       outbuf[2] = (r >> 8) & 0xff;
-       outbuf[3] = r & 0xff;
-       outbuf[4] = (l >> 24) & 0xff;
-       outbuf[5] = (l >> 16) & 0xff;
-       outbuf[6] = (l >> 8) & 0xff;
-       outbuf[7] = l & 0xff;
+       dst[0] = cpu_to_be32(r);
+       dst[1] = cpu_to_be32(l);
 }
 
 static void key_schedule(u32 * x, u32 * z, u32 * k)
@@ -782,7 +776,7 @@ cast5_setkey(void *ctx, const u8 * key, unsigned key_len, u32 * flags)
        u32 x[4];
        u32 z[4];
        u32 k[16];
-       u8 p_key[16];
+       __be32 p_key[4];
        struct cast5_ctx *c = (struct cast5_ctx *) ctx;
        
        if (key_len < 5 || key_len > 16) {
@@ -796,12 +790,10 @@ cast5_setkey(void *ctx, const u8 * key, unsigned key_len, u32 * flags)
        memcpy(p_key, key, key_len);
 
 
-       x[0] = p_key[0] << 24 | p_key[1] << 16 | p_key[2] << 8 | p_key[3];
-       x[1] = p_key[4] << 24 | p_key[5] << 16 | p_key[6] << 8 | p_key[7];
-       x[2] =
-           p_key[8] << 24 | p_key[9] << 16 | p_key[10] << 8 | p_key[11];
-       x[3] =
-           p_key[12] << 24 | p_key[13] << 16 | p_key[14] << 8 | p_key[15];
+       x[0] = be32_to_cpu(p_key[0]);
+       x[1] = be32_to_cpu(p_key[1]);
+       x[2] = be32_to_cpu(p_key[2]);
+       x[3] = be32_to_cpu(p_key[3]);
 
        key_schedule(x, z, k);
        for (i = 0; i < 16; i++)
@@ -817,6 +809,7 @@ static struct crypto_alg alg = {
        .cra_flags      = CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize  = CAST5_BLOCK_SIZE,
        .cra_ctxsize    = sizeof(struct cast5_ctx),
+       .cra_alignmask  = 3,
        .cra_module     = THIS_MODULE,
        .cra_list       = LIST_HEAD_INIT(alg.cra_list),
        .cra_u          = {
index 3eb08107342331e582318c8ba5c2e0fd5626c40e..9e28740ba7753fe79fb6dc869cbc4c8b7f9e4d9e 100644 (file)
  */
 
 
+#include <asm/byteorder.h>
 #include <linux/init.h>
 #include <linux/crypto.h>
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/string.h>
+#include <linux/types.h>
 
 #define CAST6_BLOCK_SIZE 16
 #define CAST6_MIN_KEY_SIZE 16
@@ -384,7 +386,7 @@ cast6_setkey(void *ctx, const u8 * in_key, unsigned key_len, u32 * flags)
 {
        int i;
        u32 key[8];
-       u8 p_key[32]; /* padded key */
+       __be32 p_key[8]; /* padded key */
        struct cast6_ctx *c = (struct cast6_ctx *) ctx;
 
        if (key_len < 16 || key_len > 32 || key_len % 4 != 0) {
@@ -395,14 +397,14 @@ cast6_setkey(void *ctx, const u8 * in_key, unsigned key_len, u32 * flags)
        memset (p_key, 0, 32);
        memcpy (p_key, in_key, key_len);
        
-       key[0] = p_key[0] << 24 | p_key[1] << 16 | p_key[2] << 8 | p_key[3];            /* A */
-       key[1] = p_key[4] << 24 | p_key[5] << 16 | p_key[6] << 8 | p_key[7];            /* B */
-       key[2] = p_key[8] << 24 | p_key[9] << 16 | p_key[10] << 8 | p_key[11];          /* C */
-       key[3] = p_key[12] << 24 | p_key[13] << 16 | p_key[14] << 8 | p_key[15];        /* D */
-       key[4] = p_key[16] << 24 | p_key[17] << 16 | p_key[18] << 8 | p_key[19];        /* E */
-       key[5] = p_key[20] << 24 | p_key[21] << 16 | p_key[22] << 8 | p_key[23];        /* F */
-       key[6] = p_key[24] << 24 | p_key[25] << 16 | p_key[26] << 8 | p_key[27];        /* G */
-       key[7] = p_key[28] << 24 | p_key[29] << 16 | p_key[30] << 8 | p_key[31];        /* H */
+       key[0] = be32_to_cpu(p_key[0]);         /* A */
+       key[1] = be32_to_cpu(p_key[1]);         /* B */
+       key[2] = be32_to_cpu(p_key[2]);         /* C */
+       key[3] = be32_to_cpu(p_key[3]);         /* D */
+       key[4] = be32_to_cpu(p_key[4]);         /* E */
+       key[5] = be32_to_cpu(p_key[5]);         /* F */
+       key[6] = be32_to_cpu(p_key[6]);         /* G */
+       key[7] = be32_to_cpu(p_key[7]);         /* H */
        
 
 
@@ -444,14 +446,16 @@ static inline void QBAR (u32 * block, u8 * Kr, u32 * Km) {
 
 static void cast6_encrypt (void * ctx, u8 * outbuf, const u8 * inbuf) {
        struct cast6_ctx * c = (struct cast6_ctx *)ctx;
+       const __be32 *src = (const __be32 *)inbuf;
+       __be32 *dst = (__be32 *)outbuf;
        u32 block[4];
        u32 * Km; 
        u8 * Kr;
 
-       block[0] = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3];
-       block[1] = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7];
-       block[2] = inbuf[8] << 24 | inbuf[9] << 16 | inbuf[10] << 8 | inbuf[11];
-       block[3] = inbuf[12] << 24 | inbuf[13] << 16 | inbuf[14] << 8 | inbuf[15];
+       block[0] = be32_to_cpu(src[0]);
+       block[1] = be32_to_cpu(src[1]);
+       block[2] = be32_to_cpu(src[2]);
+       block[3] = be32_to_cpu(src[3]);
 
        Km = c->Km[0]; Kr = c->Kr[0]; Q (block, Kr, Km);
        Km = c->Km[1]; Kr = c->Kr[1]; Q (block, Kr, Km);
@@ -465,35 +469,25 @@ static void cast6_encrypt (void * ctx, u8 * outbuf, const u8 * inbuf) {
        Km = c->Km[9]; Kr = c->Kr[9]; QBAR (block, Kr, Km);
        Km = c->Km[10]; Kr = c->Kr[10]; QBAR (block, Kr, Km);
        Km = c->Km[11]; Kr = c->Kr[11]; QBAR (block, Kr, Km);
-       
-       outbuf[0] = (block[0] >> 24) & 0xff;
-       outbuf[1] = (block[0] >> 16) & 0xff;
-       outbuf[2] = (block[0] >> 8) & 0xff;
-       outbuf[3] = block[0] & 0xff;
-       outbuf[4] = (block[1] >> 24) & 0xff;
-       outbuf[5] = (block[1] >> 16) & 0xff;
-       outbuf[6] = (block[1] >> 8) & 0xff;
-       outbuf[7] = block[1] & 0xff;
-       outbuf[8] = (block[2] >> 24) & 0xff;
-       outbuf[9] = (block[2] >> 16) & 0xff;
-       outbuf[10] = (block[2] >> 8) & 0xff;
-       outbuf[11] = block[2] & 0xff;
-       outbuf[12] = (block[3] >> 24) & 0xff;
-       outbuf[13] = (block[3] >> 16) & 0xff;
-       outbuf[14] = (block[3] >> 8) & 0xff;
-       outbuf[15] = block[3] & 0xff;   
+
+       dst[0] = cpu_to_be32(block[0]);
+       dst[1] = cpu_to_be32(block[1]);
+       dst[2] = cpu_to_be32(block[2]);
+       dst[3] = cpu_to_be32(block[3]);
 }      
 
 static void cast6_decrypt (void * ctx, u8 * outbuf, const u8 * inbuf) {
        struct cast6_ctx * c = (struct cast6_ctx *)ctx;
+       const __be32 *src = (const __be32 *)inbuf;
+       __be32 *dst = (__be32 *)outbuf;
        u32 block[4];
        u32 * Km; 
        u8 * Kr;
 
-       block[0] = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3];
-       block[1] = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7];
-       block[2] = inbuf[8] << 24 | inbuf[9] << 16 | inbuf[10] << 8 | inbuf[11];
-       block[3] = inbuf[12] << 24 | inbuf[13] << 16 | inbuf[14] << 8 | inbuf[15];
+       block[0] = be32_to_cpu(src[0]);
+       block[1] = be32_to_cpu(src[1]);
+       block[2] = be32_to_cpu(src[2]);
+       block[3] = be32_to_cpu(src[3]);
 
        Km = c->Km[11]; Kr = c->Kr[11]; Q (block, Kr, Km);
        Km = c->Km[10]; Kr = c->Kr[10]; Q (block, Kr, Km);
@@ -508,22 +502,10 @@ static void cast6_decrypt (void * ctx, u8 * outbuf, const u8 * inbuf) {
        Km = c->Km[1]; Kr = c->Kr[1]; QBAR (block, Kr, Km);
        Km = c->Km[0]; Kr = c->Kr[0]; QBAR (block, Kr, Km);
        
-       outbuf[0] = (block[0] >> 24) & 0xff;
-       outbuf[1] = (block[0] >> 16) & 0xff;
-       outbuf[2] = (block[0] >> 8) & 0xff;
-       outbuf[3] = block[0] & 0xff;
-       outbuf[4] = (block[1] >> 24) & 0xff;
-       outbuf[5] = (block[1] >> 16) & 0xff;
-       outbuf[6] = (block[1] >> 8) & 0xff;
-       outbuf[7] = block[1] & 0xff;
-       outbuf[8] = (block[2] >> 24) & 0xff;
-       outbuf[9] = (block[2] >> 16) & 0xff;
-       outbuf[10] = (block[2] >> 8) & 0xff;
-       outbuf[11] = block[2] & 0xff;
-       outbuf[12] = (block[3] >> 24) & 0xff;
-       outbuf[13] = (block[3] >> 16) & 0xff;
-       outbuf[14] = (block[3] >> 8) & 0xff;
-       outbuf[15] = block[3] & 0xff;   
+       dst[0] = cpu_to_be32(block[0]);
+       dst[1] = cpu_to_be32(block[1]);
+       dst[2] = cpu_to_be32(block[2]);
+       dst[3] = cpu_to_be32(block[3]);
 }      
 
 static struct crypto_alg alg = {
@@ -531,6 +513,7 @@ static struct crypto_alg alg = {
        .cra_flags = CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize = CAST6_BLOCK_SIZE,
        .cra_ctxsize = sizeof(struct cast6_ctx),
+       .cra_alignmask = 3,
        .cra_module = THIS_MODULE,
        .cra_list = LIST_HEAD_INIT(alg.cra_list),
        .cra_u = {
index dfd4bcfc59758332d8ae82fc1d0db2e009c9b26a..65bcea0cd17c867ae88dde90aefc9e137ebd3259 100644 (file)
@@ -212,9 +212,10 @@ static unsigned int cbc_process_decrypt(const struct cipher_desc *desc,
        struct crypto_tfm *tfm = desc->tfm;
        void (*xor)(u8 *, const u8 *) = tfm->crt_u.cipher.cit_xor_block;
        int bsize = crypto_tfm_alg_blocksize(tfm);
+       unsigned long alignmask = crypto_tfm_alg_alignmask(desc->tfm);
 
-       u8 stack[src == dst ? bsize : 0];
-       u8 *buf = stack;
+       u8 stack[src == dst ? bsize + alignmask : 0];
+       u8 *buf = (u8 *)ALIGN((unsigned long)stack, alignmask + 1);
        u8 **dst_p = src == dst ? &buf : &dst;
 
        void (*fn)(void *, u8 *, const u8 *) = desc->crfn;
index 256956cd9377a1ac8fd052ab8779e91dd5c550a3..953362423a5c6c7aaeceb6dda819ba7c701134b7 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/string.h>
 #include <linux/crypto.h>
 #include <linux/crc32c.h>
+#include <linux/types.h>
 #include <asm/byteorder.h>
 
 #define CHKSUM_BLOCK_SIZE      32
index a3c863ddddedd381ba4ed96bffb3fc34e1e49fce..7bb548653dc68752f8facabda96dc463c0c437a2 100644 (file)
  *
  */
 
+#include <asm/byteorder.h>
 #include <linux/bitops.h>
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/crypto.h>
+#include <linux/types.h>
 
 #define DES_KEY_SIZE           8
 #define DES_EXPKEY_WORDS       32
@@ -947,6 +949,7 @@ static struct crypto_alg des_alg = {
        .cra_blocksize          =       DES_BLOCK_SIZE,
        .cra_ctxsize            =       sizeof(struct des_ctx),
        .cra_module             =       THIS_MODULE,
+       .cra_alignmask          =       3,
        .cra_list               =       LIST_HEAD_INIT(des_alg.cra_list),
        .cra_u                  =       { .cipher = {
        .cia_min_keysize        =       DES_KEY_SIZE,
index 37aa652ce5ce6f89e4738ac07dd770b8df4a6ac9..959e602909a60e1042e2d07d4d19471d9b0cd23c 100644 (file)
@@ -2,6 +2,7 @@
  * Cryptographic API.
  *
  * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
+ * Copyright (c) 2005 Herbert Xu <herbert@gondor.apana.org.au>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
 #include <linux/highmem.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
+#include <linux/list.h>
 #include <linux/kernel.h>
+#include <linux/rwsem.h>
 #include <linux/slab.h>
 #include <asm/kmap_types.h>
 
+extern struct list_head crypto_alg_list;
+extern struct rw_semaphore crypto_alg_sem;
+
 extern enum km_type crypto_km_types[];
 
 static inline enum km_type crypto_kmap_type(int out)
index 738cb0dd1e7cdc7618ba39e9c30fa5cd30b982b9..807f2bf4ea24fac9869a8aa5a91e0825fe6ed8fe 100644 (file)
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
+#include <asm/byteorder.h>
 #include <asm/scatterlist.h>
 #include <linux/crypto.h>
+#include <linux/types.h>
 
 #define KHAZAD_KEY_SIZE                16
 #define KHAZAD_BLOCK_SIZE      8
@@ -755,8 +757,8 @@ static const u64 c[KHAZAD_ROUNDS + 1] = {
 static int khazad_setkey(void *ctx_arg, const u8 *in_key,
                        unsigned int key_len, u32 *flags)
 {
-
        struct khazad_ctx *ctx = ctx_arg;
+       const __be64 *key = (const __be64 *)in_key;
        int r;
        const u64 *S = T7;
        u64 K2, K1;
@@ -767,22 +769,8 @@ static int khazad_setkey(void *ctx_arg, const u8 *in_key,
                return -EINVAL;
        }
 
-       K2 = ((u64)in_key[ 0] << 56) ^
-            ((u64)in_key[ 1] << 48) ^
-            ((u64)in_key[ 2] << 40) ^
-            ((u64)in_key[ 3] << 32) ^
-            ((u64)in_key[ 4] << 24) ^
-            ((u64)in_key[ 5] << 16) ^
-            ((u64)in_key[ 6] <<  8) ^
-            ((u64)in_key[ 7]      );
-       K1 = ((u64)in_key[ 8] << 56) ^
-            ((u64)in_key[ 9] << 48) ^
-            ((u64)in_key[10] << 40) ^
-            ((u64)in_key[11] << 32) ^
-            ((u64)in_key[12] << 24) ^
-            ((u64)in_key[13] << 16) ^
-            ((u64)in_key[14] <<  8) ^
-            ((u64)in_key[15]      );
+       K2 = be64_to_cpu(key[0]);
+       K1 = be64_to_cpu(key[1]);
 
        /* setup the encrypt key */
        for (r = 0; r <= KHAZAD_ROUNDS; r++) {
@@ -820,19 +808,12 @@ static int khazad_setkey(void *ctx_arg, const u8 *in_key,
 static void khazad_crypt(const u64 roundKey[KHAZAD_ROUNDS + 1],
                u8 *ciphertext, const u8 *plaintext)
 {
-
+       const __be64 *src = (const __be64 *)plaintext;
+       __be64 *dst = (__be64 *)ciphertext;
        int r;
        u64 state;
 
-       state = ((u64)plaintext[0] << 56) ^
-               ((u64)plaintext[1] << 48) ^
-               ((u64)plaintext[2] << 40) ^
-               ((u64)plaintext[3] << 32) ^
-               ((u64)plaintext[4] << 24) ^
-               ((u64)plaintext[5] << 16) ^
-               ((u64)plaintext[6] <<  8) ^
-               ((u64)plaintext[7]      ) ^
-               roundKey[0];
+       state = be64_to_cpu(*src) ^ roundKey[0];
 
        for (r = 1; r < KHAZAD_ROUNDS; r++) {
                state = T0[(int)(state >> 56)       ] ^
@@ -856,15 +837,7 @@ static void khazad_crypt(const u64 roundKey[KHAZAD_ROUNDS + 1],
                (T7[(int)(state      ) & 0xff] & 0x00000000000000ffULL) ^
                roundKey[KHAZAD_ROUNDS];
 
-       ciphertext[0] = (u8)(state >> 56);
-       ciphertext[1] = (u8)(state >> 48);
-       ciphertext[2] = (u8)(state >> 40);
-       ciphertext[3] = (u8)(state >> 32);
-       ciphertext[4] = (u8)(state >> 24);
-       ciphertext[5] = (u8)(state >> 16);
-       ciphertext[6] = (u8)(state >>  8);
-       ciphertext[7] = (u8)(state      );
-
+       *dst = cpu_to_be64(state);
 }
 
 static void khazad_encrypt(void *ctx_arg, u8 *dst, const u8 *src)
@@ -884,6 +857,7 @@ static struct crypto_alg khazad_alg = {
        .cra_flags              =       CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize          =       KHAZAD_BLOCK_SIZE,
        .cra_ctxsize            =       sizeof (struct khazad_ctx),
+       .cra_alignmask          =       7,
        .cra_module             =       THIS_MODULE,
        .cra_list               =       LIST_HEAD_INIT(khazad_alg.cra_list),
        .cra_u                  =       { .cipher = {
index bef6a9e5ac9ba02d7cfdc9ff7f37f2fbf33aab3e..a2d6df5c0f8c69235f6ff4a2859627ac2123ecce 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/crypto.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/types.h>
 #include <asm/byteorder.h>
 
 #define MD4_DIGEST_SIZE                16
index 1ed45f9c263ed92d10f4b50d54a7d61b1d10d8ba..7f041aef5da23640d85d0b350938bddf87db2243 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/module.h>
 #include <linux/string.h>
 #include <linux/crypto.h>
+#include <linux/types.h>
 #include <asm/byteorder.h>
 
 #define MD5_DIGEST_SIZE                16
index a470bcb3693eafa6d034d8df5ec60c06ed998ab1..4f6ab23e14adfb765332394495412a25957ac28f 100644 (file)
  * published by the Free Software Foundation.
  */
 
+#include <asm/byteorder.h>
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/string.h>
 #include <linux/crypto.h>
+#include <linux/types.h>
 
 
 struct michael_mic_ctx {
@@ -43,21 +45,6 @@ do {                         \
 } while (0)
 
 
-static inline u32 get_le32(const u8 *p)
-{
-       return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
-}
-
-
-static inline void put_le32(u8 *p, u32 v)
-{
-       p[0] = v;
-       p[1] = v >> 8;
-       p[2] = v >> 16;
-       p[3] = v >> 24;
-}
-
-
 static void michael_init(void *ctx)
 {
        struct michael_mic_ctx *mctx = ctx;
@@ -68,6 +55,7 @@ static void michael_init(void *ctx)
 static void michael_update(void *ctx, const u8 *data, unsigned int len)
 {
        struct michael_mic_ctx *mctx = ctx;
+       const __le32 *src;
 
        if (mctx->pending_len) {
                int flen = 4 - mctx->pending_len;
@@ -81,21 +69,23 @@ static void michael_update(void *ctx, const u8 *data, unsigned int len)
                if (mctx->pending_len < 4)
                        return;
 
-               mctx->l ^= get_le32(mctx->pending);
+               src = (const __le32 *)mctx->pending;
+               mctx->l ^= le32_to_cpup(src);
                michael_block(mctx->l, mctx->r);
                mctx->pending_len = 0;
        }
 
+       src = (const __le32 *)data;
+
        while (len >= 4) {
-               mctx->l ^= get_le32(data);
+               mctx->l ^= le32_to_cpup(src++);
                michael_block(mctx->l, mctx->r);
-               data += 4;
                len -= 4;
        }
 
        if (len > 0) {
                mctx->pending_len = len;
-               memcpy(mctx->pending, data, len);
+               memcpy(mctx->pending, src, len);
        }
 }
 
@@ -104,6 +94,7 @@ static void michael_final(void *ctx, u8 *out)
 {
        struct michael_mic_ctx *mctx = ctx;
        u8 *data = mctx->pending;
+       __le32 *dst = (__le32 *)out;
 
        /* Last block and padding (0x5a, 4..7 x 0) */
        switch (mctx->pending_len) {
@@ -125,8 +116,8 @@ static void michael_final(void *ctx, u8 *out)
        /* l ^= 0; */
        michael_block(mctx->l, mctx->r);
 
-       put_le32(out, mctx->l);
-       put_le32(out + 4, mctx->r);
+       dst[0] = cpu_to_le32(mctx->l);
+       dst[1] = cpu_to_le32(mctx->r);
 }
 
 
@@ -134,13 +125,16 @@ static int michael_setkey(void *ctx, const u8 *key, unsigned int keylen,
                          u32 *flags)
 {
        struct michael_mic_ctx *mctx = ctx;
+       const __le32 *data = (const __le32 *)key;
+
        if (keylen != 8) {
                if (flags)
                        *flags = CRYPTO_TFM_RES_BAD_KEY_LEN;
                return -EINVAL;
        }
-       mctx->l = get_le32(key);
-       mctx->r = get_le32(key + 4);
+
+       mctx->l = le32_to_cpu(data[0]);
+       mctx->r = le32_to_cpu(data[1]);
        return 0;
 }
 
index 630ba91c08f139fa02a84ef970867eaf1887edee..c0a5dd7ce2ccbacc98b419b8667853bcdf5c2d73 100644 (file)
@@ -4,6 +4,7 @@
  * Procfs information.
  *
  * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
+ * Copyright (c) 2005 Herbert Xu <herbert@gondor.apana.org.au>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
@@ -18,9 +19,6 @@
 #include <linux/seq_file.h>
 #include "internal.h"
 
-extern struct list_head crypto_alg_list;
-extern struct rw_semaphore crypto_alg_sem;
-
 static void *c_start(struct seq_file *m, loff_t *pos)
 {
        struct list_head *v;
@@ -53,7 +51,9 @@ static int c_show(struct seq_file *m, void *p)
        struct crypto_alg *alg = (struct crypto_alg *)p;
        
        seq_printf(m, "name         : %s\n", alg->cra_name);
+       seq_printf(m, "driver       : %s\n", alg->cra_driver_name);
        seq_printf(m, "module       : %s\n", module_name(alg->cra_module));
+       seq_printf(m, "priority     : %d\n", alg->cra_priority);
        
        switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) {
        case CRYPTO_ALG_TYPE_CIPHER:
index 3cf2c5067eea821a24bc60638feee720c68e2c8d..52ad1a492620c09c5f0505f52285514fff68961b 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/errno.h>
 #include <asm/byteorder.h>
 #include <linux/crypto.h>
+#include <linux/types.h>
 
 /* Key is padded to the maximum of 256 bits before round key generation.
  * Any key length <= 256 bits (32 bytes) is allowed by the algorithm.
@@ -552,6 +553,7 @@ static struct crypto_alg tnepres_alg = {
        .cra_flags              =       CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize          =       SERPENT_BLOCK_SIZE,
        .cra_ctxsize            =       sizeof(struct serpent_ctx),
+       .cra_alignmask          =       3,
        .cra_module             =       THIS_MODULE,
        .cra_list               =       LIST_HEAD_INIT(serpent_alg.cra_list),
        .cra_u                  =       { .cipher = {
index 4016f3b8ce9b6233f24a8200d3b1661588da7f96..21571ed35b7ee7f90792a5f8b83ea2b42ff6cac6 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/mm.h>
 #include <linux/crypto.h>
 #include <linux/cryptohash.h>
+#include <linux/types.h>
 #include <asm/scatterlist.h>
 #include <asm/byteorder.h>
 
@@ -48,23 +49,33 @@ static void sha1_init(void *ctx)
 static void sha1_update(void *ctx, const u8 *data, unsigned int len)
 {
        struct sha1_ctx *sctx = ctx;
-       unsigned int i, j;
-       u32 temp[SHA_WORKSPACE_WORDS];
+       unsigned int partial, done;
+       const u8 *src;
 
-       j = (sctx->count >> 3) & 0x3f;
-       sctx->count += len << 3;
+       partial = sctx->count & 0x3f;
+       sctx->count += len;
+       done = 0;
+       src = data;
 
-       if ((j + len) > 63) {
-               memcpy(&sctx->buffer[j], data, (i = 64-j));
-               sha_transform(sctx->state, sctx->buffer, temp);
-               for ( ; i + 63 < len; i += 64) {
-                       sha_transform(sctx->state, &data[i], temp);
+       if ((partial + len) > 63) {
+               u32 temp[SHA_WORKSPACE_WORDS];
+
+               if (partial) {
+                       done = -partial;
+                       memcpy(sctx->buffer + partial, data, done + 64);
+                       src = sctx->buffer;
                }
-               j = 0;
+
+               do {
+                       sha_transform(sctx->state, src, temp);
+                       done += 64;
+                       src = data + done;
+               } while (done + 63 < len);
+
+               memset(temp, 0, sizeof(temp));
+               partial = 0;
        }
-       else i = 0;
-       memset(temp, 0, sizeof(temp));
-       memcpy(&sctx->buffer[j], &data[i], len - i);
+       memcpy(sctx->buffer + partial, src, len - done);
 }
 
 
@@ -72,37 +83,24 @@ static void sha1_update(void *ctx, const u8 *data, unsigned int len)
 static void sha1_final(void* ctx, u8 *out)
 {
        struct sha1_ctx *sctx = ctx;
-       u32 i, j, index, padlen;
-       u64 t;
-       u8 bits[8] = { 0, };
+       __be32 *dst = (__be32 *)out;
+       u32 i, index, padlen;
+       __be64 bits;
        static const u8 padding[64] = { 0x80, };
 
-       t = sctx->count;
-       bits[7] = 0xff & t; t>>=8;
-       bits[6] = 0xff & t; t>>=8;
-       bits[5] = 0xff & t; t>>=8;
-       bits[4] = 0xff & t; t>>=8;
-       bits[3] = 0xff & t; t>>=8;
-       bits[2] = 0xff & t; t>>=8;
-       bits[1] = 0xff & t; t>>=8;
-       bits[0] = 0xff & t;
+       bits = cpu_to_be64(sctx->count << 3);
 
        /* Pad out to 56 mod 64 */
-       index = (sctx->count >> 3) & 0x3f;
+       index = sctx->count & 0x3f;
        padlen = (index < 56) ? (56 - index) : ((64+56) - index);
        sha1_update(sctx, padding, padlen);
 
        /* Append length */
-       sha1_update(sctx, bits, sizeof bits); 
+       sha1_update(sctx, (const u8 *)&bits, sizeof(bits));
 
        /* Store state in digest */
-       for (i = j = 0; i < 5; i++, j += 4) {
-               u32 t2 = sctx->state[i];
-               out[j+3] = t2 & 0xff; t2>>=8;
-               out[j+2] = t2 & 0xff; t2>>=8;
-               out[j+1] = t2 & 0xff; t2>>=8;
-               out[j  ] = t2 & 0xff;
-       }
+       for (i = 0; i < 5; i++)
+               dst[i] = cpu_to_be32(sctx->state[i]);
 
        /* Wipe context */
        memset(sctx, 0, sizeof *sctx);
index c78da50a9b7a41c80214f0934524a7d377fd8f0e..9d5ef674d6a9e4336d7c194fec2f3c270e323996 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/module.h>
 #include <linux/mm.h>
 #include <linux/crypto.h>
+#include <linux/types.h>
 #include <asm/scatterlist.h>
 #include <asm/byteorder.h>
 
@@ -279,22 +280,15 @@ static void sha256_update(void *ctx, const u8 *data, unsigned int len)
 static void sha256_final(void* ctx, u8 *out)
 {
        struct sha256_ctx *sctx = ctx;
-       u8 bits[8];
-       unsigned int index, pad_len, t;
-       int i, j;
+       __be32 *dst = (__be32 *)out;
+       __be32 bits[2];
+       unsigned int index, pad_len;
+       int i;
        static const u8 padding[64] = { 0x80, };
 
        /* Save number of bits */
-       t = sctx->count[0];
-       bits[7] = t; t >>= 8;
-       bits[6] = t; t >>= 8;
-       bits[5] = t; t >>= 8;
-       bits[4] = t;
-       t = sctx->count[1];
-       bits[3] = t; t >>= 8;
-       bits[2] = t; t >>= 8;
-       bits[1] = t; t >>= 8;
-       bits[0] = t;
+       bits[1] = cpu_to_be32(sctx->count[0]);
+       bits[0] = cpu_to_be32(sctx->count[1]);
 
        /* Pad out to 56 mod 64. */
        index = (sctx->count[0] >> 3) & 0x3f;
@@ -302,16 +296,11 @@ static void sha256_final(void* ctx, u8 *out)
        sha256_update(sctx, padding, pad_len);
 
        /* Append length (before padding) */
-       sha256_update(sctx, bits, 8);
+       sha256_update(sctx, (const u8 *)bits, sizeof(bits));
 
        /* Store state in digest */
-       for (i = j = 0; i < 8; i++, j += 4) {
-               t = sctx->state[i];
-               out[j+3] = t; t >>= 8;
-               out[j+2] = t; t >>= 8;
-               out[j+1] = t; t >>= 8;
-               out[j  ] = t;
-       }
+       for (i = 0; i < 8; i++)
+               dst[i] = cpu_to_be32(sctx->state[i]);
 
        /* Zeroize sensitive information. */
        memset(sctx, 0, sizeof(*sctx));
index c663438322e9bf4691930feede496de45fc5ea44..3e6e9392310c0fe94adaebc9632de37089f0d87e 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/crypto.h>
+#include <linux/types.h>
 
 #include <asm/scatterlist.h>
 #include <asm/byteorder.h>
@@ -235,39 +236,17 @@ static void
 sha512_final(void *ctx, u8 *hash)
 {
         struct sha512_ctx *sctx = ctx;
-       
         static u8 padding[128] = { 0x80, };
-
-        u32 t;
-       u64 t2;
-        u8 bits[128];
+       __be64 *dst = (__be64 *)hash;
+       __be32 bits[4];
        unsigned int index, pad_len;
-       int i, j;
-
-        index = pad_len = t = i = j = 0;
-        t2 = 0;
+       int i;
 
        /* Save number of bits */
-       t = sctx->count[0];
-       bits[15] = t; t>>=8;
-       bits[14] = t; t>>=8;
-       bits[13] = t; t>>=8;
-       bits[12] = t; 
-       t = sctx->count[1];
-       bits[11] = t; t>>=8;
-       bits[10] = t; t>>=8;
-       bits[9 ] = t; t>>=8;
-       bits[8 ] = t; 
-       t = sctx->count[2];
-       bits[7 ] = t; t>>=8;
-       bits[6 ] = t; t>>=8;
-       bits[5 ] = t; t>>=8;
-       bits[4 ] = t; 
-       t = sctx->count[3];
-       bits[3 ] = t; t>>=8;
-       bits[2 ] = t; t>>=8;
-       bits[1 ] = t; t>>=8;
-       bits[0 ] = t; 
+       bits[3] = cpu_to_be32(sctx->count[0]);
+       bits[2] = cpu_to_be32(sctx->count[1]);
+       bits[1] = cpu_to_be32(sctx->count[2]);
+       bits[0] = cpu_to_be32(sctx->count[3]);
 
        /* Pad out to 112 mod 128. */
        index = (sctx->count[0] >> 3) & 0x7f;
@@ -275,21 +254,12 @@ sha512_final(void *ctx, u8 *hash)
        sha512_update(sctx, padding, pad_len);
 
        /* Append length (before padding) */
-       sha512_update(sctx, bits, 16);
+       sha512_update(sctx, (const u8 *)bits, sizeof(bits));
 
        /* Store state in digest */
-       for (i = j = 0; i < 8; i++, j += 8) {
-               t2 = sctx->state[i];
-               hash[j+7] = (char)t2 & 0xff; t2>>=8;
-               hash[j+6] = (char)t2 & 0xff; t2>>=8;
-               hash[j+5] = (char)t2 & 0xff; t2>>=8;
-               hash[j+4] = (char)t2 & 0xff; t2>>=8;
-               hash[j+3] = (char)t2 & 0xff; t2>>=8;
-               hash[j+2] = (char)t2 & 0xff; t2>>=8;
-               hash[j+1] = (char)t2 & 0xff; t2>>=8;
-               hash[j  ] = (char)t2 & 0xff;
-       }
-       
+       for (i = 0; i < 8; i++)
+               dst[i] = cpu_to_be64(sctx->state[i]);
+
        /* Zeroize sensitive information. */
        memset(sctx, 0, sizeof(struct sha512_ctx));
 }
index 5924efdd3a169980c3893a9b9f8d931259d25ec9..a6a02b30e47072b76f41a695343709a82e21a4d3 100644 (file)
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
+#include <asm/byteorder.h>
 #include <asm/scatterlist.h>
 #include <linux/crypto.h>
+#include <linux/types.h>
 
 #define TEA_KEY_SIZE           16
 #define TEA_BLOCK_SIZE         8
@@ -35,9 +37,6 @@
 #define XTEA_ROUNDS            32
 #define XTEA_DELTA             0x9e3779b9
 
-#define u32_in(x) le32_to_cpu(*(const __le32 *)(x))
-#define u32_out(to, from) (*(__le32 *)(to) = cpu_to_le32(from))
-
 struct tea_ctx {
        u32 KEY[4];
 };
@@ -49,8 +48,8 @@ struct xtea_ctx {
 static int tea_setkey(void *ctx_arg, const u8 *in_key,
                        unsigned int key_len, u32 *flags)
 { 
-
        struct tea_ctx *ctx = ctx_arg;
+       const __le32 *key = (const __le32 *)in_key;
        
        if (key_len != 16)
        {
@@ -58,10 +57,10 @@ static int tea_setkey(void *ctx_arg, const u8 *in_key,
                return -EINVAL;
        }
 
-       ctx->KEY[0] = u32_in (in_key);
-       ctx->KEY[1] = u32_in (in_key + 4);
-       ctx->KEY[2] = u32_in (in_key + 8);
-       ctx->KEY[3] = u32_in (in_key + 12);
+       ctx->KEY[0] = le32_to_cpu(key[0]);
+       ctx->KEY[1] = le32_to_cpu(key[1]);
+       ctx->KEY[2] = le32_to_cpu(key[2]);
+       ctx->KEY[3] = le32_to_cpu(key[3]);
 
        return 0; 
 
@@ -73,9 +72,11 @@ static void tea_encrypt(void *ctx_arg, u8 *dst, const u8 *src)
        u32 k0, k1, k2, k3;
 
        struct tea_ctx *ctx = ctx_arg;
+       const __le32 *in = (const __le32 *)src;
+       __le32 *out = (__le32 *)dst;
 
-       y = u32_in (src);
-       z = u32_in (src + 4);
+       y = le32_to_cpu(in[0]);
+       z = le32_to_cpu(in[1]);
 
        k0 = ctx->KEY[0];
        k1 = ctx->KEY[1];
@@ -90,19 +91,20 @@ static void tea_encrypt(void *ctx_arg, u8 *dst, const u8 *src)
                z += ((y << 4) + k2) ^ (y + sum) ^ ((y >> 5) + k3);
        }
        
-       u32_out (dst, y);
-       u32_out (dst + 4, z);
+       out[0] = cpu_to_le32(y);
+       out[1] = cpu_to_le32(z);
 }
 
 static void tea_decrypt(void *ctx_arg, u8 *dst, const u8 *src)
 { 
        u32 y, z, n, sum;
        u32 k0, k1, k2, k3;
-
        struct tea_ctx *ctx = ctx_arg;
+       const __le32 *in = (const __le32 *)src;
+       __le32 *out = (__le32 *)dst;
 
-       y = u32_in (src);
-       z = u32_in (src + 4);
+       y = le32_to_cpu(in[0]);
+       z = le32_to_cpu(in[1]);
 
        k0 = ctx->KEY[0];
        k1 = ctx->KEY[1];
@@ -119,16 +121,15 @@ static void tea_decrypt(void *ctx_arg, u8 *dst, const u8 *src)
                sum -= TEA_DELTA;
        }
        
-       u32_out (dst, y);
-       u32_out (dst + 4, z);
-
+       out[0] = cpu_to_le32(y);
+       out[1] = cpu_to_le32(z);
 }
 
 static int xtea_setkey(void *ctx_arg, const u8 *in_key,
                        unsigned int key_len, u32 *flags)
 { 
-
        struct xtea_ctx *ctx = ctx_arg;
+       const __le32 *key = (const __le32 *)in_key;
        
        if (key_len != 16)
        {
@@ -136,10 +137,10 @@ static int xtea_setkey(void *ctx_arg, const u8 *in_key,
                return -EINVAL;
        }
 
-       ctx->KEY[0] = u32_in (in_key);
-       ctx->KEY[1] = u32_in (in_key + 4);
-       ctx->KEY[2] = u32_in (in_key + 8);
-       ctx->KEY[3] = u32_in (in_key + 12);
+       ctx->KEY[0] = le32_to_cpu(key[0]);
+       ctx->KEY[1] = le32_to_cpu(key[1]);
+       ctx->KEY[2] = le32_to_cpu(key[2]);
+       ctx->KEY[3] = le32_to_cpu(key[3]);
 
        return 0; 
 
@@ -147,14 +148,15 @@ static int xtea_setkey(void *ctx_arg, const u8 *in_key,
 
 static void xtea_encrypt(void *ctx_arg, u8 *dst, const u8 *src)
 { 
-
        u32 y, z, sum = 0;
        u32 limit = XTEA_DELTA * XTEA_ROUNDS;
 
        struct xtea_ctx *ctx = ctx_arg;
+       const __le32 *in = (const __le32 *)src;
+       __le32 *out = (__le32 *)dst;
 
-       y = u32_in (src);
-       z = u32_in (src + 4);
+       y = le32_to_cpu(in[0]);
+       z = le32_to_cpu(in[1]);
 
        while (sum != limit) {
                y += ((z << 4 ^ z >> 5) + z) ^ (sum + ctx->KEY[sum&3]); 
@@ -162,19 +164,19 @@ static void xtea_encrypt(void *ctx_arg, u8 *dst, const u8 *src)
                z += ((y << 4 ^ y >> 5) + y) ^ (sum + ctx->KEY[sum>>11 &3]); 
        }
        
-       u32_out (dst, y);
-       u32_out (dst + 4, z);
-
+       out[0] = cpu_to_le32(y);
+       out[1] = cpu_to_le32(z);
 }
 
 static void xtea_decrypt(void *ctx_arg, u8 *dst, const u8 *src)
 { 
-
        u32 y, z, sum;
        struct tea_ctx *ctx = ctx_arg;
+       const __le32 *in = (const __le32 *)src;
+       __le32 *out = (__le32 *)dst;
 
-       y = u32_in (src);
-       z = u32_in (src + 4);
+       y = le32_to_cpu(in[0]);
+       z = le32_to_cpu(in[1]);
 
        sum = XTEA_DELTA * XTEA_ROUNDS;
 
@@ -184,22 +186,22 @@ static void xtea_decrypt(void *ctx_arg, u8 *dst, const u8 *src)
                y -= ((z << 4 ^ z >> 5) + z) ^ (sum + ctx->KEY[sum & 3]);
        }
        
-       u32_out (dst, y);
-       u32_out (dst + 4, z);
-
+       out[0] = cpu_to_le32(y);
+       out[1] = cpu_to_le32(z);
 }
 
 
 static void xeta_encrypt(void *ctx_arg, u8 *dst, const u8 *src)
 { 
-
        u32 y, z, sum = 0;
        u32 limit = XTEA_DELTA * XTEA_ROUNDS;
 
        struct xtea_ctx *ctx = ctx_arg;
+       const __le32 *in = (const __le32 *)src;
+       __le32 *out = (__le32 *)dst;
 
-       y = u32_in (src);
-       z = u32_in (src + 4);
+       y = le32_to_cpu(in[0]);
+       z = le32_to_cpu(in[1]);
 
        while (sum != limit) {
                y += (z << 4 ^ z >> 5) + (z ^ sum) + ctx->KEY[sum&3];
@@ -207,19 +209,19 @@ static void xeta_encrypt(void *ctx_arg, u8 *dst, const u8 *src)
                z += (y << 4 ^ y >> 5) + (y ^ sum) + ctx->KEY[sum>>11 &3];
        }
        
-       u32_out (dst, y);
-       u32_out (dst + 4, z);
-
+       out[0] = cpu_to_le32(y);
+       out[1] = cpu_to_le32(z);
 }
 
 static void xeta_decrypt(void *ctx_arg, u8 *dst, const u8 *src)
 { 
-
        u32 y, z, sum;
        struct tea_ctx *ctx = ctx_arg;
+       const __le32 *in = (const __le32 *)src;
+       __le32 *out = (__le32 *)dst;
 
-       y = u32_in (src);
-       z = u32_in (src + 4);
+       y = le32_to_cpu(in[0]);
+       z = le32_to_cpu(in[1]);
 
        sum = XTEA_DELTA * XTEA_ROUNDS;
 
@@ -229,9 +231,8 @@ static void xeta_decrypt(void *ctx_arg, u8 *dst, const u8 *src)
                y -= (z << 4 ^ z >> 5) + (z ^ sum) + ctx->KEY[sum & 3];
        }
        
-       u32_out (dst, y);
-       u32_out (dst + 4, z);
-
+       out[0] = cpu_to_le32(y);
+       out[1] = cpu_to_le32(z);
 }
 
 static struct crypto_alg tea_alg = {
@@ -239,6 +240,7 @@ static struct crypto_alg tea_alg = {
        .cra_flags              =       CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize          =       TEA_BLOCK_SIZE,
        .cra_ctxsize            =       sizeof (struct tea_ctx),
+       .cra_alignmask          =       3,
        .cra_module             =       THIS_MODULE,
        .cra_list               =       LIST_HEAD_INIT(tea_alg.cra_list),
        .cra_u                  =       { .cipher = {
@@ -254,6 +256,7 @@ static struct crypto_alg xtea_alg = {
        .cra_flags              =       CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize          =       XTEA_BLOCK_SIZE,
        .cra_ctxsize            =       sizeof (struct xtea_ctx),
+       .cra_alignmask          =       3,
        .cra_module             =       THIS_MODULE,
        .cra_list               =       LIST_HEAD_INIT(xtea_alg.cra_list),
        .cra_u                  =       { .cipher = {
@@ -269,6 +272,7 @@ static struct crypto_alg xeta_alg = {
        .cra_flags              =       CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize          =       XTEA_BLOCK_SIZE,
        .cra_ctxsize            =       sizeof (struct xtea_ctx),
+       .cra_alignmask          =       3,
        .cra_module             =       THIS_MODULE,
        .cra_list               =       LIST_HEAD_INIT(xtea_alg.cra_list),
        .cra_u                  =       { .cipher = {
index f0a45cf716d0766161c0de853f7ca2ea9d0a7f40..2d8e44f6fbe906520ce07628d7a148b597731a7d 100644 (file)
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
+#include <asm/byteorder.h>
 #include <asm/scatterlist.h>
 #include <linux/crypto.h>
+#include <linux/types.h>
 
 #define TGR192_DIGEST_SIZE 24
 #define TGR160_DIGEST_SIZE 20
@@ -467,18 +469,10 @@ static void tgr192_transform(struct tgr192_ctx *tctx, const u8 * data)
        u64 a, b, c, aa, bb, cc;
        u64 x[8];
        int i;
-       const u8 *ptr = data;
-
-       for (i = 0; i < 8; i++, ptr += 8) {
-               x[i] = (((u64)ptr[7] ) << 56) ^
-               (((u64)ptr[6] & 0xffL) << 48) ^
-               (((u64)ptr[5] & 0xffL) << 40) ^
-               (((u64)ptr[4] & 0xffL) << 32) ^
-               (((u64)ptr[3] & 0xffL) << 24) ^
-               (((u64)ptr[2] & 0xffL) << 16) ^
-               (((u64)ptr[1] & 0xffL) <<  8) ^
-               (((u64)ptr[0] & 0xffL)      );
-       }
+       const __le64 *ptr = (const __le64 *)data;
+
+       for (i = 0; i < 8; i++)
+               x[i] = le64_to_cpu(ptr[i]);
 
        /* save */
        a = aa = tctx->a;
@@ -558,9 +552,10 @@ static void tgr192_update(void *ctx, const u8 * inbuf, unsigned int len)
 static void tgr192_final(void *ctx, u8 * out)
 {
        struct tgr192_ctx *tctx = ctx;
+       __be64 *dst = (__be64 *)out;
+       __be64 *be64p;
+       __le32 *le32p;
        u32 t, msb, lsb;
-       u8 *p;
-       int i, j;
 
        tgr192_update(tctx, NULL, 0); /* flush */ ;
 
@@ -594,41 +589,16 @@ static void tgr192_final(void *ctx, u8 * out)
                memset(tctx->hash, 0, 56);    /* fill next block with zeroes */
        }
        /* append the 64 bit count */
-       tctx->hash[56] = lsb;
-       tctx->hash[57] = lsb >> 8;
-       tctx->hash[58] = lsb >> 16;
-       tctx->hash[59] = lsb >> 24;
-       tctx->hash[60] = msb;
-       tctx->hash[61] = msb >> 8;
-       tctx->hash[62] = msb >> 16;
-       tctx->hash[63] = msb >> 24;
+       le32p = (__le32 *)&tctx->hash[56];
+       le32p[0] = cpu_to_le32(lsb);
+       le32p[1] = cpu_to_le32(msb);
+
        tgr192_transform(tctx, tctx->hash);
 
-       p = tctx->hash;
-       *p++ = tctx->a >> 56; *p++ = tctx->a >> 48; *p++ = tctx->a >> 40;
-       *p++ = tctx->a >> 32; *p++ = tctx->a >> 24; *p++ = tctx->a >> 16;
-       *p++ = tctx->a >>  8; *p++ = tctx->a;\
-       *p++ = tctx->b >> 56; *p++ = tctx->b >> 48; *p++ = tctx->b >> 40;
-       *p++ = tctx->b >> 32; *p++ = tctx->b >> 24; *p++ = tctx->b >> 16;
-       *p++ = tctx->b >>  8; *p++ = tctx->b;
-       *p++ = tctx->c >> 56; *p++ = tctx->c >> 48; *p++ = tctx->c >> 40;
-       *p++ = tctx->c >> 32; *p++ = tctx->c >> 24; *p++ = tctx->c >> 16;
-       *p++ = tctx->c >>  8; *p++ = tctx->c;
-
-
-       /* unpack the hash */
-       j = 7;
-       for (i = 0; i < 8; i++) {
-               out[j--] = (tctx->a >> 8 * i) & 0xff;
-       }
-       j = 15;
-       for (i = 0; i < 8; i++) {
-               out[j--] = (tctx->b >> 8 * i) & 0xff;
-       }
-       j = 23;
-       for (i = 0; i < 8; i++) {
-               out[j--] = (tctx->c >> 8 * i) & 0xff;
-       }
+       be64p = (__be64 *)tctx->hash;
+       dst[0] = be64p[0] = cpu_to_be64(tctx->a);
+       dst[1] = be64p[1] = cpu_to_be64(tctx->b);
+       dst[2] = be64p[2] = cpu_to_be64(tctx->c);
 }
 
 static void tgr160_final(void *ctx, u8 * out)
index 4efff8cf9958c3e661298626230febdebd0fd093..a26d885486fba45f65942055b8365091d988ec6e 100644 (file)
@@ -37,6 +37,8 @@
  * Abstract Algebra_ by Joseph A. Gallian, especially chapter 22 in the
  * Third Edition.
  */
+
+#include <asm/byteorder.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
@@ -621,13 +623,11 @@ static const u8 calc_sb_tbl[512] = {
  * whitening subkey number m. */
 
 #define INPACK(n, x, m) \
-   x = in[4 * (n)] ^ (in[4 * (n) + 1] << 8) \
-     ^ (in[4 * (n) + 2] << 16) ^ (in[4 * (n) + 3] << 24) ^ ctx->w[m]
+   x = le32_to_cpu(src[n]) ^ ctx->w[m]
 
 #define OUTUNPACK(n, x, m) \
    x ^= ctx->w[m]; \
-   out[4 * (n)] = x; out[4 * (n) + 1] = x >> 8; \
-   out[4 * (n) + 2] = x >> 16; out[4 * (n) + 3] = x >> 24
+   dst[n] = cpu_to_le32(x)
 
 #define TF_MIN_KEY_SIZE 16
 #define TF_MAX_KEY_SIZE 32
@@ -804,6 +804,8 @@ static int twofish_setkey(void *cx, const u8 *key,
 static void twofish_encrypt(void *cx, u8 *out, const u8 *in)
 {
        struct twofish_ctx *ctx = cx;
+       const __le32 *src = (const __le32 *)in;
+       __le32 *dst = (__le32 *)out;
 
        /* The four 32-bit chunks of the text. */
        u32 a, b, c, d;
@@ -839,6 +841,8 @@ static void twofish_encrypt(void *cx, u8 *out, const u8 *in)
 static void twofish_decrypt(void *cx, u8 *out, const u8 *in)
 {
        struct twofish_ctx *ctx = cx;
+       const __le32 *src = (const __le32 *)in;
+       __le32 *dst = (__le32 *)out;
   
        /* The four 32-bit chunks of the text. */
        u32 a, b, c, d;
@@ -875,6 +879,7 @@ static struct crypto_alg alg = {
        .cra_flags          =   CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize      =   TF_BLOCK_SIZE,
        .cra_ctxsize        =   sizeof(struct twofish_ctx),
+       .cra_alignmask      =   3,
        .cra_module         =   THIS_MODULE,
        .cra_list           =   LIST_HEAD_INIT(alg.cra_list),
        .cra_u              =   { .cipher = {
index fd6e20e1f2910d328ebaf11f6e5a3bc15526b66c..b226a126cfaec6a04efaa9f4919fa5dd77d467da 100644 (file)
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
+#include <asm/byteorder.h>
 #include <asm/scatterlist.h>
 #include <linux/crypto.h>
+#include <linux/types.h>
 
 #define WP512_DIGEST_SIZE 64
 #define WP384_DIGEST_SIZE 48
@@ -778,19 +780,10 @@ static void wp512_process_buffer(struct wp512_ctx *wctx) {
        u64 block[8];    /* mu(buffer) */
        u64 state[8];    /* the cipher state */
        u64 L[8];
-       u8 *buffer = wctx->buffer;
+       const __be64 *buffer = (const __be64 *)wctx->buffer;
 
-       for (i = 0; i < 8; i++, buffer += 8) {
-               block[i] =
-               (((u64)buffer[0]        ) << 56) ^
-               (((u64)buffer[1] & 0xffL) << 48) ^
-               (((u64)buffer[2] & 0xffL) << 40) ^
-               (((u64)buffer[3] & 0xffL) << 32) ^
-               (((u64)buffer[4] & 0xffL) << 24) ^
-               (((u64)buffer[5] & 0xffL) << 16) ^
-               (((u64)buffer[6] & 0xffL) <<  8) ^
-               (((u64)buffer[7] & 0xffL)      );
-       }
+       for (i = 0; i < 8; i++)
+               block[i] = be64_to_cpu(buffer[i]);
 
        state[0] = block[0] ^ (K[0] = wctx->hash[0]);
        state[1] = block[1] ^ (K[1] = wctx->hash[1]);
@@ -1069,7 +1062,7 @@ static void wp512_final(void *ctx, u8 *out)
        u8 *bitLength   = wctx->bitLength;
        int bufferBits  = wctx->bufferBits;
        int bufferPos   = wctx->bufferPos;
-       u8 *digest      = out;
+       __be64 *digest  = (__be64 *)out;
 
        buffer[bufferPos] |= 0x80U >> (bufferBits & 7);
        bufferPos++;
@@ -1088,17 +1081,8 @@ static void wp512_final(void *ctx, u8 *out)
        memcpy(&buffer[WP512_BLOCK_SIZE - WP512_LENGTHBYTES],
                   bitLength, WP512_LENGTHBYTES);
        wp512_process_buffer(wctx);
-       for (i = 0; i < WP512_DIGEST_SIZE/8; i++) {
-               digest[0] = (u8)(wctx->hash[i] >> 56);
-               digest[1] = (u8)(wctx->hash[i] >> 48);
-               digest[2] = (u8)(wctx->hash[i] >> 40);
-               digest[3] = (u8)(wctx->hash[i] >> 32);
-               digest[4] = (u8)(wctx->hash[i] >> 24);
-               digest[5] = (u8)(wctx->hash[i] >> 16);
-               digest[6] = (u8)(wctx->hash[i] >>  8);
-               digest[7] = (u8)(wctx->hash[i]      );
-               digest += 8;
-       }
+       for (i = 0; i < WP512_DIGEST_SIZE/8; i++)
+               digest[i] = cpu_to_be64(wctx->hash[i]);
        wctx->bufferBits   = bufferBits;
        wctx->bufferPos    = bufferPos;
 }
index 1bbdd1693d5764430ba027a4291246358f9a29db..889855d8d9f9080ee9b98c3a1a1bcd0691006f59 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/amba/bus.h>
 
 #include <asm/io.h>
-#include <asm/irq.h>
 #include <asm/sizes.h>
 
 #define to_amba_device(d)      container_of(d, struct amba_device, dev)
index 71407c578afe034faf2ce4ae4f36dfa5dbd46c85..64819aa7cac42a31f9e181809167ae92cf1ac5dc 100644 (file)
@@ -99,9 +99,6 @@ byte(const uint32_t x, const unsigned n)
        return x >> (n << 3);
 }
 
-#define uint32_t_in(x) le32_to_cpu(*(const uint32_t *)(x))
-#define uint32_t_out(to, from) (*(uint32_t *)(to) = cpu_to_le32(from))
-
 #define E_KEY ctx->E
 #define D_KEY ctx->D
 
@@ -294,6 +291,7 @@ static int
 aes_set_key(void *ctx_arg, const uint8_t *in_key, unsigned int key_len, uint32_t *flags)
 {
        struct aes_ctx *ctx = aes_ctx(ctx_arg);
+       const __le32 *key = (const __le32 *)in_key;
        uint32_t i, t, u, v, w;
        uint32_t P[AES_EXTENDED_KEY_SIZE];
        uint32_t rounds;
@@ -313,10 +311,10 @@ aes_set_key(void *ctx_arg, const uint8_t *in_key, unsigned int key_len, uint32_t
        ctx->E = ctx->e_data;
        ctx->D = ctx->e_data;
 
-       E_KEY[0] = uint32_t_in (in_key);
-       E_KEY[1] = uint32_t_in (in_key + 4);
-       E_KEY[2] = uint32_t_in (in_key + 8);
-       E_KEY[3] = uint32_t_in (in_key + 12);
+       E_KEY[0] = le32_to_cpu(key[0]);
+       E_KEY[1] = le32_to_cpu(key[1]);
+       E_KEY[2] = le32_to_cpu(key[2]);
+       E_KEY[3] = le32_to_cpu(key[3]);
 
        /* Prepare control words. */
        memset(&ctx->cword, 0, sizeof(ctx->cword));
@@ -343,17 +341,17 @@ aes_set_key(void *ctx_arg, const uint8_t *in_key, unsigned int key_len, uint32_t
                break;
 
        case 24:
-               E_KEY[4] = uint32_t_in (in_key + 16);
-               t = E_KEY[5] = uint32_t_in (in_key + 20);
+               E_KEY[4] = le32_to_cpu(key[4]);
+               t = E_KEY[5] = le32_to_cpu(key[5]);
                for (i = 0; i < 8; ++i)
                        loop6 (i);
                break;
 
        case 32:
-               E_KEY[4] = uint32_t_in (in_key + 16);
-               E_KEY[5] = uint32_t_in (in_key + 20);
-               E_KEY[6] = uint32_t_in (in_key + 24);
-               t = E_KEY[7] = uint32_t_in (in_key + 28);
+               E_KEY[4] = le32_to_cpu(in_key[4]);
+               E_KEY[5] = le32_to_cpu(in_key[5]);
+               E_KEY[6] = le32_to_cpu(in_key[6]);
+               t = E_KEY[7] = le32_to_cpu(in_key[7]);
                for (i = 0; i < 7; ++i)
                        loop8 (i);
                break;
@@ -468,6 +466,8 @@ static unsigned int aes_decrypt_cbc(const struct cipher_desc *desc, u8 *out,
 
 static struct crypto_alg aes_alg = {
        .cra_name               =       "aes",
+       .cra_driver_name        =       "aes-padlock",
+       .cra_priority           =       300,
        .cra_flags              =       CRYPTO_ALG_TYPE_CIPHER,
        .cra_blocksize          =       AES_BLOCK_SIZE,
        .cra_ctxsize            =       sizeof(struct aes_ctx),
index 3cf2b7a123487ce014fa074a22651bb77ea498ba..b78489bc298ac95d487de4bfaae06174fad5edf4 100644 (file)
@@ -17,7 +17,7 @@
 
 /* Control word. */
 struct cword {
-       int __attribute__ ((__packed__))
+       unsigned int __attribute__ ((__packed__))
                rounds:4,
                algo:3,
                keygen:1,
index 3f0df3330fb216b6bc3379fdc3a5c07104891ca8..ebd9976fc811b08efb2714ede9815c77936b0bd3 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/spinlock.h>
 
 #include <asm/io.h>
-#include <asm/irq.h>
 #include <asm/system.h>
 
 #include <asm/hardware/sa1111.h>
index 6696f71363b92bc3c2744b3bd3ffe243ec2f1714..bfca5c176e8862c559e9f3abc1bf91c2ba9825c7 100644 (file)
@@ -495,6 +495,7 @@ static void mmc_decode_cid(struct mmc_card *card)
 
                case 2: /* MMC v2.0 - v2.2 */
                case 3: /* MMC v3.1 - v3.3 */
+               case 4: /* MMC v4 */
                        card->cid.manfid        = UNSTUFF_BITS(resp, 120, 8);
                        card->cid.oemid         = UNSTUFF_BITS(resp, 104, 16);
                        card->cid.prod_name[0]  = UNSTUFF_BITS(resp, 96, 8);
index d5f28981596b3e6ab5df1d63795e53cc3fb62d98..f2c42b13945d9bc4b0d13b8d7159c7e65abc174b 100644 (file)
@@ -187,7 +187,13 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
                        brq.data.flags |= MMC_DATA_WRITE;
                        brq.data.blocks = 1;
                }
-               brq.mrq.stop = brq.data.blocks > 1 ? &brq.stop : NULL;
+
+               if (brq.data.blocks > 1) {
+                       brq.data.flags |= MMC_DATA_MULTI;
+                       brq.mrq.stop = &brq.stop;
+               } else {
+                       brq.mrq.stop = NULL;
+               }
 
                brq.data.sg = mq->sg;
                brq.data.sg_len = blk_rq_map_sg(req->q, req, brq.data.sg);
index 4f13bd2ccf9a74b2479727951962b83deb79ffbb..f257576253613f6ca7d90f1fb2f9d545f2bfbfee 100644 (file)
@@ -90,7 +90,7 @@ static int dma = 2;
  * Basic functions
  */
 
-static inline void wbsd_unlock_config(struct wbsd_hosthost)
+static inline void wbsd_unlock_config(struct wbsd_host *host)
 {
        BUG_ON(host->config == 0);
 
@@ -98,14 +98,14 @@ static inline void wbsd_unlock_config(struct wbsd_host* host)
        outb(host->unlock_code, host->config);
 }
 
-static inline void wbsd_lock_config(struct wbsd_hosthost)
+static inline void wbsd_lock_config(struct wbsd_host *host)
 {
        BUG_ON(host->config == 0);
 
        outb(LOCK_CODE, host->config);
 }
 
-static inline void wbsd_write_config(struct wbsd_hosthost, u8 reg, u8 value)
+static inline void wbsd_write_config(struct wbsd_host *host, u8 reg, u8 value)
 {
        BUG_ON(host->config == 0);
 
@@ -113,7 +113,7 @@ static inline void wbsd_write_config(struct wbsd_host* host, u8 reg, u8 value)
        outb(value, host->config + 1);
 }
 
-static inline u8 wbsd_read_config(struct wbsd_hosthost, u8 reg)
+static inline u8 wbsd_read_config(struct wbsd_host *host, u8 reg)
 {
        BUG_ON(host->config == 0);
 
@@ -121,13 +121,13 @@ static inline u8 wbsd_read_config(struct wbsd_host* host, u8 reg)
        return inb(host->config + 1);
 }
 
-static inline void wbsd_write_index(struct wbsd_hosthost, u8 index, u8 value)
+static inline void wbsd_write_index(struct wbsd_host *host, u8 index, u8 value)
 {
        outb(index, host->base + WBSD_IDXR);
        outb(value, host->base + WBSD_DATAR);
 }
 
-static inline u8 wbsd_read_index(struct wbsd_hosthost, u8 index)
+static inline u8 wbsd_read_index(struct wbsd_host *host, u8 index)
 {
        outb(index, host->base + WBSD_IDXR);
        return inb(host->base + WBSD_DATAR);
@@ -137,7 +137,7 @@ static inline u8 wbsd_read_index(struct wbsd_host* host, u8 index)
  * Common routines
  */
 
-static void wbsd_init_device(struct wbsd_hosthost)
+static void wbsd_init_device(struct wbsd_host *host)
 {
        u8 setup, ier;
 
@@ -197,7 +197,7 @@ static void wbsd_init_device(struct wbsd_host* host)
        inb(host->base + WBSD_ISR);
 }
 
-static void wbsd_reset(struct wbsd_hosthost)
+static void wbsd_reset(struct wbsd_host *host)
 {
        u8 setup;
 
@@ -211,14 +211,13 @@ static void wbsd_reset(struct wbsd_host* host)
        wbsd_write_index(host, WBSD_IDX_SETUP, setup);
 }
 
-static void wbsd_request_end(struct wbsd_host* host, struct mmc_request* mrq)
+static void wbsd_request_end(struct wbsd_host *host, struct mmc_request *mrq)
 {
        unsigned long dmaflags;
 
        DBGF("Ending request, cmd (%x)\n", mrq->cmd->opcode);
 
-       if (host->dma >= 0)
-       {
+       if (host->dma >= 0) {
                /*
                 * Release ISA DMA controller.
                 */
@@ -247,7 +246,7 @@ static void wbsd_request_end(struct wbsd_host* host, struct mmc_request* mrq)
  * Scatter/gather functions
  */
 
-static inline void wbsd_init_sg(struct wbsd_host* host, struct mmc_data* data)
+static inline void wbsd_init_sg(struct wbsd_host *host, struct mmc_data *data)
 {
        /*
         * Get info. about SG list from data structure.
@@ -259,7 +258,7 @@ static inline void wbsd_init_sg(struct wbsd_host* host, struct mmc_data* data)
        host->remain = host->cur_sg->length;
 }
 
-static inline int wbsd_next_sg(struct wbsd_hosthost)
+static inline int wbsd_next_sg(struct wbsd_host *host)
 {
        /*
         * Skip to next SG entry.
@@ -270,33 +269,32 @@ static inline int wbsd_next_sg(struct wbsd_host* host)
        /*
         * Any entries left?
         */
-       if (host->num_sg > 0)
-         {
-           host->offset = 0;
-           host->remain = host->cur_sg->length;
-         }
+       if (host->num_sg > 0) {
+               host->offset = 0;
+               host->remain = host->cur_sg->length;
+       }
 
        return host->num_sg;
 }
 
-static inline char* wbsd_kmap_sg(struct wbsd_host* host)
+static inline char *wbsd_kmap_sg(struct wbsd_host *host)
 {
        host->mapped_sg = kmap_atomic(host->cur_sg->page, KM_BIO_SRC_IRQ) +
                host->cur_sg->offset;
        return host->mapped_sg;
 }
 
-static inline void wbsd_kunmap_sg(struct wbsd_hosthost)
+static inline void wbsd_kunmap_sg(struct wbsd_host *host)
 {
        kunmap_atomic(host->mapped_sg, KM_BIO_SRC_IRQ);
 }
 
-static inline void wbsd_sg_to_dma(struct wbsd_host* host, struct mmc_data* data)
+static inline void wbsd_sg_to_dma(struct wbsd_host *host, struct mmc_data *data)
 {
        unsigned int len, i, size;
-       struct scatterlistsg;
-       chardmabuf = host->dma_buffer;
-       charsgbuf;
+       struct scatterlist *sg;
+       char *dmabuf = host->dma_buffer;
+       char *sgbuf;
 
        size = host->size;
 
@@ -308,8 +306,7 @@ static inline void wbsd_sg_to_dma(struct wbsd_host* host, struct mmc_data* data)
         * be the entire list though so make sure that
         * we do not transfer too much.
         */
-       for (i = 0;i < len;i++)
-       {
+       for (i = 0; i < len; i++) {
                sgbuf = kmap_atomic(sg[i].page, KM_BIO_SRC_IRQ) + sg[i].offset;
                if (size < sg[i].length)
                        memcpy(dmabuf, sgbuf, size);
@@ -337,12 +334,12 @@ static inline void wbsd_sg_to_dma(struct wbsd_host* host, struct mmc_data* data)
        host->size -= size;
 }
 
-static inline void wbsd_dma_to_sg(struct wbsd_host* host, struct mmc_data* data)
+static inline void wbsd_dma_to_sg(struct wbsd_host *host, struct mmc_data *data)
 {
        unsigned int len, i, size;
-       struct scatterlistsg;
-       chardmabuf = host->dma_buffer;
-       charsgbuf;
+       struct scatterlist *sg;
+       char *dmabuf = host->dma_buffer;
+       char *sgbuf;
 
        size = host->size;
 
@@ -354,8 +351,7 @@ static inline void wbsd_dma_to_sg(struct wbsd_host* host, struct mmc_data* data)
         * be the entire list though so make sure that
         * we do not transfer too much.
         */
-       for (i = 0;i < len;i++)
-       {
+       for (i = 0; i < len; i++) {
                sgbuf = kmap_atomic(sg[i].page, KM_BIO_SRC_IRQ) + sg[i].offset;
                if (size < sg[i].length)
                        memcpy(sgbuf, dmabuf, size);
@@ -387,46 +383,38 @@ static inline void wbsd_dma_to_sg(struct wbsd_host* host, struct mmc_data* data)
  * Command handling
  */
 
-static inline void wbsd_get_short_reply(struct wbsd_hosthost,
-       struct mmc_command* cmd)
+static inline void wbsd_get_short_reply(struct wbsd_host *host,
+                                       struct mmc_command *cmd)
 {
        /*
         * Correct response type?
         */
-       if (wbsd_read_index(host, WBSD_IDX_RSPLEN) != WBSD_RSP_SHORT)
-       {
+       if (wbsd_read_index(host, WBSD_IDX_RSPLEN) != WBSD_RSP_SHORT) {
                cmd->error = MMC_ERR_INVALID;
                return;
        }
 
-       cmd->resp[0] =
-               wbsd_read_index(host, WBSD_IDX_RESP12) << 24;
-       cmd->resp[0] |=
-               wbsd_read_index(host, WBSD_IDX_RESP13) << 16;
-       cmd->resp[0] |=
-               wbsd_read_index(host, WBSD_IDX_RESP14) << 8;
-       cmd->resp[0] |=
-               wbsd_read_index(host, WBSD_IDX_RESP15) << 0;
-       cmd->resp[1] =
-               wbsd_read_index(host, WBSD_IDX_RESP16) << 24;
+       cmd->resp[0]  = wbsd_read_index(host, WBSD_IDX_RESP12) << 24;
+       cmd->resp[0] |= wbsd_read_index(host, WBSD_IDX_RESP13) << 16;
+       cmd->resp[0] |= wbsd_read_index(host, WBSD_IDX_RESP14) << 8;
+       cmd->resp[0] |= wbsd_read_index(host, WBSD_IDX_RESP15) << 0;
+       cmd->resp[1]  = wbsd_read_index(host, WBSD_IDX_RESP16) << 24;
 }
 
-static inline void wbsd_get_long_reply(struct wbsd_hosthost,
-       struct mmc_commandcmd)
+static inline void wbsd_get_long_reply(struct wbsd_host *host,
+       struct mmc_command *cmd)
 {
        int i;
 
        /*
         * Correct response type?
         */
-       if (wbsd_read_index(host, WBSD_IDX_RSPLEN) != WBSD_RSP_LONG)
-       {
+       if (wbsd_read_index(host, WBSD_IDX_RSPLEN) != WBSD_RSP_LONG) {
                cmd->error = MMC_ERR_INVALID;
                return;
        }
 
-       for (i = 0;i < 4;i++)
-       {
+       for (i = 0; i < 4; i++) {
                cmd->resp[i] =
                        wbsd_read_index(host, WBSD_IDX_RESP1 + i * 4) << 24;
                cmd->resp[i] |=
@@ -438,7 +426,7 @@ static inline void wbsd_get_long_reply(struct wbsd_host* host,
        }
 }
 
-static void wbsd_send_command(struct wbsd_host* host, struct mmc_command* cmd)
+static void wbsd_send_command(struct wbsd_host *host, struct mmc_command *cmd)
 {
        int i;
        u8 status, isr;
@@ -456,7 +444,7 @@ static void wbsd_send_command(struct wbsd_host* host, struct mmc_command* cmd)
         * Send the command (CRC calculated by host).
         */
        outb(cmd->opcode, host->base + WBSD_CMDR);
-       for (i = 3;i >= 0;i--)
+       for (i = 3; i >= 0; i--)
                outb((cmd->arg >> (i * 8)) & 0xff, host->base + WBSD_CMDR);
 
        cmd->error = MMC_ERR_NONE;
@@ -471,8 +459,7 @@ static void wbsd_send_command(struct wbsd_host* host, struct mmc_command* cmd)
        /*
         * Do we expect a reply?
         */
-       if ((cmd->flags & MMC_RSP_MASK) != MMC_RSP_NONE)
-       {
+       if ((cmd->flags & MMC_RSP_MASK) != MMC_RSP_NONE) {
                /*
                 * Read back status.
                 */
@@ -488,8 +475,7 @@ static void wbsd_send_command(struct wbsd_host* host, struct mmc_command* cmd)
                else if ((cmd->flags & MMC_RSP_CRC) && (isr & WBSD_INT_CRC))
                        cmd->error = MMC_ERR_BADCRC;
                /* All ok */
-               else
-               {
+               else {
                        if ((cmd->flags & MMC_RSP_MASK) == MMC_RSP_SHORT)
                                wbsd_get_short_reply(host, cmd);
                        else
@@ -504,10 +490,10 @@ static void wbsd_send_command(struct wbsd_host* host, struct mmc_command* cmd)
  * Data functions
  */
 
-static void wbsd_empty_fifo(struct wbsd_hosthost)
+static void wbsd_empty_fifo(struct wbsd_host *host)
 {
-       struct mmc_datadata = host->mrq->cmd->data;
-       charbuffer;
+       struct mmc_data *data = host->mrq->cmd->data;
+       char *buffer;
        int i, fsr, fifo;
 
        /*
@@ -522,8 +508,7 @@ static void wbsd_empty_fifo(struct wbsd_host* host)
         * Drain the fifo. This has a tendency to loop longer
         * than the FIFO length (usually one block).
         */
-       while (!((fsr = inb(host->base + WBSD_FSR)) & WBSD_FIFO_EMPTY))
-       {
+       while (!((fsr = inb(host->base + WBSD_FSR)) & WBSD_FIFO_EMPTY)) {
                /*
                 * The size field in the FSR is broken so we have to
                 * do some guessing.
@@ -535,8 +520,7 @@ static void wbsd_empty_fifo(struct wbsd_host* host)
                else
                        fifo = 1;
 
-               for (i = 0;i < fifo;i++)
-               {
+               for (i = 0; i < fifo; i++) {
                        *buffer = inb(host->base + WBSD_DFR);
                        buffer++;
                        host->offset++;
@@ -547,8 +531,7 @@ static void wbsd_empty_fifo(struct wbsd_host* host)
                        /*
                         * Transfer done?
                         */
-                       if (data->bytes_xfered == host->size)
-                       {
+                       if (data->bytes_xfered == host->size) {
                                wbsd_kunmap_sg(host);
                                return;
                        }
@@ -556,15 +539,13 @@ static void wbsd_empty_fifo(struct wbsd_host* host)
                        /*
                         * End of scatter list entry?
                         */
-                       if (host->remain == 0)
-                       {
+                       if (host->remain == 0) {
                                wbsd_kunmap_sg(host);
 
                                /*
                                 * Get next entry. Check if last.
                                 */
-                               if (!wbsd_next_sg(host))
-                               {
+                               if (!wbsd_next_sg(host)) {
                                        /*
                                         * We should never reach this point.
                                         * It means that we're trying to
@@ -594,10 +575,10 @@ static void wbsd_empty_fifo(struct wbsd_host* host)
                tasklet_schedule(&host->fifo_tasklet);
 }
 
-static void wbsd_fill_fifo(struct wbsd_hosthost)
+static void wbsd_fill_fifo(struct wbsd_host *host)
 {
-       struct mmc_datadata = host->mrq->cmd->data;
-       charbuffer;
+       struct mmc_data *data = host->mrq->cmd->data;
+       char *buffer;
        int i, fsr, fifo;
 
        /*
@@ -613,8 +594,7 @@ static void wbsd_fill_fifo(struct wbsd_host* host)
         * Fill the fifo. This has a tendency to loop longer
         * than the FIFO length (usually one block).
         */
-       while (!((fsr = inb(host->base + WBSD_FSR)) & WBSD_FIFO_FULL))
-       {
+       while (!((fsr = inb(host->base + WBSD_FSR)) & WBSD_FIFO_FULL)) {
                /*
                 * The size field in the FSR is broken so we have to
                 * do some guessing.
@@ -626,8 +606,7 @@ static void wbsd_fill_fifo(struct wbsd_host* host)
                else
                        fifo = 15;
 
-               for (i = 16;i > fifo;i--)
-               {
+               for (i = 16; i > fifo; i--) {
                        outb(*buffer, host->base + WBSD_DFR);
                        buffer++;
                        host->offset++;
@@ -638,8 +617,7 @@ static void wbsd_fill_fifo(struct wbsd_host* host)
                        /*
                         * Transfer done?
                         */
-                       if (data->bytes_xfered == host->size)
-                       {
+                       if (data->bytes_xfered == host->size) {
                                wbsd_kunmap_sg(host);
                                return;
                        }
@@ -647,15 +625,13 @@ static void wbsd_fill_fifo(struct wbsd_host* host)
                        /*
                         * End of scatter list entry?
                         */
-                       if (host->remain == 0)
-                       {
+                       if (host->remain == 0) {
                                wbsd_kunmap_sg(host);
 
                                /*
                                 * Get next entry. Check if last.
                                 */
-                               if (!wbsd_next_sg(host))
-                               {
+                               if (!wbsd_next_sg(host)) {
                                        /*
                                         * We should never reach this point.
                                         * It means that we're trying to
@@ -684,7 +660,7 @@ static void wbsd_fill_fifo(struct wbsd_host* host)
        tasklet_schedule(&host->fifo_tasklet);
 }
 
-static void wbsd_prepare_data(struct wbsd_host* host, struct mmc_data* data)
+static void wbsd_prepare_data(struct wbsd_host *host, struct mmc_data *data)
 {
        u16 blksize;
        u8 setup;
@@ -706,8 +682,10 @@ static void wbsd_prepare_data(struct wbsd_host* host, struct mmc_data* data)
         */
        if (data->timeout_ns > 127000000)
                wbsd_write_index(host, WBSD_IDX_TAAC, 127);
-       else
-               wbsd_write_index(host, WBSD_IDX_TAAC, data->timeout_ns/1000000);
+       else {
+               wbsd_write_index(host, WBSD_IDX_TAAC,
+                       data->timeout_ns / 1000000);
+       }
 
        if (data->timeout_clks > 255)
                wbsd_write_index(host, WBSD_IDX_NSAC, 255);
@@ -722,23 +700,18 @@ static void wbsd_prepare_data(struct wbsd_host* host, struct mmc_data* data)
         * Space for CRC must be included in the size.
         * Two bytes are needed for each data line.
         */
-       if (host->bus_width == MMC_BUS_WIDTH_1)
-       {
+       if (host->bus_width == MMC_BUS_WIDTH_1) {
                blksize = (1 << data->blksz_bits) + 2;
 
                wbsd_write_index(host, WBSD_IDX_PBSMSB, (blksize >> 4) & 0xF0);
                wbsd_write_index(host, WBSD_IDX_PBSLSB, blksize & 0xFF);
-       }
-       else if (host->bus_width == MMC_BUS_WIDTH_4)
-       {
+       } else if (host->bus_width == MMC_BUS_WIDTH_4) {
                blksize = (1 << data->blksz_bits) + 2 * 4;
 
-               wbsd_write_index(host, WBSD_IDX_PBSMSB, ((blksize >> 4) & 0xF0)
-                       | WBSD_DATA_WIDTH);
+               wbsd_write_index(host, WBSD_IDX_PBSMSB,
+                       ((blksize >> 4) & 0xF0) | WBSD_DATA_WIDTH);
                wbsd_write_index(host, WBSD_IDX_PBSLSB, blksize & 0xFF);
-       }
-       else
-       {
+       } else {
                data->error = MMC_ERR_INVALID;
                return;
        }
@@ -755,14 +728,12 @@ static void wbsd_prepare_data(struct wbsd_host* host, struct mmc_data* data)
        /*
         * DMA transfer?
         */
-       if (host->dma >= 0)
-       {
+       if (host->dma >= 0) {
                /*
                 * The buffer for DMA is only 64 kB.
                 */
                BUG_ON(host->size > 0x10000);
-               if (host->size > 0x10000)
-               {
+               if (host->size > 0x10000) {
                        data->error = MMC_ERR_INVALID;
                        return;
                }
@@ -794,9 +765,7 @@ static void wbsd_prepare_data(struct wbsd_host* host, struct mmc_data* data)
                 * Enable DMA on the host.
                 */
                wbsd_write_index(host, WBSD_IDX_DMA, WBSD_DMA_ENABLE);
-       }
-       else
-       {
+       } else {
                /*
                 * This flag is used to keep printk
                 * output to a minimum.
@@ -817,13 +786,10 @@ static void wbsd_prepare_data(struct wbsd_host* host, struct mmc_data* data)
                 * Set up FIFO threshold levels (and fill
                 * buffer if doing a write).
                 */
-               if (data->flags & MMC_DATA_READ)
-               {
+               if (data->flags & MMC_DATA_READ) {
                        wbsd_write_index(host, WBSD_IDX_FIFOEN,
                                WBSD_FIFOEN_FULL | 8);
-               }
-               else
-               {
+               } else {
                        wbsd_write_index(host, WBSD_IDX_FIFOEN,
                                WBSD_FIFOEN_EMPTY | 8);
                        wbsd_fill_fifo(host);
@@ -833,7 +799,7 @@ static void wbsd_prepare_data(struct wbsd_host* host, struct mmc_data* data)
        data->error = MMC_ERR_NONE;
 }
 
-static void wbsd_finish_data(struct wbsd_host* host, struct mmc_data* data)
+static void wbsd_finish_data(struct wbsd_host *host, struct mmc_data *data)
 {
        unsigned long dmaflags;
        int count;
@@ -851,16 +817,14 @@ static void wbsd_finish_data(struct wbsd_host* host, struct mmc_data* data)
         * Wait for the controller to leave data
         * transfer state.
         */
-       do
-       {
+       do {
                status = wbsd_read_index(host, WBSD_IDX_STATUS);
        } while (status & (WBSD_BLOCK_READ | WBSD_BLOCK_WRITE));
 
        /*
         * DMA transfer?
         */
-       if (host->dma >= 0)
-       {
+       if (host->dma >= 0) {
                /*
                 * Disable DMA on the host.
                 */
@@ -878,16 +842,13 @@ static void wbsd_finish_data(struct wbsd_host* host, struct mmc_data* data)
                /*
                 * Any leftover data?
                 */
-               if (count)
-               {
+               if (count) {
                        printk(KERN_ERR "%s: Incomplete DMA transfer. "
                                "%d bytes left.\n",
                                mmc_hostname(host->mmc), count);
 
                        data->error = MMC_ERR_FAILED;
-               }
-               else
-               {
+               } else {
                        /*
                         * Transfer data from DMA buffer to
                         * SG list.
@@ -910,10 +871,10 @@ static void wbsd_finish_data(struct wbsd_host* host, struct mmc_data* data)
  *                                                                           *
 \*****************************************************************************/
 
-static void wbsd_request(struct mmc_host* mmc, struct mmc_request* mrq)
+static void wbsd_request(struct mmc_host *mmc, struct mmc_request *mrq)
 {
-       struct wbsd_hosthost = mmc_priv(mmc);
-       struct mmc_commandcmd;
+       struct wbsd_host *host = mmc_priv(mmc);
+       struct mmc_command *cmd;
 
        /*
         * Disable tasklets to avoid a deadlock.
@@ -930,8 +891,7 @@ static void wbsd_request(struct mmc_host* mmc, struct mmc_request* mrq)
         * If there is no card in the slot then
         * timeout immediatly.
         */
-       if (!(host->flags & WBSD_FCARD_PRESENT))
-       {
+       if (!(host->flags & WBSD_FCARD_PRESENT)) {
                cmd->error = MMC_ERR_TIMEOUT;
                goto done;
        }
@@ -939,8 +899,7 @@ static void wbsd_request(struct mmc_host* mmc, struct mmc_request* mrq)
        /*
         * Does the request include data?
         */
-       if (cmd->data)
-       {
+       if (cmd->data) {
                wbsd_prepare_data(host, cmd->data);
 
                if (cmd->data->error != MMC_ERR_NONE)
@@ -954,8 +913,7 @@ static void wbsd_request(struct mmc_host* mmc, struct mmc_request* mrq)
         * will be finished after the data has
         * transfered.
         */
-       if (cmd->data && (cmd->error == MMC_ERR_NONE))
-       {
+       if (cmd->data && (cmd->error == MMC_ERR_NONE)) {
                /*
                 * Dirty fix for hardware bug.
                 */
@@ -973,14 +931,14 @@ done:
        spin_unlock_bh(&host->lock);
 }
 
-static void wbsd_set_ios(struct mmc_host* mmc, struct mmc_ios* ios)
+static void wbsd_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
 {
-       struct wbsd_hosthost = mmc_priv(mmc);
+       struct wbsd_host *host = mmc_priv(mmc);
        u8 clk, setup, pwr;
 
        DBGF("clock %uHz busmode %u powermode %u cs %u Vdd %u width %u\n",
-            ios->clock, ios->bus_mode, ios->power_mode, ios->chip_select,
-            ios->vdd, ios->bus_width);
+               ios->clock, ios->bus_mode, ios->power_mode, ios->chip_select,
+               ios->vdd, ios->bus_width);
 
        spin_lock_bh(&host->lock);
 
@@ -1004,8 +962,7 @@ static void wbsd_set_ios(struct mmc_host* mmc, struct mmc_ios* ios)
         * Only write to the clock register when
         * there is an actual change.
         */
-       if (clk != host->clk)
-       {
+       if (clk != host->clk) {
                wbsd_write_index(host, WBSD_IDX_CLK, clk);
                host->clk = clk;
        }
@@ -1013,8 +970,7 @@ static void wbsd_set_ios(struct mmc_host* mmc, struct mmc_ios* ios)
        /*
         * Power up card.
         */
-       if (ios->power_mode != MMC_POWER_OFF)
-       {
+       if (ios->power_mode != MMC_POWER_OFF) {
                pwr = inb(host->base + WBSD_CSR);
                pwr &= ~WBSD_POWER_N;
                outb(pwr, host->base + WBSD_CSR);
@@ -1026,23 +982,19 @@ static void wbsd_set_ios(struct mmc_host* mmc, struct mmc_ios* ios)
         * that needs to be disabled.
         */
        setup = wbsd_read_index(host, WBSD_IDX_SETUP);
-       if (ios->chip_select == MMC_CS_HIGH)
-       {
+       if (ios->chip_select == MMC_CS_HIGH) {
                BUG_ON(ios->bus_width != MMC_BUS_WIDTH_1);
                setup |= WBSD_DAT3_H;
                host->flags |= WBSD_FIGNORE_DETECT;
-       }
-       else
-       {
-               if (setup & WBSD_DAT3_H)
-               {
+       } else {
+               if (setup & WBSD_DAT3_H) {
                        setup &= ~WBSD_DAT3_H;
 
                        /*
                         * We cannot resume card detection immediatly
                         * because of capacitance and delays in the chip.
                         */
-                       mod_timer(&host->ignore_timer, jiffies + HZ/100);
+                       mod_timer(&host->ignore_timer, jiffies + HZ / 100);
                }
        }
        wbsd_write_index(host, WBSD_IDX_SETUP, setup);
@@ -1056,9 +1008,9 @@ static void wbsd_set_ios(struct mmc_host* mmc, struct mmc_ios* ios)
        spin_unlock_bh(&host->lock);
 }
 
-static int wbsd_get_ro(struct mmc_hostmmc)
+static int wbsd_get_ro(struct mmc_host *mmc)
 {
-       struct wbsd_hosthost = mmc_priv(mmc);
+       struct wbsd_host *host = mmc_priv(mmc);
        u8 csr;
 
        spin_lock_bh(&host->lock);
@@ -1096,7 +1048,7 @@ static struct mmc_host_ops wbsd_ops = {
 
 static void wbsd_reset_ignore(unsigned long data)
 {
-       struct wbsd_host *host = (struct wbsd_host*)data;
+       struct wbsd_host *host = (struct wbsd_host *)data;
 
        BUG_ON(host == NULL);
 
@@ -1119,7 +1071,7 @@ static void wbsd_reset_ignore(unsigned long data)
  * Tasklets
  */
 
-static inline struct mmc_data* wbsd_get_data(struct wbsd_host* host)
+static inline struct mmc_data *wbsd_get_data(struct wbsd_host *host)
 {
        WARN_ON(!host->mrq);
        if (!host->mrq)
@@ -1138,14 +1090,13 @@ static inline struct mmc_data* wbsd_get_data(struct wbsd_host* host)
 
 static void wbsd_tasklet_card(unsigned long param)
 {
-       struct wbsd_host* host = (struct wbsd_host*)param;
+       struct wbsd_host *host = (struct wbsd_host *)param;
        u8 csr;
        int delay = -1;
 
        spin_lock(&host->lock);
 
-       if (host->flags & WBSD_FIGNORE_DETECT)
-       {
+       if (host->flags & WBSD_FIGNORE_DETECT) {
                spin_unlock(&host->lock);
                return;
        }
@@ -1153,23 +1104,18 @@ static void wbsd_tasklet_card(unsigned long param)
        csr = inb(host->base + WBSD_CSR);
        WARN_ON(csr == 0xff);
 
-       if (csr & WBSD_CARDPRESENT)
-       {
-               if (!(host->flags & WBSD_FCARD_PRESENT))
-               {
+       if (csr & WBSD_CARDPRESENT) {
+               if (!(host->flags & WBSD_FCARD_PRESENT)) {
                        DBG("Card inserted\n");
                        host->flags |= WBSD_FCARD_PRESENT;
 
                        delay = 500;
                }
-       }
-       else if (host->flags & WBSD_FCARD_PRESENT)
-       {
+       } else if (host->flags & WBSD_FCARD_PRESENT) {
                DBG("Card removed\n");
                host->flags &= ~WBSD_FCARD_PRESENT;
 
-               if (host->mrq)
-               {
+               if (host->mrq) {
                        printk(KERN_ERR "%s: Card removed during transfer!\n",
                                mmc_hostname(host->mmc));
                        wbsd_reset(host);
@@ -1193,8 +1139,8 @@ static void wbsd_tasklet_card(unsigned long param)
 
 static void wbsd_tasklet_fifo(unsigned long param)
 {
-       struct wbsd_host* host = (struct wbsd_host*)param;
-       struct mmc_datadata;
+       struct wbsd_host *host = (struct wbsd_host *)param;
+       struct mmc_data *data;
 
        spin_lock(&host->lock);
 
@@ -1213,8 +1159,7 @@ static void wbsd_tasklet_fifo(unsigned long param)
        /*
         * Done?
         */
-       if (host->size == data->bytes_xfered)
-       {
+       if (host->size == data->bytes_xfered) {
                wbsd_write_index(host, WBSD_IDX_FIFOEN, 0);
                tasklet_schedule(&host->finish_tasklet);
        }
@@ -1225,8 +1170,8 @@ end:
 
 static void wbsd_tasklet_crc(unsigned long param)
 {
-       struct wbsd_host* host = (struct wbsd_host*)param;
-       struct mmc_datadata;
+       struct wbsd_host *host = (struct wbsd_host *)param;
+       struct mmc_data *data;
 
        spin_lock(&host->lock);
 
@@ -1249,8 +1194,8 @@ end:
 
 static void wbsd_tasklet_timeout(unsigned long param)
 {
-       struct wbsd_host* host = (struct wbsd_host*)param;
-       struct mmc_datadata;
+       struct wbsd_host *host = (struct wbsd_host *)param;
+       struct mmc_data *data;
 
        spin_lock(&host->lock);
 
@@ -1273,8 +1218,8 @@ end:
 
 static void wbsd_tasklet_finish(unsigned long param)
 {
-       struct wbsd_host* host = (struct wbsd_host*)param;
-       struct mmc_datadata;
+       struct wbsd_host *host = (struct wbsd_host *)param;
+       struct mmc_data *data;
 
        spin_lock(&host->lock);
 
@@ -1294,14 +1239,13 @@ end:
 
 static void wbsd_tasklet_block(unsigned long param)
 {
-       struct wbsd_host* host = (struct wbsd_host*)param;
-       struct mmc_datadata;
+       struct wbsd_host *host = (struct wbsd_host *)param;
+       struct mmc_data *data;
 
        spin_lock(&host->lock);
 
        if ((wbsd_read_index(host, WBSD_IDX_CRCSTATUS) & WBSD_CRC_MASK) !=
-               WBSD_CRC_OK)
-       {
+               WBSD_CRC_OK) {
                data = wbsd_get_data(host);
                if (!data)
                        goto end;
@@ -1323,7 +1267,7 @@ end:
 
 static irqreturn_t wbsd_irq(int irq, void *dev_id, struct pt_regs *regs)
 {
-       struct wbsd_hosthost = dev_id;
+       struct wbsd_host *host = dev_id;
        int isr;
 
        isr = inb(host->base + WBSD_ISR);
@@ -1365,10 +1309,10 @@ static irqreturn_t wbsd_irq(int irq, void *dev_id, struct pt_regs *regs)
  * Allocate/free MMC structure.
  */
 
-static int __devinit wbsd_alloc_mmc(struct devicedev)
+static int __devinit wbsd_alloc_mmc(struct device *dev)
 {
-       struct mmc_hostmmc;
-       struct wbsd_hosthost;
+       struct mmc_host *mmc;
+       struct wbsd_host *host;
 
        /*
         * Allocate MMC structure.
@@ -1388,7 +1332,7 @@ static int __devinit wbsd_alloc_mmc(struct device* dev)
        mmc->ops = &wbsd_ops;
        mmc->f_min = 375000;
        mmc->f_max = 24000000;
-       mmc->ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34;
+       mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
        mmc->caps = MMC_CAP_4_BIT_DATA;
 
        spin_lock_init(&host->lock);
@@ -1424,10 +1368,10 @@ static int __devinit wbsd_alloc_mmc(struct device* dev)
        return 0;
 }
 
-static void __devexit wbsd_free_mmc(struct devicedev)
+static void __devexit wbsd_free_mmc(struct device *dev)
 {
-       struct mmc_hostmmc;
-       struct wbsd_hosthost;
+       struct mmc_host *mmc;
+       struct wbsd_host *host;
 
        mmc = dev_get_drvdata(dev);
        if (!mmc)
@@ -1447,7 +1391,7 @@ static void __devexit wbsd_free_mmc(struct device* dev)
  * Scan for known chip id:s
  */
 
-static int __devinit wbsd_scan(struct wbsd_hosthost)
+static int __devinit wbsd_scan(struct wbsd_host *host)
 {
        int i, j, k;
        int id;
@@ -1477,16 +1421,14 @@ static int __devinit wbsd_scan(struct wbsd_host* host)
                        wbsd_lock_config(host);
 
                        for (k = 0; k < ARRAY_SIZE(valid_ids); k++) {
-                               if (id == valid_ids[k])
-                               {
+                               if (id == valid_ids[k]) {
                                        host->chip_id = id;
 
                                        return 0;
                                }
                        }
 
-                       if (id != 0xFFFF)
-                       {
+                       if (id != 0xFFFF) {
                                DBG("Unknown hardware (id %x) found at %x\n",
                                        id, config_ports[i]);
                        }
@@ -1505,7 +1447,7 @@ static int __devinit wbsd_scan(struct wbsd_host* host)
  * Allocate/free io port ranges
  */
 
-static int __devinit wbsd_request_region(struct wbsd_hosthost, int base)
+static int __devinit wbsd_request_region(struct wbsd_host *host, int base)
 {
        if (io & 0x7)
                return -EINVAL;
@@ -1518,7 +1460,7 @@ static int __devinit wbsd_request_region(struct wbsd_host* host, int base)
        return 0;
 }
 
-static void __devexit wbsd_release_regions(struct wbsd_hosthost)
+static void __devexit wbsd_release_regions(struct wbsd_host *host)
 {
        if (host->base)
                release_region(host->base, 8);
@@ -1535,7 +1477,7 @@ static void __devexit wbsd_release_regions(struct wbsd_host* host)
  * Allocate/free DMA port and buffer
  */
 
-static void __devinit wbsd_request_dma(struct wbsd_hosthost, int dma)
+static void __devinit wbsd_request_dma(struct wbsd_host *host, int dma)
 {
        if (dma < 0)
                return;
@@ -1579,8 +1521,8 @@ kfree:
         */
        BUG_ON(1);
 
-       dma_unmap_single(host->mmc->dev, host->dma_addr, WBSD_DMA_SIZE,
-               DMA_BIDIRECTIONAL);
+       dma_unmap_single(host->mmc->dev, host->dma_addr,
+               WBSD_DMA_SIZE, DMA_BIDIRECTIONAL);
        host->dma_addr = (dma_addr_t)NULL;
 
        kfree(host->dma_buffer);
@@ -1594,11 +1536,12 @@ err:
                "Falling back on FIFO.\n", dma);
 }
 
-static void __devexit wbsd_release_dma(struct wbsd_hosthost)
+static void __devexit wbsd_release_dma(struct wbsd_host *host)
 {
-       if (host->dma_addr)
-               dma_unmap_single(host->mmc->dev, host->dma_addr, WBSD_DMA_SIZE,
-                       DMA_BIDIRECTIONAL);
+       if (host->dma_addr) {
+               dma_unmap_single(host->mmc->dev, host->dma_addr,
+                       WBSD_DMA_SIZE, DMA_BIDIRECTIONAL);
+       }
        kfree(host->dma_buffer);
        if (host->dma >= 0)
                free_dma(host->dma);
@@ -1612,7 +1555,7 @@ static void __devexit wbsd_release_dma(struct wbsd_host* host)
  * Allocate/free IRQ.
  */
 
-static int __devinit wbsd_request_irq(struct wbsd_hosthost, int irq)
+static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq)
 {
        int ret;
 
@@ -1629,17 +1572,23 @@ static int __devinit wbsd_request_irq(struct wbsd_host* host, int irq)
        /*
         * Set up tasklets.
         */
-       tasklet_init(&host->card_tasklet, wbsd_tasklet_card, (unsigned long)host);
-       tasklet_init(&host->fifo_tasklet, wbsd_tasklet_fifo, (unsigned long)host);
-       tasklet_init(&host->crc_tasklet, wbsd_tasklet_crc, (unsigned long)host);
-       tasklet_init(&host->timeout_tasklet, wbsd_tasklet_timeout, (unsigned long)host);
-       tasklet_init(&host->finish_tasklet, wbsd_tasklet_finish, (unsigned long)host);
-       tasklet_init(&host->block_tasklet, wbsd_tasklet_block, (unsigned long)host);
+       tasklet_init(&host->card_tasklet, wbsd_tasklet_card,
+                       (unsigned long)host);
+       tasklet_init(&host->fifo_tasklet, wbsd_tasklet_fifo,
+                       (unsigned long)host);
+       tasklet_init(&host->crc_tasklet, wbsd_tasklet_crc,
+                       (unsigned long)host);
+       tasklet_init(&host->timeout_tasklet, wbsd_tasklet_timeout,
+                       (unsigned long)host);
+       tasklet_init(&host->finish_tasklet, wbsd_tasklet_finish,
+                       (unsigned long)host);
+       tasklet_init(&host->block_tasklet, wbsd_tasklet_block,
+                       (unsigned long)host);
 
        return 0;
 }
 
-static void __devexit wbsd_release_irq(struct wbsd_hosthost)
+static void __devexit wbsd_release_irq(struct wbsd_host *host)
 {
        if (!host->irq)
                return;
@@ -1660,7 +1609,7 @@ static void __devexit wbsd_release_irq(struct wbsd_host* host)
  * Allocate all resources for the host.
  */
 
-static int __devinit wbsd_request_resources(struct wbsd_hosthost,
+static int __devinit wbsd_request_resources(struct wbsd_host *host,
        int base, int irq, int dma)
 {
        int ret;
@@ -1691,7 +1640,7 @@ static int __devinit wbsd_request_resources(struct wbsd_host* host,
  * Release all resources for the host.
  */
 
-static void __devexit wbsd_release_resources(struct wbsd_hosthost)
+static void __devexit wbsd_release_resources(struct wbsd_host *host)
 {
        wbsd_release_dma(host);
        wbsd_release_irq(host);
@@ -1702,7 +1651,7 @@ static void __devexit wbsd_release_resources(struct wbsd_host* host)
  * Configure the resources the chip should use.
  */
 
-static void wbsd_chip_config(struct wbsd_hosthost)
+static void wbsd_chip_config(struct wbsd_host *host)
 {
        wbsd_unlock_config(host);
 
@@ -1746,7 +1695,7 @@ static void wbsd_chip_config(struct wbsd_host* host)
  * Check that configured resources are correct.
  */
 
-static int wbsd_chip_validate(struct wbsd_hosthost)
+static int wbsd_chip_validate(struct wbsd_host *host)
 {
        int base, irq, dma;
 
@@ -1786,7 +1735,7 @@ static int wbsd_chip_validate(struct wbsd_host* host)
  * Powers down the SD function
  */
 
-static void wbsd_chip_poweroff(struct wbsd_hosthost)
+static void wbsd_chip_poweroff(struct wbsd_host *host)
 {
        wbsd_unlock_config(host);
 
@@ -1802,11 +1751,11 @@ static void wbsd_chip_poweroff(struct wbsd_host* host)
  *                                                                           *
 \*****************************************************************************/
 
-static int __devinit wbsd_init(struct devicedev, int base, int irq, int dma,
+static int __devinit wbsd_init(struct device *dev, int base, int irq, int dma,
        int pnp)
 {
-       struct wbsd_hosthost = NULL;
-       struct mmc_hostmmc = NULL;
+       struct wbsd_host *host = NULL;
+       struct mmc_host *mmc = NULL;
        int ret;
 
        ret = wbsd_alloc_mmc(dev);
@@ -1820,16 +1769,12 @@ static int __devinit wbsd_init(struct device* dev, int base, int irq, int dma,
         * Scan for hardware.
         */
        ret = wbsd_scan(host);
-       if (ret)
-       {
-               if (pnp && (ret == -ENODEV))
-               {
+       if (ret) {
+               if (pnp && (ret == -ENODEV)) {
                        printk(KERN_WARNING DRIVER_NAME
                                ": Unable to confirm device presence. You may "
                                "experience lock-ups.\n");
-               }
-               else
-               {
+               } else {
                        wbsd_free_mmc(dev);
                        return ret;
                }
@@ -1839,8 +1784,7 @@ static int __devinit wbsd_init(struct device* dev, int base, int irq, int dma,
         * Request resources.
         */
        ret = wbsd_request_resources(host, io, irq, dma);
-       if (ret)
-       {
+       if (ret) {
                wbsd_release_resources(host);
                wbsd_free_mmc(dev);
                return ret;
@@ -1849,18 +1793,15 @@ static int __devinit wbsd_init(struct device* dev, int base, int irq, int dma,
        /*
         * See if chip needs to be configured.
         */
-       if (pnp)
-       {
-               if ((host->config != 0) && !wbsd_chip_validate(host))
-               {
+       if (pnp) {
+               if ((host->config != 0) && !wbsd_chip_validate(host)) {
                        printk(KERN_WARNING DRIVER_NAME
                                ": PnP active but chip not configured! "
                                "You probably have a buggy BIOS. "
                                "Configuring chip manually.\n");
                        wbsd_chip_config(host);
                }
-       }
-       else
+       } else
                wbsd_chip_config(host);
 
        /*
@@ -1868,8 +1809,7 @@ static int __devinit wbsd_init(struct device* dev, int base, int irq, int dma,
         * Not tested.
         */
 #ifdef CONFIG_PM
-       if (host->config)
-       {
+       if (host->config) {
                wbsd_unlock_config(host);
                wbsd_write_config(host, WBSD_CONF_PME, 0xA0);
                wbsd_lock_config(host);
@@ -1902,10 +1842,10 @@ static int __devinit wbsd_init(struct device* dev, int base, int irq, int dma,
        return 0;
 }
 
-static void __devexit wbsd_shutdown(struct devicedev, int pnp)
+static void __devexit wbsd_shutdown(struct device *dev, int pnp)
 {
-       struct mmc_hostmmc = dev_get_drvdata(dev);
-       struct wbsd_hosthost;
+       struct mmc_host *mmc = dev_get_drvdata(dev);
+       struct wbsd_host *host;
 
        if (!mmc)
                return;
@@ -1929,12 +1869,12 @@ static void __devexit wbsd_shutdown(struct device* dev, int pnp)
  * Non-PnP
  */
 
-static int __devinit wbsd_probe(struct platform_devicedev)
+static int __devinit wbsd_probe(struct platform_device *dev)
 {
        return wbsd_init(&dev->dev, io, irq, dma, 0);
 }
 
-static int __devexit wbsd_remove(struct platform_devicedev)
+static int __devexit wbsd_remove(struct platform_device *dev)
 {
        wbsd_shutdown(&dev->dev, 0);
 
@@ -1948,7 +1888,7 @@ static int __devexit wbsd_remove(struct platform_device* dev)
 #ifdef CONFIG_PNP
 
 static int __devinit
-wbsd_pnp_probe(struct pnp_dev * pnpdev, const struct pnp_device_id *dev_id)
+wbsd_pnp_probe(struct pnp_dev *pnpdev, const struct pnp_device_id *dev_id)
 {
        int io, irq, dma;
 
@@ -1967,7 +1907,7 @@ wbsd_pnp_probe(struct pnp_dev * pnpdev, const struct pnp_device_id *dev_id)
        return wbsd_init(&pnpdev->dev, io, irq, dma, 1);
 }
 
-static void __devexit wbsd_pnp_remove(struct pnp_dev * dev)
+static void __devexit wbsd_pnp_remove(struct pnp_dev *dev)
 {
        wbsd_shutdown(&dev->dev, 1);
 }
@@ -1980,37 +1920,54 @@ static void __devexit wbsd_pnp_remove(struct pnp_dev * dev)
 
 #ifdef CONFIG_PM
 
-static int wbsd_suspend(struct platform_device *dev, pm_message_t state)
+static int wbsd_suspend(struct wbsd_host *host, pm_message_t state)
+{
+       BUG_ON(host == NULL);
+
+       return mmc_suspend_host(host->mmc, state);
+}
+
+static int wbsd_resume(struct wbsd_host *host)
+{
+       BUG_ON(host == NULL);
+
+       wbsd_init_device(host);
+
+       return mmc_resume_host(host->mmc);
+}
+
+static int wbsd_platform_suspend(struct platform_device *dev,
+                                pm_message_t state)
 {
        struct mmc_host *mmc = platform_get_drvdata(dev);
        struct wbsd_host *host;
        int ret;
 
-       if (!mmc)
+       if (mmc == NULL)
                return 0;
 
-       DBG("Suspending...\n");
-
-       ret = mmc_suspend_host(mmc, state);
-       if (!ret)
-               return ret;
+       DBGF("Suspending...\n");
 
        host = mmc_priv(mmc);
 
+       ret = wbsd_suspend(host, state);
+       if (ret)
+               return ret;
+
        wbsd_chip_poweroff(host);
 
        return 0;
 }
 
-static int wbsd_resume(struct platform_device *dev)
+static int wbsd_platform_resume(struct platform_device *dev)
 {
        struct mmc_host *mmc = platform_get_drvdata(dev);
        struct wbsd_host *host;
 
-       if (!mmc)
+       if (mmc == NULL)
                return 0;
 
-       DBG("Resuming...\n");
+       DBGF("Resuming...\n");
 
        host = mmc_priv(mmc);
 
@@ -2021,15 +1978,68 @@ static int wbsd_resume(struct platform_device *dev)
         */
        mdelay(5);
 
-       wbsd_init_device(host);
+       return wbsd_resume(host);
+}
+
+#ifdef CONFIG_PNP
+
+static int wbsd_pnp_suspend(struct pnp_dev *pnp_dev, pm_message_t state)
+{
+       struct mmc_host *mmc = dev_get_drvdata(&pnp_dev->dev);
+       struct wbsd_host *host;
+
+       if (mmc == NULL)
+               return 0;
+
+       DBGF("Suspending...\n");
+
+       host = mmc_priv(mmc);
+
+       return wbsd_suspend(host, state);
+}
+
+static int wbsd_pnp_resume(struct pnp_dev *pnp_dev)
+{
+       struct mmc_host *mmc = dev_get_drvdata(&pnp_dev->dev);
+       struct wbsd_host *host;
+
+       if (mmc == NULL)
+               return 0;
+
+       DBGF("Resuming...\n");
 
-       return mmc_resume_host(mmc);
+       host = mmc_priv(mmc);
+
+       /*
+        * See if chip needs to be configured.
+        */
+       if (host->config != 0) {
+               if (!wbsd_chip_validate(host)) {
+                       printk(KERN_WARNING DRIVER_NAME
+                               ": PnP active but chip not configured! "
+                               "You probably have a buggy BIOS. "
+                               "Configuring chip manually.\n");
+                       wbsd_chip_config(host);
+               }
+       }
+
+       /*
+        * Allow device to initialise itself properly.
+        */
+       mdelay(5);
+
+       return wbsd_resume(host);
 }
 
+#endif /* CONFIG_PNP */
+
 #else /* CONFIG_PM */
 
-#define wbsd_suspend NULL
-#define wbsd_resume NULL
+#define wbsd_platform_suspend NULL
+#define wbsd_platform_resume NULL
+
+#define wbsd_pnp_suspend NULL
+#define wbsd_pnp_resume NULL
 
 #endif /* CONFIG_PM */
 
@@ -2039,8 +2049,8 @@ static struct platform_driver wbsd_driver = {
        .probe          = wbsd_probe,
        .remove         = __devexit_p(wbsd_remove),
 
-       .suspend        = wbsd_suspend,
-       .resume         = wbsd_resume,
+       .suspend        = wbsd_platform_suspend,
+       .resume         = wbsd_platform_resume,
        .driver         = {
                .name   = DRIVER_NAME,
        },
@@ -2053,6 +2063,9 @@ static struct pnp_driver wbsd_pnp_driver = {
        .id_table       = pnp_dev_table,
        .probe          = wbsd_pnp_probe,
        .remove         = __devexit_p(wbsd_pnp_remove),
+
+       .suspend        = wbsd_pnp_suspend,
+       .resume         = wbsd_pnp_resume,
 };
 
 #endif /* CONFIG_PNP */
@@ -2072,31 +2085,26 @@ static int __init wbsd_drv_init(void)
 
 #ifdef CONFIG_PNP
 
-       if (!nopnp)
-       {
+       if (!nopnp) {
                result = pnp_register_driver(&wbsd_pnp_driver);
                if (result < 0)
                        return result;
        }
-
 #endif /* CONFIG_PNP */
 
-       if (nopnp)
-       {
+       if (nopnp) {
                result = platform_driver_register(&wbsd_driver);
                if (result < 0)
                        return result;
 
                wbsd_device = platform_device_alloc(DRIVER_NAME, -1);
-               if (!wbsd_device)
-               {
+               if (!wbsd_device) {
                        platform_driver_unregister(&wbsd_driver);
                        return -ENOMEM;
                }
 
                result = platform_device_add(wbsd_device);
-               if (result)
-               {
+               if (result) {
                        platform_device_put(wbsd_device);
                        platform_driver_unregister(&wbsd_driver);
                        return result;
@@ -2115,8 +2123,7 @@ static void __exit wbsd_drv_exit(void)
 
 #endif /* CONFIG_PNP */
 
-       if (nopnp)
-       {
+       if (nopnp) {
                platform_device_unregister(wbsd_device);
 
                platform_driver_unregister(&wbsd_driver);
index b9b77cf39a18af4460f85c1e13d514da0c9f8848..7abd7fee0ddaa669b64f167e587c6e3a8ab7aacf 100644 (file)
@@ -473,14 +473,6 @@ config MTD_IXP2000
          IXDP425 and Coyote. If you have an IXP2000 based board and
          would like to use the flash chips on it, say 'Y'.
 
-config MTD_EPXA10DB
-       tristate "CFI Flash device mapped on Epxa10db"
-       depends on MTD_CFI && MTD_PARTITIONS && ARCH_CAMELOT
-       help
-         This enables support for the flash devices on the Altera
-         Excalibur XA10 Development Board. If you are building a kernel
-         for on of these boards then you should say 'Y' otherwise say 'N'.
-
 config MTD_FORTUNET
        tristate "CFI Flash device mapped on the FortuNet board"
        depends on MTD_CFI && MTD_PARTITIONS && SA1100_FORTUNET
index 2f7e254912f0f21126df4703e55b9d8d0b612618..ab71f172eb7700c3ffb45b1ac7ad85139f9cf345 100644 (file)
@@ -15,7 +15,6 @@ obj-$(CONFIG_MTD_CFI_FLAGADM) += cfi_flagadm.o
 obj-$(CONFIG_MTD_CSTM_MIPS_IXX)        += cstm_mips_ixx.o
 obj-$(CONFIG_MTD_DC21285)      += dc21285.o
 obj-$(CONFIG_MTD_DILNETPC)     += dilnetpc.o
-obj-$(CONFIG_MTD_EPXA10DB)     += epxa10db-flash.o
 obj-$(CONFIG_MTD_IQ80310)      += iq80310.o
 obj-$(CONFIG_MTD_L440GX)       += l440gx.o
 obj-$(CONFIG_MTD_AMD76XROM)    += amd76xrom.o
diff --git a/drivers/mtd/maps/epxa10db-flash.c b/drivers/mtd/maps/epxa10db-flash.c
deleted file mode 100644 (file)
index 265b079..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Flash memory access on EPXA based devices
- *
- * (C) 2000 Nicolas Pitre <nico@cam.org>
- *  Copyright (C) 2001 Altera Corporation
- *  Copyright (C) 2001 Red Hat, Inc.
- *
- * $Id: epxa10db-flash.c,v 1.15 2005/11/07 11:14:27 gleixner Exp $
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/slab.h>
-
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/map.h>
-#include <linux/mtd/partitions.h>
-
-#include <asm/io.h>
-#include <asm/hardware.h>
-
-#ifdef CONFIG_EPXA10DB
-#define BOARD_NAME "EPXA10DB"
-#else
-#define BOARD_NAME "EPXA1DB"
-#endif
-
-static int nr_parts = 0;
-static struct mtd_partition *parts;
-
-static struct mtd_info *mymtd;
-
-static int epxa_default_partitions(struct mtd_info *master, struct mtd_partition **pparts);
-
-
-static struct map_info epxa_map = {
-       .name =         "EPXA flash",
-       .size =         FLASH_SIZE,
-       .bankwidth =    2,
-       .phys =         FLASH_START,
-};
-
-static const char *probes[] = { "RedBoot", "afs", NULL };
-
-static int __init epxa_mtd_init(void)
-{
-       int i;
-
-       printk(KERN_NOTICE "%s flash device: 0x%x at 0x%x\n", BOARD_NAME, FLASH_SIZE, FLASH_START);
-
-       epxa_map.virt = ioremap(FLASH_START, FLASH_SIZE);
-       if (!epxa_map.virt) {
-               printk("Failed to ioremap %s flash\n",BOARD_NAME);
-               return -EIO;
-       }
-       simple_map_init(&epxa_map);
-
-       mymtd = do_map_probe("cfi_probe", &epxa_map);
-       if (!mymtd) {
-               iounmap((void *)epxa_map.virt);
-               return -ENXIO;
-       }
-
-       mymtd->owner = THIS_MODULE;
-
-       /* Unlock the flash device. */
-       if(mymtd->unlock){
-               for (i=0; i<mymtd->numeraseregions;i++){
-                       int j;
-                       for(j=0;j<mymtd->eraseregions[i].numblocks;j++){
-                               mymtd->unlock(mymtd,mymtd->eraseregions[i].offset + j * mymtd->eraseregions[i].erasesize,mymtd->eraseregions[i].erasesize);
-                       }
-               }
-       }
-
-#ifdef CONFIG_MTD_PARTITIONS
-       nr_parts = parse_mtd_partitions(mymtd, probes, &parts, 0);
-
-       if (nr_parts > 0) {
-               add_mtd_partitions(mymtd, parts, nr_parts);
-               return 0;
-       }
-#endif
-       /* No recognised partitioning schemes found - use defaults */
-       nr_parts = epxa_default_partitions(mymtd, &parts);
-       if (nr_parts > 0) {
-               add_mtd_partitions(mymtd, parts, nr_parts);
-               return 0;
-       }
-
-       /* If all else fails... */
-       add_mtd_device(mymtd);
-       return 0;
-}
-
-static void __exit epxa_mtd_cleanup(void)
-{
-       if (mymtd) {
-               if (nr_parts)
-                       del_mtd_partitions(mymtd);
-               else
-                       del_mtd_device(mymtd);
-               map_destroy(mymtd);
-       }
-       if (epxa_map.virt) {
-               iounmap((void *)epxa_map.virt);
-               epxa_map.virt = 0;
-       }
-}
-
-
-/*
- * This will do for now, once we decide which bootldr we're finally
- * going to use then we'll remove this function and do it properly
- *
- * Partions are currently (as offsets from base of flash):
- * 0x00000000 - 0x003FFFFF - bootloader (!)
- * 0x00400000 - 0x00FFFFFF - Flashdisk
- */
-
-static int __init epxa_default_partitions(struct mtd_info *master, struct mtd_partition **pparts)
-{
-       struct mtd_partition *parts;
-       int ret, i;
-       int npartitions = 0;
-       char *names;
-       const char *name = "jffs";
-
-       printk("Using default partitions for %s\n",BOARD_NAME);
-       npartitions=1;
-       parts = kmalloc(npartitions*sizeof(*parts)+strlen(name), GFP_KERNEL);
-       memzero(parts,npartitions*sizeof(*parts)+strlen(name));
-       if (!parts) {
-               ret = -ENOMEM;
-               goto out;
-       }
-       i=0;
-       names = (char *)&parts[npartitions];
-       parts[i].name = names;
-       names += strlen(name) + 1;
-       strcpy(parts[i].name, name);
-
-#ifdef CONFIG_EPXA10DB
-       parts[i].size = FLASH_SIZE-0x00400000;
-       parts[i].offset = 0x00400000;
-#else
-       parts[i].size = FLASH_SIZE-0x00180000;
-       parts[i].offset = 0x00180000;
-#endif
-
- out:
-       *pparts = parts;
-       return npartitions;
-}
-
-
-module_init(epxa_mtd_init);
-module_exit(epxa_mtd_cleanup);
-
-MODULE_AUTHOR("Clive Davies");
-MODULE_DESCRIPTION("Altera epxa mtd flash map");
-MODULE_LICENSE("GPL");
index 733bc25b2bf96ea64513cf4a71a3d4cab71aaee2..4959800a18d76534b6e31c4ade1fa2f8670d0060 100644 (file)
@@ -27,6 +27,19 @@ config NETDEVICES
 # that for each of the symbols.
 if NETDEVICES
 
+config IFB
+       tristate "Intermediate Functional Block support"
+       depends on NET_CLS_ACT
+       ---help---
+         This is an intermidiate driver that allows sharing of
+         resources.
+         To compile this driver as a module, choose M here: the module
+         will be called ifb.  If you want to use more than one ifb
+         device at a time, you need to compile this driver as a module.
+         Instead of 'ifb', the devices will then be called 'ifb0',
+         'ifb1' etc.
+         Look at the iproute2 documentation directory for usage etc
+
 config DUMMY
        tristate "Dummy net driver support"
        ---help---
index b74a7cb5bae6e163c518199e28eb6269b5dc15d5..00e72b12fb922516857ddb242c22bd0483672f80 100644 (file)
@@ -125,6 +125,7 @@ ifeq ($(CONFIG_SLIP_COMPRESSED),y)
 endif
 
 obj-$(CONFIG_DUMMY) += dummy.o
+obj-$(CONFIG_IFB) += ifb.o
 obj-$(CONFIG_DE600) += de600.o
 obj-$(CONFIG_DE620) += de620.o
 obj-$(CONFIG_LANCE) += lance.o
index 470364deded08c8701aff33582f16f30728047df..625184b65e3832922eaee7e02c1bd48ee738e76a 100644 (file)
@@ -31,16 +31,3 @@ config ARM_ETHERH
        help
          If you have an Acorn system with one of these network cards, you
          should say Y to this option if you wish to use it with Linux.
-
-config ARM_ETHER00
-       tristate "Altera Ether00 support"
-       depends on NET_ETHERNET && ARM && ARCH_CAMELOT
-       help
-         This is the driver for Altera's ether00 ethernet mac IP core. Say
-         Y here if you want to build support for this into the kernel. It
-         is also available as a module (say M here) that can be inserted/
-         removed from the kernel at the same time as the PLD is configured.
-         If this driver is running on an epxa10 development board then it
-         will generate a suitable hw address based on the board serial
-         number (MTD support is required for this). Otherwise you will
-         need to set a suitable hw address using ifconfig.
index b0d706834d895f4dea7c1ac92e39d95607f0ca88..bc263edf06a7aa03024a81c9b7a62d3eb94ec00f 100644 (file)
@@ -4,7 +4,6 @@
 #
 
 obj-$(CONFIG_ARM_AM79C961A)    += am79c961a.o
-obj-$(CONFIG_ARM_ETHER00)      += ether00.o
 obj-$(CONFIG_ARM_ETHERH)       += etherh.o
 obj-$(CONFIG_ARM_ETHER3)       += ether3.o
 obj-$(CONFIG_ARM_ETHER1)       += ether1.o
index 877891a29aaac297fcf88542c8ea6159d97f1377..53e3afc1b7b7c865c850906d4601865fe33ae49d 100644 (file)
@@ -668,9 +668,8 @@ static void __init am79c961_banner(void)
                printk(KERN_INFO "%s", version);
 }
 
-static int __init am79c961_probe(struct device *_dev)
+static int __init am79c961_probe(struct platform_device *pdev)
 {
-       struct platform_device *pdev = to_platform_device(_dev);
        struct resource *res;
        struct net_device *dev;
        struct dev_priv *priv;
@@ -758,15 +757,16 @@ out:
        return ret;
 }
 
-static struct device_driver am79c961_driver = {
-       .name           = "am79c961",
-       .bus            = &platform_bus_type,
+static struct platform_driver am79c961_driver = {
        .probe          = am79c961_probe,
+       .driver         = {
+               .name   = "am79c961",
+       },
 };
 
 static int __init am79c961_init(void)
 {
-       return driver_register(&am79c961_driver);
+       return platform_driver_register(&am79c961_driver);
 }
 
 __initcall(am79c961_init);
diff --git a/drivers/net/arm/ether00.c b/drivers/net/arm/ether00.c
deleted file mode 100644 (file)
index 4f1f4e3..0000000
+++ /dev/null
@@ -1,1017 +0,0 @@
-/*
- *  drivers/net/ether00.c
- *
- *  Copyright (C) 2001 Altera Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-/* includes */
-#include <linux/config.h>
-#include <linux/pci.h>
-#include <linux/sched.h>
-#include <linux/netdevice.h>
-#include <linux/skbuff.h>
-#include <linux/etherdevice.h>
-#include <linux/module.h>
-#include <linux/tqueue.h>
-#include <linux/mtd/mtd.h>
-#include <linux/pld/pld_hotswap.h>
-#include <asm/arch/excalibur.h>
-#include <asm/arch/hardware.h>
-#include <asm/irq.h>
-#include <asm/io.h>
-#include <asm/sizes.h>
-
-#include <asm/arch/ether00.h>
-#include <asm/arch/tdkphy.h>
-
-
-MODULE_AUTHOR("Clive Davies");
-MODULE_DESCRIPTION("Altera Ether00 IP core driver");
-MODULE_LICENSE("GPL");
-
-#define PKT_BUF_SZ 1540 /* Size of each rx buffer */
-#define ETH_NR 4 /* Number of MACs this driver supports */
-
-#define DEBUG(x)
-
-#define __dma_va(x) (unsigned int)((unsigned int)priv->dma_data+(((unsigned int)(x))&(EXC_SPSRAM_BLOCK0_SIZE-1)))
-#define __dma_pa(x) (unsigned int)(EXC_SPSRAM_BLOCK0_BASE+(((unsigned int)(x))-(unsigned int)priv->dma_data))
-
-#define ETHER00_BASE   0
-#define        ETHER00_TYPE
-#define ETHER00_NAME "ether00"
-#define MAC_REG_SIZE 0x400 /* size of MAC register area */
-
-
-
-/* typedefs */
-
-/* The definition of the driver control structure */
-
-#define RX_NUM_BUFF     10
-#define RX_NUM_FDESC    10
-#define TX_NUM_FDESC    10
-
-struct tx_fda_ent{
-       FDA_DESC  fd;
-       BUF_DESC  bd;
-       BUF_DESC  pad;
-};
-struct rx_fda_ent{
-       FDA_DESC  fd;
-       BUF_DESC  bd;
-       BUF_DESC  pad;
-};
-struct rx_blist_ent{
-       FDA_DESC  fd;
-       BUF_DESC  bd;
-       BUF_DESC  pad;
-};
-struct net_priv
-{
-       struct net_device_stats stats;
-       struct sk_buff* skb;
-       void* dma_data;
-       struct rx_blist_ent*  rx_blist_vp;
-       struct rx_fda_ent* rx_fda_ptr;
-       struct tx_fda_ent* tx_fdalist_vp;
-       struct tq_struct  tq_memupdate;
-       unsigned char   memupdate_scheduled;
-       unsigned char   rx_disabled;
-       unsigned char   queue_stopped;
-       spinlock_t rx_lock;
-};
-
-static const char vendor_id[2]={0x07,0xed};
-
-#ifdef ETHER00_DEBUG
-
-/* Dump (most) registers for debugging puposes */
-
-static void dump_regs(struct net_device *dev){
-       struct net_priv* priv=dev->priv;
-       unsigned int* i;
-
-       printk("\n RX free descriptor area:\n");
-
-       for(i=(unsigned int*)priv->rx_fda_ptr;
-           i<((unsigned int*)(priv->rx_fda_ptr+RX_NUM_FDESC));){
-               printk("%#8x %#8x %#8x %#8x\n",*i,*(i+1),*(i+2),*(i+3));
-               i+=4;
-       }
-
-       printk("\n RX buffer list:\n");
-
-       for(i=(unsigned int*)priv->rx_blist_vp;
-           i<((unsigned int*)(priv->rx_blist_vp+RX_NUM_BUFF));){
-               printk("%#8x %#8x %#8x %#8x\n",*i,*(i+1),*(i+2),*(i+3));
-               i+=4;
-       }
-
-       printk("\n TX frame descriptor list:\n");
-
-       for(i=(unsigned int*)priv->tx_fdalist_vp;
-           i<((unsigned int*)(priv->tx_fdalist_vp+TX_NUM_FDESC));){
-               printk("%#8x %#8x %#8x %#8x\n",*i,*(i+1),*(i+2),*(i+3));
-               i+=4;
-       }
-
-       printk("\ndma ctl=%#x\n",readw(ETHER_DMA_CTL(dev->base_addr)));
-       printk("txfrmptr=%#x\n",readw(ETHER_TXFRMPTR(dev->base_addr)));
-       printk("txthrsh=%#x\n",readw(ETHER_TXTHRSH(dev->base_addr)));
-       printk("txpollctr=%#x\n",readw(ETHER_TXPOLLCTR(dev->base_addr)));
-       printk("blfrmptr=%#x\n",readw(ETHER_BLFRMPTR(dev->base_addr)));
-       printk("rxfragsize=%#x\n",readw(ETHER_RXFRAGSIZE(dev->base_addr)));
-       printk("tx_int_en=%#x\n",readw(ETHER_INT_EN(dev->base_addr)));
-       printk("fda_bas=%#x\n",readw(ETHER_FDA_BAS(dev->base_addr)));
-       printk("fda_lim=%#x\n",readw(ETHER_FDA_LIM(dev->base_addr)));
-       printk("int_src=%#x\n",readw(ETHER_INT_SRC(dev->base_addr)));
-       printk("pausecnt=%#x\n",readw(ETHER_PAUSECNT(dev->base_addr)));
-       printk("rempaucnt=%#x\n",readw(ETHER_REMPAUCNT(dev->base_addr)));
-       printk("txconfrmstat=%#x\n",readw(ETHER_TXCONFRMSTAT(dev->base_addr)));
-       printk("mac_ctl=%#x\n",readw(ETHER_MAC_CTL(dev->base_addr)));
-       printk("arc_ctl=%#x\n",readw(ETHER_ARC_CTL(dev->base_addr)));
-       printk("tx_ctl=%#x\n",readw(ETHER_TX_CTL(dev->base_addr)));
-}
-#endif /* ETHER00_DEBUG */
-
-
-static int ether00_write_phy(struct net_device *dev, short address, short value)
-{
-       volatile int count = 1024;
-       writew(value,ETHER_MD_DATA(dev->base_addr));
-       writew( ETHER_MD_CA_BUSY_MSK |
-               ETHER_MD_CA_WR_MSK |
-               (address & ETHER_MD_CA_ADDR_MSK),
-               ETHER_MD_CA(dev->base_addr));
-
-       /* Wait for the command to complete */
-       while((readw(ETHER_MD_CA(dev->base_addr)) & ETHER_MD_CA_BUSY_MSK)&&count){
-               count--;
-       }
-       if (!count){
-               printk("Write to phy failed, addr=%#x, data=%#x\n",address, value);
-               return -EIO;
-       }
-       return 0;
-}
-
-static int ether00_read_phy(struct net_device *dev, short address)
-{
-       volatile int count = 1024;
-       writew( ETHER_MD_CA_BUSY_MSK |
-               (address & ETHER_MD_CA_ADDR_MSK),
-               ETHER_MD_CA(dev->base_addr));
-
-       /* Wait for the command to complete */
-       while((readw(ETHER_MD_CA(dev->base_addr)) & ETHER_MD_CA_BUSY_MSK)&&count){
-               count--;
-       }
-       if (!count){
-               printk(KERN_WARNING "Read from phy timed out\n");
-               return -EIO;
-       }
-       return readw(ETHER_MD_DATA(dev->base_addr));
-}
-
-static void ether00_phy_int(int irq_num, void* dev_id, struct pt_regs* regs)
-{
-       struct net_device* dev=dev_id;
-       int irq_status;
-
-       irq_status=ether00_read_phy(dev, PHY_IRQ_CONTROL);
-
-       if(irq_status & PHY_IRQ_CONTROL_ANEG_COMP_INT_MSK){
-               /*
-                * Autonegotiation complete on epxa10db. The mac doesn't
-                * twig if we're in full duplex so we need to check the
-                * phy status register and configure the mac accordingly
-                */
-               if(ether00_read_phy(dev, PHY_STATUS)&(PHY_STATUS_10T_F_MSK|PHY_STATUS_100_X_F_MSK)){
-                       int tmp;
-                       tmp=readl(ETHER_MAC_CTL(dev->base_addr));
-                       writel(tmp|ETHER_MAC_CTL_FULLDUP_MSK,ETHER_MAC_CTL(dev->base_addr));
-               }
-       }
-
-       if(irq_status&PHY_IRQ_CONTROL_LS_CHG_INT_MSK){
-
-               if(ether00_read_phy(dev, PHY_STATUS)& PHY_STATUS_LINK_MSK){
-                       /* Link is up */
-                       netif_carrier_on(dev);
-                       //printk("Carrier on\n");
-               }else{
-                       netif_carrier_off(dev);
-                       //printk("Carrier off\n");
-
-               }
-       }
-
-}
-
-static void setup_blist_entry(struct sk_buff* skb,struct rx_blist_ent* blist_ent_ptr){
-       /* Make the buffer consistent with the cache as the mac is going to write
-        * directly into it*/
-       blist_ent_ptr->fd.FDSystem=(unsigned int)skb;
-       blist_ent_ptr->bd.BuffData=(char*)__pa(skb->data);
-       consistent_sync(skb->data,PKT_BUF_SZ,PCI_DMA_FROMDEVICE);
-        /* align IP on 16 Byte (DMA_CTL set to skip 2 bytes) */
-       skb_reserve(skb,2);
-       blist_ent_ptr->bd.BuffLength=PKT_BUF_SZ-2;
-       blist_ent_ptr->fd.FDLength=1;
-       blist_ent_ptr->fd.FDCtl=FDCTL_COWNSFD_MSK;
-       blist_ent_ptr->bd.BDCtl=BDCTL_COWNSBD_MSK;
-}
-
-
-static int ether00_mem_init(struct net_device* dev)
-{
-       struct net_priv* priv=dev->priv;
-       struct tx_fda_ent *tx_fd_ptr,*tx_end_ptr;
-       struct rx_blist_ent* blist_ent_ptr;
-       int i;
-
-       /*
-        * Grab a block of on chip SRAM to contain the control stuctures for
-        * the ethernet MAC. This uncached becuase it needs to be accesses by both
-        * bus masters (cpu + mac). However, it shouldn't matter too much in terms
-        * of speed as its on chip memory
-        */
-       priv->dma_data=ioremap_nocache(EXC_SPSRAM_BLOCK0_BASE,EXC_SPSRAM_BLOCK0_SIZE );
-       if (!priv->dma_data)
-               return -ENOMEM;
-
-       priv->rx_fda_ptr=(struct rx_fda_ent*)priv->dma_data;
-       /*
-        * Now share it out amongst the Frame descriptors and the buffer list
-        */
-       priv->rx_blist_vp=(struct rx_blist_ent*)((unsigned int)priv->dma_data+RX_NUM_FDESC*sizeof(struct rx_fda_ent));
-
-       /*
-        *Initalise the FDA list
-        */
-       /* set ownership to the controller */
-       memset(priv->rx_fda_ptr,0x80,RX_NUM_FDESC*sizeof(struct rx_fda_ent));
-
-       /*
-        *Initialise the buffer list
-        */
-       blist_ent_ptr=priv->rx_blist_vp;
-       i=0;
-       while(blist_ent_ptr<(priv->rx_blist_vp+RX_NUM_BUFF)){
-               struct sk_buff *skb;
-               blist_ent_ptr->fd.FDLength=1;
-               skb=dev_alloc_skb(PKT_BUF_SZ);
-               if(skb){
-                       setup_blist_entry(skb,blist_ent_ptr);
-                       blist_ent_ptr->fd.FDNext=(FDA_DESC*)__dma_pa(blist_ent_ptr+1);
-                       blist_ent_ptr->bd.BDStat=i++;
-                       blist_ent_ptr++;
-               }
-               else
-               {
-                       printk("Failed to initalise buffer list\n");
-               }
-
-       }
-       blist_ent_ptr--;
-       blist_ent_ptr->fd.FDNext=(FDA_DESC*)__dma_pa(priv->rx_blist_vp);
-
-       priv->tx_fdalist_vp=(struct tx_fda_ent*)(priv->rx_blist_vp+RX_NUM_BUFF);
-
-       /* Initialise the buffers to be a circular list. The mac will then go poll
-        * the list until it finds a frame ready to transmit */
-       tx_end_ptr=priv->tx_fdalist_vp+TX_NUM_FDESC;
-       for(tx_fd_ptr=priv->tx_fdalist_vp;tx_fd_ptr<tx_end_ptr;tx_fd_ptr++){
-               tx_fd_ptr->fd.FDNext=(FDA_DESC*)__dma_pa((tx_fd_ptr+1));
-               tx_fd_ptr->fd.FDCtl=1;
-               tx_fd_ptr->fd.FDStat=0;
-               tx_fd_ptr->fd.FDLength=1;
-
-       }
-       /* Change the last FDNext pointer to make a circular list */
-       tx_fd_ptr--;
-       tx_fd_ptr->fd.FDNext=(FDA_DESC*)__dma_pa(priv->tx_fdalist_vp);
-
-       /* Point the device at the chain of Rx and Tx Buffers */
-       writel((unsigned int)__dma_pa(priv->rx_fda_ptr),ETHER_FDA_BAS(dev->base_addr));
-       writel((RX_NUM_FDESC-1)*sizeof(struct rx_fda_ent),ETHER_FDA_LIM(dev->base_addr));
-       writel((unsigned int)__dma_pa(priv->rx_blist_vp),ETHER_BLFRMPTR(dev->base_addr));
-
-       writel((unsigned int)__dma_pa(priv->tx_fdalist_vp),ETHER_TXFRMPTR(dev->base_addr));
-
-       return 0;
-}
-
-
-void ether00_mem_update(void* dev_id)
-{
-       struct net_device* dev=dev_id;
-       struct net_priv* priv=dev->priv;
-       struct sk_buff* skb;
-       struct tx_fda_ent *fda_ptr=priv->tx_fdalist_vp;
-       struct rx_blist_ent* blist_ent_ptr;
-       unsigned long flags;
-
-       priv->tq_memupdate.sync=0;
-       //priv->tq_memupdate.list=
-       priv->memupdate_scheduled=0;
-
-       /* Transmit interrupt */
-       while(fda_ptr<(priv->tx_fdalist_vp+TX_NUM_FDESC)){
-               if(!(FDCTL_COWNSFD_MSK&fda_ptr->fd.FDCtl) && (ETHER_TX_STAT_COMP_MSK&fda_ptr->fd.FDStat)){
-                       priv->stats.tx_packets++;
-                       priv->stats.tx_bytes+=fda_ptr->bd.BuffLength;
-                       skb=(struct sk_buff*)fda_ptr->fd.FDSystem;
-                       //printk("%d:txcln:fda=%#x skb=%#x\n",jiffies,fda_ptr,skb);
-                       dev_kfree_skb(skb);
-                       fda_ptr->fd.FDSystem=0;
-                       fda_ptr->fd.FDStat=0;
-                       fda_ptr->fd.FDCtl=0;
-               }
-               fda_ptr++;
-       }
-       /* Fill in any missing buffers from the received queue */
-       spin_lock_irqsave(&priv->rx_lock,flags);
-       blist_ent_ptr=priv->rx_blist_vp;
-       while(blist_ent_ptr<(priv->rx_blist_vp+RX_NUM_BUFF)){
-               /* fd.FDSystem of 0 indicates we failed to allocate the buffer in the ISR */
-               if(!blist_ent_ptr->fd.FDSystem){
-                       struct sk_buff *skb;
-                       skb=dev_alloc_skb(PKT_BUF_SZ);
-                       blist_ent_ptr->fd.FDSystem=(unsigned int)skb;
-                       if(skb){
-                               setup_blist_entry(skb,blist_ent_ptr);
-                       }
-                       else
-                       {
-                               break;
-                       }
-               }
-               blist_ent_ptr++;
-       }
-       spin_unlock_irqrestore(&priv->rx_lock,flags);
-       if(priv->queue_stopped){
-               //printk("%d:cln:start q\n",jiffies);
-               netif_start_queue(dev);
-       }
-       if(priv->rx_disabled){
-               //printk("%d:enable_irq\n",jiffies);
-               priv->rx_disabled=0;
-               writel(ETHER_RX_CTL_RXEN_MSK,ETHER_RX_CTL(dev->base_addr));
-
-       }
-}
-
-
-static void ether00_int( int irq_num, void* dev_id, struct pt_regs* regs)
-{
-       struct net_device* dev=dev_id;
-       struct net_priv* priv=dev->priv;
-
-       unsigned int   interruptValue;
-
-       interruptValue=readl(ETHER_INT_SRC(dev->base_addr));
-
-       //printk("INT_SRC=%x\n",interruptValue);
-
-       if(!(readl(ETHER_INT_SRC(dev->base_addr)) & ETHER_INT_SRC_IRQ_MSK))
-       {
-               return;         /* Interrupt wasn't caused by us!! */
-       }
-
-       if(readl(ETHER_INT_SRC(dev->base_addr))&
-          (ETHER_INT_SRC_INTMACRX_MSK |
-           ETHER_INT_SRC_FDAEX_MSK |
-           ETHER_INT_SRC_BLEX_MSK)) {
-               struct rx_blist_ent* blist_ent_ptr;
-               struct rx_fda_ent* fda_ent_ptr;
-               struct sk_buff* skb;
-
-               fda_ent_ptr=priv->rx_fda_ptr;
-               spin_lock(&priv->rx_lock);
-               while(fda_ent_ptr<(priv->rx_fda_ptr+RX_NUM_FDESC)){
-                       int result;
-
-                       if(!(fda_ent_ptr->fd.FDCtl&FDCTL_COWNSFD_MSK))
-                       {
-                               /* This frame is ready for processing */
-                               /*find the corresponding buffer in the bufferlist */
-                               blist_ent_ptr=priv->rx_blist_vp+fda_ent_ptr->bd.BDStat;
-                               skb=(struct sk_buff*)blist_ent_ptr->fd.FDSystem;
-
-                               /* Pass this skb up the stack */
-                               skb->dev=dev;
-                               skb_put(skb,fda_ent_ptr->fd.FDLength);
-                               skb->protocol=eth_type_trans(skb,dev);
-                               skb->ip_summed=CHECKSUM_UNNECESSARY;
-                               result=netif_rx(skb);
-                               /* Update statistics */
-                               priv->stats.rx_packets++;
-                               priv->stats.rx_bytes+=fda_ent_ptr->fd.FDLength;
-
-                               /* Free the FDA entry */
-                               fda_ent_ptr->bd.BDStat=0xff;
-                               fda_ent_ptr->fd.FDCtl=FDCTL_COWNSFD_MSK;
-
-                               /* Allocate a new skb and point the bd entry to it */
-                               blist_ent_ptr->fd.FDSystem=0;
-                               skb=dev_alloc_skb(PKT_BUF_SZ);
-                               //printk("allocskb=%#x\n",skb);
-                               if(skb){
-                                       setup_blist_entry(skb,blist_ent_ptr);
-
-                               }
-                               else if(!priv->memupdate_scheduled){
-                                       int tmp;
-                                       /* There are no buffers at the moment, so schedule */
-                                       /* the background task to sort this out */
-                                       schedule_task(&priv->tq_memupdate);
-                                       priv->memupdate_scheduled=1;
-                                       printk(KERN_DEBUG "%s:No buffers",dev->name);
-                                       /* If this interrupt was due to a lack of buffers then
-                                        * we'd better stop the receiver too */
-                                       if(interruptValue&ETHER_INT_SRC_BLEX_MSK){
-                                               priv->rx_disabled=1;
-                                               tmp=readl(ETHER_INT_SRC(dev->base_addr));
-                                               writel(tmp&~ETHER_RX_CTL_RXEN_MSK,ETHER_RX_CTL(dev->base_addr));
-                                               printk(KERN_DEBUG "%s:Halting rx",dev->name);
-                                       }
-
-                               }
-
-                       }
-                       fda_ent_ptr++;
-               }
-               spin_unlock(&priv->rx_lock);
-
-               /* Clear the  interrupts */
-               writel(ETHER_INT_SRC_INTMACRX_MSK | ETHER_INT_SRC_FDAEX_MSK
-                      | ETHER_INT_SRC_BLEX_MSK,ETHER_INT_SRC(dev->base_addr));
-
-       }
-
-       if(readl(ETHER_INT_SRC(dev->base_addr))&ETHER_INT_SRC_INTMACTX_MSK){
-
-               if(!priv->memupdate_scheduled){
-                       schedule_task(&priv->tq_memupdate);
-                       priv->memupdate_scheduled=1;
-               }
-               /* Clear the interrupt */
-               writel(ETHER_INT_SRC_INTMACTX_MSK,ETHER_INT_SRC(dev->base_addr));
-       }
-
-       if (readl(ETHER_INT_SRC(dev->base_addr)) & (ETHER_INT_SRC_SWINT_MSK|
-                                                   ETHER_INT_SRC_INTEARNOT_MSK|
-                                                   ETHER_INT_SRC_INTLINK_MSK|
-                                                   ETHER_INT_SRC_INTEXBD_MSK|
-                                                   ETHER_INT_SRC_INTTXCTLCMP_MSK))
-       {
-               /*
-                *      Not using any of these so they shouldn't happen
-                *
-                *      In the cased of INTEXBD - if you allocate more
-                *      than 28 decsriptors you may need to think about this
-                */
-               printk("Not using this interrupt\n");
-       }
-
-       if (readl(ETHER_INT_SRC(dev->base_addr)) &
-           (ETHER_INT_SRC_INTSBUS_MSK |
-            ETHER_INT_SRC_INTNRABT_MSK
-            |ETHER_INT_SRC_DMPARERR_MSK))
-       {
-               /*
-                * Hardware errors, we can either ignore them and hope they go away
-                *or reset the device, I'll try the first for now to see if they happen
-                */
-               printk("Hardware error\n");
-       }
-}
-
-static void ether00_setup_ethernet_address(struct net_device* dev)
-{
-       int tmp;
-
-       dev->addr_len=6;
-       writew(0,ETHER_ARC_ADR(dev->base_addr));
-       writel((dev->dev_addr[0]<<24) |
-               (dev->dev_addr[1]<<16) |
-               (dev->dev_addr[2]<<8) |
-               dev->dev_addr[3],
-               ETHER_ARC_DATA(dev->base_addr));
-
-       writew(4,ETHER_ARC_ADR(dev->base_addr));
-       tmp=readl(ETHER_ARC_DATA(dev->base_addr));
-       tmp&=0xffff;
-       tmp|=(dev->dev_addr[4]<<24) | (dev->dev_addr[5]<<16);
-       writel(tmp, ETHER_ARC_DATA(dev->base_addr));
-       /* Enable this entry in the ARC */
-
-       writel(1,ETHER_ARC_ENA(dev->base_addr));
-
-       return;
-}
-
-
-static void ether00_reset(struct net_device *dev)
-{
-       /* reset the controller */
-       writew(ETHER_MAC_CTL_RESET_MSK,ETHER_MAC_CTL(dev->base_addr));
-
-       /*
-        * Make sure we're not going to send anything
-        */
-
-       writew(ETHER_TX_CTL_TXHALT_MSK,ETHER_TX_CTL(dev->base_addr));
-
-       /*
-        * Make sure we're not going to receive anything
-        */
-       writew(ETHER_RX_CTL_RXHALT_MSK,ETHER_RX_CTL(dev->base_addr));
-
-       /*
-        * Disable Interrupts for now, and set the burst size to 8 bytes
-        */
-
-       writel(ETHER_DMA_CTL_INTMASK_MSK |
-              ((8 << ETHER_DMA_CTL_DMBURST_OFST) & ETHER_DMA_CTL_DMBURST_MSK)
-              |(2<<ETHER_DMA_CTL_RXALIGN_OFST),
-              ETHER_DMA_CTL(dev->base_addr));
-
-
-       /*
-        * Set TxThrsh - start transmitting a packet after 1514
-        * bytes or when a packet is complete, whichever comes first
-        */
-        writew(1514,ETHER_TXTHRSH(dev->base_addr));
-
-       /*
-        * Set TxPollCtr.  Each cycle is
-        * 61.44 microseconds with a 33 MHz bus
-        */
-        writew(1,ETHER_TXPOLLCTR(dev->base_addr));
-
-       /*
-        * Set Rx_Ctl - Turn off reception and let RxData turn it
-        * on later
-        */
-        writew(ETHER_RX_CTL_RXHALT_MSK,ETHER_RX_CTL(dev->base_addr));
-
-}
-
-
-static void ether00_set_multicast(struct net_device* dev)
-{
-       int count=dev->mc_count;
-
-       /* Set promiscuous mode if it's asked for. */
-
-       if (dev->flags&IFF_PROMISC){
-
-               writew( ETHER_ARC_CTL_COMPEN_MSK |
-                       ETHER_ARC_CTL_BROADACC_MSK |
-                       ETHER_ARC_CTL_GROUPACC_MSK |
-                       ETHER_ARC_CTL_STATIONACC_MSK,
-                       ETHER_ARC_CTL(dev->base_addr));
-               return;
-       }
-
-       /*
-        * Get all multicast packets if required, or if there are too
-        * many addresses to fit in hardware
-        */
-       if (dev->flags & IFF_ALLMULTI){
-               writew( ETHER_ARC_CTL_COMPEN_MSK |
-                       ETHER_ARC_CTL_GROUPACC_MSK |
-                       ETHER_ARC_CTL_BROADACC_MSK,
-                       ETHER_ARC_CTL(dev->base_addr));
-               return;
-       }
-       if (dev->mc_count > (ETHER_ARC_SIZE - 1)){
-
-               printk(KERN_WARNING "Too many multicast addresses for hardware to filter - receiving all multicast packets\n");
-               writew( ETHER_ARC_CTL_COMPEN_MSK |
-                       ETHER_ARC_CTL_GROUPACC_MSK |
-                       ETHER_ARC_CTL_BROADACC_MSK,
-                       ETHER_ARC_CTL(dev->base_addr));
-               return;
-       }
-
-       if(dev->mc_count){
-               struct dev_mc_list *mc_list_ent=dev->mc_list;
-               unsigned int temp,i;
-               DEBUG(printk("mc_count=%d mc_list=%#x\n",dev-> mc_count, dev->mc_list));
-               DEBUG(printk("mc addr=%02#x%02x%02x%02x%02x%02x\n",
-                            mc_list_ent->dmi_addr[5],
-                            mc_list_ent->dmi_addr[4],
-                            mc_list_ent->dmi_addr[3],
-                            mc_list_ent->dmi_addr[2],
-                            mc_list_ent->dmi_addr[1],
-                            mc_list_ent->dmi_addr[0]);)
-
-               /*
-                * The first 6 bytes are the MAC address, so
-                * don't change them!
-                */
-               writew(4,ETHER_ARC_ADR(dev->base_addr));
-               temp=readl(ETHER_ARC_DATA(dev->base_addr));
-               temp&=0xffff0000;
-
-               /* Disable the current multicast stuff */
-               writel(1,ETHER_ARC_ENA(dev->base_addr));
-
-               for(;;){
-                       temp|=mc_list_ent->dmi_addr[1] |
-                               mc_list_ent->dmi_addr[0]<<8;
-                       writel(temp,ETHER_ARC_DATA(dev->base_addr));
-
-                       i=readl(ETHER_ARC_ADR(dev->base_addr));
-                       writew(i+4,ETHER_ARC_ADR(dev->base_addr));
-
-                       temp=mc_list_ent->dmi_addr[5]|
-                               mc_list_ent->dmi_addr[4]<<8 |
-                               mc_list_ent->dmi_addr[3]<<16 |
-                               mc_list_ent->dmi_addr[2]<<24;
-                       writel(temp,ETHER_ARC_DATA(dev->base_addr));
-
-                       count--;
-                       if(!mc_list_ent->next || !count){
-                               break;
-                       }
-                       DEBUG(printk("mc_list_next=%#x\n",mc_list_ent->next);)
-                       mc_list_ent=mc_list_ent->next;
-
-
-                       i=readl(ETHER_ARC_ADR(dev->base_addr));
-                       writel(i+4,ETHER_ARC_ADR(dev->base_addr));
-
-                       temp=mc_list_ent->dmi_addr[3]|
-                               mc_list_ent->dmi_addr[2]<<8 |
-                               mc_list_ent->dmi_addr[1]<<16 |
-                               mc_list_ent->dmi_addr[0]<<24;
-                       writel(temp,ETHER_ARC_DATA(dev->base_addr));
-
-                       i=readl(ETHER_ARC_ADR(dev->base_addr));
-                       writel(i+4,ETHER_ARC_ADR(dev->base_addr));
-
-                       temp=mc_list_ent->dmi_addr[4]<<16 |
-                               mc_list_ent->dmi_addr[5]<<24;
-
-                       writel(temp,ETHER_ARC_DATA(dev->base_addr));
-
-                       count--;
-                       if(!mc_list_ent->next || !count){
-                               break;
-                       }
-                       mc_list_ent=mc_list_ent->next;
-               }
-
-
-               if(count)
-                       printk(KERN_WARNING "Multicast list size error\n");
-
-
-               writew( ETHER_ARC_CTL_BROADACC_MSK|
-                       ETHER_ARC_CTL_COMPEN_MSK,
-                       ETHER_ARC_CTL(dev->base_addr));
-
-       }
-
-       /* enable the active ARC enties */
-       writew((1<<(count+2))-1,ETHER_ARC_ENA(dev->base_addr));
-}
-
-
-static int ether00_open(struct net_device* dev)
-{
-       int result,tmp;
-       struct net_priv* priv;
-
-       if (!is_valid_ether_addr(dev->dev_addr))
-               return -EINVAL;
-
-       /* Install interrupt handlers */
-       result=request_irq(dev->irq,ether00_int,0,"ether00",dev);
-       if(result)
-               goto open_err1;
-
-       result=request_irq(2,ether00_phy_int,0,"ether00_phy",dev);
-       if(result)
-               goto open_err2;
-
-       ether00_reset(dev);
-       result=ether00_mem_init(dev);
-       if(result)
-               goto open_err3;
-
-
-       ether00_setup_ethernet_address(dev);
-
-       ether00_set_multicast(dev);
-
-       result=ether00_write_phy(dev,PHY_CONTROL, PHY_CONTROL_ANEGEN_MSK | PHY_CONTROL_RANEG_MSK);
-       if(result)
-               goto open_err4;
-       result=ether00_write_phy(dev,PHY_IRQ_CONTROL, PHY_IRQ_CONTROL_LS_CHG_IE_MSK |
-                                PHY_IRQ_CONTROL_ANEG_COMP_IE_MSK);
-       if(result)
-               goto open_err4;
-
-       /* Start the device enable interrupts */
-       writew(ETHER_RX_CTL_RXEN_MSK
-//            | ETHER_RX_CTL_STRIPCRC_MSK
-              | ETHER_RX_CTL_ENGOOD_MSK
-              | ETHER_RX_CTL_ENRXPAR_MSK| ETHER_RX_CTL_ENLONGERR_MSK
-              | ETHER_RX_CTL_ENOVER_MSK| ETHER_RX_CTL_ENCRCERR_MSK,
-              ETHER_RX_CTL(dev->base_addr));
-
-       writew(ETHER_TX_CTL_TXEN_MSK|
-              ETHER_TX_CTL_ENEXDEFER_MSK|
-              ETHER_TX_CTL_ENLCARR_MSK|
-              ETHER_TX_CTL_ENEXCOLL_MSK|
-              ETHER_TX_CTL_ENLATECOLL_MSK|
-              ETHER_TX_CTL_ENTXPAR_MSK|
-              ETHER_TX_CTL_ENCOMP_MSK,
-              ETHER_TX_CTL(dev->base_addr));
-
-       tmp=readl(ETHER_DMA_CTL(dev->base_addr));
-       writel(tmp&~ETHER_DMA_CTL_INTMASK_MSK,ETHER_DMA_CTL(dev->base_addr));
-
-       return 0;
-
- open_err4:
-       ether00_reset(dev);
- open_err3:
-       free_irq(2,dev);
- open_err2:
-       free_irq(dev->irq,dev);
- open_err1:
-       return result;
-
-}
-
-
-static int ether00_tx(struct sk_buff* skb, struct net_device* dev)
-{
-       struct net_priv *priv=dev->priv;
-       struct tx_fda_ent *fda_ptr;
-       int i;
-
-
-       /*
-        *      Find an empty slot in which to stick the frame
-        */
-       fda_ptr=(struct tx_fda_ent*)__dma_va(readl(ETHER_TXFRMPTR(dev->base_addr)));
-       i=0;
-       while(i<TX_NUM_FDESC){
-               if (fda_ptr->fd.FDStat||(fda_ptr->fd.FDCtl & FDCTL_COWNSFD_MSK)){
-                       fda_ptr =(struct tx_fda_ent*) __dma_va((struct tx_fda_ent*)fda_ptr->fd.FDNext);
-               }
-               else {
-                       break;
-               }
-               i++;
-       }
-
-       /* Write the skb data from the cache*/
-       consistent_sync(skb->data,skb->len,PCI_DMA_TODEVICE);
-       fda_ptr->bd.BuffData=(char*)__pa(skb->data);
-       fda_ptr->bd.BuffLength=(unsigned short)skb->len;
-       /* Save the pointer to the skb for freeing later */
-       fda_ptr->fd.FDSystem=(unsigned int)skb;
-       fda_ptr->fd.FDStat=0;
-       /* Pass ownership of the buffers to the controller */
-       fda_ptr->fd.FDCtl=1;
-       fda_ptr->fd.FDCtl|=FDCTL_COWNSFD_MSK;
-
-       /* If the next buffer in the list is full, stop the queue */
-       fda_ptr=(struct tx_fda_ent*)__dma_va(fda_ptr->fd.FDNext);
-       if ((fda_ptr->fd.FDStat)||(fda_ptr->fd.FDCtl & FDCTL_COWNSFD_MSK)){
-               netif_stop_queue(dev);
-               priv->queue_stopped=1;
-       }
-
-       return 0;
-}
-
-static struct net_device_stats *ether00_stats(struct net_device* dev)
-{
-       struct net_priv *priv=dev->priv;
-       return &priv->stats;
-}
-
-
-static int ether00_stop(struct net_device* dev)
-{
-       struct net_priv *priv=dev->priv;
-       int tmp;
-
-       /* Stop/disable the device. */
-       tmp=readw(ETHER_RX_CTL(dev->base_addr));
-       tmp&=~(ETHER_RX_CTL_RXEN_MSK | ETHER_RX_CTL_ENGOOD_MSK);
-       tmp|=ETHER_RX_CTL_RXHALT_MSK;
-       writew(tmp,ETHER_RX_CTL(dev->base_addr));
-
-       tmp=readl(ETHER_TX_CTL(dev->base_addr));
-       tmp&=~ETHER_TX_CTL_TXEN_MSK;
-       tmp|=ETHER_TX_CTL_TXHALT_MSK;
-       writel(tmp,ETHER_TX_CTL(dev->base_addr));
-
-       /* Free up system resources */
-       free_irq(dev->irq,dev);
-       free_irq(2,dev);
-       iounmap(priv->dma_data);
-
-       return 0;
-}
-
-
-static void ether00_get_ethernet_address(struct net_device* dev)
-{
-       struct mtd_info *mymtd=NULL;
-       int i;
-       size_t retlen;
-
-       /*
-        * For the Epxa10 dev board (camelot), the ethernet MAC
-        * address is of the form  00:aa:aa:00:xx:xx where
-        * 00:aa:aa is the Altera vendor ID and xx:xx is the
-        * last 2 bytes of the board serial number, as programmed
-        * into the OTP area of the flash device on EBI1. If this
-        * isn't an expa10 dev board, or there's no mtd support to
-        * read the serial number from flash then we'll force the
-        * use to set their own mac address using ifconfig.
-        */
-
-#ifdef CONFIG_ARCH_CAMELOT
-#ifdef CONFIG_MTD
-       /* get the mtd_info structure for the first mtd device*/
-       for(i=0;i<MAX_MTD_DEVICES;i++){
-               mymtd=get_mtd_device(NULL,i);
-               if(!mymtd||!strcmp(mymtd->name,"EPXA10DB flash"))
-                       break;
-       }
-
-       if(!mymtd || !mymtd->read_user_prot_reg){
-               printk(KERN_WARNING "%s: Failed to read MAC address from flash\n",dev->name);
-       }else{
-               mymtd->read_user_prot_reg(mymtd,2,1,&retlen,&dev->dev_addr[5]);
-               mymtd->read_user_prot_reg(mymtd,3,1,&retlen,&dev->dev_addr[4]);
-               dev->dev_addr[3]=0;
-               dev->dev_addr[2]=vendor_id[1];
-               dev->dev_addr[1]=vendor_id[0];
-               dev->dev_addr[0]=0;
-       }
-#else
-       printk(KERN_WARNING "%s: MTD support required to read MAC address from EPXA10 dev board\n", dev->name);
-#endif
-#endif
-
-       if (!is_valid_ether_addr(dev->dev_addr))
-               printk("%s: Invalid ethernet MAC address.  Please set using "
-                       "ifconfig\n", dev->name);
-
-}
-
-/*
- * Keep a mapping of dev_info addresses -> port lines to use when
- * removing ports dev==NULL indicates unused entry
- */
-
-
-static struct net_device* dev_list[ETH_NR];
-
-static int ether00_add_device(struct pldhs_dev_info* dev_info,void* dev_ps_data)
-{
-       struct net_device *dev;
-       struct net_priv *priv;
-       void *map_addr;
-       int result;
-       int i;
-
-       i=0;
-       while(dev_list[i] && i < ETH_NR)
-               i++;
-
-       if(i==ETH_NR){
-               printk(KERN_WARNING "ether00: Maximum number of ports reached\n");
-               return 0;
-       }
-
-
-       if (!request_mem_region(dev_info->base_addr, MAC_REG_SIZE, "ether00"))
-               return -EBUSY;
-
-       dev = alloc_etherdev(sizeof(struct net_priv));
-       if(!dev) {
-               result = -ENOMEM;
-               goto out_release;
-       }
-       priv = dev->priv;
-
-       priv->tq_memupdate.routine=ether00_mem_update;
-       priv->tq_memupdate.data=(void*) dev;
-
-       spin_lock_init(&priv->rx_lock);
-
-       map_addr=ioremap_nocache(dev_info->base_addr,SZ_4K);
-       if(!map_addr){
-               result = -ENOMEM;
-               out_kfree;
-       }
-
-       dev->open=ether00_open;
-       dev->stop=ether00_stop;
-       dev->set_multicast_list=ether00_set_multicast;
-       dev->hard_start_xmit=ether00_tx;
-       dev->get_stats=ether00_stats;
-
-       ether00_get_ethernet_address(dev);
-
-       SET_MODULE_OWNER(dev);
-
-       dev->base_addr=(unsigned int)map_addr;
-       dev->irq=dev_info->irq;
-       dev->features=NETIF_F_DYNALLOC | NETIF_F_HW_CSUM;
-
-       result=register_netdev(dev);
-       if(result){
-               printk("Ether00: Error %i registering driver\n",result);
-               goto out_unmap;
-       }
-       printk("registered ether00 device at %#x\n",dev_info->base_addr);
-
-       dev_list[i]=dev;
-
-       return result;
-
- out_unmap:
-       iounmap(map_addr);
- out_kfree:
-       free_netdev(dev);
- out_release:
-       release_mem_region(dev_info->base_addr, MAC_REG_SIZE);
-       return result;
-}
-
-
-static int ether00_remove_devices(void)
-{
-       int i;
-
-       for(i=0;i<ETH_NR;i++){
-               if(dev_list[i]){
-                       netif_device_detach(dev_list[i]);
-                       unregister_netdev(dev_list[i]);
-                       iounmap((void*)dev_list[i]->base_addr);
-                       release_mem_region(dev_list[i]->base_addr, MAC_REG_SIZE);
-                       free_netdev(dev_list[i]);
-                       dev_list[i]=0;
-               }
-       }
-       return 0;
-}
-
-static struct pld_hotswap_ops ether00_pldhs_ops={
-       .name = ETHER00_NAME,
-       .add_device = ether00_add_device,
-       .remove_devices = ether00_remove_devices,
-};
-
-
-static void __exit ether00_cleanup_module(void)
-{
-       int result;
-       result=ether00_remove_devices();
-       if(result)
-               printk(KERN_WARNING "ether00: failed to remove all devices\n");
-
-       pldhs_unregister_driver(ETHER00_NAME);
-}
-module_exit(ether00_cleanup_module);
-
-
-static int __init ether00_mod_init(void)
-{
-       printk("mod init\n");
-       return pldhs_register_driver(&ether00_pldhs_ops);
-
-}
-
-module_init(ether00_mod_init);
-
index 1cc53abc3a3900a4f9b6b6dbabb839db43f679c8..f1d5b1027ff7ef81e432eeea641ec4bb0c750174 100644 (file)
@@ -69,7 +69,6 @@
 #include <asm/system.h>
 #include <asm/ecard.h>
 #include <asm/io.h>
-#include <asm/irq.h>
 
 static char version[] __initdata = "ether3 ethernet driver (c) 1995-2000 R.M.King v1.17\n";
 
index 942a2819576c2efe229c6c6cb71fc4a9c9d79b4f..6a93b666eb7231c272fe8aa84424a1aa9be2e799 100644 (file)
@@ -50,7 +50,6 @@
 #include <asm/system.h>
 #include <asm/ecard.h>
 #include <asm/io.h>
-#include <asm/irq.h>
 
 #include "../8390.h"
 
index 41b3d83c2ab83d7e9a6a7da72586b3d147824c3e..f4424cf886c563a3a5c4955336f7c3c2c8f52f04 100644 (file)
@@ -515,6 +515,7 @@ static void ax_encaps(struct net_device *dev, unsigned char *icp, int len)
                        count = kiss_esc(p, (unsigned char *)ax->xbuff, len);
                }
        }
+       spin_unlock_bh(&ax->buflock);
 
        set_bit(TTY_DO_WRITE_WAKEUP, &ax->tty->flags);
        actual = ax->tty->driver->write(ax->tty, ax->xbuff, count);
@@ -524,7 +525,6 @@ static void ax_encaps(struct net_device *dev, unsigned char *icp, int len)
        ax->dev->trans_start = jiffies;
        ax->xleft = count - actual;
        ax->xhead = ax->xbuff + actual;
-       spin_unlock_bh(&ax->buflock);
 }
 
 /* Encapsulate an AX.25 packet and kick it into a TTY queue. */
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
new file mode 100644 (file)
index 0000000..1b69925
--- /dev/null
@@ -0,0 +1,294 @@
+/* drivers/net/ifb.c: 
+
+       The purpose of this driver is to provide a device that allows
+       for sharing of resources:
+
+       1) qdiscs/policies that are per device as opposed to system wide.
+       ifb allows for a device which can be redirected to thus providing
+       an impression of sharing.
+
+       2) Allows for queueing incoming traffic for shaping instead of
+       dropping. 
+       
+       The original concept is based on what is known as the IMQ
+       driver initially written by Martin Devera, later rewritten
+       by Patrick McHardy and then maintained by Andre Correa.
+
+       You need the tc action  mirror or redirect to feed this device
+               packets.
+
+       This program is free software; you can redistribute it and/or
+       modify it under the terms of the GNU General Public License
+       as published by the Free Software Foundation; either version
+       2 of the License, or (at your option) any later version.
+       Authors:        Jamal Hadi Salim (2005)
+*/
+
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/init.h>
+#include <linux/moduleparam.h>
+#include <net/pkt_sched.h> 
+
+#define TX_TIMEOUT  (2*HZ)
+                                                                                
+#define TX_Q_LIMIT    32
+struct ifb_private {
+       struct net_device_stats stats;
+       struct tasklet_struct   ifb_tasklet;
+       int     tasklet_pending;
+       /* mostly debug stats leave in for now */
+       unsigned long   st_task_enter; /* tasklet entered */
+       unsigned long   st_txq_refl_try; /* transmit queue refill attempt */
+       unsigned long   st_rxq_enter; /* receive queue entered */
+       unsigned long   st_rx2tx_tran; /* receive to trasmit transfers */
+       unsigned long   st_rxq_notenter; /*receiveQ not entered, resched */
+       unsigned long   st_rx_frm_egr; /* received from egress path */
+       unsigned long   st_rx_frm_ing; /* received from ingress path */
+       unsigned long   st_rxq_check;
+       unsigned long   st_rxq_rsch;
+       struct sk_buff_head     rq;
+       struct sk_buff_head     tq;
+};
+
+static int numifbs = 1;
+
+static void ri_tasklet(unsigned long dev);
+static int ifb_xmit(struct sk_buff *skb, struct net_device *dev);
+static struct net_device_stats *ifb_get_stats(struct net_device *dev);
+static int ifb_open(struct net_device *dev);
+static int ifb_close(struct net_device *dev);
+
+static void ri_tasklet(unsigned long dev) 
+{
+
+       struct net_device *_dev = (struct net_device *)dev;
+       struct ifb_private *dp = netdev_priv(_dev);
+       struct net_device_stats *stats = &dp->stats;
+       struct sk_buff *skb;
+
+       dp->st_task_enter++;
+       if ((skb = skb_peek(&dp->tq)) == NULL) {
+               dp->st_txq_refl_try++;
+               if (spin_trylock(&_dev->xmit_lock)) {
+                       dp->st_rxq_enter++;
+                       while ((skb = skb_dequeue(&dp->rq)) != NULL) {
+                               skb_queue_tail(&dp->tq, skb);
+                               dp->st_rx2tx_tran++;
+                       }
+                       spin_unlock(&_dev->xmit_lock);
+               } else {
+                       /* reschedule */
+                       dp->st_rxq_notenter++;
+                       goto resched;
+               }
+       }
+
+       while ((skb = skb_dequeue(&dp->tq)) != NULL) {
+               u32 from = G_TC_FROM(skb->tc_verd);
+
+               skb->tc_verd = 0;
+               skb->tc_verd = SET_TC_NCLS(skb->tc_verd);
+               stats->tx_packets++;
+               stats->tx_bytes +=skb->len;
+               if (from & AT_EGRESS) {
+                       dp->st_rx_frm_egr++;
+                       dev_queue_xmit(skb);
+               } else if (from & AT_INGRESS) {
+
+                       dp->st_rx_frm_ing++;
+                       netif_rx(skb);
+               } else {
+                       dev_kfree_skb(skb);
+                       stats->tx_dropped++;
+               }
+       }
+
+       if (spin_trylock(&_dev->xmit_lock)) {
+               dp->st_rxq_check++;
+               if ((skb = skb_peek(&dp->rq)) == NULL) {
+                       dp->tasklet_pending = 0;
+                       if (netif_queue_stopped(_dev))
+                               netif_wake_queue(_dev);
+               } else {
+                       dp->st_rxq_rsch++;
+                       spin_unlock(&_dev->xmit_lock);
+                       goto resched;
+               }
+               spin_unlock(&_dev->xmit_lock);
+       } else {
+resched:
+               dp->tasklet_pending = 1;
+               tasklet_schedule(&dp->ifb_tasklet);
+       }
+
+}
+
+static void __init ifb_setup(struct net_device *dev)
+{
+       /* Initialize the device structure. */
+       dev->get_stats = ifb_get_stats;
+       dev->hard_start_xmit = ifb_xmit;
+       dev->open = &ifb_open;
+       dev->stop = &ifb_close;
+
+       /* Fill in device structure with ethernet-generic values. */
+       ether_setup(dev);
+       dev->tx_queue_len = TX_Q_LIMIT;
+       dev->change_mtu = NULL;
+       dev->flags |= IFF_NOARP;
+       dev->flags &= ~IFF_MULTICAST;
+       SET_MODULE_OWNER(dev);
+       random_ether_addr(dev->dev_addr);
+}
+
+static int ifb_xmit(struct sk_buff *skb, struct net_device *dev)
+{
+       struct ifb_private *dp = netdev_priv(dev);
+       struct net_device_stats *stats = &dp->stats;
+       int ret = 0;
+       u32 from = G_TC_FROM(skb->tc_verd);
+
+       stats->tx_packets++;
+       stats->tx_bytes+=skb->len;
+
+       if (!from || !skb->input_dev) {
+dropped:
+               dev_kfree_skb(skb);
+               stats->rx_dropped++;
+               return ret;
+       } else {
+               /* 
+                * note we could be going
+                * ingress -> egress or
+                * egress -> ingress
+               */
+               skb->dev = skb->input_dev;
+               skb->input_dev = dev;
+               if (from & AT_INGRESS) {
+                       skb_pull(skb, skb->dev->hard_header_len);
+               } else {
+                       if (!(from & AT_EGRESS)) {
+                               goto dropped;
+                       }
+               }
+       }
+
+       if (skb_queue_len(&dp->rq) >= dev->tx_queue_len) {
+               netif_stop_queue(dev);
+       }
+
+       dev->trans_start = jiffies;
+       skb_queue_tail(&dp->rq, skb);
+       if (!dp->tasklet_pending) {
+               dp->tasklet_pending = 1;
+               tasklet_schedule(&dp->ifb_tasklet);
+       }
+
+       return ret;
+}
+
+static struct net_device_stats *ifb_get_stats(struct net_device *dev)
+{
+       struct ifb_private *dp = netdev_priv(dev);
+       struct net_device_stats *stats = &dp->stats;
+
+       pr_debug("tasklets stats %ld:%ld:%ld:%ld:%ld:%ld:%ld:%ld:%ld \n",
+               dp->st_task_enter, dp->st_txq_refl_try, dp->st_rxq_enter, 
+               dp->st_rx2tx_tran dp->st_rxq_notenter, dp->st_rx_frm_egr,
+               dp->st_rx_frm_ing, dp->st_rxq_check, dp->st_rxq_rsch );
+
+       return stats;
+}
+
+static struct net_device **ifbs;
+
+/* Number of ifb devices to be set up by this module. */
+module_param(numifbs, int, 0);
+MODULE_PARM_DESC(numifbs, "Number of ifb devices");
+
+static int ifb_close(struct net_device *dev)
+{
+       struct ifb_private *dp = netdev_priv(dev);
+
+       tasklet_kill(&dp->ifb_tasklet);
+       netif_stop_queue(dev);
+       skb_queue_purge(&dp->rq);
+       skb_queue_purge(&dp->tq);
+       return 0;
+}
+
+static int ifb_open(struct net_device *dev)
+{
+       struct ifb_private *dp = netdev_priv(dev);
+
+       tasklet_init(&dp->ifb_tasklet, ri_tasklet, (unsigned long)dev);
+       skb_queue_head_init(&dp->rq);
+       skb_queue_head_init(&dp->tq);
+       netif_start_queue(dev);
+
+       return 0;
+}
+
+static int __init ifb_init_one(int index)
+{
+       struct net_device *dev_ifb;
+       int err;
+
+       dev_ifb = alloc_netdev(sizeof(struct ifb_private),
+                                "ifb%d", ifb_setup);
+
+       if (!dev_ifb)
+               return -ENOMEM;
+
+       if ((err = register_netdev(dev_ifb))) {
+               free_netdev(dev_ifb);
+               dev_ifb = NULL;
+       } else {
+               ifbs[index] = dev_ifb; 
+       }
+
+       return err;
+}
+
+static void ifb_free_one(int index)
+{
+       unregister_netdev(ifbs[index]);
+       free_netdev(ifbs[index]);
+} 
+
+static int __init ifb_init_module(void)
+{ 
+       int i, err = 0;
+       ifbs = kmalloc(numifbs * sizeof(void *), GFP_KERNEL); 
+       if (!ifbs)
+               return -ENOMEM; 
+       for (i = 0; i < numifbs && !err; i++)
+               err = ifb_init_one(i); 
+       if (err) { 
+               while (--i >= 0)
+                       ifb_free_one(i);
+       }
+
+       return err;
+} 
+
+static void __exit ifb_cleanup_module(void)
+{
+       int i;
+
+       for (i = 0; i < numifbs; i++) 
+               ifb_free_one(i); 
+       kfree(ifbs);    
+}
+
+module_init(ifb_init_module);
+module_exit(ifb_cleanup_module);
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Jamal Hadi Salim");
index 09ed05727bcbb7f972be03d471e26328fa87d90d..dda5a5f79c53297af2cd8ebaa6a64d884bde5971 100644 (file)
 
 #include <asm/system.h>
 #include <asm/io.h>
-#include <asm/irq.h>
 #include <asm/ecard.h>
 
 #include "../scsi.h"
index 804125e35fc3a20e05d6118bf8f9f7e0453d203c..a28940156703097e0349a0f5cc5900eaa62296e9 100644 (file)
@@ -33,7 +33,6 @@
 
 #include <asm/dma.h>
 #include <asm/io.h>
-#include <asm/irq.h>
 #include <asm/ecard.h>
 
 #include "../scsi.h"
index 81e266be26d01ac77906a50f4a5773bd932748e0..e6c9491dc5c08656ea73ffb0d101b1610327efa0 100644 (file)
@@ -13,7 +13,6 @@
 
 #include <asm/ecard.h>
 #include <asm/io.h>
-#include <asm/irq.h>
 #include <asm/system.h>
 
 #include "../scsi.h"
index 3a7a46b0dc41c9a065a7ed8b6ad613568d09024c..583d2d8c8335eba6b6924786984836c30d89e3df 100644 (file)
@@ -31,7 +31,6 @@
 #include <asm/dma.h>
 #include <asm/ecard.h>
 #include <asm/io.h>
-#include <asm/irq.h>
 #include <asm/pgtable.h>
 
 #include "../scsi.h"
index 4d1e8f52c924ff1cf57eb5ad49def29641ba8803..3ffec7efc9d526b45413bbdeeab277fbc4277f58 100644 (file)
@@ -35,7 +35,6 @@
 #include <linux/dma-mapping.h>
 
 #include <asm/io.h>
-#include <asm/irq.h>
 #include <asm/dma.h>
 #include <asm/ecard.h>
 #include <asm/pgtable.h>
index 3333d7b39139ee36a85b21740fa4134042327dd7..3113bdcedb1334dbbb54aff3bc78ac9ab3cd81ae 100644 (file)
@@ -22,7 +22,6 @@
 #include <asm/dma.h>
 #include <asm/ecard.h>
 #include <asm/io.h>
-#include <asm/irq.h>
 #include <asm/pgtable.h>
 
 #include "../scsi.h"
index 1891cf5bdeef24aa27303dc6e384c02a77b145e2..e8454611cb652b48151daceebf41c1cc800d53bf 100644 (file)
@@ -54,6 +54,8 @@
  */
 static unsigned int share_irqs = SERIAL8250_SHARE_IRQS;
 
+static unsigned int nr_uarts = CONFIG_SERIAL_8250_RUNTIME_UARTS;
+
 /*
  * Debugging.
  */
@@ -2118,7 +2120,7 @@ static void __init serial8250_isa_init_ports(void)
                return;
        first = 0;
 
-       for (i = 0; i < UART_NR; i++) {
+       for (i = 0; i < nr_uarts; i++) {
                struct uart_8250_port *up = &serial8250_ports[i];
 
                up->port.line = i;
@@ -2137,7 +2139,7 @@ static void __init serial8250_isa_init_ports(void)
        }
 
        for (i = 0, up = serial8250_ports;
-            i < ARRAY_SIZE(old_serial_port) && i < UART_NR;
+            i < ARRAY_SIZE(old_serial_port) && i < nr_uarts;
             i++, up++) {
                up->port.iobase   = old_serial_port[i].port;
                up->port.irq      = irq_canonicalize(old_serial_port[i].irq);
@@ -2159,7 +2161,7 @@ serial8250_register_ports(struct uart_driver *drv, struct device *dev)
 
        serial8250_isa_init_ports();
 
-       for (i = 0; i < UART_NR; i++) {
+       for (i = 0; i < nr_uarts; i++) {
                struct uart_8250_port *up = &serial8250_ports[i];
 
                up->port.dev = dev;
@@ -2262,7 +2264,7 @@ static int serial8250_console_setup(struct console *co, char *options)
         * if so, search for the first available port that does have
         * console support.
         */
-       if (co->index >= UART_NR)
+       if (co->index >= nr_uarts)
                co->index = 0;
        port = &serial8250_ports[co->index].port;
        if (!port->iobase && !port->membase)
@@ -2298,7 +2300,7 @@ static int __init find_port(struct uart_port *p)
        int line;
        struct uart_port *port;
 
-       for (line = 0; line < UART_NR; line++) {
+       for (line = 0; line < nr_uarts; line++) {
                port = &serial8250_ports[line].port;
                if (uart_match_port(p, port))
                        return line;
@@ -2420,7 +2422,7 @@ static int __devexit serial8250_remove(struct platform_device *dev)
 {
        int i;
 
-       for (i = 0; i < UART_NR; i++) {
+       for (i = 0; i < nr_uarts; i++) {
                struct uart_8250_port *up = &serial8250_ports[i];
 
                if (up->port.dev == &dev->dev)
@@ -2487,7 +2489,7 @@ static struct uart_8250_port *serial8250_find_match_or_unused(struct uart_port *
        /*
         * First, find a port entry which matches.
         */
-       for (i = 0; i < UART_NR; i++)
+       for (i = 0; i < nr_uarts; i++)
                if (uart_match_port(&serial8250_ports[i].port, port))
                        return &serial8250_ports[i];
 
@@ -2496,7 +2498,7 @@ static struct uart_8250_port *serial8250_find_match_or_unused(struct uart_port *
         * free entry.  We look for one which hasn't been previously
         * used (indicated by zero iobase).
         */
-       for (i = 0; i < UART_NR; i++)
+       for (i = 0; i < nr_uarts; i++)
                if (serial8250_ports[i].port.type == PORT_UNKNOWN &&
                    serial8250_ports[i].port.iobase == 0)
                        return &serial8250_ports[i];
@@ -2505,7 +2507,7 @@ static struct uart_8250_port *serial8250_find_match_or_unused(struct uart_port *
         * That also failed.  Last resort is to find any entry which
         * doesn't have a real port associated with it.
         */
-       for (i = 0; i < UART_NR; i++)
+       for (i = 0; i < nr_uarts; i++)
                if (serial8250_ports[i].port.type == PORT_UNKNOWN)
                        return &serial8250_ports[i];
 
@@ -2590,8 +2592,11 @@ static int __init serial8250_init(void)
 {
        int ret, i;
 
+       if (nr_uarts > UART_NR)
+               nr_uarts = UART_NR;
+
        printk(KERN_INFO "Serial: 8250/16550 driver $Revision: 1.90 $ "
-               "%d ports, IRQ sharing %sabled\n", (int) UART_NR,
+               "%d ports, IRQ sharing %sabled\n", nr_uarts,
                share_irqs ? "en" : "dis");
 
        for (i = 0; i < NR_IRQS; i++)
@@ -2651,6 +2656,9 @@ module_param(share_irqs, uint, 0644);
 MODULE_PARM_DESC(share_irqs, "Share IRQs with other non-8250/16x50 devices"
        " (unsafe)");
 
+module_param(nr_uarts, uint, 0644);
+MODULE_PARM_DESC(nr_uarts, "Maximum number of UARTs supported. (1-" __MODULE_STRING(CONFIG_SERIAL_8250_NR_UARTS) ")");
+
 #ifdef CONFIG_SERIAL_8250_RSA
 module_param_array(probe_rsa, ulong, &probe_rsa_count, 0444);
 MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA");
index 812bae62c8ecffdf653900c786ecf03a1373c999..1bae26a8a503c74e17de2543542d8541027f4008 100644 (file)
@@ -95,6 +95,16 @@ config SERIAL_8250_NR_UARTS
          PCI enumeration and any ports that may be added at run-time
          via hot-plug, or any ISA multi-port serial cards.
 
+config SERIAL_8250_RUNTIME_UARTS
+       int "Number of 8250/16550 serial ports to register at runtime"
+       depends on SERIAL_8250
+       default "4"
+       help
+         Set this to the maximum number of serial ports you want
+         the kernel to register at boot time.  This can be overriden
+         with the module parameter "nr_uarts", or boot-time parameter
+         8250.nr_uarts
+
 config SERIAL_8250_EXTENDED
        bool "Extended 8250/16550 serial driver options"
        depends on SERIAL_8250
@@ -359,29 +369,6 @@ config SERIAL_21285_CONSOLE
          your boot loader (lilo or loadlin) about how to pass options to the
          kernel at boot time.)
 
-config SERIAL_UART00
-       bool "Excalibur serial port (uart00) support"
-       depends on ARM && ARCH_CAMELOT
-       select SERIAL_CORE
-       help
-         Say Y here if you want to use the hard logic uart on Excalibur. This
-         driver also supports soft logic implementations of this uart core.
-
-config SERIAL_UART00_CONSOLE
-       bool "Support for console on Excalibur serial port"
-       depends on SERIAL_UART00
-       select SERIAL_CORE_CONSOLE
-       help
-         Say Y here if you want to support a serial console on an Excalibur
-         hard logic uart or uart00 IP core.
-
-         Even if you say Y here, the currently visible virtual console
-         (/dev/tty0) will still be used as the system console by default, but
-         you can alter that using a kernel command line option such as
-         "console=ttyS1". (Try "man bootparam" or see the documentation of
-         your boot loader (lilo or loadlin) about how to pass options to the
-         kernel at boot time.)
-
 config SERIAL_MPSC
        bool "Marvell MPSC serial port support"
        depends on PPC32 && MV64X60
index d7c7c7180e33e73b020c404be919197b88eb92e0..137148bba4faa03c19fceaf7df281544e84a45f1 100644 (file)
@@ -29,7 +29,6 @@ obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o
 obj-$(CONFIG_SERIAL_PXA) += pxa.o
 obj-$(CONFIG_SERIAL_SA1100) += sa1100.o
 obj-$(CONFIG_SERIAL_S3C2410) += s3c2410.o
-obj-$(CONFIG_SERIAL_UART00) += uart00.o
 obj-$(CONFIG_SERIAL_SUNCORE) += suncore.o
 obj-$(CONFIG_SERIAL_SUNZILOG) += sunzilog.o
 obj-$(CONFIG_SERIAL_IP22_ZILOG) += ip22zilog.o
index 34c576dfad8dbd08290f023baeafc3b0941cd7ff..9589509fc5bd7b48584ececb3933cbed97b78bd2 100644 (file)
@@ -1440,6 +1440,7 @@ uart_block_til_ready(struct file *filp, struct uart_state *state)
                 * modem is ready for us.
                 */
                spin_lock_irq(&port->lock);
+               port->ops->enable_ms(port);
                mctrl = port->ops->get_mctrl(port);
                spin_unlock_irq(&port->lock);
                if (mctrl & TIOCM_CAR)
diff --git a/drivers/serial/uart00.c b/drivers/serial/uart00.c
deleted file mode 100644 (file)
index 47b504f..0000000
+++ /dev/null
@@ -1,782 +0,0 @@
-/*
- *  linux/drivers/serial/uart00.c
- *
- *  Driver for UART00 serial ports
- *
- *  Based on drivers/char/serial_amba.c, by ARM Limited & 
- *                                          Deep Blue Solutions Ltd.
- *  Copyright 2001 Altera Corporation
- *
- *  Update for 2.6.4 by Dirk Behme <dirk.behme@de.bosch.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- *  $Id: uart00.c,v 1.35 2002/07/28 10:03:28 rmk Exp $
- *
- */
-#include <linux/config.h>
-
-#if defined(CONFIG_SERIAL_UART00_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
-#define SUPPORT_SYSRQ
-#endif
-
-#include <linux/module.h>
-#include <linux/ioport.h>
-#include <linux/init.h>
-#include <linux/console.h>
-#include <linux/sysrq.h>
-#include <linux/tty.h>
-#include <linux/tty_flip.h>
-#include <linux/serial_core.h>
-#include <linux/serial.h>
-
-#include <asm/io.h>
-#include <asm/irq.h>
-#include <asm/sizes.h>
-
-#include <asm/arch/excalibur.h>
-#define UART00_TYPE (volatile unsigned int*)
-#include <asm/arch/uart00.h>
-#include <asm/arch/int_ctrl00.h>
-
-#define UART_NR                2
-
-#define SERIAL_UART00_NAME     "ttyUA"
-#define SERIAL_UART00_MAJOR    204
-#define SERIAL_UART00_MINOR    16      /* Temporary - will change in future */
-#define SERIAL_UART00_NR       UART_NR
-#define UART_PORT_SIZE 0x50
-
-#define UART00_ISR_PASS_LIMIT  256
-
-/*
- * Access macros for the UART00 UARTs
- */
-#define UART_GET_INT_STATUS(p) inl(UART_ISR((p)->membase))
-#define UART_PUT_IES(p, c)      outl(c,UART_IES((p)->membase))
-#define UART_GET_IES(p)         inl(UART_IES((p)->membase))
-#define UART_PUT_IEC(p, c)      outl(c,UART_IEC((p)->membase))
-#define UART_GET_IEC(p)         inl(UART_IEC((p)->membase))
-#define UART_PUT_CHAR(p, c)     outl(c,UART_TD((p)->membase))
-#define UART_GET_CHAR(p)        inl(UART_RD((p)->membase))
-#define UART_GET_RSR(p)         inl(UART_RSR((p)->membase))
-#define UART_GET_RDS(p)         inl(UART_RDS((p)->membase))
-#define UART_GET_MSR(p)         inl(UART_MSR((p)->membase))
-#define UART_GET_MCR(p)         inl(UART_MCR((p)->membase))
-#define UART_PUT_MCR(p, c)      outl(c,UART_MCR((p)->membase))
-#define UART_GET_MC(p)          inl(UART_MC((p)->membase))
-#define UART_PUT_MC(p, c)       outl(c,UART_MC((p)->membase))
-#define UART_GET_TSR(p)         inl(UART_TSR((p)->membase))
-#define UART_GET_DIV_HI(p)     inl(UART_DIV_HI((p)->membase))
-#define UART_PUT_DIV_HI(p,c)   outl(c,UART_DIV_HI((p)->membase))
-#define UART_GET_DIV_LO(p)     inl(UART_DIV_LO((p)->membase))
-#define UART_PUT_DIV_LO(p,c)   outl(c,UART_DIV_LO((p)->membase))
-#define UART_RX_DATA(s)                ((s) & UART_RSR_RX_LEVEL_MSK)
-#define UART_TX_READY(s)       (((s) & UART_TSR_TX_LEVEL_MSK) < 15)
-//#define UART_TX_EMPTY(p)     ((UART_GET_FR(p) & UART00_UARTFR_TMSK) == 0)
-
-static void uart00_stop_tx(struct uart_port *port)
-{
-       UART_PUT_IEC(port, UART_IEC_TIE_MSK);
-}
-
-static void uart00_stop_rx(struct uart_port *port)
-{
-       UART_PUT_IEC(port, UART_IEC_RE_MSK);
-}
-
-static void uart00_enable_ms(struct uart_port *port)
-{
-       UART_PUT_IES(port, UART_IES_ME_MSK);
-}
-
-static void
-uart00_rx_chars(struct uart_port *port, struct pt_regs *regs)
-{
-       struct tty_struct *tty = port->info->tty;
-       unsigned int status, ch, rds, flg, ignored = 0;
-
-       status = UART_GET_RSR(port);
-       while (UART_RX_DATA(status)) {
-               /* 
-                * We need to read rds before reading the 
-                * character from the fifo
-                */
-               rds = UART_GET_RDS(port);
-               ch = UART_GET_CHAR(port);
-               port->icount.rx++;
-
-               if (tty->flip.count >= TTY_FLIPBUF_SIZE)
-                       goto ignore_char;
-
-               flg = TTY_NORMAL;
-
-               /*
-                * Note that the error handling code is
-                * out of the main execution path
-                */
-               if (rds & (UART_RDS_BI_MSK |UART_RDS_FE_MSK|
-                          UART_RDS_PE_MSK |UART_RDS_PE_MSK))
-                       goto handle_error;
-               if (uart_handle_sysrq_char(port, ch, regs))
-                       goto ignore_char;
-
-       error_return:
-               tty_insert_flip_char(tty, ch, flg);
-
-       ignore_char:
-               status = UART_GET_RSR(port);
-       }
- out:
-       tty_flip_buffer_push(tty);
-       return;
-
- handle_error:
-       if (rds & UART_RDS_BI_MSK) {
-               status &= ~(UART_RDS_FE_MSK | UART_RDS_PE_MSK);
-               port->icount.brk++;
-               if (uart_handle_break(port))
-                       goto ignore_char;
-       } else if (rds & UART_RDS_PE_MSK)
-               port->icount.parity++;
-       else if (rds & UART_RDS_FE_MSK)
-               port->icount.frame++;
-       if (rds & UART_RDS_OE_MSK)
-               port->icount.overrun++;
-
-       if (rds & port->ignore_status_mask) {
-               if (++ignored > 100)
-                       goto out;
-               goto ignore_char;
-       }
-       rds &= port->read_status_mask;
-
-       if (rds & UART_RDS_BI_MSK)
-               flg = TTY_BREAK;
-       else if (rds & UART_RDS_PE_MSK)
-               flg = TTY_PARITY;
-       else if (rds & UART_RDS_FE_MSK)
-               flg = TTY_FRAME;
-
-       if (rds & UART_RDS_OE_MSK) {
-               /*
-                * CHECK: does overrun affect the current character?
-                * ASSUMPTION: it does not.
-                */
-               tty_insert_flip_char(tty, ch, flg);
-               ch = 0;
-               flg = TTY_OVERRUN;
-       }
-#ifdef SUPPORT_SYSRQ
-       port->sysrq = 0;
-#endif
-       goto error_return;
-}
-
-static void uart00_tx_chars(struct uart_port *port)
-{
-       struct circ_buf *xmit = &port->info->xmit;
-       int count;
-
-       if (port->x_char) {
-               while ((UART_GET_TSR(port) & UART_TSR_TX_LEVEL_MSK) == 15)
-                       barrier();
-               UART_PUT_CHAR(port, port->x_char);
-               port->icount.tx++;
-               port->x_char = 0;
-               return;
-       }
-       if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
-               uart00_stop_tx(port);
-               return;
-       }
-
-       count = port->fifosize >> 1;
-       do {
-               while ((UART_GET_TSR(port) & UART_TSR_TX_LEVEL_MSK) == 15)
-                       barrier();
-               UART_PUT_CHAR(port, xmit->buf[xmit->tail]);
-               xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
-               port->icount.tx++;
-               if (uart_circ_empty(xmit))
-                       break;
-       } while (--count > 0);
-
-       if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
-               uart_write_wakeup(port);
-
-       if (uart_circ_empty(xmit))
-               uart00_stop_tx(port);
-}
-
-static void uart00_start_tx(struct uart_port *port)
-{
-       UART_PUT_IES(port, UART_IES_TIE_MSK);
-       uart00_tx_chars(port);
-}
-
-static void uart00_modem_status(struct uart_port *port)
-{
-       unsigned int status;
-
-       status = UART_GET_MSR(port);
-
-       if (!(status & (UART_MSR_DCTS_MSK | UART_MSR_DDSR_MSK | 
-                       UART_MSR_TERI_MSK | UART_MSR_DDCD_MSK)))
-               return;
-
-       if (status & UART_MSR_DDCD_MSK)
-               uart_handle_dcd_change(port, status & UART_MSR_DCD_MSK);
-
-       if (status & UART_MSR_DDSR_MSK)
-               port->icount.dsr++;
-
-       if (status & UART_MSR_DCTS_MSK)
-               uart_handle_cts_change(port, status & UART_MSR_CTS_MSK);
-
-       wake_up_interruptible(&port->info->delta_msr_wait);
-}
-
-static irqreturn_t uart00_int(int irq, void *dev_id, struct pt_regs *regs)
-{
-       struct uart_port *port = dev_id;
-       unsigned int status, pass_counter = 0;
-
-       status = UART_GET_INT_STATUS(port);
-       do {
-               if (status & UART_ISR_RI_MSK)
-                       uart00_rx_chars(port, regs);
-               if (status & UART_ISR_MI_MSK)
-                       uart00_modem_status(port);
-               if (status & (UART_ISR_TI_MSK | UART_ISR_TII_MSK))
-                       uart00_tx_chars(port);
-               if (pass_counter++ > UART00_ISR_PASS_LIMIT)
-                       break;
-
-               status = UART_GET_INT_STATUS(port);
-       } while (status);
-
-       return IRQ_HANDLED;
-}
-
-static unsigned int uart00_tx_empty(struct uart_port *port)
-{
-       return UART_GET_TSR(port) & UART_TSR_TX_LEVEL_MSK? 0 : TIOCSER_TEMT;
-}
-
-static unsigned int uart00_get_mctrl(struct uart_port *port)
-{
-       unsigned int result = 0;
-       unsigned int status;
-
-       status = UART_GET_MSR(port);
-       if (status & UART_MSR_DCD_MSK)
-               result |= TIOCM_CAR;
-       if (status & UART_MSR_DSR_MSK)
-               result |= TIOCM_DSR;
-       if (status & UART_MSR_CTS_MSK)
-               result |= TIOCM_CTS;
-       if (status & UART_MSR_RI_MSK)
-               result |= TIOCM_RI;
-
-       return result;
-}
-
-static void uart00_set_mctrl_null(struct uart_port *port, unsigned int mctrl)
-{
-}
-
-static void uart00_break_ctl(struct uart_port *port, int break_state)
-{
-       unsigned long flags;
-       unsigned int mcr;
-
-       spin_lock_irqsave(&port->lock, flags);
-       mcr = UART_GET_MCR(port);
-       if (break_state == -1)
-               mcr |= UART_MCR_BR_MSK;
-       else
-               mcr &= ~UART_MCR_BR_MSK;
-       UART_PUT_MCR(port, mcr);
-       spin_unlock_irqrestore(&port->lock, flags);
-}
-
-static void
-uart00_set_termios(struct uart_port *port, struct termios *termios,
-                  struct termios *old)
-{
-       unsigned int uart_mc, old_ies, baud, quot;
-       unsigned long flags;
-
-       /*
-        * We don't support CREAD (yet)
-        */
-       termios->c_cflag |= CREAD;
-
-       /*
-        * Ask the core to calculate the divisor for us.
-        */
-       baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); 
-       quot = uart_get_divisor(port, baud);
-
-       /* byte size and parity */
-       switch (termios->c_cflag & CSIZE) {
-       case CS5:
-               uart_mc = UART_MC_CLS_CHARLEN_5;
-               break;
-       case CS6:
-               uart_mc = UART_MC_CLS_CHARLEN_6;
-               break;
-       case CS7:
-               uart_mc = UART_MC_CLS_CHARLEN_7;
-               break;
-       default: // CS8
-               uart_mc = UART_MC_CLS_CHARLEN_8;
-               break;
-       }
-       if (termios->c_cflag & CSTOPB)
-               uart_mc|= UART_MC_ST_TWO;
-       if (termios->c_cflag & PARENB) {
-               uart_mc |= UART_MC_PE_MSK;
-               if (!(termios->c_cflag & PARODD))
-                       uart_mc |= UART_MC_EP_MSK;
-       }
-
-       spin_lock_irqsave(&port->lock, flags);
-
-       /*
-        * Update the per-port timeout.
-        */
-       uart_update_timeout(port, termios->c_cflag, baud);
-
-       port->read_status_mask = UART_RDS_OE_MSK;
-       if (termios->c_iflag & INPCK)
-               port->read_status_mask |= UART_RDS_FE_MSK | UART_RDS_PE_MSK;
-       if (termios->c_iflag & (BRKINT | PARMRK))
-               port->read_status_mask |= UART_RDS_BI_MSK;
-
-       /*
-        * Characters to ignore
-        */
-       port->ignore_status_mask = 0;
-       if (termios->c_iflag & IGNPAR)
-               port->ignore_status_mask |= UART_RDS_FE_MSK | UART_RDS_PE_MSK;
-       if (termios->c_iflag & IGNBRK) {
-               port->ignore_status_mask |= UART_RDS_BI_MSK;
-               /*
-                * If we're ignoring parity and break indicators,
-                * ignore overruns to (for real raw support).
-                */
-               if (termios->c_iflag & IGNPAR)
-                       port->ignore_status_mask |= UART_RDS_OE_MSK;
-       }
-
-       /* first, disable everything */
-       old_ies = UART_GET_IES(port); 
-
-       if (UART_ENABLE_MS(port, termios->c_cflag))
-               old_ies |= UART_IES_ME_MSK;
-
-       /* Set baud rate */
-       UART_PUT_DIV_LO(port, (quot & 0xff));
-       UART_PUT_DIV_HI(port, ((quot & 0xf00) >> 8));
-
-       UART_PUT_MC(port, uart_mc);
-       UART_PUT_IES(port, old_ies);
-
-       spin_unlock_irqrestore(&port->lock, flags);
-}
-
-static int uart00_startup(struct uart_port *port)
-{
-       int result;
-
-       /*
-        * Allocate the IRQ
-        */
-       result = request_irq(port->irq, uart00_int, 0, "uart00", port);
-       if (result) {
-               printk(KERN_ERR "Request of irq %d failed\n", port->irq);
-               return result;
-       }
-
-       /*
-        * Finally, enable interrupts. Use the TII interrupt to minimise 
-        * the number of interrupts generated. If higher performance is 
-        * needed, consider using the TI interrupt with a suitable FIFO
-        * threshold
-        */
-       UART_PUT_IES(port, UART_IES_RE_MSK | UART_IES_TIE_MSK);
-
-       return 0;
-}
-
-static void uart00_shutdown(struct uart_port *port)
-{
-       /*
-        * disable all interrupts, disable the port
-        */
-       UART_PUT_IEC(port, 0xff);
-
-       /* disable break condition and fifos */
-       UART_PUT_MCR(port, UART_GET_MCR(port) &~UART_MCR_BR_MSK);
-
-        /*
-        * Free the interrupt
-        */
-       free_irq(port->irq, port);
-}
-
-static const char *uart00_type(struct uart_port *port)
-{
-       return port->type == PORT_UART00 ? "Altera UART00" : NULL;
-}
-
-/*
- * Release the memory region(s) being used by 'port'
- */
-static void uart00_release_port(struct uart_port *port)
-{
-       release_mem_region(port->mapbase, UART_PORT_SIZE);
-
-#ifdef CONFIG_ARCH_CAMELOT
-       if (port->membase != (void*)IO_ADDRESS(EXC_UART00_BASE)) {
-               iounmap(port->membase);
-       }
-#endif
-}
-
-/*
- * Request the memory region(s) being used by 'port'
- */
-static int uart00_request_port(struct uart_port *port)
-{
-       return request_mem_region(port->mapbase, UART_PORT_SIZE, "serial_uart00")
-                       != NULL ? 0 : -EBUSY;
-}
-
-/*
- * Configure/autoconfigure the port.
- */
-static void uart00_config_port(struct uart_port *port, int flags)
-{
-
-       /*
-        * Map the io memory if this is a soft uart
-        */
-       if (!port->membase)
-               port->membase = ioremap_nocache(port->mapbase,SZ_4K);
-
-       if (!port->membase)
-               printk(KERN_ERR "serial00: cannot map io memory\n");
-       else
-               port->type = PORT_UART00;
-
-}
-
-/*
- * verify the new serial_struct (for TIOCSSERIAL).
- */
-static int uart00_verify_port(struct uart_port *port, struct serial_struct *ser)
-{
-       int ret = 0;
-       if (ser->type != PORT_UNKNOWN && ser->type != PORT_UART00)
-               ret = -EINVAL;
-       if (ser->irq < 0 || ser->irq >= NR_IRQS)
-               ret = -EINVAL;
-       if (ser->baud_base < 9600)
-               ret = -EINVAL;
-       return ret;
-}
-
-static struct uart_ops uart00_pops = {
-       .tx_empty       = uart00_tx_empty,
-       .set_mctrl      = uart00_set_mctrl_null,
-       .get_mctrl      = uart00_get_mctrl,
-       .stop_tx        = uart00_stop_tx,
-       .start_tx       = uart00_start_tx,
-       .stop_rx        = uart00_stop_rx,
-       .enable_ms      = uart00_enable_ms,
-       .break_ctl      = uart00_break_ctl,
-       .startup        = uart00_startup,
-       .shutdown       = uart00_shutdown,
-       .set_termios    = uart00_set_termios,
-       .type           = uart00_type,
-       .release_port   = uart00_release_port,
-       .request_port   = uart00_request_port,
-       .config_port    = uart00_config_port,
-       .verify_port    = uart00_verify_port,
-};
-
-
-#ifdef CONFIG_ARCH_CAMELOT
-static struct uart_port epxa10db_port = {
-       .membase        = (void*)IO_ADDRESS(EXC_UART00_BASE),
-       .mapbase        = EXC_UART00_BASE,
-       .iotype         = SERIAL_IO_MEM,
-       .irq            = IRQ_UART,
-       .uartclk        = EXC_AHB2_CLK_FREQUENCY,
-       .fifosize       = 16,
-       .ops            = &uart00_pops,
-       .flags          = ASYNC_BOOT_AUTOCONF,
-};
-#endif
-
-
-#ifdef CONFIG_SERIAL_UART00_CONSOLE
-static void uart00_console_write(struct console *co, const char *s, unsigned count)
-{
-#ifdef CONFIG_ARCH_CAMELOT
-       struct uart_port *port = &epxa10db_port;
-       unsigned int status, old_ies;
-       int i;
-
-       /*
-        *      First save the CR then disable the interrupts
-        */
-       old_ies = UART_GET_IES(port);
-       UART_PUT_IEC(port,0xff);
-
-       /*
-        *      Now, do each character
-        */
-       for (i = 0; i < count; i++) {
-               do {
-                       status = UART_GET_TSR(port);
-               } while (!UART_TX_READY(status));
-               UART_PUT_CHAR(port, s[i]);
-               if (s[i] == '\n') {
-                       do {
-                               status = UART_GET_TSR(port);
-                       } while (!UART_TX_READY(status));
-                       UART_PUT_CHAR(port, '\r');
-               }
-       }
-
-       /*
-        *      Finally, wait for transmitter to become empty
-        *      and restore the IES
-        */
-       do {
-               status = UART_GET_TSR(port);
-       } while (status & UART_TSR_TX_LEVEL_MSK);
-       UART_PUT_IES(port, old_ies);
-#endif
-}
-
-static void __init
-uart00_console_get_options(struct uart_port *port, int *baud,
-                          int *parity, int *bits)
-{
-       unsigned int uart_mc, quot;
-
-       uart_mc = UART_GET_MC(port);
-
-       *parity = 'n';
-       if (uart_mc & UART_MC_PE_MSK) {
-               if (uart_mc & UART_MC_EP_MSK)
-                       *parity = 'e';
-               else
-                       *parity = 'o';
-       }
-
-       switch (uart_mc & UART_MC_CLS_MSK) {
-       case UART_MC_CLS_CHARLEN_5:
-               *bits = 5;
-               break;
-       case UART_MC_CLS_CHARLEN_6:
-               *bits = 6;
-               break;
-       case UART_MC_CLS_CHARLEN_7:
-               *bits = 7;
-               break;
-       case UART_MC_CLS_CHARLEN_8:
-               *bits = 8;
-               break;
-       }
-       quot = UART_GET_DIV_LO(port) | (UART_GET_DIV_HI(port) << 8);
-       *baud = port->uartclk / (16 *quot );
-}
-
-static int __init uart00_console_setup(struct console *co, char *options)
-{
-       struct uart_port *port;
-       int baud = 115200;
-       int bits = 8;
-       int parity = 'n';
-       int flow = 'n';
-
-#ifdef CONFIG_ARCH_CAMELOT
-       port = &epxa10db_port;             ;
-#else
-       return -ENODEV;
-#endif
-       if (options)
-               uart_parse_options(options, &baud, &parity, &bits, &flow);
-       else
-               uart00_console_get_options(port, &baud, &parity, &bits);
-
-       return uart_set_options(port, co, baud, parity, bits, flow);
-}
-
-extern struct uart_driver uart00_reg;
-static struct console uart00_console = {
-       .name           = SERIAL_UART00_NAME,
-       .write          = uart00_console_write,
-       .device         = uart_console_device,
-       .setup          = uart00_console_setup,
-       .flags          = CON_PRINTBUFFER,
-       .index          = 0,
-       .data           = &uart00_reg,
-};
-
-static int __init uart00_console_init(void)
-{
-       register_console(&uart00_console);
-       return 0;
-}
-console_initcall(uart00_console_init);
-
-#define UART00_CONSOLE &uart00_console
-#else
-#define UART00_CONSOLE NULL
-#endif
-
-static struct uart_driver uart00_reg = {
-       .owner                  = NULL,
-       .driver_name            = SERIAL_UART00_NAME,
-       .dev_name               = SERIAL_UART00_NAME,
-       .major                  = SERIAL_UART00_MAJOR,
-       .minor                  = SERIAL_UART00_MINOR,
-       .nr                     = UART_NR,
-       .cons                   = UART00_CONSOLE,
-};
-
-struct dev_port_entry{
-       unsigned int base_addr;
-       struct uart_port *port;
-};
-
-#ifdef CONFIG_PLD_HOTSWAP
-
-static struct dev_port_entry dev_port_map[UART_NR];
-
-/*
- * Keep a mapping of dev_info addresses -> port lines to use when
- * removing ports dev==NULL indicates unused entry
- */
-
-struct uart00_ps_data{
-       unsigned int clk;
-       unsigned int fifosize;
-};
-
-int uart00_add_device(struct pldhs_dev_info* dev_info, void* dev_ps_data)
-{
-       struct uart00_ps_data* dev_ps=dev_ps_data;
-       struct uart_port * port;
-       int i,result;
-
-       i=0;
-       while(dev_port_map[i].port)
-               i++;
-
-       if(i==UART_NR){
-               printk(KERN_WARNING "uart00: Maximum number of ports reached\n");
-               return 0;
-       }
-
-       port=kmalloc(sizeof(struct uart_port),GFP_KERNEL);
-       if(!port)
-               return -ENOMEM;
-
-       printk("clk=%d fifo=%d\n",dev_ps->clk,dev_ps->fifosize);
-       port->membase=0;
-       port->mapbase=dev_info->base_addr;
-       port->iotype=SERIAL_IO_MEM;
-       port->irq=dev_info->irq;
-       port->uartclk=dev_ps->clk;
-       port->fifosize=dev_ps->fifosize;
-       port->ops=&uart00_pops;
-       port->line=i;
-       port->flags=ASYNC_BOOT_AUTOCONF;
-
-       result=uart_add_one_port(&uart00_reg, port);
-       if(result){
-               printk("uart_add_one_port returned %d\n",result);
-               return result;
-       }
-       dev_port_map[i].base_addr=dev_info->base_addr;
-       dev_port_map[i].port=port;
-       printk("uart00: added device at %x as ttyUA%d\n",dev_port_map[i].base_addr,i);
-       return 0;
-
-}
-
-int uart00_remove_devices(void)
-{
-       int i,result;
-
-
-       result=0;
-       for(i=1;i<UART_NR;i++){
-               if(dev_port_map[i].base_addr){
-                       result=uart_remove_one_port(&uart00_reg, dev_port_map[i].port);
-                       if(result)
-                               return result;
-
-                       /* port removed sucessfully, so now tidy up */
-                       kfree(dev_port_map[i].port);
-                       dev_port_map[i].base_addr=0;
-                       dev_port_map[i].port=NULL;
-               }
-       }
-       return 0;
-
-}
-
-struct pld_hotswap_ops uart00_pldhs_ops={
-       .name           = "uart00",
-       .add_device     = uart00_add_device,
-       .remove_devices = uart00_remove_devices,
-};
-
-#endif
-
-static int __init uart00_init(void)
-{
-       int result;
-
-       printk(KERN_INFO "Serial: UART00 driver $Revision: 1.35 $\n");
-
-       printk(KERN_WARNING "serial_uart00:Using temporary major/minor pairs"
-               " - these WILL change in the future\n");
-
-       result = uart_register_driver(&uart00_reg);
-       if (result)
-               return result;
-#ifdef CONFIG_ARCH_CAMELOT
-       result = uart_add_one_port(&uart00_reg,&epxa10db_port);
-#endif
-       if (result)
-               uart_unregister_driver(&uart00_reg);
-
-#ifdef  CONFIG_PLD_HOTSWAP
-       pldhs_register_driver(&uart00_pldhs_ops);
-#endif
-       return result;
-}
-
-__initcall(uart00_init);
index a9300f930ef2a3022390758efd4271606fc39f6b..55a3514157ed743e09035bdf9a866d8f7e942deb 100644 (file)
@@ -50,7 +50,6 @@
 #include <linux/init.h>
 
 #include <asm/io.h>
-#include <asm/irq.h>
 #include <asm/pgtable.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
index 2ea1354e439ff2d5e65a412fe2dbc1dfe41132c0..087e58689e4c46486bfde6331db3e6f37e8e33fe 100644 (file)
 
 #include <asm/hardware.h>
 #include <asm/io.h>
-#include <asm/irq.h>
 #include <asm/mach-types.h>
 #include <asm/uaccess.h>
 #include <asm/arch/assabet.h>
@@ -1455,7 +1454,11 @@ static struct sa1100fb_info * __init sa1100fb_init_fbinfo(struct device *dev)
 static int __init sa1100fb_probe(struct platform_device *pdev)
 {
        struct sa1100fb_info *fbi;
-       int ret;
+       int ret, irq;
+
+       irq = platform_get_irq(pdev, 0);
+       if (irq <= 0)
+               return -EINVAL;
 
        if (!request_mem_region(0xb0100000, 0x10000, "LCD"))
                return -EBUSY;
@@ -1470,7 +1473,7 @@ static int __init sa1100fb_probe(struct platform_device *pdev)
        if (ret)
                goto failed;
 
-       ret = request_irq(IRQ_LCD, sa1100fb_handle_irq, SA_INTERRUPT,
+       ret = request_irq(irq, sa1100fb_handle_irq, SA_INTERRUPT,
                          "LCD", fbi);
        if (ret) {
                printk(KERN_ERR "sa1100fb: request_irq failed: %d\n", ret);
@@ -1492,7 +1495,7 @@ static int __init sa1100fb_probe(struct platform_device *pdev)
 
        ret = register_framebuffer(&fbi->fb);
        if (ret < 0)
-               goto failed;
+               goto err_free_irq;
 
 #ifdef CONFIG_CPU_FREQ
        fbi->freq_transition.notifier_call = sa1100fb_freq_transition;
@@ -1504,7 +1507,9 @@ static int __init sa1100fb_probe(struct platform_device *pdev)
        /* This driver cannot be unloaded at the moment */
        return 0;
 
-failed:
+ err_free_irq:
+       free_irq(irq, fbi);
+ failed:
        platform_set_drvdata(pdev, NULL);
        kfree(fbi);
        release_mem_region(0xb0100000, 0x10000);
index e227a04261abed002ef1aa88ae8e3884a1836640..7490cc9208b35d743337a51019f32e0b914ae0db 100644 (file)
@@ -21,26 +21,30 @@ config ACORN_PARTITION
          Support hard disks partitioned under Acorn operating systems.
 
 config ACORN_PARTITION_CUMANA
-       bool "Cumana partition support" if PARTITION_ADVANCED && ACORN_PARTITION
+       bool "Cumana partition support" if PARTITION_ADVANCED
        default y if ARCH_ACORN
+       depends on ACORN_PARTITION
        help
          Say Y here if you would like to use hard disks under Linux which
          were partitioned using the Cumana interface on Acorn machines.
 
 config ACORN_PARTITION_EESOX
-       bool "EESOX partition support" if PARTITION_ADVANCED && ACORN_PARTITION
+       bool "EESOX partition support" if PARTITION_ADVANCED
        default y if ARCH_ACORN
+       depends on ACORN_PARTITION
 
 config ACORN_PARTITION_ICS
-       bool "ICS partition support" if PARTITION_ADVANCED && ACORN_PARTITION
+       bool "ICS partition support" if PARTITION_ADVANCED
        default y if ARCH_ACORN
+       depends on ACORN_PARTITION
        help
          Say Y here if you would like to use hard disks under Linux which
          were partitioned using the ICS interface on Acorn machines.
 
 config ACORN_PARTITION_ADFS
-       bool "Native filecore partition support" if PARTITION_ADVANCED && ACORN_PARTITION
+       bool "Native filecore partition support" if PARTITION_ADVANCED
        default y if ARCH_ACORN
+       depends on ACORN_PARTITION
        help
          The Acorn Disc Filing System is the standard file system of the
          RiscOS operating system which runs on Acorn's ARM-based Risc PC
@@ -48,15 +52,17 @@ config ACORN_PARTITION_ADFS
          `Y' here, Linux will support disk partitions created under ADFS.
 
 config ACORN_PARTITION_POWERTEC
-       bool "PowerTec partition support" if PARTITION_ADVANCED && ACORN_PARTITION
+       bool "PowerTec partition support" if PARTITION_ADVANCED
        default y if ARCH_ACORN
+       depends on ACORN_PARTITION
        help
          Support reading partition tables created on Acorn machines using
          the PowerTec SCSI drive.
 
 config ACORN_PARTITION_RISCIX
-       bool "RISCiX partition support" if PARTITION_ADVANCED && ACORN_PARTITION
+       bool "RISCiX partition support" if PARTITION_ADVANCED
        default y if ARCH_ACORN
+       depends on ACORN_PARTITION
        help
          Once upon a time, there was a native Unix port for the Acorn series
          of machines called RISCiX.  If you say 'Y' here, Linux will be able
@@ -224,5 +230,3 @@ config EFI_PARTITION
          Say Y here if you would like to use hard disks under Linux which
          were partitioned using EFI GPT.  Presently only useful on the
          IA-64 platform.
-
-#      define_bool CONFIG_ACORN_PARTITION_CUMANA y
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200.h b/include/asm-arm/arch-at91rm9200/at91rm9200.h
new file mode 100644 (file)
index 0000000..58f4093
--- /dev/null
@@ -0,0 +1,261 @@
+/*
+ * include/asm-arm/arch-at91rm9200/at91rm9200.h
+ *
+ * Copyright (C) 2005 Ivan Kokshaysky
+ * Copyright (C) SAN People
+ *
+ * Common definitions.
+ * Based on AT91RM9200 datasheet revision E.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef AT91RM9200_H
+#define AT91RM9200_H
+
+/*
+ * Peripheral identifiers/interrupts.
+ */
+#define AT91_ID_FIQ    0       /* Advanced Interrupt Controller (FIQ) */
+#define AT91_ID_SYS    1       /* System Peripheral */
+#define AT91_ID_PIOA   2       /* Parallel IO Controller A */
+#define AT91_ID_PIOB   3       /* Parallel IO Controller B */
+#define AT91_ID_PIOC   4       /* Parallel IO Controller C */
+#define AT91_ID_PIOD   5       /* Parallel IO Controller D */
+#define AT91_ID_US0    6       /* USART 0 */
+#define AT91_ID_US1    7       /* USART 1 */
+#define AT91_ID_US2    8       /* USART 2 */
+#define AT91_ID_US3    9       /* USART 3 */
+#define AT91_ID_MCI    10      /* Multimedia Card Interface */
+#define AT91_ID_UDP    11      /* USB Device Port */
+#define AT91_ID_TWI    12      /* Two-Wire Interface */
+#define AT91_ID_SPI    13      /* Serial Peripheral Interface */
+#define AT91_ID_SSC0   14      /* Serial Synchronous Controller 0 */
+#define AT91_ID_SSC1   15      /* Serial Synchronous Controller 1 */
+#define AT91_ID_SSC2   16      /* Serial Synchronous Controller 2 */
+#define AT91_ID_TC0    17      /* Timer Counter 0 */
+#define AT91_ID_TC1    18      /* Timer Counter 1 */
+#define AT91_ID_TC2    19      /* Timer Counter 2 */
+#define AT91_ID_TC3    20      /* Timer Counter 3 */
+#define AT91_ID_TC4    21      /* Timer Counter 4 */
+#define AT91_ID_TC5    22      /* Timer Counter 5 */
+#define AT91_ID_UHP    23      /* USB Host port */
+#define AT91_ID_EMAC   24      /* Ethernet MAC */
+#define AT91_ID_IRQ0   25      /* Advanced Interrupt Controller (IRQ0) */
+#define AT91_ID_IRQ1   26      /* Advanced Interrupt Controller (IRQ1) */
+#define AT91_ID_IRQ2   27      /* Advanced Interrupt Controller (IRQ2) */
+#define AT91_ID_IRQ3   28      /* Advanced Interrupt Controller (IRQ3) */
+#define AT91_ID_IRQ4   29      /* Advanced Interrupt Controller (IRQ4) */
+#define AT91_ID_IRQ5   30      /* Advanced Interrupt Controller (IRQ5) */
+#define AT91_ID_IRQ6   31      /* Advanced Interrupt Controller (IRQ6) */
+
+
+/*
+ * Peripheral physical base addresses.
+ */
+#define AT91_BASE_TCB0         0xfffa0000
+#define AT91_BASE_TC0          0xfffa0000
+#define AT91_BASE_TC1          0xfffa0040
+#define AT91_BASE_TC2          0xfffa0080
+#define AT91_BASE_TCB1         0xfffa4000
+#define AT91_BASE_TC3          0xfffa4000
+#define AT91_BASE_TC4          0xfffa4040
+#define AT91_BASE_TC5          0xfffa4080
+#define AT91_BASE_UDP          0xfffb0000
+#define AT91_BASE_MCI          0xfffb4000
+#define AT91_BASE_TWI          0xfffb8000
+#define AT91_BASE_EMAC         0xfffbc000
+#define AT91_BASE_US0          0xfffc0000
+#define AT91_BASE_US1          0xfffc4000
+#define AT91_BASE_US2          0xfffc8000
+#define AT91_BASE_US3          0xfffcc000
+#define AT91_BASE_SSC0         0xfffd0000
+#define AT91_BASE_SSC1         0xfffd4000
+#define AT91_BASE_SSC2         0xfffd8000
+#define AT91_BASE_SPI          0xfffe0000
+#define AT91_BASE_SYS          0xfffff000
+
+
+/*
+ * PIO pin definitions (peripheral A/B multiplexing).
+ */
+#define AT91_PA0_MISO          (1 <<  0)       /* A: SPI Master-In Slave-Out */
+#define AT91_PA0_PCK3          (1 <<  0)       /* B: PMC Programmable Clock Output 3 */
+#define AT91_PA1_MOSI          (1 <<  1)       /* A: SPI Master-Out Slave-In */
+#define AT91_PA1_PCK0          (1 <<  1)       /* B: PMC Programmable Clock Output 0 */
+#define AT91_PA2_SPCK          (1 <<  2)       /* A: SPI Serial Clock */
+#define AT91_PA2_IRQ4          (1 <<  2)       /* B: External Interrupt 4 */
+#define AT91_PA3_NPCS0         (1 <<  3)       /* A: SPI Peripheral Chip Select 0 */
+#define AT91_PA3_IRQ5          (1 <<  3)       /* B: External Interrupt 5 */
+#define AT91_PA4_NPCS1         (1 <<  4)       /* A: SPI Peripheral Chip Select 1 */
+#define AT91_PA4_PCK1          (1 <<  4)       /* B: PMC Programmable Clock Output 1 */
+#define AT91_PA5_NPCS2         (1 <<  5)       /* A: SPI Peripheral Chip Select 2 */
+#define AT91_PA5_TXD3          (1 <<  5)       /* B: USART Transmit Data 3 */
+#define AT91_PA6_NPCS3         (1 <<  6)       /* A: SPI Peripheral Chip Select 3 */
+#define AT91_PA6_RXD3          (1 <<  6)       /* B: USART Receive Data 3 */
+#define AT91_PA7_ETXCK_EREFCK  (1 <<  7)       /* A: Ethernet Reference Clock / Transmit Clock */
+#define AT91_PA7_PCK2          (1 <<  7)       /* B: PMC Programmable Clock Output 2 */
+#define AT91_PA8_ETXEN         (1 <<  8)       /* A: Ethernet Transmit Enable */
+#define AT91_PA8_MCCDB         (1 <<  8)       /* B: MMC Multimedia Card B Command */
+#define AT91_PA9_ETX0          (1 <<  9)       /* A: Ethernet Transmit Data 0 */
+#define AT91_PA9_MCDB0         (1 <<  9)       /* B: MMC Multimedia Card B Data 0 */
+#define AT91_PA10_ETX1         (1 << 10)       /* A: Ethernet Transmit Data 1 */
+#define AT91_PA10_MCDB1                (1 << 10)       /* B: MMC Multimedia Card B Data 1 */
+#define AT91_PA11_ECRS_ECRSDV  (1 << 11)       /* A: Ethernet Carrier Sense / Data Valid */
+#define AT91_PA11_MCDB2                (1 << 11)       /* B: MMC Multimedia Card B Data 2 */
+#define AT91_PA12_ERX0         (1 << 12)       /* A: Ethernet Receive Data 0 */
+#define AT91_PA12_MCDB3                (1 << 12)       /* B: MMC Multimedia Card B Data 3 */
+#define AT91_PA13_ERX1         (1 << 13)       /* A: Ethernet Receive Data 1 */
+#define AT91_PA13_TCLK0                (1 << 13)       /* B: TC External Clock Input 0 */
+#define AT91_PA14_ERXER                (1 << 14)       /* A: Ethernet Receive Error */
+#define AT91_PA14_TCLK1                (1 << 14)       /* B: TC External Clock Input 1 */
+#define AT91_PA15_EMDC         (1 << 15)       /* A: Ethernet Management Data Clock */
+#define AT91_PA15_TCLK2                (1 << 15)       /* B: TC External Clock Input 2 */
+#define AT91_PA16_EMDIO                (1 << 16)       /* A: Ethernet Management Data I/O */
+#define AT91_PA16_IRQ6         (1 << 16)       /* B: External Interrupt 6 */
+#define AT91_PA17_TXD0         (1 << 17)       /* A: USART Transmit Data 0 */
+#define AT91_PA17_TIOA0                (1 << 17)       /* B: TC I/O Line A 0 */
+#define AT91_PA18_RXD0         (1 << 18)       /* A: USART Receive Data 0 */
+#define AT91_PA18_TIOB0                (1 << 18)       /* B: TC I/O Line B 0 */
+#define AT91_PA19_SCK0         (1 << 19)       /* A: USART Serial Clock 0 */
+#define AT91_PA19_TIOA1                (1 << 19)       /* B: TC I/O Line A 1 */
+#define AT91_PA20_CTS0         (1 << 20)       /* A: USART Clear To Send 0 */
+#define AT91_PA20_TIOB1                (1 << 20)       /* B: TC I/O Line B 1 */
+#define AT91_PA21_RTS0         (1 << 21)       /* A: USART Ready To Send 0 */
+#define AT91_PA21_TIOA2                (1 << 21)       /* B: TC I/O Line A 2 */
+#define AT91_PA22_RXD2         (1 << 22)       /* A: USART Receive Data 2 */
+#define AT91_PA22_TIOB2                (1 << 22)       /* B: TC I/O Line B 2 */
+#define AT91_PA23_TXD2         (1 << 23)       /* A: USART Transmit Data 2 */
+#define AT91_PA23_IRQ3         (1 << 23)       /* B: External Interrupt 3 */
+#define AT91_PA24_SCK2         (1 << 24)       /* A: USART Serial Clock 2 */
+#define AT91_PA24_PCK1         (1 << 24)       /* B: PMC Programmable Clock Output 1 */
+#define AT91_PA25_TWD          (1 << 25)       /* A: TWI Two-wire Serial Data */
+#define AT91_PA25_IRQ2         (1 << 25)       /* B: External Interrupt 2 */
+#define AT91_PA26_TWCK         (1 << 26)       /* A: TWI Two-wire Serial Clock */
+#define AT91_PA26_IRQ1         (1 << 26)       /* B: External Interrupt 1 */
+#define AT91_PA27_MCCK         (1 << 27)       /* A: MMC Multimedia Card Clock */
+#define AT91_PA27_TCLK3                (1 << 27)       /* B: TC External Clock Input 3 */
+#define AT91_PA28_MCCDA                (1 << 28)       /* A: MMC Multimedia Card A Command */
+#define AT91_PA28_TCLK4                (1 << 28)       /* B: TC External Clock Input 4 */
+#define AT91_PA29_MCDA0                (1 << 29)       /* A: MMC Multimedia Card A Data 0 */
+#define AT91_PA29_TCLK5                (1 << 29)       /* B: TC External Clock Input 5 */
+#define AT91_PA30_DRXD         (1 << 30)       /* A: DBGU Receive Data */
+#define AT91_PA30_CTS2         (1 << 30)       /* B: USART Clear To Send 2 */
+#define AT91_PA31_DTXD         (1 << 31)       /* A: DBGU Transmit Data */
+#define AT91_PA31_RTS2         (1 << 31)       /* B: USART Ready To Send 2 */
+
+#define AT91_PB0_TF0           (1 <<  0)       /* A: SSC Transmit Frame Sync 0 */
+#define AT91_PB0_RTS3          (1 <<  0)       /* B: USART Ready To Send 3 */
+#define AT91_PB1_TK0           (1 <<  1)       /* A: SSC Transmit Clock 0 */
+#define AT91_PB1_CTS3          (1 <<  1)       /* B: USART Clear To Send 3 */
+#define AT91_PB2_TD0           (1 <<  2)       /* A: SSC Transmit Data 0 */
+#define AT91_PB2_SCK3          (1 <<  2)       /* B: USART Serial Clock 3 */
+#define AT91_PB3_RD0           (1 <<  3)       /* A: SSC Receive Data 0 */
+#define AT91_PB3_MCDA1         (1 <<  3)       /* B: MMC Multimedia Card A Data 1 */
+#define AT91_PB4_RK0           (1 <<  4)       /* A: SSC Receive Clock 0 */
+#define AT91_PB4_MCDA2         (1 <<  4)       /* B: MMC Multimedia Card A Data 2 */
+#define AT91_PB5_RF0           (1 <<  5)       /* A: SSC Receive Frame Sync 0 */
+#define AT91_PB5_MCDA3         (1 <<  5)       /* B: MMC Multimedia Card A Data 3 */
+#define AT91_PB6_TF1           (1 <<  6)       /* A: SSC Transmit Frame Sync 1 */
+#define AT91_PB6_TIOA3         (1 <<  6)       /* B: TC I/O Line A 3 */
+#define AT91_PB7_TK1           (1 <<  7)       /* A: SSC Transmit Clock 1 */
+#define AT91_PB7_TIOB3         (1 <<  7)       /* B: TC I/O Line B 3 */
+#define AT91_PB8_TD1           (1 <<  8)       /* A: SSC Transmit Data 1 */
+#define AT91_PB8_TIOA4         (1 <<  8)       /* B: TC I/O Line A 4 */
+#define AT91_PB9_RD1           (1 <<  9)       /* A: SSC Receive Data 1 */
+#define AT91_PB9_TIOB4         (1 <<  9)       /* B: TC I/O Line B 4 */
+#define AT91_PB10_RK1          (1 << 10)       /* A: SSC Receive Clock 1 */
+#define AT91_PB10_TIOA5                (1 << 10)       /* B: TC I/O Line A 5 */
+#define AT91_PB11_RF1          (1 << 11)       /* A: SSC Receive Frame Sync 1 */
+#define AT91_PB11_TIOB5                (1 << 11)       /* B: TC I/O Line B 5 */
+#define AT91_PB12_TF2          (1 << 12)       /* A: SSC Transmit Frame Sync 2 */
+#define AT91_PB12_ETX2         (1 << 12)       /* B: Ethernet Transmit Data 2 */
+#define AT91_PB13_TK2          (1 << 13)       /* A: SSC Transmit Clock 3 */
+#define AT91_PB13_ETX3         (1 << 13)       /* B: Ethernet Transmit Data 3 */
+#define AT91_PB14_TD2          (1 << 14)       /* A: SSC Transmit Data 2 */
+#define AT91_PB14_ETXER                (1 << 14)       /* B: Ethernet Transmit Coding Error */
+#define AT91_PB15_RD2          (1 << 15)       /* A: SSC Receive Data 2 */
+#define AT91_PB15_ERX2         (1 << 15)       /* B: Ethernet Receive Data 2 */
+#define AT91_PB16_RK2          (1 << 16)       /* A: SSC Receive Clock 2 */
+#define AT91_PB16_ERX3         (1 << 16)       /* B: Ethernet Receive Data 3 */
+#define AT91_PB17_RF2          (1 << 17)       /* A: SSC Receive Frame Sync 2 */
+#define AT91_PB17_ERXDV                (1 << 17)       /* B: Ethernet Receive Data Valid */
+#define AT91_PB18_RI1          (1 << 18)       /* A: USART Ring Indicator 1 */
+#define AT91_PB18_ECOL         (1 << 18)       /* B: Ethernet Collision Detected */
+#define AT91_PB19_DTR1         (1 << 19)       /* A: USART Data Terminal Ready 1 */
+#define AT91_PB19_ERXCK                (1 << 19)       /* B: Ethernet Receive Clock */
+#define AT91_PB20_TXD1         (1 << 20)       /* A: USART Transmit Data 1 */
+#define AT91_PB21_RXD1         (1 << 21)       /* A: USART Receive Data 1 */
+#define AT91_PB22_SCK1         (1 << 22)       /* A: USART Serial Clock 1 */
+#define AT91_PB23_DCD1         (1 << 23)       /* A: USART Data Carrier Detect 1 */
+#define AT91_PB24_CTS1         (1 << 24)       /* A: USART Clear To Send 1 */
+#define AT91_PB25_DSR1         (1 << 25)       /* A: USART Data Set Ready 1 */
+#define AT91_PB25_EF100                (1 << 25)       /* B: Ethernet Force 100 Mbit */
+#define AT91_PB26_RTS1         (1 << 26)       /* A: USART Ready To Send 1 */
+#define AT91_PB27_PCK0         (1 << 27)       /* B: PMC Programmable Clock Output 0 */
+#define AT91_PB28_FIQ          (1 << 28)       /* A: Fast Interrupt */
+#define AT91_PB29_IRQ0         (1 << 29)       /* A: External Interrupt 0 */
+
+#define AT91_PC0_BFCK          (1 <<  0)       /* A: Burst Flash Clock */
+#define AT91_PC1_BFRDY_SMOE    (1 <<  1)       /* A: Burst Flash Ready / SmartMedia Output Enable */
+#define AT91_PC2_BFAVD         (1 <<  2)       /* A: Burst Flash Address Valid */
+#define AT91_PC3_BFBAA_SMWE    (1 <<  3)       /* A: Burst Flash Address Advance / SmartMedia Write Enable */
+#define AT91_PC4_BFOE          (1 <<  4)       /* A: Burst Flash Output Enable */
+#define AT91_PC5_BFWE          (1 <<  5)       /* A: Burst Flash Write Enable */
+#define AT91_PC6_NWAIT         (1 <<  6)       /* A: SMC Wait Signal */
+#define AT91_PC7_A23           (1 <<  7)       /* A: Address Bus 23 */
+#define AT91_PC8_A24           (1 <<  8)       /* A: Address Bus 24 */
+#define AT91_PC9_A25_CFRNW     (1 <<  9)       /* A: Address Bus 25 / Compact Flash Read Not Write */
+#define AT91_PC10_NCS4_CFCS    (1 << 10)       /* A: SMC Chip Select 4 / Compact Flash Chip Select */
+#define AT91_PC11_NCS5_CFCE1   (1 << 11)       /* A: SMC Chip Select 5 / Compact Flash Chip Enable 1 */
+#define AT91_PC12_NCS6_CFCE2   (1 << 12)       /* A: SMC Chip Select 6 / Compact Flash Chip Enable 2 */
+#define AT91_PC13_NCS7         (1 << 13)       /* A: Chip Select 7 */
+
+#define AT91_PD0_ETX0          (1 <<  0)       /* A: Ethernet Transmit Data 0 */
+#define AT91_PD1_ETX1          (1 <<  1)       /* A: Ethernet Transmit Data 1 */
+#define AT91_PD2_ETX2          (1 <<  2)       /* A: Ethernet Transmit Data 2 */
+#define AT91_PD3_ETX3          (1 <<  3)       /* A: Ethernet Transmit Data 3 */
+#define AT91_PD4_ETXEN         (1 <<  4)       /* A: Ethernet Transmit Enable */
+#define AT91_PD5_ETXER         (1 <<  5)       /* A: Ethernet Transmit Coding Error */
+#define AT91_PD6_DTXD          (1 <<  6)       /* A: DBGU Transmit Data */
+#define AT91_PD7_PCK0          (1 <<  7)       /* A: PMC Programmable Clock Output 0 */
+#define AT91_PD7_TSYNC         (1 <<  7)       /* B: ETM Trace Synchronization Signal */
+#define AT91_PD8_PCK1          (1 <<  8)       /* A: PMC Programmable Clock Output 1 */
+#define AT91_PD8_TCLK          (1 <<  8)       /* B: ETM Trace Clock */
+#define AT91_PD9_PCK2          (1 <<  9)       /* A: PMC Programmable Clock Output 2 */
+#define AT91_PD9_TPS0          (1 <<  9)       /* B: ETM Trace ARM Pipeline Status 0 */
+#define AT91_PD10_PCK3         (1 << 10)       /* A: PMC Programmable Clock Output 3 */
+#define AT91_PD10_TPS1         (1 << 10)       /* B: ETM Trace ARM Pipeline Status 1 */
+#define AT91_PD11_TPS2         (1 << 11)       /* B: ETM Trace ARM Pipeline Status 2 */
+#define AT91_PD12_TPK0         (1 << 12)       /* B: ETM Trace Packet Port 0 */
+#define AT91_PD13_TPK1         (1 << 13)       /* B: ETM Trace Packet Port 1 */
+#define AT91_PD14_TPK2         (1 << 14)       /* B: ETM Trace Packet Port 2 */
+#define AT91_PD15_TD0          (1 << 15)       /* A: SSC Transmit Data 0 */
+#define AT91_PD15_TPK3         (1 << 15)       /* B: ETM Trace Packet Port 3 */
+#define AT91_PD16_TD1          (1 << 16)       /* A: SSC Transmit Data 1 */
+#define AT91_PD16_TPK4         (1 << 16)       /* B: ETM Trace Packet Port 4 */
+#define AT91_PD17_TD2          (1 << 17)       /* A: SSC Transmit Data 2 */
+#define AT91_PD17_TPK5         (1 << 17)       /* B: ETM Trace Packet Port 5 */
+#define AT91_PD18_NPCS1                (1 << 18)       /* A: SPI Peripheral Chip Select 1 */
+#define AT91_PD18_TPK6         (1 << 18)       /* B: ETM Trace Packet Port 6 */
+#define AT91_PD19_NPCS2                (1 << 19)       /* A: SPI Peripheral Chip Select 2 */
+#define AT91_PD19_TPK7         (1 << 19)       /* B: ETM Trace Packet Port 7 */
+#define AT91_PD20_NPCS3                (1 << 20)       /* A: SPI Peripheral Chip Select 3 */
+#define AT91_PD20_TPK8         (1 << 20)       /* B: ETM Trace Packet Port 8 */
+#define AT91_PD21_RTS0         (1 << 21)       /* A: USART Ready To Send 0 */
+#define AT91_PD21_TPK9         (1 << 21)       /* B: ETM Trace Packet Port 9 */
+#define AT91_PD22_RTS1         (1 << 22)       /* A: USART Ready To Send 1 */
+#define AT91_PD22_TPK10                (1 << 22)       /* B: ETM Trace Packet Port 10 */
+#define AT91_PD23_RTS2         (1 << 23)       /* A: USART Ready To Send 2 */
+#define AT91_PD23_TPK11                (1 << 23)       /* B: ETM Trace Packet Port 11 */
+#define AT91_PD24_RTS3         (1 << 24)       /* A: USART Ready To Send 3 */
+#define AT91_PD24_TPK12                (1 << 24)       /* B: ETM Trace Packet Port 12 */
+#define AT91_PD25_DTR1         (1 << 25)       /* A: USART Data Terminal Ready 1 */
+#define AT91_PD25_TPK13                (1 << 25)       /* B: ETM Trace Packet Port 13 */
+#define AT91_PD26_TPK14                (1 << 26)       /* B: ETM Trace Packet Port 14 */
+#define AT91_PD27_TPK15                (1 << 27)       /* B: ETM Trace Packet Port 15 */
+
+#endif
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h b/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h
new file mode 100644 (file)
index 0000000..9bfffdb
--- /dev/null
@@ -0,0 +1,328 @@
+/*
+ * include/asm-arm/arch-at91rm9200/at91rm9200_sys.h
+ *
+ * Copyright (C) 2005 Ivan Kokshaysky
+ * Copyright (C) SAN People
+ *
+ * System peripherals registers.
+ * Based on AT91RM9200 datasheet revision E.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef AT91RM9200_SYS_H
+#define AT91RM9200_SYS_H
+
+/*
+ * Advanced Interrupt Controller.
+ */
+#define AT91_AIC       0x000
+
+#define AT91_AIC_SMR(n)                (AT91_AIC + ((n) * 4))  /* Source Mode Registers 0-31 */
+#define                AT91_AIC_PRIOR          (7 << 0)                /* Priority Level */
+#define                AT91_AIC_SRCTYPE        (3 << 5)                /* Interrupt Source Type */
+#define                        AT91_AIC_SRCTYPE_LOW            (0 << 5)
+#define                        AT91_AIC_SRCTYPE_FALLING        (1 << 5)
+#define                        AT91_AIC_SRCTYPE_HIGH           (2 << 5)
+#define                        AT91_AIC_SRCTYPE_RISING         (3 << 5)
+
+#define AT91_AIC_SVR(n)                (AT91_AIC + 0x80 + ((n) * 4))   /* Source Vector Registers 0-31 */
+#define AT91_AIC_IVR           (AT91_AIC + 0x100)      /* Interrupt Vector Register */
+#define AT91_AIC_FVR           (AT91_AIC + 0x104)      /* Fast Interrupt Vector Register */
+#define AT91_AIC_ISR           (AT91_AIC + 0x108)      /* Interrupt Status Register */
+#define                AT91_AIC_IRQID          (0x1f << 0)             /* Current Interrupt Identifier */
+
+#define AT91_AIC_IPR           (AT91_AIC + 0x10c)      /* Interrupt Pending Register */
+#define AT91_AIC_IMR           (AT91_AIC + 0x110)      /* Interrupt Mask Register */
+#define AT91_AIC_CISR          (AT91_AIC + 0x114)      /* Core Interrupt Status Register */
+#define                AT91_AIC_NFIQ           (1 << 0)                /* nFIQ Status */
+#define                AT91_AIC_NIRQ           (1 << 1)                /* nIRQ Status */
+
+#define AT91_AIC_IECR          (AT91_AIC + 0x120)      /* Interrupt Enable Command Register */
+#define AT91_AIC_IDCR          (AT91_AIC + 0x124)      /* Interrupt Disable Command Register */
+#define AT91_AIC_ICCR          (AT91_AIC + 0x128)      /* Interrupt Clear Command Register */
+#define AT91_AIC_ISCR          (AT91_AIC + 0x12c)      /* Interrupt Set Command Register */
+#define AT91_AIC_EOICR         (AT91_AIC + 0x130)      /* End of Interrupt Command Register */
+#define AT91_AIC_SPU           (AT91_AIC + 0x134)      /* Spurious Interrupt Vector Register */
+#define AT91_AIC_DCR           (AT91_AIC + 0x138)      /* Debug Control Register */
+#define                AT91_AIC_DCR_PROT       (1 << 0)                /* Protection Mode */
+#define                AT91_AIC_DCR_GMSK       (1 << 1)                /* General Mask */
+
+
+/*
+ * Debug Unit.
+ */
+#define AT91_DBGU      0x200
+
+#define AT91_DBGU_CR           (AT91_DBGU + 0x00)      /* Control Register */
+#define AT91_DBGU_MR           (AT91_DBGU + 0x04)      /* Mode Register */
+#define AT91_DBGU_IER          (AT91_DBGU + 0x08)      /* Interrupt Enable Register */
+#define                AT91_DBGU_TXRDY         (1 << 1)                /* Transmitter Ready */
+#define                AT91_DBGU_TXEMPTY       (1 << 9)                /* Transmitter Empty */
+#define AT91_DBGU_IDR          (AT91_DBGU + 0x0c)      /* Interrupt Disable Register */
+#define AT91_DBGU_IMR          (AT91_DBGU + 0x10)      /* Interrupt Mask Register */
+#define AT91_DBGU_SR           (AT91_DBGU + 0x14)      /* Status Register */
+#define AT91_DBGU_RHR          (AT91_DBGU + 0x18)      /* Receiver Holding Register */
+#define AT91_DBGU_THR          (AT91_DBGU + 0x1c)      /* Transmitter Holding Register */
+#define AT91_DBGU_BRGR         (AT91_DBGU + 0x20)      /* Baud Rate Generator Register */
+#define AT91_DBGU_CIDR         (AT91_DBGU + 0x40)      /* Chip ID Register */
+#define AT91_DBGU_EXID         (AT91_DBGU + 0x44)      /* Chip ID Extension Register */
+
+
+/*
+ * PIO Controllers.
+ */
+#define AT91_PIOA      0x400
+#define AT91_PIOB      0x600
+#define AT91_PIOC      0x800
+#define AT91_PIOD      0xa00
+
+#define PIO_PER                0x00    /* Enable Register */
+#define PIO_PDR                0x04    /* Disable Register */
+#define PIO_PSR                0x08    /* Status Register */
+#define PIO_OER                0x10    /* Output Enable Register */
+#define PIO_ODR                0x14    /* Output Disable Register */
+#define PIO_OSR                0x18    /* Output Status Register */
+#define PIO_IFER       0x20    /* Glitch Input Filter Enable */
+#define PIO_IFDR       0x24    /* Glitch Input Filter Disable */
+#define PIO_IFSR       0x28    /* Glitch Input Filter Status */
+#define PIO_SODR       0x30    /* Set Output Data Register */
+#define PIO_CODR       0x34    /* Clear Output Data Register */
+#define PIO_ODSR       0x38    /* Output Data Status Register */
+#define PIO_PDSR       0x3c    /* Pin Data Status Register */
+#define PIO_IER                0x40    /* Interrupt Enable Register */
+#define PIO_IDR                0x44    /* Interrupt Disable Register */
+#define PIO_IMR                0x48    /* Interrupt Mask Register */
+#define PIO_ISR                0x4c    /* Interrupt Status Register */
+#define PIO_MDER       0x50    /* Multi-driver Enable Register */
+#define PIO_MDDR       0x54    /* Multi-driver Disable Register */
+#define PIO_MDSR       0x58    /* Multi-driver Status Register */
+#define PIO_PUDR       0x60    /* Pull-up Disable Register */
+#define PIO_PUER       0x64    /* Pull-up Enable Register */
+#define PIO_PUSR       0x68    /* Pull-up Status Register */
+#define PIO_ASR                0x70    /* Peripheral A Select Register */
+#define PIO_BSR                0x74    /* Peripheral B Select Register */
+#define PIO_ABSR       0x78    /* AB Status Register */
+#define PIO_OWER       0xa0    /* Output Write Enable Register */
+#define PIO_OWDR       0xa4    /* Output Write Disable Register */
+#define PIO_OWSR       0xa8    /* Output Write Status Register */
+
+#define AT91_PIO_P(n)  (1 << (n))
+
+
+/*
+ * Power Management Controller.
+ */
+#define        AT91_PMC        0xc00
+
+#define        AT91_PMC_SCER           (AT91_PMC + 0x00)       /* System Clock Enable Register */
+#define        AT91_PMC_SCDR           (AT91_PMC + 0x04)       /* System Clock Disable Register */
+
+#define        AT91_PMC_SCSR           (AT91_PMC + 0x08)       /* System Clock Status Register */
+#define                AT91_PMC_PCK            (1 <<  0)               /* Processor Clock */
+#define                AT91_PMC_UDP            (1 <<  1)               /* USB Devcice Port Clock */
+#define                AT91_PMC_MCKUDP         (1 <<  2)               /* USB Device Port Master Clock Automatic Disable on Suspend */
+#define                AT91_PMC_UHP            (1 <<  4)               /* USB Host Port Clock */
+#define                AT91_PMC_PCK0           (1 <<  8)               /* Programmable Clock 0 */
+#define                AT91_PMC_PCK1           (1 <<  9)               /* Programmable Clock 1 */
+#define                AT91_PMC_PCK2           (1 << 10)               /* Programmable Clock 2 */
+#define                AT91_PMC_PCK3           (1 << 11)               /* Programmable Clock 3 */
+
+#define        AT91_PMC_PCER           (AT91_PMC + 0x10)       /* Peripheral Clock Enable Register */
+#define        AT91_PMC_PCDR           (AT91_PMC + 0x14)       /* Peripheral Clock Disable Register */
+#define        AT91_PMC_PCSR           (AT91_PMC + 0x18)       /* Peripheral Clock Status Register */
+
+#define        AT91_CKGR_MOR           (AT91_PMC + 0x20)       /* Main Oscillator Register */
+#define                AT91_PMC_MOSCEN         (1    << 0)             /* Main Oscillator Enable */
+#define                AT91_PMC_OSCOUNT        (0xff << 8)             /* Main Oscillator Start-up Time */
+
+#define        AT91_CKGR_MCFR          (AT91_PMC + 0x24)       /* Main Clock Frequency Register */
+#define                AT91_PMC_MAINF          (0xffff <<  0)          /* Main Clock Frequency */
+#define                AT91_PMC_MAINRDY        (1      << 16)          /* Main Clock Ready */
+
+#define        AT91_CKGR_PLLAR         (AT91_PMC + 0x28)       /* PLL A Register */
+#define        AT91_CKGR_PLLBR         (AT91_PMC + 0x2c)       /* PLL B Register */
+#define                AT91_PMC_DIV            (0xff  <<  0)           /* Divider */
+#define                AT91_PMC_PLLCOUNT       (0x3f  <<  8)           /* PLL Counter */
+#define                AT91_PMC_OUT            (3     << 14)           /* PLL Clock Frequency Range */
+#define                AT91_PMC_MUL            (0x7ff << 16)           /* PLL Multiplier */
+#define                AT91_PMC_USB96M         (1     << 28)           /* Divider by 2 Enable (PLLB only) */
+
+#define        AT91_PMC_MCKR           (AT91_PMC + 0x30)       /* Master Clock Register */
+#define                AT91_PMC_CSS            (3 <<  0)               /* Master Clock Selection */
+#define                        AT91_PMC_CSS_SLOW               (0 << 0)
+#define                        AT91_PMC_CSS_MAIN               (1 << 0)
+#define                        AT91_PMC_CSS_PLLA               (2 << 0)
+#define                        AT91_PMC_CSS_PLLB               (3 << 0)
+#define                AT91_PMC_PRES           (7 <<  2)               /* Master Clock Prescaler */
+#define                AT91_PMC_PRES_1                 (0 << 2)
+#define                        AT91_PMC_PRES_2                 (1 << 2)
+#define                        AT91_PMC_PRES_4                 (2 << 2)
+#define                        AT91_PMC_PRES_8                 (3 << 2)
+#define                        AT91_PMC_PRES_16                (4 << 2)
+#define                        AT91_PMC_PRES_32                (5 << 2)
+#define                        AT91_PMC_PRES_64                (6 << 2)
+#define                AT91_PMC_MDIV           (3 <<  8)               /* Master Clock Division */
+#define                        AT91_PMC_MDIV_1                 (0 << 8)
+#define                        AT91_PMC_MDIV_2                 (1 << 8)
+#define                        AT91_PMC_MDIV_3                 (2 << 8)
+#define                        AT91_PMC_MDIV_4                 (3 << 8)
+
+#define        AT91_PMC_PCKR(n)        (AT91_PMC + 0x40 + ((n) * 4))   /* Programmable Clock 0-3 Registers */
+#define        AT91_PMC_IER            (AT91_PMC + 0x60)       /* Interrupt Enable Register */
+#define        AT91_PMC_IDR            (AT91_PMC + 0x64)       /* Interrupt Disable Register */
+#define        AT91_PMC_SR             (AT91_PMC + 0x68)       /* Status Register */
+#define                AT91_PMC_MOSCS          (1 <<  0)               /* MOSCS Flag */
+#define                AT91_PMC_LOCKA          (1 <<  1)               /* PLLA Lock */
+#define                AT91_PMC_LOCKB          (1 <<  2)               /* PLLB Lock */
+#define                AT91_PMC_MCKRDY         (1 <<  3)               /* Master Clock */
+#define                AT91_PMC_PCK0RDY        (1 <<  8)               /* Programmable Clock 0 */
+#define                AT91_PMC_PCK1RDY        (1 <<  9)               /* Programmable Clock 1 */
+#define                AT91_PMC_PCK2RDY        (1 << 10)               /* Programmable Clock 2 */
+#define                AT91_PMC_PCK3RDY        (1 << 11)               /* Programmable Clock 3 */
+#define        AT91_PMC_IMR            (AT91_PMC + 0x6c)       /* Interrupt Mask Register */
+
+
+/*
+ * System Timer.
+ */
+#define        AT91_ST         0xd00
+
+#define        AT91_ST_CR              (AT91_ST + 0x00)        /* Control Register */
+#define        AT91_ST_WDRST           (1 << 0)                /* Watchdog Timer Restart */
+#define        AT91_ST_PIMR            (AT91_ST + 0x04)        /* Period Interval Mode Register */
+#define                AT91_ST_PIV             (0xffff <<  0)          /* Period Interval Value */
+#define        AT91_ST_WDMR            (AT91_ST + 0x08)        /* Watchdog Mode Register */
+#define                AT91_ST_WDV             (0xffff <<  0)          /* Watchdog Counter Value */
+#define                AT91_ST_RSTEN           (1      << 16)          /* Reset Enable */
+#define                AT91_ST_EXTEN           (1      << 17)          /* External Signal Assertion Enable */
+#define        AT91_ST_RTMR            (AT91_ST + 0x0c)        /* Real-time Mode Register */
+#define                AT91_ST_RTPRES          (0xffff <<  0)          /* Real-time Prescalar Value */
+#define        AT91_ST_SR              (AT91_ST + 0x10)        /* Status Register */
+#define                AT91_ST_PITS            (1 << 0)                /* Period Interval Timer Status */
+#define                AT91_ST_WDOVF           (1 << 1)                /* Watchdog Overflow */
+#define                AT91_ST_RTTINC          (1 << 2)                /* Real-time Timer Increment */
+#define                AT91_ST_ALMS            (1 << 3)                /* Alarm Status */
+#define        AT91_ST_IER             (AT91_ST + 0x14)        /* Interrupt Enable Register */
+#define        AT91_ST_IDR             (AT91_ST + 0x18)        /* Interrupt Disable Register */
+#define        AT91_ST_IMR             (AT91_ST + 0x1c)        /* Interrupt Mask Register */
+#define        AT91_ST_RTAR            (AT91_ST + 0x20)        /* Real-time Alarm Register */
+#define                AT91_ST_ALMV            (0xfffff << 0)          /* Alarm Value */
+#define        AT91_ST_CRTR            (AT91_ST + 0x24)        /* Current Real-time Register */
+#define                AT91_ST_CRTV            (0xfffff << 0)          /* Current Real-Time Value */
+
+
+/*
+ * Real-time Clock.
+ */
+#define        AT91_RTC        0xe00
+
+#define        AT91_RTC_CR             (AT91_RTC + 0x00)       /* Control Register */
+#define                AT91_RTC_UPDTIM         (1 <<  0)               /* Update Request Time Register */
+#define                AT91_RTC_UPDCAL         (1 <<  1)               /* Update Request Calendar Register */
+#define                AT91_RTC_TIMEVSEL       (3 <<  8)               /* Time Event Selection */
+#define                        AT91_RTC_TIMEVSEL_MINUTE        (0 << 8)
+#define                AT91_RTC_TIMEVSEL_HOUR          (1 << 8)
+#define                AT91_RTC_TIMEVSEL_DAY24         (2 << 8)
+#define                AT91_RTC_TIMEVSEL_DAY12         (3 << 8)
+#define                AT91_RTC_CALEVSEL       (3 << 16)               /* Calendar Event Selection */
+#define                AT91_RTC_CALEVSEL_WEEK          (0 << 16)
+#define                AT91_RTC_CALEVSEL_MONTH         (1 << 16)
+#define                AT91_RTC_CALEVSEL_YEAR          (2 << 16)
+
+#define        AT91_RTC_MR             (AT91_RTC + 0x04)       /* Mode Register */
+#define        AT91_RTC_HRMOD          (1 <<  0)               /* 12/24 Hour Mode */
+
+#define        AT91_RTC_TIMR           (AT91_RTC + 0x08)       /* Time Register */
+#define                AT91_RTC_SEC            (0x7f <<  0)            /* Current Second */
+#define                AT91_RTC_MIN            (0x7f <<  8)            /* Current Minute */
+#define                AT91_RTC_HOUR           (0x3f << 16)            /* Current Hour */
+#define                At91_RTC_AMPM           (1    << 22)            /* Ante Meridiem Post Meridiem Indicator */
+
+#define        AT91_RTC_CALR           (AT91_RTC + 0x0c)       /* Calendar Register */
+#define                AT91_RTC_CENT           (0x7f <<  0)            /* Current Century */
+#define                AT91_RTC_YEAR           (0xff <<  8)            /* Current Year */
+#define                AT91_RTC_MONTH          (0x1f << 16)            /* Current Month */
+#define                AT91_RTC_DAY            (7    << 21)            /* Current Day */
+#define                AT91_RTC_DATE           (0x3f << 24)            /* Current Date */
+
+#define        AT91_RTC_TIMALR         (AT91_RTC + 0x10)       /* Time Alarm Register */
+#define                AT91_RTC_SECEN          (1 <<  7)               /* Second Alarm Enable */
+#define                AT91_RTC_MINEN          (1 << 15)               /* Minute Alarm Enable */
+#define                AT91_RTC_HOUREN         (1 << 23)               /* Hour Alarm Enable */
+
+#define        AT91_RTC_CALALR         (AT91_RTC + 0x14)       /* Calendar Alarm Register */
+#define                AT91_RTC_MTHEN          (1 << 23)               /* Month Alarm Enable */
+#define                AT91_RTC_DATEEN         (1 << 31)               /* Date Alarm Enable */
+
+#define        AT91_RTC_SR             (AT91_RTC + 0x18)       /* Status Register */
+#define                AT91_RTC_ACKUPD         (1 <<  0)               /* Acknowledge for Update */
+#define                AT91_RTC_ALARM          (1 <<  1)               /* Alarm Flag */
+#define                AT91_RTC_SECEV          (1 <<  2)               /* Second Event */
+#define                AT91_RTC_TIMEV          (1 <<  3)               /* Time Event */
+#define                AT91_RTC_CALEV          (1 <<  4)               /* Calendar Event */
+
+#define        AT91_RTC_SCCR           (AT91_RTC + 0x1c)       /* Status Clear Command Register */
+#define        AT91_RTC_IER            (AT91_RTC + 0x20)       /* Interrupt Enable Register */
+#define        AT91_RTC_IDR            (AT91_RTC + 0x24)       /* Interrupt Disable Register */
+#define        AT91_RTC_IMR            (AT91_RTC + 0x28)       /* Interrupt Mask Register */
+
+#define        AT91_RTC_VER            (AT91_RTC + 0x2c)       /* Valid Entry Register */
+#define                AT91_RTC_NVTIM          (1 <<  0)               /* Non valid Time */
+#define                AT91_RTC_NVCAL          (1 <<  1)               /* Non valid Calendar */
+#define                AT91_RTC_NVTIMALR       (1 <<  2)               /* Non valid Time Alarm */
+#define                AT91_RTC_NVCALALR       (1 <<  3)               /* Non valid Calendar Alarm */
+
+
+/*
+ * Memory Controller.
+ */
+#define AT91_MC                0xf00
+
+#define AT91_MC_RCR            (AT91_MC + 0x00)        /* MC Remap Control Register */
+#define                AT91_MC_RCB             (1 <<  0)               /* Remap Command Bit */
+
+#define AT91_MC_ASR            (AT91_MC + 0x04)        /* MC Abort Status Register */
+#define AT91_MC_AASR           (AT91_MC + 0x08)        /* MC Abort Address Status Register */
+#define AT91_MC_MPR            (AT91_MC + 0x0c)        /* MC Master Priority Register */
+
+/* External Bus Interface (EBI) registers */
+#define AT91_EBI_CSA           (AT91_MC + 0x60)        /* Chip Select Assignment Register */
+#define                AT91_EBI_CS0A           (1 << 0)                /* Chip Select 0 Assignment */
+#define                        AT91_EBI_CS0A_SMC               (0 << 0)
+#define                        AT91_EBI_CS0A_BFC               (1 << 0)
+#define                AT91_EBI_CS1A           (1 << 1)                /* Chip Select 1 Assignment */
+#define                        AT91_EBI_CS1A_SMC               (0 << 1)
+#define                        AT91_EBI_CS1A_SDRAMC            (1 << 1)
+#define                AT91_EBI_CS3A           (1 << 3)                /* Chip Select 2 Assignment */
+#define                        AT91_EBI_CS3A_SMC               (0 << 3)
+#define                        AT91_EBI_CS3A_SMC_SMARTMEDIA    (1 << 3)
+#define                AT91_EBI_CS4A           (1 << 4)                /* Chip Select 3 Assignment */
+#define                        AT91_EBI_CS4A_SMC               (0 << 4)
+#define                        AT91_EBI_CS4A_SMC_COMPACTFLASH  (1 << 4)
+#define AT91_EBI_CFGR          (AT91_MC + 0x64)        /* Configuration Register */
+#define                AT91_EBI_DBPUC          (1 << 0)                /* Data Bus Pull-Up Configuration */
+
+/* Static Memory Controller (SMC) registers */
+#define        AT91_SMC_CSR(n)         (AT91_MC + 0x70 + ((n) * 4))/* SMC Chip Select Register */
+#define                AT91_SMC_NWS            (0x7f <<  0)            /* Number of Wait States */
+#define                AT91_SMC_WSEN           (1    <<  7)            /* Wait State Enable */
+#define                AT91_SMC_TDF            (0xf  <<  8)            /* Data Float Time */
+#define                AT91_SMC_BAT            (1    << 12)            /* Byte Access Type */
+#define                AT91_SMC_DBW            (3    << 13)            /* Data Bus Width */
+#define                        AT91_SMC_DBW_16         (1 << 13)
+#define                        AT91_SMC_DBW_8          (2 << 13)
+#define                AT91_SMC_DPR            (1 << 15)               /* Data Read Protocol */
+#define                AT91_SMC_ACSS           (3 << 16)               /* Address to Chip Select Setup */
+#define                        AT91_SMC_ACSS_STD       (0 << 16)
+#define                        AT91_SMC_ACSS_1         (1 << 16)
+#define                        AT91_SMC_ACSS_2         (2 << 16)
+#define                        AT91_SMC_ACSS_3         (3 << 16)
+#define                AT91_SMC_RWSETUP        (7 << 24)               /* Read & Write Signal Time Setup */
+#define                AT91_SMC_RWHOLD         (7 << 28)               /* Read & Write Signal Hold Time */
+
+
+#endif
diff --git a/include/asm-arm/arch-at91rm9200/board.h b/include/asm-arm/arch-at91rm9200/board.h
new file mode 100644 (file)
index 0000000..2e7d113
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * include/asm-arm/arch-at91rm9200/board.h
+ *
+ *  Copyright (C) 2005 HP Labs
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+/*
+ * These are data structures found in platform_device.dev.platform_data,
+ * and describing board-specfic data needed by drivers.  For example,
+ * which pin is used for a given GPIO role.
+ *
+ * In 2.6, drivers should strongly avoid board-specific knowledge so
+ * that supporting new boards normally won't require driver patches.
+ * Most board-specific knowledge should be in arch/.../board-*.c files.
+ */
+
+#ifndef __ASM_ARCH_BOARD_H
+#define __ASM_ARCH_BOARD_H
+
+ /* Clocks */
+extern unsigned long at91_master_clock;
+
+ /* Serial Port */
+extern int at91_serial_map[AT91_NR_UART];
+extern int at91_console_port;
+
+ /* USB Device */
+struct at91_udc_data {
+       u8      vbus_pin;               /* high == host powering us */
+       u8      pullup_pin;             /* high == D+ pulled up */
+};
+extern void __init at91_add_device_udc(struct at91_udc_data *data);
+
+ /* Compact Flash */
+struct at91_cf_data {
+       u8      irq_pin;                /* I/O IRQ */
+       u8      det_pin;                /* Card detect */
+       u8      vcc_pin;                /* power switching */
+       u8      rst_pin;                /* card reset */
+};
+extern void __init at91_add_device_cf(struct at91_cf_data *data);
+
+ /* MMC / SD */
+struct at91_mmc_data {
+       u8              det_pin;        /* card detect IRQ */
+       unsigned        is_b:1;         /* uses B side (vs A) */
+       unsigned        wire4:1;        /* (SD) supports DAT0..DAT3 */
+       u8              wp_pin;         /* (SD) writeprotect detect */
+       u8              vcc_pin;        /* power switching (high == on) */
+};
+extern void __init at91_add_device_mmc(struct at91_mmc_data *data);
+
+ /* Ethernet */
+struct at91_eth_data {
+       u8              phy_irq_pin;    /* PHY IRQ */
+       u8              is_rmii;        /* using RMII interface? */
+};
+extern void __init at91_add_device_eth(struct at91_eth_data *data);
+
+ /* USB Host */
+struct at91_usbh_data {
+       u8              ports;          /* number of ports on root hub */
+};
+extern void __init at91_add_device_usbh(struct at91_usbh_data *data);
+
+#endif
diff --git a/include/asm-arm/arch-at91rm9200/debug-macro.S b/include/asm-arm/arch-at91rm9200/debug-macro.S
new file mode 100644 (file)
index 0000000..f496b54
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * include/asm-arm/arch-at91rm9200/debug-macro.S
+ *
+ *  Copyright (C) 2003-2005 SAN People
+ *
+ * Debugging macro include header
+ *
+ * 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 <asm/hardware.h>
+
+       .macro  addruart,rx
+       mrc     p15, 0, \rx, c1, c0
+       tst     \rx, #1                         @ MMU enabled?
+       ldreq   \rx, =AT91_BASE_SYS             @ System peripherals (phys address)
+       ldrne   \rx, =AT91_VA_BASE_SYS          @ System peripherals (virt address)
+       .endm
+
+       .macro  senduart,rd,rx
+       strb    \rd, [\rx, #AT91_DBGU_THR]      @ Write to Transmitter Holding Register
+       .endm
+
+       .macro  waituart,rd,rx
+1001:  ldr     \rd, [\rx, #AT91_DBGU_SR]       @ Read Status Register
+       tst     \rd, #AT91_DBGU_TXRDY           @ DBGU_TXRDY = 1 when ready to transmit
+       beq     1001b
+       .endm
+
+       .macro  busyuart,rd,rx
+1001:  ldr     \rd, [\rx, #AT91_DBGU_SR]       @ Read Status Register
+       tst     \rd, #AT91_DBGU_TXEMPTY         @ DBGU_TXEMPTY = 1 when transmission complete
+       beq     1001b
+       .endm
+
similarity index 89%
rename from include/asm-arm/arch-epxa10db/dma.h
rename to include/asm-arm/arch-at91rm9200/dma.h
index de20ec8e74b1ca9909c4f61a2d1c80903db10a34..22c1dfdd8da34ce28c4f3e0edef000cb9533f729 100644 (file)
@@ -1,7 +1,7 @@
 /*
- *  linux/include/asm-arm/arch-camelot/dma.h
+ * include/asm-arm/arch-at91rm9200/dma.h
  *
- *  Copyright (C) 1997,1998 Russell King
+ *  Copyright (C) 2003 SAN People
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/include/asm-arm/arch-at91rm9200/entry-macro.S b/include/asm-arm/arch-at91rm9200/entry-macro.S
new file mode 100644 (file)
index 0000000..61a326e
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * include/asm-arm/arch-at91rm9200/entry-macro.S
+ *
+ *  Copyright (C) 2003-2005 SAN People
+ *
+ * Low-level IRQ helper macros for AT91RM9200 platforms
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#include <asm/hardware.h>
+
+       .macro  disable_fiq
+       .endm
+
+       .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
+       ldr     \base, =(AT91_VA_BASE_SYS)              @ base virtual address of SYS peripherals
+       ldr     \irqnr, [\base, #AT91_AIC_IVR]          @ read IRQ vector register: de-asserts nIRQ to processor (and clears interrupt)
+       ldr     \irqstat, [\base, #AT91_AIC_ISR]        @ read interrupt source number
+       teq     \irqstat, #0                            @ ISR is 0 when no current interrupt, or spurious interrupt
+       streq   \tmp, [\base, #AT91_AIC_EOICR]          @ not going to be handled further, then ACK it now.
+       .endm
+
diff --git a/include/asm-arm/arch-at91rm9200/gpio.h b/include/asm-arm/arch-at91rm9200/gpio.h
new file mode 100644 (file)
index 0000000..0f0a61e
--- /dev/null
@@ -0,0 +1,193 @@
+/*
+ * include/asm-arm/arch-at91rm9200/gpio.h
+ *
+ *  Copyright (C) 2005 HP Labs
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ */
+
+#ifndef __ASM_ARCH_AT91RM9200_GPIO_H
+#define __ASM_ARCH_AT91RM9200_GPIO_H
+
+#define PIN_BASE               NR_AIC_IRQS
+
+#define PQFP_GPIO_BANKS                3       /* PQFP package has 3 banks */
+#define BGA_GPIO_BANKS         4       /* BGA package has 4 banks */
+
+/* these pin numbers double as IRQ numbers, like AT91_ID_* values */
+
+#define        AT91_PIN_PA0    (PIN_BASE + 0x00 + 0)
+#define        AT91_PIN_PA1    (PIN_BASE + 0x00 + 1)
+#define        AT91_PIN_PA2    (PIN_BASE + 0x00 + 2)
+#define        AT91_PIN_PA3    (PIN_BASE + 0x00 + 3)
+#define        AT91_PIN_PA4    (PIN_BASE + 0x00 + 4)
+
+#define        AT91_PIN_PA5    (PIN_BASE + 0x00 + 5)
+#define        AT91_PIN_PA6    (PIN_BASE + 0x00 + 6)
+#define        AT91_PIN_PA7    (PIN_BASE + 0x00 + 7)
+#define        AT91_PIN_PA8    (PIN_BASE + 0x00 + 8)
+#define        AT91_PIN_PA9    (PIN_BASE + 0x00 + 9)
+
+#define        AT91_PIN_PA10   (PIN_BASE + 0x00 + 10)
+#define        AT91_PIN_PA11   (PIN_BASE + 0x00 + 11)
+#define        AT91_PIN_PA12   (PIN_BASE + 0x00 + 12)
+#define        AT91_PIN_PA13   (PIN_BASE + 0x00 + 13)
+#define        AT91_PIN_PA14   (PIN_BASE + 0x00 + 14)
+
+#define        AT91_PIN_PA15   (PIN_BASE + 0x00 + 15)
+#define        AT91_PIN_PA16   (PIN_BASE + 0x00 + 16)
+#define        AT91_PIN_PA17   (PIN_BASE + 0x00 + 17)
+#define        AT91_PIN_PA18   (PIN_BASE + 0x00 + 18)
+#define        AT91_PIN_PA19   (PIN_BASE + 0x00 + 19)
+
+#define        AT91_PIN_PA20   (PIN_BASE + 0x00 + 20)
+#define        AT91_PIN_PA21   (PIN_BASE + 0x00 + 21)
+#define        AT91_PIN_PA22   (PIN_BASE + 0x00 + 22)
+#define        AT91_PIN_PA23   (PIN_BASE + 0x00 + 23)
+#define        AT91_PIN_PA24   (PIN_BASE + 0x00 + 24)
+
+#define        AT91_PIN_PA25   (PIN_BASE + 0x00 + 25)
+#define        AT91_PIN_PA26   (PIN_BASE + 0x00 + 26)
+#define        AT91_PIN_PA27   (PIN_BASE + 0x00 + 27)
+#define        AT91_PIN_PA28   (PIN_BASE + 0x00 + 28)
+#define        AT91_PIN_PA29   (PIN_BASE + 0x00 + 29)
+
+#define        AT91_PIN_PA30   (PIN_BASE + 0x00 + 30)
+#define        AT91_PIN_PA31   (PIN_BASE + 0x00 + 31)
+
+#define        AT91_PIN_PB0    (PIN_BASE + 0x20 + 0)
+#define        AT91_PIN_PB1    (PIN_BASE + 0x20 + 1)
+#define        AT91_PIN_PB2    (PIN_BASE + 0x20 + 2)
+#define        AT91_PIN_PB3    (PIN_BASE + 0x20 + 3)
+#define        AT91_PIN_PB4    (PIN_BASE + 0x20 + 4)
+
+#define        AT91_PIN_PB5    (PIN_BASE + 0x20 + 5)
+#define        AT91_PIN_PB6    (PIN_BASE + 0x20 + 6)
+#define        AT91_PIN_PB7    (PIN_BASE + 0x20 + 7)
+#define        AT91_PIN_PB8    (PIN_BASE + 0x20 + 8)
+#define        AT91_PIN_PB9    (PIN_BASE + 0x20 + 9)
+
+#define        AT91_PIN_PB10   (PIN_BASE + 0x20 + 10)
+#define        AT91_PIN_PB11   (PIN_BASE + 0x20 + 11)
+#define        AT91_PIN_PB12   (PIN_BASE + 0x20 + 12)
+#define        AT91_PIN_PB13   (PIN_BASE + 0x20 + 13)
+#define        AT91_PIN_PB14   (PIN_BASE + 0x20 + 14)
+
+#define        AT91_PIN_PB15   (PIN_BASE + 0x20 + 15)
+#define        AT91_PIN_PB16   (PIN_BASE + 0x20 + 16)
+#define        AT91_PIN_PB17   (PIN_BASE + 0x20 + 17)
+#define        AT91_PIN_PB18   (PIN_BASE + 0x20 + 18)
+#define        AT91_PIN_PB19   (PIN_BASE + 0x20 + 19)
+
+#define        AT91_PIN_PB20   (PIN_BASE + 0x20 + 20)
+#define        AT91_PIN_PB21   (PIN_BASE + 0x20 + 21)
+#define        AT91_PIN_PB22   (PIN_BASE + 0x20 + 22)
+#define        AT91_PIN_PB23   (PIN_BASE + 0x20 + 23)
+#define        AT91_PIN_PB24   (PIN_BASE + 0x20 + 24)
+
+#define        AT91_PIN_PB25   (PIN_BASE + 0x20 + 25)
+#define        AT91_PIN_PB26   (PIN_BASE + 0x20 + 26)
+#define        AT91_PIN_PB27   (PIN_BASE + 0x20 + 27)
+#define        AT91_PIN_PB28   (PIN_BASE + 0x20 + 28)
+#define        AT91_PIN_PB29   (PIN_BASE + 0x20 + 29)
+
+#define        AT91_PIN_PB30   (PIN_BASE + 0x20 + 30)
+#define        AT91_PIN_PB31   (PIN_BASE + 0x20 + 31)
+
+#define        AT91_PIN_PC0    (PIN_BASE + 0x40 + 0)
+#define        AT91_PIN_PC1    (PIN_BASE + 0x40 + 1)
+#define        AT91_PIN_PC2    (PIN_BASE + 0x40 + 2)
+#define        AT91_PIN_PC3    (PIN_BASE + 0x40 + 3)
+#define        AT91_PIN_PC4    (PIN_BASE + 0x40 + 4)
+
+#define        AT91_PIN_PC5    (PIN_BASE + 0x40 + 5)
+#define        AT91_PIN_PC6    (PIN_BASE + 0x40 + 6)
+#define        AT91_PIN_PC7    (PIN_BASE + 0x40 + 7)
+#define        AT91_PIN_PC8    (PIN_BASE + 0x40 + 8)
+#define        AT91_PIN_PC9    (PIN_BASE + 0x40 + 9)
+
+#define        AT91_PIN_PC10   (PIN_BASE + 0x40 + 10)
+#define        AT91_PIN_PC11   (PIN_BASE + 0x40 + 11)
+#define        AT91_PIN_PC12   (PIN_BASE + 0x40 + 12)
+#define        AT91_PIN_PC13   (PIN_BASE + 0x40 + 13)
+#define        AT91_PIN_PC14   (PIN_BASE + 0x40 + 14)
+
+#define        AT91_PIN_PC15   (PIN_BASE + 0x40 + 15)
+#define        AT91_PIN_PC16   (PIN_BASE + 0x40 + 16)
+#define        AT91_PIN_PC17   (PIN_BASE + 0x40 + 17)
+#define        AT91_PIN_PC18   (PIN_BASE + 0x40 + 18)
+#define        AT91_PIN_PC19   (PIN_BASE + 0x40 + 19)
+
+#define        AT91_PIN_PC20   (PIN_BASE + 0x40 + 20)
+#define        AT91_PIN_PC21   (PIN_BASE + 0x40 + 21)
+#define        AT91_PIN_PC22   (PIN_BASE + 0x40 + 22)
+#define        AT91_PIN_PC23   (PIN_BASE + 0x40 + 23)
+#define        AT91_PIN_PC24   (PIN_BASE + 0x40 + 24)
+
+#define        AT91_PIN_PC25   (PIN_BASE + 0x40 + 25)
+#define        AT91_PIN_PC26   (PIN_BASE + 0x40 + 26)
+#define        AT91_PIN_PC27   (PIN_BASE + 0x40 + 27)
+#define        AT91_PIN_PC28   (PIN_BASE + 0x40 + 28)
+#define        AT91_PIN_PC29   (PIN_BASE + 0x40 + 29)
+
+#define        AT91_PIN_PC30   (PIN_BASE + 0x40 + 30)
+#define        AT91_PIN_PC31   (PIN_BASE + 0x40 + 31)
+
+#define        AT91_PIN_PD0    (PIN_BASE + 0x60 + 0)
+#define        AT91_PIN_PD1    (PIN_BASE + 0x60 + 1)
+#define        AT91_PIN_PD2    (PIN_BASE + 0x60 + 2)
+#define        AT91_PIN_PD3    (PIN_BASE + 0x60 + 3)
+#define        AT91_PIN_PD4    (PIN_BASE + 0x60 + 4)
+
+#define        AT91_PIN_PD5    (PIN_BASE + 0x60 + 5)
+#define        AT91_PIN_PD6    (PIN_BASE + 0x60 + 6)
+#define        AT91_PIN_PD7    (PIN_BASE + 0x60 + 7)
+#define        AT91_PIN_PD8    (PIN_BASE + 0x60 + 8)
+#define        AT91_PIN_PD9    (PIN_BASE + 0x60 + 9)
+
+#define        AT91_PIN_PD10   (PIN_BASE + 0x60 + 10)
+#define        AT91_PIN_PD11   (PIN_BASE + 0x60 + 11)
+#define        AT91_PIN_PD12   (PIN_BASE + 0x60 + 12)
+#define        AT91_PIN_PD13   (PIN_BASE + 0x60 + 13)
+#define        AT91_PIN_PD14   (PIN_BASE + 0x60 + 14)
+
+#define        AT91_PIN_PD15   (PIN_BASE + 0x60 + 15)
+#define        AT91_PIN_PD16   (PIN_BASE + 0x60 + 16)
+#define        AT91_PIN_PD17   (PIN_BASE + 0x60 + 17)
+#define        AT91_PIN_PD18   (PIN_BASE + 0x60 + 18)
+#define        AT91_PIN_PD19   (PIN_BASE + 0x60 + 19)
+
+#define        AT91_PIN_PD20   (PIN_BASE + 0x60 + 20)
+#define        AT91_PIN_PD21   (PIN_BASE + 0x60 + 21)
+#define        AT91_PIN_PD22   (PIN_BASE + 0x60 + 22)
+#define        AT91_PIN_PD23   (PIN_BASE + 0x60 + 23)
+#define        AT91_PIN_PD24   (PIN_BASE + 0x60 + 24)
+
+#define        AT91_PIN_PD25   (PIN_BASE + 0x60 + 25)
+#define        AT91_PIN_PD26   (PIN_BASE + 0x60 + 26)
+#define        AT91_PIN_PD27   (PIN_BASE + 0x60 + 27)
+#define        AT91_PIN_PD28   (PIN_BASE + 0x60 + 28)
+#define        AT91_PIN_PD29   (PIN_BASE + 0x60 + 29)
+
+#define        AT91_PIN_PD30   (PIN_BASE + 0x60 + 30)
+#define        AT91_PIN_PD31   (PIN_BASE + 0x60 + 31)
+
+#ifndef __ASSEMBLY__
+/* setup setup routines, called from board init or driver probe() */
+extern int at91_set_A_periph(unsigned pin, int use_pullup);
+extern int at91_set_B_periph(unsigned pin, int use_pullup);
+extern int at91_set_gpio_input(unsigned pin, int use_pullup);
+extern int at91_set_gpio_output(unsigned pin, int value);
+extern int at91_set_deglitch(unsigned pin, int is_on);
+
+/* callable at any time */
+extern int at91_set_gpio_value(unsigned pin, int value);
+extern int at91_get_gpio_value(unsigned pin);
+#endif
+
+#endif
+
diff --git a/include/asm-arm/arch-at91rm9200/hardware.h b/include/asm-arm/arch-at91rm9200/hardware.h
new file mode 100644 (file)
index 0000000..2646c01
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * include/asm-arm/arch-at91rm9200/hardware.h
+ *
+ *  Copyright (C) 2003 SAN People
+ *  Copyright (C) 2003 ATMEL
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ */
+
+#ifndef __ASM_ARCH_HARDWARE_H
+#define __ASM_ARCH_HARDWARE_H
+
+#include <asm/sizes.h>
+
+#include <asm/arch/at91rm9200.h>
+#include <asm/arch/at91rm9200_sys.h>
+
+/*
+ * Remap the peripherals from address 0xFFFA0000 .. 0xFFFFFFFF
+ * to 0xFEFA0000 .. 0xFF000000.  (384Kb)
+ */
+#define AT91_IO_PHYS_BASE      0xFFFA0000
+#define AT91_IO_SIZE           (0xFFFFFFFF - AT91_IO_PHYS_BASE + 1)
+#define AT91_IO_VIRT_BASE      (0xFF000000 - AT91_IO_SIZE)
+
+ /* Convert a physical IO address to virtual IO address */
+#define AT91_IO_P2V(x) ((x) - AT91_IO_PHYS_BASE + AT91_IO_VIRT_BASE)
+
+/*
+ * Virtual to Physical Address mapping for IO devices.
+ */
+#define AT91_VA_BASE_SYS       AT91_IO_P2V(AT91_BASE_SYS)
+#define AT91_VA_BASE_SPI       AT91_IO_P2V(AT91_BASE_SPI)
+#define AT91_VA_BASE_SSC2      AT91_IO_P2V(AT91_BASE_SSC2)
+#define AT91_VA_BASE_SSC1      AT91_IO_P2V(AT91_BASE_SSC1)
+#define AT91_VA_BASE_SSC0      AT91_IO_P2V(AT91_BASE_SSC0)
+#define AT91_VA_BASE_US3       AT91_IO_P2V(AT91_BASE_US3)
+#define AT91_VA_BASE_US2       AT91_IO_P2V(AT91_BASE_US2)
+#define AT91_VA_BASE_US1       AT91_IO_P2V(AT91_BASE_US1)
+#define AT91_VA_BASE_US0       AT91_IO_P2V(AT91_BASE_US0)
+#define AT91_VA_BASE_EMAC      AT91_IO_P2V(AT91_BASE_EMAC)
+#define AT91_VA_BASE_TWI       AT91_IO_P2V(AT91_BASE_TWI)
+#define AT91_VA_BASE_MCI       AT91_IO_P2V(AT91_BASE_MCI)
+#define AT91_VA_BASE_UDP       AT91_IO_P2V(AT91_BASE_UDP)
+#define AT91_VA_BASE_TCB1      AT91_IO_P2V(AT91_BASE_TCB1)
+#define AT91_VA_BASE_TCB0      AT91_IO_P2V(AT91_BASE_TCB0)
+
+/* Internal SRAM */
+#define AT91_BASE_SRAM         0x00200000      /* Internal SRAM base address */
+#define AT91_SRAM_SIZE         0x00004000      /* Internal SRAM SIZE (16Kb) */
+
+/* Serial ports */
+#define AT91_NR_UART           5               /* 4 USART3's and one DBGU port */
+
+/* FLASH */
+#define AT91_FLASH_BASE                0x10000000      /* NCS0: Flash physical base address */
+
+/* SDRAM */
+#define AT91_SDRAM_BASE                0x20000000      /* NCS1: SDRAM physical base address */
+
+/* SmartMedia */
+#define AT91_SMARTMEDIA_BASE   0x40000000      /* NCS3: Smartmedia physical base address */
+
+/* Multi-Master Memory controller */
+#define AT91_UHP_BASE          0x00300000      /* USB Host controller */
+
+/* Clocks */
+#define AT91_SLOW_CLOCK                32768           /* slow clock */
+
+#ifndef __ASSEMBLY__
+#include <asm/io.h>
+
+static inline unsigned int at91_sys_read(unsigned int reg_offset)
+{
+       void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
+
+       return readl(addr + reg_offset);
+}
+
+static inline void at91_sys_write(unsigned int reg_offset, unsigned long value)
+{
+       void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
+
+       writel(value, addr + reg_offset);
+}
+#endif
+
+#endif
similarity index 63%
rename from include/asm-arm/arch-epxa10db/io.h
rename to include/asm-arm/arch-at91rm9200/io.h
index 9fe100c9d6be44f6675909a3da39fab51019c4e3..23e670d85c9dc7a753a5980be00825bf71a7310e 100644 (file)
@@ -1,7 +1,7 @@
 /*
- *  linux/include/asm-arm/arch-epxa10db/io.h
+ * include/asm-arm/arch-at91rm9200/io.h
  *
- *  Copyright (C) 1999 ARM Limited
+ *  Copyright (C) 2003 SAN People
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
 
-#include <asm/hardware.h>
+#ifndef __ASM_ARCH_IO_H
+#define __ASM_ARCH_IO_H
 
-#define IO_SPACE_LIMIT 0xffff
+#include <asm/arch/at91rm9200.h>
+#include <asm/io.h>
 
-
-/*
- * Generic virtual read/write
- */
-/*#define outsw   __arch_writesw
-#define outsl   __arch_writesl
-#define outsb   __arch_writesb
-#define insb    __arch_readsb
-#define insw    __arch_readsw
-#define insl    __arch_readsl*/
+#define IO_SPACE_LIMIT         0xFFFFFFFF
 
 #define __io(a)                        ((void __iomem *)(a))
-#define __mem_pci(a)            (a) 
+#define __mem_pci(a)           (a)
+
 
 #endif
diff --git a/include/asm-arm/arch-at91rm9200/irqs.h b/include/asm-arm/arch-at91rm9200/irqs.h
new file mode 100644 (file)
index 0000000..27b0497
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * include/asm-arm/arch-at91rm9200/irqs.h
+ *
+ *  Copyright (C) 2004 SAN People
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef __ASM_ARCH_IRQS_H
+#define __ASM_ARCH_IRQS_H
+
+#define NR_AIC_IRQS 32
+
+
+/*
+ * Acknowledge interrupt with AIC after interrupt has been handled.
+ *   (by kernel/irq.c)
+ */
+#define irq_finish(irq) do { at91_sys_write(AT91_AIC_EOICR, 0); } while (0)
+
+
+/*
+ * IRQ interrupt symbols are the AT91_ID_* symbols in at91rm9200.h
+ * for IRQs handled directly through the AIC, or else the AT91_PIN_*
+ * symbols in gpio.h for ones handled indirectly as GPIOs.
+ * We make provision for 4 banks of GPIO.
+ */
+#include <asm/arch/gpio.h>
+
+#define        NR_IRQS         (NR_AIC_IRQS + (4 * 32))
+
+
+#ifndef __ASSEMBLY__
+/*
+ * Initialize the IRQ controller.
+ */
+extern void at91rm9200_init_irq(unsigned int priority[]);
+#endif
+
+#endif
similarity index 78%
rename from include/asm-arm/arch-epxa10db/memory.h
rename to include/asm-arm/arch-at91rm9200/memory.h
index 999541b6a9f5d5258a5b1b455a4b97dc748c1b67..462f1f0ad67c4dcb6c314e2e4b7c1a932bd39b14 100644 (file)
@@ -1,7 +1,7 @@
 /*
- *  linux/include/asm-arm/arch-epxa10/memory.h
+ * include/asm-arm/arch-at91rm9200/memory.h
  *
- *  Copyright (C) 2001 Altera Corporation
+ *  Copyright (C) 2004 SAN People
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-/*
- * Physical DRAM offset.
- */
-#define PHYS_OFFSET    UL(0x00000000)
+#include <asm/arch/hardware.h>
+
+#define PHYS_OFFSET    (AT91_SDRAM_BASE)
+
 
 /*
  * Virtual view <-> DMA view memory address translations
@@ -32,7 +33,9 @@
  * bus_to_virt: Used to convert an address for DMA operations
  *              to an address that the kernel can use.
  */
-#define __virt_to_bus(x)       (x - PAGE_OFFSET + /*SDRAM_BASE*/0)
-#define __bus_to_virt(x)       (x - /*SDRAM_BASE*/0 + PAGE_OFFSET)
+#define __virt_to_bus__is_a_macro
+#define __virt_to_bus(x) __virt_to_phys(x)
+#define __bus_to_virt__is_a_macro
+#define __bus_to_virt(x) __phys_to_virt(x)
 
 #endif
similarity index 80%
rename from include/asm-arm/arch-epxa10db/param.h
rename to include/asm-arm/arch-at91rm9200/param.h
index 783dedd71c8fa2f30dfabd4cdf88a29f110a2864..9480f8446852d9e96309d0940070e85763af2f66 100644 (file)
@@ -1,7 +1,7 @@
 /*
- *  linux/include/asm-arm/arch-epxa10db/param.h
+ * include/asm-arm/arch-at91rm9200/param.h
  *
- *  Copyright (C) 1999 ARM Limited
+ *  Copyright (C) 2003 SAN People
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+
+#ifndef __ASM_ARCH_PARAM_H
+#define __ASM_ARCH_PARAM_H
+
+/*
+ * We use default params
+ */
+
+#endif
diff --git a/include/asm-arm/arch-at91rm9200/pio.h b/include/asm-arm/arch-at91rm9200/pio.h
new file mode 100644 (file)
index 0000000..a89501b
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * include/asm-arm/arch-at91rm9200/pio.h
+ *
+ *  Copyright (C) 2003 SAN People
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ */
+
+#ifndef __ASM_ARCH_PIO_H
+#define __ASM_ARCH_PIO_H
+
+#include <asm/arch/hardware.h>
+
+static inline void AT91_CfgPIO_USART0(void) {
+       at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA17_TXD0 | AT91_PA18_RXD0 | AT91_PA20_CTS0);
+
+       /*
+        * Errata #39 - RTS0 is not internally connected to PA21.  We need to drive
+        *  the pin manually.  Default is off (RTS is active low).
+        */
+       at91_sys_write(AT91_PIOA + PIO_PER, AT91_PA21_RTS0);
+       at91_sys_write(AT91_PIOA + PIO_OER, AT91_PA21_RTS0);
+       at91_sys_write(AT91_PIOA + PIO_SODR, AT91_PA21_RTS0);
+}
+
+static inline void AT91_CfgPIO_USART1(void) {
+       at91_sys_write(AT91_PIOB + PIO_PDR, AT91_PB18_RI1 | AT91_PB19_DTR1
+                       | AT91_PB20_TXD1 | AT91_PB21_RXD1 | AT91_PB23_DCD1
+                       | AT91_PB24_CTS1 | AT91_PB25_DSR1 | AT91_PB26_RTS1);
+}
+
+static inline void AT91_CfgPIO_USART2(void) {
+       at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA22_RXD2 | AT91_PA23_TXD2);
+}
+
+static inline void AT91_CfgPIO_USART3(void) {
+       at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA5_TXD3 | AT91_PA6_RXD3);
+       at91_sys_write(AT91_PIOA + PIO_BSR, AT91_PA5_TXD3 | AT91_PA6_RXD3);
+}
+
+static inline void AT91_CfgPIO_DBGU(void) {
+       at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA31_DTXD | AT91_PA30_DRXD);
+}
+
+/*
+ * Enable the Two-Wire interface.
+ */
+static inline void AT91_CfgPIO_TWI(void) {
+       at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA25_TWD | AT91_PA26_TWCK);
+       at91_sys_write(AT91_PIOA + PIO_ASR, AT91_PA25_TWD | AT91_PA26_TWCK);
+       at91_sys_write(AT91_PIOA + PIO_MDER, AT91_PA25_TWD | AT91_PA26_TWCK);           /* open drain */
+}
+
+/*
+ * Enable the Serial Peripheral Interface.
+ */
+static inline void AT91_CfgPIO_SPI(void) {
+       at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA0_MISO | AT91_PA1_MOSI | AT91_PA2_SPCK);
+}
+
+static inline void AT91_CfgPIO_SPI_CS0(void) {
+       at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA3_NPCS0);
+}
+
+static inline void AT91_CfgPIO_SPI_CS1(void) {
+       at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA4_NPCS1);
+}
+
+static inline void AT91_CfgPIO_SPI_CS2(void) {
+       at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA5_NPCS2);
+}
+
+static inline void AT91_CfgPIO_SPI_CS3(void) {
+       at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA6_NPCS3);
+}
+
+/*
+ * Select the DataFlash card.
+ */
+static inline void AT91_CfgPIO_DataFlashCard(void) {
+       at91_sys_write(AT91_PIOB + PIO_PER, AT91_PIO_P(7));
+       at91_sys_write(AT91_PIOB + PIO_OER, AT91_PIO_P(7));
+       at91_sys_write(AT91_PIOB + PIO_CODR, AT91_PIO_P(7));
+}
+
+/*
+ * Enable NAND Flash (SmartMedia) interface.
+ */
+static inline void AT91_CfgPIO_SmartMedia(void) {
+       /* enable PC0=SMCE, PC1=SMOE, PC3=SMWE, A21=CLE, A22=ALE */
+       at91_sys_write(AT91_PIOC + PIO_ASR, AT91_PC0_BFCK | AT91_PC1_BFRDY_SMOE | AT91_PC3_BFBAA_SMWE);
+       at91_sys_write(AT91_PIOC + PIO_PDR, AT91_PC0_BFCK | AT91_PC1_BFRDY_SMOE | AT91_PC3_BFBAA_SMWE);
+
+       /* Configure PC2 as input (signal READY of the SmartMedia) */
+       at91_sys_write(AT91_PIOC + PIO_PER, AT91_PC2_BFAVD);    /* enable direct output enable */
+       at91_sys_write(AT91_PIOC + PIO_ODR, AT91_PC2_BFAVD);    /* disable output */
+
+       /* Configure PB1 as input (signal Card Detect of the SmartMedia) */
+       at91_sys_write(AT91_PIOB + PIO_PER, AT91_PIO_P(1));     /* enable direct output enable */
+       at91_sys_write(AT91_PIOB + PIO_ODR, AT91_PIO_P(1));     /* disable output */
+}
+
+static inline int AT91_PIO_SmartMedia_RDY(void) {
+       return (at91_sys_read(AT91_PIOC + PIO_PDSR) & AT91_PIO_P(2)) ? 1 : 0;
+}
+
+static inline int AT91_PIO_SmartMedia_CardDetect(void) {
+       return (at91_sys_read(AT91_PIOB + PIO_PDSR) & AT91_PIO_P(1)) ? 1 : 0;
+}
+
+#endif
similarity index 55%
rename from include/asm-arm/arch-epxa10db/system.h
rename to include/asm-arm/arch-at91rm9200/system.h
index 345b092a1ed548413c9df2a0605f467a29aa3d17..29c42655f05c6b70db620053eca7c718906aafbe 100644 (file)
@@ -1,9 +1,7 @@
 /*
- *  linux/include/asm-arm/arch-epxa10db/system.h
+ * include/asm-arm/arch-at91rm9200/system.h
  *
- *  Copyright (C) 1999 ARM Limited
- *  Copyright (C) 2000 Deep Blue Solutions Ltd
- *  Copyright (C) 2001 Altera Corporation
+ *  Copyright (C) 2003 SAN People
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <asm/arch/platform.h>
+#include <asm/arch/hardware.h>
 
 static inline void arch_idle(void)
 {
        /*
-        * This should do all the clock switching
-        * and wait for interrupt tricks
+        * Disable the processor clock.  The processor will be automatically
+        * re-enabled by an interrupt or by a reset.
+        */
+//     at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
+
+       /*
+        * Set the processor (CP15) into 'Wait for Interrupt' mode.
+        * Unlike disabling the processor clock via the PMC (above)
+        *  this allows the processor to be woken via JTAG.
         */
        cpu_do_idle();
 }
 
-extern __inline__ void arch_reset(char mode)
+static inline void arch_reset(char mode)
 {
-       /* Hmm... We can probably do something with the watchdog... */
+       /*
+        * Perform a hardware reset with the use of the Watchdog timer.
+        */
+       at91_sys_write(AT91_ST_WDMR, AT91_ST_RSTEN | AT91_ST_EXTEN | 1);
+       at91_sys_write(AT91_ST_CR, AT91_ST_WDRST);
 }
 
 #endif
similarity index 77%
rename from include/asm-arm/arch-epxa10db/timex.h
rename to include/asm-arm/arch-at91rm9200/timex.h
index b87a75fc95892f10d00e33897aca8aeb11747c1b..3f112dd125871e5cc1f92acac1831564892f185a 100644 (file)
@@ -1,9 +1,7 @@
 /*
- *  linux/include/asm-arm/arch-epxa10db/timex.h
+ * include/asm-arm/arch-at91rm9200/timex.h
  *
- *  Excalibur timex specifications
- *
- *  Copyright (C) 2001 Altera Corporation
+ *  Copyright (C) 2003 SAN People
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-/*
- * ??
- */
-#define CLOCK_TICK_RATE                (50000000 / 16)
+#ifndef __ASM_ARCH_TIMEX_H
+#define __ASM_ARCH_TIMEX_H
+
+#include <asm/arch/hardware.h>
+
+#define CLOCK_TICK_RATE                (AT91_SLOW_CLOCK)
+
+#endif
diff --git a/include/asm-arm/arch-at91rm9200/uncompress.h b/include/asm-arm/arch-at91rm9200/uncompress.h
new file mode 100644 (file)
index 0000000..b30dd55
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * include/asm-arm/arch-at91rm9200/uncompress.h
+ *
+ *  Copyright (C) 2003 SAN People
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef __ASM_ARCH_UNCOMPRESS_H
+#define __ASM_ARCH_UNCOMPRESS_H
+
+#include <asm/arch/hardware.h>
+
+/*
+ * The following code assumes the serial port has already been
+ * initialized by the bootloader.  We search for the first enabled
+ * port in the most probable order.  If you didn't setup a port in
+ * your bootloader then nothing will appear (which might be desired).
+ *
+ * This does not append a newline
+ */
+static void putstr(const char *s)
+{
+       void __iomem *sys = (void __iomem *) AT91_BASE_SYS;     /* physical address */
+
+       while (*s) {
+               while (!(__raw_readl(sys + AT91_DBGU_SR) & AT91_DBGU_TXRDY)) { barrier(); }
+               __raw_writel(*s, sys + AT91_DBGU_THR);
+               if (*s == '\n') {
+                       while (!(__raw_readl(sys + AT91_DBGU_SR) & AT91_DBGU_TXRDY)) { barrier(); }
+                       __raw_writel('\r', sys + AT91_DBGU_THR);
+               }
+               s++;
+       }
+       /* wait for transmission to complete */
+       while (!(__raw_readl(sys + AT91_DBGU_SR) & AT91_DBGU_TXEMPTY)) { barrier(); }
+}
+
+#define arch_decomp_setup()
+
+#define arch_decomp_wdog()
+
+#endif
similarity index 78%
rename from include/asm-arm/arch-epxa10db/vmalloc.h
rename to include/asm-arm/arch-at91rm9200/vmalloc.h
index 546fb7d2b6ade668e4856f1c236962f91e6f757c..34d9718feb90e14ef514c55cfa8fc5d2e99a922d 100644 (file)
@@ -1,7 +1,7 @@
 /*
- *  linux/include/asm-arm/arch-epxa10db/vmalloc.h
+ * include/asm-arm/arch-at91rm9200/vmalloc.h
  *
- *  Copyright (C) 2000 Russell King.
+ *  Copyright (C) 2003 SAN People
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#define VMALLOC_END       (PAGE_OFFSET + 0x10000000)
+
+#ifndef __ASM_ARCH_VMALLOC_H
+#define __ASM_ARCH_VMALLOC_H
+
+#define VMALLOC_END            (AT91_IO_VIRT_BASE & PGDIR_MASK)
+
+#endif
diff --git a/include/asm-arm/arch-epxa10db/debug-macro.S b/include/asm-arm/arch-epxa10db/debug-macro.S
deleted file mode 100644 (file)
index 1d11c51..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/* linux/include/asm-arm/arch-epxa10db/debug-macro.S
- *
- * Debugging macro include header
- *
- *  Copyright (C) 1994-1999 Russell King
- *  Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
- *
- * 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 <asm/arch/excalibur.h>
-#define UART00_TYPE
-#include <asm/arch/uart00.h>
-
-               .macro  addruart,rx
-               mrc     p15, 0, \rx, c1, c0
-               tst     \rx, #1                 @ MMU enabled?
-               ldr     \rx, =EXC_UART00_BASE   @ physical base address
-               orrne   \rx, \rx, #0xff000000   @ virtual base
-               orrne   \rx, \rx, #0x00f00000
-               .endm
-
-               .macro  senduart,rd,rx
-               str     \rd, [\rx, #UART_TD(0)]
-               .endm
-
-               .macro  waituart,rd,rx
-1001:          ldr     \rd, [\rx, #UART_TSR(0)]
-               and     \rd, \rd,  #UART_TSR_TX_LEVEL_MSK
-               cmp     \rd, #15
-               beq     1001b
-               .endm
-
-               .macro  busyuart,rd,rx
-1001:          ldr     \rd, [\rx, #UART_TSR(0)]
-               ands    \rd, \rd,  #UART_TSR_TX_LEVEL_MSK
-               bne     1001b
-               .endm
diff --git a/include/asm-arm/arch-epxa10db/entry-macro.S b/include/asm-arm/arch-epxa10db/entry-macro.S
deleted file mode 100644 (file)
index de6ae08..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * include/asm-arm/arch-epxa10db/entry-macro.S
- *
- * Low-level IRQ helper macros for epxa10db platform
- *
- * This file is licensed under  the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-#include <asm/arch/platform.h>
-#undef IRQ_MODE /* same name defined in asm/proc/ptrace.h */
-#include <asm/arch/int_ctrl00.h>
-
-               .macro  disable_fiq
-               .endm
-
-               .macro  get_irqnr_and_base, irqnr, irqstat, base, tmp
-
-               ldr     \irqstat, =INT_ID(IO_ADDRESS(EXC_INT_CTRL00_BASE))
-               ldr     \irqnr,[\irqstat]
-               cmp     \irqnr,#0
-               subne   \irqnr,\irqnr,#1
-
-               .endm
-
diff --git a/include/asm-arm/arch-epxa10db/ether00.h b/include/asm-arm/arch-epxa10db/ether00.h
deleted file mode 100644 (file)
index b737b8a..0000000
+++ /dev/null
@@ -1,482 +0,0 @@
-#ifndef __ETHER00_H
-#define __ETHER00_H
-
-
-
-/*
- * Register definitions for the Ethernet MAC
- */
-
-/*
- * Copyright (c) Altera Corporation 2000.
- * All rights reserved.
- */
-
-/*
-*      Structures for the DMA controller
-*/
-typedef struct fda_desc
-       {
-       struct fda_desc *       FDNext;
-       long                            FDSystem;
-       long                            FDStat;
-       short                           FDLength;
-       short                           FDCtl;
-       }FDA_DESC;
-
-typedef struct buf_desc
-       {
-       char *  BuffData;
-       short   BuffLength;
-       char    BDStat;
-       char    BDCtl;
-       }BUF_DESC;
-
-/*
-*      Control masks for the DMA controller
-*/
-#define FDCTL_BDCOUNT_MSK                                              (0x1F)
-#define FDCTL_BDCOUNT_OFST                                             (0)
-#define FDCTL_FRMOPT_MSK                                               (0x7C00)
-#define FDCTL_FRMOPT_OFST                                              (10)
-#define        FDCTL_COWNSFD_MSK                                               (0x8000)
-#define        FDCTL_COWNSFD_OFST                                              (15)
-
-#define BDCTL_RXBDSEQN_MSK                                             (0x7F)
-#define BDCTL_RXBDSEQN_OFST                                            (0)
-#define        BDCTL_COWNSBD_MSK                                               (0x80)
-#define        BDCTL_COWNSBD_OFST                                              (7)
-
-#define FDNEXT_EOL_MSK                                                 (0x1)
-#define FDNEXT_EOL_OFST                                                        (0)
-#define FDNEXT_EOL_POINTER_MSK                                 (0xFFFFFFF0)
-#define FDNEXT_EOL_POINTER_OFST                                        (4)
-
-#define ETHER_ARC_SIZE         (21)
-
-/*
-*      Register definitions and masks
-*/
-#define ETHER_DMA_CTL(base)                                                    (ETHER00_TYPE (base + 0x100))
-#define ETHER_DMA_CTL_DMBURST_OFST                             (2)
-#define ETHER_DMA_CTL_DMBURST_MSK                              (0x1FC)
-#define ETHER_DMA_CTL_POWRMGMNT_OFST                   (11)
-#define ETHER_DMA_CTL_POWRMGMNT_MSK                            (0x1000)
-#define ETHER_DMA_CTL_TXBIGE_OFST                              (14)
-#define ETHER_DMA_CTL_TXBIGE_MSK                               (0x4000)
-#define ETHER_DMA_CTL_RXBIGE_OFST                              (15)
-#define ETHER_DMA_CTL_RXBIGE_MSK                               (0x8000)
-#define ETHER_DMA_CTL_TXWAKEUP_OFST                            (16)
-#define ETHER_DMA_CTL_TXWAKEUP_MSK                             (0x10000)
-#define ETHER_DMA_CTL_SWINTREQ_OFST                            (17)
-#define ETHER_DMA_CTL_SWINTREQ_MSK                             (0x20000)
-#define ETHER_DMA_CTL_INTMASK_OFST                             (18)
-#define ETHER_DMA_CTL_INTMASK_MSK                              (0x40000)
-#define ETHER_DMA_CTL_M66ENSTAT_OFST                   (19)
-#define ETHER_DMA_CTL_M66ENSTAT_MSK                            (0x80000)
-#define ETHER_DMA_CTL_RMTXINIT_OFST                            (20)
-#define ETHER_DMA_CTL_RMTXINIT_MSK                             (0x100000)
-#define ETHER_DMA_CTL_RMRXINIT_OFST                            (21)
-#define ETHER_DMA_CTL_RMRXINIT_MSK                             (0x200000)
-#define ETHER_DMA_CTL_RXALIGN_OFST                             (22)
-#define ETHER_DMA_CTL_RXALIGN_MSK                              (0xC00000)
-#define ETHER_DMA_CTL_RMSWRQ_OFST                              (24)
-#define ETHER_DMA_CTL_RMSWRQ_MSK                               (0x1000000)
-#define ETHER_DMA_CTL_RMEMBANK_OFST                            (25)
-#define ETHER_DMA_CTL_RMEMBANK_MSK                             (0x2000000)
-
-#define ETHER_TXFRMPTR(base)                                                   (ETHER00_TYPE (base + 0x104))
-
-#define ETHER_TXTHRSH(base)                                                    (ETHER00_TYPE (base + 0x308))
-
-#define ETHER_TXPOLLCTR(base)                                                  (ETHER00_TYPE (base + 0x30c))
-
-#define        ETHER_BLFRMPTR(base)                                                    (ETHER00_TYPE (base + 0x110))
-#define ETHER_BLFFRMPTR_EOL_OFST                               (0)
-#define ETHER_BLFFRMPTR_EOL_MSK                                        (0x1)
-#define ETHER_BLFFRMPTR_ADDRESS_OFST                   (4)
-#define ETHER_BLFFRMPTR_ADDRESS_MSK                            (0xFFFFFFF0)
-
-#define ETHER_RXFRAGSIZE(base)                                         (ETHER00_TYPE (base + 0x114))
-#define        ETHER_RXFRAGSIZE_MINFRAG_OFST                   (2)
-#define        ETHER_RXFRAGSIZE_MINFRAG_MSK                    (0xFFC)
-#define        ETHER_RXFRAGSIZE_ENPACK_OFST                    (15)
-#define        ETHER_RXFRAGSIZE_ENPACK_MSK                             (0x8000)
-
-#define ETHER_INT_EN(base)                                                     (ETHER00_TYPE (base + 0x118))
-#define ETHER_INT_EN_FDAEXEN_OFST                              (0)
-#define ETHER_INT_EN_FDAEXEN_MSK                               (0x1)
-#define ETHER_INT_EN_BLEXEN_OFST                               (1)
-#define ETHER_INT_EN_BLEXN_MSK                                 (0x2)
-#define ETHER_INT_EN_STARGABTEN_OFST                   (2)
-#define ETHER_INT_EN_STARGABTEN_MSK                            (0x4)
-#define ETHER_INT_EN_RTARGABTEN_OFST                   (3)
-#define ETHER_INT_EN_RTARGABTEN_MSK                            (0x8)
-#define ETHER_INT_EN_RMASABTEN_OFST                            (4)
-#define ETHER_INT_EN_RMASABTEN_MSK                             (0x10)
-#define ETHER_INT_EN_SSYSERREN_OFST                            (5)
-#define ETHER_INT_EN_SSYSERREN_MSK                             (0x20)
-#define ETHER_INT_EN_DPARERREN_OFST                            (6)
-#define ETHER_INT_EN_DPARERREN_MSK                             (0x40)
-#define ETHER_INT_EN_EARNOTEN_OFST                             (7)
-#define ETHER_INT_EN_EARNOTEN_MSK                              (0x80)
-#define ETHER_INT_EN_DPARDEN_OFST                              (8)
-#define ETHER_INT_EN_DPARDEN_MSK                               (0x100)
-#define ETHER_INT_EN_DMPARERREN_OFST                   (9)
-#define ETHER_INT_EN_DMPARERREN_MSK                            (0x200)
-#define ETHER_INT_EN_TXCTLCMPEN_OFST                   (10)
-#define ETHER_INT_EN_TXCTLCMPEN_MSK                            (0x400)
-#define ETHER_INT_EN_NRABTEN_OFST                              (11)
-#define ETHER_INT_EN_NRABTEN_MSK                               (0x800)
-
-#define        ETHER_FDA_BAS(base)                                                     (ETHER00_TYPE (base + 0x11C))
-#define ETHER_FDA_BAS_ADDRESS_OFST                             (4)
-#define ETHER_FDA_BAS_ADDRESS_MSK                              (0xFFFFFFF0)
-
-#define ETHER_FDA_LIM(base)                                                    (ETHER00_TYPE (base + 0x120))
-#define ETHER_FDA_LIM_COUNT_OFST                               (4)
-#define ETHER_FDA_LIM_COUNT_MSK                                        (0xFFF0)
-
-#define ETHER_INT_SRC(base)                                                    (ETHER00_TYPE (base + 0x124))
-#define ETHER_INT_SRC_INTMACTX_OFST                            (0)
-#define ETHER_INT_SRC_INTMACTX_MSK                             (0x1)
-#define ETHER_INT_SRC_INTMACRX_OFST                            (1)
-#define ETHER_INT_SRC_INTMACRX_MSK                             (0x2)
-#define ETHER_INT_SRC_INTSBUS_OFST                             (2)
-#define ETHER_INT_SRC_INTSBUS_MSK                              (0x4)
-#define ETHER_INT_SRC_INTFDAEX_OFST                            (3)
-#define ETHER_INT_SRC_INTFDAEX_MSK                             (0x8)
-#define ETHER_INT_SRC_INTBLEX_OFST                             (4)
-#define ETHER_INT_SRC_INTBLEX_MSK                              (0x10)
-#define ETHER_INT_SRC_SWINT_OFST                               (5)
-#define ETHER_INT_SRC_SWINT_MSK                                        (0x20)
-#define ETHER_INT_SRC_INTEARNOT_OFST                   (6)
-#define ETHER_INT_SRC_INTEARNOT_MSK                            (0x40)
-#define ETHER_INT_SRC_DMPARERR_OFST                            (7)
-#define ETHER_INT_SRC_DMPARERR_MSK                             (0x80)
-#define ETHER_INT_SRC_INTEXBD_OFST                             (8)
-#define ETHER_INT_SRC_INTEXBD_MSK                              (0x100)
-#define ETHER_INT_SRC_INTTXCTLCMP_OFST                 (9)
-#define ETHER_INT_SRC_INTTXCTLCMP_MSK                  (0x200)
-#define ETHER_INT_SRC_INTNRABT_OFST                            (10)
-#define ETHER_INT_SRC_INTNRABT_MSK                             (0x400)
-#define ETHER_INT_SRC_FDAEX_OFST                               (11)
-#define ETHER_INT_SRC_FDAEX_MSK                                        (0x800)
-#define ETHER_INT_SRC_BLEX_OFST                                        (12)
-#define ETHER_INT_SRC_BLEX_MSK                                 (0x1000)
-#define ETHER_INT_SRC_DMPARERRSTAT_OFST                        (13)
-#define ETHER_INT_SRC_DMPARERRSTAT_MSK                 (0x2000)
-#define ETHER_INT_SRC_NRABT_OFST                               (14)
-#define ETHER_INT_SRC_NRABT_MSK                                        (0x4000)
-#define ETHER_INT_SRC_INTLINK_OFST                             (15)
-#define ETHER_INT_SRC_INTLINK_MSK                              (0x8000)
-#define ETHER_INT_SRC_INTEXDEFER_OFST                  (16)
-#define ETHER_INT_SRC_INTEXDEFER_MSK                   (0x10000)
-#define ETHER_INT_SRC_INTRMON_OFST                             (17)
-#define ETHER_INT_SRC_INTRMON_MSK                              (0x20000)
-#define ETHER_INT_SRC_IRQ_MSK                                  (0x83FF)
-
-#define ETHER_PAUSECNT(base)                                                   (ETHER00_TYPE (base + 0x40))
-#define ETHER_PAUSECNT_COUNT_OFST                              (0)
-#define ETHER_PAUSECNT_COUNT_MSK                               (0xFFFF)
-
-#define ETHER_REMPAUCNT(base)                                                  (ETHER00_TYPE (base + 0x44))
-#define ETHER_REMPAUCNT_COUNT_OFST                             (0)
-#define ETHER_REMPAUCNT_COUNT_MSK                              (0xFFFF)
-
-#define ETHER_TXCONFRMSTAT(base)                                               (ETHER00_TYPE (base + 0x348))
-#define ETHER_TXCONFRMSTAT_TS_STAT_VALUE_OFST  (0)
-#define ETHER_TXCONFRMSTAT_TS_STAT_VALUE_MSK   (0x3FFFFF)
-
-#define ETHER_MAC_CTL(base)                                                    (ETHER00_TYPE (base + 0))
-#define ETHER_MAC_CTL_HALTREQ_OFST                             (0)
-#define ETHER_MAC_CTL_HALTREQ_MSK                              (0x1)
-#define ETHER_MAC_CTL_HALTIMM_OFST                             (1)
-#define ETHER_MAC_CTL_HALTIMM_MSK                              (0x2)
-#define ETHER_MAC_CTL_RESET_OFST                               (2)
-#define ETHER_MAC_CTL_RESET_MSK                                        (0x4)
-#define ETHER_MAC_CTL_FULLDUP_OFST                             (3)
-#define ETHER_MAC_CTL_FULLDUP_MSK                              (0x8)
-#define ETHER_MAC_CTL_MACLOOP_OFST                             (4)
-#define ETHER_MAC_CTL_MACLOOP_MSK                              (0x10)
-#define ETHER_MAC_CTL_CONN_OFST                                        (5)
-#define ETHER_MAC_CTL_CONN_MSK                                 (0x60)
-#define ETHER_MAC_CTL_LOOP10_OFST                              (7)
-#define ETHER_MAC_CTL_LOOP10_MSK                               (0x80)
-#define ETHER_MAC_CTL_LNKCHG_OFST                              (8)
-#define ETHER_MAC_CTL_LNKCHG_MSK                               (0x100)
-#define ETHER_MAC_CTL_MISSROLL_OFST                            (10)
-#define ETHER_MAC_CTL_MISSROLL_MSK                             (0x400)
-#define ETHER_MAC_CTL_ENMISSROLL_OFST                  (13)
-#define ETHER_MAC_CTL_ENMISSROLL_MSK                   (0x2000)
-#define ETHER_MAC_CTL_LINK10_OFST                              (15)
-#define ETHER_MAC_CTL_LINK10_MSK                               (0x8000)
-
-#define ETHER_ARC_CTL(base)                                                    (ETHER00_TYPE (base + 0x4))
-#define        ETHER_ARC_CTL_STATIONACC_OFST                   (0)
-#define        ETHER_ARC_CTL_STATIONACC_MSK                    (0x1)
-#define        ETHER_ARC_CTL_GROUPACC_OFST                             (1)
-#define        ETHER_ARC_CTL_GROUPACC_MSK                              (0x2)
-#define        ETHER_ARC_CTL_BROADACC_OFST                             (2)
-#define        ETHER_ARC_CTL_BROADACC_MSK                              (0x4)
-#define        ETHER_ARC_CTL_NEGARC_OFST                               (3)
-#define        ETHER_ARC_CTL_NEGARC_MSK                                (0x8)
-#define        ETHER_ARC_CTL_COMPEN_OFST                               (4)
-#define        ETHER_ARC_CTL_COMPEN_MSK                                (0x10)
-
-#define ETHER_TX_CTL(base)                                                     (ETHER00_TYPE (base + 0x8))
-#define ETHER_TX_CTL_TXEN_OFST                                 (0)
-#define ETHER_TX_CTL_TXEN_MSK                                  (0x1)
-#define ETHER_TX_CTL_TXHALT_OFST                               (1)
-#define ETHER_TX_CTL_TXHALT_MSK                                        (0x2)
-#define ETHER_TX_CTL_NOPAD_OFST                                        (2)
-#define ETHER_TX_CTL_NOPAD_MSK                                 (0x4)
-#define ETHER_TX_CTL_NOCRC_OFST                                        (3)
-#define ETHER_TX_CTL_NOCRC_MSK                                 (0x8)
-#define ETHER_TX_CTL_FBACK_OFST                                        (4)
-#define ETHER_TX_CTL_FBACK_MSK                                 (0x10)
-#define ETHER_TX_CTL_NOEXDEF_OFST                              (5)
-#define ETHER_TX_CTL_NOEXDEF_MSK                               (0x20)
-#define ETHER_TX_CTL_SDPAUSE_OFST                              (6)
-#define ETHER_TX_CTL_SDPAUSE_MSK                               (0x40)
-#define ETHER_TX_CTL_MII10_OFST                                        (7)
-#define ETHER_TX_CTL_MII10_MSK                                 (0x80)
-#define ETHER_TX_CTL_ENUNDER_OFST                              (8)
-#define ETHER_TX_CTL_ENUNDER_MSK                               (0x100)
-#define ETHER_TX_CTL_ENEXDEFER_OFST                            (9)
-#define ETHER_TX_CTL_ENEXDEFER_MSK                             (0x200)
-#define ETHER_TX_CTL_ENLCARR_OFST                              (10)
-#define ETHER_TX_CTL_ENLCARR_MSK                               (0x400)
-#define ETHER_TX_CTL_ENEXCOLL_OFST                             (11)
-#define ETHER_TX_CTL_ENEXCOLL_MSK                              (0x800)
-#define ETHER_TX_CTL_ENLATECOLL_OFST                           (12)
-#define ETHER_TX_CTL_ENLATECOLL_MSK                            (0x1000)
-#define ETHER_TX_CTL_ENTXPAR_OFST                              (13)
-#define ETHER_TX_CTL_ENTXPAR_MSK                               (0x2000)
-#define ETHER_TX_CTL_ENCOMP_OFST                               (14)
-#define ETHER_TX_CTL_ENCOMP_MSK                                        (0x4000)
-
-#define ETHER_TX_STAT(base)                                                    (ETHER00_TYPE (base + 0xc))
-#define ETHER_TX_STAT_TXCOLL_OFST                              (0)
-#define ETHER_TX_STAT_TXCOLL_MSK                               (0xF)
-#define ETHER_TX_STAT_EXCOLL_OFST                              (4)
-#define ETHER_TX_STAT_EXCOLL_MSK                               (0x10)
-#define ETHER_TX_STAT_TXDEFER_OFST                             (5)
-#define ETHER_TX_STAT_TXDEFER_MSK                              (0x20)
-#define ETHER_TX_STAT_PAUSED_OFST                              (6)
-#define ETHER_TX_STAT_PAUSED_MSK                               (0x40)
-#define ETHER_TX_STAT_INTTX_OFST                               (7)
-#define ETHER_TX_STAT_INTTX_MSK                                        (0x80)
-#define ETHER_TX_STAT_UNDER_OFST                               (8)
-#define ETHER_TX_STAT_UNDER_MSK                                        (0x100)
-#define ETHER_TX_STAT_EXDEFER_OFST                             (9)
-#define ETHER_TX_STAT_EXDEFER_MSK                              (0x200)
-#define ETHER_TX_STAT_LCARR_OFST                               (10)
-#define ETHER_TX_STAT_LCARR_MSK                                        (0x400)
-#define ETHER_TX_STAT_TX10STAT_OFST                            (11)
-#define ETHER_TX_STAT_TX10STAT_MSK                             (0x800)
-#define ETHER_TX_STAT_LATECOLL_OFST                            (12)
-#define ETHER_TX_STAT_LATECOLL_MSK                             (0x1000)
-#define ETHER_TX_STAT_TXPAR_OFST                               (13)
-#define ETHER_TX_STAT_TXPAR_MSK                                        (0x2000)
-#define ETHER_TX_STAT_COMP_OFST                                        (14)
-#define ETHER_TX_STAT_COMP_MSK                                 (0x4000)
-#define ETHER_TX_STAT_TXHALTED_OFST                            (15)
-#define ETHER_TX_STAT_TXHALTED_MSK                             (0x8000)
-#define ETHER_TX_STAT_SQERR_OFST                               (16)
-#define ETHER_TX_STAT_SQERR_MSK                                        (0x10000)
-#define ETHER_TX_STAT_TXMCAST_OFST                             (17)
-#define ETHER_TX_STAT_TXMCAST_MSK                              (0x20000)
-#define ETHER_TX_STAT_TXBCAST_OFST                             (18)
-#define ETHER_TX_STAT_TXBCAST_MSK                              (0x40000)
-#define ETHER_TX_STAT_VLAN_OFST                                        (19)
-#define ETHER_TX_STAT_VLAN_MSK                                 (0x80000)
-#define ETHER_TX_STAT_MACC_OFST                                        (20)
-#define ETHER_TX_STAT_MACC_MSK                                 (0x100000)
-#define ETHER_TX_STAT_TXPAUSE_OFST                             (21)
-#define ETHER_TX_STAT_TXPAUSE_MSK                              (0x200000)
-
-#define ETHER_RX_CTL(base)                                                     (ETHER00_TYPE (base + 0x10))
-#define ETHER_RX_CTL_RXEN_OFST                                 (0)
-#define ETHER_RX_CTL_RXEN_MSK                                  (0x1)
-#define ETHER_RX_CTL_RXHALT_OFST                               (1)
-#define ETHER_RX_CTL_RXHALT_MSK                                        (0x2)
-#define ETHER_RX_CTL_LONGEN_OFST                               (2)
-#define ETHER_RX_CTL_LONGEN_MSK                                        (0x4)
-#define ETHER_RX_CTL_SHORTEN_OFST                              (3)
-#define ETHER_RX_CTL_SHORTEN_MSK                               (0x8)
-#define ETHER_RX_CTL_STRIPCRC_OFST                             (4)
-#define ETHER_RX_CTL_STRIPCRC_MSK                              (0x10)
-#define ETHER_RX_CTL_PASSCTL_OFST                              (5)
-#define ETHER_RX_CTL_PASSCTL_MSK                               (0x20)
-#define ETHER_RX_CTL_IGNORECRC_OFST                            (6)
-#define ETHER_RX_CTL_IGNORECRC_MSK                             (0x40)
-#define ETHER_RX_CTL_ENALIGN_OFST                              (8)
-#define ETHER_RX_CTL_ENALIGN_MSK                               (0x100)
-#define ETHER_RX_CTL_ENCRCERR_OFST                             (9)
-#define ETHER_RX_CTL_ENCRCERR_MSK                              (0x200)
-#define ETHER_RX_CTL_ENOVER_OFST                               (10)
-#define ETHER_RX_CTL_ENOVER_MSK                                        (0x400)
-#define ETHER_RX_CTL_ENLONGERR_OFST                            (11)
-#define ETHER_RX_CTL_ENLONGERR_MSK                             (0x800)
-#define ETHER_RX_CTL_ENRXPAR_OFST                              (13)
-#define ETHER_RX_CTL_ENRXPAR_MSK                               (0x2000)
-#define ETHER_RX_CTL_ENGOOD_OFST                               (14)
-#define ETHER_RX_CTL_ENGOOD_MSK                                        (0x4000)
-
-#define ETHER_RX_STAT(base)                                                    (ETHER00_TYPE (base + 0x14))
-#define ETHER_RX_STAT_LENERR_OFST                              (4)
-#define ETHER_RX_STAT_LENERR_MSK                               (0x10)
-#define ETHER_RX_STAT_CTLRECD_OFST                             (5)
-#define ETHER_RX_STAT_CTLRECD_MSK                              (0x20)
-#define ETHER_RX_STAT_INTRX_OFST                               (6)
-#define ETHER_RX_STAT_INTRX_MSK                                        (0x40)
-#define ETHER_RX_STAT_RX10STAT_OFST                            (7)
-#define ETHER_RX_STAT_RX10STAT_MSK                             (0x80)
-#define ETHER_RX_STAT_ALIGNERR_OFST                            (8)
-#define ETHER_RX_STAT_ALIGNERR_MSK                             (0x100)
-#define ETHER_RX_STAT_CRCERR_OFST                              (9)
-#define ETHER_RX_STAT_CRCERR_MSK                               (0x200)
-#define ETHER_RX_STAT_OVERFLOW_OFST                            (10)
-#define ETHER_RX_STAT_OVERFLOW_MSK                             (0x400)
-#define ETHER_RX_STAT_LONGERR_OFST                             (11)
-#define ETHER_RX_STAT_LONGERR_MSK                              (0x800)
-#define ETHER_RX_STAT_RXPAR_OFST                               (13)
-#define ETHER_RX_STAT_RXPAR_MSK                                        (0x2000)
-#define ETHER_RX_STAT_GOOD_OFST                                        (14)
-#define ETHER_RX_STAT_GOOD_MSK                                 (0x4000)
-#define ETHER_RX_STAT_RXHALTED_OFST                            (15)
-#define ETHER_RX_STAT_RXHALTED_MSK                             (0x8000)
-#define ETHER_RX_STAT_RXMCAST_OFST                             (17)
-#define ETHER_RX_STAT_RXMCAST_MSK                              (0x10000)
-#define ETHER_RX_STAT_RXBCAST_OFST                             (18)
-#define ETHER_RX_STAT_RXBCAST_MSK                              (0x20000)
-#define ETHER_RX_STAT_RXVLAN_OFST                              (19)
-#define ETHER_RX_STAT_RXVLAN_MSK                               (0x40000)
-#define ETHER_RX_STAT_RXPAUSE_OFST                             (20)
-#define ETHER_RX_STAT_RXPAUSE_MSK                              (0x80000)
-#define ETHER_RX_STAT_ARCSTATUS_OFST                           (21)
-#define ETHER_RX_STAT_ARCSTATUS_MSK                            (0xF00000)
-#define ETHER_RX_STAT_ARCENT_OFST                              (25)
-#define ETHER_RX_STAT_ARCENT_MSK                               (0x1F000000)
-
-#define ETHER_MD_DATA(base)                                                    (ETHER00_TYPE (base + 0x18))
-
-#define ETHER_MD_CA(base)                                                              (ETHER00_TYPE (base + 0x1c))
-#define ETHER_MD_CA_ADDR_OFST                                  (0)
-#define ETHER_MD_CA_ADDR_MSK                                   (0x1F)
-#define ETHER_MD_CA_PHY_OFST                                   (5)
-#define ETHER_MD_CA_PHY_MSK                                    (0x3E0)
-#define ETHER_MD_CA_WR_OFST                                    (10)
-#define ETHER_MD_CA_WR_MSK                                     (0x400)
-#define ETHER_MD_CA_BUSY_OFST                                  (11)
-#define ETHER_MD_CA_BUSY_MSK                                   (0x800)
-#define ETHER_MD_CA_PRESUPP_OFST                               (12)
-#define ETHER_MD_CA_PRESUPP_MSK                                        (0x1000)
-
-#define ETHER_ARC_ADR(base)          (ETHER00_TYPE (base + 0x160))
-#define ETHER_ARC_ADR_ARC_LOC_OFST                             (2)
-#define ETHER_ARC_ADR_ARC_LOC_MSK                              (0xFFC)
-
-#define ETHER_ARC_DATA(base)  (ETHER00_TYPE (base + 0x364))
-
-#define ETHER_ARC_ENA(base)   (ETHER00_TYPE (base + 0x28))
-#define ETHER_ARC_ENA_MSK                                      (0x1FFFFF)
-
-#define ETHER_PROM_CTL(base)                                                   (ETHER00_TYPE (base + 0x2c))
-#define ETHER_PROM_CTL_PROM_ADDR_OFST                  (0)
-#define ETHER_PROM_CTL_PROM_ADDR_MSK                   (0x3F)
-#define ETHER_PROM_CTL_OPCODE_OFST                             (13)
-#define ETHER_PROM_CTL_OPCODE_MSK                              (0x6000)
-#define ETHER_PROM_CTL_OPCODE_READ_MSK                 (0x4000)
-#define ETHER_PROM_CTL_OPCODE_WRITE_MSK                        (0x2000)
-#define ETHER_PROM_CTL_OPCODE_ERASE_MSK                        (0x6000)
-#define ETHER_PROM_CTL_ENABLE_MSK                              (0x0030)
-#define ETHER_PROM_CTL_DISABLE_MSK                             (0x0000)
-#define ETHER_PROM_CTL_BUSY_OFST                               (15)
-#define ETHER_PROM_CTL_BUSY_MSK                                        (0x8000)
-
-#define ETHER_PROM_DATA(base)                                                  (ETHER00_TYPE (base + 0x30))
-
-#define ETHER_MISS_CNT(base)                                                   (ETHER00_TYPE (base + 0x3c))
-#define ETHER_MISS_CNT_COUNT_OFST                              (0)
-#define ETHER_MISS_CNT_COUNT_MSK                               (0xFFFF)
-
-#define ETHER_CNTDATA(base)                                                    (ETHER00_TYPE (base + 0x80))
-
-#define ETHER_CNTACC(base)                                                     (ETHER00_TYPE (base + 0x84))
-#define ETHER_CNTACC_ADDR_OFST                                 (0)
-#define ETHER_CNTACC_ADDR_MSK                                  (0xFF)
-#define ETHER_CNTACC_WRRDN_OFST                                        (8)
-#define ETHER_CNTACC_WRRDN_MSK                                 (0x100)
-#define ETHER_CNTACC_CLEAR_OFST                                        (9)
-#define ETHER_CNTACC_CLEAR_MSK                                 (0x200)
-
-#define ETHER_TXRMINTEN(base)                                                  (ETHER00_TYPE (base + 0x88))
-#define ETHER_TXRMINTEN_MSK                                            (0x3FFFFFFF)
-
-#define ETHER_RXRMINTEN(base)                                                  (ETHER00_TYPE (base + 0x8C))
-#define ETHER_RXRMINTEN_MSK                                            (0xFFFFFF)
-
-/*
-*      RMON Registers
-*/
-#define                RMON_COLLISION0                                         0x0
-#define                RMON_COLLISION1                                         0x1
-#define                RMON_COLLISION2                                         0x2
-#define                RMON_COLLISION3                                         0x3
-#define                RMON_COLLISION4                                         0x4
-#define                RMON_COLLISION5                                         0x5
-#define                RMON_COLLISION6                                         0x6
-#define                RMON_COLLISION7                                         0x7
-#define                RMON_COLLISION8                                         0x8
-#define                RMON_COLLISION9                                         0x9
-#define                RMON_COLLISION10                                        0xa
-#define                RMON_COLLISION11                                        0xb
-#define                RMON_COLLISION12                                        0xc
-#define                RMON_COLLISION13                                        0xd
-#define                RMON_COLLISION14                                        0xe
-#define                RMON_COLLISION15                                        0xf
-#define                RMON_COLLISION16                                        0x10
-#define                RMON_FRAMES_WITH_DEFERRED_XMISSIONS     0x11
-#define                RMON_LATE_COLLISIONS                            0x12
-#define                RMON_FRAMES_LOST_DUE_TO_MAC_XMIT        0x13
-#define                RMON_CARRIER_SENSE_ERRORS                       0x14
-#define                RMON_FRAMES_WITH_EXCESSIVE_DEFERAL      0x15
-#define                RMON_UNICAST_FRAMES_TRANSMITTED_OK      0x16
-#define                RMON_MULTICAST_FRAMES_XMITTED_OK        0x17
-#define                RMON_BROADCAST_FRAMES_XMITTED_OK        0x18
-#define                RMON_SQE_TEST_ERRORS                            0x19
-#define                RMON_PAUSE_MACCTRL_FRAMES_XMITTED       0x1A
-#define                RMON_MACCTRL_FRAMES_XMITTED                     0x1B
-#define                RMON_VLAN_FRAMES_XMITTED                        0x1C
-#define                RMON_OCTETS_XMITTED_OK                          0x1D
-#define                RMON_OCTETS_XMITTED_OK_HI                       0x1E
-
-#define                RMON_RX_PACKET_SIZES0                           0x40
-#define                RMON_RX_PACKET_SIZES1                           0x41
-#define                RMON_RX_PACKET_SIZES2                           0x42
-#define                RMON_RX_PACKET_SIZES3                           0x43
-#define                RMON_RX_PACKET_SIZES4                           0x44
-#define                RMON_RX_PACKET_SIZES5                           0x45
-#define                RMON_RX_PACKET_SIZES6                           0x46
-#define                RMON_RX_PACKET_SIZES7                           0x47
-#define                RMON_FRAME_CHECK_SEQUENCE_ERRORS        0x48
-#define                RMON_ALIGNMENT_ERRORS                           0x49
-#define                RMON_FRAGMENTS                                          0x4A
-#define                RMON_JABBERS                                            0x4B
-#define                RMON_FRAMES_LOST_TO_INTMACRCVERR        0x4C
-#define                RMON_UNICAST_FRAMES_RCVD_OK                     0x4D
-#define                RMON_MULTICAST_FRAMES_RCVD_OK           0x4E
-#define                RMON_BROADCAST_FRAMES_RCVD_OK           0x4F
-#define                RMON_IN_RANGE_LENGTH_ERRORS                     0x50
-#define                RMON_OUT_OF_RANGE_LENGTH_ERRORS         0x51
-#define                RMON_VLAN_FRAMES_RCVD                           0x52
-#define                RMON_PAUSE_MAC_CTRL_FRAMES_RCVD         0x53
-#define                RMON_MAC_CTRL_FRAMES_RCVD                       0x54
-#define                RMON_OCTETS_RCVD_OK                                     0x55
-#define                RMON_OCTETS_RCVD_OK_HI                          0x56
-#define                RMON_OCTETS_RCVD_OTHER                          0x57
-#define                RMON_OCTETS_RCVD_OTHER_HI                       0x58
-
-#endif /* __ETHER00_H */
diff --git a/include/asm-arm/arch-epxa10db/excalibur.h b/include/asm-arm/arch-epxa10db/excalibur.h
deleted file mode 100644 (file)
index 5c91dd6..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/* megafunction wizard: %ARM-Based Excalibur%
-   GENERATION: STANDARD
-   VERSION: WM1.0
-   MODULE: ARM-Based Excalibur
-   PROJECT: excalibur
-   ============================================================
-   File Name: v:\embedded\linux\bootldr\excalibur.h
-   Megafunction Name(s): ARM-Based Excalibur
-   ============================================================
-
-   ************************************************************
-   THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
-   ************************************************************/
-
-#ifndef        EXCALIBUR_H_INCLUDED
-#define        EXCALIBUR_H_INCLUDED
-
-#define EXC_DEFINE_PROCESSOR_LITTLE_ENDIAN
-#define EXC_DEFINE_BOOT_FROM_FLASH
-
-#define        EXC_INPUT_CLK_FREQUENCY (50000000)
-#define        EXC_AHB1_CLK_FREQUENCY (150000000)
-#define        EXC_AHB2_CLK_FREQUENCY (75000000)
-#define        EXC_SDRAM_CLK_FREQUENCY (75000000)
-
-/* Registers Block */
-#define        EXC_REGISTERS_BASE (0x7fffc000)
-#define        EXC_MODE_CTRL00_BASE (EXC_REGISTERS_BASE + 0x000)
-#define        EXC_IO_CTRL00_BASE (EXC_REGISTERS_BASE + 0x040)
-#define        EXC_MMAP00_BASE (EXC_REGISTERS_BASE + 0x080)
-#define        EXC_PLD_CONFIG00_BASE (EXC_REGISTERS_BASE + 0x140)
-#define        EXC_TIMER00_BASE (EXC_REGISTERS_BASE + 0x200)
-#define        EXC_INT_CTRL00_BASE (EXC_REGISTERS_BASE + 0xc00)
-#define        EXC_CLOCK_CTRL00_BASE (EXC_REGISTERS_BASE + 0x300)
-#define        EXC_WATCHDOG00_BASE (EXC_REGISTERS_BASE + 0xa00)
-#define        EXC_UART00_BASE (EXC_REGISTERS_BASE + 0x280)
-#define        EXC_EBI00_BASE (EXC_REGISTERS_BASE + 0x380)
-#define        EXC_SDRAM00_BASE (EXC_REGISTERS_BASE + 0x400)
-#define        EXC_AHB12_BRIDGE_CTRL00_BASE (EXC_REGISTERS_BASE + 0x800)
-#define        EXC_PLD_STRIPE_BRIDGE_CTRL00_BASE (EXC_REGISTERS_BASE + 0x100)
-#define        EXC_STRIPE_PLD_BRIDGE_CTRL00_BASE (EXC_REGISTERS_BASE + 0x100)
-
-#define        EXC_REGISTERS_SIZE (0x00004000)
-
-/* EBI Block(s) */
-#define        EXC_EBI_BLOCK0_BASE (0x40000000)
-#define        EXC_EBI_BLOCK0_SIZE (0x00400000)
-#define        EXC_EBI_BLOCK0_WIDTH (8)
-#define        EXC_EBI_BLOCK0_NON_CACHEABLE
-#define        EXC_EBI_BLOCK1_BASE (0x40400000)
-#define        EXC_EBI_BLOCK1_SIZE (0x00400000)
-#define        EXC_EBI_BLOCK1_WIDTH (16)
-#define        EXC_EBI_BLOCK1_NON_CACHEABLE
-#define        EXC_EBI_BLOCK2_BASE (0x40800000)
-#define        EXC_EBI_BLOCK2_SIZE (0x00400000)
-#define        EXC_EBI_BLOCK2_WIDTH (16)
-#define        EXC_EBI_BLOCK2_NON_CACHEABLE
-#define        EXC_EBI_BLOCK3_BASE (0x40c00000)
-#define        EXC_EBI_BLOCK3_SIZE (0x00400000)
-#define        EXC_EBI_BLOCK3_WIDTH (16)
-#define        EXC_EBI_BLOCK3_NON_CACHEABLE
-
-/* SDRAM Block(s) */
-#define        EXC_SDRAM_BLOCK0_BASE (0x00000000)
-#define        EXC_SDRAM_BLOCK0_SIZE (0x04000000)
-#define        EXC_SDRAM_BLOCK0_WIDTH (32)
-#define        EXC_SDRAM_BLOCK1_BASE (0x04000000)
-#define        EXC_SDRAM_BLOCK1_SIZE (0x04000000)
-#define        EXC_SDRAM_BLOCK1_WIDTH (32)
-
-/* Single Port SRAM Block(s) */
-#define        EXC_SPSRAM_BLOCK0_BASE (0x08000000)
-#define        EXC_SPSRAM_BLOCK0_SIZE (0x00020000)
-#define        EXC_SPSRAM_BLOCK1_BASE (0x08020000)
-#define        EXC_SPSRAM_BLOCK1_SIZE (0x00020000)
-
-/* PLD Block(s) */
-#define        EXC_PLD_BLOCK0_BASE (0x80000000)
-#define        EXC_PLD_BLOCK0_SIZE (0x00004000)
-#define        EXC_PLD_BLOCK0_NON_CACHEABLE
-#define        EXC_PLD_BLOCK1_BASE (0xf000000)
-#define        EXC_PLD_BLOCK1_SIZE (0x00004000)
-#define        EXC_PLD_BLOCK1_NON_CACHEABLE
-#define        EXC_PLD_BLOCK2_BASE (0x80008000)
-#define        EXC_PLD_BLOCK2_SIZE (0x00004000)
-#define        EXC_PLD_BLOCK2_NON_CACHEABLE
-#define        EXC_PLD_BLOCK3_BASE (0x8000c000)
-#define        EXC_PLD_BLOCK3_SIZE (0x00004000)
-#define        EXC_PLD_BLOCK3_NON_CACHEABLE
-
-#endif
diff --git a/include/asm-arm/arch-epxa10db/hardware.h b/include/asm-arm/arch-epxa10db/hardware.h
deleted file mode 100644 (file)
index b992c29..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- *  linux/include/asm-arm/arch-epxa10/hardware.h
- *
- *  This file contains the hardware definitions of the Integrator.
- *
- *  Copyright (C) 1999 ARM Limited.
- *  Copyright (C) 2001 Altera Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __ASM_ARCH_HARDWARE_H
-#define __ASM_ARCH_HARDWARE_H
-
-#include <asm/arch/platform.h>
-
-/*
- * Where in virtual memory the IO devices (timers, system controllers
- * and so on)
- */
-#define IO_BASE                        0xf0000000                 // VA of IO 
-#define IO_SIZE                        0x10000000                 // How much?
-#define IO_START               EXC_REGISTERS_BASE              // PA of IO
-/* macro to get at IO space when running virtually */
-#define IO_ADDRESS(x) ((x) | 0xf0000000) 
-
-#define FLASH_VBASE             0xFE000000
-#define FLASH_SIZE              0x01000000
-#define FLASH_START             EXC_EBI_BLOCK0_BASE
-#define FLASH_VADDR(x) ((x)|0xFE000000)
-/*
- * Similar to above, but for PCI addresses (memory, IO, Config and the
- * V3 chip itself).  WARNING: this has to mirror definitions in platform.h
- */
-#if 0
-#define PCI_MEMORY_VADDR        0xe8000000
-#define PCI_CONFIG_VADDR        0xec000000
-#define PCI_V3_VADDR            0xed000000
-#define PCI_IO_VADDR            0xee000000
-
-#define PCIO_BASE              PCI_IO_VADDR
-#define PCIMEM_BASE            PCI_MEMORY_VADDR
-
-
-#define pcibios_assign_all_busses()    1
-
-#define PCIBIOS_MIN_IO         0x6000
-#define PCIBIOS_MIN_MEM        0x00100000
-#endif
-
-
-#endif
-
diff --git a/include/asm-arm/arch-epxa10db/int_ctrl00.h b/include/asm-arm/arch-epxa10db/int_ctrl00.h
deleted file mode 100644 (file)
index 23ec864..0000000
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- *  
- *  This file contains the register definitions for the Excalibur
- *  Timer TIMER00.
- *
- *  Copyright (C) 2001 Altera Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef __INT_CTRL00_H
-#define __INT_CTRL00_H
-
-#define INT_MS(base_addr) (INT_CTRL00_TYPE (base_addr  + 0x00 ))
-#define INT_MS_FC_MSK (0x10000)
-#define INT_MS_FC_OFST (16)
-#define INT_MS_M1_MSK (0x8000)
-#define INT_MS_M1_OFST (15)
-#define INT_MS_M0_MSK (0x4000)
-#define INT_MS_M0_OFST (14)
-#define INT_MS_AE_MSK (0x2000)
-#define INT_MS_AE_OFST (13)
-#define INT_MS_PE_MSK (0x1000)
-#define INT_MS_PE_OFST (12)
-#define INT_MS_EE_MSK (0x0800)
-#define INT_MS_EE_OFST (11)
-#define INT_MS_PS_MSK (0x0400)
-#define INT_MS_PS_OFST (10)
-#define INT_MS_T1_MSK (0x0200)
-#define INT_MS_T1_OFST (9)
-#define INT_MS_T0_MSK (0x0100)
-#define INT_MS_T0_OFST (8)
-#define INT_MS_UA_MSK (0x0080)
-#define INT_MS_UA_OFST (7)
-#define INT_MS_IP_MSK (0x0040)
-#define INT_MS_IP_OFST (6)
-#define INT_MS_P5_MSK (0x0020)
-#define INT_MS_P5_OFST (5)
-#define INT_MS_P4_MSK (0x0010)
-#define INT_MS_P4_OFST (4)
-#define INT_MS_P3_MSK (0x0008)
-#define INT_MS_P3_OFST (3)
-#define INT_MS_P2_MSK (0x0004)
-#define INT_MS_P2_OFST (2)
-#define INT_MS_P1_MSK (0x0002)
-#define INT_MS_P1_OFST (1)
-#define INT_MS_P0_MSK (0x0001)
-#define INT_MS_P0_OFST (0)
-
-#define INT_MC(base_addr) (INT_CTRL00_TYPE (base_addr  + 0x04 ))
-#define INT_MC_FC_MSK (0x10000)
-#define INT_MC_FC_OFST (16)
-#define INT_MC_M1_MSK (0x8000)
-#define INT_MC_M1_OFST (15)
-#define INT_MC_M0_MSK (0x4000)
-#define INT_MC_M0_OFST (14)
-#define INT_MC_AE_MSK (0x2000)
-#define INT_MC_AE_OFST (13)
-#define INT_MC_PE_MSK (0x1000)
-#define INT_MC_PE_OFST (12)
-#define INT_MC_EE_MSK (0x0800)
-#define INT_MC_EE_OFST (11)
-#define INT_MC_PS_MSK (0x0400)
-#define INT_MC_PS_OFST (10)
-#define INT_MC_T1_MSK (0x0200)
-#define INT_MC_T1_OFST (9)
-#define INT_MC_T0_MSK (0x0100)
-#define INT_MC_T0_OFST (8)
-#define INT_MC_UA_MSK (0x0080)
-#define INT_MC_UA_OFST (7)
-#define INT_MC_IP_MSK (0x0040)
-#define INT_MC_IP_OFST (6)
-#define INT_MC_P5_MSK (0x0020)
-#define INT_MC_P5_OFST (5)
-#define INT_MC_P4_MSK (0x0010)
-#define INT_MC_P4_OFST (4)
-#define INT_MC_P3_MSK (0x0008)
-#define INT_MC_P3_OFST (3)
-#define INT_MC_P2_MSK (0x0004)
-#define INT_MC_P2_OFST (2)
-#define INT_MC_P1_MSK (0x0002)
-#define INT_MC_P1_OFST (1)
-#define INT_MC_P0_MSK (0x0001)
-#define INT_MC_P0_OFST (0)
-
-#define INT_SS(base_addr) (INT_CTRL00_TYPE (base_addr  + 0x08 ))
-#define INT_SS_FC_SSK (0x8000)
-#define INT_SS_FC_OFST (15)
-#define INT_SS_M1_SSK (0x8000)
-#define INT_SS_M1_OFST (15)
-#define INT_SS_M0_SSK (0x4000)
-#define INT_SS_M0_OFST (14)
-#define INT_SS_AE_SSK (0x2000)
-#define INT_SS_AE_OFST (13)
-#define INT_SS_PE_SSK (0x1000)
-#define INT_SS_PE_OFST (12)
-#define INT_SS_EE_SSK (0x0800)
-#define INT_SS_EE_OFST (11)
-#define INT_SS_PS_SSK (0x0400)
-#define INT_SS_PS_OFST (10)
-#define INT_SS_T1_SSK (0x0200)
-#define INT_SS_T1_OFST (9)
-#define INT_SS_T0_SSK (0x0100)
-#define INT_SS_T0_OFST (8)
-#define INT_SS_UA_SSK (0x0080)
-#define INT_SS_UA_OFST (7)
-#define INT_SS_IP_SSK (0x0040)
-#define INT_SS_IP_OFST (6)
-#define INT_SS_P5_SSK (0x0020)
-#define INT_SS_P5_OFST (5)
-#define INT_SS_P4_SSK (0x0010)
-#define INT_SS_P4_OFST (4)
-#define INT_SS_P3_SSK (0x0008)
-#define INT_SS_P3_OFST (3)
-#define INT_SS_P2_SSK (0x0004)
-#define INT_SS_P2_OFST (2)
-#define INT_SS_P1_SSK (0x0002)
-#define INT_SS_P1_OFST (1)
-#define INT_SS_P0_SSK (0x0001)
-#define INT_SS_P0_OFST (0)
-
-#define INT_RS(base_addr) (INT_CTRL00_TYPE (base_addr  + 0x0C ))
-#define INT_RS_FC_RSK (0x10000)
-#define INT_RS_FC_OFST (16)
-#define INT_RS_M1_RSK (0x8000)
-#define INT_RS_M1_OFST (15)
-#define INT_RS_M0_RSK (0x4000)
-#define INT_RS_M0_OFST (14)
-#define INT_RS_AE_RSK (0x2000)
-#define INT_RS_AE_OFST (13)
-#define INT_RS_PE_RSK (0x1000)
-#define INT_RS_PE_OFST (12)
-#define INT_RS_EE_RSK (0x0800)
-#define INT_RS_EE_OFST (11)
-#define INT_RS_PS_RSK (0x0400)
-#define INT_RS_PS_OFST (10)
-#define INT_RS_T1_RSK (0x0200)
-#define INT_RS_T1_OFST (9)
-#define INT_RS_T0_RSK (0x0100)
-#define INT_RS_T0_OFST (8)
-#define INT_RS_UA_RSK (0x0080)
-#define INT_RS_UA_OFST (7)
-#define INT_RS_IP_RSK (0x0040)
-#define INT_RS_IP_OFST (6)
-#define INT_RS_P5_RSK (0x0020)
-#define INT_RS_P5_OFST (5)
-#define INT_RS_P4_RSK (0x0010)
-#define INT_RS_P4_OFST (4)
-#define INT_RS_P3_RSK (0x0008)
-#define INT_RS_P3_OFST (3)
-#define INT_RS_P2_RSK (0x0004)
-#define INT_RS_P2_OFST (2)
-#define INT_RS_P1_RSK (0x0002)
-#define INT_RS_P1_OFST (1)
-#define INT_RS_P0_RSK (0x0001)
-#define INT_RS_P0_OFST (0)
-
-#define INT_ID(base_addr) (INT_CTRL00_TYPE (base_addr  + 0x10 ))
-#define INT_ID_ID_MSK (0x3F)
-#define INT_ID_ID_OFST (0)
-
-#define INT_PLD_PRIORITY(base_addr) (INT_CTRL00_TYPE (base_addr  + 0x14 ))
-#define INT_PLD_PRIORITY_PRI_MSK (0x3F)
-#define INT_PLD_PRIORITY_PRI_OFST (0)
-#define INT_PLD_PRIORITY_GA_MSK (0x40)
-#define INT_PLD_PRIORITY_GA_OFST (6)
-
-#define INT_MODE(base_addr) (INT_CTRL00_TYPE (base_addr  + 0x18 ))
-#define INT_MODE_MODE_MSK (0x3)
-#define INT_MODE_MODE_OFST (0)
-
-#define INT_PRIORITY_P0(base_addr) (INT_CTRL00_TYPE (base_addr  + 0x80 ))
-#define INT_PRIORITY_P0_PRI_MSK (0x3F)
-#define INT_PRIORITY_P0_PRI_OFST (0)
-#define INT_PRIORITY_P0_FQ_MSK (0x40)
-#define INT_PRIORITY_P0_FQ_OFST (6)
-
-#define INT_PRIORITY_P1(base_addr) (INT_CTRL00_TYPE (base_addr  + 0x84 ))
-#define INT_PRIORITY_P1_PRI_MSK (0x3F)
-#define INT_PRIORITY_P1_PRI_OFST (0)
-#define INT_PRIORITY_P1_FQ_MSK (0x40)
-#define INT_PRIORITY_P1_FQ_OFST (6)
-
-#define INT_PRIORITY_P2(base_addr) (INT_CTRL00_TYPE (base_addr  + 0x88 ))
-#define INT_PRIORITY_P2_PRI_MSK (0x3F)
-#define INT_PRIORITY_P2_PRI_OFST (0)
-#define INT_PRIORITY_P2_FQ_MSK (0x40)
-#define INT_PRIORITY_P2_FQ_OFST (6)
-
-#define INT_PRIORITY_P3(base_addr) (INT_CTRL00_TYPE (base_addr  + 0x8C ))
-#define INT_PRIORITY_P3_PRI_MSK (0x3F)
-#define INT_PRIORITY_P3_PRI_OFST (0)
-#define INT_PRIORITY_P3_FQ_MSK (0x40)
-#define INT_PRIORITY_P3_FQ_OFST (6)
-
-#define INT_PRIORITY_P4(base_addr) (INT_CTRL00_TYPE (base_addr  + 0x90 ))
-#define INT_PRIORITY_P4_PRI_MSK (0x3F)
-#define INT_PRIORITY_P4_PRI_OFST (0)
-#define INT_PRIORITY_P4_FQ_MSK (0x40)
-#define INT_PRIORITY_P4_FQ_OFST (6)
-
-#define INT_PRIORITY_P5(base_addr) (INT_CTRL00_TYPE (base_addr  + 0x94 ))
-#define INT_PRIORITY_P5_PRI_MSK (0x3F)
-#define INT_PRIORITY_P5_PRI_OFST (0)
-#define INT_PRIORITY_P5_FQ_MSK (0x40)
-#define INT_PRIORITY_P5_FQ_OFST (6)
-
-#define INT_PRIORITY_IP(base_addr) (INT_CTRL00_TYPE (base_addr  + 0x94 ))
-#define INT_PRIORITY_IP_PRI_MSK (0x3F)
-#define INT_PRIORITY_IP_PRI_OFST (0)
-#define INT_PRIORITY_IP_FQ_MSK (0x40)
-#define INT_PRIORITY_IP_FQ_OFST (6)
-
-#define INT_PRIORITY_UA(base_addr) (INT_CTRL00_TYPE (base_addr  + 0x9C ))
-#define INT_PRIORITY_UA_PRI_MSK (0x3F)
-#define INT_PRIORITY_UA_PRI_OFST (0)
-#define INT_PRIORITY_UA_FQ_MSK (0x40)
-#define INT_PRIORITY_UA_FQ_OFST (6)
-
-#define INT_PRIORITY_T0(base_addr) (INT_CTRL00_TYPE (base_addr  + 0xA0 ))
-#define INT_PRIORITY_T0_PRI_MSK (0x3F)
-#define INT_PRIORITY_T0_PRI_OFST (0)
-#define INT_PRIORITY_T0_FQ_MSK (0x40)
-#define INT_PRIORITY_T0_FQ_OFST (6)
-
-#define INT_PRIORITY_T1(base_addr) (INT_CTRL00_TYPE (base_addr  + 0xA4 ))
-#define INT_PRIORITY_T1_PRI_MSK (0x3F)
-#define INT_PRIORITY_T1_PRI_OFST (0)
-#define INT_PRIORITY_T1_FQ_MSK (0x40)
-#define INT_PRIORITY_T1_FQ_OFST (6)
-
-#define INT_PRIORITY_PS(base_addr) (INT_CTRL00_TYPE (base_addr  + 0xA8 ))
-#define INT_PRIORITY_PS_PRI_MSK (0x3F)
-#define INT_PRIORITY_PS_PRI_OFST (0)
-#define INT_PRIORITY_PS_FQ_MSK (0x40)
-#define INT_PRIORITY_PS_FQ_OFST (6)
-
-#define INT_PRIORITY_EE(base_addr) (INT_CTRL00_TYPE (base_addr  + 0xAC ))
-#define INT_PRIORITY_EE_PRI_MSK (0x3F)
-#define INT_PRIORITY_EE_PRI_OFST (0)
-#define INT_PRIORITY_EE_FQ_MSK (0x40)
-#define INT_PRIORITY_EE_FQ_OFST (6)
-
-#define INT_PRIORITY_PE(base_addr) (INT_CTRL00_TYPE (base_addr  + 0xB0 ))
-#define INT_PRIORITY_PE_PRI_MSK (0x3F)
-#define INT_PRIORITY_PE_PRI_OFST (0)
-#define INT_PRIORITY_PE_FQ_MSK (0x40)
-#define INT_PRIORITY_PE_FQ_OFST (6)
-
-#define INT_PRIORITY_AE(base_addr) (INT_CTRL00_TYPE (base_addr  + 0xB4 ))
-#define INT_PRIORITY_AE_PRI_MSK (0x3F)
-#define INT_PRIORITY_AE_PRI_OFST (0)
-#define INT_PRIORITY_AE_FQ_MSK (0x40)
-#define INT_PRIORITY_AE_FQ_OFST (6)
-
-#define INT_PRIORITY_M0(base_addr) (INT_CTRL00_TYPE (base_addr  + 0xB8 ))
-#define INT_PRIORITY_M0_PRI_MSK (0x3F)
-#define INT_PRIORITY_M0_PRI_OFST (0)
-#define INT_PRIORITY_M0_FQ_MSK (0x40)
-#define INT_PRIORITY_M0_FQ_OFST (6)
-
-#define INT_PRIORITY_M1(base_addr) (INT_CTRL00_TYPE (base_addr  + 0xBC ))
-#define INT_PRIORITY_M1_PRI_MSK (0x3F)
-#define INT_PRIORITY_M1_PRI_OFST (0)
-#define INT_PRIORITY_M1_FQ_MSK (0x40)
-#define INT_PRIORITY_M1_FQ_OFST (6)
-
-#define INT_PRIORITY_FC(base_addr) (INT_CTRL00_TYPE (base_addr  + 0xC0 ))
-#define INT_PRIORITY_FC_PRI_MSK (0x3F)
-#define INT_PRIORITY_FC_PRI_OFST (0)
-#define INT_PRIORITY_FC_FQ_MSK (0x40)
-#define INT_PRIORITY_FC_FQ_OFST (6)
-
-#endif /* __INT_CTRL00_H */
-
-
diff --git a/include/asm-arm/arch-epxa10db/irqs.h b/include/asm-arm/arch-epxa10db/irqs.h
deleted file mode 100644 (file)
index c3758a3..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *  linux/include/asm-arm/arch-camelot/irqs.h
- *
- *  Copyright (C) 2001 Altera Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-/* Use the Excalibur chip definitions */
-#define INT_CTRL00_TYPE
-#include "asm/arch/int_ctrl00.h"
-
-
-#define IRQ_PLD0                     INT_MS_P0_OFST
-#define IRQ_PLD1                     INT_MS_P1_OFST
-#define IRQ_PLD2                     INT_MS_P2_OFST
-#define IRQ_PLD3                     INT_MS_P3_OFST
-#define IRQ_PLD4                     INT_MS_P4_OFST
-#define IRQ_PLD5                     INT_MS_P5_OFST
-#define IRQ_EXT                      INT_MS_IP_OFST
-#define IRQ_UART                     INT_MS_UA_OFST
-#define IRQ_TIMER0                   INT_MS_T0_OFST
-#define IRQ_TIMER1                   INT_MS_T1_OFST
-#define IRQ_PLL                      INT_MS_PLL_OFST
-#define IRQ_EBI                      INT_MS_EBI_OFST
-#define IRQ_STRIPE_BRIDGE            INT_MS_PLL_OFST
-#define IRQ_AHB_BRIDGE               INT_MS_PLL_OFST
-#define IRQ_COMMRX                   INT_MS_CR_OFST
-#define IRQ_COMMTX                   INT_MS_CT_OFST
-#define IRQ_FAST_COMM                INT_MS_FC_OFST
-
-#define NR_IRQS                         (INT_MS_FC_OFST + 1)
-
diff --git a/include/asm-arm/arch-epxa10db/mode_ctrl00.h b/include/asm-arm/arch-epxa10db/mode_ctrl00.h
deleted file mode 100644 (file)
index d8a7efa..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#ifndef __MODE_CTRL00_H
-#define __MODE_CTRL00_H
-
-/*
- * Register definitions for the reset and mode control
- */
-
-/*
- *  Copyright (C) 2001 Altera Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-
-
-#define BOOT_CR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  ))
-#define BOOT_CR_BF_MSK (0x1)
-#define BOOT_CR_BF_OFST (0)
-#define BOOT_CR_HM_MSK (0x2)
-#define BOOT_CR_HM_OFST (1)
-#define BOOT_CR_RE_MSK (0x4)
-#define BOOT_CR_RE_OFST (2)
-
-#define RESET_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  + 0x4 ))
-#define RESET_SR_WR_MSK (0x1)
-#define RESET_SR_WR_OFST (0)
-#define RESET_SR_CR_MSK (0x2)
-#define RESET_SR_CR_OFST (1)
-#define RESET_SR_JT_MSK (0x4)
-#define RESET_SR_JT_OFST (2)
-#define RESET_SR_ER_MSK (0x8)
-#define RESET_SR_ER_OFST (3)
-
-#define ID_CODE(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  + 0x08 ))
-
-#define SRAM0_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  + 0x20 ))
-#define SRAM0_SR_SIZE_MSK (0xFFFFF000)
-#define SRAM0_SR_SIZE_OFST (12)
-
-#define SRAM1_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  + 0x24 ))
-#define SRAM1_SR_SIZE_MSK (0xFFFFF000)
-#define SRAM1_SR_SIZE_OFST (12)
-
-#define DPSRAM0_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  + 0x30 ))
-
-#define DPSRAM0_SR_MODE_MSK (0xF)
-#define DPSRAM0_SR_MODE_OFST (0)
-#define DPSRAM0_SR_GLBL_MSK (0x30)
-#define DPSRAM0_SR_SIZE_MSK (0xFFFFF000)
-#define DPSRAM0_SR_SIZE_OFST (12)
-
-#define DPSRAM0_LCR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  + 0x34 ))
-#define DPSRAM0_LCR_LCKADDR_MSK (0x1FFE0)
-#define DPSRAM0_LCR_LCKADDR_OFST (4)
-
-#define DPSRAM1_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  + 0x38 ))
-#define DPSRAM1_SR_MODE_MSK (0xF)
-#define DPSRAM1_SR_MODE_OFST (0)
-#define DPSRAM1_SR_GLBL_MSK (0x30)
-#define DPSRAM1_SR_GLBL_OFST (4)
-#define DPSRAM1_SR_SIZE_MSK (0xFFFFF000)
-#define DPSRAM1_SR_SIZE_OFST (12)
-
-#define DPSRAM1_LCR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR  + 0x3C ))
-#define DPSRAM1_LCR_LCKADDR_MSK (0x1FFE0)
-#define DPSRAM1_LCR_LCKADDR_OFST (4)
-
-#endif /* __MODE_CTRL00_H */
diff --git a/include/asm-arm/arch-epxa10db/platform.h b/include/asm-arm/arch-epxa10db/platform.h
deleted file mode 100644 (file)
index 129bb0f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef PLATFORM_H
-#define PLATFORM_H
-#include "excalibur.h"
-
-#define MAXIRQNUM 15 
-#endif
-
diff --git a/include/asm-arm/arch-epxa10db/pld_conf00.h b/include/asm-arm/arch-epxa10db/pld_conf00.h
deleted file mode 100644 (file)
index 7af2c38..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#ifndef __PLD_CONF00_H
-#define __PLD_CONF00_H
-
-/*
- * Register definitions for the PLD Configuration Logic
- */
-
-/*
- *  
- *  This file contains the register definitions for the Excalibur
- *  Interrupt controller INT_CTRL00.
- *
- *  Copyright (C) 2001 Altera Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#define CONFIG_CONTROL(BASE_ADDR) (PLD_CONF00_TYPE (BASE_ADDR))  
-#define CONFIG_CONTROL_LK_MSK (0x1)
-#define CONFIG_CONTROL_LK_OFST (0)
-#define CONFIG_CONTROL_CO_MSK (0x2)
-#define CONFIG_CONTROL_CO_OFST (1)
-#define CONFIG_CONTROL_B_MSK  (0x4)
-#define CONFIG_CONTROL_B_OFST (2)
-#define CONFIG_CONTROL_PC_MSK (0x8)
-#define CONFIG_CONTROL_PC_OFST (3)
-#define CONFIG_CONTROL_E_MSK (0x10)
-#define CONFIG_CONTROL_E_OFST (4)
-#define CONFIG_CONTROL_ES_MSK (0xE0)
-#define CONFIG_CONTROL_ES_OFST (5)
-#define CONFIG_CONTROL_ES_0_MSK (0x20)
-#define CONFIG_CONTROL_ES_1_MSK (0x40)
-#define CONFIG_CONTROL_ES_2_MSK (0x80)
-
-#define CONFIG_CONTROL_CLOCK(BASE_ADDR) (PLD_CONF00_TYPE (BASE_ADDR  + 0x4 ))
-#define CONFIG_CONTROL_CLOCK_RATIO_MSK (0xFFFF)
-#define CONFIG_CONTROL_CLOCK_RATIO_OFST (0)
-
-#define CONFIG_CONTROL_DATA(BASE_ADDR) (PLD_CONF00_TYPE (BASE_ADDR  + 0x8 ))
-#define CONFIG_CONTROL_DATA_MSK (0xFFFFFFFF)
-#define CONFIG_CONTROL_DATA_OFST (0)
-
-#define CONFIG_UNLOCK(BASE_ADDR) (PLD_CONF00_TYPE (BASE_ADDR  + 0xC )) 
-#define CONFIG_UNLOCK_MSK (0xFFFFFFFF)
-#define CONFIG_UNLOCK_OFST (0)
-
-#define CONFIG_UNLOCK_MAGIC (0x554E4C4B)
-
-#endif /* __PLD_CONF00_H */
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/include/asm-arm/arch-epxa10db/tdkphy.h b/include/asm-arm/arch-epxa10db/tdkphy.h
deleted file mode 100644 (file)
index 5e107bd..0000000
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
- *  linux/drivers/tdkphy.h
- *
- *  Copyright (C) 2001 Altera Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef __TDKPHY_H
-#define __TDKPHY_H
-
-/*
- * Register definitions for the TDK 78Q2120 PHY 
- * which is on the Camelot board
- */
-
-/*
- * Copyright (c) Altera Corporation 2000.
- * All rights reserved.
- */
-#define PHY_CONTROL                                                                                     (0)
-#define PHY_CONTROL_COLT_MSK                                                            (0x80)
-#define PHY_CONTROL_COLT_OFST                                                           (7)
-#define PHY_CONTROL_DUPLEX_MSK                                                          (0x100)
-#define PHY_CONTROL_DUPLEX_OFST                                                         (8)
-#define PHY_CONTROL_RANEG_MSK                                                           (0x200)
-#define PHY_CONTROL_RANEG_OFST                                                          (9)
-#define PHY_CONTROL_ISO_MSK                                                                     (0x400)
-#define PHY_CONTROL_ISO_OFST                                                            (10)
-#define PHY_CONTROL_PWRDN_MSK                                                           (0x800)
-#define PHY_CONTROL_PWRDN_OFST                                                          (11)
-#define PHY_CONTROL_ANEGEN_MSK                                                          (0x1000)
-#define PHY_CONTROL_ANEGEN_OFST                                                         (12)
-#define PHY_CONTROL_SPEEDSL_MSK                                                         (0x2000)
-#define PHY_CONTROL_SPEEDSL_OFST                                                        (13)
-#define PHY_CONTROL_LOOPBK_MSK                                                          (0x4000)
-#define PHY_CONTROL_LOOPBK_OFST                                                         (14)
-#define PHY_CONTROL_RESET_MSK                                                           (0x8000)
-#define PHY_CONTROL_RESET_OFST                                                          (15)
-
-#define PHY_STATUS                                                                                      (1)
-#define PHY_STATUS_ETXD_MSK                                                                     (0x1)
-#define PHY_STATUS_EXTD_OFST                                                            (0)
-#define PHY_STATUS_JAB_MSK                                                                      (0x2)
-#define PHY_STATUS_JAB_OFST                                                                     (1)
-#define PHY_STATUS_LINK_MSK                                                                     (0x4)
-#define PHY_STATUS_LINK_OFST                                                            (2)
-#define PHY_STATUS_ANEGA_MSK                                                            (0x8)
-#define PHY_STATUS_ANEGA_OFST                                                           (3)
-#define PHY_STATUS_RFAULT_MSK                                                           (0x10)
-#define PHY_STATUS_RFAULT_OFST                                                          (4)
-#define PHY_STATUS_ANEGC_MSK                                                            (0x20)
-#define PHY_STATUS_ANEGC_OFST                                                           (5)
-#define PHY_STATUS_10T_H_MSK                                                            (0x800)
-#define PHY_STATUS_10T_H_OFST                                                           (11)
-#define PHY_STATUS_10T_F_MSK                                                            (0x1000)
-#define PHY_STATUS_10T_F_OFST                                                           (12)
-#define PHY_STATUS_100_X_H_MSK                                                          (0x2000)
-#define PHY_STATUS_100_X_H_OFST                                                         (13)
-#define PHY_STATUS_100_X_F_MSK                                                          (0x4000)
-#define PHY_STATUS_100_X_F_OFST                                                         (14)
-#define PHY_STATUS_100T4_MSK                                                            (0x8000)
-#define PHY_STATUS_100T4_OFST                                                           (15)
-
-#define PHY_ID1                                                                                         (2)
-#define PHY_ID1_OUI_MSK                                                                         (0xFFFF)
-#define PHY_ID1_OUI_OFST                                                                        (0)
-
-#define PHY_ID2                                                                                         (3)
-#define PHY_ID2_RN_MSK                                                                          (0xF)
-#define PHY_ID2_RN_OFST                                                                         (0)
-#define PHY_ID2_MN_MSK                                                                          (0x3F0)
-#define PHY_ID2_MN_OFST                                                                         (4)
-#define PHY_ID2_OUI_MSK                                                                         (0xFC00)
-#define PHY_ID2_OUI_OFST                                                                        (10)
-
-#define PHY_AUTO_NEG_ADVERTISEMENT                                                      (4)
-#define PHY_AUTO_NEG_ADVERTISEMENT_SELECTOR_MSK                         (0x1F)
-#define PHY_AUTO_NEG_ADVERTISEMENT_SELECTOR_OFST                        (0)
-#define PHY_AUTO_NEG_ADVERTISEMENT_A0_MSK                                       (0x20)
-#define PHY_AUTO_NEG_ADVERTISEMENT_A0_OFST                                      (5)
-#define PHY_AUTO_NEG_ADVERTISEMENT_A1_MSK                                       (0x40)
-#define PHY_AUTO_NEG_ADVERTISEMENT_A1_OFST                                      (6)
-#define PHY_AUTO_NEG_ADVERTISEMENT_A2_MSK                                       (0x80)
-#define PHY_AUTO_NEG_ADVERTISEMENT_A2_OFST                                      (7)
-#define PHY_AUTO_NEG_ADVERTISEMENT_A3_MSK                                       (0x100)
-#define PHY_AUTO_NEG_ADVERTISEMENT_A3_OFST                                      (8)
-#define PHY_AUTO_NEG_ADVERTISEMENT_A4_MSK                                       (0x200)
-#define PHY_AUTO_NEG_ADVERTISEMENT_A4_OFST                                      (9)
-#define PHY_AUTO_NEG_ADVERTISEMENT_TAF_MSK                                      (0x1FE0)
-#define PHY_AUTO_NEG_ADVERTISEMENT_TAF_OFST                                     (5)
-#define PHY_AUTO_NEG_ADVERTISEMENT_RF_MSK                                       (0x2000)
-#define PHY_AUTO_NEG_ADVERTISEMENT_RF_OFST                                      (13)
-#define PHY_AUTO_NEG_ADVERTISEMENT_RSVD_MSK                                     (0x4000)
-#define PHY_AUTO_NEG_ADVERTISEMENT_RVSD_OFST                            (14)
-#define PHY_AUTO_NEG_ADVERTISEMENT_NP_MSK                                       (0x8000)
-#define PHY_AUTO_NEG_ADVERTISEMENT_NP_OFST                                      (15)
-
-#define PHY_AUTO_NEG_LINK_PARTNER                                                       (5)
-#define PHY_AUTO_NEG_LINK_PARTNER_S4_MSK                                        (0x1F)
-#define PHY_AUTO_NEG_LINK_PARTNER_S4_OFST                                       (0)
-#define PHY_AUTO_NEG_LINK_PARTNER_A7_MSK                                        (0x1FE0)
-#define PHY_AUTO_NEG_LINK_PARTNER_A7_OFST                                       (5)
-#define PHY_AUTO_NEG_LINK_PARTNER_RF_MSK                                        (0x2000)
-#define PHY_AUTO_NEG_LINK_PARTNER_RF_OFST                                       (13)
-#define PHY_AUTO_NEG_LINK_PARTNER_ACK_MSK                                       (0x4000)
-#define PHY_AUTO_NEG_LINK_PARTNER_ACK_OFST                                      (14)
-#define PHY_AUTO_NEG_LINK_PARTNER_NP_MSK                                        (0x8000)
-#define PHY_AUTO_NEG_LINK_PARTNER_NP_OFST                                       (15)
-
-#define PHY_AUTO_NEG_EXPANSION                                                          (6)
-#define PHY_AUTO_NEG_EXPANSION_LPANEGA_MSK                                      (0x1)
-#define PHY_AUTO_NEG_EXPANSION_LPANEGA_OFST                                     (0)
-#define PHY_AUTO_NEG_EXPANSION_PRX_MSK                                          (0x2)
-#define PHY_AUTO_NEG_EXPANSION_PRX_OFST                                         (1)
-#define PHY_AUTO_NEG_EXPANSION_NPA_MSK                                          (0x4)
-#define PHY_AUTO_NEG_EXPANSION_NPA_OFST                                         (2)
-#define PHY_AUTO_NEG_EXPANSION_LPNPA_MSK                                        (0x8)
-#define PHY_AUTO_NEG_EXPANSION_LPNPA_OFST                                       (3)
-#define PHY_AUTO_NEG_EXPANSION_PDF_MSK                                          (0x10)
-#define PHY_AUTO_NEG_EXPANSION_PDF_OFST                                         (4)
-
-#define PHY_VENDOR_SPECIFIC                                                                     (16)
-#define PHY_VENDOR_SPECIFIC_RXCC_MSK                                            (0x1)
-#define PHY_VENDOR_SPECIFIC_RXCC_OFST                                           (0)
-#define PHY_VENDOR_SPECIFIC_PCSBP_MSK                                           (0x2)
-#define PHY_VENDOR_SPECIFIC_PCSBP_OFST                                          (1)
-#define PHY_VENDOR_SPECIFIC_RVSPOL_MSK                                          (0x10)
-#define PHY_VENDOR_SPECIFIC_RVSPOL_OFST                                         (4)
-#define PHY_VENDOR_SPECIFIC_APOL_MSK                                            (0x20)  
-#define PHY_VENDOR_SPECIFIC_APOL_OFST                                           (5)
-#define PHY_VENDOR_SPECIFIC_GPIO0_DIR_MSK                                       (0x40)
-#define PHY_VENDOR_SPECIFIC_GPIO0_DIR_OFST                                      (6)
-#define PHY_VENDOR_SPECIFIC_GPIO0_DAT_MSK                                       (0x80)
-#define PHY_VENDOR_SPECIFIC_GPIO0_DAT_OFST                                      (7)
-#define PHY_VENDOR_SPECIFIC_GPIO1_DIR_MSK                                       (0x100)
-#define PHY_VENDOR_SPECIFIC_GPIO1_DIR_OFST                                      (8)
-#define PHY_VENDOR_SPECIFIC_GPIO1_DAT_MSK                                       (0x200)
-#define PHY_VENDOR_SPECIFIC_GPIO1_DAT_OFST                                      (9)
-#define PHY_VENDOR_SPECIFIC_10BT_NATURAL_LOOPBACK_DAT_MSK       (0x400)
-#define PHY_VENDOR_SPECIFIC_10BT_NATURAL_LOOPBACK_DAT_OFST      (10)
-#define PHY_VENDOR_SPECIFIC_10BT_SQE_TEST_INHIBIT_MSK           (0x800)
-#define PHY_VENDOR_SPECIFIC_10BT_SQE_TEST_INHIBIT_OFST          (11)
-#define PHY_VENDOR_SPECIFIC_TXHIM_MSK                                           (0x1000)
-#define PHY_VENDOR_SPECIFIC_TXHIM_OFST                                          (12)
-#define PHY_VENDOR_SPECIFIC_INT_LEVEL_MSK                                       (0x4000)
-#define PHY_VENDOR_SPECIFIC_INT_LEVEL_OFST                                      (14)
-#define PHY_VENDOR_SPECIFIC_RPTR_MSK                                            (0x8000)
-#define PHY_VENDOR_SPECIFIC_RPTR_OFST                                           (15)
-
-#define PHY_IRQ_CONTROL                                                                         (17)
-#define PHY_IRQ_CONTROL_ANEG_COMP_INT_MSK                                       (0x1)
-#define PHY_IRQ_CONTROL_ANEG_COMP_INT_OFST                                      (0)
-#define PHY_IRQ_CONTROL_RFAULT_INT_MSK                                          (0x2)
-#define PHY_IRQ_CONTROL_RFAULT_INT_OFST                                         (1)
-#define PHY_IRQ_CONTROL_LS_CHG_INT_MSK                                          (0x4)
-#define PHY_IRQ_CONTROL_LS_CHG_INT_OFST                                         (2)
-#define PHY_IRQ_CONTROL_LP_ACK_INT_MSK                                          (0x8)
-#define PHY_IRQ_CONTROL_LP_ACK_INT_OFST                                         (3)
-#define PHY_IRQ_CONTROL_PDF_INT_MSK                                                     (0x10)
-#define PHY_IRQ_CONTROL_PDF_INT_OFST                                            (4)
-#define PHY_IRQ_CONTROL_PRX_INT_MSK                                                     (0x20)
-#define PHY_IRQ_CONTROL_PRX_INT_OFST                                            (5)
-#define PHY_IRQ_CONTROL_RXER_INT_MSK                                            (0x40)
-#define PHY_IRQ_CONTROL_RXER_INT_OFST                                           (6)
-#define PHY_IRQ_CONTROL_JABBER_INT_MSK                                          (0x80)
-#define PHY_IRQ_CONTROL_JABBER_INT_OFST                                         (7)
-#define PHY_IRQ_CONTROL_ANEG_COMP_IE_MSK                                        (0x100)
-#define PHY_IRQ_CONTROL_ANEG_COMP_IE_OFST                                       (8)
-#define PHY_IRQ_CONTROL_RFAULT_IE_MSK                                           (0x200)
-#define PHY_IRQ_CONTROL_RFAULT_IE_OFST                                          (9)
-#define PHY_IRQ_CONTROL_LS_CHG_IE_MSK                                           (0x400)
-#define PHY_IRQ_CONTROL_LS_CHG_IE_OFST                                          (10)
-#define PHY_IRQ_CONTROL_LP_ACK_IE_MSK                                           (0x800)
-#define PHY_IRQ_CONTROL_LP_ACK_IE_OFST                                          (11)
-#define PHY_IRQ_CONTROL_PDF_IE_MSK                                                      (0x1000)
-#define PHY_IRQ_CONTROL_PDF_IE_OFST                                                     (12)
-#define PHY_IRQ_CONTROL_PRX_IE_MSK                                                      (0x2000)
-#define PHY_IRQ_CONTROL_PRX_IE_OFST                                                     (13)
-#define PHY_IRQ_CONTROL_RXER_IE_MSK                                                     (0x4000)
-#define PHY_IRQ_CONTROL_RXER_IE_OFST                                            (14)
-#define PHY_IRQ_CONTROL_JABBER_IE_MSK                                           (0x8000)
-#define PHY_IRQ_CONTROL_JABBER_IE_OFST                                          (15)
-
-#define PHY_DIAGNOSTIC                                                                          (18)
-#define PHY_DIAGNOSTIC_RX_LOCK_MSK                                                      (0x100)
-#define PHY_DIAGNOSTIC_RX_LOCK_OFST                                                     (8)
-#define PHY_DIAGNOSTIC_RX_PASS_MSK                                                      (0x200)
-#define PHY_DIAGNOSTIC_RX_PASS_OFST                                                     (9)
-#define PHY_DIAGNOSTIC_RATE_MSK                                                         (0x400)
-#define PHY_DIAGNOSTIC_RATE_OFST                                                        (10)
-#define PHY_DIAGNOSTIC_DPLX_MSK                                                         (0x800)
-#define PHY_DIAGNOSTIC_DPLX_OFST                                                        (11)
-#define PHY_DIAGNOSTIC_ANEGF_MSK                                                        (0x1000)
-#define PHY_DIAGNOSTIC_ANEGF_OFST                                                       (12)
-
-#endif /* __TDKPHY_H */
diff --git a/include/asm-arm/arch-epxa10db/timer00.h b/include/asm-arm/arch-epxa10db/timer00.h
deleted file mode 100644 (file)
index 52a3fb5..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- *  
- *  This file contains the register definitions for the Excalibur
- *  Timer TIMER00.
- *
- *  Copyright (C) 2001 Altera Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __TIMER00_H
-#define __TIMER00_H
-
-/*
- * Register definitions for the timers
- */
-
-
-#define TIMER0_CR(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR  + 0x00 ))
-#define TIMER0_CR_B_MSK (0x20)
-#define TIMER0_CR_B_OFST (0x5)
-#define TIMER0_CR_S_MSK  (0x10)
-#define TIMER0_CR_S_OFST (0x4)
-#define TIMER0_CR_CI_MSK (0x08)
-#define TIMER0_CR_CI_OFST (0x3)
-#define TIMER0_CR_IE_MSK (0x04)
-#define TIMER0_CR_IE_OFST (0x2)
-#define TIMER0_CR_MODE_MSK (0x3)
-#define TIMER0_CR_MODE_OFST (0)
-#define TIMER0_CR_MODE_FREE (0)
-#define TIMER0_CR_MODE_ONE  (1)
-#define TIMER0_CR_MODE_INTVL (2)
-
-#define TIMER0_SR(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR  + 0x00 ))
-#define TIMER0_SR_B_MSK (0x20)
-#define TIMER0_SR_B_OFST (0x5)
-#define TIMER0_SR_S_MSK  (0x10)
-#define TIMER0_SR_S_OFST (0x4)
-#define TIMER0_SR_CI_MSK (0x08)
-#define TIMER0_SR_CI_OFST (0x3)
-#define TIMER0_SR_IE_MSK (0x04)
-#define TIMER0_SR_IE_OFST (0x2)
-#define TIMER0_SR_MODE_MSK (0x3)
-#define TIMER0_SR_MODE_OFST (0)
-#define TIMER0_SR_MODE_FREE (0)
-#define TIMER0_SR_MODE_ONE  (1)
-#define TIMER0_SR_MODE_INTVL (2)
-
-#define TIMER0_PRESCALE(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR  + 0x010 ))
-#define TIMER0_LIMIT(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR  + 0x020 ))
-#define TIMER0_READ(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR  + 0x030 ))
-
-#define TIMER1_CR(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR  + 0x40 ))
-#define TIMER1_CR_B_MSK (0x20)
-#define TIMER1_CR_B_OFST (0x5)
-#define TIMER1_CR_S_MSK  (0x10)
-#define TIMER1_CR_S_OFST (0x4)
-#define TIMER1_CR_CI_MSK (0x08)
-#define TIMER1_CR_CI_OFST (0x3)
-#define TIMER1_CR_IE_MSK (0x04)
-#define TIMER1_CR_IE_OFST (0x2)
-#define TIMER1_CR_MODE_MSK (0x3)
-#define TIMER1_CR_MODE_OFST (0)
-#define TIMER1_CR_MODE_FREE (0)
-#define TIMER1_CR_MODE_ONE  (1)
-#define TIMER1_CR_MODE_INTVL (2)
-
-#define TIMER1_SR(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR  + 0x40 ))
-#define TIMER1_SR_B_MSK (0x20)
-#define TIMER1_SR_B_OFST (0x5)
-#define TIMER1_SR_S_MSK  (0x10)
-#define TIMER1_SR_S_OFST (0x4)
-#define TIMER1_SR_CI_MSK (0x08)
-#define TIMER1_SR_CI_OFST (0x3)
-#define TIMER1_SR_IE_MSK (0x04)
-#define TIMER1_SR_IE_OFST (0x2)
-#define TIMER1_SR_MODE_MSK (0x3)
-#define TIMER1_SR_MODE_OFST (0)
-#define TIMER1_SR_MODE_FREE (0)
-#define TIMER1_SR_MODE_ONE  (1)
-#define TIMER1_SR_MODE_INTVL (2)
-
-#define TIMER1_PRESCALE(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR  + 0x050 ))
-#define TIMER1_LIMIT(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR  + 0x060 ))
-#define TIMER1_READ(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR  + 0x070 ))
-
-#endif /* __TIMER00_H */
diff --git a/include/asm-arm/arch-epxa10db/uart00.h b/include/asm-arm/arch-epxa10db/uart00.h
deleted file mode 100644 (file)
index 5abd891..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-/* *
- *  Copyright (C) 2001 Altera Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef __UART00_H
-#define __UART00_H
-
-/*
- * Register definitions for the UART
- */
-
-#define UART_TX_FIFO_SIZE      (15)
-
-#define UART_RSR(BASE_ADDR) (UART00_TYPE (BASE_ADDR  + 0x00 ))
-#define UART_RSR_RX_LEVEL_MSK (0x1f)
-#define UART_RSR_RX_LEVEL_OFST (0)
-#define UART_RSR_RE_MSK (0x80)
-#define UART_RSR_RE_OFST (7)
-
-#define UART_RDS(BASE_ADDR) (UART00_TYPE (BASE_ADDR  + 0x04 ))
-#define UART_RDS_BI_MSK (0x8)
-#define UART_RDS_BI_OFST (4)
-#define UART_RDS_FE_MSK (0x4)
-#define UART_RDS_FE_OFST (2)
-#define UART_RDS_PE_MSK (0x2)
-#define UART_RDS_PE_OFST (1)
-#define UART_RDS_OE_MSK (0x1)
-#define UART_RDS_OE_OFST (0)
-
-#define UART_RD(BASE_ADDR) (UART00_TYPE (BASE_ADDR  + 0x08 ))
-#define UART_RD_RX_DATA_MSK (0xff)
-#define UART_RD_RX_DATA_OFST (0)
-
-#define UART_TSR(BASE_ADDR) (UART00_TYPE (BASE_ADDR  + 0x0c ))
-#define UART_TSR_TX_LEVEL_MSK (0x1f)
-#define UART_TSR_TX_LEVEL_OFST (0)
-#define UART_TSR_TXI_MSK (0x80)
-#define UART_TSR_TXI_OFST (7)
-
-#define UART_TD(BASE_ADDR) (UART00_TYPE (BASE_ADDR  + 0x10 ))
-#define UART_TD_TX_DATA_MSK (0xff)
-#define UART_TD_TX_DATA_OFST (0)
-
-#define UART_FCR(BASE_ADDR) (UART00_TYPE (BASE_ADDR  + 0x14 ))
-#define UART_FCR_RX_THR_MSK (0xd0)
-#define UART_FCR_RX_THR_OFST (5)
-#define UART_FCR_RX_THR_1 (0x00)
-#define UART_FCR_RX_THR_2 (0x20)
-#define UART_FCR_RX_THR_4 (0x40)
-#define UART_FCR_RX_THR_6 (0x60)
-#define UART_FCR_RX_THR_8 (0x80)
-#define UART_FCR_RX_THR_10 (0xa0)
-#define UART_FCR_RX_THR_12 (0xc0)
-#define UART_FCR_RX_THR_14 (0xd0)
-#define UART_FCR_TX_THR_MSK (0x1c)
-#define UART_FCR_TX_THR_OFST (2)
-#define UART_FCR_TX_THR_0 (0x00)
-#define UART_FCR_TX_THR_2 (0x04)
-#define UART_FCR_TX_THR_4 (0x08)
-#define UART_FCR_TX_THR_8 (0x0c)
-#define UART_FCR_TX_THR_10 (0x10)
-#define UART_FCR_TX_THR_12 (0x14)
-#define UART_FCR_TX_THR_14 (0x18)
-#define UART_FCR_TX_THR_15 (0x1c)
-#define UART_FCR_RC_MSK (0x02)
-#define UART_FCR_RC_OFST (1)
-#define UART_FCR_TC_MSK (0x01)
-#define UART_FCR_TC_OFST (0)
-
-#define UART_IES(BASE_ADDR) (UART00_TYPE (BASE_ADDR  + 0x18 ))
-#define UART_IES_ME_MSK (0x8)
-#define UART_IES_ME_OFST (3)
-#define UART_IES_TIE_MSK (0x4)
-#define UART_IES_TIE_OFST (2)
-#define UART_IES_TE_MSK (0x2)
-#define UART_IES_TE_OFST (1)
-#define UART_IES_RE_MSK (0x1)
-#define UART_IES_RE_OFST (0)
-
-#define UART_IEC(BASE_ADDR) (UART00_TYPE (BASE_ADDR  + 0x1c ))
-#define UART_IEC_ME_MSK (0x8)
-#define UART_IEC_ME_OFST (3)
-#define UART_IEC_TIE_MSK (0x4)
-#define UART_IEC_TIE_OFST (2)
-#define UART_IEC_TE_MSK (0x2)
-#define UART_IEC_TE_OFST (1)
-#define UART_IEC_RE_MSK (0x1)
-#define UART_IEC_RE_OFST (0)
-
-#define UART_ISR(BASE_ADDR) (UART00_TYPE (BASE_ADDR  + 0x20 ))
-#define UART_ISR_MI_MSK (0x8)
-#define UART_ISR_MI_OFST (3)
-#define UART_ISR_TII_MSK (0x4)
-#define UART_ISR_TII_OFST (2)
-#define UART_ISR_TI_MSK (0x2)
-#define UART_ISR_TI_OFST (1)
-#define UART_ISR_RI_MSK (0x1)
-#define UART_ISR_RI_OFST (0)
-
-#define UART_IID(BASE_ADDR) (UART00_TYPE (BASE_ADDR  + 0x24 ))
-#define UART_IID_IID_MSK (0x7)
-#define UART_IID_IID_OFST (0)
-
-#define UART_MC(BASE_ADDR) (UART00_TYPE (BASE_ADDR  + 0x28 ))
-#define UART_MC_OE_MSK (0x40)
-#define UART_MC_OE_OFST (6)
-#define UART_MC_SP_MSK (0x20)
-#define UART_MC_SP_OFST (5)
-#define UART_MC_EP_MSK (0x10)
-#define UART_MC_EP_OFST (4)
-#define UART_MC_PE_MSK (0x08)
-#define UART_MC_PE_OFST (3)
-#define UART_MC_ST_MSK (0x04)
-#define UART_MC_ST_ONE (0x0)
-#define UART_MC_ST_TWO (0x04)
-#define UART_MC_ST_OFST (2)
-#define UART_MC_CLS_MSK (0x03)
-#define UART_MC_CLS_OFST (0)
-#define UART_MC_CLS_CHARLEN_5 (0)
-#define UART_MC_CLS_CHARLEN_6 (1)
-#define UART_MC_CLS_CHARLEN_7 (2)
-#define UART_MC_CLS_CHARLEN_8 (3)
-
-#define UART_MCR(BASE_ADDR) (UART00_TYPE (BASE_ADDR  + 0x2c ))
-#define UART_MCR_AC_MSK (0x80)
-#define UART_MCR_AC_OFST (7)
-#define UART_MCR_AR_MSK (0x40)
-#define UART_MCR_AR_OFST (6)
-#define UART_MCR_BR_MSK (0x20)
-#define UART_MCR_BR_OFST (5)
-#define UART_MCR_LB_MSK (0x10)
-#define UART_MCR_LB_OFST (4)
-#define UART_MCR_DCD_MSK (0x08)
-#define UART_MCR_DCD_OFST (3)
-#define UART_MCR_RI_MSK (0x04)
-#define UART_MCR_RI_OFST (2)
-#define UART_MCR_DTR_MSK (0x02)
-#define UART_MCR_DTR_OFST (1)
-#define UART_MCR_RTS_MSK (0x01)
-#define UART_MCR_RTS_OFST (0)
-
-#define UART_MSR(BASE_ADDR) (UART00_TYPE (BASE_ADDR  + 0x30 ))
-#define UART_MSR_DCD_MSK (0x80)
-#define UART_MSR_DCD_OFST (7)
-#define UART_MSR_RI_MSK (0x40)
-#define UART_MSR_RI_OFST (6)
-#define UART_MSR_DSR_MSK (0x20)
-#define UART_MSR_DSR_OFST (5)
-#define UART_MSR_CTS_MSK (0x10)
-#define UART_MSR_CTS_OFST (4)
-#define UART_MSR_DDCD_MSK (0x08)
-#define UART_MSR_DDCD_OFST (3)
-#define UART_MSR_TERI_MSK (0x04)
-#define UART_MSR_TERI_OFST (2)
-#define UART_MSR_DDSR_MSK (0x02)
-#define UART_MSR_DDSR_OFST (1)
-#define UART_MSR_DCTS_MSK (0x01)
-#define UART_MSR_DCTS_OFST (0)
-
-#define UART_DIV_LO(BASE_ADDR) (UART00_TYPE (BASE_ADDR  + 0x34 ))
-#define UART_DIV_LO_DIV_MSK (0xff)
-#define UART_DIV_LO_DIV_OFST (0)
-
-#define UART_DIV_HI(BASE_ADDR) (UART00_TYPE (BASE_ADDR  + 0x38 ))
-#define UART_DIV_HI_DIV_MSK (0xff)
-#define UART_DIV_HI_DIV_OFST (0)
-
-#endif /* __UART00_H */
diff --git a/include/asm-arm/arch-epxa10db/uncompress.h b/include/asm-arm/arch-epxa10db/uncompress.h
deleted file mode 100644 (file)
index fdfe0e6..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *  linux/include/asm-arm/arch-epxa10db/uncompress.h
- *
- *  Copyright (C) 1999 ARM Limited
- *  Copyright (C) 2001 Altera Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#include "asm/arch/platform.h"
-#include "asm/hardware.h"
-#define UART00_TYPE (volatile unsigned int*)
-#include "asm/arch/uart00.h"
-
-/*
- * This does not append a newline
- */
-static void putstr(const char *s)
-{
-       while (*s) {
-               while ((*UART_TSR(EXC_UART00_BASE) &
-                      UART_TSR_TX_LEVEL_MSK)==15)
-                       barrier();
-
-               *UART_TD(EXC_UART00_BASE) = *s;
-
-               if (*s == '\n') {
-                       while ((*UART_TSR(EXC_UART00_BASE) &
-                              UART_TSR_TX_LEVEL_MSK)==15)
-                               barrier();
-
-                       *UART_TD(EXC_UART00_BASE) = '\r';
-               }
-               s++;
-       }
-}
-
-/*
- * nothing to do
- */
-#define arch_decomp_setup()
-
-#define arch_decomp_wdog()
index 0cf4d4f99600d6d5c5e9163c69f1100c5d39af76..fd0147e52dbb50dbb47a9e6a5eda9e544e5c8cd6 100644 (file)
@@ -56,7 +56,12 @@ extern void __raw_readsl(const void __iomem *addr, void *data, int longlen);
 
 /*
  * Architecture ioremap implementation.
+ *
+ * __ioremap takes CPU physical address.
+ *
+ * __ioremap_pfn takes a Page Frame Number and an offset into that page
  */
+extern void __iomem * __ioremap_pfn(unsigned long, unsigned long, size_t, unsigned long);
 extern void __iomem * __ioremap(unsigned long, size_t, unsigned long);
 extern void __iounmap(void __iomem *addr);
 
@@ -261,6 +266,7 @@ out:
  *
  * ioremap takes a PCI memory address, as specified in
  * Documentation/IO-mapping.txt.
+ *
  */
 #ifndef __arch_ioremap
 #define ioremap(cookie,size)           __ioremap(cookie,size,0)
index b338936bde4f4f83d9948323d155fc91d9ade1bf..3351b77fab36e93bc86ef94c74a45a7b6b4295a4 100644 (file)
@@ -27,9 +27,6 @@ struct meminfo;
 #define MT_ROM                 6
 #define MT_IXP2000_DEVICE      7
 
-#define        __phys_to_pfn(paddr)    ((paddr) >> PAGE_SHIFT)
-#define        __pfn_to_phys(pfn)      ((pfn) << PAGE_SHIFT)
-
 extern void create_memmap_holes(struct meminfo *);
 extern void memtable_init(struct meminfo *);
 extern void iotable_init(struct map_desc *, int);
index 3e572364ee73c665dbc2fd21a34e33d076e6363b..3d7f08bd9030f84e7828c99db876d216032066d6 100644 (file)
 #define __phys_to_virt(x)      ((x) - PHYS_OFFSET + PAGE_OFFSET)
 #endif
 
+/*
+ * Convert a physical address to a Page Frame Number and back
+ */
+#define        __phys_to_pfn(paddr)    ((paddr) >> PAGE_SHIFT)
+#define        __pfn_to_phys(pfn)      ((pfn) << PAGE_SHIFT)
+
 /*
  * The module space lives between the addresses given by TASK_SIZE
  * and PAGE_OFFSET - it must be within 32MB of the kernel text.
index 3c89df6e7768451acf625236790753f2ab7f5139..d88bf8aa8b4776c736ab5500679b71683f973c03 100644 (file)
@@ -3,6 +3,7 @@
  *
  * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
  * Copyright (c) 2002 David S. Miller (davem@redhat.com)
+ * Copyright (c) 2005 Herbert Xu <herbert@gondor.apana.org.au>
  *
  * Portions derived from Cryptoapi, by Alexander Kjeldaas <astor@fast.no>
  * and Nettle, by Niels Möller.
@@ -126,7 +127,11 @@ struct crypto_alg {
        unsigned int cra_blocksize;
        unsigned int cra_ctxsize;
        unsigned int cra_alignmask;
+
+       int cra_priority;
+
        const char cra_name[CRYPTO_MAX_ALG_NAME];
+       const char cra_driver_name[CRYPTO_MAX_ALG_NAME];
 
        union {
                struct cipher_alg cipher;
index aef6042f8f0ba0366daf02883a316b464a7817bc..ccd3e13de1e82eff1730a7cb17f57a4e9e8b4b56 100644 (file)
@@ -27,14 +27,15 @@ struct mmc_command {
 #define MMC_RSP_MASK   (3 << 0)
 #define MMC_RSP_CRC    (1 << 3)                /* expect valid crc */
 #define MMC_RSP_BUSY   (1 << 4)                /* card may send busy */
+#define MMC_RSP_OPCODE (1 << 5)                /* response contains opcode */
 
 /*
  * These are the response types, and correspond to valid bit
  * patterns of the above flags.  One additional valid pattern
  * is all zeros, which means we don't expect a response.
  */
-#define MMC_RSP_R1     (MMC_RSP_SHORT|MMC_RSP_CRC)
-#define MMC_RSP_R1B    (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_BUSY)
+#define MMC_RSP_R1     (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_OPCODE)
+#define MMC_RSP_R1B    (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY)
 #define MMC_RSP_R2     (MMC_RSP_LONG|MMC_RSP_CRC)
 #define MMC_RSP_R3     (MMC_RSP_SHORT)
 #define MMC_RSP_R6     (MMC_RSP_SHORT|MMC_RSP_CRC)
@@ -64,6 +65,7 @@ struct mmc_data {
 #define MMC_DATA_WRITE (1 << 8)
 #define MMC_DATA_READ  (1 << 9)
 #define MMC_DATA_STREAM        (1 << 10)
+#define MMC_DATA_MULTI (1 << 11)
 
        unsigned int            bytes_xfered;
 
index b55eb7c7f0339ce2893334da2ab674e994296d4d..11e9eaf79f5ab37f49f1a895f90156a58db0d6ba 100644 (file)
@@ -63,7 +63,7 @@ struct tc_action_ops
        __u32   type; /* TBD to match kind */
        __u32   capab;  /* capabilities includes 4 bit version */
        struct module           *owner;
-       int     (*act)(struct sk_buff **, struct tc_action *, struct tcf_result *);
+       int     (*act)(struct sk_buff *, struct tc_action *, struct tcf_result *);
        int     (*get_stats)(struct sk_buff *, struct tc_action *);
        int     (*dump)(struct sk_buff *, struct tc_action *,int , int);
        int     (*cleanup)(struct tc_action *, int bind);
index 6492e7363d845355e7d4953e28c465c463b1dae4..b94d1ad92c4d36c2f2cd6ff973db72ceb60a8345 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef __NET_PKT_SCHED_H
 #define __NET_PKT_SCHED_H
 
+#include <linux/jiffies.h>
 #include <net/sch_generic.h>
 
 struct qdisc_walker
@@ -59,8 +60,8 @@ typedef struct timeval        psched_time_t;
 typedef long           psched_tdiff_t;
 
 #define PSCHED_GET_TIME(stamp) do_gettimeofday(&(stamp))
-#define PSCHED_US2JIFFIE(usecs) (((usecs)+(1000000/HZ-1))/(1000000/HZ))
-#define PSCHED_JIFFIE2US(delay) ((delay)*(1000000/HZ))
+#define PSCHED_US2JIFFIE(usecs) usecs_to_jiffies(usecs)
+#define PSCHED_JIFFIE2US(delay) jiffies_to_usecs(delay)
 
 #else /* !CONFIG_NET_SCH_CLK_GETTIMEOFDAY */
 
@@ -123,9 +124,9 @@ do {                                                                        \
                   default: \
                           __delta = 0; \
                   case 2: \
-                          __delta += 1000000; \
+                          __delta += USEC_PER_SEC; \
                   case 1: \
-                          __delta += 1000000; \
+                          __delta += USEC_PER_SEC; \
                   } \
           } \
           __delta; \
@@ -136,9 +137,9 @@ psched_tod_diff(int delta_sec, int bound)
 {
        int delta;
 
-       if (bound <= 1000000 || delta_sec > (0x7FFFFFFF/1000000)-1)
+       if (bound <= USEC_PER_SEC || delta_sec > (0x7FFFFFFF/USEC_PER_SEC)-1)
                return bound;
-       delta = delta_sec * 1000000;
+       delta = delta_sec * USEC_PER_SEC;
        if (delta > bound || delta < 0)
                delta = bound;
        return delta;
@@ -152,9 +153,9 @@ psched_tod_diff(int delta_sec, int bound)
           default: \
                   __delta = psched_tod_diff(__delta_sec, bound);  break; \
           case 2: \
-                  __delta += 1000000; \
+                  __delta += USEC_PER_SEC; \
           case 1: \
-                  __delta += 1000000; \
+                  __delta += USEC_PER_SEC; \
           case 0: \
                   if (__delta > bound || __delta < 0) \
                        __delta = bound; \
@@ -170,15 +171,15 @@ psched_tod_diff(int delta_sec, int bound)
 ({ \
           int __delta = (tv).tv_usec + (delta); \
           (tv_res).tv_sec = (tv).tv_sec; \
-          if (__delta > 1000000) { (tv_res).tv_sec++; __delta -= 1000000; } \
+          if (__delta > USEC_PER_SEC) { (tv_res).tv_sec++; __delta -= USEC_PER_SEC; } \
           (tv_res).tv_usec = __delta; \
 })
 
 #define PSCHED_TADD(tv, delta) \
 ({ \
           (tv).tv_usec += (delta); \
-          if ((tv).tv_usec > 1000000) { (tv).tv_sec++; \
-                (tv).tv_usec -= 1000000; } \
+          if ((tv).tv_usec > USEC_PER_SEC) { (tv).tv_sec++; \
+                (tv).tv_usec -= USEC_PER_SEC; } \
 })
 
 /* Set/check that time is in the "past perfect";
index ccc45d49ce71c6180d91418584be5fc948c6b862..05ee48316f70097f386e9edefe9962a5d66ec51c 100644 (file)
@@ -236,12 +236,8 @@ static void rcu_do_batch(struct rcu_data *rdp)
  * active batch and the batch to be registered has not already occurred.
  * Caller must hold rcu_state.lock.
  */
-static void rcu_start_batch(struct rcu_ctrlblk *rcp, struct rcu_state *rsp,
-                               int next_pending)
+static void rcu_start_batch(struct rcu_ctrlblk *rcp, struct rcu_state *rsp)
 {
-       if (next_pending)
-               rcp->next_pending = 1;
-
        if (rcp->next_pending &&
                        rcp->completed == rcp->cur) {
                rcp->next_pending = 0;
@@ -275,7 +271,7 @@ static void cpu_quiet(int cpu, struct rcu_ctrlblk *rcp, struct rcu_state *rsp)
        if (cpus_empty(rsp->cpumask)) {
                /* batch completed ! */
                rcp->completed = rcp->cur;
-               rcu_start_batch(rcp, rsp, 0);
+               rcu_start_batch(rcp, rsp);
        }
 }
 
@@ -410,7 +406,8 @@ static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp,
                if (!rcp->next_pending) {
                        /* and start it/schedule start if it's a new batch */
                        spin_lock(&rsp->lock);
-                       rcu_start_batch(rcp, rsp, 1);
+                       rcp->next_pending = 1;
+                       rcu_start_batch(rcp, rsp);
                        spin_unlock(&rsp->lock);
                }
        } else {
index 5081287923d52dce220fa21a3fb1b3a0f81a354a..bf66b114d3c235b24457bc588d34a12e60b7ffd5 100644 (file)
@@ -1092,15 +1092,12 @@ int skb_checksum_help(struct sk_buff *skb, int inward)
                        goto out;
        }
 
-       if (offset > (int)skb->len)
-               BUG();
+       BUG_ON(offset > (int)skb->len);
        csum = skb_checksum(skb, offset, skb->len-offset, 0);
 
        offset = skb->tail - skb->h.raw;
-       if (offset <= 0)
-               BUG();
-       if (skb->csum + 2 > offset)
-               BUG();
+       BUG_ON(offset <= 0);
+       BUG_ON(skb->csum + 2 > offset);
 
        *(u16*)(skb->h.raw + skb->csum) = csum_fold(csum);
        skb->ip_summed = CHECKSUM_NONE;
index 070f91cfde598cf20c20b1b291479a832922657b..d0732e9c8560e10d8ec239957fa3b8d4d3c1df00 100644 (file)
@@ -791,8 +791,7 @@ int ___pskb_trim(struct sk_buff *skb, unsigned int len, int realloc)
                int end = offset + skb_shinfo(skb)->frags[i].size;
                if (end > len) {
                        if (skb_cloned(skb)) {
-                               if (!realloc)
-                                       BUG();
+                               BUG_ON(!realloc);
                                if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
                                        return -ENOMEM;
                        }
@@ -894,8 +893,7 @@ unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta)
                struct sk_buff *insp = NULL;
 
                do {
-                       if (!list)
-                               BUG();
+                       BUG_ON(!list);
 
                        if (list->len <= eat) {
                                /* Eaten as whole. */
@@ -1199,8 +1197,7 @@ unsigned int skb_checksum(const struct sk_buff *skb, int offset,
                        start = end;
                }
        }
-       if (len)
-               BUG();
+       BUG_ON(len);
 
        return csum;
 }
@@ -1282,8 +1279,7 @@ unsigned int skb_copy_and_csum_bits(const struct sk_buff *skb, int offset,
                        start = end;
                }
        }
-       if (len)
-               BUG();
+       BUG_ON(len);
        return csum;
 }
 
@@ -1297,8 +1293,7 @@ void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to)
        else
                csstart = skb_headlen(skb);
 
-       if (csstart > skb_headlen(skb))
-               BUG();
+       BUG_ON(csstart > skb_headlen(skb));
 
        memcpy(to, skb->data, csstart);
 
index be5a519cd2f8737c12659dbd2b76ee480a11eb68..105039eb7629359c92884305de6506235da2dc1b 100644 (file)
@@ -899,8 +899,7 @@ static void icmp_address_reply(struct sk_buff *skb)
                u32 _mask, *mp;
 
                mp = skb_header_pointer(skb, 0, sizeof(_mask), &_mask);
-               if (mp == NULL)
-                       BUG();
+               BUG_ON(mp == NULL);
                for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) {
                        if (*mp == ifa->ifa_mask &&
                            inet_ifa_match(rt->rt_src, ifa))
index c49908192047032d035cd75b531e9784896b0466..457db99c76df79ca2724af4891f05940fbec46b7 100644 (file)
@@ -50,9 +50,10 @@ static struct sock *idiagnl;
 #define INET_DIAG_PUT(skb, attrtype, attrlen) \
        RTA_DATA(__RTA_PUT(skb, attrtype, attrlen))
 
-static int inet_diag_fill(struct sk_buff *skb, struct sock *sk,
-                       int ext, u32 pid, u32 seq, u16 nlmsg_flags,
-                       const struct nlmsghdr *unlh)
+static int inet_csk_diag_fill(struct sock *sk,
+                             struct sk_buff *skb,
+                             int ext, u32 pid, u32 seq, u16 nlmsg_flags,
+                             const struct nlmsghdr *unlh)
 {
        const struct inet_sock *inet = inet_sk(sk);
        const struct inet_connection_sock *icsk = inet_csk(sk);
@@ -70,20 +71,22 @@ static int inet_diag_fill(struct sk_buff *skb, struct sock *sk,
        nlh->nlmsg_flags = nlmsg_flags;
 
        r = NLMSG_DATA(nlh);
-       if (sk->sk_state != TCP_TIME_WAIT) {
-               if (ext & (1 << (INET_DIAG_MEMINFO - 1)))
-                       minfo = INET_DIAG_PUT(skb, INET_DIAG_MEMINFO,
-                                             sizeof(*minfo));
-               if (ext & (1 << (INET_DIAG_INFO - 1)))
-                       info = INET_DIAG_PUT(skb, INET_DIAG_INFO,
-                                          handler->idiag_info_size);
-               
-               if ((ext & (1 << (INET_DIAG_CONG - 1))) && icsk->icsk_ca_ops) {
-                       size_t len = strlen(icsk->icsk_ca_ops->name);
-                       strcpy(INET_DIAG_PUT(skb, INET_DIAG_CONG, len + 1),
-                              icsk->icsk_ca_ops->name);
-               }
+       BUG_ON(sk->sk_state == TCP_TIME_WAIT);
+
+       if (ext & (1 << (INET_DIAG_MEMINFO - 1)))
+               minfo = INET_DIAG_PUT(skb, INET_DIAG_MEMINFO, sizeof(*minfo));
+
+       if (ext & (1 << (INET_DIAG_INFO - 1)))
+               info = INET_DIAG_PUT(skb, INET_DIAG_INFO,
+                                    handler->idiag_info_size);
+
+       if ((ext & (1 << (INET_DIAG_CONG - 1))) && icsk->icsk_ca_ops) {
+               const size_t len = strlen(icsk->icsk_ca_ops->name);
+
+               strcpy(INET_DIAG_PUT(skb, INET_DIAG_CONG, len + 1),
+                      icsk->icsk_ca_ops->name);
        }
+
        r->idiag_family = sk->sk_family;
        r->idiag_state = sk->sk_state;
        r->idiag_timer = 0;
@@ -93,37 +96,6 @@ static int inet_diag_fill(struct sk_buff *skb, struct sock *sk,
        r->id.idiag_cookie[0] = (u32)(unsigned long)sk;
        r->id.idiag_cookie[1] = (u32)(((unsigned long)sk >> 31) >> 1);
 
-       if (r->idiag_state == TCP_TIME_WAIT) {
-               const struct inet_timewait_sock *tw = inet_twsk(sk);
-               long tmo = tw->tw_ttd - jiffies;
-               if (tmo < 0)
-                       tmo = 0;
-
-               r->id.idiag_sport = tw->tw_sport;
-               r->id.idiag_dport = tw->tw_dport;
-               r->id.idiag_src[0] = tw->tw_rcv_saddr;
-               r->id.idiag_dst[0] = tw->tw_daddr;
-               r->idiag_state = tw->tw_substate;
-               r->idiag_timer = 3;
-               r->idiag_expires = (tmo * 1000 + HZ - 1) / HZ;
-               r->idiag_rqueue = 0;
-               r->idiag_wqueue = 0;
-               r->idiag_uid = 0;
-               r->idiag_inode = 0;
-#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
-               if (r->idiag_family == AF_INET6) {
-                       const struct inet6_timewait_sock *tw6 = inet6_twsk(sk);
-
-                       ipv6_addr_copy((struct in6_addr *)r->id.idiag_src,
-                                      &tw6->tw_v6_rcv_saddr);
-                       ipv6_addr_copy((struct in6_addr *)r->id.idiag_dst,
-                                      &tw6->tw_v6_daddr);
-               }
-#endif
-               nlh->nlmsg_len = skb->tail - b;
-               return skb->len;
-       }
-
        r->id.idiag_sport = inet->sport;
        r->id.idiag_dport = inet->dport;
        r->id.idiag_src[0] = inet->rcv_saddr;
@@ -185,7 +157,75 @@ nlmsg_failure:
        return -1;
 }
 
-static int inet_diag_get_exact(struct sk_buff *in_skb, const struct nlmsghdr *nlh)
+static int inet_twsk_diag_fill(struct inet_timewait_sock *tw,
+                              struct sk_buff *skb, int ext, u32 pid,
+                              u32 seq, u16 nlmsg_flags,
+                              const struct nlmsghdr *unlh)
+{
+       long tmo;
+       struct inet_diag_msg *r;
+       const unsigned char *previous_tail = skb->tail;
+       struct nlmsghdr *nlh = NLMSG_PUT(skb, pid, seq,
+                                        unlh->nlmsg_type, sizeof(*r));
+
+       r = NLMSG_DATA(nlh);
+       BUG_ON(tw->tw_state != TCP_TIME_WAIT);
+
+       nlh->nlmsg_flags = nlmsg_flags;
+
+       tmo = tw->tw_ttd - jiffies;
+       if (tmo < 0)
+               tmo = 0;
+
+       r->idiag_family       = tw->tw_family;
+       r->idiag_state        = tw->tw_state;
+       r->idiag_timer        = 0;
+       r->idiag_retrans      = 0;
+       r->id.idiag_if        = tw->tw_bound_dev_if;
+       r->id.idiag_cookie[0] = (u32)(unsigned long)tw;
+       r->id.idiag_cookie[1] = (u32)(((unsigned long)tw >> 31) >> 1);
+       r->id.idiag_sport     = tw->tw_sport;
+       r->id.idiag_dport     = tw->tw_dport;
+       r->id.idiag_src[0]    = tw->tw_rcv_saddr;
+       r->id.idiag_dst[0]    = tw->tw_daddr;
+       r->idiag_state        = tw->tw_substate;
+       r->idiag_timer        = 3;
+       r->idiag_expires      = (tmo * 1000 + HZ - 1) / HZ;
+       r->idiag_rqueue       = 0;
+       r->idiag_wqueue       = 0;
+       r->idiag_uid          = 0;
+       r->idiag_inode        = 0;
+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
+       if (tw->tw_family == AF_INET6) {
+               const struct inet6_timewait_sock *tw6 =
+                                               inet6_twsk((struct sock *)tw);
+
+               ipv6_addr_copy((struct in6_addr *)r->id.idiag_src,
+                              &tw6->tw_v6_rcv_saddr);
+               ipv6_addr_copy((struct in6_addr *)r->id.idiag_dst,
+                              &tw6->tw_v6_daddr);
+       }
+#endif
+       nlh->nlmsg_len = skb->tail - previous_tail;
+       return skb->len;
+nlmsg_failure:
+       skb_trim(skb, previous_tail - skb->data);
+       return -1;
+}
+
+static int sk_diag_fill(struct sock *sk, struct sk_buff *skb,
+                       int ext, u32 pid, u32 seq, u16 nlmsg_flags,
+                       const struct nlmsghdr *unlh)
+{
+       if (sk->sk_state == TCP_TIME_WAIT)
+               return inet_twsk_diag_fill((struct inet_timewait_sock *)sk,
+                                          skb, ext, pid, seq, nlmsg_flags,
+                                          unlh);
+       return inet_csk_diag_fill(sk, skb, ext, pid, seq, nlmsg_flags, unlh);
+}
+
+static int inet_diag_get_exact(struct sk_buff *in_skb,
+                              const struct nlmsghdr *nlh)
 {
        int err;
        struct sock *sk;
@@ -235,7 +275,7 @@ static int inet_diag_get_exact(struct sk_buff *in_skb, const struct nlmsghdr *nl
        if (!rep)
                goto out;
 
-       if (inet_diag_fill(rep, sk, req->idiag_ext,
+       if (sk_diag_fill(sk, rep, req->idiag_ext,
                         NETLINK_CB(in_skb).pid,
                         nlh->nlmsg_seq, 0, nlh) <= 0)
                BUG();
@@ -283,7 +323,7 @@ static int bitstring_match(const u32 *a1, const u32 *a2, int bits)
 
 
 static int inet_diag_bc_run(const void *bc, int len,
-                         const struct inet_diag_entry *entry)
+                           const struct inet_diag_entry *entry)
 {
        while (len > 0) {
                int yes = 1;
@@ -322,7 +362,7 @@ static int inet_diag_bc_run(const void *bc, int len,
                                yes = 0;
                                break;
                        }
-                       
+
                        if (cond->prefix_len == 0)
                                break;
 
@@ -331,7 +371,8 @@ static int inet_diag_bc_run(const void *bc, int len,
                        else
                                addr = entry->daddr;
 
-                       if (bitstring_match(addr, cond->addr, cond->prefix_len))
+                       if (bitstring_match(addr, cond->addr,
+                                           cond->prefix_len))
                                break;
                        if (entry->family == AF_INET6 &&
                            cond->family == AF_INET) {
@@ -346,7 +387,7 @@ static int inet_diag_bc_run(const void *bc, int len,
                }
                }
 
-               if (yes) { 
+               if (yes) {
                        len -= op->yes;
                        bc += op->yes;
                } else {
@@ -407,14 +448,15 @@ static int inet_diag_bc_audit(const void *bytecode, int bytecode_len)
                default:
                        return -EINVAL;
                }
-               bc += op->yes;
+               bc  += op->yes;
                len -= op->yes;
        }
        return len == 0 ? 0 : -EINVAL;
 }
 
-static int inet_diag_dump_sock(struct sk_buff *skb, struct sock *sk,
-                            struct netlink_callback *cb)
+static int inet_csk_diag_dump(struct sock *sk,
+                             struct sk_buff *skb,
+                             struct netlink_callback *cb)
 {
        struct inet_diag_req *r = NLMSG_DATA(cb->nlh);
 
@@ -444,14 +486,50 @@ static int inet_diag_dump_sock(struct sk_buff *skb, struct sock *sk,
                        return 0;
        }
 
-       return inet_diag_fill(skb, sk, r->idiag_ext, NETLINK_CB(cb->skb).pid,
-                           cb->nlh->nlmsg_seq, NLM_F_MULTI, cb->nlh);
+       return inet_csk_diag_fill(sk, skb, r->idiag_ext,
+                                 NETLINK_CB(cb->skb).pid,
+                                 cb->nlh->nlmsg_seq, NLM_F_MULTI, cb->nlh);
+}
+
+static int inet_twsk_diag_dump(struct inet_timewait_sock *tw,
+                              struct sk_buff *skb,
+                              struct netlink_callback *cb)
+{
+       struct inet_diag_req *r = NLMSG_DATA(cb->nlh);
+
+       if (cb->nlh->nlmsg_len > 4 + NLMSG_SPACE(sizeof(*r))) {
+               struct inet_diag_entry entry;
+               struct rtattr *bc = (struct rtattr *)(r + 1);
+
+               entry.family = tw->tw_family;
+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
+               if (tw->tw_family == AF_INET6) {
+                       struct inet6_timewait_sock *tw6 =
+                                               inet6_twsk((struct sock *)tw);
+                       entry.saddr = tw6->tw_v6_rcv_saddr.s6_addr32;
+                       entry.daddr = tw6->tw_v6_daddr.s6_addr32;
+               } else
+#endif
+               {
+                       entry.saddr = &tw->tw_rcv_saddr;
+                       entry.daddr = &tw->tw_daddr;
+               }
+               entry.sport = tw->tw_num;
+               entry.dport = ntohs(tw->tw_dport);
+               entry.userlocks = 0; 
+
+               if (!inet_diag_bc_run(RTA_DATA(bc), RTA_PAYLOAD(bc), &entry))
+                       return 0;
+       }
+
+       return inet_twsk_diag_fill(tw, skb, r->idiag_ext,
+                                  NETLINK_CB(cb->skb).pid,
+                                  cb->nlh->nlmsg_seq, NLM_F_MULTI, cb->nlh);
 }
 
 static int inet_diag_fill_req(struct sk_buff *skb, struct sock *sk,
-                           struct request_sock *req,
-                           u32 pid, u32 seq,
-                           const struct nlmsghdr *unlh)
+                             struct request_sock *req, u32 pid, u32 seq,
+                             const struct nlmsghdr *unlh)
 {
        const struct inet_request_sock *ireq = inet_rsk(req);
        struct inet_sock *inet = inet_sk(sk);
@@ -504,7 +582,7 @@ nlmsg_failure:
 }
 
 static int inet_diag_dump_reqs(struct sk_buff *skb, struct sock *sk,
-                            struct netlink_callback *cb)
+                              struct netlink_callback *cb)
 {
        struct inet_diag_entry entry;
        struct inet_diag_req *r = NLMSG_DATA(cb->nlh);
@@ -556,7 +634,7 @@ static int inet_diag_dump_reqs(struct sk_buff *skb, struct sock *sk,
                                        inet6_rsk(req)->loc_addr.s6_addr32 :
 #endif
                                        &ireq->loc_addr;
-                               entry.daddr = 
+                               entry.daddr =
 #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
                                        (entry.family == AF_INET6) ?
                                        inet6_rsk(req)->rmt_addr.s6_addr32 :
@@ -599,7 +677,7 @@ static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb)
        handler = inet_diag_table[cb->nlh->nlmsg_type];
        BUG_ON(handler == NULL);
        hashinfo = handler->idiag_hashinfo;
-               
+
        s_i = cb->args[1];
        s_num = num = cb->args[2];
 
@@ -630,7 +708,7 @@ static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb)
                                    cb->args[3] > 0)
                                        goto syn_recv;
 
-                               if (inet_diag_dump_sock(skb, sk, cb) < 0) {
+                               if (inet_csk_diag_dump(sk, skb, cb) < 0) {
                                        inet_listen_unlock(hashinfo);
                                        goto done;
                                }
@@ -672,7 +750,6 @@ skip_listen_ht:
                        s_num = 0;
 
                read_lock_bh(&head->lock);
-
                num = 0;
                sk_for_each(sk, node, &head->chain) {
                        struct inet_sock *inet = inet_sk(sk);
@@ -684,9 +761,10 @@ skip_listen_ht:
                        if (r->id.idiag_sport != inet->sport &&
                            r->id.idiag_sport)
                                goto next_normal;
-                       if (r->id.idiag_dport != inet->dport && r->id.idiag_dport)
+                       if (r->id.idiag_dport != inet->dport &&
+                           r->id.idiag_dport)
                                goto next_normal;
-                       if (inet_diag_dump_sock(skb, sk, cb) < 0) {
+                       if (inet_csk_diag_dump(sk, skb, cb) < 0) {
                                read_unlock_bh(&head->lock);
                                goto done;
                        }
@@ -695,19 +773,20 @@ next_normal:
                }
 
                if (r->idiag_states & TCPF_TIME_WAIT) {
-                       sk_for_each(sk, node,
+                       struct inet_timewait_sock *tw;
+
+                       inet_twsk_for_each(tw, node,
                                    &hashinfo->ehash[i + hashinfo->ehash_size].chain) {
-                               struct inet_sock *inet = inet_sk(sk);
 
                                if (num < s_num)
                                        goto next_dying;
-                               if (r->id.idiag_sport != inet->sport &&
+                               if (r->id.idiag_sport != tw->tw_sport &&
                                    r->id.idiag_sport)
                                        goto next_dying;
-                               if (r->id.idiag_dport != inet->dport &&
+                               if (r->id.idiag_dport != tw->tw_dport &&
                                    r->id.idiag_dport)
                                        goto next_dying;
-                               if (inet_diag_dump_sock(skb, sk, cb) < 0) {
+                               if (inet_twsk_diag_dump(tw, skb, cb) < 0) {
                                        read_unlock_bh(&head->lock);
                                        goto done;
                                }
@@ -724,8 +803,7 @@ done:
        return skb->len;
 }
 
-static __inline__ int
-inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
+static inline int inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
 {
        if (!(nlh->nlmsg_flags&NLM_F_REQUEST))
                return 0;
@@ -755,9 +833,8 @@ inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
                }
                return netlink_dump_start(idiagnl, skb, nlh,
                                          inet_diag_dump, NULL);
-       } else {
+       } else
                return inet_diag_get_exact(skb, nlh);
-       }
 
 err_inval:
        return -EINVAL;
@@ -766,15 +843,15 @@ err_inval:
 
 static inline void inet_diag_rcv_skb(struct sk_buff *skb)
 {
-       int err;
-       struct nlmsghdr * nlh;
-
        if (skb->len >= NLMSG_SPACE(0)) {
-               nlh = (struct nlmsghdr *)skb->data;
-               if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len)
+               int err;
+               struct nlmsghdr *nlh = (struct nlmsghdr *)skb->data;
+
+               if (nlh->nlmsg_len < sizeof(*nlh) ||
+                   skb->len < nlh->nlmsg_len)
                        return;
                err = inet_diag_rcv_msg(skb, nlh);
-               if (err || nlh->nlmsg_flags & NLM_F_ACK) 
+               if (err || nlh->nlmsg_flags & NLM_F_ACK)
                        netlink_ack(skb, nlh, err);
        }
 }
index ce5fe3f74a3d868cc68a3a395e7685c0608bbbd0..2160874ce7aa682db5edda0e8eacb4cce44c7e44 100644 (file)
@@ -304,8 +304,7 @@ static void unlink_from_pool(struct inet_peer *p)
                        /* look for a node to insert instead of p */
                        struct inet_peer *t;
                        t = lookup_rightempty(p);
-                       if (*stackptr[-1] != t)
-                               BUG();
+                       BUG_ON(*stackptr[-1] != t);
                        **--stackptr = t->avl_left;
                        /* t is removed, t->v4daddr > x->v4daddr for any
                         * x in p->avl_left subtree.
@@ -314,8 +313,7 @@ static void unlink_from_pool(struct inet_peer *p)
                        t->avl_left = p->avl_left;
                        t->avl_right = p->avl_right;
                        t->avl_height = p->avl_height;
-                       if (delp[1] != &p->avl_left)
-                               BUG();
+                       BUG_ON(delp[1] != &p->avl_left);
                        delp[1] = &t->avl_left; /* was &p->avl_left */
                }
                peer_avl_rebalance(stack, stackptr);
index de16e944777f5838aa07fd1d2f899da9ac0805f6..1e93eafa7af1cda1e48a160f1b8857094c55f439 100644 (file)
@@ -188,7 +188,7 @@ static struct ip_tunnel * ipgre_tunnel_lookup(u32 remote, u32 local, u32 key)
        }
 
        if (ipgre_fb_tunnel_dev->flags&IFF_UP)
-               return ipgre_fb_tunnel_dev->priv;
+               return netdev_priv(ipgre_fb_tunnel_dev);
        return NULL;
 }
 
@@ -278,7 +278,7 @@ static struct ip_tunnel * ipgre_tunnel_locate(struct ip_tunnel_parm *parms, int
          return NULL;
 
        dev->init = ipgre_tunnel_init;
-       nt = dev->priv;
+       nt = netdev_priv(dev);
        nt->parms = *parms;
 
        if (register_netdevice(dev) < 0) {
@@ -286,9 +286,6 @@ static struct ip_tunnel * ipgre_tunnel_locate(struct ip_tunnel_parm *parms, int
                goto failed;
        }
 
-       nt = dev->priv;
-       nt->parms = *parms;
-
        dev_hold(dev);
        ipgre_tunnel_link(nt);
        return nt;
@@ -299,7 +296,7 @@ failed:
 
 static void ipgre_tunnel_uninit(struct net_device *dev)
 {
-       ipgre_tunnel_unlink((struct ip_tunnel*)dev->priv);
+       ipgre_tunnel_unlink(netdev_priv(dev));
        dev_put(dev);
 }
 
@@ -518,7 +515,7 @@ out:
                skb2->dst->ops->update_pmtu(skb2->dst, rel_info);
                rel_info = htonl(rel_info);
        } else if (type == ICMP_TIME_EXCEEDED) {
-               struct ip_tunnel *t = (struct ip_tunnel*)skb2->dev->priv;
+               struct ip_tunnel *t = netdev_priv(skb2->dev);
                if (t->parms.iph.ttl) {
                        rel_type = ICMP_DEST_UNREACH;
                        rel_code = ICMP_HOST_UNREACH;
@@ -669,7 +666,7 @@ drop_nolock:
 
 static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
 {
-       struct ip_tunnel *tunnel = (struct ip_tunnel*)dev->priv;
+       struct ip_tunnel *tunnel = netdev_priv(dev);
        struct net_device_stats *stats = &tunnel->stat;
        struct iphdr  *old_iph = skb->nh.iph;
        struct iphdr  *tiph;
@@ -915,7 +912,7 @@ ipgre_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
                        t = ipgre_tunnel_locate(&p, 0);
                }
                if (t == NULL)
-                       t = (struct ip_tunnel*)dev->priv;
+                       t = netdev_priv(dev);
                memcpy(&p, &t->parms, sizeof(p));
                if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p)))
                        err = -EFAULT;
@@ -955,7 +952,7 @@ ipgre_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
                        } else {
                                unsigned nflags=0;
 
-                               t = (struct ip_tunnel*)dev->priv;
+                               t = netdev_priv(dev);
 
                                if (MULTICAST(p.iph.daddr))
                                        nflags = IFF_BROADCAST;
@@ -1004,7 +1001,7 @@ ipgre_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
                        if ((t = ipgre_tunnel_locate(&p, 0)) == NULL)
                                goto done;
                        err = -EPERM;
-                       if (t == ipgre_fb_tunnel_dev->priv)
+                       if (t == netdev_priv(ipgre_fb_tunnel_dev))
                                goto done;
                        dev = t->dev;
                }
@@ -1021,12 +1018,12 @@ done:
 
 static struct net_device_stats *ipgre_tunnel_get_stats(struct net_device *dev)
 {
-       return &(((struct ip_tunnel*)dev->priv)->stat);
+       return &(((struct ip_tunnel*)netdev_priv(dev))->stat);
 }
 
 static int ipgre_tunnel_change_mtu(struct net_device *dev, int new_mtu)
 {
-       struct ip_tunnel *tunnel = (struct ip_tunnel*)dev->priv;
+       struct ip_tunnel *tunnel = netdev_priv(dev);
        if (new_mtu < 68 || new_mtu > 0xFFF8 - tunnel->hlen)
                return -EINVAL;
        dev->mtu = new_mtu;
@@ -1066,7 +1063,7 @@ static int ipgre_tunnel_change_mtu(struct net_device *dev, int new_mtu)
 static int ipgre_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
                        void *daddr, void *saddr, unsigned len)
 {
-       struct ip_tunnel *t = (struct ip_tunnel*)dev->priv;
+       struct ip_tunnel *t = netdev_priv(dev);
        struct iphdr *iph = (struct iphdr *)skb_push(skb, t->hlen);
        u16 *p = (u16*)(iph+1);
 
@@ -1093,7 +1090,7 @@ static int ipgre_header(struct sk_buff *skb, struct net_device *dev, unsigned sh
 
 static int ipgre_open(struct net_device *dev)
 {
-       struct ip_tunnel *t = (struct ip_tunnel*)dev->priv;
+       struct ip_tunnel *t = netdev_priv(dev);
 
        if (MULTICAST(t->parms.iph.daddr)) {
                struct flowi fl = { .oif = t->parms.link,
@@ -1117,7 +1114,7 @@ static int ipgre_open(struct net_device *dev)
 
 static int ipgre_close(struct net_device *dev)
 {
-       struct ip_tunnel *t = (struct ip_tunnel*)dev->priv;
+       struct ip_tunnel *t = netdev_priv(dev);
        if (MULTICAST(t->parms.iph.daddr) && t->mlink) {
                struct in_device *in_dev = inetdev_by_index(t->mlink);
                if (in_dev) {
@@ -1157,7 +1154,7 @@ static int ipgre_tunnel_init(struct net_device *dev)
        int mtu = ETH_DATA_LEN;
        int addend = sizeof(struct iphdr) + 4;
 
-       tunnel = (struct ip_tunnel*)dev->priv;
+       tunnel = netdev_priv(dev);
        iph = &tunnel->parms.iph;
 
        tunnel->dev = dev;
@@ -1221,7 +1218,7 @@ static int ipgre_tunnel_init(struct net_device *dev)
 
 static int __init ipgre_fb_tunnel_init(struct net_device *dev)
 {
-       struct ip_tunnel *tunnel = (struct ip_tunnel*)dev->priv;
+       struct ip_tunnel *tunnel = netdev_priv(dev);
        struct iphdr *iph = &tunnel->parms.iph;
 
        tunnel->dev = dev;
index c2169b47ddfd0ddf6f912fe35f85858f5ee313cb..3324fbfe528a048b279c7b7f44e25810a750dbca 100644 (file)
@@ -69,6 +69,7 @@
 #include <net/ip.h>
 #include <net/protocol.h>
 #include <net/route.h>
+#include <net/xfrm.h>
 #include <linux/skbuff.h>
 #include <net/sock.h>
 #include <net/arp.h>
index bbd85f5ec9859ddba5fe3b986894402cde60730d..bc5ca23b2646a96de9fa5e8c15b7a159229f7851 100644 (file)
@@ -244,7 +244,7 @@ static struct ip_tunnel * ipip_tunnel_locate(struct ip_tunnel_parm *parms, int c
        if (dev == NULL)
                return NULL;
 
-       nt = dev->priv;
+       nt = netdev_priv(dev);
        SET_MODULE_OWNER(dev);
        dev->init = ipip_tunnel_init;
        nt->parms = *parms;
@@ -269,7 +269,7 @@ static void ipip_tunnel_uninit(struct net_device *dev)
                tunnels_wc[0] = NULL;
                write_unlock_bh(&ipip_lock);
        } else
-               ipip_tunnel_unlink((struct ip_tunnel*)dev->priv);
+               ipip_tunnel_unlink(netdev_priv(dev));
        dev_put(dev);
 }
 
@@ -443,7 +443,7 @@ out:
                skb2->dst->ops->update_pmtu(skb2->dst, rel_info);
                rel_info = htonl(rel_info);
        } else if (type == ICMP_TIME_EXCEEDED) {
-               struct ip_tunnel *t = (struct ip_tunnel*)skb2->dev->priv;
+               struct ip_tunnel *t = netdev_priv(skb2->dev);
                if (t->parms.iph.ttl) {
                        rel_type = ICMP_DEST_UNREACH;
                        rel_code = ICMP_HOST_UNREACH;
@@ -514,7 +514,7 @@ out:
 
 static int ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
 {
-       struct ip_tunnel *tunnel = (struct ip_tunnel*)dev->priv;
+       struct ip_tunnel *tunnel = netdev_priv(dev);
        struct net_device_stats *stats = &tunnel->stat;
        struct iphdr  *tiph = &tunnel->parms.iph;
        u8     tos = tunnel->parms.iph.tos;
@@ -674,7 +674,7 @@ ipip_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
                        t = ipip_tunnel_locate(&p, 0);
                }
                if (t == NULL)
-                       t = (struct ip_tunnel*)dev->priv;
+                       t = netdev_priv(dev);
                memcpy(&p, &t->parms, sizeof(p));
                if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p)))
                        err = -EFAULT;
@@ -711,7 +711,7 @@ ipip_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
                                        err = -EINVAL;
                                        break;
                                }
-                               t = (struct ip_tunnel*)dev->priv;
+                               t = netdev_priv(dev);
                                ipip_tunnel_unlink(t);
                                t->parms.iph.saddr = p.iph.saddr;
                                t->parms.iph.daddr = p.iph.daddr;
@@ -765,7 +765,7 @@ done:
 
 static struct net_device_stats *ipip_tunnel_get_stats(struct net_device *dev)
 {
-       return &(((struct ip_tunnel*)dev->priv)->stat);
+       return &(((struct ip_tunnel*)netdev_priv(dev))->stat);
 }
 
 static int ipip_tunnel_change_mtu(struct net_device *dev, int new_mtu)
@@ -800,7 +800,7 @@ static int ipip_tunnel_init(struct net_device *dev)
        struct ip_tunnel *tunnel;
        struct iphdr *iph;
 
-       tunnel = (struct ip_tunnel*)dev->priv;
+       tunnel = netdev_priv(dev);
        iph = &tunnel->parms.iph;
 
        tunnel->dev = dev;
@@ -838,7 +838,7 @@ static int ipip_tunnel_init(struct net_device *dev)
 
 static int __init ipip_fb_tunnel_init(struct net_device *dev)
 {
-       struct ip_tunnel *tunnel = dev->priv;
+       struct ip_tunnel *tunnel = netdev_priv(dev);
        struct iphdr *iph = &tunnel->parms.iph;
 
        tunnel->dev = dev;
index 9a5c0ce7ff3554db41e2559348265b64e95365ff..f58ac9854c3f705c91a9e9654b270fc4f4010b40 100644 (file)
@@ -178,8 +178,8 @@ static int reg_vif_num = -1;
 static int reg_vif_xmit(struct sk_buff *skb, struct net_device *dev)
 {
        read_lock(&mrt_lock);
-       ((struct net_device_stats*)dev->priv)->tx_bytes += skb->len;
-       ((struct net_device_stats*)dev->priv)->tx_packets++;
+       ((struct net_device_stats*)netdev_priv(dev))->tx_bytes += skb->len;
+       ((struct net_device_stats*)netdev_priv(dev))->tx_packets++;
        ipmr_cache_report(skb, reg_vif_num, IGMPMSG_WHOLEPKT);
        read_unlock(&mrt_lock);
        kfree_skb(skb);
@@ -188,7 +188,7 @@ static int reg_vif_xmit(struct sk_buff *skb, struct net_device *dev)
 
 static struct net_device_stats *reg_vif_get_stats(struct net_device *dev)
 {
-       return (struct net_device_stats*)dev->priv;
+       return (struct net_device_stats*)netdev_priv(dev);
 }
 
 static void reg_vif_setup(struct net_device *dev)
@@ -1149,8 +1149,8 @@ static void ipmr_queue_xmit(struct sk_buff *skb, struct mfc_cache *c, int vifi)
        if (vif->flags & VIFF_REGISTER) {
                vif->pkt_out++;
                vif->bytes_out+=skb->len;
-               ((struct net_device_stats*)vif->dev->priv)->tx_bytes += skb->len;
-               ((struct net_device_stats*)vif->dev->priv)->tx_packets++;
+               ((struct net_device_stats*)netdev_priv(vif->dev))->tx_bytes += skb->len;
+               ((struct net_device_stats*)netdev_priv(vif->dev))->tx_packets++;
                ipmr_cache_report(skb, vifi, IGMPMSG_WHOLEPKT);
                kfree_skb(skb);
                return;
@@ -1210,8 +1210,8 @@ static void ipmr_queue_xmit(struct sk_buff *skb, struct mfc_cache *c, int vifi)
        if (vif->flags & VIFF_TUNNEL) {
                ip_encap(skb, vif->local, vif->remote);
                /* FIXME: extra output firewall step used to be here. --RR */
-               ((struct ip_tunnel *)vif->dev->priv)->stat.tx_packets++;
-               ((struct ip_tunnel *)vif->dev->priv)->stat.tx_bytes+=skb->len;
+               ((struct ip_tunnel *)netdev_priv(vif->dev))->stat.tx_packets++;
+               ((struct ip_tunnel *)netdev_priv(vif->dev))->stat.tx_bytes+=skb->len;
        }
 
        IPCB(skb)->flags |= IPSKB_FORWARDED;
@@ -1467,8 +1467,8 @@ int pim_rcv_v1(struct sk_buff * skb)
        skb->pkt_type = PACKET_HOST;
        dst_release(skb->dst);
        skb->dst = NULL;
-       ((struct net_device_stats*)reg_dev->priv)->rx_bytes += skb->len;
-       ((struct net_device_stats*)reg_dev->priv)->rx_packets++;
+       ((struct net_device_stats*)netdev_priv(reg_dev))->rx_bytes += skb->len;
+       ((struct net_device_stats*)netdev_priv(reg_dev))->rx_packets++;
        nf_reset(skb);
        netif_rx(skb);
        dev_put(reg_dev);
@@ -1522,8 +1522,8 @@ static int pim_rcv(struct sk_buff * skb)
        skb->ip_summed = 0;
        skb->pkt_type = PACKET_HOST;
        dst_release(skb->dst);
-       ((struct net_device_stats*)reg_dev->priv)->rx_bytes += skb->len;
-       ((struct net_device_stats*)reg_dev->priv)->rx_packets++;
+       ((struct net_device_stats*)netdev_priv(reg_dev))->rx_bytes += skb->len;
+       ((struct net_device_stats*)netdev_priv(reg_dev))->rx_packets++;
        skb->dst = NULL;
        nf_reset(skb);
        netif_rx(skb);
index 0a461232329fa328dcf20186054f87049ec3a7bc..a97ed5416c28ee14ecab0ac4483c079a0c3e4c1d 100644 (file)
@@ -3347,7 +3347,7 @@ tcp_collapse(struct sock *sk, struct sk_buff_head *list,
                        int offset = start - TCP_SKB_CB(skb)->seq;
                        int size = TCP_SKB_CB(skb)->end_seq - start;
 
-                       if (offset < 0) BUG();
+                       BUG_ON(offset < 0);
                        if (size > 0) {
                                size = min(copy, size);
                                if (skb_copy_bits(skb, offset, skb_put(nskb, size), size))
index b4c4beba0ede942c774bb4d9c49c30c682871e44..efa3e72cfcfa3d536a425d9c466026c46acf5113 100644 (file)
@@ -226,6 +226,8 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
        ipv6_addr_copy(&hdr->saddr, &fl->fl6_src);
        ipv6_addr_copy(&hdr->daddr, first_hop);
 
+       skb->priority = sk->sk_priority;
+
        mtu = dst_mtu(dst);
        if ((skb->len <= mtu) || ipfragok) {
                IP6_INC_STATS(IPSTATS_MIB_OUTREQUESTS);
@@ -1182,6 +1184,8 @@ int ip6_push_pending_frames(struct sock *sk)
        ipv6_addr_copy(&hdr->saddr, &fl->fl6_src);
        ipv6_addr_copy(&hdr->daddr, final_dst);
 
+       skb->priority = sk->sk_priority;
+
        skb->dst = dst_clone(&rt->u.dst);
        IP6_INC_STATS(IPSTATS_MIB_OUTREQUESTS); 
        err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, skb->dst->dev, dst_output);
index f079621c8b671d3b121354f0da7c25b6824d3109..c3c2bf699a67259a9e1608e54e6f29f614dc2487 100644 (file)
@@ -243,7 +243,7 @@ ip6_tnl_create(struct ip6_tnl_parm *p, struct ip6_tnl **pt)
        if (dev == NULL)
                return -ENOMEM;
 
-       t = dev->priv;
+       t = netdev_priv(dev);
        dev->init = ip6ip6_tnl_dev_init;
        t->parms = *p;
 
@@ -308,7 +308,7 @@ ip6ip6_tnl_locate(struct ip6_tnl_parm *p, struct ip6_tnl **pt, int create)
 static void
 ip6ip6_tnl_dev_uninit(struct net_device *dev)
 {
-       struct ip6_tnl *t = dev->priv;
+       struct ip6_tnl *t = netdev_priv(dev);
 
        if (dev == ip6ip6_fb_tnl_dev) {
                write_lock_bh(&ip6ip6_lock);
@@ -623,7 +623,7 @@ ip6ip6_tnl_addr_conflict(struct ip6_tnl *t, struct ipv6hdr *hdr)
 static int 
 ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
 {
-       struct ip6_tnl *t = (struct ip6_tnl *) dev->priv;
+       struct ip6_tnl *t = netdev_priv(dev);
        struct net_device_stats *stats = &t->stat;
        struct ipv6hdr *ipv6h = skb->nh.ipv6h;
        struct ipv6_txoptions *opt = NULL;
@@ -933,11 +933,11 @@ ip6ip6_tnl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
                                break;
                        }
                        if ((err = ip6ip6_tnl_locate(&p, &t, 0)) == -ENODEV)
-                               t = (struct ip6_tnl *) dev->priv;
+                               t = netdev_priv(dev);
                        else if (err)
                                break;
                } else
-                       t = (struct ip6_tnl *) dev->priv;
+                       t = netdev_priv(dev);
 
                memcpy(&p, &t->parms, sizeof (p));
                if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof (p))) {
@@ -955,7 +955,7 @@ ip6ip6_tnl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
                        break;
                }
                if (!create && dev != ip6ip6_fb_tnl_dev) {
-                       t = (struct ip6_tnl *) dev->priv;
+                       t = netdev_priv(dev);
                }
                if (!t && (err = ip6ip6_tnl_locate(&p, &t, create))) {
                        break;
@@ -991,12 +991,12 @@ ip6ip6_tnl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
                        err = ip6ip6_tnl_locate(&p, &t, 0);
                        if (err)
                                break;
-                       if (t == ip6ip6_fb_tnl_dev->priv) {
+                       if (t == netdev_priv(ip6ip6_fb_tnl_dev)) {
                                err = -EPERM;
                                break;
                        }
                } else {
-                       t = (struct ip6_tnl *) dev->priv;
+                       t = netdev_priv(dev);
                }
                err = unregister_netdevice(t->dev);
                break;
@@ -1016,7 +1016,7 @@ ip6ip6_tnl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
 static struct net_device_stats *
 ip6ip6_tnl_get_stats(struct net_device *dev)
 {
-       return &(((struct ip6_tnl *) dev->priv)->stat);
+       return &(((struct ip6_tnl *)netdev_priv(dev))->stat);
 }
 
 /**
@@ -1073,7 +1073,7 @@ static void ip6ip6_tnl_dev_setup(struct net_device *dev)
 static inline void
 ip6ip6_tnl_dev_init_gen(struct net_device *dev)
 {
-       struct ip6_tnl *t = (struct ip6_tnl *) dev->priv;
+       struct ip6_tnl *t = netdev_priv(dev);
        t->fl.proto = IPPROTO_IPV6;
        t->dev = dev;
        strcpy(t->parms.name, dev->name);
@@ -1087,7 +1087,7 @@ ip6ip6_tnl_dev_init_gen(struct net_device *dev)
 static int
 ip6ip6_tnl_dev_init(struct net_device *dev)
 {
-       struct ip6_tnl *t = (struct ip6_tnl *) dev->priv;
+       struct ip6_tnl *t = netdev_priv(dev);
        ip6ip6_tnl_dev_init_gen(dev);
        ip6ip6_tnl_link_config(t);
        return 0;
@@ -1103,7 +1103,7 @@ ip6ip6_tnl_dev_init(struct net_device *dev)
 static int 
 ip6ip6_fb_tnl_dev_init(struct net_device *dev)
 {
-       struct ip6_tnl *t = dev->priv;
+       struct ip6_tnl *t = netdev_priv(dev);
        ip6ip6_tnl_dev_init_gen(dev);
        dev_hold(dev);
        tnls_wc[0] = t;
index 02872ae8a439b0a664e16cf765c2880ff1ad5fbf..0dae48aa1ceca4d919ce3667ae71d9e7923af957 100644 (file)
@@ -184,7 +184,7 @@ static struct ip_tunnel * ipip6_tunnel_locate(struct ip_tunnel_parm *parms, int
        if (dev == NULL)
                return NULL;
 
-       nt = dev->priv;
+       nt = netdev_priv(dev);
        dev->init = ipip6_tunnel_init;
        nt->parms = *parms;
 
@@ -210,7 +210,7 @@ static void ipip6_tunnel_uninit(struct net_device *dev)
                write_unlock_bh(&ipip6_lock);
                dev_put(dev);
        } else {
-               ipip6_tunnel_unlink((struct ip_tunnel*)dev->priv);
+               ipip6_tunnel_unlink(netdev_priv(dev));
                dev_put(dev);
        }
 }
@@ -346,7 +346,7 @@ out:
                rt6i = rt6_lookup(&iph6->daddr, &iph6->saddr, NULL, 0);
 
                if (rt6i && rt6i->rt6i_dev && rt6i->rt6i_dev->type == ARPHRD_SIT) {
-                       struct ip_tunnel * t = (struct ip_tunnel*)rt6i->rt6i_dev->priv;
+                       struct ip_tunnel *t = netdev_priv(rt6i->rt6i_dev);
                        if (rel_type == ICMPV6_TIME_EXCEED && t->parms.iph.ttl) {
                                rel_type = ICMPV6_DEST_UNREACH;
                                rel_code = ICMPV6_ADDR_UNREACH;
@@ -424,7 +424,7 @@ static inline u32 try_6to4(struct in6_addr *v6dst)
 
 static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
 {
-       struct ip_tunnel *tunnel = (struct ip_tunnel*)dev->priv;
+       struct ip_tunnel *tunnel = netdev_priv(dev);
        struct net_device_stats *stats = &tunnel->stat;
        struct iphdr  *tiph = &tunnel->parms.iph;
        struct ipv6hdr *iph6 = skb->nh.ipv6h;
@@ -610,7 +610,7 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
                        t = ipip6_tunnel_locate(&p, 0);
                }
                if (t == NULL)
-                       t = (struct ip_tunnel*)dev->priv;
+                       t = netdev_priv(dev);
                memcpy(&p, &t->parms, sizeof(p));
                if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p)))
                        err = -EFAULT;
@@ -647,7 +647,7 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
                                        err = -EINVAL;
                                        break;
                                }
-                               t = (struct ip_tunnel*)dev->priv;
+                               t = netdev_priv(dev);
                                ipip6_tunnel_unlink(t);
                                t->parms.iph.saddr = p.iph.saddr;
                                t->parms.iph.daddr = p.iph.daddr;
@@ -683,7 +683,7 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
                        if ((t = ipip6_tunnel_locate(&p, 0)) == NULL)
                                goto done;
                        err = -EPERM;
-                       if (t == ipip6_fb_tunnel_dev->priv)
+                       if (t == netdev_priv(ipip6_fb_tunnel_dev))
                                goto done;
                        dev = t->dev;
                }
@@ -700,7 +700,7 @@ done:
 
 static struct net_device_stats *ipip6_tunnel_get_stats(struct net_device *dev)
 {
-       return &(((struct ip_tunnel*)dev->priv)->stat);
+       return &(((struct ip_tunnel*)netdev_priv(dev))->stat);
 }
 
 static int ipip6_tunnel_change_mtu(struct net_device *dev, int new_mtu)
@@ -735,7 +735,7 @@ static int ipip6_tunnel_init(struct net_device *dev)
        struct ip_tunnel *tunnel;
        struct iphdr *iph;
 
-       tunnel = (struct ip_tunnel*)dev->priv;
+       tunnel = netdev_priv(dev);
        iph = &tunnel->parms.iph;
 
        tunnel->dev = dev;
@@ -775,7 +775,7 @@ static int ipip6_tunnel_init(struct net_device *dev)
 
 static int __init ipip6_fb_tunnel_init(struct net_device *dev)
 {
-       struct ip_tunnel *tunnel = dev->priv;
+       struct ip_tunnel *tunnel = netdev_priv(dev);
        struct iphdr *iph = &tunnel->parms.iph;
 
        tunnel->dev = dev;
index 52efd04cbedbb64ea409e1d81f5d608d8e52caa4..4c2f6d694f883341f41fca5e718abc65d3d897a7 100644 (file)
@@ -297,8 +297,7 @@ static int pfkey_error(struct sadb_msg *orig, int err, struct sock *sk)
                err = EINTR;
        if (err >= 512)
                err = EINVAL;
-       if (err <= 0 || err >= 256)
-               BUG();
+       BUG_ON(err <= 0 || err >= 256);
 
        hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg));
        pfkey_hdr_dup(hdr, orig);
index e48d0d456b3ebfe0727eca1f116b9f2d1160ec33..0f06aec66094010d165925e0d26d945a29c94c1b 100644 (file)
@@ -7,13 +7,13 @@ obj-y := sch_generic.o
 obj-$(CONFIG_NET_SCHED)                += sch_api.o sch_fifo.o sch_blackhole.o
 obj-$(CONFIG_NET_CLS)          += cls_api.o
 obj-$(CONFIG_NET_CLS_ACT)      += act_api.o
-obj-$(CONFIG_NET_ACT_POLICE)   += police.o
-obj-$(CONFIG_NET_CLS_POLICE)   += police.o
-obj-$(CONFIG_NET_ACT_GACT)     += gact.o
-obj-$(CONFIG_NET_ACT_MIRRED)   += mirred.o
-obj-$(CONFIG_NET_ACT_IPT)      += ipt.o
-obj-$(CONFIG_NET_ACT_PEDIT)    += pedit.o
-obj-$(CONFIG_NET_ACT_SIMP)     += simple.o
+obj-$(CONFIG_NET_ACT_POLICE)   += act_police.o
+obj-$(CONFIG_NET_CLS_POLICE)   += act_police.o
+obj-$(CONFIG_NET_ACT_GACT)     += act_gact.o
+obj-$(CONFIG_NET_ACT_MIRRED)   += act_mirred.o
+obj-$(CONFIG_NET_ACT_IPT)      += act_ipt.o
+obj-$(CONFIG_NET_ACT_PEDIT)    += act_pedit.o
+obj-$(CONFIG_NET_ACT_SIMP)     += act_simple.o
 obj-$(CONFIG_NET_SCH_CBQ)      += sch_cbq.o
 obj-$(CONFIG_NET_SCH_HTB)      += sch_htb.o
 obj-$(CONFIG_NET_SCH_HPFQ)     += sch_hpfq.o
index 2ce1cb2aa2edbaef72c9a4dcab65c789dd211be8..792ce59940ecbeaadc806b97f13cb6a1b2a811a3 100644 (file)
@@ -165,7 +165,7 @@ int tcf_action_exec(struct sk_buff *skb, struct tc_action *act,
        while ((a = act) != NULL) {
 repeat:
                if (a->ops && a->ops->act) {
-                       ret = a->ops->act(&skb, a, res);
+                       ret = a->ops->act(skb, a, res);
                        if (TC_MUNGED & skb->tc_verd) {
                                /* copied already, allow trampling */
                                skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd);
@@ -290,7 +290,7 @@ struct tc_action *tcf_action_init_1(struct rtattr *rta, struct rtattr *est,
        if (a_o == NULL) {
 #ifdef CONFIG_KMOD
                rtnl_unlock();
-               request_module(act_name);
+               request_module("act_%s", act_name);
                rtnl_lock();
 
                a_o = tc_lookup_action_n(act_name);
similarity index 98%
rename from net/sched/gact.c
rename to net/sched/act_gact.c
index d1c6d542912a418a89fe47c67870aed328b029a1..a1e68f78dcc291359e297786b564d8b062fc2ffd 100644 (file)
@@ -135,10 +135,9 @@ tcf_gact_cleanup(struct tc_action *a, int bind)
 }
 
 static int
-tcf_gact(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res)
+tcf_gact(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res)
 {
        struct tcf_gact *p = PRIV(a, gact);
-       struct sk_buff *skb = *pskb;
        int action = TC_ACT_SHOT;
 
        spin_lock(&p->lock);
similarity index 96%
rename from net/sched/ipt.c
rename to net/sched/act_ipt.c
index f50136eed211a3e4b4a8936525e4a17b165f6c0c..b5001939b74b59822291de1b0f5759164da29f2b 100644 (file)
@@ -201,11 +201,10 @@ tcf_ipt_cleanup(struct tc_action *a, int bind)
 }
 
 static int
-tcf_ipt(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res)
+tcf_ipt(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res)
 {
        int ret = 0, result = 0;
        struct tcf_ipt *p = PRIV(a, ipt);
-       struct sk_buff *skb = *pskb;
 
        if (skb_cloned(skb)) {
                if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
@@ -222,6 +221,9 @@ tcf_ipt(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res)
         worry later - danger - this API seems to have changed
         from earlier kernels */
 
+       /* iptables targets take a double skb pointer in case the skb
+        * needs to be replaced. We don't own the skb, so this must not
+        * happen. The pskb_expand_head above should make sure of this */
        ret = p->t->u.kernel.target->target(&skb, skb->dev, NULL,
                                            p->hook, p->t->data, NULL);
        switch (ret) {
similarity index 98%
rename from net/sched/mirred.c
rename to net/sched/act_mirred.c
index 20d06916dc0b7a4ac576f4ef06b78dc41484963b..4fcccbd5088590054847c338cd8e2c23d0b8d90e 100644 (file)
@@ -158,12 +158,11 @@ tcf_mirred_cleanup(struct tc_action *a, int bind)
 }
 
 static int
-tcf_mirred(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res)
+tcf_mirred(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res)
 {
        struct tcf_mirred *p = PRIV(a, mirred);
        struct net_device *dev;
        struct sk_buff *skb2 = NULL;
-       struct sk_buff *skb = *pskb;
        u32 at = G_TC_AT(skb->tc_verd);
 
        spin_lock(&p->lock);
similarity index 98%
rename from net/sched/pedit.c
rename to net/sched/act_pedit.c
index 767d24f4610ec8e516ae0ec3847043e70fa2f353..1742a68e0122a134a9e4430c5e96a762a3f3061a 100644 (file)
@@ -130,10 +130,9 @@ tcf_pedit_cleanup(struct tc_action *a, int bind)
 }
 
 static int
-tcf_pedit(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res)
+tcf_pedit(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res)
 {
        struct tcf_pedit *p = PRIV(a, pedit);
-       struct sk_buff *skb = *pskb;
        int i, munged = 0;
        u8 *pptr;
 
@@ -246,10 +245,12 @@ tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a,int bind, int ref)
        t.lastuse = jiffies_to_clock_t(jiffies - p->tm.lastuse);
        t.expires = jiffies_to_clock_t(p->tm.expires);
        RTA_PUT(skb, TCA_PEDIT_TM, sizeof(t), &t);
+       kfree(opt);
        return skb->len;
 
 rtattr_failure:
        skb_trim(skb, b - skb->data);
+       kfree(opt);
        return -1;
 }
 
similarity index 97%
rename from net/sched/police.c
rename to net/sched/act_police.c
index eb39fb2f39b6da90c76a24698289212864dfb354..fa877f8f652cb223bf907ffc4b55d99d98ebb75d 100644 (file)
@@ -284,11 +284,10 @@ static int tcf_act_police_cleanup(struct tc_action *a, int bind)
        return 0;
 }
 
-static int tcf_act_police(struct sk_buff **pskb, struct tc_action *a,
+static int tcf_act_police(struct sk_buff *skb, struct tc_action *a,
                           struct tcf_result *res)
 {
        psched_time_t now;
-       struct sk_buff *skb = *pskb;
        struct tcf_police *p = PRIV(a);
        long toks;
        long ptoks = 0;
@@ -408,7 +407,7 @@ police_cleanup_module(void)
 module_init(police_init_module);
 module_exit(police_cleanup_module);
 
-#endif
+#else /* CONFIG_NET_CLS_ACT */
 
 struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est)
 {
@@ -545,6 +544,7 @@ int tcf_police(struct sk_buff *skb, struct tcf_police *p)
        spin_unlock(&p->lock);
        return p->action;
 }
+EXPORT_SYMBOL(tcf_police);
 
 int tcf_police_dump(struct sk_buff *skb, struct tcf_police *p)
 {
@@ -601,13 +601,4 @@ errout:
        return -1;
 }
 
-
-EXPORT_SYMBOL(tcf_police);
-EXPORT_SYMBOL(tcf_police_destroy);
-EXPORT_SYMBOL(tcf_police_dump);
-EXPORT_SYMBOL(tcf_police_dump_stats);
-EXPORT_SYMBOL(tcf_police_hash);
-EXPORT_SYMBOL(tcf_police_ht);
-EXPORT_SYMBOL(tcf_police_locate);
-EXPORT_SYMBOL(tcf_police_lookup);
-EXPORT_SYMBOL(tcf_police_new_index);
+#endif /* CONFIG_NET_CLS_ACT */
similarity index 94%
rename from net/sched/simple.c
rename to net/sched/act_simple.c
index 8a6ae4f491e872dd3b1f381ab29ef98b4656011c..e5f2e1f431e2a36d92ed5c8c4263b8fcefbd44fd 100644 (file)
@@ -44,9 +44,8 @@ static DEFINE_RWLOCK(simp_lock);
 #include <net/pkt_act.h>
 #include <net/act_generic.h>
 
-static int tcf_simp(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res)
+static int tcf_simp(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res)
 {
-       struct sk_buff *skb = *pskb;
        struct tcf_defact *p = PRIV(a, defact);
 
        spin_lock(&p->lock);
index 09453f997d8c3a0081e10d37066953060feafc94..6cd81708bf710e0c307807bcbffc35176be452a2 100644 (file)
@@ -257,7 +257,7 @@ cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
            (cl = cbq_class_lookup(q, prio)) != NULL)
                return cl;
 
-       *qerr = NET_XMIT_DROP;
+       *qerr = NET_XMIT_BYPASS;
        for (;;) {
                int result = 0;
                defmap = head->defaults;
@@ -413,7 +413,7 @@ cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
        q->rx_class = cl;
 #endif
        if (cl == NULL) {
-               if (ret == NET_XMIT_DROP)
+               if (ret == NET_XMIT_BYPASS)
                        sch->qstats.drops++;
                kfree_skb(skb);
                return ret;
index c26764bc410333a273445c3c0b965662d1bfe34f..91132f6871d76ee42fa4e9dc53fcf643b32b779d 100644 (file)
@@ -208,7 +208,7 @@ struct hfsc_sched
 do {                                                                   \
        struct timeval tv;                                              \
        do_gettimeofday(&tv);                                           \
-       (stamp) = 1000000ULL * tv.tv_sec + tv.tv_usec;                  \
+       (stamp) = 1ULL * USEC_PER_SEC * tv.tv_sec + tv.tv_usec;         \
 } while (0)
 #endif
 
@@ -502,8 +502,8 @@ d2dx(u32 d)
        u64 dx;
 
        dx = ((u64)d * PSCHED_JIFFIE2US(HZ));
-       dx += 1000000 - 1;
-       do_div(dx, 1000000);
+       dx += USEC_PER_SEC - 1;
+       do_div(dx, USEC_PER_SEC);
        return dx;
 }
 
@@ -523,7 +523,7 @@ dx2d(u64 dx)
 {
        u64 d;
 
-       d = dx * 1000000;
+       d = dx * USEC_PER_SEC;
        do_div(d, PSCHED_JIFFIE2US(HZ));
        return (u32)d;
 }
@@ -1227,7 +1227,7 @@ hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
                if (cl->level == 0)
                        return cl;
 
-       *qerr = NET_XMIT_DROP;
+       *qerr = NET_XMIT_BYPASS;
        tcf = q->root.filter_list;
        while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) {
 #ifdef CONFIG_NET_CLS_ACT
@@ -1643,7 +1643,7 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 
        cl = hfsc_classify(skb, sch, &err);
        if (cl == NULL) {
-               if (err == NET_XMIT_DROP)
+               if (err == NET_XMIT_BYPASS)
                        sch->qstats.drops++;
                kfree_skb(skb);
                return err;
index 558cc087e6023f687b616494a12768f6bebf7171..3ec95df4a85ed50c2548b69c591c33333e3edd63 100644 (file)
@@ -321,7 +321,7 @@ static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch, in
        if ((cl = htb_find(skb->priority,sch)) != NULL && cl->level == 0) 
                return cl;
 
-       *qerr = NET_XMIT_DROP;
+       *qerr = NET_XMIT_BYPASS;
        tcf = q->filter_list;
        while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) {
 #ifdef CONFIG_NET_CLS_ACT
@@ -724,7 +724,7 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
        }
 #ifdef CONFIG_NET_CLS_ACT
     } else if (!cl) {
-       if (ret == NET_XMIT_DROP)
+       if (ret == NET_XMIT_BYPASS)
                sch->qstats.drops++;
        kfree_skb (skb);
        return ret;
index 3ac0f495bad09e110285b913e023eff8bd1d8b2e..5b3a3e48ed92e64d8d45f05fc32e820a5f701024 100644 (file)
@@ -54,7 +54,7 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
        u32 band = skb->priority;
        struct tcf_result res;
 
-       *qerr = NET_XMIT_DROP;
+       *qerr = NET_XMIT_BYPASS;
        if (TC_H_MAJ(skb->priority) != sch->handle) {
 #ifdef CONFIG_NET_CLS_ACT
                switch (tc_classify(skb, q->filter_list, &res)) {
@@ -91,7 +91,8 @@ prio_enqueue(struct sk_buff *skb, struct Qdisc *sch)
        qdisc = prio_classify(skb, sch, &ret);
 #ifdef CONFIG_NET_CLS_ACT
        if (qdisc == NULL) {
-               if (ret == NET_XMIT_DROP)
+
+               if (ret == NET_XMIT_BYPASS)
                        sch->qstats.drops++;
                kfree_skb(skb);
                return ret;
@@ -118,7 +119,7 @@ prio_requeue(struct sk_buff *skb, struct Qdisc* sch)
        qdisc = prio_classify(skb, sch, &ret);
 #ifdef CONFIG_NET_CLS_ACT
        if (qdisc == NULL) {
-               if (ret == NET_XMIT_DROP)
+               if (ret == NET_XMIT_BYPASS)
                        sch->qstats.drops++;
                kfree_skb(skb);
                return ret;
index c4a2a8c4c339b38c75d4c67caf10fbcc6ac5d8ca..79b8ef34c6e4c9b14d5d877ba64f0a496701e316 100644 (file)
@@ -274,7 +274,7 @@ teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *de
 
 static int teql_master_xmit(struct sk_buff *skb, struct net_device *dev)
 {
-       struct teql_master *master = (void*)dev->priv;
+       struct teql_master *master = netdev_priv(dev);
        struct Qdisc *start, *q;
        int busy;
        int nores;
@@ -350,7 +350,7 @@ drop:
 static int teql_master_open(struct net_device *dev)
 {
        struct Qdisc * q;
-       struct teql_master *m = (void*)dev->priv;
+       struct teql_master *m = netdev_priv(dev);
        int mtu = 0xFFFE;
        unsigned flags = IFF_NOARP|IFF_MULTICAST;
 
@@ -397,13 +397,13 @@ static int teql_master_close(struct net_device *dev)
 
 static struct net_device_stats *teql_master_stats(struct net_device *dev)
 {
-       struct teql_master *m = (void*)dev->priv;
+       struct teql_master *m = netdev_priv(dev);
        return &m->stats;
 }
 
 static int teql_master_mtu(struct net_device *dev, int new_mtu)
 {
-       struct teql_master *m = (void*)dev->priv;
+       struct teql_master *m = netdev_priv(dev);
        struct Qdisc *q;
 
        if (new_mtu < 68)
@@ -423,7 +423,7 @@ static int teql_master_mtu(struct net_device *dev, int new_mtu)
 
 static __init void teql_master_setup(struct net_device *dev)
 {
-       struct teql_master *master = dev->priv;
+       struct teql_master *master = netdev_priv(dev);
        struct Qdisc_ops *ops = &master->qops;
 
        master->dev     = dev;
@@ -476,7 +476,7 @@ static int __init teql_init(void)
                        break;
                }
 
-               master = dev->priv;
+               master = netdev_priv(dev);
 
                strlcpy(master->qops.id, dev->name, IFNAMSIZ);
                err = register_qdisc(&master->qops);
index 2d7d8a5db2ac5c8c69c793ce1f368e9fb5a756e7..b8b38aba92b3aa4496e5f2e668a1ba6bfe70c6ab 100644 (file)
@@ -1250,8 +1250,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
                case SCTP_CMD_TIMER_START:
                        timer = &asoc->timers[cmd->obj.to];
                        timeout = asoc->timeouts[cmd->obj.to];
-                       if (!timeout)
-                               BUG();
+                       BUG_ON(!timeout);
 
                        timer->expires = jiffies + timeout;
                        sctp_association_hold(asoc);
index f509e99927675e173f251f44637f976489a0abf1..dcaa0c4453ff4b0a7eb532a5676bfe3d27349e5c 100644 (file)
@@ -575,12 +575,11 @@ cache_read(struct file *filp, char __user *buf, size_t count, loff_t *ppos)
        if (rp->q.list.next == &cd->queue) {
                spin_unlock(&queue_lock);
                up(&queue_io_sem);
-               if (rp->offset)
-                       BUG();
+               BUG_ON(rp->offset);
                return 0;
        }
        rq = container_of(rp->q.list.next, struct cache_request, q.list);
-       if (rq->q.reader) BUG();
+       BUG_ON(rq->q.reader);
        if (rp->offset == 0)
                rq->readers++;
        spin_unlock(&queue_lock);
index e4296c8b861eba85fead5bf1d839aa212e59ac7c..b19cc26fa9c24b9457c38d5bdabd37f2295e41c2 100644 (file)
@@ -122,8 +122,7 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size)
        rqstp->rq_argused = 0;
        rqstp->rq_resused = 0;
        arghi = 0;
-       if (pages > RPCSVC_MAXPAGES)
-               BUG();
+       BUG_ON(pages > RPCSVC_MAXPAGES);
        while (pages) {
                struct page *p = alloc_page(GFP_KERNEL);
                if (!p)
index 2f4531fcaca23d43e8b49702b84dd5288acedf1e..6ed3302312fb56f0ebb2784b9990df6dca740865 100644 (file)
@@ -540,8 +540,7 @@ void skb_icv_walk(const struct sk_buff *skb, struct crypto_tfm *tfm,
                        start = end;
                }
        }
-       if (len)
-               BUG();
+       BUG_ON(len);
 }
 EXPORT_SYMBOL_GPL(skb_icv_walk);
 
@@ -610,8 +609,7 @@ skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len)
                        start = end;
                }
        }
-       if (len)
-               BUG();
+       BUG_ON(len);
        return elt;
 }
 EXPORT_SYMBOL_GPL(skb_to_sgvec);
index 59614a994b4e51c7384200134e08bba86190e82d..077bbf9fb9b7605f08af1de583141bbea0429be0 100644 (file)
@@ -248,11 +248,9 @@ EXPORT_SYMBOL(xfrm_policy_alloc);
 
 void __xfrm_policy_destroy(struct xfrm_policy *policy)
 {
-       if (!policy->dead)
-               BUG();
+       BUG_ON(!policy->dead);
 
-       if (policy->bundles)
-               BUG();
+       BUG_ON(policy->bundles);
 
        if (del_timer(&policy->timer))
                BUG();