aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/kernel-parameters.txt2
-rw-r--r--arch/arm/Kconfig20
-rw-r--r--arch/arm/Makefile2
-rw-r--r--arch/arm/boot/compressed/Makefile8
-rw-r--r--arch/arm/boot/compressed/head-at91rm9200.S57
-rw-r--r--arch/arm/boot/compressed/head-epxa10db.S5
-rw-r--r--arch/arm/configs/assabet_defconfig1
-rw-r--r--arch/arm/configs/badge4_defconfig1
-rw-r--r--arch/arm/configs/bast_defconfig1
-rw-r--r--arch/arm/configs/cerfcube_defconfig1
-rw-r--r--arch/arm/configs/clps7500_defconfig1
-rw-r--r--arch/arm/configs/collie_defconfig1
-rw-r--r--arch/arm/configs/corgi_defconfig1
-rw-r--r--arch/arm/configs/ebsa110_defconfig1
-rw-r--r--arch/arm/configs/edb7211_defconfig1
-rw-r--r--arch/arm/configs/enp2611_defconfig1
-rw-r--r--arch/arm/configs/ep80219_defconfig1
-rw-r--r--arch/arm/configs/epxa10db_defconfig644
-rw-r--r--arch/arm/configs/footbridge_defconfig1
-rw-r--r--arch/arm/configs/fortunet_defconfig1
-rw-r--r--arch/arm/configs/h3600_defconfig1
-rw-r--r--arch/arm/configs/h7201_defconfig1
-rw-r--r--arch/arm/configs/h7202_defconfig1
-rw-r--r--arch/arm/configs/hackkit_defconfig1
-rw-r--r--arch/arm/configs/integrator_defconfig1
-rw-r--r--arch/arm/configs/iq31244_defconfig1
-rw-r--r--arch/arm/configs/iq80321_defconfig1
-rw-r--r--arch/arm/configs/iq80331_defconfig1
-rw-r--r--arch/arm/configs/iq80332_defconfig1
-rw-r--r--arch/arm/configs/ixdp2400_defconfig1
-rw-r--r--arch/arm/configs/ixdp2401_defconfig1
-rw-r--r--arch/arm/configs/ixdp2800_defconfig1
-rw-r--r--arch/arm/configs/ixdp2801_defconfig1
-rw-r--r--arch/arm/configs/ixp4xx_defconfig1
-rw-r--r--arch/arm/configs/jornada720_defconfig1
-rw-r--r--arch/arm/configs/lart_defconfig1
-rw-r--r--arch/arm/configs/lpd7a400_defconfig1
-rw-r--r--arch/arm/configs/lpd7a404_defconfig1
-rw-r--r--arch/arm/configs/lubbock_defconfig1
-rw-r--r--arch/arm/configs/lusl7200_defconfig1
-rw-r--r--arch/arm/configs/mainstone_defconfig1
-rw-r--r--arch/arm/configs/mx1ads_defconfig1
-rw-r--r--arch/arm/configs/neponset_defconfig1
-rw-r--r--arch/arm/configs/netwinder_defconfig1
-rw-r--r--arch/arm/configs/omap_h2_1610_defconfig1
-rw-r--r--arch/arm/configs/pleb_defconfig1
-rw-r--r--arch/arm/configs/pxa255-idp_defconfig1
-rw-r--r--arch/arm/configs/realview_defconfig1
-rw-r--r--arch/arm/configs/rpc_defconfig1
-rw-r--r--arch/arm/configs/s3c2410_defconfig1
-rw-r--r--arch/arm/configs/shannon_defconfig1
-rw-r--r--arch/arm/configs/shark_defconfig1
-rw-r--r--arch/arm/configs/simpad_defconfig1
-rw-r--r--arch/arm/configs/smdk2410_defconfig1
-rw-r--r--arch/arm/configs/spitz_defconfig1
-rw-r--r--arch/arm/configs/versatile_defconfig1
-rw-r--r--arch/arm/kernel/irq.c3
-rw-r--r--arch/arm/mach-at91rm9200/Kconfig54
-rw-r--r--arch/arm/mach-at91rm9200/Makefile27
-rw-r--r--arch/arm/mach-at91rm9200/Makefile.boot9
-rw-r--r--arch/arm/mach-at91rm9200/clock.c620
-rw-r--r--arch/arm/mach-at91rm9200/common.c115
-rw-r--r--arch/arm/mach-at91rm9200/devices.c291
-rw-r--r--arch/arm/mach-at91rm9200/generic.h18
-rw-r--r--arch/arm/mach-at91rm9200/gpio.c302
-rw-r--r--arch/arm/mach-at91rm9200/irq.c170
-rw-r--r--arch/arm/mach-at91rm9200/time.c127
-rw-r--r--arch/arm/mach-epxa10db/Kconfig23
-rw-r--r--arch/arm/mach-epxa10db/Makefile11
-rw-r--r--arch/arm/mach-epxa10db/Makefile.boot2
-rw-r--r--arch/arm/mach-epxa10db/arch.c74
-rw-r--r--arch/arm/mach-epxa10db/irq.c82
-rw-r--r--arch/arm/mach-epxa10db/mm.c71
-rw-r--r--arch/arm/mach-epxa10db/time.c78
-rw-r--r--arch/arm/mach-s3c2410/clock.c206
-rw-r--r--arch/arm/mm/Kconfig8
-rw-r--r--arch/arm/mm/ioremap.c49
-rw-r--r--arch/arm/tools/mach-types30
-rw-r--r--arch/i386/crypto/aes-i586-asm.S40
-rw-r--r--arch/i386/crypto/aes.c56
-rw-r--r--arch/sparc64/defconfig2064
-rw-r--r--arch/sparc64/kernel/entry.S7
-rw-r--r--arch/sparc64/kernel/power.c4
-rw-r--r--arch/x86_64/crypto/aes.c25
-rw-r--r--crypto/Kconfig2
-rw-r--r--crypto/aes.c63
-rw-r--r--crypto/anubis.c39
-rw-r--r--crypto/api.c54
-rw-r--r--crypto/blowfish.c3
-rw-r--r--crypto/cast5.c47
-rw-r--r--crypto/cast6.c83
-rw-r--r--crypto/cipher.c5
-rw-r--r--crypto/crc32c.c1
-rw-r--r--crypto/des.c3
-rw-r--r--crypto/internal.h6
-rw-r--r--crypto/khazad.c46
-rw-r--r--crypto/md4.c1
-rw-r--r--crypto/md5.c1
-rw-r--r--crypto/michael_mic.c40
-rw-r--r--crypto/proc.c6
-rw-r--r--crypto/serpent.c2
-rw-r--r--crypto/sha1.c66
-rw-r--r--crypto/sha256.c31
-rw-r--r--crypto/sha512.c54
-rw-r--r--crypto/tea.c98
-rw-r--r--crypto/tgr192.c64
-rw-r--r--crypto/twofish.c13
-rw-r--r--crypto/wp512.c32
-rw-r--r--drivers/amba/bus.c1
-rw-r--r--drivers/crypto/padlock-aes.c26
-rw-r--r--drivers/crypto/padlock.h2
-rw-r--r--drivers/input/serio/sa1111ps2.c1
-rw-r--r--drivers/mmc/mmc.c1
-rw-r--r--drivers/mmc/mmc_block.c8
-rw-r--r--drivers/mmc/wbsd.c533
-rw-r--r--drivers/mtd/maps/Kconfig8
-rw-r--r--drivers/mtd/maps/Makefile1
-rw-r--r--drivers/mtd/maps/epxa10db-flash.c179
-rw-r--r--drivers/net/Kconfig13
-rw-r--r--drivers/net/Makefile1
-rw-r--r--drivers/net/arm/Kconfig13
-rw-r--r--drivers/net/arm/Makefile1
-rw-r--r--drivers/net/arm/am79c961a.c12
-rw-r--r--drivers/net/arm/ether00.c1017
-rw-r--r--drivers/net/arm/ether3.c1
-rw-r--r--drivers/net/arm/etherh.c1
-rw-r--r--drivers/net/hamradio/mkiss.c2
-rw-r--r--drivers/net/ifb.c294
-rw-r--r--drivers/scsi/arm/acornscsi.c1
-rw-r--r--drivers/scsi/arm/arxescsi.c1
-rw-r--r--drivers/scsi/arm/cumana_1.c1
-rw-r--r--drivers/scsi/arm/cumana_2.c1
-rw-r--r--drivers/scsi/arm/eesox.c1
-rw-r--r--drivers/scsi/arm/powertec.c1
-rw-r--r--drivers/serial/8250.c28
-rw-r--r--drivers/serial/Kconfig33
-rw-r--r--drivers/serial/Makefile1
-rw-r--r--drivers/serial/serial_core.c1
-rw-r--r--drivers/serial/uart00.c782
-rw-r--r--drivers/video/cyber2000fb.c1
-rw-r--r--drivers/video/sa1100fb.c15
-rw-r--r--fs/partitions/Kconfig20
-rw-r--r--include/asm-arm/arch-at91rm9200/at91rm9200.h261
-rw-r--r--include/asm-arm/arch-at91rm9200/at91rm9200_sys.h328
-rw-r--r--include/asm-arm/arch-at91rm9200/board.h80
-rw-r--r--include/asm-arm/arch-at91rm9200/debug-macro.S38
-rw-r--r--include/asm-arm/arch-at91rm9200/dma.h (renamed from include/asm-arm/arch-epxa10db/param.h)4
-rw-r--r--include/asm-arm/arch-at91rm9200/entry-macro.S25
-rw-r--r--include/asm-arm/arch-at91rm9200/gpio.h193
-rw-r--r--include/asm-arm/arch-at91rm9200/hardware.h92
-rw-r--r--include/asm-arm/arch-at91rm9200/io.h33
-rw-r--r--include/asm-arm/arch-at91rm9200/irqs.h52
-rw-r--r--include/asm-arm/arch-at91rm9200/memory.h (renamed from include/asm-arm/arch-epxa10db/memory.h)19
-rw-r--r--include/asm-arm/arch-at91rm9200/param.h (renamed from include/asm-arm/arch-epxa10db/vmalloc.h)14
-rw-r--r--include/asm-arm/arch-at91rm9200/pio.h115
-rw-r--r--include/asm-arm/arch-at91rm9200/system.h (renamed from include/asm-arm/arch-epxa10db/system.h)28
-rw-r--r--include/asm-arm/arch-at91rm9200/timex.h (renamed from include/asm-arm/arch-epxa10db/dma.h)13
-rw-r--r--include/asm-arm/arch-at91rm9200/uncompress.h55
-rw-r--r--include/asm-arm/arch-at91rm9200/vmalloc.h (renamed from include/asm-arm/arch-epxa10db/timex.h)16
-rw-r--r--include/asm-arm/arch-epxa10db/debug-macro.S41
-rw-r--r--include/asm-arm/arch-epxa10db/entry-macro.S25
-rw-r--r--include/asm-arm/arch-epxa10db/ether00.h482
-rw-r--r--include/asm-arm/arch-epxa10db/excalibur.h91
-rw-r--r--include/asm-arm/arch-epxa10db/hardware.h64
-rw-r--r--include/asm-arm/arch-epxa10db/int_ctrl00.h288
-rw-r--r--include/asm-arm/arch-epxa10db/io.h41
-rw-r--r--include/asm-arm/arch-epxa10db/irqs.h45
-rw-r--r--include/asm-arm/arch-epxa10db/mode_ctrl00.h80
-rw-r--r--include/asm-arm/arch-epxa10db/platform.h7
-rw-r--r--include/asm-arm/arch-epxa10db/pld_conf00.h73
-rw-r--r--include/asm-arm/arch-epxa10db/tdkphy.h209
-rw-r--r--include/asm-arm/arch-epxa10db/timer00.h98
-rw-r--r--include/asm-arm/arch-epxa10db/uart00.h181
-rw-r--r--include/asm-arm/arch-epxa10db/uncompress.h54
-rw-r--r--include/asm-arm/io.h6
-rw-r--r--include/asm-arm/mach/map.h3
-rw-r--r--include/asm-arm/memory.h6
-rw-r--r--include/linux/crypto.h5
-rw-r--r--include/linux/mmc/mmc.h6
-rw-r--r--include/net/act_api.h2
-rw-r--r--include/net/pkt_sched.h23
-rw-r--r--kernel/rcupdate.c11
-rw-r--r--net/core/dev.c9
-rw-r--r--net/core/skbuff.c15
-rw-r--r--net/ipv4/icmp.c3
-rw-r--r--net/ipv4/inet_diag.c243
-rw-r--r--net/ipv4/inetpeer.c6
-rw-r--r--net/ipv4/ip_gre.c33
-rw-r--r--net/ipv4/ip_output.c1
-rw-r--r--net/ipv4/ipip.c18
-rw-r--r--net/ipv4/ipmr.c22
-rw-r--r--net/ipv4/tcp_input.c2
-rw-r--r--net/ipv6/ip6_output.c4
-rw-r--r--net/ipv6/ip6_tunnel.c24
-rw-r--r--net/ipv6/sit.c20
-rw-r--r--net/key/af_key.c3
-rw-r--r--net/sched/Makefile14
-rw-r--r--net/sched/act_api.c4
-rw-r--r--net/sched/act_gact.c (renamed from net/sched/gact.c)3
-rw-r--r--net/sched/act_ipt.c (renamed from net/sched/ipt.c)6
-rw-r--r--net/sched/act_mirred.c (renamed from net/sched/mirred.c)3
-rw-r--r--net/sched/act_pedit.c (renamed from net/sched/pedit.c)5
-rw-r--r--net/sched/act_police.c (renamed from net/sched/police.c)17
-rw-r--r--net/sched/act_simple.c (renamed from net/sched/simple.c)3
-rw-r--r--net/sched/sch_cbq.c4
-rw-r--r--net/sched/sch_hfsc.c12
-rw-r--r--net/sched/sch_htb.c4
-rw-r--r--net/sched/sch_prio.c7
-rw-r--r--net/sched/sch_teql.c12
-rw-r--r--net/sctp/sm_sideeffect.c3
-rw-r--r--net/sunrpc/cache.c5
-rw-r--r--net/sunrpc/svc.c3
-rw-r--r--net/xfrm/xfrm_algo.c6
-rw-r--r--net/xfrm/xfrm_policy.c6
214 files changed, 5417 insertions, 7425 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index acb010bb087b..0dc848bf0b56 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -998,6 +998,8 @@ running once the system is up.
998 998
999 nowb [ARM] 999 nowb [ARM]
1000 1000
1001 nr_uarts= [SERIAL] maximum number of UARTs to be registered.
1002
1001 opl3= [HW,OSS] 1003 opl3= [HW,OSS]
1002 Format: <io> 1004 Format: <io>
1003 1005
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 7a74e3e5f916..50b9afa8ae6d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -99,13 +99,6 @@ config ARCH_EBSA110
99 Ethernet interface, two PCMCIA sockets, two serial ports and a 99 Ethernet interface, two PCMCIA sockets, two serial ports and a
100 parallel port. 100 parallel port.
101 101
102config ARCH_CAMELOT
103 bool "Epxa10db"
104 help
105 This enables support for Altera's Excalibur XA10 development board.
106 If you would like to build your kernel to run on one of these boards
107 then you must say 'Y' here. Otherwise say 'N'
108
109config ARCH_FOOTBRIDGE 102config ARCH_FOOTBRIDGE
110 bool "FootBridge" 103 bool "FootBridge"
111 select FOOTBRIDGE 104 select FOOTBRIDGE
@@ -213,12 +206,16 @@ config ARCH_AAEC2000
213 help 206 help
214 This enables support for systems based on the Agilent AAEC-2000 207 This enables support for systems based on the Agilent AAEC-2000
215 208
209config ARCH_AT91RM9200
210 bool "AT91RM9200"
211 help
212 Say Y here if you intend to run this kernel on an AT91RM9200-based
213 board.
214
216endchoice 215endchoice
217 216
218source "arch/arm/mach-clps711x/Kconfig" 217source "arch/arm/mach-clps711x/Kconfig"
219 218
220source "arch/arm/mach-epxa10db/Kconfig"
221
222source "arch/arm/mach-footbridge/Kconfig" 219source "arch/arm/mach-footbridge/Kconfig"
223 220
224source "arch/arm/mach-integrator/Kconfig" 221source "arch/arm/mach-integrator/Kconfig"
@@ -253,6 +250,8 @@ source "arch/arm/mach-aaec2000/Kconfig"
253 250
254source "arch/arm/mach-realview/Kconfig" 251source "arch/arm/mach-realview/Kconfig"
255 252
253source "arch/arm/mach-at91rm9200/Kconfig"
254
256# Definitions to make life easier 255# Definitions to make life easier
257config ARCH_ACORN 256config ARCH_ACORN
258 bool 257 bool
@@ -418,7 +417,8 @@ config LEDS
418 ARCH_EBSA285 || ARCH_IMX || ARCH_INTEGRATOR || \ 417 ARCH_EBSA285 || ARCH_IMX || ARCH_INTEGRATOR || \
419 ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \ 418 ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \
420 ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \ 419 ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \
421 ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE 420 ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \
421 ARCH_AT91RM9200
422 help 422 help
423 If you say Y here, the LEDs on your machine will be used 423 If you say Y here, the LEDs on your machine will be used
424 to provide useful information about your current system status. 424 to provide useful information about your current system status.
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index afaf3a1e903c..1fa2a1011584 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -84,7 +84,6 @@ endif
84 machine-$(CONFIG_ARCH_PXA) := pxa 84 machine-$(CONFIG_ARCH_PXA) := pxa
85 machine-$(CONFIG_ARCH_L7200) := l7200 85 machine-$(CONFIG_ARCH_L7200) := l7200
86 machine-$(CONFIG_ARCH_INTEGRATOR) := integrator 86 machine-$(CONFIG_ARCH_INTEGRATOR) := integrator
87 machine-$(CONFIG_ARCH_CAMELOT) := epxa10db
88 textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000 87 textofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000
89 machine-$(CONFIG_ARCH_CLPS711X) := clps711x 88 machine-$(CONFIG_ARCH_CLPS711X) := clps711x
90 machine-$(CONFIG_ARCH_IOP3XX) := iop3xx 89 machine-$(CONFIG_ARCH_IOP3XX) := iop3xx
@@ -100,6 +99,7 @@ endif
100 machine-$(CONFIG_ARCH_H720X) := h720x 99 machine-$(CONFIG_ARCH_H720X) := h720x
101 machine-$(CONFIG_ARCH_AAEC2000) := aaec2000 100 machine-$(CONFIG_ARCH_AAEC2000) := aaec2000
102 machine-$(CONFIG_ARCH_REALVIEW) := realview 101 machine-$(CONFIG_ARCH_REALVIEW) := realview
102 machine-$(CONFIG_ARCH_AT91RM9200) := at91rm9200
103 103
104ifeq ($(CONFIG_ARCH_EBSA110),y) 104ifeq ($(CONFIG_ARCH_EBSA110),y)
105# This is what happens if you forget the IOCS16 line. 105# This is what happens if you forget the IOCS16 line.
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 6b505ce41a75..35ffe0f4ece7 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -21,10 +21,6 @@ ifeq ($(CONFIG_ARCH_SHARK),y)
21OBJS += head-shark.o ofw-shark.o 21OBJS += head-shark.o ofw-shark.o
22endif 22endif
23 23
24ifeq ($(CONFIG_ARCH_CAMELOT),y)
25OBJS += head-epxa10db.o
26endif
27
28ifeq ($(CONFIG_ARCH_L7200),y) 24ifeq ($(CONFIG_ARCH_L7200),y)
29OBJS += head-l7200.o 25OBJS += head-l7200.o
30endif 26endif
@@ -50,6 +46,10 @@ ifeq ($(CONFIG_PXA_SHARPSL),y)
50OBJS += head-sharpsl.o 46OBJS += head-sharpsl.o
51endif 47endif
52 48
49ifeq ($(CONFIG_ARCH_AT91RM9200),y)
50OBJS += head-at91rm9200.o
51endif
52
53ifeq ($(CONFIG_DEBUG_ICEDCC),y) 53ifeq ($(CONFIG_DEBUG_ICEDCC),y)
54OBJS += ice-dcc.o 54OBJS += ice-dcc.o
55endif 55endif
diff --git a/arch/arm/boot/compressed/head-at91rm9200.S b/arch/arm/boot/compressed/head-at91rm9200.S
new file mode 100644
index 000000000000..2119ea62b547
--- /dev/null
+++ b/arch/arm/boot/compressed/head-at91rm9200.S
@@ -0,0 +1,57 @@
1/*
2 * linux/arch/arm/boot/compressed/head-at91rm9200.S
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 */
12#include <asm/mach-types.h>
13
14 .section ".start", "ax"
15
16 @ Atmel AT91RM9200-DK : 262
17 mov r3, #(MACH_TYPE_AT91RM9200DK & 0xff)
18 orr r3, r3, #(MACH_TYPE_AT91RM9200DK & 0xff00)
19 cmp r7, r3
20 beq 99f
21
22 @ Cogent CSB337 : 399
23 mov r3, #(MACH_TYPE_CSB337 & 0xff)
24 orr r3, r3, #(MACH_TYPE_CSB337 & 0xff00)
25 cmp r7, r3
26 beq 99f
27
28 @ Cogent CSB637 : 648
29 mov r3, #(MACH_TYPE_CSB637 & 0xff)
30 orr r3, r3, #(MACH_TYPE_CSB637 & 0xff00)
31 cmp r7, r3
32 beq 99f
33
34 @ Atmel AT91RM9200-EK : 705
35 mov r3, #(MACH_TYPE_AT91RM9200EK & 0xff)
36 orr r3, r3, #(MACH_TYPE_AT91RM9200EK & 0xff00)
37 cmp r7, r3
38 beq 99f
39
40 @ Conitec Carmeva : 769
41 mov r3, #(MACH_TYPE_CARMEVA & 0xff)
42 orr r3, r3, #(MACH_TYPE_CARMEVA & 0xff00)
43 cmp r7, r3
44 beq 99f
45
46 @ KwikByte KB920x : 612
47 mov r3, #(MACH_TYPE_KB9200 & 0xff)
48 orr r3, r3, #(MACH_TYPE_KB9200 & 0xff00)
49 cmp r7, r3
50 beq 99f
51
52 @ Unknown board, use the AT91RM9200DK board
53 @ mov r7, #MACH_TYPE_AT91RM9200
54 mov r7, #(MACH_TYPE_AT91RM9200DK & 0xff)
55 orr r7, r7, #(MACH_TYPE_AT91RM9200DK & 0xff00)
56
5799:
diff --git a/arch/arm/boot/compressed/head-epxa10db.S b/arch/arm/boot/compressed/head-epxa10db.S
deleted file mode 100644
index 757681f12a39..000000000000
--- a/arch/arm/boot/compressed/head-epxa10db.S
+++ /dev/null
@@ -1,5 +0,0 @@
1#include <asm/mach-types.h>
2#include <asm/arch/excalibur.h>
3
4 .section ".start", "ax"
5 mov r7, #MACH_TYPE_CAMELOT
diff --git a/arch/arm/configs/assabet_defconfig b/arch/arm/configs/assabet_defconfig
index ccbb4c0d58c4..089c9d598409 100644
--- a/arch/arm/configs/assabet_defconfig
+++ b/arch/arm/configs/assabet_defconfig
@@ -63,7 +63,6 @@ CONFIG_OBSOLETE_MODPARM=y
63# CONFIG_ARCH_CLPS711X is not set 63# CONFIG_ARCH_CLPS711X is not set
64# CONFIG_ARCH_CO285 is not set 64# CONFIG_ARCH_CO285 is not set
65# CONFIG_ARCH_EBSA110 is not set 65# CONFIG_ARCH_EBSA110 is not set
66# CONFIG_ARCH_CAMELOT is not set
67# CONFIG_ARCH_FOOTBRIDGE is not set 66# CONFIG_ARCH_FOOTBRIDGE is not set
68# CONFIG_ARCH_INTEGRATOR is not set 67# CONFIG_ARCH_INTEGRATOR is not set
69# CONFIG_ARCH_IOP3XX is not set 68# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/badge4_defconfig b/arch/arm/configs/badge4_defconfig
index 5d92af975d87..cfe6bd8e81cd 100644
--- a/arch/arm/configs/badge4_defconfig
+++ b/arch/arm/configs/badge4_defconfig
@@ -66,7 +66,6 @@ CONFIG_KMOD=y
66# CONFIG_ARCH_CLPS711X is not set 66# CONFIG_ARCH_CLPS711X is not set
67# CONFIG_ARCH_CO285 is not set 67# CONFIG_ARCH_CO285 is not set
68# CONFIG_ARCH_EBSA110 is not set 68# CONFIG_ARCH_EBSA110 is not set
69# CONFIG_ARCH_CAMELOT is not set
70# CONFIG_ARCH_FOOTBRIDGE is not set 69# CONFIG_ARCH_FOOTBRIDGE is not set
71# CONFIG_ARCH_INTEGRATOR is not set 70# CONFIG_ARCH_INTEGRATOR is not set
72# CONFIG_ARCH_IOP3XX is not set 71# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/bast_defconfig b/arch/arm/configs/bast_defconfig
index 35e3a99bcbb6..6886001b5366 100644
--- a/arch/arm/configs/bast_defconfig
+++ b/arch/arm/configs/bast_defconfig
@@ -64,7 +64,6 @@ CONFIG_KMOD=y
64# CONFIG_ARCH_CLPS711X is not set 64# CONFIG_ARCH_CLPS711X is not set
65# CONFIG_ARCH_CO285 is not set 65# CONFIG_ARCH_CO285 is not set
66# CONFIG_ARCH_EBSA110 is not set 66# CONFIG_ARCH_EBSA110 is not set
67# CONFIG_ARCH_CAMELOT is not set
68# CONFIG_ARCH_FOOTBRIDGE is not set 67# CONFIG_ARCH_FOOTBRIDGE is not set
69# CONFIG_ARCH_INTEGRATOR is not set 68# CONFIG_ARCH_INTEGRATOR is not set
70# CONFIG_ARCH_IOP3XX is not set 69# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/cerfcube_defconfig b/arch/arm/configs/cerfcube_defconfig
index d8fe0f40408f..f81a60005cd3 100644
--- a/arch/arm/configs/cerfcube_defconfig
+++ b/arch/arm/configs/cerfcube_defconfig
@@ -65,7 +65,6 @@ CONFIG_KMOD=y
65# CONFIG_ARCH_CLPS711X is not set 65# CONFIG_ARCH_CLPS711X is not set
66# CONFIG_ARCH_CO285 is not set 66# CONFIG_ARCH_CO285 is not set
67# CONFIG_ARCH_EBSA110 is not set 67# CONFIG_ARCH_EBSA110 is not set
68# CONFIG_ARCH_CAMELOT is not set
69# CONFIG_ARCH_FOOTBRIDGE is not set 68# CONFIG_ARCH_FOOTBRIDGE is not set
70# CONFIG_ARCH_INTEGRATOR is not set 69# CONFIG_ARCH_INTEGRATOR is not set
71# CONFIG_ARCH_IOP3XX is not set 70# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/clps7500_defconfig b/arch/arm/configs/clps7500_defconfig
index 908758371405..af9ae5389131 100644
--- a/arch/arm/configs/clps7500_defconfig
+++ b/arch/arm/configs/clps7500_defconfig
@@ -57,7 +57,6 @@ CONFIG_ARCH_CLPS7500=y
57# CONFIG_ARCH_CLPS711X is not set 57# CONFIG_ARCH_CLPS711X is not set
58# CONFIG_ARCH_CO285 is not set 58# CONFIG_ARCH_CO285 is not set
59# CONFIG_ARCH_EBSA110 is not set 59# CONFIG_ARCH_EBSA110 is not set
60# CONFIG_ARCH_CAMELOT is not set
61# CONFIG_ARCH_FOOTBRIDGE is not set 60# CONFIG_ARCH_FOOTBRIDGE is not set
62# CONFIG_ARCH_INTEGRATOR is not set 61# CONFIG_ARCH_INTEGRATOR is not set
63# CONFIG_ARCH_IOP3XX is not set 62# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/collie_defconfig b/arch/arm/configs/collie_defconfig
index 40dfe07a8bce..15468a0cf70e 100644
--- a/arch/arm/configs/collie_defconfig
+++ b/arch/arm/configs/collie_defconfig
@@ -71,7 +71,6 @@ CONFIG_KMOD=y
71# CONFIG_ARCH_CLPS711X is not set 71# CONFIG_ARCH_CLPS711X is not set
72# CONFIG_ARCH_CO285 is not set 72# CONFIG_ARCH_CO285 is not set
73# CONFIG_ARCH_EBSA110 is not set 73# CONFIG_ARCH_EBSA110 is not set
74# CONFIG_ARCH_CAMELOT is not set
75# CONFIG_ARCH_FOOTBRIDGE is not set 74# CONFIG_ARCH_FOOTBRIDGE is not set
76# CONFIG_ARCH_INTEGRATOR is not set 75# CONFIG_ARCH_INTEGRATOR is not set
77# CONFIG_ARCH_IOP3XX is not set 76# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/corgi_defconfig b/arch/arm/configs/corgi_defconfig
index 06229026f78b..3c3461e83398 100644
--- a/arch/arm/configs/corgi_defconfig
+++ b/arch/arm/configs/corgi_defconfig
@@ -87,7 +87,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
87# CONFIG_ARCH_CLPS711X is not set 87# CONFIG_ARCH_CLPS711X is not set
88# CONFIG_ARCH_CO285 is not set 88# CONFIG_ARCH_CO285 is not set
89# CONFIG_ARCH_EBSA110 is not set 89# CONFIG_ARCH_EBSA110 is not set
90# CONFIG_ARCH_CAMELOT is not set
91# CONFIG_ARCH_FOOTBRIDGE is not set 90# CONFIG_ARCH_FOOTBRIDGE is not set
92# CONFIG_ARCH_INTEGRATOR is not set 91# CONFIG_ARCH_INTEGRATOR is not set
93# CONFIG_ARCH_IOP3XX is not set 92# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/ebsa110_defconfig b/arch/arm/configs/ebsa110_defconfig
index 6f61929b97a8..afcfff6140f2 100644
--- a/arch/arm/configs/ebsa110_defconfig
+++ b/arch/arm/configs/ebsa110_defconfig
@@ -63,7 +63,6 @@ CONFIG_KMOD=y
63# CONFIG_ARCH_CLPS711X is not set 63# CONFIG_ARCH_CLPS711X is not set
64# CONFIG_ARCH_CO285 is not set 64# CONFIG_ARCH_CO285 is not set
65CONFIG_ARCH_EBSA110=y 65CONFIG_ARCH_EBSA110=y
66# CONFIG_ARCH_CAMELOT is not set
67# CONFIG_ARCH_FOOTBRIDGE is not set 66# CONFIG_ARCH_FOOTBRIDGE is not set
68# CONFIG_ARCH_INTEGRATOR is not set 67# CONFIG_ARCH_INTEGRATOR is not set
69# CONFIG_ARCH_IOP3XX is not set 68# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/edb7211_defconfig b/arch/arm/configs/edb7211_defconfig
index 78b08ed4d5f4..6ba7355ff85b 100644
--- a/arch/arm/configs/edb7211_defconfig
+++ b/arch/arm/configs/edb7211_defconfig
@@ -57,7 +57,6 @@ CONFIG_BASE_SMALL=0
57CONFIG_ARCH_CLPS711X=y 57CONFIG_ARCH_CLPS711X=y
58# CONFIG_ARCH_CO285 is not set 58# CONFIG_ARCH_CO285 is not set
59# CONFIG_ARCH_EBSA110 is not set 59# CONFIG_ARCH_EBSA110 is not set
60# CONFIG_ARCH_CAMELOT is not set
61# CONFIG_ARCH_FOOTBRIDGE is not set 60# CONFIG_ARCH_FOOTBRIDGE is not set
62# CONFIG_ARCH_INTEGRATOR is not set 61# CONFIG_ARCH_INTEGRATOR is not set
63# CONFIG_ARCH_IOP3XX is not set 62# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/enp2611_defconfig b/arch/arm/configs/enp2611_defconfig
index fd7c0042bcca..9592e3925c79 100644
--- a/arch/arm/configs/enp2611_defconfig
+++ b/arch/arm/configs/enp2611_defconfig
@@ -86,7 +86,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
86# CONFIG_ARCH_CLPS711X is not set 86# CONFIG_ARCH_CLPS711X is not set
87# CONFIG_ARCH_CO285 is not set 87# CONFIG_ARCH_CO285 is not set
88# CONFIG_ARCH_EBSA110 is not set 88# CONFIG_ARCH_EBSA110 is not set
89# CONFIG_ARCH_CAMELOT is not set
90# CONFIG_ARCH_FOOTBRIDGE is not set 89# CONFIG_ARCH_FOOTBRIDGE is not set
91# CONFIG_ARCH_INTEGRATOR is not set 90# CONFIG_ARCH_INTEGRATOR is not set
92# CONFIG_ARCH_IOP3XX is not set 91# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/ep80219_defconfig b/arch/arm/configs/ep80219_defconfig
index 96342afa9c5f..fbe312e757cb 100644
--- a/arch/arm/configs/ep80219_defconfig
+++ b/arch/arm/configs/ep80219_defconfig
@@ -64,7 +64,6 @@ CONFIG_KMOD=y
64# CONFIG_ARCH_CLPS711X is not set 64# CONFIG_ARCH_CLPS711X is not set
65# CONFIG_ARCH_CO285 is not set 65# CONFIG_ARCH_CO285 is not set
66# CONFIG_ARCH_EBSA110 is not set 66# CONFIG_ARCH_EBSA110 is not set
67# CONFIG_ARCH_CAMELOT is not set
68# CONFIG_ARCH_FOOTBRIDGE is not set 67# CONFIG_ARCH_FOOTBRIDGE is not set
69# CONFIG_ARCH_INTEGRATOR is not set 68# CONFIG_ARCH_INTEGRATOR is not set
70CONFIG_ARCH_IOP3XX=y 69CONFIG_ARCH_IOP3XX=y
diff --git a/arch/arm/configs/epxa10db_defconfig b/arch/arm/configs/epxa10db_defconfig
deleted file mode 100644
index 9fb8b58c4954..000000000000
--- a/arch/arm/configs/epxa10db_defconfig
+++ /dev/null
@@ -1,644 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc1-bk2
4# Sun Mar 27 22:46:51 2005
5#
6CONFIG_ARM=y
7CONFIG_MMU=y
8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_GENERIC_IOMAP=y
12
13#
14# Code maturity level options
15#
16CONFIG_EXPERIMENTAL=y
17CONFIG_CLEAN_COMPILE=y
18CONFIG_BROKEN_ON_SMP=y
19
20#
21# General setup
22#
23CONFIG_LOCALVERSION=""
24CONFIG_SWAP=y
25CONFIG_SYSVIPC=y
26# CONFIG_POSIX_MQUEUE is not set
27# CONFIG_BSD_PROCESS_ACCT is not set
28CONFIG_SYSCTL=y
29# CONFIG_AUDIT is not set
30# CONFIG_HOTPLUG is not set
31CONFIG_KOBJECT_UEVENT=y
32# CONFIG_IKCONFIG is not set
33# CONFIG_EMBEDDED is not set
34CONFIG_KALLSYMS=y
35# CONFIG_KALLSYMS_EXTRA_PASS is not set
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39CONFIG_CC_OPTIMIZE_FOR_SIZE=y
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52CONFIG_MODULE_UNLOAD=y
53# CONFIG_MODULE_FORCE_UNLOAD is not set
54CONFIG_OBSOLETE_MODPARM=y
55# CONFIG_MODVERSIONS is not set
56# CONFIG_MODULE_SRCVERSION_ALL is not set
57# CONFIG_KMOD is not set
58
59#
60# System Type
61#
62# CONFIG_ARCH_CLPS7500 is not set
63# CONFIG_ARCH_CLPS711X is not set
64# CONFIG_ARCH_CO285 is not set
65# CONFIG_ARCH_EBSA110 is not set
66CONFIG_ARCH_CAMELOT=y
67# CONFIG_ARCH_FOOTBRIDGE is not set
68# CONFIG_ARCH_INTEGRATOR is not set
69# CONFIG_ARCH_IOP3XX is not set
70# CONFIG_ARCH_IXP4XX is not set
71# CONFIG_ARCH_IXP2000 is not set
72# CONFIG_ARCH_L7200 is not set
73# CONFIG_ARCH_PXA is not set
74# CONFIG_ARCH_RPC is not set
75# CONFIG_ARCH_SA1100 is not set
76# CONFIG_ARCH_S3C2410 is not set
77# CONFIG_ARCH_SHARK is not set
78# CONFIG_ARCH_LH7A40X is not set
79# CONFIG_ARCH_OMAP is not set
80# CONFIG_ARCH_VERSATILE is not set
81# CONFIG_ARCH_IMX is not set
82# CONFIG_ARCH_H720X is not set
83
84#
85# Epxa10db
86#
87
88#
89# PLD hotswap support
90#
91CONFIG_PLD=y
92# CONFIG_PLD_HOTSWAP is not set
93
94#
95# Processor Type
96#
97CONFIG_CPU_32=y
98CONFIG_CPU_ARM922T=y
99CONFIG_CPU_32v4=y
100CONFIG_CPU_ABRT_EV4T=y
101CONFIG_CPU_CACHE_V4WT=y
102CONFIG_CPU_CACHE_VIVT=y
103CONFIG_CPU_COPY_V4WB=y
104CONFIG_CPU_TLB_V4WBI=y
105
106#
107# Processor Features
108#
109# CONFIG_ARM_THUMB is not set
110# CONFIG_CPU_ICACHE_DISABLE is not set
111# CONFIG_CPU_DCACHE_DISABLE is not set
112# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
113
114#
115# Bus support
116#
117
118#
119# PCCARD (PCMCIA/CardBus) support
120#
121# CONFIG_PCCARD is not set
122
123#
124# Kernel Features
125#
126# CONFIG_PREEMPT is not set
127CONFIG_ALIGNMENT_TRAP=y
128
129#
130# Boot options
131#
132CONFIG_ZBOOT_ROM_TEXT=0x0
133CONFIG_ZBOOT_ROM_BSS=0x0
134CONFIG_CMDLINE="mem=32M console=ttyUA0,115200 initrd=0x00200000,8M root=/dev/ram0 rw"
135# CONFIG_XIP_KERNEL is not set
136
137#
138# Floating point emulation
139#
140
141#
142# At least one emulation must be selected
143#
144CONFIG_FPE_NWFPE=y
145# CONFIG_FPE_NWFPE_XP is not set
146# CONFIG_FPE_FASTFPE is not set
147
148#
149# Userspace binary formats
150#
151CONFIG_BINFMT_ELF=y
152# CONFIG_BINFMT_AOUT is not set
153# CONFIG_BINFMT_MISC is not set
154# CONFIG_ARTHUR is not set
155
156#
157# Power management options
158#
159# CONFIG_PM is not set
160
161#
162# Device Drivers
163#
164
165#
166# Generic Driver Options
167#
168CONFIG_STANDALONE=y
169CONFIG_PREVENT_FIRMWARE_BUILD=y
170# CONFIG_FW_LOADER is not set
171
172#
173# Memory Technology Devices (MTD)
174#
175# CONFIG_MTD is not set
176
177#
178# Parallel port support
179#
180# CONFIG_PARPORT is not set
181
182#
183# Plug and Play support
184#
185
186#
187# Block devices
188#
189# CONFIG_BLK_DEV_FD is not set
190# CONFIG_BLK_DEV_COW_COMMON is not set
191CONFIG_BLK_DEV_LOOP=y
192# CONFIG_BLK_DEV_CRYPTOLOOP is not set
193# CONFIG_BLK_DEV_NBD is not set
194CONFIG_BLK_DEV_RAM=y
195CONFIG_BLK_DEV_RAM_COUNT=16
196CONFIG_BLK_DEV_RAM_SIZE=8192
197CONFIG_BLK_DEV_INITRD=y
198CONFIG_INITRAMFS_SOURCE=""
199# CONFIG_CDROM_PKTCDVD is not set
200
201#
202# IO Schedulers
203#
204CONFIG_IOSCHED_NOOP=y
205CONFIG_IOSCHED_AS=y
206CONFIG_IOSCHED_DEADLINE=y
207CONFIG_IOSCHED_CFQ=y
208# CONFIG_ATA_OVER_ETH is not set
209
210#
211# SCSI device support
212#
213# CONFIG_SCSI is not set
214
215#
216# Multi-device support (RAID and LVM)
217#
218# CONFIG_MD is not set
219
220#
221# Fusion MPT device support
222#
223
224#
225# IEEE 1394 (FireWire) support
226#
227
228#
229# I2O device support
230#
231
232#
233# Networking support
234#
235CONFIG_NET=y
236
237#
238# Networking options
239#
240CONFIG_PACKET=y
241# CONFIG_PACKET_MMAP is not set
242# CONFIG_NETLINK_DEV is not set
243CONFIG_UNIX=y
244# CONFIG_NET_KEY is not set
245CONFIG_INET=y
246CONFIG_IP_MULTICAST=y
247# CONFIG_IP_ADVANCED_ROUTER is not set
248CONFIG_IP_PNP=y
249# CONFIG_IP_PNP_DHCP is not set
250# CONFIG_IP_PNP_BOOTP is not set
251# CONFIG_IP_PNP_RARP is not set
252# CONFIG_NET_IPIP is not set
253# CONFIG_NET_IPGRE is not set
254# CONFIG_IP_MROUTE is not set
255# CONFIG_ARPD is not set
256# CONFIG_SYN_COOKIES is not set
257# CONFIG_INET_AH is not set
258# CONFIG_INET_ESP is not set
259# CONFIG_INET_IPCOMP is not set
260# CONFIG_INET_TUNNEL is not set
261# CONFIG_IP_TCPDIAG is not set
262# CONFIG_IP_TCPDIAG_IPV6 is not set
263# CONFIG_IPV6 is not set
264# CONFIG_NETFILTER is not set
265
266#
267# SCTP Configuration (EXPERIMENTAL)
268#
269# CONFIG_IP_SCTP is not set
270# CONFIG_ATM is not set
271# CONFIG_BRIDGE is not set
272# CONFIG_VLAN_8021Q is not set
273# CONFIG_DECNET is not set
274# CONFIG_LLC2 is not set
275# CONFIG_IPX is not set
276# CONFIG_ATALK is not set
277# CONFIG_X25 is not set
278# CONFIG_LAPB is not set
279# CONFIG_NET_DIVERT is not set
280# CONFIG_ECONET is not set
281# CONFIG_WAN_ROUTER is not set
282
283#
284# QoS and/or fair queueing
285#
286# CONFIG_NET_SCHED is not set
287# CONFIG_NET_CLS_ROUTE is not set
288
289#
290# Network testing
291#
292# CONFIG_NET_PKTGEN is not set
293# CONFIG_NETPOLL is not set
294# CONFIG_NET_POLL_CONTROLLER is not set
295# CONFIG_HAMRADIO is not set
296# CONFIG_IRDA is not set
297# CONFIG_BT is not set
298CONFIG_NETDEVICES=y
299# CONFIG_DUMMY is not set
300# CONFIG_BONDING is not set
301# CONFIG_EQUALIZER is not set
302# CONFIG_TUN is not set
303
304#
305# Ethernet (10 or 100Mbit)
306#
307# CONFIG_NET_ETHERNET is not set
308
309#
310# Ethernet (1000 Mbit)
311#
312
313#
314# Ethernet (10000 Mbit)
315#
316
317#
318# Token Ring devices
319#
320
321#
322# Wireless LAN (non-hamradio)
323#
324# CONFIG_NET_RADIO is not set
325
326#
327# Wan interfaces
328#
329# CONFIG_WAN is not set
330CONFIG_PPP=y
331CONFIG_PPP_MULTILINK=y
332# CONFIG_PPP_FILTER is not set
333CONFIG_PPP_ASYNC=y
334CONFIG_PPP_SYNC_TTY=y
335CONFIG_PPP_DEFLATE=y
336# CONFIG_PPP_BSDCOMP is not set
337# CONFIG_PPPOE is not set
338# CONFIG_SLIP is not set
339# CONFIG_SHAPER is not set
340# CONFIG_NETCONSOLE is not set
341
342#
343# ISDN subsystem
344#
345# CONFIG_ISDN is not set
346
347#
348# Input device support
349#
350CONFIG_INPUT=y
351
352#
353# Userland interfaces
354#
355CONFIG_INPUT_MOUSEDEV=y
356CONFIG_INPUT_MOUSEDEV_PSAUX=y
357CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
358CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
359# CONFIG_INPUT_JOYDEV is not set
360# CONFIG_INPUT_TSDEV is not set
361# CONFIG_INPUT_EVDEV is not set
362# CONFIG_INPUT_EVBUG is not set
363
364#
365# Input Device Drivers
366#
367# CONFIG_INPUT_KEYBOARD is not set
368# CONFIG_INPUT_MOUSE is not set
369# CONFIG_INPUT_JOYSTICK is not set
370# CONFIG_INPUT_TOUCHSCREEN is not set
371# CONFIG_INPUT_MISC is not set
372
373#
374# Hardware I/O ports
375#
376CONFIG_SERIO=y
377CONFIG_SERIO_SERPORT=y
378# CONFIG_SERIO_RAW is not set
379# CONFIG_GAMEPORT is not set
380CONFIG_SOUND_GAMEPORT=y
381
382#
383# Character devices
384#
385CONFIG_VT=y
386CONFIG_VT_CONSOLE=y
387CONFIG_HW_CONSOLE=y
388# CONFIG_SERIAL_NONSTANDARD is not set
389
390#
391# Serial drivers
392#
393# CONFIG_SERIAL_8250 is not set
394
395#
396# Non-8250 serial port support
397#
398CONFIG_SERIAL_UART00=y
399CONFIG_SERIAL_UART00_CONSOLE=y
400CONFIG_SERIAL_CORE=y
401CONFIG_SERIAL_CORE_CONSOLE=y
402CONFIG_UNIX98_PTYS=y
403CONFIG_LEGACY_PTYS=y
404CONFIG_LEGACY_PTY_COUNT=256
405
406#
407# IPMI
408#
409# CONFIG_IPMI_HANDLER is not set
410
411#
412# Watchdog Cards
413#
414# CONFIG_WATCHDOG is not set
415# CONFIG_NVRAM is not set
416# CONFIG_RTC is not set
417# CONFIG_DTLK is not set
418# CONFIG_R3964 is not set
419
420#
421# Ftape, the floppy tape device driver
422#
423# CONFIG_DRM is not set
424# CONFIG_RAW_DRIVER is not set
425
426#
427# TPM devices
428#
429# CONFIG_TCG_TPM is not set
430
431#
432# I2C support
433#
434# CONFIG_I2C is not set
435
436#
437# Misc devices
438#
439
440#
441# Multimedia devices
442#
443# CONFIG_VIDEO_DEV is not set
444
445#
446# Digital Video Broadcasting Devices
447#
448# CONFIG_DVB is not set
449
450#
451# Graphics support
452#
453# CONFIG_FB is not set
454
455#
456# Console display driver support
457#
458# CONFIG_VGA_CONSOLE is not set
459CONFIG_DUMMY_CONSOLE=y
460
461#
462# Sound
463#
464# CONFIG_SOUND is not set
465
466#
467# USB support
468#
469CONFIG_USB_ARCH_HAS_HCD=y
470# CONFIG_USB_ARCH_HAS_OHCI is not set
471# CONFIG_USB is not set
472
473#
474# USB Gadget Support
475#
476# CONFIG_USB_GADGET is not set
477
478#
479# MMC/SD Card support
480#
481# CONFIG_MMC is not set
482
483#
484# File systems
485#
486CONFIG_EXT2_FS=y
487# CONFIG_EXT2_FS_XATTR is not set
488# CONFIG_EXT3_FS is not set
489# CONFIG_JBD is not set
490# CONFIG_REISERFS_FS is not set
491# CONFIG_JFS_FS is not set
492
493#
494# XFS support
495#
496# CONFIG_XFS_FS is not set
497# CONFIG_MINIX_FS is not set
498# CONFIG_ROMFS_FS is not set
499# CONFIG_QUOTA is not set
500CONFIG_DNOTIFY=y
501CONFIG_AUTOFS_FS=y
502CONFIG_AUTOFS4_FS=y
503
504#
505# CD-ROM/DVD Filesystems
506#
507# CONFIG_ISO9660_FS is not set
508# CONFIG_UDF_FS is not set
509
510#
511# DOS/FAT/NT Filesystems
512#
513# CONFIG_MSDOS_FS is not set
514# CONFIG_VFAT_FS is not set
515# CONFIG_NTFS_FS is not set
516
517#
518# Pseudo filesystems
519#
520CONFIG_PROC_FS=y
521CONFIG_SYSFS=y
522# CONFIG_DEVFS_FS is not set
523# CONFIG_DEVPTS_FS_XATTR is not set
524# CONFIG_TMPFS is not set
525# CONFIG_HUGETLB_PAGE is not set
526CONFIG_RAMFS=y
527
528#
529# Miscellaneous filesystems
530#
531# CONFIG_ADFS_FS is not set
532# CONFIG_AFFS_FS is not set
533# CONFIG_HFS_FS is not set
534# CONFIG_HFSPLUS_FS is not set
535# CONFIG_BEFS_FS is not set
536# CONFIG_BFS_FS is not set
537# CONFIG_EFS_FS is not set
538# CONFIG_CRAMFS is not set
539# CONFIG_VXFS_FS is not set
540# CONFIG_HPFS_FS is not set
541# CONFIG_QNX4FS_FS is not set
542# CONFIG_SYSV_FS is not set
543# CONFIG_UFS_FS is not set
544
545#
546# Network File Systems
547#
548# CONFIG_NFS_FS is not set
549# CONFIG_NFSD is not set
550CONFIG_SMB_FS=y
551# CONFIG_SMB_NLS_DEFAULT is not set
552# CONFIG_CIFS is not set
553# CONFIG_NCP_FS is not set
554# CONFIG_CODA_FS is not set
555# CONFIG_AFS_FS is not set
556
557#
558# Partition Types
559#
560# CONFIG_PARTITION_ADVANCED is not set
561CONFIG_MSDOS_PARTITION=y
562
563#
564# Native Language Support
565#
566CONFIG_NLS=y
567CONFIG_NLS_DEFAULT="iso8859-1"
568# CONFIG_NLS_CODEPAGE_437 is not set
569# CONFIG_NLS_CODEPAGE_737 is not set
570# CONFIG_NLS_CODEPAGE_775 is not set
571# CONFIG_NLS_CODEPAGE_850 is not set
572# CONFIG_NLS_CODEPAGE_852 is not set
573# CONFIG_NLS_CODEPAGE_855 is not set
574# CONFIG_NLS_CODEPAGE_857 is not set
575# CONFIG_NLS_CODEPAGE_860 is not set
576# CONFIG_NLS_CODEPAGE_861 is not set
577# CONFIG_NLS_CODEPAGE_862 is not set
578# CONFIG_NLS_CODEPAGE_863 is not set
579# CONFIG_NLS_CODEPAGE_864 is not set
580# CONFIG_NLS_CODEPAGE_865 is not set
581# CONFIG_NLS_CODEPAGE_866 is not set
582# CONFIG_NLS_CODEPAGE_869 is not set
583# CONFIG_NLS_CODEPAGE_936 is not set
584# CONFIG_NLS_CODEPAGE_950 is not set
585# CONFIG_NLS_CODEPAGE_932 is not set
586# CONFIG_NLS_CODEPAGE_949 is not set
587# CONFIG_NLS_CODEPAGE_874 is not set
588# CONFIG_NLS_ISO8859_8 is not set
589# CONFIG_NLS_CODEPAGE_1250 is not set
590# CONFIG_NLS_CODEPAGE_1251 is not set
591# CONFIG_NLS_ASCII is not set
592# CONFIG_NLS_ISO8859_1 is not set
593# CONFIG_NLS_ISO8859_2 is not set
594# CONFIG_NLS_ISO8859_3 is not set
595# CONFIG_NLS_ISO8859_4 is not set
596# CONFIG_NLS_ISO8859_5 is not set
597# CONFIG_NLS_ISO8859_6 is not set
598# CONFIG_NLS_ISO8859_7 is not set
599# CONFIG_NLS_ISO8859_9 is not set
600# CONFIG_NLS_ISO8859_13 is not set
601# CONFIG_NLS_ISO8859_14 is not set
602# CONFIG_NLS_ISO8859_15 is not set
603# CONFIG_NLS_KOI8_R is not set
604# CONFIG_NLS_KOI8_U is not set
605# CONFIG_NLS_UTF8 is not set
606
607#
608# Profiling support
609#
610# CONFIG_PROFILING is not set
611
612#
613# Kernel hacking
614#
615# CONFIG_PRINTK_TIME is not set
616# CONFIG_DEBUG_KERNEL is not set
617CONFIG_LOG_BUF_SHIFT=14
618CONFIG_DEBUG_BUGVERBOSE=y
619CONFIG_FRAME_POINTER=y
620# CONFIG_DEBUG_USER is not set
621
622#
623# Security options
624#
625# CONFIG_KEYS is not set
626# CONFIG_SECURITY is not set
627
628#
629# Cryptographic options
630#
631# CONFIG_CRYPTO is not set
632
633#
634# Hardware crypto devices
635#
636
637#
638# Library routines
639#
640CONFIG_CRC_CCITT=y
641CONFIG_CRC32=y
642# CONFIG_LIBCRC32C is not set
643CONFIG_ZLIB_INFLATE=y
644CONFIG_ZLIB_DEFLATE=y
diff --git a/arch/arm/configs/footbridge_defconfig b/arch/arm/configs/footbridge_defconfig
index 9737c4850721..2a612d23120b 100644
--- a/arch/arm/configs/footbridge_defconfig
+++ b/arch/arm/configs/footbridge_defconfig
@@ -63,7 +63,6 @@ CONFIG_KMOD=y
63# CONFIG_ARCH_CLPS711X is not set 63# CONFIG_ARCH_CLPS711X is not set
64# CONFIG_ARCH_CO285 is not set 64# CONFIG_ARCH_CO285 is not set
65# CONFIG_ARCH_EBSA110 is not set 65# CONFIG_ARCH_EBSA110 is not set
66# CONFIG_ARCH_CAMELOT is not set
67CONFIG_ARCH_FOOTBRIDGE=y 66CONFIG_ARCH_FOOTBRIDGE=y
68# CONFIG_ARCH_INTEGRATOR is not set 67# CONFIG_ARCH_INTEGRATOR is not set
69# CONFIG_ARCH_IOP3XX is not set 68# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/fortunet_defconfig b/arch/arm/configs/fortunet_defconfig
index b6f688d850dc..65dc73a88c43 100644
--- a/arch/arm/configs/fortunet_defconfig
+++ b/arch/arm/configs/fortunet_defconfig
@@ -57,7 +57,6 @@ CONFIG_BASE_SMALL=0
57CONFIG_ARCH_CLPS711X=y 57CONFIG_ARCH_CLPS711X=y
58# CONFIG_ARCH_CO285 is not set 58# CONFIG_ARCH_CO285 is not set
59# CONFIG_ARCH_EBSA110 is not set 59# CONFIG_ARCH_EBSA110 is not set
60# CONFIG_ARCH_CAMELOT is not set
61# CONFIG_ARCH_FOOTBRIDGE is not set 60# CONFIG_ARCH_FOOTBRIDGE is not set
62# CONFIG_ARCH_INTEGRATOR is not set 61# CONFIG_ARCH_INTEGRATOR is not set
63# CONFIG_ARCH_IOP3XX is not set 62# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/h3600_defconfig b/arch/arm/configs/h3600_defconfig
index b9de07de80fe..7a0da0b7facb 100644
--- a/arch/arm/configs/h3600_defconfig
+++ b/arch/arm/configs/h3600_defconfig
@@ -65,7 +65,6 @@ CONFIG_OBSOLETE_MODPARM=y
65# CONFIG_ARCH_CLPS711X is not set 65# CONFIG_ARCH_CLPS711X is not set
66# CONFIG_ARCH_CO285 is not set 66# CONFIG_ARCH_CO285 is not set
67# CONFIG_ARCH_EBSA110 is not set 67# CONFIG_ARCH_EBSA110 is not set
68# CONFIG_ARCH_CAMELOT is not set
69# CONFIG_ARCH_FOOTBRIDGE is not set 68# CONFIG_ARCH_FOOTBRIDGE is not set
70# CONFIG_ARCH_INTEGRATOR is not set 69# CONFIG_ARCH_INTEGRATOR is not set
71# CONFIG_ARCH_IOP3XX is not set 70# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/h7201_defconfig b/arch/arm/configs/h7201_defconfig
index 39c13a354541..116920aecef7 100644
--- a/arch/arm/configs/h7201_defconfig
+++ b/arch/arm/configs/h7201_defconfig
@@ -60,7 +60,6 @@ CONFIG_KMOD=y
60# CONFIG_ARCH_CLPS711X is not set 60# CONFIG_ARCH_CLPS711X is not set
61# CONFIG_ARCH_CO285 is not set 61# CONFIG_ARCH_CO285 is not set
62# CONFIG_ARCH_EBSA110 is not set 62# CONFIG_ARCH_EBSA110 is not set
63# CONFIG_ARCH_CAMELOT is not set
64# CONFIG_ARCH_FOOTBRIDGE is not set 63# CONFIG_ARCH_FOOTBRIDGE is not set
65# CONFIG_ARCH_INTEGRATOR is not set 64# CONFIG_ARCH_INTEGRATOR is not set
66# CONFIG_ARCH_IOP3XX is not set 65# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/h7202_defconfig b/arch/arm/configs/h7202_defconfig
index fbf5c244c696..9d62ed16bf57 100644
--- a/arch/arm/configs/h7202_defconfig
+++ b/arch/arm/configs/h7202_defconfig
@@ -63,7 +63,6 @@ CONFIG_KMOD=y
63# CONFIG_ARCH_CLPS711X is not set 63# CONFIG_ARCH_CLPS711X is not set
64# CONFIG_ARCH_CO285 is not set 64# CONFIG_ARCH_CO285 is not set
65# CONFIG_ARCH_EBSA110 is not set 65# CONFIG_ARCH_EBSA110 is not set
66# CONFIG_ARCH_CAMELOT is not set
67# CONFIG_ARCH_FOOTBRIDGE is not set 66# CONFIG_ARCH_FOOTBRIDGE is not set
68# CONFIG_ARCH_INTEGRATOR is not set 67# CONFIG_ARCH_INTEGRATOR is not set
69# CONFIG_ARCH_IOP3XX is not set 68# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/hackkit_defconfig b/arch/arm/configs/hackkit_defconfig
index fb41a36a5a68..a45b57582b86 100644
--- a/arch/arm/configs/hackkit_defconfig
+++ b/arch/arm/configs/hackkit_defconfig
@@ -66,7 +66,6 @@ CONFIG_KMOD=y
66# CONFIG_ARCH_CLPS711X is not set 66# CONFIG_ARCH_CLPS711X is not set
67# CONFIG_ARCH_CO285 is not set 67# CONFIG_ARCH_CO285 is not set
68# CONFIG_ARCH_EBSA110 is not set 68# CONFIG_ARCH_EBSA110 is not set
69# CONFIG_ARCH_CAMELOT is not set
70# CONFIG_ARCH_FOOTBRIDGE is not set 69# CONFIG_ARCH_FOOTBRIDGE is not set
71# CONFIG_ARCH_INTEGRATOR is not set 70# CONFIG_ARCH_INTEGRATOR is not set
72# CONFIG_ARCH_IOP3XX is not set 71# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/integrator_defconfig b/arch/arm/configs/integrator_defconfig
index 27ee76825254..d1ba7fdde818 100644
--- a/arch/arm/configs/integrator_defconfig
+++ b/arch/arm/configs/integrator_defconfig
@@ -65,7 +65,6 @@ CONFIG_KMOD=y
65# CONFIG_ARCH_CLPS711X is not set 65# CONFIG_ARCH_CLPS711X is not set
66# CONFIG_ARCH_CO285 is not set 66# CONFIG_ARCH_CO285 is not set
67# CONFIG_ARCH_EBSA110 is not set 67# CONFIG_ARCH_EBSA110 is not set
68# CONFIG_ARCH_CAMELOT is not set
69# CONFIG_ARCH_FOOTBRIDGE is not set 68# CONFIG_ARCH_FOOTBRIDGE is not set
70CONFIG_ARCH_INTEGRATOR=y 69CONFIG_ARCH_INTEGRATOR=y
71# CONFIG_ARCH_IOP3XX is not set 70# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/iq31244_defconfig b/arch/arm/configs/iq31244_defconfig
index e71443b97390..c07628ceaf0c 100644
--- a/arch/arm/configs/iq31244_defconfig
+++ b/arch/arm/configs/iq31244_defconfig
@@ -65,7 +65,6 @@ CONFIG_KMOD=y
65# CONFIG_ARCH_CLPS711X is not set 65# CONFIG_ARCH_CLPS711X is not set
66# CONFIG_ARCH_CO285 is not set 66# CONFIG_ARCH_CO285 is not set
67# CONFIG_ARCH_EBSA110 is not set 67# CONFIG_ARCH_EBSA110 is not set
68# CONFIG_ARCH_CAMELOT is not set
69# CONFIG_ARCH_FOOTBRIDGE is not set 68# CONFIG_ARCH_FOOTBRIDGE is not set
70# CONFIG_ARCH_INTEGRATOR is not set 69# CONFIG_ARCH_INTEGRATOR is not set
71CONFIG_ARCH_IOP3XX=y 70CONFIG_ARCH_IOP3XX=y
diff --git a/arch/arm/configs/iq80321_defconfig b/arch/arm/configs/iq80321_defconfig
index ab5ad23b27da..18fa1615fdfd 100644
--- a/arch/arm/configs/iq80321_defconfig
+++ b/arch/arm/configs/iq80321_defconfig
@@ -64,7 +64,6 @@ CONFIG_KMOD=y
64# CONFIG_ARCH_CLPS711X is not set 64# CONFIG_ARCH_CLPS711X is not set
65# CONFIG_ARCH_CO285 is not set 65# CONFIG_ARCH_CO285 is not set
66# CONFIG_ARCH_EBSA110 is not set 66# CONFIG_ARCH_EBSA110 is not set
67# CONFIG_ARCH_CAMELOT is not set
68# CONFIG_ARCH_FOOTBRIDGE is not set 67# CONFIG_ARCH_FOOTBRIDGE is not set
69# CONFIG_ARCH_INTEGRATOR is not set 68# CONFIG_ARCH_INTEGRATOR is not set
70CONFIG_ARCH_IOP3XX=y 69CONFIG_ARCH_IOP3XX=y
diff --git a/arch/arm/configs/iq80331_defconfig b/arch/arm/configs/iq80331_defconfig
index bb536133ef87..f50035de1fff 100644
--- a/arch/arm/configs/iq80331_defconfig
+++ b/arch/arm/configs/iq80331_defconfig
@@ -64,7 +64,6 @@ CONFIG_KMOD=y
64# CONFIG_ARCH_CLPS711X is not set 64# CONFIG_ARCH_CLPS711X is not set
65# CONFIG_ARCH_CO285 is not set 65# CONFIG_ARCH_CO285 is not set
66# CONFIG_ARCH_EBSA110 is not set 66# CONFIG_ARCH_EBSA110 is not set
67# CONFIG_ARCH_CAMELOT is not set
68# CONFIG_ARCH_FOOTBRIDGE is not set 67# CONFIG_ARCH_FOOTBRIDGE is not set
69# CONFIG_ARCH_INTEGRATOR is not set 68# CONFIG_ARCH_INTEGRATOR is not set
70CONFIG_ARCH_IOP3XX=y 69CONFIG_ARCH_IOP3XX=y
diff --git a/arch/arm/configs/iq80332_defconfig b/arch/arm/configs/iq80332_defconfig
index 305f01f3a729..18b3f372ed68 100644
--- a/arch/arm/configs/iq80332_defconfig
+++ b/arch/arm/configs/iq80332_defconfig
@@ -64,7 +64,6 @@ CONFIG_KMOD=y
64# CONFIG_ARCH_CLPS711X is not set 64# CONFIG_ARCH_CLPS711X is not set
65# CONFIG_ARCH_CO285 is not set 65# CONFIG_ARCH_CO285 is not set
66# CONFIG_ARCH_EBSA110 is not set 66# CONFIG_ARCH_EBSA110 is not set
67# CONFIG_ARCH_CAMELOT is not set
68# CONFIG_ARCH_FOOTBRIDGE is not set 67# CONFIG_ARCH_FOOTBRIDGE is not set
69# CONFIG_ARCH_INTEGRATOR is not set 68# CONFIG_ARCH_INTEGRATOR is not set
70CONFIG_ARCH_IOP3XX=y 69CONFIG_ARCH_IOP3XX=y
diff --git a/arch/arm/configs/ixdp2400_defconfig b/arch/arm/configs/ixdp2400_defconfig
index e6a4d2656fe5..d9d6bb86a6fa 100644
--- a/arch/arm/configs/ixdp2400_defconfig
+++ b/arch/arm/configs/ixdp2400_defconfig
@@ -86,7 +86,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
86# CONFIG_ARCH_CLPS711X is not set 86# CONFIG_ARCH_CLPS711X is not set
87# CONFIG_ARCH_CO285 is not set 87# CONFIG_ARCH_CO285 is not set
88# CONFIG_ARCH_EBSA110 is not set 88# CONFIG_ARCH_EBSA110 is not set
89# CONFIG_ARCH_CAMELOT is not set
90# CONFIG_ARCH_FOOTBRIDGE is not set 89# CONFIG_ARCH_FOOTBRIDGE is not set
91# CONFIG_ARCH_INTEGRATOR is not set 90# CONFIG_ARCH_INTEGRATOR is not set
92# CONFIG_ARCH_IOP3XX is not set 91# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/ixdp2401_defconfig b/arch/arm/configs/ixdp2401_defconfig
index 5572cf95d5f8..2dc9d499c7d7 100644
--- a/arch/arm/configs/ixdp2401_defconfig
+++ b/arch/arm/configs/ixdp2401_defconfig
@@ -86,7 +86,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
86# CONFIG_ARCH_CLPS711X is not set 86# CONFIG_ARCH_CLPS711X is not set
87# CONFIG_ARCH_CO285 is not set 87# CONFIG_ARCH_CO285 is not set
88# CONFIG_ARCH_EBSA110 is not set 88# CONFIG_ARCH_EBSA110 is not set
89# CONFIG_ARCH_CAMELOT is not set
90# CONFIG_ARCH_FOOTBRIDGE is not set 89# CONFIG_ARCH_FOOTBRIDGE is not set
91# CONFIG_ARCH_INTEGRATOR is not set 90# CONFIG_ARCH_INTEGRATOR is not set
92# CONFIG_ARCH_IOP3XX is not set 91# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/ixdp2800_defconfig b/arch/arm/configs/ixdp2800_defconfig
index 0fddbde85835..4248123815e9 100644
--- a/arch/arm/configs/ixdp2800_defconfig
+++ b/arch/arm/configs/ixdp2800_defconfig
@@ -86,7 +86,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
86# CONFIG_ARCH_CLPS711X is not set 86# CONFIG_ARCH_CLPS711X is not set
87# CONFIG_ARCH_CO285 is not set 87# CONFIG_ARCH_CO285 is not set
88# CONFIG_ARCH_EBSA110 is not set 88# CONFIG_ARCH_EBSA110 is not set
89# CONFIG_ARCH_CAMELOT is not set
90# CONFIG_ARCH_FOOTBRIDGE is not set 89# CONFIG_ARCH_FOOTBRIDGE is not set
91# CONFIG_ARCH_INTEGRATOR is not set 90# CONFIG_ARCH_INTEGRATOR is not set
92# CONFIG_ARCH_IOP3XX is not set 91# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/ixdp2801_defconfig b/arch/arm/configs/ixdp2801_defconfig
index 89b9aa06aa91..ea8f4b478fa3 100644
--- a/arch/arm/configs/ixdp2801_defconfig
+++ b/arch/arm/configs/ixdp2801_defconfig
@@ -86,7 +86,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
86# CONFIG_ARCH_CLPS711X is not set 86# CONFIG_ARCH_CLPS711X is not set
87# CONFIG_ARCH_CO285 is not set 87# CONFIG_ARCH_CO285 is not set
88# CONFIG_ARCH_EBSA110 is not set 88# CONFIG_ARCH_EBSA110 is not set
89# CONFIG_ARCH_CAMELOT is not set
90# CONFIG_ARCH_FOOTBRIDGE is not set 89# CONFIG_ARCH_FOOTBRIDGE is not set
91# CONFIG_ARCH_INTEGRATOR is not set 90# CONFIG_ARCH_INTEGRATOR is not set
92# CONFIG_ARCH_IOP3XX is not set 91# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/ixp4xx_defconfig b/arch/arm/configs/ixp4xx_defconfig
index 613afab62720..4975b914f923 100644
--- a/arch/arm/configs/ixp4xx_defconfig
+++ b/arch/arm/configs/ixp4xx_defconfig
@@ -85,7 +85,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
85# CONFIG_ARCH_CLPS711X is not set 85# CONFIG_ARCH_CLPS711X is not set
86# CONFIG_ARCH_CO285 is not set 86# CONFIG_ARCH_CO285 is not set
87# CONFIG_ARCH_EBSA110 is not set 87# CONFIG_ARCH_EBSA110 is not set
88# CONFIG_ARCH_CAMELOT is not set
89# CONFIG_ARCH_FOOTBRIDGE is not set 88# CONFIG_ARCH_FOOTBRIDGE is not set
90# CONFIG_ARCH_INTEGRATOR is not set 89# CONFIG_ARCH_INTEGRATOR is not set
91# CONFIG_ARCH_IOP3XX is not set 90# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/jornada720_defconfig b/arch/arm/configs/jornada720_defconfig
index b88aeba82bc0..ad1048db96fb 100644
--- a/arch/arm/configs/jornada720_defconfig
+++ b/arch/arm/configs/jornada720_defconfig
@@ -63,7 +63,6 @@ CONFIG_KMOD=y
63# CONFIG_ARCH_CLPS711X is not set 63# CONFIG_ARCH_CLPS711X is not set
64# CONFIG_ARCH_CO285 is not set 64# CONFIG_ARCH_CO285 is not set
65# CONFIG_ARCH_EBSA110 is not set 65# CONFIG_ARCH_EBSA110 is not set
66# CONFIG_ARCH_CAMELOT is not set
67# CONFIG_ARCH_FOOTBRIDGE is not set 66# CONFIG_ARCH_FOOTBRIDGE is not set
68# CONFIG_ARCH_INTEGRATOR is not set 67# CONFIG_ARCH_INTEGRATOR is not set
69# CONFIG_ARCH_IOP3XX is not set 68# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/lart_defconfig b/arch/arm/configs/lart_defconfig
index 7033829ed145..c3a932844160 100644
--- a/arch/arm/configs/lart_defconfig
+++ b/arch/arm/configs/lart_defconfig
@@ -62,7 +62,6 @@ CONFIG_KMOD=y
62# CONFIG_ARCH_CLPS711X is not set 62# CONFIG_ARCH_CLPS711X is not set
63# CONFIG_ARCH_CO285 is not set 63# CONFIG_ARCH_CO285 is not set
64# CONFIG_ARCH_EBSA110 is not set 64# CONFIG_ARCH_EBSA110 is not set
65# CONFIG_ARCH_CAMELOT is not set
66# CONFIG_ARCH_FOOTBRIDGE is not set 65# CONFIG_ARCH_FOOTBRIDGE is not set
67# CONFIG_ARCH_INTEGRATOR is not set 66# CONFIG_ARCH_INTEGRATOR is not set
68# CONFIG_ARCH_IOP3XX is not set 67# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/lpd7a400_defconfig b/arch/arm/configs/lpd7a400_defconfig
index d64706d3ff35..67eaa26c2647 100644
--- a/arch/arm/configs/lpd7a400_defconfig
+++ b/arch/arm/configs/lpd7a400_defconfig
@@ -60,7 +60,6 @@ CONFIG_BASE_SMALL=0
60# CONFIG_ARCH_CLPS711X is not set 60# CONFIG_ARCH_CLPS711X is not set
61# CONFIG_ARCH_CO285 is not set 61# CONFIG_ARCH_CO285 is not set
62# CONFIG_ARCH_EBSA110 is not set 62# CONFIG_ARCH_EBSA110 is not set
63# CONFIG_ARCH_CAMELOT is not set
64# CONFIG_ARCH_FOOTBRIDGE is not set 63# CONFIG_ARCH_FOOTBRIDGE is not set
65# CONFIG_ARCH_INTEGRATOR is not set 64# CONFIG_ARCH_INTEGRATOR is not set
66# CONFIG_ARCH_IOP3XX is not set 65# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/lpd7a404_defconfig b/arch/arm/configs/lpd7a404_defconfig
index 87cbedfb303f..208d591ebfce 100644
--- a/arch/arm/configs/lpd7a404_defconfig
+++ b/arch/arm/configs/lpd7a404_defconfig
@@ -60,7 +60,6 @@ CONFIG_BASE_SMALL=0
60# CONFIG_ARCH_CLPS711X is not set 60# CONFIG_ARCH_CLPS711X is not set
61# CONFIG_ARCH_CO285 is not set 61# CONFIG_ARCH_CO285 is not set
62# CONFIG_ARCH_EBSA110 is not set 62# CONFIG_ARCH_EBSA110 is not set
63# CONFIG_ARCH_CAMELOT is not set
64# CONFIG_ARCH_FOOTBRIDGE is not set 63# CONFIG_ARCH_FOOTBRIDGE is not set
65# CONFIG_ARCH_INTEGRATOR is not set 64# CONFIG_ARCH_INTEGRATOR is not set
66# CONFIG_ARCH_IOP3XX is not set 65# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/lubbock_defconfig b/arch/arm/configs/lubbock_defconfig
index 4bc8717c6f57..81daadcbe0ba 100644
--- a/arch/arm/configs/lubbock_defconfig
+++ b/arch/arm/configs/lubbock_defconfig
@@ -63,7 +63,6 @@ CONFIG_OBSOLETE_MODPARM=y
63# CONFIG_ARCH_CLPS711X is not set 63# CONFIG_ARCH_CLPS711X is not set
64# CONFIG_ARCH_CO285 is not set 64# CONFIG_ARCH_CO285 is not set
65# CONFIG_ARCH_EBSA110 is not set 65# CONFIG_ARCH_EBSA110 is not set
66# CONFIG_ARCH_CAMELOT is not set
67# CONFIG_ARCH_FOOTBRIDGE is not set 66# CONFIG_ARCH_FOOTBRIDGE is not set
68# CONFIG_ARCH_INTEGRATOR is not set 67# CONFIG_ARCH_INTEGRATOR is not set
69# CONFIG_ARCH_IOP3XX is not set 68# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/lusl7200_defconfig b/arch/arm/configs/lusl7200_defconfig
index 3ca64cabc92c..42f6a77bc3c0 100644
--- a/arch/arm/configs/lusl7200_defconfig
+++ b/arch/arm/configs/lusl7200_defconfig
@@ -62,7 +62,6 @@ CONFIG_KMOD=y
62# CONFIG_ARCH_CLPS711X is not set 62# CONFIG_ARCH_CLPS711X is not set
63# CONFIG_ARCH_CO285 is not set 63# CONFIG_ARCH_CO285 is not set
64# CONFIG_ARCH_EBSA110 is not set 64# CONFIG_ARCH_EBSA110 is not set
65# CONFIG_ARCH_CAMELOT is not set
66# CONFIG_ARCH_FOOTBRIDGE is not set 65# CONFIG_ARCH_FOOTBRIDGE is not set
67# CONFIG_ARCH_INTEGRATOR is not set 66# CONFIG_ARCH_INTEGRATOR is not set
68# CONFIG_ARCH_IOP3XX is not set 67# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/mainstone_defconfig b/arch/arm/configs/mainstone_defconfig
index 153d68594beb..b112bd75bda2 100644
--- a/arch/arm/configs/mainstone_defconfig
+++ b/arch/arm/configs/mainstone_defconfig
@@ -63,7 +63,6 @@ CONFIG_OBSOLETE_MODPARM=y
63# CONFIG_ARCH_CLPS711X is not set 63# CONFIG_ARCH_CLPS711X is not set
64# CONFIG_ARCH_CO285 is not set 64# CONFIG_ARCH_CO285 is not set
65# CONFIG_ARCH_EBSA110 is not set 65# CONFIG_ARCH_EBSA110 is not set
66# CONFIG_ARCH_CAMELOT is not set
67# CONFIG_ARCH_FOOTBRIDGE is not set 66# CONFIG_ARCH_FOOTBRIDGE is not set
68# CONFIG_ARCH_INTEGRATOR is not set 67# CONFIG_ARCH_INTEGRATOR is not set
69# CONFIG_ARCH_IOP3XX is not set 68# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/mx1ads_defconfig b/arch/arm/configs/mx1ads_defconfig
index 6517d167acf0..d16f6cd6e039 100644
--- a/arch/arm/configs/mx1ads_defconfig
+++ b/arch/arm/configs/mx1ads_defconfig
@@ -63,7 +63,6 @@ CONFIG_KMOD=y
63# CONFIG_ARCH_CLPS711X is not set 63# CONFIG_ARCH_CLPS711X is not set
64# CONFIG_ARCH_CO285 is not set 64# CONFIG_ARCH_CO285 is not set
65# CONFIG_ARCH_EBSA110 is not set 65# CONFIG_ARCH_EBSA110 is not set
66# CONFIG_ARCH_CAMELOT is not set
67# CONFIG_ARCH_FOOTBRIDGE is not set 66# CONFIG_ARCH_FOOTBRIDGE is not set
68# CONFIG_ARCH_INTEGRATOR is not set 67# CONFIG_ARCH_INTEGRATOR is not set
69# CONFIG_ARCH_IOP3XX is not set 68# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponset_defconfig
index 7fb1f7c7bf43..3d35255c64ed 100644
--- a/arch/arm/configs/neponset_defconfig
+++ b/arch/arm/configs/neponset_defconfig
@@ -65,7 +65,6 @@ CONFIG_OBSOLETE_MODPARM=y
65# CONFIG_ARCH_CLPS711X is not set 65# CONFIG_ARCH_CLPS711X is not set
66# CONFIG_ARCH_CO285 is not set 66# CONFIG_ARCH_CO285 is not set
67# CONFIG_ARCH_EBSA110 is not set 67# CONFIG_ARCH_EBSA110 is not set
68# CONFIG_ARCH_CAMELOT is not set
69# CONFIG_ARCH_FOOTBRIDGE is not set 68# CONFIG_ARCH_FOOTBRIDGE is not set
70# CONFIG_ARCH_INTEGRATOR is not set 69# CONFIG_ARCH_INTEGRATOR is not set
71# CONFIG_ARCH_IOP3XX is not set 70# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/netwinder_defconfig b/arch/arm/configs/netwinder_defconfig
index 6e81acf94c2f..2cae1ead9f9b 100644
--- a/arch/arm/configs/netwinder_defconfig
+++ b/arch/arm/configs/netwinder_defconfig
@@ -58,7 +58,6 @@ CONFIG_BASE_SMALL=0
58# CONFIG_ARCH_CLPS711X is not set 58# CONFIG_ARCH_CLPS711X is not set
59# CONFIG_ARCH_CO285 is not set 59# CONFIG_ARCH_CO285 is not set
60# CONFIG_ARCH_EBSA110 is not set 60# CONFIG_ARCH_EBSA110 is not set
61# CONFIG_ARCH_CAMELOT is not set
62CONFIG_ARCH_FOOTBRIDGE=y 61CONFIG_ARCH_FOOTBRIDGE=y
63# CONFIG_ARCH_INTEGRATOR is not set 62# CONFIG_ARCH_INTEGRATOR is not set
64# CONFIG_ARCH_IOP3XX is not set 63# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/omap_h2_1610_defconfig b/arch/arm/configs/omap_h2_1610_defconfig
index 529f0f72e1e9..ee3ecbd9002d 100644
--- a/arch/arm/configs/omap_h2_1610_defconfig
+++ b/arch/arm/configs/omap_h2_1610_defconfig
@@ -85,7 +85,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
85# CONFIG_ARCH_CLPS711X is not set 85# CONFIG_ARCH_CLPS711X is not set
86# CONFIG_ARCH_CO285 is not set 86# CONFIG_ARCH_CO285 is not set
87# CONFIG_ARCH_EBSA110 is not set 87# CONFIG_ARCH_EBSA110 is not set
88# CONFIG_ARCH_CAMELOT is not set
89# CONFIG_ARCH_FOOTBRIDGE is not set 88# CONFIG_ARCH_FOOTBRIDGE is not set
90# CONFIG_ARCH_INTEGRATOR is not set 89# CONFIG_ARCH_INTEGRATOR is not set
91# CONFIG_ARCH_IOP3XX is not set 90# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/pleb_defconfig b/arch/arm/configs/pleb_defconfig
index 10fec890578d..24e8bdd4cb91 100644
--- a/arch/arm/configs/pleb_defconfig
+++ b/arch/arm/configs/pleb_defconfig
@@ -63,7 +63,6 @@ CONFIG_KMOD=y
63# CONFIG_ARCH_CLPS711X is not set 63# CONFIG_ARCH_CLPS711X is not set
64# CONFIG_ARCH_CO285 is not set 64# CONFIG_ARCH_CO285 is not set
65# CONFIG_ARCH_EBSA110 is not set 65# CONFIG_ARCH_EBSA110 is not set
66# CONFIG_ARCH_CAMELOT is not set
67# CONFIG_ARCH_FOOTBRIDGE is not set 66# CONFIG_ARCH_FOOTBRIDGE is not set
68# CONFIG_ARCH_INTEGRATOR is not set 67# CONFIG_ARCH_INTEGRATOR is not set
69# CONFIG_ARCH_IOP3XX is not set 68# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/pxa255-idp_defconfig b/arch/arm/configs/pxa255-idp_defconfig
index 21c327883d8c..b71d31a4bb56 100644
--- a/arch/arm/configs/pxa255-idp_defconfig
+++ b/arch/arm/configs/pxa255-idp_defconfig
@@ -63,7 +63,6 @@ CONFIG_OBSOLETE_MODPARM=y
63# CONFIG_ARCH_CLPS711X is not set 63# CONFIG_ARCH_CLPS711X is not set
64# CONFIG_ARCH_CO285 is not set 64# CONFIG_ARCH_CO285 is not set
65# CONFIG_ARCH_EBSA110 is not set 65# CONFIG_ARCH_EBSA110 is not set
66# CONFIG_ARCH_CAMELOT is not set
67# CONFIG_ARCH_FOOTBRIDGE is not set 66# CONFIG_ARCH_FOOTBRIDGE is not set
68# CONFIG_ARCH_INTEGRATOR is not set 67# CONFIG_ARCH_INTEGRATOR is not set
69# CONFIG_ARCH_IOP3XX is not set 68# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/realview_defconfig b/arch/arm/configs/realview_defconfig
index 0485b2f1cc20..3f1ec4e304f7 100644
--- a/arch/arm/configs/realview_defconfig
+++ b/arch/arm/configs/realview_defconfig
@@ -65,7 +65,6 @@ CONFIG_OBSOLETE_MODPARM=y
65# CONFIG_ARCH_CLPS711X is not set 65# CONFIG_ARCH_CLPS711X is not set
66# CONFIG_ARCH_CO285 is not set 66# CONFIG_ARCH_CO285 is not set
67# CONFIG_ARCH_EBSA110 is not set 67# CONFIG_ARCH_EBSA110 is not set
68# CONFIG_ARCH_CAMELOT is not set
69# CONFIG_ARCH_FOOTBRIDGE is not set 68# CONFIG_ARCH_FOOTBRIDGE is not set
70# CONFIG_ARCH_INTEGRATOR is not set 69# CONFIG_ARCH_INTEGRATOR is not set
71# CONFIG_ARCH_IOP3XX is not set 70# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/rpc_defconfig b/arch/arm/configs/rpc_defconfig
index 19184c1010ad..b498afdc03b6 100644
--- a/arch/arm/configs/rpc_defconfig
+++ b/arch/arm/configs/rpc_defconfig
@@ -66,7 +66,6 @@ CONFIG_KMOD=y
66# CONFIG_ARCH_CLPS711X is not set 66# CONFIG_ARCH_CLPS711X is not set
67# CONFIG_ARCH_CO285 is not set 67# CONFIG_ARCH_CO285 is not set
68# CONFIG_ARCH_EBSA110 is not set 68# CONFIG_ARCH_EBSA110 is not set
69# CONFIG_ARCH_CAMELOT is not set
70# CONFIG_ARCH_FOOTBRIDGE is not set 69# CONFIG_ARCH_FOOTBRIDGE is not set
71# CONFIG_ARCH_INTEGRATOR is not set 70# CONFIG_ARCH_INTEGRATOR is not set
72# CONFIG_ARCH_IOP3XX is not set 71# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig
index 3f97590c91f2..33f31080a98c 100644
--- a/arch/arm/configs/s3c2410_defconfig
+++ b/arch/arm/configs/s3c2410_defconfig
@@ -85,7 +85,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
85# CONFIG_ARCH_CLPS711X is not set 85# CONFIG_ARCH_CLPS711X is not set
86# CONFIG_ARCH_CO285 is not set 86# CONFIG_ARCH_CO285 is not set
87# CONFIG_ARCH_EBSA110 is not set 87# CONFIG_ARCH_EBSA110 is not set
88# CONFIG_ARCH_CAMELOT is not set
89# CONFIG_ARCH_FOOTBRIDGE is not set 88# CONFIG_ARCH_FOOTBRIDGE is not set
90# CONFIG_ARCH_INTEGRATOR is not set 89# CONFIG_ARCH_INTEGRATOR is not set
91# CONFIG_ARCH_IOP3XX is not set 90# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/shannon_defconfig b/arch/arm/configs/shannon_defconfig
index e3facc4fe792..d052c8f80515 100644
--- a/arch/arm/configs/shannon_defconfig
+++ b/arch/arm/configs/shannon_defconfig
@@ -62,7 +62,6 @@ CONFIG_OBSOLETE_MODPARM=y
62# CONFIG_ARCH_CLPS711X is not set 62# CONFIG_ARCH_CLPS711X is not set
63# CONFIG_ARCH_CO285 is not set 63# CONFIG_ARCH_CO285 is not set
64# CONFIG_ARCH_EBSA110 is not set 64# CONFIG_ARCH_EBSA110 is not set
65# CONFIG_ARCH_CAMELOT is not set
66# CONFIG_ARCH_FOOTBRIDGE is not set 65# CONFIG_ARCH_FOOTBRIDGE is not set
67# CONFIG_ARCH_INTEGRATOR is not set 66# CONFIG_ARCH_INTEGRATOR is not set
68# CONFIG_ARCH_IOP3XX is not set 67# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/shark_defconfig b/arch/arm/configs/shark_defconfig
index 271823f0d708..c48d17062262 100644
--- a/arch/arm/configs/shark_defconfig
+++ b/arch/arm/configs/shark_defconfig
@@ -66,7 +66,6 @@ CONFIG_KMOD=y
66# CONFIG_ARCH_CLPS711X is not set 66# CONFIG_ARCH_CLPS711X is not set
67# CONFIG_ARCH_CO285 is not set 67# CONFIG_ARCH_CO285 is not set
68# CONFIG_ARCH_EBSA110 is not set 68# CONFIG_ARCH_EBSA110 is not set
69# CONFIG_ARCH_CAMELOT is not set
70# CONFIG_ARCH_FOOTBRIDGE is not set 69# CONFIG_ARCH_FOOTBRIDGE is not set
71# CONFIG_ARCH_INTEGRATOR is not set 70# CONFIG_ARCH_INTEGRATOR is not set
72# CONFIG_ARCH_IOP3XX is not set 71# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/simpad_defconfig b/arch/arm/configs/simpad_defconfig
index 5373eeb7d578..2e5a616cc98d 100644
--- a/arch/arm/configs/simpad_defconfig
+++ b/arch/arm/configs/simpad_defconfig
@@ -64,7 +64,6 @@ CONFIG_KMOD=y
64# CONFIG_ARCH_CLPS711X is not set 64# CONFIG_ARCH_CLPS711X is not set
65# CONFIG_ARCH_CO285 is not set 65# CONFIG_ARCH_CO285 is not set
66# CONFIG_ARCH_EBSA110 is not set 66# CONFIG_ARCH_EBSA110 is not set
67# CONFIG_ARCH_CAMELOT is not set
68# CONFIG_ARCH_FOOTBRIDGE is not set 67# CONFIG_ARCH_FOOTBRIDGE is not set
69# CONFIG_ARCH_INTEGRATOR is not set 68# CONFIG_ARCH_INTEGRATOR is not set
70# CONFIG_ARCH_IOP3XX is not set 69# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/smdk2410_defconfig b/arch/arm/configs/smdk2410_defconfig
index 2c60865fda19..4d123d33c7df 100644
--- a/arch/arm/configs/smdk2410_defconfig
+++ b/arch/arm/configs/smdk2410_defconfig
@@ -58,7 +58,6 @@ CONFIG_BASE_SMALL=0
58# CONFIG_ARCH_CLPS711X is not set 58# CONFIG_ARCH_CLPS711X is not set
59# CONFIG_ARCH_CO285 is not set 59# CONFIG_ARCH_CO285 is not set
60# CONFIG_ARCH_EBSA110 is not set 60# CONFIG_ARCH_EBSA110 is not set
61# CONFIG_ARCH_CAMELOT is not set
62# CONFIG_ARCH_FOOTBRIDGE is not set 61# CONFIG_ARCH_FOOTBRIDGE is not set
63# CONFIG_ARCH_INTEGRATOR is not set 62# CONFIG_ARCH_INTEGRATOR is not set
64# CONFIG_ARCH_IOP3XX is not set 63# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/spitz_defconfig b/arch/arm/configs/spitz_defconfig
index 9895539533d6..d1ace3abfd8a 100644
--- a/arch/arm/configs/spitz_defconfig
+++ b/arch/arm/configs/spitz_defconfig
@@ -87,7 +87,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
87# CONFIG_ARCH_CLPS711X is not set 87# CONFIG_ARCH_CLPS711X is not set
88# CONFIG_ARCH_CO285 is not set 88# CONFIG_ARCH_CO285 is not set
89# CONFIG_ARCH_EBSA110 is not set 89# CONFIG_ARCH_EBSA110 is not set
90# CONFIG_ARCH_CAMELOT is not set
91# CONFIG_ARCH_FOOTBRIDGE is not set 90# CONFIG_ARCH_FOOTBRIDGE is not set
92# CONFIG_ARCH_INTEGRATOR is not set 91# CONFIG_ARCH_INTEGRATOR is not set
93# CONFIG_ARCH_IOP3XX is not set 92# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/configs/versatile_defconfig b/arch/arm/configs/versatile_defconfig
index d72f2c754268..2687a225aa6a 100644
--- a/arch/arm/configs/versatile_defconfig
+++ b/arch/arm/configs/versatile_defconfig
@@ -64,7 +64,6 @@ CONFIG_KMOD=y
64# CONFIG_ARCH_CLPS711X is not set 64# CONFIG_ARCH_CLPS711X is not set
65# CONFIG_ARCH_CO285 is not set 65# CONFIG_ARCH_CO285 is not set
66# CONFIG_ARCH_EBSA110 is not set 66# CONFIG_ARCH_EBSA110 is not set
67# CONFIG_ARCH_CAMELOT is not set
68# CONFIG_ARCH_FOOTBRIDGE is not set 67# CONFIG_ARCH_FOOTBRIDGE is not set
69# CONFIG_ARCH_INTEGRATOR is not set 68# CONFIG_ARCH_INTEGRATOR is not set
70# CONFIG_ARCH_IOP3XX is not set 69# CONFIG_ARCH_IOP3XX is not set
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index b5645c4462cf..1d50d2b98f55 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -710,7 +710,8 @@ int setup_irq(unsigned int irq, struct irqaction *new)
710 desc->pending = 0; 710 desc->pending = 0;
711 desc->disable_depth = 1; 711 desc->disable_depth = 1;
712 712
713 if (new->flags & SA_TRIGGER_MASK) { 713 if (new->flags & SA_TRIGGER_MASK &&
714 desc->chip->set_type) {
714 unsigned int type = new->flags & SA_TRIGGER_MASK; 715 unsigned int type = new->flags & SA_TRIGGER_MASK;
715 desc->chip->set_type(irq, type); 716 desc->chip->set_type(irq, type);
716 } 717 }
diff --git a/arch/arm/mach-at91rm9200/Kconfig b/arch/arm/mach-at91rm9200/Kconfig
new file mode 100644
index 000000000000..4b7218fc3eb1
--- /dev/null
+++ b/arch/arm/mach-at91rm9200/Kconfig
@@ -0,0 +1,54 @@
1if ARCH_AT91RM9200
2
3menu "AT91RM9200 Implementations"
4
5comment "AT91RM9200 Board Type"
6
7config ARCH_AT91RM9200DK
8 bool "Atmel AT91RM9200-DK Development board"
9 depends on ARCH_AT91RM9200
10 help
11 Select this if you are using Atmel's AT91RM9200-DK Development board
12
13config MACH_AT91RM9200EK
14 bool "Atmel AT91RM9200-EK Evaluation Kit"
15 depends on ARCH_AT91RM9200
16 help
17 Select this if you are using Atmel's AT91RM9200-EK Evaluation Kit
18
19config MACH_CSB337
20 bool "Cogent CSB337 board"
21 depends on ARCH_AT91RM9200
22 help
23 Select this if you are using Cogent's CSB337 board
24
25config MACH_CSB637
26 bool "Cogent CSB637 board"
27 depends on ARCH_AT91RM9200
28 help
29 Select this if you are using Cogent's CSB637 board
30
31config MACH_CARMEVA
32 bool "Conitec's ARM&EVA"
33 depends on ARCH_AT91RM9200
34 help
35 Select this if you are using Conitec's AT91RM9200-MCU-Module
36
37config MACH_KB9200
38 bool "KwikByte's KB920x"
39 depends on ARCH_AT91RM9200
40 help
41 Select this if you are using KwikByte's KB920x board
42
43
44comment "AT91RM9200 Feature Selections"
45
46config AT91_PROGRAMMABLE_CLOCKS
47 bool "Programmable Clocks"
48 help
49 Select this if you need to program one or more of the PCK0..PCK3
50 programmable clock outputs.
51
52endmenu
53
54endif
diff --git a/arch/arm/mach-at91rm9200/Makefile b/arch/arm/mach-at91rm9200/Makefile
new file mode 100644
index 000000000000..1f2805ca6e21
--- /dev/null
+++ b/arch/arm/mach-at91rm9200/Makefile
@@ -0,0 +1,27 @@
1#
2# Makefile for the linux kernel.
3#
4
5obj-y := clock.o irq.o time.o gpio.o common.o devices.o
6obj-m :=
7obj-n :=
8obj- :=
9
10# Board-specific support
11#obj-$(CONFIG_ARCH_AT91RM9200DK) += board-dk.o
12#obj-$(CONFIG_MACH_AT91RM9200EK) += board-ek.o
13#obj-$(CONFIG_MACH_CSB337) += board-csb337.o
14#obj-$(CONFIG_MACH_CSB637) += board-csb637.o
15#obj-$(CONFIG_MACH_CARMEVA) += board-carmeva.o
16#obj-$(CONFIG_MACH_KB9200) += board-kb9202.o
17
18# LEDs support
19#led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o
20#led-$(CONFIG_MACH_AT91RM9200EK) += leds.o
21#led-$(CONFIG_MACH_CSB337) += leds.o
22#led-$(CONFIG_MACH_CSB637) += leds.o
23#led-$(CONFIG_MACH_KB9200) += leds.o
24obj-$(CONFIG_LEDS) += $(led-y)
25
26# VGA support
27#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
index 000000000000..e667dcc7cd34
--- /dev/null
+++ b/arch/arm/mach-at91rm9200/Makefile.boot
@@ -0,0 +1,9 @@
1# Note: the following conditions must always be true:
2# ZRELADDR == virt_to_phys(TEXTADDR)
3# PARAMS_PHYS must be within 4MB of ZRELADDR
4# INITRD_PHYS must be in RAM
5
6 zreladdr-y := 0x20008000
7params_phys-y := 0x20000100
8initrd_phys-y := 0x20410000
9
diff --git a/arch/arm/mach-at91rm9200/clock.c b/arch/arm/mach-at91rm9200/clock.c
new file mode 100644
index 000000000000..ec8195a2a3cc
--- /dev/null
+++ b/arch/arm/mach-at91rm9200/clock.c
@@ -0,0 +1,620 @@
1/*
2 * linux/arch/arm/mach-at91rm9200/clock.c
3 *
4 * Copyright (C) 2005 David Brownell
5 * Copyright (C) 2005 Ivan Kokshaysky
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#include <linux/module.h>
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/fs.h>
17#include <linux/debugfs.h>
18#include <linux/seq_file.h>
19#include <linux/list.h>
20#include <linux/errno.h>
21#include <linux/err.h>
22#include <linux/spinlock.h>
23#include <linux/delay.h>
24#include <linux/clk.h>
25
26#include <asm/semaphore.h>
27#include <asm/io.h>
28#include <asm/mach-types.h>
29
30#include <asm/arch/hardware.h>
31#include <asm/arch/board.h> /* for master clock global */
32
33#include "generic.h"
34
35#undef DEBUG
36
37/*
38 * There's a lot more which can be done with clocks, including cpufreq
39 * integration, slow clock mode support (for system suspend), letting
40 * PLLB be used at other rates (on boards that don't need USB), etc.
41 */
42
43struct clk {
44 const char *name;
45 unsigned long rate_hz;
46 struct clk *parent;
47 u32 pmc_mask;
48 void (*mode)(struct clk *, int);
49 unsigned id:2; /* PCK0..3, or 32k/main/a/b */
50 unsigned primary:1;
51 unsigned pll:1;
52 unsigned programmable:1;
53 u16 users;
54};
55
56static spinlock_t clk_lock;
57static u32 at91_pllb_usb_init;
58
59/*
60 * Four primary clock sources: two crystal oscillators (32K, main), and
61 * two PLLs. PLLA usually runs the master clock; and PLLB must run at
62 * 48 MHz (unless no USB function clocks are needed). The main clock and
63 * both PLLs are turned off to run in "slow clock mode" (system suspend).
64 */
65static struct clk clk32k = {
66 .name = "clk32k",
67 .rate_hz = AT91_SLOW_CLOCK,
68 .users = 1, /* always on */
69 .id = 0,
70 .primary = 1,
71};
72static struct clk main_clk = {
73 .name = "main",
74 .pmc_mask = 1 << 0, /* in PMC_SR */
75 .users = 1,
76 .id = 1,
77 .primary = 1,
78};
79static struct clk plla = {
80 .name = "plla",
81 .parent = &main_clk,
82 .pmc_mask = 1 << 1, /* in PMC_SR */
83 .id = 2,
84 .primary = 1,
85 .pll = 1,
86};
87
88static void pllb_mode(struct clk *clk, int is_on)
89{
90 u32 value;
91
92 if (is_on) {
93 is_on = AT91_PMC_LOCKB;
94 value = at91_pllb_usb_init;
95 } else
96 value = 0;
97
98 at91_sys_write(AT91_CKGR_PLLBR, value);
99
100 do {
101 cpu_relax();
102 } while ((at91_sys_read(AT91_PMC_SR) & AT91_PMC_LOCKB) != is_on);
103}
104
105static struct clk pllb = {
106 .name = "pllb",
107 .parent = &main_clk,
108 .pmc_mask = 1 << 2, /* in PMC_SR */
109 .mode = pllb_mode,
110 .id = 3,
111 .primary = 1,
112 .pll = 1,
113};
114
115static void pmc_sys_mode(struct clk *clk, int is_on)
116{
117 if (is_on)
118 at91_sys_write(AT91_PMC_SCER, clk->pmc_mask);
119 else
120 at91_sys_write(AT91_PMC_SCDR, clk->pmc_mask);
121}
122
123/* USB function clocks (PLLB must be 48 MHz) */
124static struct clk udpck = {
125 .name = "udpck",
126 .parent = &pllb,
127 .pmc_mask = AT91_PMC_UDP,
128 .mode = pmc_sys_mode,
129};
130static struct clk uhpck = {
131 .name = "uhpck",
132 .parent = &pllb,
133 .pmc_mask = AT91_PMC_UHP,
134 .mode = pmc_sys_mode,
135};
136
137#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
138/*
139 * The four programmable clocks can be parented by any primary clock.
140 * You must configure pin multiplexing to bring these signals out.
141 */
142static struct clk pck0 = {
143 .name = "pck0",
144 .pmc_mask = AT91_PMC_PCK0,
145 .mode = pmc_sys_mode,
146 .programmable = 1,
147 .id = 0,
148};
149static struct clk pck1 = {
150 .name = "pck1",
151 .pmc_mask = AT91_PMC_PCK1,
152 .mode = pmc_sys_mode,
153 .programmable = 1,
154 .id = 1,
155};
156static struct clk pck2 = {
157 .name = "pck2",
158 .pmc_mask = AT91_PMC_PCK2,
159 .mode = pmc_sys_mode,
160 .programmable = 1,
161 .id = 2,
162};
163static struct clk pck3 = {
164 .name = "pck3",
165 .pmc_mask = AT91_PMC_PCK3,
166 .mode = pmc_sys_mode,
167 .programmable = 1,
168 .id = 3,
169};
170#endif /* CONFIG_AT91_PROGRAMMABLE_CLOCKS */
171
172
173/*
174 * The master clock is divided from the CPU clock (by 1-4). It's used for
175 * memory, interfaces to on-chip peripherals, the AIC, and sometimes more
176 * (e.g baud rate generation). It's sourced from one of the primary clocks.
177 */
178static struct clk mck = {
179 .name = "mck",
180 .pmc_mask = 1 << 3, /* in PMC_SR */
181 .users = 1, /* (must be) always on */
182};
183
184static void pmc_periph_mode(struct clk *clk, int is_on)
185{
186 if (is_on)
187 at91_sys_write(AT91_PMC_PCER, clk->pmc_mask);
188 else
189 at91_sys_write(AT91_PMC_PCDR, clk->pmc_mask);
190}
191
192static struct clk udc_clk = {
193 .name = "udc_clk",
194 .parent = &mck,
195 .pmc_mask = 1 << AT91_ID_UDP,
196 .mode = pmc_periph_mode,
197};
198static struct clk ohci_clk = {
199 .name = "ohci_clk",
200 .parent = &mck,
201 .pmc_mask = 1 << AT91_ID_UHP,
202 .mode = pmc_periph_mode,
203};
204
205static struct clk *const clock_list[] = {
206 /* four primary clocks -- MUST BE FIRST! */
207 &clk32k,
208 &main_clk,
209 &plla,
210 &pllb,
211
212 /* PLLB children (USB) */
213 &udpck,
214 &uhpck,
215
216#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
217 /* programmable clocks */
218 &pck0,
219 &pck1,
220 &pck2,
221 &pck3,
222#endif /* CONFIG_AT91_PROGRAMMABLE_CLOCKS */
223
224 /* MCK and peripherals */
225 &mck,
226 // usart0..usart3
227 // mmc
228 &udc_clk,
229 // i2c
230 // spi
231 // ssc0..ssc2
232 // tc0..tc5
233 &ohci_clk,
234 // ether
235};
236
237
238/* clocks are all static for now; no refcounting necessary */
239struct clk *clk_get(struct device *dev, const char *id)
240{
241 int i;
242
243 for (i = 0; i < ARRAY_SIZE(clock_list); i++) {
244 if (strcmp(id, clock_list[i]->name) == 0)
245 return clock_list[i];
246 }
247
248 return ERR_PTR(-ENOENT);
249}
250EXPORT_SYMBOL(clk_get);
251
252void clk_put(struct clk *clk)
253{
254}
255EXPORT_SYMBOL(clk_put);
256
257static void __clk_enable(struct clk *clk)
258{
259 if (clk->parent)
260 __clk_enable(clk->parent);
261 if (clk->users++ == 0 && clk->mode)
262 clk->mode(clk, 1);
263}
264
265int clk_enable(struct clk *clk)
266{
267 unsigned long flags;
268
269 spin_lock_irqsave(&clk_lock, flags);
270 __clk_enable(clk);
271 spin_unlock_irqrestore(&clk_lock, flags);
272 return 0;
273}
274EXPORT_SYMBOL(clk_enable);
275
276static void __clk_disable(struct clk *clk)
277{
278 BUG_ON(clk->users == 0);
279 if (--clk->users == 0 && clk->mode)
280 clk->mode(clk, 0);
281 if (clk->parent)
282 __clk_disable(clk->parent);
283}
284
285void clk_disable(struct clk *clk)
286{
287 unsigned long flags;
288
289 spin_lock_irqsave(&clk_lock, flags);
290 __clk_disable(clk);
291 spin_unlock_irqrestore(&clk_lock, flags);
292}
293EXPORT_SYMBOL(clk_disable);
294
295unsigned long clk_get_rate(struct clk *clk)
296{
297 unsigned long flags;
298 unsigned long rate;
299
300 spin_lock_irqsave(&clk_lock, flags);
301 for (;;) {
302 rate = clk->rate_hz;
303 if (rate || !clk->parent)
304 break;
305 clk = clk->parent;
306 }
307 spin_unlock_irqrestore(&clk_lock, flags);
308 return rate;
309}
310EXPORT_SYMBOL(clk_get_rate);
311
312/*------------------------------------------------------------------------*/
313
314#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
315
316/*
317 * For now, only the programmable clocks support reparenting (MCK could
318 * do this too, with care) or rate changing (the PLLs could do this too,
319 * ditto MCK but that's more for cpufreq). Drivers may reparent to get
320 * a better rate match; we don't.
321 */
322
323long clk_round_rate(struct clk *clk, unsigned long rate)
324{
325 unsigned long flags;
326 unsigned prescale;
327 unsigned long actual;
328
329 if (!clk->programmable)
330 return -EINVAL;
331 spin_lock_irqsave(&clk_lock, flags);
332
333 actual = clk->parent->rate_hz;
334 for (prescale = 0; prescale < 7; prescale++) {
335 if (actual && actual <= rate)
336 break;
337 actual >>= 1;
338 }
339
340 spin_unlock_irqrestore(&clk_lock, flags);
341 return (prescale < 7) ? actual : -ENOENT;
342}
343EXPORT_SYMBOL(clk_round_rate);
344
345int clk_set_rate(struct clk *clk, unsigned long rate)
346{
347 unsigned long flags;
348 unsigned prescale;
349 unsigned long actual;
350
351 if (!clk->programmable)
352 return -EINVAL;
353 if (clk->users)
354 return -EBUSY;
355 spin_lock_irqsave(&clk_lock, flags);
356
357 actual = clk->parent->rate_hz;
358 for (prescale = 0; prescale < 7; prescale++) {
359 if (actual && actual <= rate) {
360 u32 pckr;
361
362 pckr = at91_sys_read(AT91_PMC_PCKR(clk->id));
363 pckr &= 0x03;
364 pckr |= prescale << 2;
365 at91_sys_write(AT91_PMC_PCKR(clk->id), pckr);
366 clk->rate_hz = actual;
367 break;
368 }
369 actual >>= 1;
370 }
371
372 spin_unlock_irqrestore(&clk_lock, flags);
373 return (prescale < 7) ? actual : -ENOENT;
374}
375EXPORT_SYMBOL(clk_set_rate);
376
377struct clk *clk_get_parent(struct clk *clk)
378{
379 return clk->parent;
380}
381EXPORT_SYMBOL(clk_get_parent);
382
383int clk_set_parent(struct clk *clk, struct clk *parent)
384{
385 unsigned long flags;
386
387 if (clk->users)
388 return -EBUSY;
389 if (!parent->primary || !clk->programmable)
390 return -EINVAL;
391 spin_lock_irqsave(&clk_lock, flags);
392
393 clk->rate_hz = parent->rate_hz;
394 clk->parent = parent;
395 at91_sys_write(AT91_PMC_PCKR(clk->id), parent->id);
396
397 spin_unlock_irqrestore(&clk_lock, flags);
398 return 0;
399}
400EXPORT_SYMBOL(clk_set_parent);
401
402#endif /* CONFIG_AT91_PROGRAMMABLE_CLOCKS */
403
404/*------------------------------------------------------------------------*/
405
406#ifdef CONFIG_DEBUG_FS
407
408static int at91_clk_show(struct seq_file *s, void *unused)
409{
410 u32 scsr, pcsr, sr;
411 unsigned i;
412
413 seq_printf(s, "SCSR = %8x\n", scsr = at91_sys_read(AT91_PMC_SCSR));
414 seq_printf(s, "PCSR = %8x\n", pcsr = at91_sys_read(AT91_PMC_PCSR));
415
416 seq_printf(s, "MOR = %8x\n", at91_sys_read(AT91_CKGR_MOR));
417 seq_printf(s, "MCFR = %8x\n", at91_sys_read(AT91_CKGR_MCFR));
418 seq_printf(s, "PLLA = %8x\n", at91_sys_read(AT91_CKGR_PLLAR));
419 seq_printf(s, "PLLB = %8x\n", at91_sys_read(AT91_CKGR_PLLBR));
420
421 seq_printf(s, "MCKR = %8x\n", at91_sys_read(AT91_PMC_MCKR));
422 for (i = 0; i < 4; i++)
423 seq_printf(s, "PCK%d = %8x\n", i, at91_sys_read(AT91_PMC_PCKR(i)));
424 seq_printf(s, "SR = %8x\n", sr = at91_sys_read(AT91_PMC_SR));
425
426 seq_printf(s, "\n");
427
428 for (i = 0; i < ARRAY_SIZE(clock_list); i++) {
429 char *state;
430 struct clk *clk = clock_list[i];
431
432 if (clk->mode == pmc_sys_mode)
433 state = (scsr & clk->pmc_mask) ? "on" : "off";
434 else if (clk->mode == pmc_periph_mode)
435 state = (pcsr & clk->pmc_mask) ? "on" : "off";
436 else if (clk->pmc_mask)
437 state = (sr & clk->pmc_mask) ? "on" : "off";
438 else if (clk == &clk32k || clk == &main_clk)
439 state = "on";
440 else
441 state = "";
442
443 seq_printf(s, "%-10s users=%d %-3s %9ld Hz %s\n",
444 clk->name, clk->users, state, clk_get_rate(clk),
445 clk->parent ? clk->parent->name : "");
446 }
447 return 0;
448}
449
450static int at91_clk_open(struct inode *inode, struct file *file)
451{
452 return single_open(file, at91_clk_show, NULL);
453}
454
455static struct file_operations at91_clk_operations = {
456 .open = at91_clk_open,
457 .read = seq_read,
458 .llseek = seq_lseek,
459 .release = single_release,
460};
461
462static int __init at91_clk_debugfs_init(void)
463{
464 /* /sys/kernel/debug/at91_clk */
465 (void) debugfs_create_file("at91_clk", S_IFREG | S_IRUGO, NULL, NULL, &at91_clk_operations);
466
467 return 0;
468}
469postcore_initcall(at91_clk_debugfs_init);
470
471#endif
472
473/*------------------------------------------------------------------------*/
474
475static u32 __init at91_pll_rate(struct clk *pll, u32 freq, u32 reg)
476{
477 unsigned mul, div;
478
479 div = reg & 0xff;
480 mul = (reg >> 16) & 0x7ff;
481 if (div && mul) {
482 freq /= div;
483 freq *= mul + 1;
484 } else
485 freq = 0;
486 if (pll == &pllb && (reg & (1 << 28)))
487 freq /= 2;
488 return freq;
489}
490
491static unsigned __init at91_pll_calc(unsigned main_freq, unsigned out_freq)
492{
493 unsigned i, div = 0, mul = 0, diff = 1 << 30;
494 unsigned ret = (out_freq > 155000000) ? 0xbe00 : 0x3e00;
495
496 /* PLL output max 240 MHz (or 180 MHz per errata) */
497 if (out_freq > 240000000)
498 goto fail;
499
500 for (i = 1; i < 256; i++) {
501 int diff1;
502 unsigned input, mul1;
503
504 /*
505 * PLL input between 1MHz and 32MHz per spec, but lower
506 * frequences seem necessary in some cases so allow 100K.
507 */
508 input = main_freq / i;
509 if (input < 100000)
510 continue;
511 if (input > 32000000)
512 continue;
513
514 mul1 = out_freq / input;
515 if (mul1 > 2048)
516 continue;
517 if (mul1 < 2)
518 goto fail;
519
520 diff1 = out_freq - input * mul1;
521 if (diff1 < 0)
522 diff1 = -diff1;
523 if (diff > diff1) {
524 diff = diff1;
525 div = i;
526 mul = mul1;
527 if (diff == 0)
528 break;
529 }
530 }
531 if (i == 256 && diff > (out_freq >> 5))
532 goto fail;
533 return ret | ((mul - 1) << 16) | div;
534fail:
535 return 0;
536}
537
538int __init at91_clock_init(unsigned long main_clock)
539{
540 unsigned tmp, freq, mckr;
541
542 spin_lock_init(&clk_lock);
543
544 /*
545 * When the bootloader initialized the main oscillator correctly,
546 * there's no problem using the cycle counter. But if it didn't,
547 * or when using oscillator bypass mode, we must be told the speed
548 * of the main clock.
549 */
550 if (!main_clock) {
551 do {
552 tmp = at91_sys_read(AT91_CKGR_MCFR);
553 } while (!(tmp & 0x10000));
554 main_clock = (tmp & 0xffff) * (AT91_SLOW_CLOCK / 16);
555 }
556 main_clk.rate_hz = main_clock;
557
558 /* report if PLLA is more than mildly overclocked */
559 plla.rate_hz = at91_pll_rate(&plla, main_clock, at91_sys_read(AT91_CKGR_PLLAR));
560 if (plla.rate_hz > 209000000)
561 pr_info("Clocks: PLLA overclocked, %ld MHz\n", plla.rate_hz / 1000000);
562
563 /*
564 * USB clock init: choose 48 MHz PLLB value, turn all clocks off,
565 * disable 48MHz clock during usb peripheral suspend.
566 *
567 * REVISIT: assumes MCK doesn't derive from PLLB!
568 */
569 at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | 0x10000000;
570 pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init);
571 at91_sys_write(AT91_PMC_PCDR, (1 << AT91_ID_UHP) | (1 << AT91_ID_UDP));
572 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_UHP | AT91_PMC_UDP);
573 at91_sys_write(AT91_CKGR_PLLBR, 0);
574 at91_sys_write(AT91_PMC_SCER, AT91_PMC_MCKUDP);
575
576 /*
577 * MCK and CPU derive from one of those primary clocks.
578 * For now, assume this parentage won't change.
579 */
580 mckr = at91_sys_read(AT91_PMC_MCKR);
581 mck.parent = clock_list[mckr & AT91_PMC_CSS];
582 mck.parent->users++;
583 freq = mck.parent->rate_hz;
584 freq /= (1 << ((mckr >> 2) & 3)); /* prescale */
585 mck.rate_hz = freq / (1 + ((mckr >> 8) & 3)); /* mdiv */
586
587 printk("Clocks: CPU %u MHz, master %u MHz, main %u.%03u MHz\n",
588 freq / 1000000, (unsigned) mck.rate_hz / 1000000,
589 (unsigned) main_clock / 1000000,
590 ((unsigned) main_clock % 1000000) / 1000);
591
592 /* FIXME get rid of master_clock global */
593 at91_master_clock = mck.rate_hz;
594
595#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
596 /* establish PCK0..PCK3 parentage */
597 for (tmp = 0; tmp < ARRAY_SIZE(clock_list); tmp++) {
598 struct clk *clk = clock_list[tmp], *parent;
599 u32 pckr;
600
601 if (!clk->programmable)
602 continue;
603
604 pckr = at91_sys_read(AT91_PMC_PCKR(clk->id));
605 parent = clock_list[pckr & 3];
606 clk->parent = parent;
607 clk->rate_hz = parent->rate_hz / (1 << ((pckr >> 2) & 3));
608 }
609#else
610 /* disable unused clocks */
611 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK0 | AT91_PMC_PCK1 | AT91_PMC_PCK2 | AT91_PMC_PCK3);
612#endif /* CONFIG_AT91_PROGRAMMABLE_CLOCKS */
613
614 /* FIXME several unused clocks may still be active... provide
615 * a CONFIG option to turn off all unused clocks at some point
616 * before driver init starts.
617 */
618
619 return 0;
620}
diff --git a/arch/arm/mach-at91rm9200/common.c b/arch/arm/mach-at91rm9200/common.c
new file mode 100644
index 000000000000..3848fd2d5596
--- /dev/null
+++ b/arch/arm/mach-at91rm9200/common.c
@@ -0,0 +1,115 @@
1/*
2 * arch/arm/mach-at91rm9200/common.c
3 *
4 * Copyright (C) 2005 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 */
12
13#include <linux/config.h>
14#include <linux/module.h>
15
16#include <asm/mach/arch.h>
17#include <asm/mach/map.h>
18
19#include <asm/arch/hardware.h>
20
21static struct map_desc at91rm9200_io_desc[] __initdata = {
22 {
23 .virtual = AT91_VA_BASE_SYS,
24 .pfn = __phys_to_pfn(AT91_BASE_SYS),
25 .length = SZ_4K,
26 .type = MT_DEVICE,
27 }, {
28 .virtual = AT91_VA_BASE_SPI,
29 .pfn = __phys_to_pfn(AT91_BASE_SPI),
30 .length = SZ_16K,
31 .type = MT_DEVICE,
32 }, {
33 .virtual = AT91_VA_BASE_SSC2,
34 .pfn = __phys_to_pfn(AT91_BASE_SSC2),
35 .length = SZ_16K,
36 .type = MT_DEVICE,
37 }, {
38 .virtual = AT91_VA_BASE_SSC1,
39 .pfn = __phys_to_pfn(AT91_BASE_SSC1),
40 .length = SZ_16K,
41 .type = MT_DEVICE,
42 }, {
43 .virtual = AT91_VA_BASE_SSC0,
44 .pfn = __phys_to_pfn(AT91_BASE_SSC0),
45 .length = SZ_16K,
46 .type = MT_DEVICE,
47 }, {
48 .virtual = AT91_VA_BASE_US3,
49 .pfn = __phys_to_pfn(AT91_BASE_US3),
50 .length = SZ_16K,
51 .type = MT_DEVICE,
52 }, {
53 .virtual = AT91_VA_BASE_US2,
54 .pfn = __phys_to_pfn(AT91_BASE_US2),
55 .length = SZ_16K,
56 .type = MT_DEVICE,
57 }, {
58 .virtual = AT91_VA_BASE_US1,
59 .pfn = __phys_to_pfn(AT91_BASE_US1),
60 .length = SZ_16K,
61 .type = MT_DEVICE,
62 }, {
63 .virtual = AT91_VA_BASE_US0,
64 .pfn = __phys_to_pfn(AT91_BASE_US0),
65 .length = SZ_16K,
66 .type = MT_DEVICE,
67 }, {
68 .virtual = AT91_VA_BASE_EMAC,
69 .pfn = __phys_to_pfn(AT91_BASE_EMAC),
70 .length = SZ_16K,
71 .type = MT_DEVICE,
72 }, {
73 .virtual = AT91_VA_BASE_TWI,
74 .pfn = __phys_to_pfn(AT91_BASE_TWI),
75 .length = SZ_16K,
76 .type = MT_DEVICE,
77 }, {
78 .virtual = AT91_VA_BASE_MCI,
79 .pfn = __phys_to_pfn(AT91_BASE_MCI),
80 .length = SZ_16K,
81 .type = MT_DEVICE,
82 }, {
83 .virtual = AT91_VA_BASE_UDP,
84 .pfn = __phys_to_pfn(AT91_BASE_UDP),
85 .length = SZ_16K,
86 .type = MT_DEVICE,
87 }, {
88 .virtual = AT91_VA_BASE_TCB1,
89 .pfn = __phys_to_pfn(AT91_BASE_TCB1),
90 .length = SZ_16K,
91 .type = MT_DEVICE,
92 }, {
93 .virtual = AT91_VA_BASE_TCB0,
94 .pfn = __phys_to_pfn(AT91_BASE_TCB0),
95 .length = SZ_16K,
96 .type = MT_DEVICE,
97 },
98};
99
100void __init at91rm9200_map_io(void)
101{
102 iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc));
103}
104
105
106unsigned long at91_master_clock;
107
108EXPORT_SYMBOL(at91_master_clock);
109
110
111int at91_serial_map[AT91_NR_UART];
112int at91_console_port;
113
114EXPORT_SYMBOL(at91_serial_map);
115EXPORT_SYMBOL(at91_console_port);
diff --git a/arch/arm/mach-at91rm9200/devices.c b/arch/arm/mach-at91rm9200/devices.c
new file mode 100644
index 000000000000..8df3e5245651
--- /dev/null
+++ b/arch/arm/mach-at91rm9200/devices.c
@@ -0,0 +1,291 @@
1/*
2 * arch/arm/mach-at91rm9200/devices.c
3 *
4 * Copyright (C) 2005 Thibaut VARENE <varenet@parisc-linux.org>
5 * Copyright (C) 2005 David Brownell
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 */
13#include <asm/mach/arch.h>
14#include <asm/mach/map.h>
15
16#include <linux/config.h>
17#include <linux/platform_device.h>
18
19#include <asm/arch/board.h>
20#include <asm/arch/pio.h>
21
22
23/* --------------------------------------------------------------------
24 * USB Host
25 * -------------------------------------------------------------------- */
26
27#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
28static u64 ohci_dmamask = 0xffffffffUL;
29static struct at91_usbh_data usbh_data;
30
31static struct resource at91rm9200_usbh_resource[] = {
32 [0] = {
33 .start = AT91_UHP_BASE,
34 .end = AT91_UHP_BASE + SZ_1M -1,
35 .flags = IORESOURCE_MEM,
36 },
37 [1] = {
38 .start = AT91_ID_UHP,
39 .end = AT91_ID_UHP,
40 .flags = IORESOURCE_IRQ,
41 },
42};
43
44static struct platform_device at91rm9200_usbh_device = {
45 .name = "at91rm9200-ohci",
46 .id = -1,
47 .dev = {
48 .dma_mask = &ohci_dmamask,
49 .coherent_dma_mask = 0xffffffff,
50 .platform_data = &usbh_data,
51 },
52 .resource = at91rm9200_usbh_resource,
53 .num_resources = ARRAY_SIZE(at91rm9200_usbh_resource),
54};
55
56void __init at91_add_device_usbh(struct at91_usbh_data *data)
57{
58 if (!data)
59 return;
60
61 usbh_data = *data;
62 platform_device_register(&at91rm9200_usbh_device);
63}
64#else
65void __init at91_add_device_usbh(struct at91_usbh_data *data) {}
66#endif
67
68
69/* --------------------------------------------------------------------
70 * USB Device (Gadget)
71 * -------------------------------------------------------------------- */
72
73#ifdef CONFIG_USB_GADGET_AT91
74static struct at91_udc_data udc_data;
75
76static struct resource at91_udc_resources[] = {
77 {
78 .start = AT91_BASE_UDP,
79 .end = AT91_BASE_UDP + SZ_16K - 1,
80 .flags = IORESOURCE_MEM,
81 }
82};
83
84static struct platform_device at91rm9200_udc_device = {
85 .name = "at91_udc",
86 .id = -1,
87 .dev = {
88 .platform_data = &udc_data,
89 },
90 .resource = at91_udc_resources,
91 .num_resources = ARRAY_SIZE(at91_udc_resources),
92};
93
94void __init at91_add_device_udc(struct at91_udc_data *data)
95{
96 if (!data)
97 return;
98
99 if (data->vbus_pin) {
100 at91_set_gpio_input(data->vbus_pin, 0);
101 at91_set_deglitch(data->vbus_pin, 1);
102 }
103 if (data->pullup_pin)
104 at91_set_gpio_output(data->pullup_pin, 0);
105
106 udc_data = *data;
107 platform_device_register(&at91rm9200_udc_device);
108}
109#else
110void __init at91_add_device_udc(struct at91_udc_data *data) {}
111#endif
112
113
114/* --------------------------------------------------------------------
115 * Ethernet
116 * -------------------------------------------------------------------- */
117
118#if defined(CONFIG_ARM_AT91_ETHER) || defined(CONFIG_ARM_AT91_ETHER_MODULE)
119static u64 eth_dmamask = 0xffffffffUL;
120static struct at91_eth_data eth_data;
121
122static struct platform_device at91rm9200_eth_device = {
123 .name = "at91_ether",
124 .id = -1,
125 .dev = {
126 .dma_mask = &eth_dmamask,
127 .coherent_dma_mask = 0xffffffff,
128 .platform_data = &eth_data,
129 },
130 .num_resources = 0,
131};
132
133void __init at91_add_device_eth(struct at91_eth_data *data)
134{
135 if (!data)
136 return;
137
138 if (data->phy_irq_pin) {
139 at91_set_gpio_input(data->phy_irq_pin, 0);
140 at91_set_deglitch(data->phy_irq_pin, 1);
141 }
142
143 /* Pins used for MII and RMII */
144 at91_set_A_periph(AT91_PIN_PA16, 0); /* EMDIO */
145 at91_set_A_periph(AT91_PIN_PA15, 0); /* EMDC */
146 at91_set_A_periph(AT91_PIN_PA14, 0); /* ERXER */
147 at91_set_A_periph(AT91_PIN_PA13, 0); /* ERX1 */
148 at91_set_A_periph(AT91_PIN_PA12, 0); /* ERX0 */
149 at91_set_A_periph(AT91_PIN_PA11, 0); /* ECRS_ECRSDV */
150 at91_set_A_periph(AT91_PIN_PA10, 0); /* ETX1 */
151 at91_set_A_periph(AT91_PIN_PA9, 0); /* ETX0 */
152 at91_set_A_periph(AT91_PIN_PA8, 0); /* ETXEN */
153 at91_set_A_periph(AT91_PIN_PA7, 0); /* ETXCK_EREFCK */
154
155 if (!data->is_rmii) {
156 at91_set_B_periph(AT91_PIN_PB19, 0); /* ERXCK */
157 at91_set_B_periph(AT91_PIN_PB18, 0); /* ECOL */
158 at91_set_B_periph(AT91_PIN_PB17, 0); /* ERXDV */
159 at91_set_B_periph(AT91_PIN_PB16, 0); /* ERX3 */
160 at91_set_B_periph(AT91_PIN_PB15, 0); /* ERX2 */
161 at91_set_B_periph(AT91_PIN_PB14, 0); /* ETXER */
162 at91_set_B_periph(AT91_PIN_PB13, 0); /* ETX3 */
163 at91_set_B_periph(AT91_PIN_PB12, 0); /* ETX2 */
164 }
165
166 eth_data = *data;
167 platform_device_register(&at91rm9200_eth_device);
168}
169#else
170void __init at91_add_device_eth(struct at91_eth_data *data) {}
171#endif
172
173
174/* --------------------------------------------------------------------
175 * Compact Flash / PCMCIA
176 * -------------------------------------------------------------------- */
177
178#if defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE)
179static struct at91_cf_data cf_data;
180
181static struct platform_device at91rm9200_cf_device = {
182 .name = "at91_cf",
183 .id = -1,
184 .dev = {
185 .platform_data = &cf_data,
186 },
187 .num_resources = 0,
188};
189
190void __init at91_add_device_cf(struct at91_cf_data *data)
191{
192 if (!data)
193 return;
194
195 /* input/irq */
196 if (data->irq_pin) {
197 at91_set_gpio_input(data->irq_pin, 1);
198 at91_set_deglitch(data->irq_pin, 1);
199 }
200 at91_set_gpio_input(data->det_pin, 1);
201 at91_set_deglitch(data->det_pin, 1);
202
203 /* outputs, initially off */
204 if (data->vcc_pin)
205 at91_set_gpio_output(data->vcc_pin, 0);
206 at91_set_gpio_output(data->rst_pin, 0);
207
208 cf_data = *data;
209 platform_device_register(&at91rm9200_cf_device);
210}
211#else
212void __init at91_add_device_cf(struct at91_cf_data *data) {}
213#endif
214
215
216/* --------------------------------------------------------------------
217 * MMC / SD
218 * -------------------------------------------------------------------- */
219
220#if defined(CONFIG_MMC_AT91RM9200) || defined(CONFIG_MMC_AT91RM9200_MODULE)
221static u64 mmc_dmamask = 0xffffffffUL;
222static struct at91_mmc_data mmc_data;
223
224static struct resource at91_mmc_resources[] = {
225 {
226 .start = AT91_BASE_MCI,
227 .end = AT91_BASE_MCI + SZ_16K - 1,
228 .flags = IORESOURCE_MEM,
229 }
230};
231
232static struct platform_device at91rm9200_mmc_device = {
233 .name = "at91rm9200_mci",
234 .id = -1,
235 .dev = {
236 .dma_mask = &mmc_dmamask,
237 .coherent_dma_mask = 0xffffffff,
238 .platform_data = &mmc_data,
239 },
240 .resource = at91_mmc_resources,
241 .num_resources = ARRAY_SIZE(at91_mmc_resources),
242};
243
244void __init at91_add_device_mmc(struct at91_mmc_data *data)
245{
246 if (!data)
247 return;
248
249 /* input/irq */
250 if (data->det_pin) {
251 at91_set_gpio_input(data->det_pin, 1);
252 at91_set_deglitch(data->det_pin, 1);
253 }
254 if (data->wp_pin)
255 at91_set_gpio_input(data->wp_pin, 1);
256
257 /* CLK */
258 at91_set_A_periph(AT91_PIN_PA27, 0);
259
260 if (data->is_b) {
261 /* CMD */
262 at91_set_B_periph(AT91_PIN_PA8, 0);
263
264 /* DAT0, maybe DAT1..DAT3 */
265 at91_set_B_periph(AT91_PIN_PA9, 0);
266 if (data->wire4) {
267 at91_set_B_periph(AT91_PIN_PA10, 0);
268 at91_set_B_periph(AT91_PIN_PA11, 0);
269 at91_set_B_periph(AT91_PIN_PA12, 0);
270 }
271 } else {
272 /* CMD */
273 at91_set_A_periph(AT91_PIN_PA28, 0);
274
275 /* DAT0, maybe DAT1..DAT3 */
276 at91_set_A_periph(AT91_PIN_PA29, 0);
277 if (data->wire4) {
278 at91_set_B_periph(AT91_PIN_PB3, 0);
279 at91_set_B_periph(AT91_PIN_PB4, 0);
280 at91_set_B_periph(AT91_PIN_PB5, 0);
281 }
282 }
283
284 mmc_data = *data;
285 platform_device_register(&at91rm9200_mmc_device);
286}
287#else
288void __init at91_add_device_mmc(struct at91_mmc_data *data) {}
289#endif
290
291/* -------------------------------------------------------------------- */
diff --git a/arch/arm/mach-at91rm9200/generic.h b/arch/arm/mach-at91rm9200/generic.h
new file mode 100644
index 000000000000..9bd541eba0a0
--- /dev/null
+++ b/arch/arm/mach-at91rm9200/generic.h
@@ -0,0 +1,18 @@
1/*
2 * linux/arch/arm/mach-at91rm9200/generic.h
3 *
4 * Copyright (C) 2005 David Brownell
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11void at91_gpio_irq_setup(unsigned banks);
12
13struct sys_timer;
14extern struct sys_timer at91rm9200_timer;
15
16extern void __init at91rm9200_map_io(void);
17
18extern 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
index 000000000000..2fd2ef583e4d
--- /dev/null
+++ b/arch/arm/mach-at91rm9200/gpio.c
@@ -0,0 +1,302 @@
1/*
2 * linux/arch/arm/mach-at91rm9200/gpio.c
3 *
4 * Copyright (C) 2005 HP Labs
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 */
11
12#include <linux/errno.h>
13#include <linux/kernel.h>
14#include <linux/list.h>
15#include <linux/module.h>
16
17#include <asm/io.h>
18#include <asm/mach/irq.h>
19#include <asm/arch/hardware.h>
20#include <asm/arch/gpio.h>
21
22static const u32 pio_controller_offset[4] = {
23 AT91_PIOA,
24 AT91_PIOB,
25 AT91_PIOC,
26 AT91_PIOD,
27};
28
29static inline void __iomem *pin_to_controller(unsigned pin)
30{
31 void __iomem *sys_base = (void __iomem *) AT91_VA_BASE_SYS;
32
33 pin -= PIN_BASE;
34 pin /= 32;
35 if (likely(pin < BGA_GPIO_BANKS))
36 return sys_base + pio_controller_offset[pin];
37
38 return NULL;
39}
40
41static inline unsigned pin_to_mask(unsigned pin)
42{
43 pin -= PIN_BASE;
44 return 1 << (pin % 32);
45}
46
47
48/*--------------------------------------------------------------------------*/
49
50/* Not all hardware capabilities are exposed through these calls; they
51 * only encapsulate the most common features and modes. (So if you
52 * want to change signals in groups, do it directly.)
53 *
54 * Bootloaders will usually handle some of the pin multiplexing setup.
55 * The intent is certainly that by the time Linux is fully booted, all
56 * pins should have been fully initialized. These setup calls should
57 * only be used by board setup routines, or possibly in driver probe().
58 *
59 * For bootloaders doing all that setup, these calls could be inlined
60 * as NOPs so Linux won't duplicate any setup code
61 */
62
63
64/*
65 * mux the pin to the "A" internal peripheral role.
66 */
67int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup)
68{
69 void __iomem *pio = pin_to_controller(pin);
70 unsigned mask = pin_to_mask(pin);
71
72 if (!pio)
73 return -EINVAL;
74
75 __raw_writel(mask, pio + PIO_IDR);
76 __raw_writel(mask, pio + (use_pullup ? PIO_PUER : PIO_PUDR));
77 __raw_writel(mask, pio + PIO_ASR);
78 __raw_writel(mask, pio + PIO_PDR);
79 return 0;
80}
81EXPORT_SYMBOL(at91_set_A_periph);
82
83
84/*
85 * mux the pin to the "B" internal peripheral role.
86 */
87int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup)
88{
89 void __iomem *pio = pin_to_controller(pin);
90 unsigned mask = pin_to_mask(pin);
91
92 if (!pio)
93 return -EINVAL;
94
95 __raw_writel(mask, pio + PIO_IDR);
96 __raw_writel(mask, pio + (use_pullup ? PIO_PUER : PIO_PUDR));
97 __raw_writel(mask, pio + PIO_BSR);
98 __raw_writel(mask, pio + PIO_PDR);
99 return 0;
100}
101EXPORT_SYMBOL(at91_set_B_periph);
102
103
104/*
105 * mux the pin to the gpio controller (instead of "A" or "B" peripheral), and
106 * configure it for an input.
107 */
108int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup)
109{
110 void __iomem *pio = pin_to_controller(pin);
111 unsigned mask = pin_to_mask(pin);
112
113 if (!pio)
114 return -EINVAL;
115
116 __raw_writel(mask, pio + PIO_IDR);
117 __raw_writel(mask, pio + (use_pullup ? PIO_PUER : PIO_PUDR));
118 __raw_writel(mask, pio + PIO_ODR);
119 __raw_writel(mask, pio + PIO_PER);
120 return 0;
121}
122EXPORT_SYMBOL(at91_set_gpio_input);
123
124
125/*
126 * mux the pin to the gpio controller (instead of "A" or "B" peripheral),
127 * and configure it for an output.
128 */
129int __init_or_module at91_set_gpio_output(unsigned pin, int value)
130{
131 void __iomem *pio = pin_to_controller(pin);
132 unsigned mask = pin_to_mask(pin);
133
134 if (!pio)
135 return -EINVAL;
136
137 __raw_writel(mask, pio + PIO_IDR);
138 __raw_writel(mask, pio + PIO_PUDR);
139 __raw_writel(mask, pio + (value ? PIO_SODR : PIO_CODR));
140 __raw_writel(mask, pio + PIO_OER);
141 __raw_writel(mask, pio + PIO_PER);
142 return 0;
143}
144EXPORT_SYMBOL(at91_set_gpio_output);
145
146
147/*
148 * enable/disable the glitch filter; mostly used with IRQ handling.
149 */
150int __init_or_module at91_set_deglitch(unsigned pin, int is_on)
151{
152 void __iomem *pio = pin_to_controller(pin);
153 unsigned mask = pin_to_mask(pin);
154
155 if (!pio)
156 return -EINVAL;
157 __raw_writel(mask, pio + (is_on ? PIO_IFER : PIO_IFDR));
158 return 0;
159}
160EXPORT_SYMBOL(at91_set_deglitch);
161
162/*--------------------------------------------------------------------------*/
163
164
165/*
166 * assuming the pin is muxed as a gpio output, set its value.
167 */
168int at91_set_gpio_value(unsigned pin, int value)
169{
170 void __iomem *pio = pin_to_controller(pin);
171 unsigned mask = pin_to_mask(pin);
172
173 if (!pio)
174 return -EINVAL;
175 __raw_writel(mask, pio + (value ? PIO_SODR : PIO_CODR));
176 return 0;
177}
178EXPORT_SYMBOL(at91_set_gpio_value);
179
180
181/*
182 * read the pin's value (works even if it's not muxed as a gpio).
183 */
184int at91_get_gpio_value(unsigned pin)
185{
186 void __iomem *pio = pin_to_controller(pin);
187 unsigned mask = pin_to_mask(pin);
188 u32 pdsr;
189
190 if (!pio)
191 return -EINVAL;
192 pdsr = __raw_readl(pio + PIO_PDSR);
193 return (pdsr & mask) != 0;
194}
195EXPORT_SYMBOL(at91_get_gpio_value);
196
197/*--------------------------------------------------------------------------*/
198
199
200/* Several AIC controller irqs are dispatched through this GPIO handler.
201 * To use any AT91_PIN_* as an externally triggered IRQ, first call
202 * at91_set_gpio_input() then maybe enable its glitch filter.
203 * Then just request_irq() with the pin ID; it works like any ARM IRQ
204 * handler, though it always triggers on rising and falling edges.
205 *
206 * Alternatively, certain pins may be used directly as IRQ0..IRQ6 after
207 * configuring them with at91_set_a_periph() or at91_set_b_periph().
208 * IRQ0..IRQ6 should be configurable, e.g. level vs edge triggering.
209 */
210
211static void gpio_irq_mask(unsigned pin)
212{
213 void __iomem *pio = pin_to_controller(pin);
214 unsigned mask = pin_to_mask(pin);
215
216 if (pio)
217 __raw_writel(mask, pio + PIO_IDR);
218}
219
220static void gpio_irq_unmask(unsigned pin)
221{
222 void __iomem *pio = pin_to_controller(pin);
223 unsigned mask = pin_to_mask(pin);
224
225 if (pio)
226 __raw_writel(mask, pio + PIO_IER);
227}
228
229static int gpio_irq_type(unsigned pin, unsigned type)
230{
231 return (type == IRQT_BOTHEDGE) ? 0 : -EINVAL;
232}
233
234static struct irqchip gpio_irqchip = {
235 .mask = gpio_irq_mask,
236 .unmask = gpio_irq_unmask,
237 .set_type = gpio_irq_type,
238};
239
240static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs *regs)
241{
242 unsigned pin;
243 struct irqdesc *gpio;
244 void __iomem *pio;
245 u32 isr;
246
247 pio = (void __force __iomem *) desc->chipdata;
248
249 /* temporarily mask (level sensitive) parent IRQ */
250 desc->chip->ack(irq);
251 for (;;) {
252 isr = __raw_readl(pio + PIO_ISR) & __raw_readl(pio + PIO_IMR);
253 if (!isr)
254 break;
255
256 pin = (unsigned) desc->data;
257 gpio = &irq_desc[pin];
258
259 while (isr) {
260 if (isr & 1)
261 gpio->handle(pin, gpio, regs);
262 pin++;
263 gpio++;
264 isr >>= 1;
265 }
266 }
267 desc->chip->unmask(irq);
268 /* now it may re-trigger */
269}
270
271/* call this from board-specific init_irq */
272void __init at91_gpio_irq_setup(unsigned banks)
273{
274 unsigned pioc, pin, id;
275
276 if (banks > 4)
277 banks = 4;
278 for (pioc = 0, pin = PIN_BASE, id = AT91_ID_PIOA;
279 pioc < banks;
280 pioc++, id++) {
281 void __iomem *controller;
282 unsigned i;
283
284 controller = (void __iomem *) AT91_VA_BASE_SYS + pio_controller_offset[pioc];
285 __raw_writel(~0, controller + PIO_IDR);
286
287 set_irq_data(id, (void *) pin);
288 set_irq_chipdata(id, (void __force *) controller);
289
290 for (i = 0; i < 32; i++, pin++) {
291 set_irq_chip(pin, &gpio_irqchip);
292 set_irq_handler(pin, do_simple_IRQ);
293 set_irq_flags(pin, IRQF_VALID);
294 }
295
296 set_irq_chained_handler(id, gpio_irq_handler);
297
298 /* enable the PIO peripheral clock */
299 at91_sys_write(AT91_PMC_PCER, 1 << id);
300 }
301 pr_info("AT91: %d gpio irqs in %d banks\n", pin - PIN_BASE, banks);
302}
diff --git a/arch/arm/mach-at91rm9200/irq.c b/arch/arm/mach-at91rm9200/irq.c
new file mode 100644
index 000000000000..cb62bc83a1dd
--- /dev/null
+++ b/arch/arm/mach-at91rm9200/irq.c
@@ -0,0 +1,170 @@
1/*
2 * linux/arch/arm/mach-at91rm9200/irq.c
3 *
4 * Copyright (C) 2004 SAN People
5 * Copyright (C) 2004 ATMEL
6 * Copyright (C) Rick Bronson
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#include <linux/config.h>
24#include <linux/init.h>
25#include <linux/module.h>
26#include <linux/mm.h>
27#include <linux/types.h>
28
29#include <asm/hardware.h>
30#include <asm/irq.h>
31#include <asm/mach-types.h>
32#include <asm/setup.h>
33
34#include <asm/mach/arch.h>
35#include <asm/mach/irq.h>
36#include <asm/mach/map.h>
37
38#include "generic.h"
39
40/*
41 * The default interrupt priority levels (0 = lowest, 7 = highest).
42 */
43static unsigned int at91rm9200_default_irq_priority[NR_AIC_IRQS] __initdata = {
44 7, /* Advanced Interrupt Controller */
45 7, /* System Peripheral */
46 0, /* Parallel IO Controller A */
47 0, /* Parallel IO Controller B */
48 0, /* Parallel IO Controller C */
49 0, /* Parallel IO Controller D */
50 6, /* USART 0 */
51 6, /* USART 1 */
52 6, /* USART 2 */
53 6, /* USART 3 */
54 0, /* Multimedia Card Interface */
55 4, /* USB Device Port */
56 0, /* Two-Wire Interface */
57 6, /* Serial Peripheral Interface */
58 5, /* Serial Synchronous Controller */
59 5, /* Serial Synchronous Controller */
60 5, /* Serial Synchronous Controller */
61 0, /* Timer Counter 0 */
62 0, /* Timer Counter 1 */
63 0, /* Timer Counter 2 */
64 0, /* Timer Counter 3 */
65 0, /* Timer Counter 4 */
66 0, /* Timer Counter 5 */
67 3, /* USB Host port */
68 3, /* Ethernet MAC */
69 0, /* Advanced Interrupt Controller */
70 0, /* Advanced Interrupt Controller */
71 0, /* Advanced Interrupt Controller */
72 0, /* Advanced Interrupt Controller */
73 0, /* Advanced Interrupt Controller */
74 0, /* Advanced Interrupt Controller */
75 0 /* Advanced Interrupt Controller */
76};
77
78
79static void at91rm9200_mask_irq(unsigned int irq)
80{
81 /* Disable interrupt on AIC */
82 at91_sys_write(AT91_AIC_IDCR, 1 << irq);
83}
84
85static void at91rm9200_unmask_irq(unsigned int irq)
86{
87 /* Enable interrupt on AIC */
88 at91_sys_write(AT91_AIC_IECR, 1 << irq);
89}
90
91static int at91rm9200_irq_type(unsigned irq, unsigned type)
92{
93 unsigned int smr, srctype;
94
95 /* change triggering only for FIQ and external IRQ0..IRQ6 */
96 if ((irq < AT91_ID_IRQ0) && (irq != AT91_ID_FIQ))
97 return -EINVAL;
98
99 switch (type) {
100 case IRQT_HIGH:
101 srctype = AT91_AIC_SRCTYPE_HIGH;
102 break;
103 case IRQT_RISING:
104 srctype = AT91_AIC_SRCTYPE_RISING;
105 break;
106 case IRQT_LOW:
107 srctype = AT91_AIC_SRCTYPE_LOW;
108 break;
109 case IRQT_FALLING:
110 srctype = AT91_AIC_SRCTYPE_FALLING;
111 break;
112 default:
113 return -EINVAL;
114 }
115
116 smr = at91_sys_read(AT91_AIC_SMR(irq)) & ~AT91_AIC_SRCTYPE;
117 at91_sys_write(AT91_AIC_SMR(irq), smr | srctype);
118 return 0;
119}
120
121static struct irqchip at91rm9200_irq_chip = {
122 .ack = at91rm9200_mask_irq,
123 .mask = at91rm9200_mask_irq,
124 .unmask = at91rm9200_unmask_irq,
125 .set_type = at91rm9200_irq_type,
126};
127
128/*
129 * Initialize the AIC interrupt controller.
130 */
131void __init at91rm9200_init_irq(unsigned int priority[NR_AIC_IRQS])
132{
133 unsigned int i;
134
135 /* No priority list specified for this board -> use defaults */
136 if (priority == NULL)
137 priority = at91rm9200_default_irq_priority;
138
139 /*
140 * The IVR is used by macro get_irqnr_and_base to read and verify.
141 * The irq number is NR_AIC_IRQS when a spurious interrupt has occurred.
142 */
143 for (i = 0; i < NR_AIC_IRQS; i++) {
144 /* Put irq number in Source Vector Register: */
145 at91_sys_write(AT91_AIC_SVR(i), i);
146 /* Store the Source Mode Register as defined in table above */
147 at91_sys_write(AT91_AIC_SMR(i), AT91_AIC_SRCTYPE_LOW | priority[i]);
148
149 set_irq_chip(i, &at91rm9200_irq_chip);
150 set_irq_handler(i, do_level_IRQ);
151 set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
152
153 /* Perform 8 End Of Interrupt Command to make sure AIC will not Lock out nIRQ */
154 if (i < 8)
155 at91_sys_write(AT91_AIC_EOICR, 0);
156 }
157
158 /*
159 * Spurious Interrupt ID in Spurious Vector Register is NR_AIC_IRQS
160 * When there is no current interrupt, the IRQ Vector Register reads the value stored in AIC_SPU
161 */
162 at91_sys_write(AT91_AIC_SPU, NR_AIC_IRQS);
163
164 /* No debugging in AIC: Debug (Protect) Control Register */
165 at91_sys_write(AT91_AIC_DCR, 0);
166
167 /* Disable and clear all interrupts initially */
168 at91_sys_write(AT91_AIC_IDCR, 0xFFFFFFFF);
169 at91_sys_write(AT91_AIC_ICCR, 0xFFFFFFFF);
170}
diff --git a/arch/arm/mach-at91rm9200/time.c b/arch/arm/mach-at91rm9200/time.c
new file mode 100644
index 000000000000..1b6dd2deeb22
--- /dev/null
+++ b/arch/arm/mach-at91rm9200/time.c
@@ -0,0 +1,127 @@
1/*
2 * linux/arch/arm/mach-at91rm9200/time.c
3 *
4 * Copyright (C) 2003 SAN People
5 * Copyright (C) 2003 ATMEL
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22#include <linux/config.h>
23#include <linux/init.h>
24#include <linux/interrupt.h>
25#include <linux/kernel.h>
26#include <linux/sched.h>
27#include <linux/time.h>
28
29#include <asm/hardware.h>
30#include <asm/io.h>
31#include <asm/irq.h>
32#include <asm/mach/time.h>
33
34/*
35 * The ST_CRTR is updated asynchronously to the master clock. It is therefore
36 * necessary to read it twice (with the same value) to ensure accuracy.
37 */
38static inline unsigned long read_CRTR(void) {
39 unsigned long x1, x2;
40
41 do {
42 x1 = at91_sys_read(AT91_ST_CRTR);
43 x2 = at91_sys_read(AT91_ST_CRTR);
44 } while (x1 != x2);
45
46 return x1;
47}
48
49/*
50 * Returns number of microseconds since last timer interrupt. Note that interrupts
51 * will have been disabled by do_gettimeofday()
52 * 'LATCH' is hwclock ticks (see CLOCK_TICK_RATE in timex.h) per jiffy.
53 * 'tick' is usecs per jiffy (linux/timex.h).
54 */
55static unsigned long at91rm9200_gettimeoffset(void)
56{
57 unsigned long elapsed;
58
59 elapsed = (read_CRTR() - at91_sys_read(AT91_ST_RTAR)) & AT91_ST_ALMV;
60
61 return (unsigned long)(elapsed * (tick_nsec / 1000)) / LATCH;
62}
63
64/*
65 * IRQ handler for the timer.
66 */
67static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
68{
69 unsigned long rtar;
70
71 if (at91_sys_read(AT91_ST_SR) & AT91_ST_PITS) { /* This is a shared interrupt */
72 write_seqlock(&xtime_lock);
73
74 do {
75 timer_tick(regs);
76 rtar = (at91_sys_read(AT91_ST_RTAR) + LATCH) & AT91_ST_ALMV;
77 at91_sys_write(AT91_ST_RTAR, rtar);
78 } while (((read_CRTR() - at91_sys_read(AT91_ST_RTAR)) & AT91_ST_ALMV) >= LATCH);
79
80 write_sequnlock(&xtime_lock);
81
82 return IRQ_HANDLED;
83 }
84 else
85 return IRQ_NONE; /* not handled */
86}
87
88static struct irqaction at91rm9200_timer_irq = {
89 .name = "at91_tick",
90 .flags = SA_SHIRQ | SA_INTERRUPT,
91 .handler = at91rm9200_timer_interrupt
92};
93
94/*
95 * Set up timer interrupt.
96 */
97void __init at91rm9200_timer_init(void)
98{
99 /* Disable all timer interrupts */
100 at91_sys_write(AT91_ST_IDR, AT91_ST_PITS | AT91_ST_WDOVF | AT91_ST_RTTINC | AT91_ST_ALMS);
101 (void) at91_sys_read(AT91_ST_SR); /* Clear any pending interrupts */
102
103 /*
104 * Make IRQs happen for the system timer.
105 */
106 setup_irq(AT91_ID_SYS, &at91rm9200_timer_irq);
107
108 /* Set initial alarm to 0 */
109 at91_sys_write(AT91_ST_RTAR, 0);
110
111 /* Real time counter incremented every 30.51758 microseconds */
112 at91_sys_write(AT91_ST_RTMR, 1);
113
114 /* Set Period Interval timer */
115 at91_sys_write(AT91_ST_PIMR, LATCH);
116
117 /* Change the kernel's 'tick' value to 10009 usec. (the default is 10000) */
118 tick_usec = (LATCH * 1000000) / CLOCK_TICK_RATE;
119
120 /* Enable Period Interval Timer interrupt */
121 at91_sys_write(AT91_ST_IER, AT91_ST_PITS);
122}
123
124struct sys_timer at91rm9200_timer = {
125 .init = at91rm9200_timer_init,
126 .offset = at91rm9200_gettimeoffset,
127};
diff --git a/arch/arm/mach-epxa10db/Kconfig b/arch/arm/mach-epxa10db/Kconfig
deleted file mode 100644
index 55d896dd4950..000000000000
--- a/arch/arm/mach-epxa10db/Kconfig
+++ /dev/null
@@ -1,23 +0,0 @@
1if ARCH_CAMELOT
2
3menu "Epxa10db"
4
5comment "PLD hotswap support"
6
7config PLD
8 bool
9 default y
10
11config PLD_HOTSWAP
12 bool "Support for PLD device hotplugging (experimental)"
13 depends on EXPERIMENTAL
14 help
15 This enables support for the dynamic loading and configuration of
16 compatible drivers when the contents of the PLD are changed. This
17 is still experimental and requires configuration tools which are
18 not yet generally available. Say N here. You must enable the kernel
19 module loader for this feature to work.
20
21endmenu
22
23endif
diff --git a/arch/arm/mach-epxa10db/Makefile b/arch/arm/mach-epxa10db/Makefile
deleted file mode 100644
index 24fbd7d3a3c1..000000000000
--- a/arch/arm/mach-epxa10db/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
1#
2# Makefile for the linux kernel.
3#
4
5# Object file lists.
6
7obj-y := arch.o irq.o mm.o time.o
8obj-m :=
9obj-n :=
10obj- :=
11
diff --git a/arch/arm/mach-epxa10db/Makefile.boot b/arch/arm/mach-epxa10db/Makefile.boot
deleted file mode 100644
index 28bec7d3fc88..000000000000
--- a/arch/arm/mach-epxa10db/Makefile.boot
+++ /dev/null
@@ -1,2 +0,0 @@
1 zreladdr-y := 0x00008000
2
diff --git a/arch/arm/mach-epxa10db/arch.c b/arch/arm/mach-epxa10db/arch.c
deleted file mode 100644
index 44c56571d183..000000000000
--- a/arch/arm/mach-epxa10db/arch.c
+++ /dev/null
@@ -1,74 +0,0 @@
1/*
2 * linux/arch/arm/mach-epxa10db/arch.c
3 *
4 * Copyright (C) 2000 Deep Blue Solutions Ltd
5 * Copyright (C) 2001 Altera Corporation
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#include <linux/types.h>
22#include <linux/init.h>
23#include <linux/serial_8250.h>
24
25#include <asm/hardware.h>
26#include <asm/setup.h>
27#include <asm/mach-types.h>
28
29#include <asm/mach/arch.h>
30
31static struct plat_serial8250_port serial_platform_data[] = {
32 {
33 .iobase = 0x3f8,
34 .irq = IRQ_UARTINT0,
35#error FIXME
36 .uartclk = 0,
37 .regshift = 0,
38 .iotype = UPIO_PORT,
39 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
40 },
41 {
42 .iobase = 0x2f8,
43 .irq = IRQ_UARTINT1,
44#error FIXME
45 .uartclk = 0,
46 .regshift = 0,
47 .iotype = UPIO_PORT,
48 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
49 },
50 { },
51};
52
53static struct platform_device serial_device = {
54 .name = "serial8250",
55 .id = PLAT8250_DEV_PLATFORM,
56 .dev = {
57 .platform_data = serial_platform_data,
58 },
59};
60
61extern void epxa10db_map_io(void);
62extern void epxa10db_init_irq(void);
63extern struct sys_timer epxa10db_timer;
64
65MACHINE_START(CAMELOT, "Altera Epxa10db")
66 /* Maintainer: Altera Corporation */
67 .phys_ram = 0x00000000,
68 .phys_io = 0x7fffc000,
69 .io_pg_offst = ((0xffffc000) >> 18) & 0xfffc,
70 .map_io = epxa10db_map_io,
71 .init_irq = epxa10db_init_irq,
72 .timer = &epxa10db_timer,
73MACHINE_END
74
diff --git a/arch/arm/mach-epxa10db/irq.c b/arch/arm/mach-epxa10db/irq.c
deleted file mode 100644
index 9bf927e13309..000000000000
--- a/arch/arm/mach-epxa10db/irq.c
+++ /dev/null
@@ -1,82 +0,0 @@
1/*
2 * linux/arch/arm/mach-epxa10db/irq.c
3 *
4 * Copyright (C) 2001 Altera Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#include <linux/init.h>
21#include <linux/ioport.h>
22#include <linux/stddef.h>
23#include <linux/timer.h>
24#include <linux/list.h>
25#include <asm/io.h>
26#include <asm/hardware.h>
27#include <asm/irq.h>
28#include <asm/mach/irq.h>
29#include <asm/arch/platform.h>
30#include <asm/arch/int_ctrl00.h>
31
32
33static void epxa_mask_irq(unsigned int irq)
34{
35 writel(1 << irq, INT_MC(IO_ADDRESS(EXC_INT_CTRL00_BASE)));
36}
37
38static void epxa_unmask_irq(unsigned int irq)
39{
40 writel(1 << irq, INT_MS(IO_ADDRESS(EXC_INT_CTRL00_BASE)));
41}
42
43
44static struct irqchip epxa_irq_chip = {
45 .ack = epxa_mask_irq,
46 .mask = epxa_mask_irq,
47 .unmask = epxa_unmask_irq,
48};
49
50static struct resource irq_resource = {
51 .name = "irq_handler",
52 .start = IO_ADDRESS(EXC_INT_CTRL00_BASE),
53 .end = IO_ADDRESS(INT_PRIORITY_FC(EXC_INT_CTRL00_BASE))+4,
54};
55
56void __init epxa10db_init_irq(void)
57{
58 unsigned int i;
59
60 request_resource(&iomem_resource, &irq_resource);
61
62 /*
63 * This bit sets up the interrupt controller using
64 * the 6 PLD interrupts mode (the default) each
65 * irqs is assigned a priority which is the same
66 * as its interrupt number. This scheme is used because
67 * its easy, but you may want to change it depending
68 * on the contents of your PLD
69 */
70
71 writel(3,INT_MODE(IO_ADDRESS(EXC_INT_CTRL00_BASE)));
72 for (i = 0; i < NR_IRQS; i++){
73 writel(i+1, INT_PRIORITY_P0(IO_ADDRESS(EXC_INT_CTRL00_BASE)) + (4*i));
74 set_irq_chip(i,&epxa_irq_chip);
75 set_irq_handler(i,do_level_IRQ);
76 set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
77 }
78
79 /* Disable all interrupts */
80 writel(-1,INT_MC(IO_ADDRESS(EXC_INT_CTRL00_BASE)));
81
82}
diff --git a/arch/arm/mach-epxa10db/mm.c b/arch/arm/mach-epxa10db/mm.c
deleted file mode 100644
index cfd0d2182d44..000000000000
--- a/arch/arm/mach-epxa10db/mm.c
+++ /dev/null
@@ -1,71 +0,0 @@
1/*
2 * linux/arch/arm/mach-epxa10db/mm.c
3 *
4 * MM routines for Altera'a Epxa10db board
5 *
6 * Copyright (C) 2001 Altera Corporation
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#include <linux/kernel.h>
23#include <linux/init.h>
24
25#include <asm/hardware.h>
26#include <asm/io.h>
27#include <asm/sizes.h>
28#include <asm/page.h>
29
30#include <asm/mach/map.h>
31
32/* Page table mapping for I/O region */
33
34static struct map_desc epxa10db_io_desc[] __initdata = {
35 {
36 .virtual = IO_ADDRESS(EXC_REGISTERS_BASE),
37 .pfn = __phys_to_pfn(EXC_REGISTERS_BASE),
38 .length = SZ_16K,
39 .type = MT_DEVICE
40 }, {
41 .virtual = IO_ADDRESS(EXC_PLD_BLOCK0_BASE),
42 .pfn = __phys_to_pfn(EXC_PLD_BLOCK0_BASE),
43 .length = SZ_16K,
44 .type = MT_DEVICE
45 }, {
46 .virtual = IO_ADDRESS(EXC_PLD_BLOCK1_BASE),
47 .pfn =__phys_to_pfn(EXC_PLD_BLOCK1_BASE),
48 .length = SZ_16K,
49 .type = MT_DEVICE
50 }, {
51 .virtual = IO_ADDRESS(EXC_PLD_BLOCK2_BASE),
52 .physical = __phys_to_pfn(EXC_PLD_BLOCK2_BASE),
53 .length = SZ_16K,
54 .type = MT_DEVICE
55 }, {
56 .virtual = IO_ADDRESS(EXC_PLD_BLOCK3_BASE),
57 .pfn = __phys_to_pfn(EXC_PLD_BLOCK3_BASE),
58 .length = SZ_16K,
59 .type = MT_DEVICE
60 }, {
61 .virtual = FLASH_VADDR(EXC_EBI_BLOCK0_BASE),
62 .pfn = __phys_to_pfn(EXC_EBI_BLOCK0_BASE),
63 .length = SZ_16M,
64 .type = MT_DEVICE
65 }
66};
67
68void __init epxa10db_map_io(void)
69{
70 iotable_init(epxa10db_io_desc, ARRAY_SIZE(epxa10db_io_desc));
71}
diff --git a/arch/arm/mach-epxa10db/time.c b/arch/arm/mach-epxa10db/time.c
deleted file mode 100644
index 4b1084dde8dd..000000000000
--- a/arch/arm/mach-epxa10db/time.c
+++ /dev/null
@@ -1,78 +0,0 @@
1/*
2 * linux/arch/arm/mach-epxa10db/time.c
3 *
4 * Copyright (C) 2000 Deep Blue Solutions
5 * Copyright (C) 2001 Altera Corporation
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/interrupt.h>
14#include <linux/sched.h>
15
16#include <asm/hardware.h>
17#include <asm/system.h>
18#include <asm/leds.h>
19
20#include <asm/mach/time.h>
21
22#define TIMER00_TYPE (volatile unsigned int*)
23#include <asm/arch/timer00.h>
24
25static int epxa10db_set_rtc(void)
26{
27 return 1;
28}
29
30static int epxa10db_rtc_init(void)
31{
32 set_rtc = epxa10db_set_rtc;
33
34 return 0;
35}
36
37__initcall(epxa10db_rtc_init);
38
39
40/*
41 * IRQ handler for the timer
42 */
43static irqreturn_t
44epxa10db_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
45{
46 write_seqlock(&xtime_lock);
47
48 // ...clear the interrupt
49 *TIMER0_CR(IO_ADDRESS(EXC_TIMER00_BASE))|=TIMER0_CR_CI_MSK;
50
51 timer_tick(regs);
52 write_sequnlock(&xtime_lock);
53
54 return IRQ_HANDLED;
55}
56
57static struct irqaction epxa10db_timer_irq = {
58 .name = "Excalibur Timer Tick",
59 .flags = SA_INTERRUPT | SA_TIMER,
60 .handler = epxa10db_timer_interrupt,
61};
62
63/*
64 * Set up timer interrupt, and return the current time in seconds.
65 */
66static void __init epxa10db_timer_init(void)
67{
68 /* Start the timer */
69 *TIMER0_LIMIT(IO_ADDRESS(EXC_TIMER00_BASE))=(unsigned int)(EXC_AHB2_CLK_FREQUENCY/200);
70 *TIMER0_PRESCALE(IO_ADDRESS(EXC_TIMER00_BASE))=1;
71 *TIMER0_CR(IO_ADDRESS(EXC_TIMER00_BASE))=TIMER0_CR_IE_MSK | TIMER0_CR_S_MSK;
72
73 setup_irq(IRQ_TIMER0, &epxa10db_timer_irq);
74}
75
76struct sys_timer epxa10db_timer = {
77 .init = epxa10db_timer_init,
78};
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c
index 5830ae3ddd19..fc09ba92d66a 100644
--- a/arch/arm/mach-s3c2410/clock.c
+++ b/arch/arm/mach-s3c2410/clock.c
@@ -253,100 +253,101 @@ struct clk s3c24xx_uclk = {
253/* clock definitions */ 253/* clock definitions */
254 254
255static struct clk init_clocks[] = { 255static struct clk init_clocks[] = {
256 { .name = "nand", 256 {
257 .id = -1, 257 .name = "nand",
258 .parent = &clk_h, 258 .id = -1,
259 .enable = s3c24xx_clkcon_enable, 259 .parent = &clk_h,
260 .ctrlbit = S3C2410_CLKCON_NAND 260 .enable = s3c24xx_clkcon_enable,
261 }, 261 .ctrlbit = S3C2410_CLKCON_NAND,
262 { .name = "lcd", 262 }, {
263 .id = -1, 263 .name = "lcd",
264 .parent = &clk_h, 264 .id = -1,
265 .enable = s3c24xx_clkcon_enable, 265 .parent = &clk_h,
266 .ctrlbit = S3C2410_CLKCON_LCDC 266 .enable = s3c24xx_clkcon_enable,
267 }, 267 .ctrlbit = S3C2410_CLKCON_LCDC,
268 { .name = "usb-host", 268 }, {
269 .id = -1, 269 .name = "usb-host",
270 .parent = &clk_h, 270 .id = -1,
271 .enable = s3c24xx_clkcon_enable, 271 .parent = &clk_h,
272 .ctrlbit = S3C2410_CLKCON_USBH 272 .enable = s3c24xx_clkcon_enable,
273 }, 273 .ctrlbit = S3C2410_CLKCON_USBH,
274 { .name = "usb-device", 274 }, {
275 .id = -1, 275 .name = "usb-device",
276 .parent = &clk_h, 276 .id = -1,
277 .enable = s3c24xx_clkcon_enable, 277 .parent = &clk_h,
278 .ctrlbit = S3C2410_CLKCON_USBD 278 .enable = s3c24xx_clkcon_enable,
279 }, 279 .ctrlbit = S3C2410_CLKCON_USBD,
280 { .name = "timers", 280 }, {
281 .id = -1, 281 .name = "timers",
282 .parent = &clk_p, 282 .id = -1,
283 .enable = s3c24xx_clkcon_enable, 283 .parent = &clk_p,
284 .ctrlbit = S3C2410_CLKCON_PWMT 284 .enable = s3c24xx_clkcon_enable,
285 }, 285 .ctrlbit = S3C2410_CLKCON_PWMT,
286 { .name = "sdi", 286 }, {
287 .id = -1, 287 .name = "sdi",
288 .parent = &clk_p, 288 .id = -1,
289 .enable = s3c24xx_clkcon_enable, 289 .parent = &clk_p,
290 .ctrlbit = S3C2410_CLKCON_SDI 290 .enable = s3c24xx_clkcon_enable,
291 }, 291 .ctrlbit = S3C2410_CLKCON_SDI,
292 { .name = "uart", 292 }, {
293 .id = 0, 293 .name = "uart",
294 .parent = &clk_p, 294 .id = 0,
295 .enable = s3c24xx_clkcon_enable, 295 .parent = &clk_p,
296 .ctrlbit = S3C2410_CLKCON_UART0 296 .enable = s3c24xx_clkcon_enable,
297 }, 297 .ctrlbit = S3C2410_CLKCON_UART0,
298 { .name = "uart", 298 }, {
299 .id = 1, 299 .name = "uart",
300 .parent = &clk_p, 300 .id = 1,
301 .enable = s3c24xx_clkcon_enable, 301 .parent = &clk_p,
302 .ctrlbit = S3C2410_CLKCON_UART1 302 .enable = s3c24xx_clkcon_enable,
303 }, 303 .ctrlbit = S3C2410_CLKCON_UART1,
304 { .name = "uart", 304 }, {
305 .id = 2, 305 .name = "uart",
306 .parent = &clk_p, 306 .id = 2,
307 .enable = s3c24xx_clkcon_enable, 307 .parent = &clk_p,
308 .ctrlbit = S3C2410_CLKCON_UART2 308 .enable = s3c24xx_clkcon_enable,
309 }, 309 .ctrlbit = S3C2410_CLKCON_UART2,
310 { .name = "gpio", 310 }, {
311 .id = -1, 311 .name = "gpio",
312 .parent = &clk_p, 312 .id = -1,
313 .enable = s3c24xx_clkcon_enable, 313 .parent = &clk_p,
314 .ctrlbit = S3C2410_CLKCON_GPIO 314 .enable = s3c24xx_clkcon_enable,
315 }, 315 .ctrlbit = S3C2410_CLKCON_GPIO,
316 { .name = "rtc", 316 }, {
317 .id = -1, 317 .name = "rtc",
318 .parent = &clk_p, 318 .id = -1,
319 .enable = s3c24xx_clkcon_enable, 319 .parent = &clk_p,
320 .ctrlbit = S3C2410_CLKCON_RTC 320 .enable = s3c24xx_clkcon_enable,
321 }, 321 .ctrlbit = S3C2410_CLKCON_RTC,
322 { .name = "adc", 322 }, {
323 .id = -1, 323 .name = "adc",
324 .parent = &clk_p, 324 .id = -1,
325 .enable = s3c24xx_clkcon_enable, 325 .parent = &clk_p,
326 .ctrlbit = S3C2410_CLKCON_ADC 326 .enable = s3c24xx_clkcon_enable,
327 }, 327 .ctrlbit = S3C2410_CLKCON_ADC,
328 { .name = "i2c", 328 }, {
329 .id = -1, 329 .name = "i2c",
330 .parent = &clk_p, 330 .id = -1,
331 .enable = s3c24xx_clkcon_enable, 331 .parent = &clk_p,
332 .ctrlbit = S3C2410_CLKCON_IIC 332 .enable = s3c24xx_clkcon_enable,
333 }, 333 .ctrlbit = S3C2410_CLKCON_IIC,
334 { .name = "iis", 334 }, {
335 .id = -1, 335 .name = "iis",
336 .parent = &clk_p, 336 .id = -1,
337 .enable = s3c24xx_clkcon_enable, 337 .parent = &clk_p,
338 .ctrlbit = S3C2410_CLKCON_IIS 338 .enable = s3c24xx_clkcon_enable,
339 }, 339 .ctrlbit = S3C2410_CLKCON_IIS,
340 { .name = "spi", 340 }, {
341 .id = -1, 341 .name = "spi",
342 .parent = &clk_p, 342 .id = -1,
343 .enable = s3c24xx_clkcon_enable, 343 .parent = &clk_p,
344 .ctrlbit = S3C2410_CLKCON_SPI 344 .enable = s3c24xx_clkcon_enable,
345 }, 345 .ctrlbit = S3C2410_CLKCON_SPI,
346 { .name = "watchdog", 346 }, {
347 .id = -1, 347 .name = "watchdog",
348 .parent = &clk_p, 348 .id = -1,
349 .ctrlbit = 0 349 .parent = &clk_p,
350 .ctrlbit = 0,
350 } 351 }
351}; 352};
352 353
@@ -390,16 +391,15 @@ int __init s3c24xx_setup_clocks(unsigned long xtal,
390 clk_p.rate = pclk; 391 clk_p.rate = pclk;
391 clk_f.rate = fclk; 392 clk_f.rate = fclk;
392 393
393 /* it looks like just setting the register here is not good 394 /* We must be careful disabling the clocks we are not intending to
394 * enough, and causes the odd hang at initial boot time, so 395 * be using at boot time, as subsytems such as the LCD which do
395 * do all of them indivdually. 396 * their own DMA requests to the bus can cause the system to lockup
397 * if they where in the middle of requesting bus access.
396 * 398 *
397 * I think disabling the LCD clock if the LCD is active is 399 * Disabling the LCD clock if the LCD is active is very dangerous,
398 * very dangerous, and therefore the bootloader should be 400 * and therefore the bootloader should be careful to not enable
399 * careful to not enable the LCD clock if it is not needed. 401 * the LCD clock if it is not needed.
400 * 402 */
401 * and of course, this looks neater
402 */
403 403
404 s3c24xx_clk_enable(S3C2410_CLKCON_NAND, 0); 404 s3c24xx_clk_enable(S3C2410_CLKCON_NAND, 0);
405 s3c24xx_clk_enable(S3C2410_CLKCON_USBH, 0); 405 s3c24xx_clk_enable(S3C2410_CLKCON_USBH, 0);
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index e84fdde6edf8..3b79d0e23455 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -62,8 +62,8 @@ config CPU_ARM720T
62# ARM920T 62# ARM920T
63config CPU_ARM920T 63config CPU_ARM920T
64 bool "Support ARM920T processor" if !ARCH_S3C2410 64 bool "Support ARM920T processor" if !ARCH_S3C2410
65 depends on ARCH_INTEGRATOR || ARCH_S3C2410 || ARCH_IMX || ARCH_AAEC2000 65 depends on ARCH_INTEGRATOR || ARCH_S3C2410 || ARCH_IMX || ARCH_AAEC2000 || ARCH_AT91RM9200
66 default y if ARCH_S3C2410 66 default y if ARCH_S3C2410 || ARCH_AT91RM9200
67 select CPU_32v4 67 select CPU_32v4
68 select CPU_ABRT_EV4T 68 select CPU_ABRT_EV4T
69 select CPU_CACHE_V4WT 69 select CPU_CACHE_V4WT
@@ -83,8 +83,8 @@ config CPU_ARM920T
83# ARM922T 83# ARM922T
84config CPU_ARM922T 84config CPU_ARM922T
85 bool "Support ARM922T processor" if ARCH_INTEGRATOR 85 bool "Support ARM922T processor" if ARCH_INTEGRATOR
86 depends on ARCH_CAMELOT || ARCH_LH7A40X || ARCH_INTEGRATOR 86 depends on ARCH_LH7A40X || ARCH_INTEGRATOR
87 default y if ARCH_CAMELOT || ARCH_LH7A40X 87 default y if ARCH_LH7A40X
88 select CPU_32v4 88 select CPU_32v4
89 select CPU_ABRT_EV4T 89 select CPU_ABRT_EV4T
90 select CPU_CACHE_V4WT 90 select CPU_CACHE_V4WT
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 10901398e4a2..de3ce1eec2ec 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -86,11 +86,12 @@ remap_area_pmd(pmd_t * pmd, unsigned long address, unsigned long size,
86} 86}
87 87
88static int 88static int
89remap_area_pages(unsigned long start, unsigned long phys_addr, 89remap_area_pages(unsigned long start, unsigned long pfn,
90 unsigned long size, unsigned long flags) 90 unsigned long size, unsigned long flags)
91{ 91{
92 unsigned long address = start; 92 unsigned long address = start;
93 unsigned long end = start + size; 93 unsigned long end = start + size;
94 unsigned long phys_addr = __pfn_to_phys(pfn);
94 int err = 0; 95 int err = 0;
95 pgd_t * dir; 96 pgd_t * dir;
96 97
@@ -130,36 +131,44 @@ remap_area_pages(unsigned long start, unsigned long phys_addr,
130 * mapping. See include/asm-arm/proc-armv/pgtable.h for more information. 131 * mapping. See include/asm-arm/proc-armv/pgtable.h for more information.
131 */ 132 */
132void __iomem * 133void __iomem *
134__ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
135 unsigned long flags)
136{
137 unsigned long addr;
138 struct vm_struct * area;
139
140 area = get_vm_area(size, VM_IOREMAP);
141 if (!area)
142 return NULL;
143 addr = (unsigned long)area->addr;
144 if (remap_area_pages(addr, pfn, size, flags)) {
145 vfree(addr);
146 return NULL;
147 }
148 return (void __iomem *) (offset + (char *)addr);
149}
150EXPORT_SYMBOL(__ioremap_pfn);
151
152void __iomem *
133__ioremap(unsigned long phys_addr, size_t size, unsigned long flags) 153__ioremap(unsigned long phys_addr, size_t size, unsigned long flags)
134{ 154{
135 void * addr; 155 unsigned long last_addr;
136 struct vm_struct * area; 156 unsigned long offset = phys_addr & ~PAGE_MASK;
137 unsigned long offset, last_addr; 157 unsigned long pfn = __phys_to_pfn(phys_addr);
138 158
139 /* Don't allow wraparound or zero size */ 159 /*
160 * Don't allow wraparound or zero size
161 */
140 last_addr = phys_addr + size - 1; 162 last_addr = phys_addr + size - 1;
141 if (!size || last_addr < phys_addr) 163 if (!size || last_addr < phys_addr)
142 return NULL; 164 return NULL;
143 165
144 /* 166 /*
145 * Mappings have to be page-aligned 167 * Page align the mapping size
146 */ 168 */
147 offset = phys_addr & ~PAGE_MASK;
148 phys_addr &= PAGE_MASK;
149 size = PAGE_ALIGN(last_addr + 1) - phys_addr; 169 size = PAGE_ALIGN(last_addr + 1) - phys_addr;
150 170
151 /* 171 return __ioremap_pfn(pfn, offset, size, flags);
152 * Ok, go for it..
153 */
154 area = get_vm_area(size, VM_IOREMAP);
155 if (!area)
156 return NULL;
157 addr = area->addr;
158 if (remap_area_pages((unsigned long) addr, phys_addr, size, flags)) {
159 vfree(addr);
160 return NULL;
161 }
162 return (void __iomem *) (offset + (char *)addr);
163} 172}
164EXPORT_SYMBOL(__ioremap); 173EXPORT_SYMBOL(__ioremap);
165 174
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 465487470d0e..d0f9bb5e9023 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -12,7 +12,7 @@
12# 12#
13# http://www.arm.linux.org.uk/developer/machines/?action=new 13# http://www.arm.linux.org.uk/developer/machines/?action=new
14# 14#
15# Last update: Fri Nov 25 14:43:04 2005 15# Last update: Mon Jan 9 12:56:42 2006
16# 16#
17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number 17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
18# 18#
@@ -910,3 +910,31 @@ mbus MACH_MBUS MBUS 896
910nadia2vb MACH_NADIA2VB NADIA2VB 897 910nadia2vb MACH_NADIA2VB NADIA2VB 897
911r1000 MACH_R1000 R1000 898 911r1000 MACH_R1000 R1000 898
912hw90250 MACH_HW90250 HW90250 899 912hw90250 MACH_HW90250 HW90250 899
913omap_2430sdp MACH_OMAP_2430SDP OMAP_2430SDP 900
914davinci_evm MACH_DAVINCI_EVM DAVINCI_EVM 901
915omap_tornado MACH_OMAP_TORNADO OMAP_TORNADO 902
916olocreek MACH_OLOCREEK OLOCREEK 903
917palmz72 MACH_PALMZ72 PALMZ72 904
918nxdb500 MACH_NXDB500 NXDB500 905
919apf9328 MACH_APF9328 APF9328 906
920omap_wipoq MACH_OMAP_WIPOQ OMAP_WIPOQ 907
921omap_twip MACH_OMAP_TWIP OMAP_TWIP 908
922xscale_treo650 MACH_XSCALE_PALMTREO650 XSCALE_PALMTREO650 909
923acumen MACH_ACUMEN ACUMEN 910
924xp100 MACH_XP100 XP100 911
925fs2410 MACH_FS2410 FS2410 912
926pxa270_cerf MACH_PXA270_CERF PXA270_CERF 913
927sq2ftlpalm MACH_SQ2FTLPALM SQ2FTLPALM 914
928bsemserver MACH_BSEMSERVER BSEMSERVER 915
929netclient MACH_NETCLIENT NETCLIENT 916
930xscale_palmtt5 MACH_XSCALE_PALMTT5 XSCALE_PALMTT5 917
931xscale_palmtc MACH_OMAP_PALMTC OMAP_PALMTC 918
932omap_apollon MACH_OMAP_APOLLON OMAP_APOLLON 919
933argonlvevb MACH_ARGONLVEVB ARGONLVEVB 920
934rea_2d MACH_REA_2D REA_2D 921
935eti3e524 MACH_TI3E524 TI3E524 922
936ateb9200 MACH_ATEB9200 ATEB9200 923
937auckland MACH_AUCKLAND AUCKLAND 924
938ak3220m MACH_AK3320M AK3320M 925
939duramax MACH_DURAMAX DURAMAX 926
940n35 MACH_N35 N35 927
diff --git a/arch/i386/crypto/aes-i586-asm.S b/arch/i386/crypto/aes-i586-asm.S
index 7b73c67cb4e8..911b15377f2e 100644
--- a/arch/i386/crypto/aes-i586-asm.S
+++ b/arch/i386/crypto/aes-i586-asm.S
@@ -255,18 +255,17 @@ aes_enc_blk:
255 xor 8(%ebp),%r4 255 xor 8(%ebp),%r4
256 xor 12(%ebp),%r5 256 xor 12(%ebp),%r5
257 257
258 sub $8,%esp // space for register saves on stack 258 sub $8,%esp // space for register saves on stack
259 add $16,%ebp // increment to next round key 259 add $16,%ebp // increment to next round key
260 sub $10,%r3 260 cmp $12,%r3
261 je 4f // 10 rounds for 128-bit key 261 jb 4f // 10 rounds for 128-bit key
262 add $32,%ebp 262 lea 32(%ebp),%ebp
263 sub $2,%r3 263 je 3f // 12 rounds for 192-bit key
264 je 3f // 12 rounds for 128-bit key 264 lea 32(%ebp),%ebp
265 add $32,%ebp 265
266 2662: fwd_rnd1( -64(%ebp) ,ft_tab) // 14 rounds for 256-bit key
2672: fwd_rnd1( -64(%ebp) ,ft_tab) // 14 rounds for 128-bit key
268 fwd_rnd2( -48(%ebp) ,ft_tab) 267 fwd_rnd2( -48(%ebp) ,ft_tab)
2693: fwd_rnd1( -32(%ebp) ,ft_tab) // 12 rounds for 128-bit key 2683: fwd_rnd1( -32(%ebp) ,ft_tab) // 12 rounds for 192-bit key
270 fwd_rnd2( -16(%ebp) ,ft_tab) 269 fwd_rnd2( -16(%ebp) ,ft_tab)
2714: fwd_rnd1( (%ebp) ,ft_tab) // 10 rounds for 128-bit key 2704: fwd_rnd1( (%ebp) ,ft_tab) // 10 rounds for 128-bit key
272 fwd_rnd2( +16(%ebp) ,ft_tab) 271 fwd_rnd2( +16(%ebp) ,ft_tab)
@@ -334,18 +333,17 @@ aes_dec_blk:
334 xor 8(%ebp),%r4 333 xor 8(%ebp),%r4
335 xor 12(%ebp),%r5 334 xor 12(%ebp),%r5
336 335
337 sub $8,%esp // space for register saves on stack 336 sub $8,%esp // space for register saves on stack
338 sub $16,%ebp // increment to next round key 337 sub $16,%ebp // increment to next round key
339 sub $10,%r3 338 cmp $12,%r3
340 je 4f // 10 rounds for 128-bit key 339 jb 4f // 10 rounds for 128-bit key
341 sub $32,%ebp 340 lea -32(%ebp),%ebp
342 sub $2,%r3 341 je 3f // 12 rounds for 192-bit key
343 je 3f // 12 rounds for 128-bit key 342 lea -32(%ebp),%ebp
344 sub $32,%ebp
345 343
3462: inv_rnd1( +64(%ebp), it_tab) // 14 rounds for 128-bit key 3442: inv_rnd1( +64(%ebp), it_tab) // 14 rounds for 256-bit key
347 inv_rnd2( +48(%ebp), it_tab) 345 inv_rnd2( +48(%ebp), it_tab)
3483: inv_rnd1( +32(%ebp), it_tab) // 12 rounds for 128-bit key 3463: inv_rnd1( +32(%ebp), it_tab) // 12 rounds for 192-bit key
349 inv_rnd2( +16(%ebp), it_tab) 347 inv_rnd2( +16(%ebp), it_tab)
3504: inv_rnd1( (%ebp), it_tab) // 10 rounds for 128-bit key 3484: inv_rnd1( (%ebp), it_tab) // 10 rounds for 128-bit key
351 inv_rnd2( -16(%ebp), it_tab) 349 inv_rnd2( -16(%ebp), it_tab)
diff --git a/arch/i386/crypto/aes.c b/arch/i386/crypto/aes.c
index 88ee85c3b43b..a50397b1d5c7 100644
--- a/arch/i386/crypto/aes.c
+++ b/arch/i386/crypto/aes.c
@@ -36,6 +36,8 @@
36 * Copyright (c) 2004 Red Hat, Inc., James Morris <jmorris@redhat.com> 36 * Copyright (c) 2004 Red Hat, Inc., James Morris <jmorris@redhat.com>
37 * 37 *
38 */ 38 */
39
40#include <asm/byteorder.h>
39#include <linux/kernel.h> 41#include <linux/kernel.h>
40#include <linux/module.h> 42#include <linux/module.h>
41#include <linux/init.h> 43#include <linux/init.h>
@@ -59,7 +61,6 @@ struct aes_ctx {
59}; 61};
60 62
61#define WPOLY 0x011b 63#define WPOLY 0x011b
62#define u32_in(x) le32_to_cpup((const __le32 *)(x))
63#define bytes2word(b0, b1, b2, b3) \ 64#define bytes2word(b0, b1, b2, b3) \
64 (((u32)(b3) << 24) | ((u32)(b2) << 16) | ((u32)(b1) << 8) | (b0)) 65 (((u32)(b3) << 24) | ((u32)(b2) << 16) | ((u32)(b1) << 8) | (b0))
65 66
@@ -93,7 +94,6 @@ static u32 rcon_tab[RC_LENGTH];
93 94
94u32 ft_tab[4][256]; 95u32 ft_tab[4][256];
95u32 fl_tab[4][256]; 96u32 fl_tab[4][256];
96static u32 ls_tab[4][256];
97static u32 im_tab[4][256]; 97static u32 im_tab[4][256];
98u32 il_tab[4][256]; 98u32 il_tab[4][256];
99u32 it_tab[4][256]; 99u32 it_tab[4][256];
@@ -144,15 +144,6 @@ static void gen_tabs(void)
144 fl_tab[2][i] = upr(w, 2); 144 fl_tab[2][i] = upr(w, 2);
145 fl_tab[3][i] = upr(w, 3); 145 fl_tab[3][i] = upr(w, 3);
146 146
147 /*
148 * table for key schedule if fl_tab above is
149 * not of the required form
150 */
151 ls_tab[0][i] = w;
152 ls_tab[1][i] = upr(w, 1);
153 ls_tab[2][i] = upr(w, 2);
154 ls_tab[3][i] = upr(w, 3);
155
156 b = fi(inv_affine((u8)i)); 147 b = fi(inv_affine((u8)i));
157 w = bytes2word(fe(b), f9(b), fd(b), fb(b)); 148 w = bytes2word(fe(b), f9(b), fd(b), fb(b));
158 149
@@ -393,13 +384,14 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
393 int i; 384 int i;
394 u32 ss[8]; 385 u32 ss[8];
395 struct aes_ctx *ctx = ctx_arg; 386 struct aes_ctx *ctx = ctx_arg;
387 const __le32 *key = (const __le32 *)in_key;
396 388
397 /* encryption schedule */ 389 /* encryption schedule */
398 390
399 ctx->ekey[0] = ss[0] = u32_in(in_key); 391 ctx->ekey[0] = ss[0] = le32_to_cpu(key[0]);
400 ctx->ekey[1] = ss[1] = u32_in(in_key + 4); 392 ctx->ekey[1] = ss[1] = le32_to_cpu(key[1]);
401 ctx->ekey[2] = ss[2] = u32_in(in_key + 8); 393 ctx->ekey[2] = ss[2] = le32_to_cpu(key[2]);
402 ctx->ekey[3] = ss[3] = u32_in(in_key + 12); 394 ctx->ekey[3] = ss[3] = le32_to_cpu(key[3]);
403 395
404 switch(key_len) { 396 switch(key_len) {
405 case 16: 397 case 16:
@@ -410,8 +402,8 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
410 break; 402 break;
411 403
412 case 24: 404 case 24:
413 ctx->ekey[4] = ss[4] = u32_in(in_key + 16); 405 ctx->ekey[4] = ss[4] = le32_to_cpu(key[4]);
414 ctx->ekey[5] = ss[5] = u32_in(in_key + 20); 406 ctx->ekey[5] = ss[5] = le32_to_cpu(key[5]);
415 for (i = 0; i < 7; i++) 407 for (i = 0; i < 7; i++)
416 ke6(ctx->ekey, i); 408 ke6(ctx->ekey, i);
417 kel6(ctx->ekey, 7); 409 kel6(ctx->ekey, 7);
@@ -419,10 +411,10 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
419 break; 411 break;
420 412
421 case 32: 413 case 32:
422 ctx->ekey[4] = ss[4] = u32_in(in_key + 16); 414 ctx->ekey[4] = ss[4] = le32_to_cpu(key[4]);
423 ctx->ekey[5] = ss[5] = u32_in(in_key + 20); 415 ctx->ekey[5] = ss[5] = le32_to_cpu(key[5]);
424 ctx->ekey[6] = ss[6] = u32_in(in_key + 24); 416 ctx->ekey[6] = ss[6] = le32_to_cpu(key[6]);
425 ctx->ekey[7] = ss[7] = u32_in(in_key + 28); 417 ctx->ekey[7] = ss[7] = le32_to_cpu(key[7]);
426 for (i = 0; i < 6; i++) 418 for (i = 0; i < 6; i++)
427 ke8(ctx->ekey, i); 419 ke8(ctx->ekey, i);
428 kel8(ctx->ekey, 6); 420 kel8(ctx->ekey, 6);
@@ -436,10 +428,10 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
436 428
437 /* decryption schedule */ 429 /* decryption schedule */
438 430
439 ctx->dkey[0] = ss[0] = u32_in(in_key); 431 ctx->dkey[0] = ss[0] = le32_to_cpu(key[0]);
440 ctx->dkey[1] = ss[1] = u32_in(in_key + 4); 432 ctx->dkey[1] = ss[1] = le32_to_cpu(key[1]);
441 ctx->dkey[2] = ss[2] = u32_in(in_key + 8); 433 ctx->dkey[2] = ss[2] = le32_to_cpu(key[2]);
442 ctx->dkey[3] = ss[3] = u32_in(in_key + 12); 434 ctx->dkey[3] = ss[3] = le32_to_cpu(key[3]);
443 435
444 switch (key_len) { 436 switch (key_len) {
445 case 16: 437 case 16:
@@ -450,8 +442,8 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
450 break; 442 break;
451 443
452 case 24: 444 case 24:
453 ctx->dkey[4] = ff(ss[4] = u32_in(in_key + 16)); 445 ctx->dkey[4] = ff(ss[4] = le32_to_cpu(key[4]));
454 ctx->dkey[5] = ff(ss[5] = u32_in(in_key + 20)); 446 ctx->dkey[5] = ff(ss[5] = le32_to_cpu(key[5]));
455 kdf6(ctx->dkey, 0); 447 kdf6(ctx->dkey, 0);
456 for (i = 1; i < 7; i++) 448 for (i = 1; i < 7; i++)
457 kd6(ctx->dkey, i); 449 kd6(ctx->dkey, i);
@@ -459,10 +451,10 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
459 break; 451 break;
460 452
461 case 32: 453 case 32:
462 ctx->dkey[4] = ff(ss[4] = u32_in(in_key + 16)); 454 ctx->dkey[4] = ff(ss[4] = le32_to_cpu(key[4]));
463 ctx->dkey[5] = ff(ss[5] = u32_in(in_key + 20)); 455 ctx->dkey[5] = ff(ss[5] = le32_to_cpu(key[5]));
464 ctx->dkey[6] = ff(ss[6] = u32_in(in_key + 24)); 456 ctx->dkey[6] = ff(ss[6] = le32_to_cpu(key[6]));
465 ctx->dkey[7] = ff(ss[7] = u32_in(in_key + 28)); 457 ctx->dkey[7] = ff(ss[7] = le32_to_cpu(key[7]));
466 kdf8(ctx->dkey, 0); 458 kdf8(ctx->dkey, 0);
467 for (i = 1; i < 6; i++) 459 for (i = 1; i < 6; i++)
468 kd8(ctx->dkey, i); 460 kd8(ctx->dkey, i);
@@ -484,6 +476,8 @@ static inline void aes_decrypt(void *ctx, u8 *dst, const u8 *src)
484 476
485static struct crypto_alg aes_alg = { 477static struct crypto_alg aes_alg = {
486 .cra_name = "aes", 478 .cra_name = "aes",
479 .cra_driver_name = "aes-i586",
480 .cra_priority = 200,
487 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 481 .cra_flags = CRYPTO_ALG_TYPE_CIPHER,
488 .cra_blocksize = AES_BLOCK_SIZE, 482 .cra_blocksize = AES_BLOCK_SIZE,
489 .cra_ctxsize = sizeof(struct aes_ctx), 483 .cra_ctxsize = sizeof(struct aes_ctx),
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig
index 46a6ad60a8f5..a3fb3376ffa0 100644
--- a/arch/sparc64/defconfig
+++ b/arch/sparc64/defconfig
@@ -1,46 +1,67 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.11 3# Linux kernel version: 2.6.15
4# Sun Mar 6 20:47:29 2005 4# Mon Jan 9 14:36:29 2006
5# 5#
6CONFIG_SPARC=y
7CONFIG_SPARC64=y
6CONFIG_64BIT=y 8CONFIG_64BIT=y
7CONFIG_MMU=y 9CONFIG_MMU=y
8CONFIG_TIME_INTERPOLATION=y 10CONFIG_TIME_INTERPOLATION=y
11CONFIG_ARCH_MAY_HAVE_PC_FDC=y
12CONFIG_SPARC64_PAGE_SIZE_8KB=y
13# CONFIG_SPARC64_PAGE_SIZE_64KB is not set
14# CONFIG_SPARC64_PAGE_SIZE_512KB is not set
15# CONFIG_SPARC64_PAGE_SIZE_4MB is not set
16CONFIG_SECCOMP=y
17# CONFIG_HZ_100 is not set
18CONFIG_HZ_250=y
19# CONFIG_HZ_1000 is not set
20CONFIG_HZ=250
9 21
10# 22#
11# Code maturity level options 23# Code maturity level options
12# 24#
13CONFIG_EXPERIMENTAL=y 25CONFIG_EXPERIMENTAL=y
14CONFIG_CLEAN_COMPILE=y 26CONFIG_CLEAN_COMPILE=y
15CONFIG_LOCK_KERNEL=y 27CONFIG_BROKEN_ON_SMP=y
28CONFIG_INIT_ENV_ARG_LIMIT=32
16 29
17# 30#
18# General setup 31# General setup
19# 32#
20CONFIG_LOCALVERSION="" 33CONFIG_LOCALVERSION=""
34CONFIG_LOCALVERSION_AUTO=y
21CONFIG_SWAP=y 35CONFIG_SWAP=y
22CONFIG_SYSVIPC=y 36CONFIG_SYSVIPC=y
23CONFIG_POSIX_MQUEUE=y 37CONFIG_POSIX_MQUEUE=y
24# CONFIG_BSD_PROCESS_ACCT is not set 38# CONFIG_BSD_PROCESS_ACCT is not set
25CONFIG_SYSCTL=y 39CONFIG_SYSCTL=y
26# CONFIG_AUDIT is not set 40# CONFIG_AUDIT is not set
27CONFIG_LOG_BUF_SHIFT=15
28CONFIG_HOTPLUG=y
29CONFIG_KOBJECT_UEVENT=y
30# CONFIG_IKCONFIG is not set 41# CONFIG_IKCONFIG is not set
42CONFIG_INITRAMFS_SOURCE=""
43CONFIG_UID16=y
44CONFIG_CC_OPTIMIZE_FOR_SIZE=y
31# CONFIG_EMBEDDED is not set 45# CONFIG_EMBEDDED is not set
32CONFIG_KALLSYMS=y 46CONFIG_KALLSYMS=y
33# CONFIG_KALLSYMS_ALL is not set 47# CONFIG_KALLSYMS_ALL is not set
34# CONFIG_KALLSYMS_EXTRA_PASS is not set 48# CONFIG_KALLSYMS_EXTRA_PASS is not set
49CONFIG_HOTPLUG=y
50CONFIG_PRINTK=y
51CONFIG_BUG=y
52CONFIG_ELF_CORE=y
53CONFIG_BASE_FULL=y
35CONFIG_FUTEX=y 54CONFIG_FUTEX=y
36CONFIG_EPOLL=y 55CONFIG_EPOLL=y
37# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
38CONFIG_SHMEM=y 56CONFIG_SHMEM=y
39CONFIG_CC_ALIGN_FUNCTIONS=0 57CONFIG_CC_ALIGN_FUNCTIONS=0
40CONFIG_CC_ALIGN_LABELS=0 58CONFIG_CC_ALIGN_LABELS=0
41CONFIG_CC_ALIGN_LOOPS=0 59CONFIG_CC_ALIGN_LOOPS=0
42CONFIG_CC_ALIGN_JUMPS=0 60CONFIG_CC_ALIGN_JUMPS=0
61CONFIG_SLAB=y
43# CONFIG_TINY_SHMEM is not set 62# CONFIG_TINY_SHMEM is not set
63CONFIG_BASE_SMALL=0
64# CONFIG_SLOB is not set
44 65
45# 66#
46# Loadable module support 67# Loadable module support
@@ -52,20 +73,32 @@ CONFIG_OBSOLETE_MODPARM=y
52CONFIG_MODVERSIONS=y 73CONFIG_MODVERSIONS=y
53CONFIG_MODULE_SRCVERSION_ALL=y 74CONFIG_MODULE_SRCVERSION_ALL=y
54CONFIG_KMOD=y 75CONFIG_KMOD=y
55CONFIG_STOP_MACHINE=y 76
77#
78# Block layer
79#
80
81#
82# IO Schedulers
83#
84CONFIG_IOSCHED_NOOP=y
85CONFIG_IOSCHED_AS=y
86CONFIG_IOSCHED_DEADLINE=y
87CONFIG_IOSCHED_CFQ=y
88CONFIG_DEFAULT_AS=y
89# CONFIG_DEFAULT_DEADLINE is not set
90# CONFIG_DEFAULT_CFQ is not set
91# CONFIG_DEFAULT_NOOP is not set
92CONFIG_DEFAULT_IOSCHED="anticipatory"
56CONFIG_SYSVIPC_COMPAT=y 93CONFIG_SYSVIPC_COMPAT=y
57 94
58# 95#
59# General machine setup 96# General machine setup
60# 97#
61CONFIG_BBC_I2C=m 98# CONFIG_SMP is not set
62CONFIG_VT=y
63CONFIG_VT_CONSOLE=y
64CONFIG_HW_CONSOLE=y
65CONFIG_SMP=y
66# CONFIG_PREEMPT is not set 99# CONFIG_PREEMPT is not set
67CONFIG_NR_CPUS=4
68CONFIG_CPU_FREQ=y 100CONFIG_CPU_FREQ=y
101CONFIG_CPU_FREQ_TABLE=m
69# CONFIG_CPU_FREQ_DEBUG is not set 102# CONFIG_CPU_FREQ_DEBUG is not set
70CONFIG_CPU_FREQ_STAT=m 103CONFIG_CPU_FREQ_STAT=m
71CONFIG_CPU_FREQ_STAT_DETAILS=y 104CONFIG_CPU_FREQ_STAT_DETAILS=y
@@ -75,15 +108,22 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
75CONFIG_CPU_FREQ_GOV_POWERSAVE=m 108CONFIG_CPU_FREQ_GOV_POWERSAVE=m
76CONFIG_CPU_FREQ_GOV_USERSPACE=m 109CONFIG_CPU_FREQ_GOV_USERSPACE=m
77CONFIG_CPU_FREQ_GOV_ONDEMAND=m 110CONFIG_CPU_FREQ_GOV_ONDEMAND=m
78CONFIG_CPU_FREQ_TABLE=y 111CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
79CONFIG_US3_FREQ=m 112CONFIG_US3_FREQ=m
80CONFIG_US2E_FREQ=m 113CONFIG_US2E_FREQ=m
81CONFIG_SPARC64=y
82CONFIG_RWSEM_XCHGADD_ALGORITHM=y 114CONFIG_RWSEM_XCHGADD_ALGORITHM=y
83CONFIG_GENERIC_CALIBRATE_DELAY=y 115CONFIG_GENERIC_CALIBRATE_DELAY=y
84CONFIG_HUGETLB_PAGE_SIZE_4MB=y 116CONFIG_HUGETLB_PAGE_SIZE_4MB=y
85# CONFIG_HUGETLB_PAGE_SIZE_512K is not set 117# CONFIG_HUGETLB_PAGE_SIZE_512K is not set
86# CONFIG_HUGETLB_PAGE_SIZE_64K is not set 118# CONFIG_HUGETLB_PAGE_SIZE_64K is not set
119CONFIG_SELECT_MEMORY_MODEL=y
120CONFIG_FLATMEM_MANUAL=y
121# CONFIG_DISCONTIGMEM_MANUAL is not set
122# CONFIG_SPARSEMEM_MANUAL is not set
123CONFIG_FLATMEM=y
124CONFIG_FLAT_NODE_MEM_MAP=y
125# CONFIG_SPARSEMEM_STATIC is not set
126CONFIG_SPLIT_PTLOCK_CPUS=4
87CONFIG_GENERIC_ISA_DMA=y 127CONFIG_GENERIC_ISA_DMA=y
88CONFIG_SBUS=y 128CONFIG_SBUS=y
89CONFIG_SBUSCHAR=y 129CONFIG_SBUSCHAR=y
@@ -91,130 +131,142 @@ CONFIG_SUN_AUXIO=y
91CONFIG_SUN_IO=y 131CONFIG_SUN_IO=y
92CONFIG_PCI=y 132CONFIG_PCI=y
93CONFIG_PCI_DOMAINS=y 133CONFIG_PCI_DOMAINS=y
94CONFIG_RTC=y
95# CONFIG_PCI_LEGACY_PROC is not set 134# CONFIG_PCI_LEGACY_PROC is not set
96# CONFIG_PCI_NAMES is not set 135# CONFIG_PCI_DEBUG is not set
97CONFIG_SUN_OPENPROMFS=m 136CONFIG_SUN_OPENPROMFS=m
98CONFIG_SPARC32_COMPAT=y 137CONFIG_SPARC32_COMPAT=y
99CONFIG_COMPAT=y 138CONFIG_COMPAT=y
100CONFIG_UID16=y
101CONFIG_BINFMT_ELF32=y 139CONFIG_BINFMT_ELF32=y
102# CONFIG_BINFMT_AOUT32 is not set 140# CONFIG_BINFMT_AOUT32 is not set
141
142#
143# Executable file formats
144#
103CONFIG_BINFMT_ELF=y 145CONFIG_BINFMT_ELF=y
104CONFIG_BINFMT_MISC=m 146CONFIG_BINFMT_MISC=m
105CONFIG_SOLARIS_EMUL=m 147# CONFIG_SOLARIS_EMUL is not set
148# CONFIG_CMDLINE_BOOL is not set
106 149
107# 150#
108# Parallel port support 151# Networking
109# 152#
110CONFIG_PARPORT=m 153CONFIG_NET=y
111CONFIG_PARPORT_PC=m
112CONFIG_PARPORT_PC_FIFO=y
113# CONFIG_PARPORT_PC_SUPERIO is not set
114# CONFIG_PARPORT_SUNBPP is not set
115# CONFIG_PARPORT_OTHER is not set
116CONFIG_PARPORT_1284=y
117CONFIG_PRINTER=m
118CONFIG_ENVCTRL=m
119CONFIG_DISPLAY7SEG=m
120# CONFIG_CMDLINE_BOOL is not set
121 154
122# 155#
123# Generic Driver Options 156# Networking options
124# 157#
125CONFIG_STANDALONE=y 158CONFIG_PACKET=y
126# CONFIG_PREVENT_FIRMWARE_BUILD is not set 159CONFIG_PACKET_MMAP=y
127CONFIG_FW_LOADER=m 160CONFIG_UNIX=y
128# CONFIG_DEBUG_DRIVER is not set 161CONFIG_XFRM=y
162CONFIG_XFRM_USER=m
163CONFIG_NET_KEY=m
164CONFIG_INET=y
165CONFIG_IP_MULTICAST=y
166# CONFIG_IP_ADVANCED_ROUTER is not set
167CONFIG_IP_FIB_HASH=y
168# CONFIG_IP_PNP is not set
169CONFIG_NET_IPIP=m
170CONFIG_NET_IPGRE=m
171CONFIG_NET_IPGRE_BROADCAST=y
172CONFIG_IP_MROUTE=y
173CONFIG_IP_PIMSM_V1=y
174CONFIG_IP_PIMSM_V2=y
175CONFIG_ARPD=y
176CONFIG_SYN_COOKIES=y
177CONFIG_INET_AH=y
178CONFIG_INET_ESP=y
179CONFIG_INET_IPCOMP=y
180CONFIG_INET_TUNNEL=y
181CONFIG_INET_DIAG=y
182CONFIG_INET_TCP_DIAG=y
183CONFIG_TCP_CONG_ADVANCED=y
129 184
130# 185#
131# Graphics support 186# TCP congestion control
132# 187#
133CONFIG_FB=y 188CONFIG_TCP_CONG_BIC=y
134CONFIG_FB_MODE_HELPERS=y 189CONFIG_TCP_CONG_CUBIC=m
135CONFIG_FB_TILEBLITTING=y 190CONFIG_TCP_CONG_WESTWOOD=m
136# CONFIG_FB_CIRRUS is not set 191CONFIG_TCP_CONG_HTCP=m
137CONFIG_FB_PM2=y 192CONFIG_TCP_CONG_HSTCP=m
138# CONFIG_FB_PM2_FIFO_DISCONNECT is not set 193CONFIG_TCP_CONG_HYBLA=m
139# CONFIG_FB_ASILIANT is not set 194CONFIG_TCP_CONG_VEGAS=m
140# CONFIG_FB_IMSTT is not set 195CONFIG_TCP_CONG_SCALABLE=m
141# CONFIG_FB_BW2 is not set 196CONFIG_IPV6=m
142# CONFIG_FB_CG3 is not set 197CONFIG_IPV6_PRIVACY=y
143CONFIG_FB_CG6=y 198CONFIG_INET6_AH=m
144# CONFIG_FB_RIVA is not set 199CONFIG_INET6_ESP=m
145# CONFIG_FB_MATROX is not set 200CONFIG_INET6_IPCOMP=m
146# CONFIG_FB_RADEON_OLD is not set 201CONFIG_INET6_TUNNEL=m
147# CONFIG_FB_RADEON is not set 202CONFIG_IPV6_TUNNEL=m
148# CONFIG_FB_ATY128 is not set 203# CONFIG_NETFILTER is not set
149CONFIG_FB_ATY=y
150CONFIG_FB_ATY_CT=y
151# CONFIG_FB_ATY_GENERIC_LCD is not set
152# CONFIG_FB_ATY_XL_INIT is not set
153CONFIG_FB_ATY_GX=y
154# CONFIG_FB_SAVAGE is not set
155# CONFIG_FB_SIS is not set
156# CONFIG_FB_NEOMAGIC is not set
157# CONFIG_FB_KYRO is not set
158# CONFIG_FB_3DFX is not set
159# CONFIG_FB_VOODOO1 is not set
160# CONFIG_FB_TRIDENT is not set
161CONFIG_FB_SBUS=y
162CONFIG_FB_FFB=y
163# CONFIG_FB_TCX is not set
164# CONFIG_FB_CG14 is not set
165# CONFIG_FB_P9100 is not set
166# CONFIG_FB_LEO is not set
167# CONFIG_FB_PCI is not set
168# CONFIG_FB_VIRTUAL is not set
169 204
170# 205#
171# Console display driver support 206# DCCP Configuration (EXPERIMENTAL)
172# 207#
173# CONFIG_PROM_CONSOLE is not set 208CONFIG_IP_DCCP=m
174CONFIG_DUMMY_CONSOLE=y 209CONFIG_INET_DCCP_DIAG=m
175CONFIG_FRAMEBUFFER_CONSOLE=y
176CONFIG_FONTS=y
177# CONFIG_FONT_8x8 is not set
178# CONFIG_FONT_8x16 is not set
179# CONFIG_FONT_6x11 is not set
180# CONFIG_FONT_PEARL_8x8 is not set
181# CONFIG_FONT_ACORN_8x8 is not set
182CONFIG_FONT_SUN8x16=y
183# CONFIG_FONT_SUN12x22 is not set
184 210
185# 211#
186# Logo configuration 212# DCCP CCIDs Configuration (EXPERIMENTAL)
187# 213#
188CONFIG_LOGO=y 214CONFIG_IP_DCCP_CCID3=m
189# CONFIG_LOGO_LINUX_MONO is not set 215CONFIG_IP_DCCP_TFRC_LIB=m
190# CONFIG_LOGO_LINUX_VGA16 is not set
191# CONFIG_LOGO_LINUX_CLUT224 is not set
192CONFIG_LOGO_SUN_CLUT224=y
193# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
194 216
195# 217#
196# Serial drivers 218# DCCP Kernel Hacking
197# 219#
220# CONFIG_IP_DCCP_DEBUG is not set
221# CONFIG_IP_DCCP_UNLOAD_HACK is not set
198 222
199# 223#
200# Non-8250 serial port support 224# SCTP Configuration (EXPERIMENTAL)
201# 225#
202CONFIG_SERIAL_SUNCORE=y 226# CONFIG_IP_SCTP is not set
203CONFIG_SERIAL_SUNZILOG=y 227# CONFIG_ATM is not set
204CONFIG_SERIAL_SUNZILOG_CONSOLE=y 228# CONFIG_BRIDGE is not set
205CONFIG_SERIAL_SUNSU=y 229CONFIG_VLAN_8021Q=m
206CONFIG_SERIAL_SUNSU_CONSOLE=y 230# CONFIG_DECNET is not set
207CONFIG_SERIAL_SUNSAB=m 231# CONFIG_LLC2 is not set
208CONFIG_SERIAL_CORE=y 232# CONFIG_IPX is not set
209CONFIG_SERIAL_CORE_CONSOLE=y 233# CONFIG_ATALK is not set
234# CONFIG_X25 is not set
235# CONFIG_LAPB is not set
236# CONFIG_NET_DIVERT is not set
237# CONFIG_ECONET is not set
238# CONFIG_WAN_ROUTER is not set
210 239
211# 240#
212# Misc Linux/SPARC drivers 241# QoS and/or fair queueing
213# 242#
214CONFIG_SUN_OPENPROMIO=m 243# CONFIG_NET_SCHED is not set
215CONFIG_SUN_MOSTEK_RTC=y 244
216CONFIG_OBP_FLASH=m 245#
217# CONFIG_SUN_BPP is not set 246# Network testing
247#
248CONFIG_NET_PKTGEN=m
249# CONFIG_HAMRADIO is not set
250# CONFIG_IRDA is not set
251# CONFIG_BT is not set
252# CONFIG_IEEE80211 is not set
253
254#
255# Device Drivers
256#
257
258#
259# Generic Driver Options
260#
261CONFIG_STANDALONE=y
262# CONFIG_PREVENT_FIRMWARE_BUILD is not set
263CONFIG_FW_LOADER=y
264# CONFIG_DEBUG_DRIVER is not set
265
266#
267# Connector - unified userspace <-> kernelspace linker
268#
269CONFIG_CONNECTOR=m
218 270
219# 271#
220# Memory Technology Devices (MTD) 272# Memory Technology Devices (MTD)
@@ -222,10 +274,18 @@ CONFIG_OBP_FLASH=m
222# CONFIG_MTD is not set 274# CONFIG_MTD is not set
223 275
224# 276#
277# Parallel port support
278#
279# CONFIG_PARPORT is not set
280
281#
282# Plug and Play support
283#
284
285#
225# Block devices 286# Block devices
226# 287#
227# CONFIG_BLK_DEV_FD is not set 288# CONFIG_BLK_DEV_FD is not set
228# CONFIG_PARIDE is not set
229# CONFIG_BLK_CPQ_DA is not set 289# CONFIG_BLK_CPQ_DA is not set
230# CONFIG_BLK_CPQ_CISS_DA is not set 290# CONFIG_BLK_CPQ_CISS_DA is not set
231# CONFIG_BLK_DEV_DAC960 is not set 291# CONFIG_BLK_DEV_DAC960 is not set
@@ -234,22 +294,13 @@ CONFIG_OBP_FLASH=m
234CONFIG_BLK_DEV_LOOP=m 294CONFIG_BLK_DEV_LOOP=m
235CONFIG_BLK_DEV_CRYPTOLOOP=m 295CONFIG_BLK_DEV_CRYPTOLOOP=m
236CONFIG_BLK_DEV_NBD=m 296CONFIG_BLK_DEV_NBD=m
237CONFIG_BLK_DEV_SX8=m 297# CONFIG_BLK_DEV_SX8 is not set
238CONFIG_BLK_DEV_UB=m 298CONFIG_BLK_DEV_UB=m
239# CONFIG_BLK_DEV_RAM is not set 299# CONFIG_BLK_DEV_RAM is not set
240CONFIG_BLK_DEV_RAM_COUNT=16 300CONFIG_BLK_DEV_RAM_COUNT=16
241CONFIG_INITRAMFS_SOURCE=""
242CONFIG_CDROM_PKTCDVD=m 301CONFIG_CDROM_PKTCDVD=m
243CONFIG_CDROM_PKTCDVD_BUFFERS=8 302CONFIG_CDROM_PKTCDVD_BUFFERS=8
244CONFIG_CDROM_PKTCDVD_WCACHE=y 303CONFIG_CDROM_PKTCDVD_WCACHE=y
245
246#
247# IO Schedulers
248#
249CONFIG_IOSCHED_NOOP=y
250CONFIG_IOSCHED_AS=y
251CONFIG_IOSCHED_DEADLINE=y
252CONFIG_IOSCHED_CFQ=y
253CONFIG_ATA_OVER_ETH=m 304CONFIG_ATA_OVER_ETH=m
254 305
255# 306#
@@ -265,7 +316,7 @@ CONFIG_BLK_DEV_IDE=y
265CONFIG_BLK_DEV_IDEDISK=y 316CONFIG_BLK_DEV_IDEDISK=y
266# CONFIG_IDEDISK_MULTI_MODE is not set 317# CONFIG_IDEDISK_MULTI_MODE is not set
267CONFIG_BLK_DEV_IDECD=y 318CONFIG_BLK_DEV_IDECD=y
268CONFIG_BLK_DEV_IDETAPE=m 319# CONFIG_BLK_DEV_IDETAPE is not set
269# CONFIG_BLK_DEV_IDEFLOPPY is not set 320# CONFIG_BLK_DEV_IDEFLOPPY is not set
270# CONFIG_BLK_DEV_IDESCSI is not set 321# CONFIG_BLK_DEV_IDESCSI is not set
271# CONFIG_IDE_TASK_IOCTL is not set 322# CONFIG_IDE_TASK_IOCTL is not set
@@ -278,7 +329,7 @@ CONFIG_BLK_DEV_IDEPCI=y
278# CONFIG_IDEPCI_SHARE_IRQ is not set 329# CONFIG_IDEPCI_SHARE_IRQ is not set
279# CONFIG_BLK_DEV_OFFBOARD is not set 330# CONFIG_BLK_DEV_OFFBOARD is not set
280# CONFIG_BLK_DEV_GENERIC is not set 331# CONFIG_BLK_DEV_GENERIC is not set
281CONFIG_BLK_DEV_OPTI621=m 332# CONFIG_BLK_DEV_OPTI621 is not set
282CONFIG_BLK_DEV_IDEDMA_PCI=y 333CONFIG_BLK_DEV_IDEDMA_PCI=y
283# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 334# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
284CONFIG_IDEDMA_PCI_AUTO=y 335CONFIG_IDEDMA_PCI_AUTO=y
@@ -286,27 +337,25 @@ CONFIG_IDEDMA_ONLYDISK=y
286# CONFIG_BLK_DEV_AEC62XX is not set 337# CONFIG_BLK_DEV_AEC62XX is not set
287CONFIG_BLK_DEV_ALI15X3=y 338CONFIG_BLK_DEV_ALI15X3=y
288# CONFIG_WDC_ALI15X3 is not set 339# CONFIG_WDC_ALI15X3 is not set
289CONFIG_BLK_DEV_AMD74XX=m 340# CONFIG_BLK_DEV_AMD74XX is not set
290CONFIG_BLK_DEV_CMD64X=m 341# CONFIG_BLK_DEV_CMD64X is not set
291CONFIG_BLK_DEV_TRIFLEX=m 342# CONFIG_BLK_DEV_TRIFLEX is not set
292CONFIG_BLK_DEV_CY82C693=m 343# CONFIG_BLK_DEV_CY82C693 is not set
293CONFIG_BLK_DEV_CS5520=m 344# CONFIG_BLK_DEV_CS5520 is not set
294CONFIG_BLK_DEV_CS5530=m 345# CONFIG_BLK_DEV_CS5530 is not set
295CONFIG_BLK_DEV_HPT34X=m 346# CONFIG_BLK_DEV_HPT34X is not set
296# CONFIG_HPT34X_AUTODMA is not set 347# CONFIG_BLK_DEV_HPT366 is not set
297CONFIG_BLK_DEV_HPT366=m 348# CONFIG_BLK_DEV_SC1200 is not set
298CONFIG_BLK_DEV_SC1200=m 349# CONFIG_BLK_DEV_PIIX is not set
299CONFIG_BLK_DEV_PIIX=m 350# CONFIG_BLK_DEV_IT821X is not set
300CONFIG_BLK_DEV_NS87415=m 351# CONFIG_BLK_DEV_NS87415 is not set
301CONFIG_BLK_DEV_PDC202XX_OLD=m 352# CONFIG_BLK_DEV_PDC202XX_OLD is not set
302# CONFIG_PDC202XX_BURST is not set 353# CONFIG_BLK_DEV_PDC202XX_NEW is not set
303CONFIG_BLK_DEV_PDC202XX_NEW=m 354# CONFIG_BLK_DEV_SVWKS is not set
304# CONFIG_PDC202XX_FORCE is not set 355# CONFIG_BLK_DEV_SIIMAGE is not set
305CONFIG_BLK_DEV_SVWKS=m 356# CONFIG_BLK_DEV_SLC90E66 is not set
306CONFIG_BLK_DEV_SIIMAGE=m 357# CONFIG_BLK_DEV_TRM290 is not set
307CONFIG_BLK_DEV_SLC90E66=m 358# CONFIG_BLK_DEV_VIA82CXXX is not set
308CONFIG_BLK_DEV_TRM290=m
309CONFIG_BLK_DEV_VIA82CXXX=m
310# CONFIG_IDE_ARM is not set 359# CONFIG_IDE_ARM is not set
311CONFIG_BLK_DEV_IDEDMA=y 360CONFIG_BLK_DEV_IDEDMA=y
312# CONFIG_IDEDMA_IVB is not set 361# CONFIG_IDEDMA_IVB is not set
@@ -316,6 +365,7 @@ CONFIG_IDEDMA_AUTO=y
316# 365#
317# SCSI device support 366# SCSI device support
318# 367#
368CONFIG_RAID_ATTRS=m
319CONFIG_SCSI=y 369CONFIG_SCSI=y
320CONFIG_SCSI_PROC_FS=y 370CONFIG_SCSI_PROC_FS=y
321 371
@@ -323,11 +373,12 @@ CONFIG_SCSI_PROC_FS=y
323# SCSI support type (disk, tape, CD-ROM) 373# SCSI support type (disk, tape, CD-ROM)
324# 374#
325CONFIG_BLK_DEV_SD=y 375CONFIG_BLK_DEV_SD=y
326CONFIG_CHR_DEV_ST=m 376# CONFIG_CHR_DEV_ST is not set
327CONFIG_CHR_DEV_OSST=m 377# CONFIG_CHR_DEV_OSST is not set
328CONFIG_BLK_DEV_SR=m 378CONFIG_BLK_DEV_SR=m
329CONFIG_BLK_DEV_SR_VENDOR=y 379CONFIG_BLK_DEV_SR_VENDOR=y
330CONFIG_CHR_DEV_SG=m 380CONFIG_CHR_DEV_SG=m
381# CONFIG_CHR_DEV_SCH is not set
331 382
332# 383#
333# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 384# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -340,89 +391,42 @@ CONFIG_SCSI_CONSTANTS=y
340# SCSI Transport Attributes 391# SCSI Transport Attributes
341# 392#
342CONFIG_SCSI_SPI_ATTRS=y 393CONFIG_SCSI_SPI_ATTRS=y
343CONFIG_SCSI_FC_ATTRS=m 394CONFIG_SCSI_FC_ATTRS=y
344CONFIG_SCSI_ISCSI_ATTRS=m 395CONFIG_SCSI_ISCSI_ATTRS=m
396# CONFIG_SCSI_SAS_ATTRS is not set
345 397
346# 398#
347# SCSI low-level drivers 399# SCSI low-level drivers
348# 400#
349CONFIG_BLK_DEV_3W_XXXX_RAID=m 401CONFIG_ISCSI_TCP=m
350CONFIG_SCSI_3W_9XXX=m 402# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
351CONFIG_SCSI_ACARD=m 403# CONFIG_SCSI_3W_9XXX is not set
352CONFIG_SCSI_AACRAID=m 404# CONFIG_SCSI_ACARD is not set
405# CONFIG_SCSI_AACRAID is not set
353# CONFIG_SCSI_AIC7XXX is not set 406# CONFIG_SCSI_AIC7XXX is not set
354# CONFIG_SCSI_AIC7XXX_OLD is not set 407# CONFIG_SCSI_AIC7XXX_OLD is not set
355CONFIG_SCSI_AIC79XX=m 408# CONFIG_SCSI_AIC79XX is not set
356CONFIG_AIC79XX_CMDS_PER_DEVICE=32
357CONFIG_AIC79XX_RESET_DELAY_MS=15000
358# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
359# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
360# CONFIG_AIC79XX_DEBUG_ENABLE is not set
361CONFIG_AIC79XX_DEBUG_MASK=0
362# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
363# CONFIG_MEGARAID_NEWGEN is not set 409# CONFIG_MEGARAID_NEWGEN is not set
364# CONFIG_MEGARAID_LEGACY is not set 410# CONFIG_MEGARAID_LEGACY is not set
365CONFIG_SCSI_SATA=y 411# CONFIG_MEGARAID_SAS is not set
366CONFIG_SCSI_SATA_AHCI=m 412# CONFIG_SCSI_SATA is not set
367CONFIG_SCSI_SATA_SVW=m 413# CONFIG_SCSI_DMX3191D is not set
368CONFIG_SCSI_ATA_PIIX=m
369CONFIG_SCSI_SATA_NV=m
370CONFIG_SCSI_SATA_PROMISE=m
371CONFIG_SCSI_SATA_QSTOR=m
372CONFIG_SCSI_SATA_SX4=m
373CONFIG_SCSI_SATA_SIL=m
374CONFIG_SCSI_SATA_SIS=m
375CONFIG_SCSI_SATA_ULI=m
376CONFIG_SCSI_SATA_VIA=m
377CONFIG_SCSI_SATA_VITESSE=m
378CONFIG_SCSI_DMX3191D=m
379CONFIG_SCSI_EATA_PIO=m
380# CONFIG_SCSI_FUTURE_DOMAIN is not set 414# CONFIG_SCSI_FUTURE_DOMAIN is not set
381CONFIG_SCSI_IPS=m 415# CONFIG_SCSI_IPS is not set
382CONFIG_SCSI_INITIO=m 416# CONFIG_SCSI_INITIO is not set
383CONFIG_SCSI_INIA100=m 417# CONFIG_SCSI_INIA100 is not set
384CONFIG_SCSI_PPA=m 418# CONFIG_SCSI_SYM53C8XX_2 is not set
385CONFIG_SCSI_IMM=m
386# CONFIG_SCSI_IZIP_EPP16 is not set
387# CONFIG_SCSI_IZIP_SLOW_CTR is not set
388CONFIG_SCSI_SYM53C8XX_2=y
389CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
390CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
391CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
392# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
393# CONFIG_SCSI_IPR is not set 419# CONFIG_SCSI_IPR is not set
394CONFIG_SCSI_QLOGIC_ISP=m 420# CONFIG_SCSI_QLOGIC_FC is not set
395CONFIG_SCSI_QLOGIC_FC=y
396CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
397# CONFIG_SCSI_QLOGIC_1280 is not set 421# CONFIG_SCSI_QLOGIC_1280 is not set
398CONFIG_SCSI_QLOGICPTI=m 422# CONFIG_SCSI_QLOGICPTI is not set
399CONFIG_SCSI_QLA2XXX=y 423CONFIG_SCSI_QLA2XXX=y
400# CONFIG_SCSI_QLA21XX is not set 424# CONFIG_SCSI_QLA2XXX_EMBEDDED_FIRMWARE is not set
401# CONFIG_SCSI_QLA22XX is not set 425# CONFIG_SCSI_LPFC is not set
402# CONFIG_SCSI_QLA2300 is not set 426# CONFIG_SCSI_DC395x is not set
403# CONFIG_SCSI_QLA2322 is not set
404# CONFIG_SCSI_QLA6312 is not set
405CONFIG_SCSI_DC395x=m
406# CONFIG_SCSI_DC390T is not set 427# CONFIG_SCSI_DC390T is not set
407CONFIG_SCSI_DEBUG=m 428# CONFIG_SCSI_DEBUG is not set
408CONFIG_SCSI_SUNESP=y 429# CONFIG_SCSI_SUNESP is not set
409
410#
411# Fibre Channel support
412#
413CONFIG_FC4=m
414
415#
416# FC4 drivers
417#
418CONFIG_FC4_SOC=m
419CONFIG_FC4_SOCAL=m
420
421#
422# FC4 targets
423#
424CONFIG_SCSI_PLUTO=m
425CONFIG_SCSI_FCAL=m
426 430
427# 431#
428# Multi-device support (RAID and LVM) 432# Multi-device support (RAID and LVM)
@@ -442,427 +446,34 @@ CONFIG_DM_CRYPT=m
442CONFIG_DM_SNAPSHOT=m 446CONFIG_DM_SNAPSHOT=m
443CONFIG_DM_MIRROR=m 447CONFIG_DM_MIRROR=m
444CONFIG_DM_ZERO=m 448CONFIG_DM_ZERO=m
449# CONFIG_DM_MULTIPATH is not set
445 450
446# 451#
447# Fusion MPT device support 452# Fusion MPT device support
448# 453#
449CONFIG_FUSION=m 454# CONFIG_FUSION is not set
450CONFIG_FUSION_MAX_SGE=40 455# CONFIG_FUSION_SPI is not set
451CONFIG_FUSION_CTL=m 456# CONFIG_FUSION_FC is not set
452CONFIG_FUSION_LAN=m 457# CONFIG_FUSION_SAS is not set
453 458
454# 459#
455# IEEE 1394 (FireWire) support 460# IEEE 1394 (FireWire) support
456# 461#
457CONFIG_IEEE1394=m 462# CONFIG_IEEE1394 is not set
458
459#
460# Subsystem Options
461#
462# CONFIG_IEEE1394_VERBOSEDEBUG is not set
463CONFIG_IEEE1394_OUI_DB=y
464CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
465CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
466
467#
468# Device Drivers
469#
470CONFIG_IEEE1394_PCILYNX=m
471CONFIG_IEEE1394_OHCI1394=m
472
473#
474# Protocol Drivers
475#
476CONFIG_IEEE1394_VIDEO1394=m
477CONFIG_IEEE1394_SBP2=m
478# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
479CONFIG_IEEE1394_ETH1394=m
480CONFIG_IEEE1394_DV1394=m
481CONFIG_IEEE1394_RAWIO=m
482CONFIG_IEEE1394_CMP=m
483CONFIG_IEEE1394_AMDTP=m
484
485#
486# Networking support
487#
488CONFIG_NET=y
489
490#
491# Networking options
492#
493CONFIG_PACKET=y
494CONFIG_PACKET_MMAP=y
495CONFIG_NETLINK_DEV=y
496CONFIG_UNIX=y
497CONFIG_NET_KEY=m
498CONFIG_INET=y
499CONFIG_IP_MULTICAST=y
500# CONFIG_IP_ADVANCED_ROUTER is not set
501# CONFIG_IP_PNP is not set
502CONFIG_NET_IPIP=m
503CONFIG_NET_IPGRE=m
504CONFIG_NET_IPGRE_BROADCAST=y
505CONFIG_IP_MROUTE=y
506CONFIG_IP_PIMSM_V1=y
507CONFIG_IP_PIMSM_V2=y
508CONFIG_ARPD=y
509CONFIG_SYN_COOKIES=y
510CONFIG_INET_AH=y
511CONFIG_INET_ESP=y
512CONFIG_INET_IPCOMP=y
513CONFIG_INET_TUNNEL=y
514CONFIG_IP_TCPDIAG=y
515# CONFIG_IP_TCPDIAG_IPV6 is not set
516
517#
518# IP: Virtual Server Configuration
519#
520CONFIG_IP_VS=m
521# CONFIG_IP_VS_DEBUG is not set
522CONFIG_IP_VS_TAB_BITS=12
523
524#
525# IPVS transport protocol load balancing support
526#
527CONFIG_IP_VS_PROTO_TCP=y
528CONFIG_IP_VS_PROTO_UDP=y
529CONFIG_IP_VS_PROTO_ESP=y
530CONFIG_IP_VS_PROTO_AH=y
531
532#
533# IPVS scheduler
534#
535CONFIG_IP_VS_RR=m
536CONFIG_IP_VS_WRR=m
537CONFIG_IP_VS_LC=m
538CONFIG_IP_VS_WLC=m
539CONFIG_IP_VS_LBLC=m
540CONFIG_IP_VS_LBLCR=m
541CONFIG_IP_VS_DH=m
542CONFIG_IP_VS_SH=m
543CONFIG_IP_VS_SED=m
544CONFIG_IP_VS_NQ=m
545
546#
547# IPVS application helper
548#
549CONFIG_IP_VS_FTP=m
550CONFIG_IPV6=m
551CONFIG_IPV6_PRIVACY=y
552CONFIG_INET6_AH=m
553CONFIG_INET6_ESP=m
554CONFIG_INET6_IPCOMP=m
555CONFIG_INET6_TUNNEL=m
556CONFIG_IPV6_TUNNEL=m
557CONFIG_NETFILTER=y
558# CONFIG_NETFILTER_DEBUG is not set
559CONFIG_BRIDGE_NETFILTER=y
560
561#
562# IP: Netfilter Configuration
563#
564CONFIG_IP_NF_CONNTRACK=m
565CONFIG_IP_NF_CT_ACCT=y
566CONFIG_IP_NF_CONNTRACK_MARK=y
567CONFIG_IP_NF_CT_PROTO_SCTP=m
568CONFIG_IP_NF_FTP=m
569CONFIG_IP_NF_IRC=m
570CONFIG_IP_NF_TFTP=m
571CONFIG_IP_NF_AMANDA=m
572CONFIG_IP_NF_QUEUE=m
573CONFIG_IP_NF_IPTABLES=m
574CONFIG_IP_NF_MATCH_LIMIT=m
575CONFIG_IP_NF_MATCH_IPRANGE=m
576CONFIG_IP_NF_MATCH_MAC=m
577CONFIG_IP_NF_MATCH_PKTTYPE=m
578CONFIG_IP_NF_MATCH_MARK=m
579CONFIG_IP_NF_MATCH_MULTIPORT=m
580CONFIG_IP_NF_MATCH_TOS=m
581CONFIG_IP_NF_MATCH_RECENT=m
582CONFIG_IP_NF_MATCH_ECN=m
583CONFIG_IP_NF_MATCH_DSCP=m
584CONFIG_IP_NF_MATCH_AH_ESP=m
585CONFIG_IP_NF_MATCH_LENGTH=m
586CONFIG_IP_NF_MATCH_TTL=m
587CONFIG_IP_NF_MATCH_TCPMSS=m
588CONFIG_IP_NF_MATCH_HELPER=m
589CONFIG_IP_NF_MATCH_STATE=m
590CONFIG_IP_NF_MATCH_CONNTRACK=m
591CONFIG_IP_NF_MATCH_OWNER=m
592CONFIG_IP_NF_MATCH_PHYSDEV=m
593CONFIG_IP_NF_MATCH_ADDRTYPE=m
594CONFIG_IP_NF_MATCH_REALM=m
595CONFIG_IP_NF_MATCH_SCTP=m
596CONFIG_IP_NF_MATCH_COMMENT=m
597CONFIG_IP_NF_MATCH_CONNMARK=m
598CONFIG_IP_NF_MATCH_HASHLIMIT=m
599CONFIG_IP_NF_FILTER=m
600CONFIG_IP_NF_TARGET_REJECT=m
601CONFIG_IP_NF_TARGET_LOG=m
602CONFIG_IP_NF_TARGET_ULOG=m
603CONFIG_IP_NF_TARGET_TCPMSS=m
604CONFIG_IP_NF_NAT=m
605CONFIG_IP_NF_NAT_NEEDED=y
606CONFIG_IP_NF_TARGET_MASQUERADE=m
607CONFIG_IP_NF_TARGET_REDIRECT=m
608CONFIG_IP_NF_TARGET_NETMAP=m
609CONFIG_IP_NF_TARGET_SAME=m
610CONFIG_IP_NF_NAT_SNMP_BASIC=m
611CONFIG_IP_NF_NAT_IRC=m
612CONFIG_IP_NF_NAT_FTP=m
613CONFIG_IP_NF_NAT_TFTP=m
614CONFIG_IP_NF_NAT_AMANDA=m
615CONFIG_IP_NF_MANGLE=m
616CONFIG_IP_NF_TARGET_TOS=m
617CONFIG_IP_NF_TARGET_ECN=m
618CONFIG_IP_NF_TARGET_DSCP=m
619CONFIG_IP_NF_TARGET_MARK=m
620CONFIG_IP_NF_TARGET_CLASSIFY=m
621CONFIG_IP_NF_TARGET_CONNMARK=m
622CONFIG_IP_NF_TARGET_CLUSTERIP=m
623CONFIG_IP_NF_RAW=m
624CONFIG_IP_NF_TARGET_NOTRACK=m
625CONFIG_IP_NF_ARPTABLES=m
626CONFIG_IP_NF_ARPFILTER=m
627CONFIG_IP_NF_ARP_MANGLE=m
628
629#
630# IPv6: Netfilter Configuration
631#
632CONFIG_IP6_NF_QUEUE=m
633CONFIG_IP6_NF_IPTABLES=m
634CONFIG_IP6_NF_MATCH_LIMIT=m
635CONFIG_IP6_NF_MATCH_MAC=m
636CONFIG_IP6_NF_MATCH_RT=m
637CONFIG_IP6_NF_MATCH_OPTS=m
638CONFIG_IP6_NF_MATCH_FRAG=m
639CONFIG_IP6_NF_MATCH_HL=m
640CONFIG_IP6_NF_MATCH_MULTIPORT=m
641CONFIG_IP6_NF_MATCH_OWNER=m
642CONFIG_IP6_NF_MATCH_MARK=m
643CONFIG_IP6_NF_MATCH_IPV6HEADER=m
644CONFIG_IP6_NF_MATCH_AHESP=m
645CONFIG_IP6_NF_MATCH_LENGTH=m
646CONFIG_IP6_NF_MATCH_EUI64=m
647CONFIG_IP6_NF_MATCH_PHYSDEV=m
648CONFIG_IP6_NF_FILTER=m
649CONFIG_IP6_NF_TARGET_LOG=m
650CONFIG_IP6_NF_MANGLE=m
651CONFIG_IP6_NF_TARGET_MARK=m
652CONFIG_IP6_NF_RAW=m
653
654#
655# DECnet: Netfilter Configuration
656#
657CONFIG_DECNET_NF_GRABULATOR=m
658
659#
660# Bridge: Netfilter Configuration
661#
662CONFIG_BRIDGE_NF_EBTABLES=m
663CONFIG_BRIDGE_EBT_BROUTE=m
664CONFIG_BRIDGE_EBT_T_FILTER=m
665CONFIG_BRIDGE_EBT_T_NAT=m
666CONFIG_BRIDGE_EBT_802_3=m
667CONFIG_BRIDGE_EBT_AMONG=m
668CONFIG_BRIDGE_EBT_ARP=m
669CONFIG_BRIDGE_EBT_IP=m
670CONFIG_BRIDGE_EBT_LIMIT=m
671CONFIG_BRIDGE_EBT_MARK=m
672CONFIG_BRIDGE_EBT_PKTTYPE=m
673CONFIG_BRIDGE_EBT_STP=m
674CONFIG_BRIDGE_EBT_VLAN=m
675CONFIG_BRIDGE_EBT_ARPREPLY=m
676CONFIG_BRIDGE_EBT_DNAT=m
677CONFIG_BRIDGE_EBT_MARK_T=m
678CONFIG_BRIDGE_EBT_REDIRECT=m
679CONFIG_BRIDGE_EBT_SNAT=m
680CONFIG_BRIDGE_EBT_LOG=m
681CONFIG_BRIDGE_EBT_ULOG=m
682CONFIG_XFRM=y
683CONFIG_XFRM_USER=m
684
685#
686# SCTP Configuration (EXPERIMENTAL)
687#
688CONFIG_IP_SCTP=m
689# CONFIG_SCTP_DBG_MSG is not set
690# CONFIG_SCTP_DBG_OBJCNT is not set
691# CONFIG_SCTP_HMAC_NONE is not set
692# CONFIG_SCTP_HMAC_SHA1 is not set
693CONFIG_SCTP_HMAC_MD5=y
694CONFIG_ATM=y
695CONFIG_ATM_CLIP=y
696# CONFIG_ATM_CLIP_NO_ICMP is not set
697CONFIG_ATM_LANE=m
698CONFIG_ATM_MPOA=m
699CONFIG_ATM_BR2684=m
700CONFIG_ATM_BR2684_IPFILTER=y
701CONFIG_BRIDGE=m
702CONFIG_VLAN_8021Q=m
703CONFIG_DECNET=m
704CONFIG_DECNET_ROUTER=y
705CONFIG_DECNET_ROUTE_FWMARK=y
706CONFIG_LLC=m
707CONFIG_LLC2=m
708CONFIG_IPX=m
709# CONFIG_IPX_INTERN is not set
710CONFIG_ATALK=m
711# CONFIG_DEV_APPLETALK is not set
712CONFIG_X25=m
713CONFIG_LAPB=m
714CONFIG_NET_DIVERT=y
715# CONFIG_ECONET is not set
716# CONFIG_WAN_ROUTER is not set
717
718#
719# QoS and/or fair queueing
720#
721CONFIG_NET_SCHED=y
722# CONFIG_NET_SCH_CLK_JIFFIES is not set
723# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
724CONFIG_NET_SCH_CLK_CPU=y
725CONFIG_NET_SCH_CBQ=m
726CONFIG_NET_SCH_HTB=m
727CONFIG_NET_SCH_HFSC=m
728CONFIG_NET_SCH_ATM=y
729CONFIG_NET_SCH_PRIO=m
730CONFIG_NET_SCH_RED=m
731CONFIG_NET_SCH_SFQ=m
732CONFIG_NET_SCH_TEQL=m
733CONFIG_NET_SCH_TBF=m
734CONFIG_NET_SCH_GRED=m
735CONFIG_NET_SCH_DSMARK=m
736CONFIG_NET_SCH_NETEM=m
737CONFIG_NET_SCH_INGRESS=m
738CONFIG_NET_QOS=y
739CONFIG_NET_ESTIMATOR=y
740CONFIG_NET_CLS=y
741CONFIG_NET_CLS_BASIC=m
742CONFIG_NET_CLS_TCINDEX=m
743CONFIG_NET_CLS_ROUTE4=m
744CONFIG_NET_CLS_ROUTE=y
745CONFIG_NET_CLS_FW=m
746CONFIG_NET_CLS_U32=m
747CONFIG_CLS_U32_PERF=y
748CONFIG_NET_CLS_IND=y
749CONFIG_CLS_U32_MARK=y
750CONFIG_NET_CLS_RSVP=m
751CONFIG_NET_CLS_RSVP6=m
752CONFIG_NET_EMATCH=y
753CONFIG_NET_EMATCH_STACK=32
754CONFIG_NET_EMATCH_CMP=m
755CONFIG_NET_EMATCH_NBYTE=m
756CONFIG_NET_EMATCH_U32=m
757CONFIG_NET_EMATCH_META=m
758CONFIG_NET_CLS_ACT=y
759CONFIG_NET_ACT_POLICE=m
760CONFIG_NET_ACT_GACT=m
761CONFIG_GACT_PROB=y
762CONFIG_NET_ACT_MIRRED=m
763CONFIG_NET_ACT_IPT=m
764CONFIG_NET_ACT_PEDIT=m
765
766#
767# Network testing
768#
769CONFIG_NET_PKTGEN=m
770CONFIG_NETPOLL=y
771# CONFIG_NETPOLL_RX is not set
772# CONFIG_NETPOLL_TRAP is not set
773CONFIG_NET_POLL_CONTROLLER=y
774CONFIG_HAMRADIO=y
775
776#
777# Packet Radio protocols
778#
779CONFIG_AX25=m
780CONFIG_AX25_DAMA_SLAVE=y
781CONFIG_NETROM=m
782CONFIG_ROSE=m
783
784#
785# AX.25 network device drivers
786#
787# CONFIG_BPQETHER is not set
788# CONFIG_BAYCOM_SER_FDX is not set
789# CONFIG_BAYCOM_SER_HDX is not set
790# CONFIG_BAYCOM_PAR is not set
791# CONFIG_YAM is not set
792CONFIG_IRDA=m
793
794#
795# IrDA protocols
796#
797CONFIG_IRLAN=m
798CONFIG_IRNET=m
799CONFIG_IRCOMM=m
800CONFIG_IRDA_ULTRA=y
801
802#
803# IrDA options
804#
805CONFIG_IRDA_CACHE_LAST_LSAP=y
806CONFIG_IRDA_FAST_RR=y
807# CONFIG_IRDA_DEBUG is not set
808
809#
810# Infrared-port device drivers
811#
812
813#
814# SIR device drivers
815#
816# CONFIG_IRTTY_SIR is not set
817
818#
819# Dongle support
820#
821
822#
823# Old SIR device drivers
824#
825
826#
827# Old Serial dongle support
828#
829 463
830# 464#
831# FIR device drivers 465# I2O device support
832# 466#
833# CONFIG_USB_IRDA is not set 467# CONFIG_I2O is not set
834CONFIG_SIGMATEL_FIR=m
835# CONFIG_VLSI_FIR is not set
836CONFIG_BT=m
837CONFIG_BT_L2CAP=m
838CONFIG_BT_SCO=m
839CONFIG_BT_RFCOMM=m
840CONFIG_BT_RFCOMM_TTY=y
841CONFIG_BT_BNEP=m
842CONFIG_BT_BNEP_MC_FILTER=y
843CONFIG_BT_BNEP_PROTO_FILTER=y
844CONFIG_BT_CMTP=m
845CONFIG_BT_HIDP=m
846 468
847# 469#
848# Bluetooth device drivers 470# Network device support
849# 471#
850CONFIG_BT_HCIUSB=m
851CONFIG_BT_HCIUSB_SCO=y
852CONFIG_BT_HCIUART=m
853CONFIG_BT_HCIUART_H4=y
854CONFIG_BT_HCIUART_BCSP=y
855CONFIG_BT_HCIUART_BCSP_TXCRC=y
856CONFIG_BT_HCIBCM203X=m
857CONFIG_BT_HCIBPA10X=m
858CONFIG_BT_HCIBFUSB=m
859CONFIG_BT_HCIVHCI=m
860CONFIG_NETDEVICES=y 472CONFIG_NETDEVICES=y
861CONFIG_DUMMY=m 473CONFIG_DUMMY=m
862CONFIG_BONDING=m 474# CONFIG_BONDING is not set
863CONFIG_EQUALIZER=m 475# CONFIG_EQUALIZER is not set
864CONFIG_TUN=m 476# CONFIG_TUN is not set
865# CONFIG_ETHERTAP is not set
866 477
867# 478#
868# ARCnet devices 479# ARCnet devices
@@ -870,86 +481,73 @@ CONFIG_TUN=m
870# CONFIG_ARCNET is not set 481# CONFIG_ARCNET is not set
871 482
872# 483#
484# PHY device support
485#
486# CONFIG_PHYLIB is not set
487
488#
873# Ethernet (10 or 100Mbit) 489# Ethernet (10 or 100Mbit)
874# 490#
875CONFIG_NET_ETHERNET=y 491CONFIG_NET_ETHERNET=y
876CONFIG_MII=m 492CONFIG_MII=m
877CONFIG_SUNLANCE=y 493# CONFIG_SUNLANCE is not set
878CONFIG_HAPPYMEAL=y 494# CONFIG_HAPPYMEAL is not set
879CONFIG_SUNBMAC=m 495# CONFIG_SUNBMAC is not set
880CONFIG_SUNQE=m 496# CONFIG_SUNQE is not set
881CONFIG_SUNGEM=y 497# CONFIG_SUNGEM is not set
882CONFIG_NET_VENDOR_3COM=y 498CONFIG_CASSINI=m
883CONFIG_VORTEX=m 499# CONFIG_NET_VENDOR_3COM is not set
884CONFIG_TYPHOON=m
885 500
886# 501#
887# Tulip family network device support 502# Tulip family network device support
888# 503#
889CONFIG_NET_TULIP=y 504# CONFIG_NET_TULIP is not set
890CONFIG_DE2104X=m
891CONFIG_TULIP=m
892# CONFIG_TULIP_MWI is not set
893# CONFIG_TULIP_MMIO is not set
894CONFIG_TULIP_NAPI=y
895CONFIG_TULIP_NAPI_HW_MITIGATION=y
896CONFIG_DE4X5=m
897CONFIG_WINBOND_840=m
898# CONFIG_DM9102 is not set
899# CONFIG_HP100 is not set 505# CONFIG_HP100 is not set
900CONFIG_NET_PCI=y 506CONFIG_NET_PCI=y
901CONFIG_PCNET32=m 507# CONFIG_PCNET32 is not set
902# CONFIG_AMD8111_ETH is not set 508# CONFIG_AMD8111_ETH is not set
903CONFIG_ADAPTEC_STARFIRE=m 509# CONFIG_ADAPTEC_STARFIRE is not set
904CONFIG_ADAPTEC_STARFIRE_NAPI=y 510# CONFIG_B44 is not set
905CONFIG_B44=m 511# CONFIG_FORCEDETH is not set
906CONFIG_FORCEDETH=m 512# CONFIG_DGRS is not set
907CONFIG_DGRS=m 513# CONFIG_EEPRO100 is not set
908CONFIG_EEPRO100=m 514# CONFIG_E100 is not set
909CONFIG_E100=m 515# CONFIG_FEALNX is not set
910CONFIG_FEALNX=m 516# CONFIG_NATSEMI is not set
911CONFIG_NATSEMI=m 517# CONFIG_NE2K_PCI is not set
912CONFIG_NE2K_PCI=m
913# CONFIG_8139CP is not set 518# CONFIG_8139CP is not set
914CONFIG_8139TOO=m 519# CONFIG_8139TOO is not set
915# CONFIG_8139TOO_PIO is not set 520# CONFIG_SIS900 is not set
916# CONFIG_8139TOO_TUNE_TWISTER is not set 521# CONFIG_EPIC100 is not set
917# CONFIG_8139TOO_8129 is not set 522# CONFIG_SUNDANCE is not set
918# CONFIG_8139_OLD_RX_RESET is not set 523# CONFIG_VIA_RHINE is not set
919CONFIG_SIS900=m
920CONFIG_EPIC100=m
921CONFIG_SUNDANCE=m
922CONFIG_SUNDANCE_MMIO=y
923CONFIG_VIA_RHINE=m
924# CONFIG_VIA_RHINE_MMIO is not set
925 524
926# 525#
927# Ethernet (1000 Mbit) 526# Ethernet (1000 Mbit)
928# 527#
929CONFIG_ACENIC=m 528# CONFIG_ACENIC is not set
930# CONFIG_ACENIC_OMIT_TIGON_I is not set 529# CONFIG_DL2K is not set
931CONFIG_DL2K=m
932CONFIG_E1000=m 530CONFIG_E1000=m
933CONFIG_E1000_NAPI=y 531CONFIG_E1000_NAPI=y
934CONFIG_MYRI_SBUS=m 532# CONFIG_MYRI_SBUS is not set
935CONFIG_NS83820=m 533# CONFIG_NS83820 is not set
936CONFIG_HAMACHI=m 534# CONFIG_HAMACHI is not set
937CONFIG_YELLOWFIN=m 535# CONFIG_YELLOWFIN is not set
938CONFIG_R8169=m 536# CONFIG_R8169 is not set
939CONFIG_R8169_NAPI=y 537# CONFIG_SIS190 is not set
940CONFIG_R8169_VLAN=y 538# CONFIG_SKGE is not set
941CONFIG_SK98LIN=m 539# CONFIG_SKY2 is not set
942CONFIG_VIA_VELOCITY=m 540# CONFIG_SK98LIN is not set
541# CONFIG_VIA_VELOCITY is not set
943CONFIG_TIGON3=m 542CONFIG_TIGON3=m
543CONFIG_BNX2=m
944 544
945# 545#
946# Ethernet (10000 Mbit) 546# Ethernet (10000 Mbit)
947# 547#
948CONFIG_IXGB=m 548# CONFIG_CHELSIO_T1 is not set
949CONFIG_IXGB_NAPI=y 549# CONFIG_IXGB is not set
950CONFIG_S2IO=m 550# CONFIG_S2IO is not set
951CONFIG_S2IO_NAPI=y
952CONFIG_2BUFF_MODE=y
953 551
954# 552#
955# Token Ring devices 553# Token Ring devices
@@ -959,140 +557,31 @@ CONFIG_2BUFF_MODE=y
959# 557#
960# Wireless LAN (non-hamradio) 558# Wireless LAN (non-hamradio)
961# 559#
962CONFIG_NET_RADIO=y 560# CONFIG_NET_RADIO is not set
963
964#
965# Obsolete Wireless cards support (pre-802.11)
966#
967# CONFIG_STRIP is not set
968
969#
970# Wireless 802.11b ISA/PCI cards support
971#
972CONFIG_HERMES=m
973CONFIG_PLX_HERMES=m
974CONFIG_TMD_HERMES=m
975CONFIG_PCI_HERMES=m
976CONFIG_ATMEL=m
977CONFIG_PCI_ATMEL=m
978
979#
980# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
981#
982CONFIG_PRISM54=m
983CONFIG_NET_WIRELESS=y
984 561
985# 562#
986# Wan interfaces 563# Wan interfaces
987# 564#
988# CONFIG_WAN is not set 565# CONFIG_WAN is not set
989 566# CONFIG_FDDI is not set
990# 567# CONFIG_HIPPI is not set
991# ATM drivers 568# CONFIG_PPP is not set
992# 569# CONFIG_SLIP is not set
993CONFIG_ATM_TCP=m 570# CONFIG_NET_FC is not set
994# CONFIG_ATM_LANAI is not set 571# CONFIG_SHAPER is not set
995# CONFIG_ATM_ENI is not set 572# CONFIG_NETCONSOLE is not set
996# CONFIG_ATM_FIRESTREAM is not set 573# CONFIG_NETPOLL is not set
997# CONFIG_ATM_ZATM is not set 574# CONFIG_NET_POLL_CONTROLLER is not set
998# CONFIG_ATM_IDT77252 is not set
999# CONFIG_ATM_AMBASSADOR is not set
1000# CONFIG_ATM_HORIZON is not set
1001CONFIG_ATM_FORE200E_MAYBE=m
1002CONFIG_ATM_FORE200E_PCA=y
1003CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
1004CONFIG_ATM_FORE200E_SBA=y
1005CONFIG_ATM_FORE200E_SBA_DEFAULT_FW=y
1006CONFIG_ATM_FORE200E_USE_TASKLET=y
1007CONFIG_ATM_FORE200E_TX_RETRY=16
1008CONFIG_ATM_FORE200E_DEBUG=0
1009CONFIG_ATM_FORE200E=m
1010CONFIG_ATM_HE=m
1011CONFIG_ATM_HE_USE_SUNI=y
1012CONFIG_FDDI=y
1013# CONFIG_DEFXX is not set
1014CONFIG_SKFP=m
1015CONFIG_HIPPI=y
1016# CONFIG_ROADRUNNER is not set
1017CONFIG_PLIP=m
1018CONFIG_PPP=m
1019CONFIG_PPP_MULTILINK=y
1020CONFIG_PPP_FILTER=y
1021CONFIG_PPP_ASYNC=m
1022CONFIG_PPP_SYNC_TTY=m
1023CONFIG_PPP_DEFLATE=m
1024CONFIG_PPP_BSDCOMP=m
1025CONFIG_PPPOE=m
1026CONFIG_PPPOATM=m
1027CONFIG_SLIP=m
1028CONFIG_SLIP_COMPRESSED=y
1029CONFIG_SLIP_SMART=y
1030# CONFIG_SLIP_MODE_SLIP6 is not set
1031CONFIG_NET_FC=y
1032CONFIG_SHAPER=m
1033CONFIG_NETCONSOLE=m
1034 575
1035# 576#
1036# ISDN subsystem 577# ISDN subsystem
1037# 578#
1038CONFIG_ISDN=m 579# CONFIG_ISDN is not set
1039
1040#
1041# Old ISDN4Linux
1042#
1043# CONFIG_ISDN_I4L is not set
1044
1045#
1046# CAPI subsystem
1047#
1048CONFIG_ISDN_CAPI=m
1049# CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON is not set
1050# CONFIG_ISDN_CAPI_MIDDLEWARE is not set
1051CONFIG_ISDN_CAPI_CAPI20=m
1052
1053#
1054# CAPI hardware drivers
1055#
1056
1057#
1058# Active AVM cards
1059#
1060CONFIG_CAPI_AVM=y
1061CONFIG_ISDN_DRV_AVMB1_B1PCI=m
1062CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
1063CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
1064CONFIG_ISDN_DRV_AVMB1_T1PCI=m
1065CONFIG_ISDN_DRV_AVMB1_C4=m
1066
1067#
1068# Active Eicon DIVA Server cards
1069#
1070CONFIG_CAPI_EICON=y
1071CONFIG_ISDN_DIVAS=m
1072CONFIG_ISDN_DIVAS_BRIPCI=y
1073CONFIG_ISDN_DIVAS_PRIPCI=y
1074CONFIG_ISDN_DIVAS_DIVACAPI=m
1075CONFIG_ISDN_DIVAS_USERIDI=m
1076CONFIG_ISDN_DIVAS_MAINT=m
1077 580
1078# 581#
1079# Telephony Support 582# Telephony Support
1080# 583#
1081CONFIG_PHONE=m 584# CONFIG_PHONE is not set
1082CONFIG_PHONE_IXJ=m
1083
1084#
1085# Unix98 PTY support
1086#
1087CONFIG_UNIX98_PTYS=y
1088CONFIG_UNIX98_PTY_COUNT=256
1089
1090#
1091# XFree86 DRI support
1092#
1093CONFIG_DRM=y
1094CONFIG_DRM_TDFX=m
1095# CONFIG_DRM_R128 is not set
1096 585
1097# 586#
1098# Input device support 587# Input device support
@@ -1112,26 +601,6 @@ CONFIG_INPUT_EVDEV=y
1112# CONFIG_INPUT_EVBUG is not set 601# CONFIG_INPUT_EVBUG is not set
1113 602
1114# 603#
1115# Input I/O drivers
1116#
1117CONFIG_GAMEPORT=m
1118CONFIG_SOUND_GAMEPORT=m
1119# CONFIG_GAMEPORT_NS558 is not set
1120# CONFIG_GAMEPORT_L4 is not set
1121# CONFIG_GAMEPORT_EMU10K1 is not set
1122# CONFIG_GAMEPORT_VORTEX is not set
1123# CONFIG_GAMEPORT_FM801 is not set
1124CONFIG_GAMEPORT_CS461X=m
1125CONFIG_SERIO=y
1126CONFIG_SERIO_I8042=y
1127# CONFIG_SERIO_SERPORT is not set
1128# CONFIG_SERIO_CT82C710 is not set
1129# CONFIG_SERIO_PARKBD is not set
1130CONFIG_SERIO_PCIPS2=m
1131CONFIG_SERIO_LIBPS2=y
1132CONFIG_SERIO_RAW=m
1133
1134#
1135# Input Device Drivers 604# Input Device Drivers
1136# 605#
1137CONFIG_INPUT_KEYBOARD=y 606CONFIG_INPUT_KEYBOARD=y
@@ -1143,7 +612,7 @@ CONFIG_KEYBOARD_LKKBD=m
1143CONFIG_INPUT_MOUSE=y 612CONFIG_INPUT_MOUSE=y
1144CONFIG_MOUSE_PS2=y 613CONFIG_MOUSE_PS2=y
1145CONFIG_MOUSE_SERIAL=y 614CONFIG_MOUSE_SERIAL=y
1146CONFIG_MOUSE_VSXXXAA=m 615# CONFIG_MOUSE_VSXXXAA is not set
1147# CONFIG_INPUT_JOYSTICK is not set 616# CONFIG_INPUT_JOYSTICK is not set
1148# CONFIG_INPUT_TOUCHSCREEN is not set 617# CONFIG_INPUT_TOUCHSCREEN is not set
1149CONFIG_INPUT_MISC=y 618CONFIG_INPUT_MISC=y
@@ -1151,406 +620,250 @@ CONFIG_INPUT_SPARCSPKR=y
1151# CONFIG_INPUT_UINPUT is not set 620# CONFIG_INPUT_UINPUT is not set
1152 621
1153# 622#
1154# I2C support 623# Hardware I/O ports
1155# 624#
1156CONFIG_I2C=y 625CONFIG_SERIO=y
1157CONFIG_I2C_CHARDEV=m 626CONFIG_SERIO_I8042=y
627# CONFIG_SERIO_SERPORT is not set
628CONFIG_SERIO_PCIPS2=m
629CONFIG_SERIO_LIBPS2=y
630CONFIG_SERIO_RAW=m
631# CONFIG_GAMEPORT is not set
1158 632
1159# 633#
1160# I2C Algorithms 634# Character devices
1161# 635#
1162CONFIG_I2C_ALGOBIT=y 636CONFIG_VT=y
1163CONFIG_I2C_ALGOPCF=m 637CONFIG_VT_CONSOLE=y
1164CONFIG_I2C_ALGOPCA=m 638CONFIG_HW_CONSOLE=y
639# CONFIG_SERIAL_NONSTANDARD is not set
1165 640
1166# 641#
1167# I2C Hardware Bus support 642# Serial drivers
1168# 643#
1169CONFIG_I2C_ALI1535=m
1170CONFIG_I2C_ALI1563=m
1171CONFIG_I2C_ALI15X3=m
1172CONFIG_I2C_AMD756=m
1173# CONFIG_I2C_AMD756_S4882 is not set
1174CONFIG_I2C_AMD8111=m
1175CONFIG_I2C_I801=m
1176CONFIG_I2C_I810=m
1177CONFIG_I2C_ISA=m
1178CONFIG_I2C_NFORCE2=m
1179CONFIG_I2C_PARPORT=m
1180CONFIG_I2C_PARPORT_LIGHT=m
1181CONFIG_I2C_PIIX4=m
1182CONFIG_I2C_PROSAVAGE=m
1183CONFIG_I2C_SAVAGE4=m
1184CONFIG_SCx200_ACB=m
1185CONFIG_I2C_SIS5595=m
1186CONFIG_I2C_SIS630=m
1187CONFIG_I2C_SIS96X=m
1188CONFIG_I2C_STUB=m
1189CONFIG_I2C_VIA=m
1190CONFIG_I2C_VIAPRO=m
1191CONFIG_I2C_VOODOO3=m
1192CONFIG_I2C_PCA_ISA=m
1193
1194#
1195# Hardware Sensors Chip support
1196#
1197CONFIG_I2C_SENSOR=m
1198CONFIG_SENSORS_ADM1021=m
1199CONFIG_SENSORS_ADM1025=m
1200CONFIG_SENSORS_ADM1026=m
1201CONFIG_SENSORS_ADM1031=m
1202CONFIG_SENSORS_ASB100=m
1203CONFIG_SENSORS_DS1621=m
1204CONFIG_SENSORS_FSCHER=m
1205CONFIG_SENSORS_FSCPOS=m
1206CONFIG_SENSORS_GL518SM=m
1207CONFIG_SENSORS_GL520SM=m
1208CONFIG_SENSORS_IT87=m
1209CONFIG_SENSORS_LM63=m
1210CONFIG_SENSORS_LM75=m
1211CONFIG_SENSORS_LM77=m
1212CONFIG_SENSORS_LM78=m
1213CONFIG_SENSORS_LM80=m
1214CONFIG_SENSORS_LM83=m
1215CONFIG_SENSORS_LM85=m
1216CONFIG_SENSORS_LM87=m
1217CONFIG_SENSORS_LM90=m
1218CONFIG_SENSORS_MAX1619=m
1219CONFIG_SENSORS_PC87360=m
1220CONFIG_SENSORS_SMSC47B397=m
1221CONFIG_SENSORS_SIS5595=m
1222CONFIG_SENSORS_SMSC47M1=m
1223CONFIG_SENSORS_VIA686A=m
1224CONFIG_SENSORS_W83781D=m
1225CONFIG_SENSORS_W83L785TS=m
1226CONFIG_SENSORS_W83627HF=m
1227
1228#
1229# Other I2C Chip support
1230#
1231CONFIG_SENSORS_EEPROM=m
1232CONFIG_SENSORS_PCF8574=m
1233CONFIG_SENSORS_PCF8591=m
1234CONFIG_SENSORS_RTC8564=m
1235# CONFIG_I2C_DEBUG_CORE is not set
1236# CONFIG_I2C_DEBUG_ALGO is not set
1237# CONFIG_I2C_DEBUG_BUS is not set
1238# CONFIG_I2C_DEBUG_CHIP is not set
1239 644
1240# 645#
1241# File systems 646# Non-8250 serial port support
1242# 647#
1243CONFIG_EXT2_FS=y 648CONFIG_SERIAL_SUNCORE=y
1244CONFIG_EXT2_FS_XATTR=y 649# CONFIG_SERIAL_SUNZILOG is not set
1245CONFIG_EXT2_FS_POSIX_ACL=y 650CONFIG_SERIAL_SUNSU=y
1246CONFIG_EXT2_FS_SECURITY=y 651CONFIG_SERIAL_SUNSU_CONSOLE=y
1247CONFIG_EXT3_FS=y 652CONFIG_SERIAL_SUNSAB=m
1248CONFIG_EXT3_FS_XATTR=y 653CONFIG_SERIAL_CORE=y
1249CONFIG_EXT3_FS_POSIX_ACL=y 654CONFIG_SERIAL_CORE_CONSOLE=y
1250CONFIG_EXT3_FS_SECURITY=y 655# CONFIG_SERIAL_JSM is not set
1251CONFIG_JBD=y 656CONFIG_UNIX98_PTYS=y
1252# CONFIG_JBD_DEBUG is not set 657# CONFIG_LEGACY_PTYS is not set
1253CONFIG_FS_MBCACHE=y
1254# CONFIG_REISERFS_FS is not set
1255CONFIG_JFS_FS=m
1256CONFIG_JFS_POSIX_ACL=y
1257CONFIG_JFS_SECURITY=y
1258# CONFIG_JFS_DEBUG is not set
1259# CONFIG_JFS_STATISTICS is not set
1260CONFIG_FS_POSIX_ACL=y
1261 658
1262# 659#
1263# XFS support 660# IPMI
1264# 661#
1265CONFIG_XFS_FS=m 662# CONFIG_IPMI_HANDLER is not set
1266CONFIG_XFS_EXPORT=y
1267# CONFIG_XFS_RT is not set
1268CONFIG_XFS_QUOTA=y
1269CONFIG_XFS_SECURITY=y
1270CONFIG_XFS_POSIX_ACL=y
1271CONFIG_MINIX_FS=m
1272CONFIG_ROMFS_FS=m
1273# CONFIG_QUOTA is not set
1274CONFIG_QUOTACTL=y
1275CONFIG_DNOTIFY=y
1276CONFIG_AUTOFS_FS=m
1277CONFIG_AUTOFS4_FS=m
1278 663
1279# 664#
1280# CD-ROM/DVD Filesystems 665# Watchdog Cards
1281# 666#
1282CONFIG_ISO9660_FS=m 667# CONFIG_WATCHDOG is not set
1283CONFIG_JOLIET=y 668CONFIG_RTC=y
1284# CONFIG_ZISOFS is not set 669# CONFIG_DTLK is not set
1285CONFIG_UDF_FS=m 670# CONFIG_R3964 is not set
1286CONFIG_UDF_NLS=y 671# CONFIG_APPLICOM is not set
1287 672
1288# 673#
1289# DOS/FAT/NT Filesystems 674# Ftape, the floppy tape device driver
1290# 675#
1291CONFIG_FAT_FS=m 676# CONFIG_DRM is not set
1292CONFIG_MSDOS_FS=m 677# CONFIG_RAW_DRIVER is not set
1293CONFIG_VFAT_FS=m
1294CONFIG_FAT_DEFAULT_CODEPAGE=437
1295CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1296# CONFIG_NTFS_FS is not set
1297 678
1298# 679#
1299# Pseudo filesystems 680# TPM devices
1300# 681#
1301CONFIG_PROC_FS=y 682# CONFIG_TCG_TPM is not set
1302CONFIG_PROC_KCORE=y 683# CONFIG_TELCLOCK is not set
1303CONFIG_SYSFS=y
1304CONFIG_DEVFS_FS=y
1305CONFIG_DEVFS_MOUNT=y
1306# CONFIG_DEVFS_DEBUG is not set
1307CONFIG_DEVPTS_FS_XATTR=y
1308# CONFIG_DEVPTS_FS_SECURITY is not set
1309CONFIG_TMPFS=y
1310CONFIG_TMPFS_XATTR=y
1311CONFIG_TMPFS_SECURITY=y
1312CONFIG_HUGETLBFS=y
1313CONFIG_HUGETLB_PAGE=y
1314CONFIG_RAMFS=y
1315 684
1316# 685#
1317# Miscellaneous filesystems 686# I2C support
1318# 687#
1319CONFIG_ADFS_FS=m 688CONFIG_I2C=y
1320# CONFIG_ADFS_FS_RW is not set 689# CONFIG_I2C_CHARDEV is not set
1321CONFIG_AFFS_FS=m
1322CONFIG_HFS_FS=m
1323CONFIG_HFSPLUS_FS=m
1324CONFIG_BEFS_FS=m
1325# CONFIG_BEFS_DEBUG is not set
1326CONFIG_BFS_FS=m
1327CONFIG_EFS_FS=m
1328CONFIG_CRAMFS=m
1329CONFIG_VXFS_FS=m
1330CONFIG_HPFS_FS=m
1331CONFIG_QNX4FS_FS=m
1332CONFIG_SYSV_FS=m
1333CONFIG_UFS_FS=m
1334CONFIG_UFS_FS_WRITE=y
1335 690
1336# 691#
1337# Network File Systems 692# I2C Algorithms
1338# 693#
1339CONFIG_NFS_FS=m 694CONFIG_I2C_ALGOBIT=y
1340CONFIG_NFS_V3=y 695# CONFIG_I2C_ALGOPCF is not set
1341CONFIG_NFS_V4=y 696# CONFIG_I2C_ALGOPCA is not set
1342CONFIG_NFS_DIRECTIO=y
1343CONFIG_NFSD=m
1344CONFIG_NFSD_V3=y
1345CONFIG_NFSD_V4=y
1346CONFIG_NFSD_TCP=y
1347CONFIG_LOCKD=m
1348CONFIG_LOCKD_V4=y
1349CONFIG_EXPORTFS=m
1350CONFIG_SUNRPC=m
1351CONFIG_SUNRPC_GSS=m
1352CONFIG_RPCSEC_GSS_KRB5=m
1353CONFIG_RPCSEC_GSS_SPKM3=m
1354CONFIG_SMB_FS=m
1355# CONFIG_SMB_NLS_DEFAULT is not set
1356CONFIG_CIFS=m
1357# CONFIG_CIFS_STATS is not set
1358# CONFIG_CIFS_XATTR is not set
1359# CONFIG_CIFS_EXPERIMENTAL is not set
1360CONFIG_NCP_FS=m
1361# CONFIG_NCPFS_PACKET_SIGNING is not set
1362# CONFIG_NCPFS_IOCTL_LOCKING is not set
1363# CONFIG_NCPFS_STRONG is not set
1364# CONFIG_NCPFS_NFS_NS is not set
1365# CONFIG_NCPFS_OS2_NS is not set
1366# CONFIG_NCPFS_SMALLDOS is not set
1367# CONFIG_NCPFS_NLS is not set
1368# CONFIG_NCPFS_EXTRAS is not set
1369CONFIG_CODA_FS=m
1370# CONFIG_CODA_FS_OLD_API is not set
1371CONFIG_AFS_FS=m
1372CONFIG_RXRPC=m
1373 697
1374# 698#
1375# Partition Types 699# I2C Hardware Bus support
1376# 700#
1377# CONFIG_PARTITION_ADVANCED is not set 701# CONFIG_I2C_ALI1535 is not set
1378CONFIG_MSDOS_PARTITION=y 702# CONFIG_I2C_ALI1563 is not set
1379CONFIG_SUN_PARTITION=y 703# CONFIG_I2C_ALI15X3 is not set
704# CONFIG_I2C_AMD756 is not set
705# CONFIG_I2C_AMD8111 is not set
706# CONFIG_I2C_I801 is not set
707# CONFIG_I2C_I810 is not set
708# CONFIG_I2C_PIIX4 is not set
709# CONFIG_I2C_NFORCE2 is not set
710# CONFIG_I2C_PARPORT_LIGHT is not set
711# CONFIG_I2C_PROSAVAGE is not set
712# CONFIG_I2C_SAVAGE4 is not set
713# CONFIG_SCx200_ACB is not set
714# CONFIG_I2C_SIS5595 is not set
715# CONFIG_I2C_SIS630 is not set
716# CONFIG_I2C_SIS96X is not set
717# CONFIG_I2C_STUB is not set
718# CONFIG_I2C_VIA is not set
719# CONFIG_I2C_VIAPRO is not set
720# CONFIG_I2C_VOODOO3 is not set
721# CONFIG_I2C_PCA_ISA is not set
722
723#
724# Miscellaneous I2C Chip support
725#
726# CONFIG_SENSORS_DS1337 is not set
727# CONFIG_SENSORS_DS1374 is not set
728# CONFIG_SENSORS_EEPROM is not set
729# CONFIG_SENSORS_PCF8574 is not set
730# CONFIG_SENSORS_PCA9539 is not set
731# CONFIG_SENSORS_PCF8591 is not set
732# CONFIG_SENSORS_RTC8564 is not set
733# CONFIG_SENSORS_MAX6875 is not set
734# CONFIG_RTC_X1205_I2C is not set
735# CONFIG_I2C_DEBUG_CORE is not set
736# CONFIG_I2C_DEBUG_ALGO is not set
737# CONFIG_I2C_DEBUG_BUS is not set
738# CONFIG_I2C_DEBUG_CHIP is not set
1380 739
1381# 740#
1382# Native Language Support 741# Dallas's 1-wire bus
1383# 742#
1384CONFIG_NLS=y 743# CONFIG_W1 is not set
1385CONFIG_NLS_DEFAULT="iso8859-1"
1386CONFIG_NLS_CODEPAGE_437=m
1387CONFIG_NLS_CODEPAGE_737=m
1388CONFIG_NLS_CODEPAGE_775=m
1389CONFIG_NLS_CODEPAGE_850=m
1390CONFIG_NLS_CODEPAGE_852=m
1391CONFIG_NLS_CODEPAGE_855=m
1392CONFIG_NLS_CODEPAGE_857=m
1393CONFIG_NLS_CODEPAGE_860=m
1394CONFIG_NLS_CODEPAGE_861=m
1395CONFIG_NLS_CODEPAGE_862=m
1396CONFIG_NLS_CODEPAGE_863=m
1397CONFIG_NLS_CODEPAGE_864=m
1398CONFIG_NLS_CODEPAGE_865=m
1399CONFIG_NLS_CODEPAGE_866=m
1400CONFIG_NLS_CODEPAGE_869=m
1401CONFIG_NLS_CODEPAGE_936=m
1402CONFIG_NLS_CODEPAGE_950=m
1403CONFIG_NLS_CODEPAGE_932=m
1404CONFIG_NLS_CODEPAGE_949=m
1405CONFIG_NLS_CODEPAGE_874=m
1406CONFIG_NLS_ISO8859_8=m
1407CONFIG_NLS_CODEPAGE_1250=m
1408CONFIG_NLS_CODEPAGE_1251=m
1409CONFIG_NLS_ASCII=m
1410CONFIG_NLS_ISO8859_1=m
1411CONFIG_NLS_ISO8859_2=m
1412CONFIG_NLS_ISO8859_3=m
1413CONFIG_NLS_ISO8859_4=m
1414CONFIG_NLS_ISO8859_5=m
1415CONFIG_NLS_ISO8859_6=m
1416CONFIG_NLS_ISO8859_7=m
1417CONFIG_NLS_ISO8859_9=m
1418CONFIG_NLS_ISO8859_13=m
1419CONFIG_NLS_ISO8859_14=m
1420CONFIG_NLS_ISO8859_15=m
1421CONFIG_NLS_KOI8_R=m
1422CONFIG_NLS_KOI8_U=m
1423CONFIG_NLS_UTF8=m
1424 744
1425# 745#
1426# Multimedia devices 746# Hardware Monitoring support
1427# 747#
1428CONFIG_VIDEO_DEV=y 748CONFIG_HWMON=y
749# CONFIG_HWMON_VID is not set
750# CONFIG_SENSORS_ADM1021 is not set
751# CONFIG_SENSORS_ADM1025 is not set
752# CONFIG_SENSORS_ADM1026 is not set
753# CONFIG_SENSORS_ADM1031 is not set
754# CONFIG_SENSORS_ADM9240 is not set
755# CONFIG_SENSORS_ASB100 is not set
756# CONFIG_SENSORS_ATXP1 is not set
757# CONFIG_SENSORS_DS1621 is not set
758# CONFIG_SENSORS_FSCHER is not set
759# CONFIG_SENSORS_FSCPOS is not set
760# CONFIG_SENSORS_GL518SM is not set
761# CONFIG_SENSORS_GL520SM is not set
762# CONFIG_SENSORS_IT87 is not set
763# CONFIG_SENSORS_LM63 is not set
764# CONFIG_SENSORS_LM75 is not set
765# CONFIG_SENSORS_LM77 is not set
766# CONFIG_SENSORS_LM78 is not set
767# CONFIG_SENSORS_LM80 is not set
768# CONFIG_SENSORS_LM83 is not set
769# CONFIG_SENSORS_LM85 is not set
770# CONFIG_SENSORS_LM87 is not set
771# CONFIG_SENSORS_LM90 is not set
772# CONFIG_SENSORS_LM92 is not set
773# CONFIG_SENSORS_MAX1619 is not set
774# CONFIG_SENSORS_PC87360 is not set
775# CONFIG_SENSORS_SIS5595 is not set
776# CONFIG_SENSORS_SMSC47M1 is not set
777# CONFIG_SENSORS_SMSC47B397 is not set
778# CONFIG_SENSORS_VIA686A is not set
779# CONFIG_SENSORS_VT8231 is not set
780# CONFIG_SENSORS_W83781D is not set
781# CONFIG_SENSORS_W83792D is not set
782# CONFIG_SENSORS_W83L785TS is not set
783# CONFIG_SENSORS_W83627HF is not set
784# CONFIG_SENSORS_W83627EHF is not set
785# CONFIG_HWMON_DEBUG_CHIP is not set
1429 786
1430# 787#
1431# Video For Linux 788# Misc devices
1432# 789#
1433 790
1434# 791#
1435# Video Adapters 792# Multimedia Capabilities Port drivers
1436# 793#
1437CONFIG_VIDEO_BT848=m
1438CONFIG_VIDEO_BWQCAM=m
1439CONFIG_VIDEO_CQCAM=m
1440CONFIG_VIDEO_W9966=m
1441CONFIG_VIDEO_CPIA=m
1442CONFIG_VIDEO_CPIA_PP=m
1443CONFIG_VIDEO_CPIA_USB=m
1444CONFIG_VIDEO_SAA5246A=m
1445CONFIG_VIDEO_SAA5249=m
1446CONFIG_TUNER_3036=m
1447# CONFIG_VIDEO_STRADIS is not set
1448# CONFIG_VIDEO_ZORAN is not set
1449# CONFIG_VIDEO_SAA7134 is not set
1450CONFIG_VIDEO_MXB=m
1451CONFIG_VIDEO_DPC=m
1452CONFIG_VIDEO_HEXIUM_ORION=m
1453CONFIG_VIDEO_HEXIUM_GEMINI=m
1454CONFIG_VIDEO_CX88=m
1455CONFIG_VIDEO_OVCAMCHIP=m
1456 794
1457# 795#
1458# Radio Adapters 796# Multimedia devices
1459# 797#
1460CONFIG_RADIO_GEMTEK_PCI=m 798# CONFIG_VIDEO_DEV is not set
1461CONFIG_RADIO_MAXIRADIO=m
1462CONFIG_RADIO_MAESTRO=m
1463 799
1464# 800#
1465# Digital Video Broadcasting Devices 801# Digital Video Broadcasting Devices
1466# 802#
1467CONFIG_DVB=y 803# CONFIG_DVB is not set
1468CONFIG_DVB_CORE=m
1469
1470#
1471# Supported SAA7146 based PCI Adapters
1472#
1473CONFIG_DVB_AV7110=m
1474# CONFIG_DVB_AV7110_OSD is not set
1475CONFIG_DVB_BUDGET=m
1476CONFIG_DVB_BUDGET_CI=m
1477CONFIG_DVB_BUDGET_AV=m
1478CONFIG_DVB_BUDGET_PATCH=m
1479
1480#
1481# Supported USB Adapters
1482#
1483# CONFIG_DVB_TTUSB_BUDGET is not set
1484CONFIG_DVB_TTUSB_DEC=m
1485CONFIG_DVB_DIBUSB=m
1486# CONFIG_DVB_DIBUSB_MISDESIGNED_DEVICES is not set
1487CONFIG_DVB_DIBCOM_DEBUG=y
1488CONFIG_DVB_CINERGYT2=m
1489# CONFIG_DVB_CINERGYT2_TUNING is not set
1490
1491#
1492# Supported FlexCopII (B2C2) Adapters
1493#
1494CONFIG_DVB_B2C2_SKYSTAR=m
1495CONFIG_DVB_B2C2_USB=m
1496 804
1497# 805#
1498# Supported BT878 Adapters 806# Graphics support
1499#
1500CONFIG_DVB_BT8XX=m
1501
1502#
1503# Supported DVB Frontends
1504#
1505
1506#
1507# Customise DVB Frontends
1508#
1509
1510#
1511# DVB-S (satellite) frontends
1512#
1513CONFIG_DVB_STV0299=m
1514CONFIG_DVB_CX24110=m
1515CONFIG_DVB_TDA8083=m
1516CONFIG_DVB_TDA80XX=m
1517CONFIG_DVB_MT312=m
1518CONFIG_DVB_VES1X93=m
1519
1520#
1521# DVB-T (terrestrial) frontends
1522# 807#
1523CONFIG_DVB_SP8870=m 808CONFIG_FB=y
1524CONFIG_DVB_SP887X=m 809CONFIG_FB_CFB_FILLRECT=y
1525CONFIG_DVB_CX22700=m 810CONFIG_FB_CFB_COPYAREA=y
1526CONFIG_DVB_CX22702=m 811CONFIG_FB_CFB_IMAGEBLIT=y
1527CONFIG_DVB_L64781=m 812# CONFIG_FB_MACMODES is not set
1528CONFIG_DVB_TDA1004X=m 813CONFIG_FB_MODE_HELPERS=y
1529CONFIG_DVB_NXT6000=m 814CONFIG_FB_TILEBLITTING=y
1530CONFIG_DVB_MT352=m 815# CONFIG_FB_CIRRUS is not set
1531CONFIG_DVB_DIB3000MB=m 816# CONFIG_FB_PM2 is not set
1532CONFIG_DVB_DIB3000MC=m 817# CONFIG_FB_ASILIANT is not set
818# CONFIG_FB_IMSTT is not set
819# CONFIG_FB_SBUS is not set
820# CONFIG_FB_S1D13XXX is not set
821# CONFIG_FB_NVIDIA is not set
822# CONFIG_FB_RIVA is not set
823# CONFIG_FB_MATROX is not set
824# CONFIG_FB_RADEON_OLD is not set
825CONFIG_FB_RADEON=y
826CONFIG_FB_RADEON_I2C=y
827# CONFIG_FB_RADEON_DEBUG is not set
828# CONFIG_FB_ATY128 is not set
829# CONFIG_FB_ATY is not set
830# CONFIG_FB_SAVAGE is not set
831# CONFIG_FB_SIS is not set
832# CONFIG_FB_NEOMAGIC is not set
833# CONFIG_FB_KYRO is not set
834# CONFIG_FB_3DFX is not set
835# CONFIG_FB_VOODOO1 is not set
836# CONFIG_FB_TRIDENT is not set
837# CONFIG_FB_PCI is not set
838# CONFIG_FB_VIRTUAL is not set
1533 839
1534# 840#
1535# DVB-C (cable) frontends 841# Console display driver support
1536# 842#
1537CONFIG_DVB_ATMEL_AT76C651=m 843# CONFIG_PROM_CONSOLE is not set
1538CONFIG_DVB_VES1820=m 844CONFIG_DUMMY_CONSOLE=y
1539CONFIG_DVB_TDA10021=m 845CONFIG_FRAMEBUFFER_CONSOLE=y
1540CONFIG_DVB_STV0297=m 846# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
847CONFIG_FONTS=y
848# CONFIG_FONT_8x8 is not set
849# CONFIG_FONT_8x16 is not set
850# CONFIG_FONT_6x11 is not set
851# CONFIG_FONT_7x14 is not set
852# CONFIG_FONT_PEARL_8x8 is not set
853# CONFIG_FONT_ACORN_8x8 is not set
854CONFIG_FONT_SUN8x16=y
855# CONFIG_FONT_SUN12x22 is not set
856# CONFIG_FONT_10x18 is not set
1541 857
1542# 858#
1543# ATSC (North American/Korean Terresterial DTV) frontends 859# Logo configuration
1544# 860#
1545CONFIG_DVB_NXT2002=m 861CONFIG_LOGO=y
1546CONFIG_VIDEO_SAA7146=m 862# CONFIG_LOGO_LINUX_MONO is not set
1547CONFIG_VIDEO_SAA7146_VV=m 863# CONFIG_LOGO_LINUX_VGA16 is not set
1548CONFIG_VIDEO_VIDEOBUF=m 864# CONFIG_LOGO_LINUX_CLUT224 is not set
1549CONFIG_VIDEO_TUNER=m 865CONFIG_LOGO_SUN_CLUT224=y
1550CONFIG_VIDEO_BUF=m 866# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1551CONFIG_VIDEO_BTCX=m
1552CONFIG_VIDEO_IR=m
1553CONFIG_VIDEO_TVEEPROM=m
1554 867
1555# 868#
1556# Sound 869# Sound
@@ -1563,7 +876,6 @@ CONFIG_SOUND=m
1563CONFIG_SND=m 876CONFIG_SND=m
1564CONFIG_SND_TIMER=m 877CONFIG_SND_TIMER=m
1565CONFIG_SND_PCM=m 878CONFIG_SND_PCM=m
1566CONFIG_SND_HWDEP=m
1567CONFIG_SND_RAWMIDI=m 879CONFIG_SND_RAWMIDI=m
1568CONFIG_SND_SEQUENCER=m 880CONFIG_SND_SEQUENCER=m
1569CONFIG_SND_SEQ_DUMMY=m 881CONFIG_SND_SEQ_DUMMY=m
@@ -1571,8 +883,9 @@ CONFIG_SND_OSSEMUL=y
1571CONFIG_SND_MIXER_OSS=m 883CONFIG_SND_MIXER_OSS=m
1572CONFIG_SND_PCM_OSS=m 884CONFIG_SND_PCM_OSS=m
1573CONFIG_SND_SEQUENCER_OSS=y 885CONFIG_SND_SEQUENCER_OSS=y
1574CONFIG_SND_BIT32_EMUL=m
1575# CONFIG_SND_RTCTIMER is not set 886# CONFIG_SND_RTCTIMER is not set
887# CONFIG_SND_DYNAMIC_MINORS is not set
888CONFIG_SND_SUPPORT_OLD_API=y
1576# CONFIG_SND_VERBOSE_PRINTK is not set 889# CONFIG_SND_VERBOSE_PRINTK is not set
1577# CONFIG_SND_DEBUG is not set 890# CONFIG_SND_DEBUG is not set
1578 891
@@ -1580,59 +893,58 @@ CONFIG_SND_BIT32_EMUL=m
1580# Generic devices 893# Generic devices
1581# 894#
1582CONFIG_SND_MPU401_UART=m 895CONFIG_SND_MPU401_UART=m
1583CONFIG_SND_OPL3_LIB=m 896CONFIG_SND_AC97_CODEC=m
1584CONFIG_SND_VX_LIB=m 897CONFIG_SND_AC97_BUS=m
1585CONFIG_SND_DUMMY=m 898CONFIG_SND_DUMMY=m
1586CONFIG_SND_VIRMIDI=m 899CONFIG_SND_VIRMIDI=m
1587# CONFIG_SND_MTPAV is not set 900CONFIG_SND_MTPAV=m
1588# CONFIG_SND_SERIAL_U16550 is not set 901# CONFIG_SND_SERIAL_U16550 is not set
1589# CONFIG_SND_MPU401 is not set 902# CONFIG_SND_MPU401 is not set
1590 903
1591# 904#
1592# PCI devices 905# PCI devices
1593# 906#
1594CONFIG_SND_AC97_CODEC=m 907# CONFIG_SND_AD1889 is not set
1595CONFIG_SND_ALI5451=m 908CONFIG_SND_ALI5451=m
1596CONFIG_SND_ATIIXP=m 909# CONFIG_SND_ATIIXP is not set
1597CONFIG_SND_ATIIXP_MODEM=m 910# CONFIG_SND_ATIIXP_MODEM is not set
1598CONFIG_SND_AU8810=m 911# CONFIG_SND_AU8810 is not set
1599CONFIG_SND_AU8820=m 912# CONFIG_SND_AU8820 is not set
1600CONFIG_SND_AU8830=m 913# CONFIG_SND_AU8830 is not set
1601CONFIG_SND_AZT3328=m 914# CONFIG_SND_AZT3328 is not set
1602CONFIG_SND_BT87X=m 915# CONFIG_SND_BT87X is not set
1603# CONFIG_SND_BT87X_OVERCLOCK is not set 916# CONFIG_SND_CA0106 is not set
1604CONFIG_SND_CS46XX=m 917# CONFIG_SND_CMIPCI is not set
1605# CONFIG_SND_CS46XX_NEW_DSP is not set 918# CONFIG_SND_CS4281 is not set
1606CONFIG_SND_CS4281=m 919# CONFIG_SND_CS46XX is not set
1607CONFIG_SND_EMU10K1=m 920# CONFIG_SND_EMU10K1 is not set
1608CONFIG_SND_EMU10K1X=m 921# CONFIG_SND_EMU10K1X is not set
1609CONFIG_SND_CA0106=m 922# CONFIG_SND_ENS1370 is not set
1610CONFIG_SND_KORG1212=m 923# CONFIG_SND_ENS1371 is not set
1611CONFIG_SND_MIXART=m 924# CONFIG_SND_ES1938 is not set
1612CONFIG_SND_NM256=m 925# CONFIG_SND_ES1968 is not set
926# CONFIG_SND_FM801 is not set
927# CONFIG_SND_HDA_INTEL is not set
928# CONFIG_SND_HDSP is not set
929# CONFIG_SND_HDSPM is not set
930# CONFIG_SND_ICE1712 is not set
931# CONFIG_SND_ICE1724 is not set
932# CONFIG_SND_INTEL8X0 is not set
933# CONFIG_SND_INTEL8X0M is not set
934# CONFIG_SND_KORG1212 is not set
935# CONFIG_SND_MAESTRO3 is not set
936# CONFIG_SND_MIXART is not set
937# CONFIG_SND_NM256 is not set
938# CONFIG_SND_PCXHR is not set
1613# CONFIG_SND_RME32 is not set 939# CONFIG_SND_RME32 is not set
1614# CONFIG_SND_RME96 is not set 940# CONFIG_SND_RME96 is not set
1615# CONFIG_SND_RME9652 is not set 941# CONFIG_SND_RME9652 is not set
1616# CONFIG_SND_HDSP is not set 942# CONFIG_SND_SONICVIBES is not set
1617CONFIG_SND_TRIDENT=m 943# CONFIG_SND_TRIDENT is not set
1618CONFIG_SND_YMFPCI=m
1619CONFIG_SND_ALS4000=m
1620CONFIG_SND_CMIPCI=m
1621CONFIG_SND_ENS1370=m
1622CONFIG_SND_ENS1371=m
1623CONFIG_SND_ES1938=m
1624CONFIG_SND_ES1968=m
1625CONFIG_SND_MAESTRO3=m
1626CONFIG_SND_FM801=m
1627CONFIG_SND_FM801_TEA575X=m
1628CONFIG_SND_ICE1712=m
1629# CONFIG_SND_ICE1724 is not set
1630CONFIG_SND_INTEL8X0=m
1631CONFIG_SND_INTEL8X0M=m
1632CONFIG_SND_SONICVIBES=m
1633# CONFIG_SND_VIA82XX is not set 944# CONFIG_SND_VIA82XX is not set
1634CONFIG_SND_VIA82XX_MODEM=m 945# CONFIG_SND_VIA82XX_MODEM is not set
1635CONFIG_SND_VX222=m 946# CONFIG_SND_VX222 is not set
947# CONFIG_SND_YMFPCI is not set
1636 948
1637# 949#
1638# USB devices 950# USB devices
@@ -1642,12 +954,20 @@ CONFIG_SND_VX222=m
1642# 954#
1643# ALSA Sparc devices 955# ALSA Sparc devices
1644# 956#
1645CONFIG_SND_SUN_AMD7930=m 957# CONFIG_SND_SUN_AMD7930 is not set
1646CONFIG_SND_SUN_CS4231=m 958CONFIG_SND_SUN_CS4231=m
959# CONFIG_SND_SUN_DBRI is not set
960
961#
962# Open Sound System
963#
964# CONFIG_SOUND_PRIME is not set
1647 965
1648# 966#
1649# USB support 967# USB support
1650# 968#
969CONFIG_USB_ARCH_HAS_HCD=y
970CONFIG_USB_ARCH_HAS_OHCI=y
1651CONFIG_USB=y 971CONFIG_USB=y
1652# CONFIG_USB_DEBUG is not set 972# CONFIG_USB_DEBUG is not set
1653 973
@@ -1658,8 +978,6 @@ CONFIG_USB_DEVICEFS=y
1658# CONFIG_USB_BANDWIDTH is not set 978# CONFIG_USB_BANDWIDTH is not set
1659# CONFIG_USB_DYNAMIC_MINORS is not set 979# CONFIG_USB_DYNAMIC_MINORS is not set
1660# CONFIG_USB_OTG is not set 980# CONFIG_USB_OTG is not set
1661CONFIG_USB_ARCH_HAS_HCD=y
1662CONFIG_USB_ARCH_HAS_OHCI=y
1663 981
1664# 982#
1665# USB Host Controller Drivers 983# USB Host Controller Drivers
@@ -1667,36 +985,29 @@ CONFIG_USB_ARCH_HAS_OHCI=y
1667CONFIG_USB_EHCI_HCD=m 985CONFIG_USB_EHCI_HCD=m
1668# CONFIG_USB_EHCI_SPLIT_ISO is not set 986# CONFIG_USB_EHCI_SPLIT_ISO is not set
1669# CONFIG_USB_EHCI_ROOT_HUB_TT is not set 987# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
988# CONFIG_USB_ISP116X_HCD is not set
1670CONFIG_USB_OHCI_HCD=y 989CONFIG_USB_OHCI_HCD=y
990# CONFIG_USB_OHCI_BIG_ENDIAN is not set
991CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1671CONFIG_USB_UHCI_HCD=m 992CONFIG_USB_UHCI_HCD=m
1672CONFIG_USB_SL811_HCD=m 993# CONFIG_USB_SL811_HCD is not set
1673 994
1674# 995#
1675# USB Device Class drivers 996# USB Device Class drivers
1676# 997#
1677# CONFIG_USB_AUDIO is not set 998# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
999# CONFIG_USB_ACM is not set
1000# CONFIG_USB_PRINTER is not set
1678 1001
1679# 1002#
1680# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem 1003# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1681# 1004#
1682# CONFIG_USB_MIDI is not set
1683CONFIG_USB_ACM=m
1684CONFIG_USB_PRINTER=m
1685 1005
1686# 1006#
1687# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information 1007# may also be needed; see USB_STORAGE Help for more information
1688# 1008#
1689CONFIG_USB_STORAGE=m 1009# CONFIG_USB_STORAGE is not set
1690# CONFIG_USB_STORAGE_DEBUG is not set 1010# CONFIG_USB_LIBUSUAL is not set
1691CONFIG_USB_STORAGE_RW_DETECT=y
1692# CONFIG_USB_STORAGE_DATAFAB is not set
1693CONFIG_USB_STORAGE_FREECOM=y
1694CONFIG_USB_STORAGE_ISD200=y
1695CONFIG_USB_STORAGE_DPCM=y
1696CONFIG_USB_STORAGE_HP8200e=y
1697CONFIG_USB_STORAGE_SDDR09=y
1698CONFIG_USB_STORAGE_SDDR55=y
1699# CONFIG_USB_STORAGE_JUMPSHOT is not set
1700 1011
1701# 1012#
1702# USB Input Devices 1013# USB Input Devices
@@ -1706,135 +1017,75 @@ CONFIG_USB_HIDINPUT=y
1706# CONFIG_HID_FF is not set 1017# CONFIG_HID_FF is not set
1707CONFIG_USB_HIDDEV=y 1018CONFIG_USB_HIDDEV=y
1708# CONFIG_USB_AIPTEK is not set 1019# CONFIG_USB_AIPTEK is not set
1709CONFIG_USB_WACOM=m 1020# CONFIG_USB_WACOM is not set
1710CONFIG_USB_KBTAB=m 1021# CONFIG_USB_ACECAD is not set
1022# CONFIG_USB_KBTAB is not set
1711# CONFIG_USB_POWERMATE is not set 1023# CONFIG_USB_POWERMATE is not set
1712CONFIG_USB_MTOUCH=m 1024# CONFIG_USB_MTOUCH is not set
1713CONFIG_USB_EGALAX=m 1025# CONFIG_USB_ITMTOUCH is not set
1026# CONFIG_USB_EGALAX is not set
1027# CONFIG_USB_YEALINK is not set
1714# CONFIG_USB_XPAD is not set 1028# CONFIG_USB_XPAD is not set
1715CONFIG_USB_ATI_REMOTE=m 1029# CONFIG_USB_ATI_REMOTE is not set
1030# CONFIG_USB_ATI_REMOTE2 is not set
1031# CONFIG_USB_KEYSPAN_REMOTE is not set
1032# CONFIG_USB_APPLETOUCH is not set
1716 1033
1717# 1034#
1718# USB Imaging devices 1035# USB Imaging devices
1719# 1036#
1720CONFIG_USB_MDC800=m 1037# CONFIG_USB_MDC800 is not set
1721CONFIG_USB_MICROTEK=m 1038# CONFIG_USB_MICROTEK is not set
1722 1039
1723# 1040#
1724# USB Multimedia devices 1041# USB Multimedia devices
1725# 1042#
1726# CONFIG_USB_DABUSB is not set 1043# CONFIG_USB_DABUSB is not set
1727# CONFIG_USB_VICAM is not set
1728# CONFIG_USB_DSBR is not set
1729# CONFIG_USB_IBMCAM is not set
1730# CONFIG_USB_KONICAWC is not set
1731# CONFIG_USB_OV511 is not set
1732# CONFIG_USB_SE401 is not set
1733CONFIG_USB_SN9C102=m
1734# CONFIG_USB_STV680 is not set
1735CONFIG_USB_W9968CF=m
1736
1737#
1738# USB Network Adapters
1739#
1740CONFIG_USB_CATC=m
1741CONFIG_USB_KAWETH=m
1742CONFIG_USB_PEGASUS=m
1743CONFIG_USB_RTL8150=m
1744CONFIG_USB_USBNET=m
1745
1746#
1747# USB Host-to-Host Cables
1748#
1749CONFIG_USB_ALI_M5632=y
1750CONFIG_USB_AN2720=y
1751CONFIG_USB_BELKIN=y
1752CONFIG_USB_GENESYS=y
1753CONFIG_USB_NET1080=y
1754CONFIG_USB_PL2301=y
1755CONFIG_USB_KC2190=y
1756 1044
1757# 1045#
1758# Intelligent USB Devices/Gadgets 1046# Video4Linux support is needed for USB Multimedia device support
1759# 1047#
1760CONFIG_USB_ARMLINUX=y
1761CONFIG_USB_EPSON2888=y
1762CONFIG_USB_ZAURUS=y
1763CONFIG_USB_CDCETHER=y
1764 1048
1765# 1049#
1766# USB Network Adapters 1050# USB Network Adapters
1767# 1051#
1768CONFIG_USB_AX8817X=y 1052# CONFIG_USB_CATC is not set
1053# CONFIG_USB_KAWETH is not set
1054# CONFIG_USB_PEGASUS is not set
1055# CONFIG_USB_RTL8150 is not set
1056# CONFIG_USB_USBNET is not set
1057# CONFIG_USB_MON is not set
1769 1058
1770# 1059#
1771# USB port drivers 1060# USB port drivers
1772# 1061#
1773CONFIG_USB_USS720=m
1774 1062
1775# 1063#
1776# USB Serial Converter support 1064# USB Serial Converter support
1777# 1065#
1778CONFIG_USB_SERIAL=m 1066# CONFIG_USB_SERIAL is not set
1779CONFIG_USB_SERIAL_GENERIC=y
1780CONFIG_USB_SERIAL_BELKIN=m
1781CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
1782CONFIG_USB_SERIAL_CYPRESS_M8=m
1783CONFIG_USB_SERIAL_EMPEG=m
1784CONFIG_USB_SERIAL_FTDI_SIO=m
1785# CONFIG_USB_SERIAL_VISOR is not set
1786CONFIG_USB_SERIAL_IPAQ=m
1787# CONFIG_USB_SERIAL_IR is not set
1788CONFIG_USB_SERIAL_EDGEPORT=m
1789# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
1790CONFIG_USB_SERIAL_GARMIN=m
1791CONFIG_USB_SERIAL_IPW=m
1792CONFIG_USB_SERIAL_KEYSPAN_PDA=m
1793CONFIG_USB_SERIAL_KEYSPAN=m
1794# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
1795# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
1796# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
1797# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
1798# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
1799# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
1800# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
1801# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
1802# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
1803# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
1804# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
1805# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
1806CONFIG_USB_SERIAL_KLSI=m
1807# CONFIG_USB_SERIAL_KOBIL_SCT is not set
1808CONFIG_USB_SERIAL_MCT_U232=m
1809CONFIG_USB_SERIAL_PL2303=m
1810# CONFIG_USB_SERIAL_SAFE is not set
1811CONFIG_USB_SERIAL_TI=m
1812CONFIG_USB_SERIAL_CYBERJACK=m
1813CONFIG_USB_SERIAL_XIRCOM=m
1814CONFIG_USB_SERIAL_OMNINET=m
1815CONFIG_USB_EZUSB=y
1816 1067
1817# 1068#
1818# USB Miscellaneous drivers 1069# USB Miscellaneous drivers
1819# 1070#
1820CONFIG_USB_EMI62=m 1071# CONFIG_USB_EMI62 is not set
1821CONFIG_USB_EMI26=m 1072# CONFIG_USB_EMI26 is not set
1822CONFIG_USB_AUERSWALD=m 1073# CONFIG_USB_AUERSWALD is not set
1823CONFIG_USB_RIO500=m 1074# CONFIG_USB_RIO500 is not set
1824CONFIG_USB_LEGOTOWER=m 1075# CONFIG_USB_LEGOTOWER is not set
1825CONFIG_USB_LCD=m 1076# CONFIG_USB_LCD is not set
1826CONFIG_USB_LED=m 1077# CONFIG_USB_LED is not set
1827CONFIG_USB_CYTHERM=m 1078# CONFIG_USB_CYTHERM is not set
1828CONFIG_USB_PHIDGETKIT=m 1079# CONFIG_USB_PHIDGETKIT is not set
1829CONFIG_USB_PHIDGETSERVO=m 1080# CONFIG_USB_PHIDGETSERVO is not set
1830CONFIG_USB_IDMOUSE=m 1081# CONFIG_USB_IDMOUSE is not set
1831CONFIG_USB_TEST=m 1082# CONFIG_USB_SISUSBVGA is not set
1083# CONFIG_USB_LD is not set
1084# CONFIG_USB_TEST is not set
1832 1085
1833# 1086#
1834# USB ATM/DSL drivers 1087# USB DSL modem support
1835# 1088#
1836CONFIG_USB_ATM=m
1837CONFIG_USB_SPEEDTOUCH=m
1838 1089
1839# 1090#
1840# USB Gadget Support 1091# USB Gadget Support
@@ -1842,50 +1093,185 @@ CONFIG_USB_SPEEDTOUCH=m
1842# CONFIG_USB_GADGET is not set 1093# CONFIG_USB_GADGET is not set
1843 1094
1844# 1095#
1096# MMC/SD Card support
1097#
1098# CONFIG_MMC is not set
1099
1100#
1845# InfiniBand support 1101# InfiniBand support
1846# 1102#
1847CONFIG_INFINIBAND=m 1103# CONFIG_INFINIBAND is not set
1848CONFIG_INFINIBAND_MTHCA=m
1849# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
1850CONFIG_INFINIBAND_IPOIB=m
1851# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
1852 1104
1853# 1105#
1854# Watchdog Cards 1106# SN Devices
1107#
1108
1109#
1110# Misc Linux/SPARC drivers
1111#
1112CONFIG_SUN_OPENPROMIO=m
1113CONFIG_SUN_MOSTEK_RTC=y
1114# CONFIG_OBP_FLASH is not set
1115# CONFIG_SUN_BPP is not set
1116# CONFIG_BBC_I2C is not set
1117# CONFIG_ENVCTRL is not set
1118# CONFIG_DISPLAY7SEG is not set
1119
1120#
1121# Fibre Channel support
1122#
1123# CONFIG_FC4 is not set
1124
1125#
1126# File systems
1127#
1128CONFIG_EXT2_FS=y
1129CONFIG_EXT2_FS_XATTR=y
1130CONFIG_EXT2_FS_POSIX_ACL=y
1131CONFIG_EXT2_FS_SECURITY=y
1132# CONFIG_EXT2_FS_XIP is not set
1133CONFIG_EXT3_FS=y
1134CONFIG_EXT3_FS_XATTR=y
1135CONFIG_EXT3_FS_POSIX_ACL=y
1136CONFIG_EXT3_FS_SECURITY=y
1137CONFIG_JBD=y
1138# CONFIG_JBD_DEBUG is not set
1139CONFIG_FS_MBCACHE=y
1140# CONFIG_REISERFS_FS is not set
1141# CONFIG_JFS_FS is not set
1142CONFIG_FS_POSIX_ACL=y
1143# CONFIG_XFS_FS is not set
1144# CONFIG_OCFS2_FS is not set
1145# CONFIG_MINIX_FS is not set
1146# CONFIG_ROMFS_FS is not set
1147CONFIG_INOTIFY=y
1148# CONFIG_QUOTA is not set
1149CONFIG_DNOTIFY=y
1150# CONFIG_AUTOFS_FS is not set
1151# CONFIG_AUTOFS4_FS is not set
1152# CONFIG_FUSE_FS is not set
1153
1855# 1154#
1856CONFIG_WATCHDOG=y 1155# CD-ROM/DVD Filesystems
1857# CONFIG_WATCHDOG_NOWAYOUT is not set 1156#
1157# CONFIG_ISO9660_FS is not set
1158# CONFIG_UDF_FS is not set
1858 1159
1859# 1160#
1860# Watchdog Device Drivers 1161# DOS/FAT/NT Filesystems
1861# 1162#
1862CONFIG_SOFT_WATCHDOG=m 1163# CONFIG_MSDOS_FS is not set
1863CONFIG_WATCHDOG_CP1XXX=m 1164# CONFIG_VFAT_FS is not set
1864CONFIG_WATCHDOG_RIO=m 1165# CONFIG_NTFS_FS is not set
1865 1166
1866# 1167#
1867# PCI-based Watchdog Cards 1168# Pseudo filesystems
1868# 1169#
1869CONFIG_PCIPCWATCHDOG=m 1170CONFIG_PROC_FS=y
1870CONFIG_WDTPCI=m 1171CONFIG_PROC_KCORE=y
1871CONFIG_WDT_501_PCI=y 1172CONFIG_SYSFS=y
1173CONFIG_TMPFS=y
1174CONFIG_HUGETLBFS=y
1175CONFIG_HUGETLB_PAGE=y
1176CONFIG_RAMFS=y
1177CONFIG_RELAYFS_FS=m
1178# CONFIG_CONFIGFS_FS is not set
1872 1179
1873# 1180#
1874# USB-based Watchdog Cards 1181# Miscellaneous filesystems
1875# 1182#
1876CONFIG_USBPCWATCHDOG=m 1183# CONFIG_ADFS_FS is not set
1184# CONFIG_AFFS_FS is not set
1185# CONFIG_HFS_FS is not set
1186# CONFIG_HFSPLUS_FS is not set
1187# CONFIG_BEFS_FS is not set
1188# CONFIG_BFS_FS is not set
1189# CONFIG_EFS_FS is not set
1190# CONFIG_CRAMFS is not set
1191# CONFIG_VXFS_FS is not set
1192# CONFIG_HPFS_FS is not set
1193# CONFIG_QNX4FS_FS is not set
1194# CONFIG_SYSV_FS is not set
1195# CONFIG_UFS_FS is not set
1877 1196
1878# 1197#
1879# Profiling support 1198# Network File Systems
1199#
1200# CONFIG_NFS_FS is not set
1201# CONFIG_NFSD is not set
1202# CONFIG_SMB_FS is not set
1203# CONFIG_CIFS is not set
1204# CONFIG_NCP_FS is not set
1205# CONFIG_CODA_FS is not set
1206# CONFIG_AFS_FS is not set
1207# CONFIG_9P_FS is not set
1208
1209#
1210# Partition Types
1211#
1212# CONFIG_PARTITION_ADVANCED is not set
1213CONFIG_MSDOS_PARTITION=y
1214CONFIG_SUN_PARTITION=y
1215
1216#
1217# Native Language Support
1218#
1219CONFIG_NLS=m
1220CONFIG_NLS_DEFAULT="iso8859-1"
1221# CONFIG_NLS_CODEPAGE_437 is not set
1222# CONFIG_NLS_CODEPAGE_737 is not set
1223# CONFIG_NLS_CODEPAGE_775 is not set
1224# CONFIG_NLS_CODEPAGE_850 is not set
1225# CONFIG_NLS_CODEPAGE_852 is not set
1226# CONFIG_NLS_CODEPAGE_855 is not set
1227# CONFIG_NLS_CODEPAGE_857 is not set
1228# CONFIG_NLS_CODEPAGE_860 is not set
1229# CONFIG_NLS_CODEPAGE_861 is not set
1230# CONFIG_NLS_CODEPAGE_862 is not set
1231# CONFIG_NLS_CODEPAGE_863 is not set
1232# CONFIG_NLS_CODEPAGE_864 is not set
1233# CONFIG_NLS_CODEPAGE_865 is not set
1234# CONFIG_NLS_CODEPAGE_866 is not set
1235# CONFIG_NLS_CODEPAGE_869 is not set
1236# CONFIG_NLS_CODEPAGE_936 is not set
1237# CONFIG_NLS_CODEPAGE_950 is not set
1238# CONFIG_NLS_CODEPAGE_932 is not set
1239# CONFIG_NLS_CODEPAGE_949 is not set
1240# CONFIG_NLS_CODEPAGE_874 is not set
1241# CONFIG_NLS_ISO8859_8 is not set
1242# CONFIG_NLS_CODEPAGE_1250 is not set
1243# CONFIG_NLS_CODEPAGE_1251 is not set
1244# CONFIG_NLS_ASCII is not set
1245# CONFIG_NLS_ISO8859_1 is not set
1246# CONFIG_NLS_ISO8859_2 is not set
1247# CONFIG_NLS_ISO8859_3 is not set
1248# CONFIG_NLS_ISO8859_4 is not set
1249# CONFIG_NLS_ISO8859_5 is not set
1250# CONFIG_NLS_ISO8859_6 is not set
1251# CONFIG_NLS_ISO8859_7 is not set
1252# CONFIG_NLS_ISO8859_9 is not set
1253# CONFIG_NLS_ISO8859_13 is not set
1254# CONFIG_NLS_ISO8859_14 is not set
1255# CONFIG_NLS_ISO8859_15 is not set
1256# CONFIG_NLS_KOI8_R is not set
1257# CONFIG_NLS_KOI8_U is not set
1258# CONFIG_NLS_UTF8 is not set
1259
1260#
1261# Instrumentation Support
1880# 1262#
1881CONFIG_PROFILING=y 1263CONFIG_PROFILING=y
1882CONFIG_OPROFILE=m 1264CONFIG_OPROFILE=m
1265CONFIG_KPROBES=y
1883 1266
1884# 1267#
1885# Kernel hacking 1268# Kernel hacking
1886# 1269#
1270CONFIG_PRINTK_TIME=y
1887CONFIG_DEBUG_KERNEL=y 1271CONFIG_DEBUG_KERNEL=y
1888CONFIG_MAGIC_SYSRQ=y 1272CONFIG_MAGIC_SYSRQ=y
1273CONFIG_LOG_BUF_SHIFT=18
1274CONFIG_DETECT_SOFTLOCKUP=y
1889CONFIG_SCHEDSTATS=y 1275CONFIG_SCHEDSTATS=y
1890# CONFIG_DEBUG_SLAB is not set 1276# CONFIG_DEBUG_SLAB is not set
1891# CONFIG_DEBUG_SPINLOCK is not set 1277# CONFIG_DEBUG_SPINLOCK is not set
@@ -1894,12 +1280,13 @@ CONFIG_SCHEDSTATS=y
1894CONFIG_DEBUG_BUGVERBOSE=y 1280CONFIG_DEBUG_BUGVERBOSE=y
1895# CONFIG_DEBUG_INFO is not set 1281# CONFIG_DEBUG_INFO is not set
1896CONFIG_DEBUG_FS=y 1282CONFIG_DEBUG_FS=y
1283# CONFIG_DEBUG_VM is not set
1284# CONFIG_RCU_TORTURE_TEST is not set
1897# CONFIG_DEBUG_STACK_USAGE is not set 1285# CONFIG_DEBUG_STACK_USAGE is not set
1898CONFIG_KPROBES=y
1899# CONFIG_DEBUG_DCFLUSH is not set 1286# CONFIG_DEBUG_DCFLUSH is not set
1900# CONFIG_STACK_DEBUG is not set 1287# CONFIG_STACK_DEBUG is not set
1901# CONFIG_DEBUG_BOOTMEM is not set 1288# CONFIG_DEBUG_BOOTMEM is not set
1902CONFIG_HAVE_DEC_LOCK=y 1289# CONFIG_DEBUG_PAGEALLOC is not set
1903 1290
1904# 1291#
1905# Security options 1292# Security options
@@ -1945,6 +1332,7 @@ CONFIG_CRYPTO_TEST=m
1945# Library routines 1332# Library routines
1946# 1333#
1947CONFIG_CRC_CCITT=m 1334CONFIG_CRC_CCITT=m
1335CONFIG_CRC16=m
1948CONFIG_CRC32=y 1336CONFIG_CRC32=y
1949CONFIG_LIBCRC32C=m 1337CONFIG_LIBCRC32C=m
1950CONFIG_ZLIB_INFLATE=y 1338CONFIG_ZLIB_INFLATE=y
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S
index 11a848402fb1..710002991888 100644
--- a/arch/sparc64/kernel/entry.S
+++ b/arch/sparc64/kernel/entry.S
@@ -1657,13 +1657,10 @@ ret_sys_call:
1657 /* Check if force_successful_syscall_return() 1657 /* Check if force_successful_syscall_return()
1658 * was invoked. 1658 * was invoked.
1659 */ 1659 */
1660 ldub [%curptr + TI_SYS_NOERROR], %l0 1660 ldub [%curptr + TI_SYS_NOERROR], %l2
1661 brz,pt %l0, 1f 1661 brnz,a,pn %l2, 80f
1662 nop
1663 ba,pt %xcc, 80f
1664 stb %g0, [%curptr + TI_SYS_NOERROR] 1662 stb %g0, [%curptr + TI_SYS_NOERROR]
1665 1663
16661:
1667 cmp %o0, -ERESTART_RESTARTBLOCK 1664 cmp %o0, -ERESTART_RESTARTBLOCK
1668 bgeu,pn %xcc, 1f 1665 bgeu,pn %xcc, 1f
1669 andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6 1666 andcc %l0, (_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT), %l6
diff --git a/arch/sparc64/kernel/power.c b/arch/sparc64/kernel/power.c
index 9e8362ea3104..30bcaf58e3ab 100644
--- a/arch/sparc64/kernel/power.c
+++ b/arch/sparc64/kernel/power.c
@@ -14,6 +14,7 @@
14#include <linux/signal.h> 14#include <linux/signal.h>
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/pm.h>
17 18
18#include <asm/system.h> 19#include <asm/system.h>
19#include <asm/ebus.h> 20#include <asm/ebus.h>
@@ -70,6 +71,9 @@ void machine_power_off(void)
70 machine_halt(); 71 machine_halt();
71} 72}
72 73
74void (*pm_power_off)(void) = machine_power_off;
75EXPORT_SYMBOL(pm_power_off);
76
73#ifdef CONFIG_PCI 77#ifdef CONFIG_PCI
74static int powerd(void *__unused) 78static int powerd(void *__unused)
75{ 79{
diff --git a/arch/x86_64/crypto/aes.c b/arch/x86_64/crypto/aes.c
index acfdaa28791e..fb1b961a2e2f 100644
--- a/arch/x86_64/crypto/aes.c
+++ b/arch/x86_64/crypto/aes.c
@@ -74,8 +74,6 @@ static inline u8 byte(const u32 x, const unsigned n)
74 return x >> (n << 3); 74 return x >> (n << 3);
75} 75}
76 76
77#define u32_in(x) le32_to_cpu(*(const __le32 *)(x))
78
79struct aes_ctx 77struct aes_ctx
80{ 78{
81 u32 key_length; 79 u32 key_length;
@@ -234,6 +232,7 @@ static int aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len,
234 u32 *flags) 232 u32 *flags)
235{ 233{
236 struct aes_ctx *ctx = ctx_arg; 234 struct aes_ctx *ctx = ctx_arg;
235 const __le32 *key = (const __le32 *)in_key;
237 u32 i, j, t, u, v, w; 236 u32 i, j, t, u, v, w;
238 237
239 if (key_len != 16 && key_len != 24 && key_len != 32) { 238 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,
243 242
244 ctx->key_length = key_len; 243 ctx->key_length = key_len;
245 244
246 D_KEY[key_len + 24] = E_KEY[0] = u32_in(in_key); 245 D_KEY[key_len + 24] = E_KEY[0] = le32_to_cpu(key[0]);
247 D_KEY[key_len + 25] = E_KEY[1] = u32_in(in_key + 4); 246 D_KEY[key_len + 25] = E_KEY[1] = le32_to_cpu(key[1]);
248 D_KEY[key_len + 26] = E_KEY[2] = u32_in(in_key + 8); 247 D_KEY[key_len + 26] = E_KEY[2] = le32_to_cpu(key[2]);
249 D_KEY[key_len + 27] = E_KEY[3] = u32_in(in_key + 12); 248 D_KEY[key_len + 27] = E_KEY[3] = le32_to_cpu(key[3]);
250 249
251 switch (key_len) { 250 switch (key_len) {
252 case 16: 251 case 16:
@@ -256,17 +255,17 @@ static int aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len,
256 break; 255 break;
257 256
258 case 24: 257 case 24:
259 E_KEY[4] = u32_in(in_key + 16); 258 E_KEY[4] = le32_to_cpu(key[4]);
260 t = E_KEY[5] = u32_in(in_key + 20); 259 t = E_KEY[5] = le32_to_cpu(key[5]);
261 for (i = 0; i < 8; ++i) 260 for (i = 0; i < 8; ++i)
262 loop6 (i); 261 loop6 (i);
263 break; 262 break;
264 263
265 case 32: 264 case 32:
266 E_KEY[4] = u32_in(in_key + 16); 265 E_KEY[4] = le32_to_cpu(key[4]);
267 E_KEY[5] = u32_in(in_key + 20); 266 E_KEY[5] = le32_to_cpu(key[5]);
268 E_KEY[6] = u32_in(in_key + 24); 267 E_KEY[6] = le32_to_cpu(key[6]);
269 t = E_KEY[7] = u32_in(in_key + 28); 268 t = E_KEY[7] = le32_to_cpu(key[7]);
270 for (i = 0; i < 7; ++i) 269 for (i = 0; i < 7; ++i)
271 loop8(i); 270 loop8(i);
272 break; 271 break;
@@ -290,6 +289,8 @@ extern void aes_decrypt(void *ctx_arg, u8 *out, const u8 *in);
290 289
291static struct crypto_alg aes_alg = { 290static struct crypto_alg aes_alg = {
292 .cra_name = "aes", 291 .cra_name = "aes",
292 .cra_driver_name = "aes-x86_64",
293 .cra_priority = 200,
293 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 294 .cra_flags = CRYPTO_ALG_TYPE_CIPHER,
294 .cra_blocksize = AES_BLOCK_SIZE, 295 .cra_blocksize = AES_BLOCK_SIZE,
295 .cra_ctxsize = sizeof(struct aes_ctx), 296 .cra_ctxsize = sizeof(struct aes_ctx),
diff --git a/crypto/Kconfig b/crypto/Kconfig
index 52e1d4108a99..c442f2e7ce46 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -157,7 +157,7 @@ config CRYPTO_SERPENT
157 157
158config CRYPTO_AES 158config CRYPTO_AES
159 tristate "AES cipher algorithms" 159 tristate "AES cipher algorithms"
160 depends on CRYPTO && !(X86 || UML_X86) 160 depends on CRYPTO
161 help 161 help
162 AES cipher algorithms (FIPS-197). AES uses the Rijndael 162 AES cipher algorithms (FIPS-197). AES uses the Rijndael
163 algorithm. 163 algorithm.
diff --git a/crypto/aes.c b/crypto/aes.c
index 5df92888ef5a..0a6a5c143686 100644
--- a/crypto/aes.c
+++ b/crypto/aes.c
@@ -73,9 +73,6 @@ byte(const u32 x, const unsigned n)
73 return x >> (n << 3); 73 return x >> (n << 3);
74} 74}
75 75
76#define u32_in(x) le32_to_cpu(*(const u32 *)(x))
77#define u32_out(to, from) (*(u32 *)(to) = cpu_to_le32(from))
78
79struct aes_ctx { 76struct aes_ctx {
80 int key_length; 77 int key_length;
81 u32 E[60]; 78 u32 E[60];
@@ -256,6 +253,7 @@ static int
256aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags) 253aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
257{ 254{
258 struct aes_ctx *ctx = ctx_arg; 255 struct aes_ctx *ctx = ctx_arg;
256 const __le32 *key = (const __le32 *)in_key;
259 u32 i, t, u, v, w; 257 u32 i, t, u, v, w;
260 258
261 if (key_len != 16 && key_len != 24 && key_len != 32) { 259 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)
265 263
266 ctx->key_length = key_len; 264 ctx->key_length = key_len;
267 265
268 E_KEY[0] = u32_in (in_key); 266 E_KEY[0] = le32_to_cpu(key[0]);
269 E_KEY[1] = u32_in (in_key + 4); 267 E_KEY[1] = le32_to_cpu(key[1]);
270 E_KEY[2] = u32_in (in_key + 8); 268 E_KEY[2] = le32_to_cpu(key[2]);
271 E_KEY[3] = u32_in (in_key + 12); 269 E_KEY[3] = le32_to_cpu(key[3]);
272 270
273 switch (key_len) { 271 switch (key_len) {
274 case 16: 272 case 16:
@@ -278,17 +276,17 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
278 break; 276 break;
279 277
280 case 24: 278 case 24:
281 E_KEY[4] = u32_in (in_key + 16); 279 E_KEY[4] = le32_to_cpu(key[4]);
282 t = E_KEY[5] = u32_in (in_key + 20); 280 t = E_KEY[5] = le32_to_cpu(key[5]);
283 for (i = 0; i < 8; ++i) 281 for (i = 0; i < 8; ++i)
284 loop6 (i); 282 loop6 (i);
285 break; 283 break;
286 284
287 case 32: 285 case 32:
288 E_KEY[4] = u32_in (in_key + 16); 286 E_KEY[4] = le32_to_cpu(key[4]);
289 E_KEY[5] = u32_in (in_key + 20); 287 E_KEY[5] = le32_to_cpu(key[5]);
290 E_KEY[6] = u32_in (in_key + 24); 288 E_KEY[6] = le32_to_cpu(key[6]);
291 t = E_KEY[7] = u32_in (in_key + 28); 289 t = E_KEY[7] = le32_to_cpu(key[7]);
292 for (i = 0; i < 7; ++i) 290 for (i = 0; i < 7; ++i)
293 loop8 (i); 291 loop8 (i);
294 break; 292 break;
@@ -324,13 +322,15 @@ aes_set_key(void *ctx_arg, const u8 *in_key, unsigned int key_len, u32 *flags)
324static void aes_encrypt(void *ctx_arg, u8 *out, const u8 *in) 322static void aes_encrypt(void *ctx_arg, u8 *out, const u8 *in)
325{ 323{
326 const struct aes_ctx *ctx = ctx_arg; 324 const struct aes_ctx *ctx = ctx_arg;
325 const __le32 *src = (const __le32 *)in;
326 __le32 *dst = (__le32 *)out;
327 u32 b0[4], b1[4]; 327 u32 b0[4], b1[4];
328 const u32 *kp = E_KEY + 4; 328 const u32 *kp = E_KEY + 4;
329 329
330 b0[0] = u32_in (in) ^ E_KEY[0]; 330 b0[0] = le32_to_cpu(src[0]) ^ E_KEY[0];
331 b0[1] = u32_in (in + 4) ^ E_KEY[1]; 331 b0[1] = le32_to_cpu(src[1]) ^ E_KEY[1];
332 b0[2] = u32_in (in + 8) ^ E_KEY[2]; 332 b0[2] = le32_to_cpu(src[2]) ^ E_KEY[2];
333 b0[3] = u32_in (in + 12) ^ E_KEY[3]; 333 b0[3] = le32_to_cpu(src[3]) ^ E_KEY[3];
334 334
335 if (ctx->key_length > 24) { 335 if (ctx->key_length > 24) {
336 f_nround (b1, b0, kp); 336 f_nround (b1, b0, kp);
@@ -353,10 +353,10 @@ static void aes_encrypt(void *ctx_arg, u8 *out, const u8 *in)
353 f_nround (b1, b0, kp); 353 f_nround (b1, b0, kp);
354 f_lround (b0, b1, kp); 354 f_lround (b0, b1, kp);
355 355
356 u32_out (out, b0[0]); 356 dst[0] = cpu_to_le32(b0[0]);
357 u32_out (out + 4, b0[1]); 357 dst[1] = cpu_to_le32(b0[1]);
358 u32_out (out + 8, b0[2]); 358 dst[2] = cpu_to_le32(b0[2]);
359 u32_out (out + 12, b0[3]); 359 dst[3] = cpu_to_le32(b0[3]);
360} 360}
361 361
362/* decrypt a block of text */ 362/* decrypt a block of text */
@@ -377,14 +377,16 @@ static void aes_encrypt(void *ctx_arg, u8 *out, const u8 *in)
377static void aes_decrypt(void *ctx_arg, u8 *out, const u8 *in) 377static void aes_decrypt(void *ctx_arg, u8 *out, const u8 *in)
378{ 378{
379 const struct aes_ctx *ctx = ctx_arg; 379 const struct aes_ctx *ctx = ctx_arg;
380 const __le32 *src = (const __le32 *)in;
381 __le32 *dst = (__le32 *)out;
380 u32 b0[4], b1[4]; 382 u32 b0[4], b1[4];
381 const int key_len = ctx->key_length; 383 const int key_len = ctx->key_length;
382 const u32 *kp = D_KEY + key_len + 20; 384 const u32 *kp = D_KEY + key_len + 20;
383 385
384 b0[0] = u32_in (in) ^ E_KEY[key_len + 24]; 386 b0[0] = le32_to_cpu(src[0]) ^ E_KEY[key_len + 24];
385 b0[1] = u32_in (in + 4) ^ E_KEY[key_len + 25]; 387 b0[1] = le32_to_cpu(src[1]) ^ E_KEY[key_len + 25];
386 b0[2] = u32_in (in + 8) ^ E_KEY[key_len + 26]; 388 b0[2] = le32_to_cpu(src[2]) ^ E_KEY[key_len + 26];
387 b0[3] = u32_in (in + 12) ^ E_KEY[key_len + 27]; 389 b0[3] = le32_to_cpu(src[3]) ^ E_KEY[key_len + 27];
388 390
389 if (key_len > 24) { 391 if (key_len > 24) {
390 i_nround (b1, b0, kp); 392 i_nround (b1, b0, kp);
@@ -407,18 +409,21 @@ static void aes_decrypt(void *ctx_arg, u8 *out, const u8 *in)
407 i_nround (b1, b0, kp); 409 i_nround (b1, b0, kp);
408 i_lround (b0, b1, kp); 410 i_lround (b0, b1, kp);
409 411
410 u32_out (out, b0[0]); 412 dst[0] = cpu_to_le32(b0[0]);
411 u32_out (out + 4, b0[1]); 413 dst[1] = cpu_to_le32(b0[1]);
412 u32_out (out + 8, b0[2]); 414 dst[2] = cpu_to_le32(b0[2]);
413 u32_out (out + 12, b0[3]); 415 dst[3] = cpu_to_le32(b0[3]);
414} 416}
415 417
416 418
417static struct crypto_alg aes_alg = { 419static struct crypto_alg aes_alg = {
418 .cra_name = "aes", 420 .cra_name = "aes",
421 .cra_driver_name = "aes-generic",
422 .cra_priority = 100,
419 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 423 .cra_flags = CRYPTO_ALG_TYPE_CIPHER,
420 .cra_blocksize = AES_BLOCK_SIZE, 424 .cra_blocksize = AES_BLOCK_SIZE,
421 .cra_ctxsize = sizeof(struct aes_ctx), 425 .cra_ctxsize = sizeof(struct aes_ctx),
426 .cra_alignmask = 3,
422 .cra_module = THIS_MODULE, 427 .cra_module = THIS_MODULE,
423 .cra_list = LIST_HEAD_INIT(aes_alg.cra_list), 428 .cra_list = LIST_HEAD_INIT(aes_alg.cra_list),
424 .cra_u = { 429 .cra_u = {
diff --git a/crypto/anubis.c b/crypto/anubis.c
index 3925eb0133cb..2c796bdb91a6 100644
--- a/crypto/anubis.c
+++ b/crypto/anubis.c
@@ -32,8 +32,10 @@
32#include <linux/init.h> 32#include <linux/init.h>
33#include <linux/module.h> 33#include <linux/module.h>
34#include <linux/mm.h> 34#include <linux/mm.h>
35#include <asm/byteorder.h>
35#include <asm/scatterlist.h> 36#include <asm/scatterlist.h>
36#include <linux/crypto.h> 37#include <linux/crypto.h>
38#include <linux/types.h>
37 39
38#define ANUBIS_MIN_KEY_SIZE 16 40#define ANUBIS_MIN_KEY_SIZE 16
39#define ANUBIS_MAX_KEY_SIZE 40 41#define ANUBIS_MAX_KEY_SIZE 40
@@ -461,8 +463,8 @@ static const u32 rc[] = {
461static int anubis_setkey(void *ctx_arg, const u8 *in_key, 463static int anubis_setkey(void *ctx_arg, const u8 *in_key,
462 unsigned int key_len, u32 *flags) 464 unsigned int key_len, u32 *flags)
463{ 465{
464 466 const __be32 *key = (const __be32 *)in_key;
465 int N, R, i, pos, r; 467 int N, R, i, r;
466 u32 kappa[ANUBIS_MAX_N]; 468 u32 kappa[ANUBIS_MAX_N];
467 u32 inter[ANUBIS_MAX_N]; 469 u32 inter[ANUBIS_MAX_N];
468 470
@@ -483,13 +485,8 @@ static int anubis_setkey(void *ctx_arg, const u8 *in_key,
483 ctx->R = R = 8 + N; 485 ctx->R = R = 8 + N;
484 486
485 /* * map cipher key to initial key state (mu): */ 487 /* * map cipher key to initial key state (mu): */
486 for (i = 0, pos = 0; i < N; i++, pos += 4) { 488 for (i = 0; i < N; i++)
487 kappa[i] = 489 kappa[i] = be32_to_cpu(key[i]);
488 (in_key[pos ] << 24) ^
489 (in_key[pos + 1] << 16) ^
490 (in_key[pos + 2] << 8) ^
491 (in_key[pos + 3] );
492 }
493 490
494 /* 491 /*
495 * generate R + 1 round keys: 492 * generate R + 1 round keys:
@@ -578,7 +575,9 @@ static int anubis_setkey(void *ctx_arg, const u8 *in_key,
578static void anubis_crypt(u32 roundKey[ANUBIS_MAX_ROUNDS + 1][4], 575static void anubis_crypt(u32 roundKey[ANUBIS_MAX_ROUNDS + 1][4],
579 u8 *ciphertext, const u8 *plaintext, const int R) 576 u8 *ciphertext, const u8 *plaintext, const int R)
580{ 577{
581 int i, pos, r; 578 const __be32 *src = (const __be32 *)plaintext;
579 __be32 *dst = (__be32 *)ciphertext;
580 int i, r;
582 u32 state[4]; 581 u32 state[4];
583 u32 inter[4]; 582 u32 inter[4];
584 583
@@ -586,14 +585,8 @@ static void anubis_crypt(u32 roundKey[ANUBIS_MAX_ROUNDS + 1][4],
586 * map plaintext block to cipher state (mu) 585 * map plaintext block to cipher state (mu)
587 * and add initial round key (sigma[K^0]): 586 * and add initial round key (sigma[K^0]):
588 */ 587 */
589 for (i = 0, pos = 0; i < 4; i++, pos += 4) { 588 for (i = 0; i < 4; i++)
590 state[i] = 589 state[i] = be32_to_cpu(src[i]) ^ roundKey[0][i];
591 (plaintext[pos ] << 24) ^
592 (plaintext[pos + 1] << 16) ^
593 (plaintext[pos + 2] << 8) ^
594 (plaintext[pos + 3] ) ^
595 roundKey[0][i];
596 }
597 590
598 /* 591 /*
599 * R - 1 full rounds: 592 * R - 1 full rounds:
@@ -663,13 +656,8 @@ static void anubis_crypt(u32 roundKey[ANUBIS_MAX_ROUNDS + 1][4],
663 * map cipher state to ciphertext block (mu^{-1}): 656 * map cipher state to ciphertext block (mu^{-1}):
664 */ 657 */
665 658
666 for (i = 0, pos = 0; i < 4; i++, pos += 4) { 659 for (i = 0; i < 4; i++)
667 u32 w = inter[i]; 660 dst[i] = cpu_to_be32(inter[i]);
668 ciphertext[pos ] = (u8)(w >> 24);
669 ciphertext[pos + 1] = (u8)(w >> 16);
670 ciphertext[pos + 2] = (u8)(w >> 8);
671 ciphertext[pos + 3] = (u8)(w );
672 }
673} 661}
674 662
675static void anubis_encrypt(void *ctx_arg, u8 *dst, const u8 *src) 663static void anubis_encrypt(void *ctx_arg, u8 *dst, const u8 *src)
@@ -689,6 +677,7 @@ static struct crypto_alg anubis_alg = {
689 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 677 .cra_flags = CRYPTO_ALG_TYPE_CIPHER,
690 .cra_blocksize = ANUBIS_BLOCK_SIZE, 678 .cra_blocksize = ANUBIS_BLOCK_SIZE,
691 .cra_ctxsize = sizeof (struct anubis_ctx), 679 .cra_ctxsize = sizeof (struct anubis_ctx),
680 .cra_alignmask = 3,
692 .cra_module = THIS_MODULE, 681 .cra_module = THIS_MODULE,
693 .cra_list = LIST_HEAD_INIT(anubis_alg.cra_list), 682 .cra_list = LIST_HEAD_INIT(anubis_alg.cra_list),
694 .cra_u = { .cipher = { 683 .cra_u = { .cipher = {
diff --git a/crypto/api.c b/crypto/api.c
index 40ae42e9b6a6..e26156f71839 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> 4 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
5 * Copyright (c) 2002 David S. Miller (davem@redhat.com) 5 * Copyright (c) 2002 David S. Miller (davem@redhat.com)
6 * Copyright (c) 2005 Herbert Xu <herbert@gondor.apana.org.au>
6 * 7 *
7 * Portions derived from Cryptoapi, by Alexander Kjeldaas <astor@fast.no> 8 * Portions derived from Cryptoapi, by Alexander Kjeldaas <astor@fast.no>
8 * and Nettle, by Niels Möller. 9 * and Nettle, by Niels Möller.
@@ -18,9 +19,11 @@
18#include <linux/init.h> 19#include <linux/init.h>
19#include <linux/crypto.h> 20#include <linux/crypto.h>
20#include <linux/errno.h> 21#include <linux/errno.h>
22#include <linux/kernel.h>
21#include <linux/kmod.h> 23#include <linux/kmod.h>
22#include <linux/rwsem.h> 24#include <linux/rwsem.h>
23#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/string.h>
24#include "internal.h" 27#include "internal.h"
25 28
26LIST_HEAD(crypto_alg_list); 29LIST_HEAD(crypto_alg_list);
@@ -39,6 +42,7 @@ static inline void crypto_alg_put(struct crypto_alg *alg)
39static struct crypto_alg *crypto_alg_lookup(const char *name) 42static struct crypto_alg *crypto_alg_lookup(const char *name)
40{ 43{
41 struct crypto_alg *q, *alg = NULL; 44 struct crypto_alg *q, *alg = NULL;
45 int best = -1;
42 46
43 if (!name) 47 if (!name)
44 return NULL; 48 return NULL;
@@ -46,11 +50,23 @@ static struct crypto_alg *crypto_alg_lookup(const char *name)
46 down_read(&crypto_alg_sem); 50 down_read(&crypto_alg_sem);
47 51
48 list_for_each_entry(q, &crypto_alg_list, cra_list) { 52 list_for_each_entry(q, &crypto_alg_list, cra_list) {
49 if (!(strcmp(q->cra_name, name))) { 53 int exact, fuzzy;
50 if (crypto_alg_get(q)) 54
51 alg = q; 55 exact = !strcmp(q->cra_driver_name, name);
56 fuzzy = !strcmp(q->cra_name, name);
57 if (!exact && !(fuzzy && q->cra_priority > best))
58 continue;
59
60 if (unlikely(!crypto_alg_get(q)))
61 continue;
62
63 best = q->cra_priority;
64 if (alg)
65 crypto_alg_put(alg);
66 alg = q;
67
68 if (exact)
52 break; 69 break;
53 }
54 } 70 }
55 71
56 up_read(&crypto_alg_sem); 72 up_read(&crypto_alg_sem);
@@ -207,9 +223,26 @@ void crypto_free_tfm(struct crypto_tfm *tfm)
207 kfree(tfm); 223 kfree(tfm);
208} 224}
209 225
226static inline int crypto_set_driver_name(struct crypto_alg *alg)
227{
228 static const char suffix[] = "-generic";
229 char *driver_name = (char *)alg->cra_driver_name;
230 int len;
231
232 if (*driver_name)
233 return 0;
234
235 len = strlcpy(driver_name, alg->cra_name, CRYPTO_MAX_ALG_NAME);
236 if (len + sizeof(suffix) > CRYPTO_MAX_ALG_NAME)
237 return -ENAMETOOLONG;
238
239 memcpy(driver_name + len, suffix, sizeof(suffix));
240 return 0;
241}
242
210int crypto_register_alg(struct crypto_alg *alg) 243int crypto_register_alg(struct crypto_alg *alg)
211{ 244{
212 int ret = 0; 245 int ret;
213 struct crypto_alg *q; 246 struct crypto_alg *q;
214 247
215 if (alg->cra_alignmask & (alg->cra_alignmask + 1)) 248 if (alg->cra_alignmask & (alg->cra_alignmask + 1))
@@ -218,13 +251,20 @@ int crypto_register_alg(struct crypto_alg *alg)
218 if (alg->cra_alignmask & alg->cra_blocksize) 251 if (alg->cra_alignmask & alg->cra_blocksize)
219 return -EINVAL; 252 return -EINVAL;
220 253
221 if (alg->cra_blocksize > PAGE_SIZE) 254 if (alg->cra_blocksize > PAGE_SIZE / 8)
255 return -EINVAL;
256
257 if (alg->cra_priority < 0)
222 return -EINVAL; 258 return -EINVAL;
223 259
260 ret = crypto_set_driver_name(alg);
261 if (unlikely(ret))
262 return ret;
263
224 down_write(&crypto_alg_sem); 264 down_write(&crypto_alg_sem);
225 265
226 list_for_each_entry(q, &crypto_alg_list, cra_list) { 266 list_for_each_entry(q, &crypto_alg_list, cra_list) {
227 if (!(strcmp(q->cra_name, alg->cra_name))) { 267 if (!strcmp(q->cra_driver_name, alg->cra_driver_name)) {
228 ret = -EEXIST; 268 ret = -EEXIST;
229 goto out; 269 goto out;
230 } 270 }
diff --git a/crypto/blowfish.c b/crypto/blowfish.c
index a8b29d54e7d8..7f710b201f20 100644
--- a/crypto/blowfish.c
+++ b/crypto/blowfish.c
@@ -19,8 +19,10 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <asm/byteorder.h>
22#include <asm/scatterlist.h> 23#include <asm/scatterlist.h>
23#include <linux/crypto.h> 24#include <linux/crypto.h>
25#include <linux/types.h>
24 26
25#define BF_BLOCK_SIZE 8 27#define BF_BLOCK_SIZE 8
26#define BF_MIN_KEY_SIZE 4 28#define BF_MIN_KEY_SIZE 4
@@ -451,6 +453,7 @@ static struct crypto_alg alg = {
451 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 453 .cra_flags = CRYPTO_ALG_TYPE_CIPHER,
452 .cra_blocksize = BF_BLOCK_SIZE, 454 .cra_blocksize = BF_BLOCK_SIZE,
453 .cra_ctxsize = sizeof(struct bf_ctx), 455 .cra_ctxsize = sizeof(struct bf_ctx),
456 .cra_alignmask = 3,
454 .cra_module = THIS_MODULE, 457 .cra_module = THIS_MODULE,
455 .cra_list = LIST_HEAD_INIT(alg.cra_list), 458 .cra_list = LIST_HEAD_INIT(alg.cra_list),
456 .cra_u = { .cipher = { 459 .cra_u = { .cipher = {
diff --git a/crypto/cast5.c b/crypto/cast5.c
index bc42f42b4fe3..8834c8580c04 100644
--- a/crypto/cast5.c
+++ b/crypto/cast5.c
@@ -21,11 +21,13 @@
21*/ 21*/
22 22
23 23
24#include <asm/byteorder.h>
24#include <linux/init.h> 25#include <linux/init.h>
25#include <linux/crypto.h> 26#include <linux/crypto.h>
26#include <linux/module.h> 27#include <linux/module.h>
27#include <linux/errno.h> 28#include <linux/errno.h>
28#include <linux/string.h> 29#include <linux/string.h>
30#include <linux/types.h>
29 31
30#define CAST5_BLOCK_SIZE 8 32#define CAST5_BLOCK_SIZE 8
31#define CAST5_MIN_KEY_SIZE 5 33#define CAST5_MIN_KEY_SIZE 5
@@ -578,6 +580,8 @@ static const u32 sb8[256] = {
578static void cast5_encrypt(void *ctx, u8 * outbuf, const u8 * inbuf) 580static void cast5_encrypt(void *ctx, u8 * outbuf, const u8 * inbuf)
579{ 581{
580 struct cast5_ctx *c = (struct cast5_ctx *) ctx; 582 struct cast5_ctx *c = (struct cast5_ctx *) ctx;
583 const __be32 *src = (const __be32 *)inbuf;
584 __be32 *dst = (__be32 *)outbuf;
581 u32 l, r, t; 585 u32 l, r, t;
582 u32 I; /* used by the Fx macros */ 586 u32 I; /* used by the Fx macros */
583 u32 *Km; 587 u32 *Km;
@@ -589,8 +593,8 @@ static void cast5_encrypt(void *ctx, u8 * outbuf, const u8 * inbuf)
589 /* (L0,R0) <-- (m1...m64). (Split the plaintext into left and 593 /* (L0,R0) <-- (m1...m64). (Split the plaintext into left and
590 * right 32-bit halves L0 = m1...m32 and R0 = m33...m64.) 594 * right 32-bit halves L0 = m1...m32 and R0 = m33...m64.)
591 */ 595 */
592 l = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3]; 596 l = be32_to_cpu(src[0]);
593 r = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7]; 597 r = be32_to_cpu(src[1]);
594 598
595 /* (16 rounds) for i from 1 to 16, compute Li and Ri as follows: 599 /* (16 rounds) for i from 1 to 16, compute Li and Ri as follows:
596 * Li = Ri-1; 600 * Li = Ri-1;
@@ -634,19 +638,15 @@ static void cast5_encrypt(void *ctx, u8 * outbuf, const u8 * inbuf)
634 638
635 /* c1...c64 <-- (R16,L16). (Exchange final blocks L16, R16 and 639 /* c1...c64 <-- (R16,L16). (Exchange final blocks L16, R16 and
636 * concatenate to form the ciphertext.) */ 640 * concatenate to form the ciphertext.) */
637 outbuf[0] = (r >> 24) & 0xff; 641 dst[0] = cpu_to_be32(r);
638 outbuf[1] = (r >> 16) & 0xff; 642 dst[1] = cpu_to_be32(l);
639 outbuf[2] = (r >> 8) & 0xff;
640 outbuf[3] = r & 0xff;
641 outbuf[4] = (l >> 24) & 0xff;
642 outbuf[5] = (l >> 16) & 0xff;
643 outbuf[6] = (l >> 8) & 0xff;
644 outbuf[7] = l & 0xff;
645} 643}
646 644
647static void cast5_decrypt(void *ctx, u8 * outbuf, const u8 * inbuf) 645static void cast5_decrypt(void *ctx, u8 * outbuf, const u8 * inbuf)
648{ 646{
649 struct cast5_ctx *c = (struct cast5_ctx *) ctx; 647 struct cast5_ctx *c = (struct cast5_ctx *) ctx;
648 const __be32 *src = (const __be32 *)inbuf;
649 __be32 *dst = (__be32 *)outbuf;
650 u32 l, r, t; 650 u32 l, r, t;
651 u32 I; 651 u32 I;
652 u32 *Km; 652 u32 *Km;
@@ -655,8 +655,8 @@ static void cast5_decrypt(void *ctx, u8 * outbuf, const u8 * inbuf)
655 Km = c->Km; 655 Km = c->Km;
656 Kr = c->Kr; 656 Kr = c->Kr;
657 657
658 l = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3]; 658 l = be32_to_cpu(src[0]);
659 r = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7]; 659 r = be32_to_cpu(src[1]);
660 660
661 if (!(c->rr)) { 661 if (!(c->rr)) {
662 t = l; l = r; r = t ^ F1(r, Km[15], Kr[15]); 662 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)
690 t = l; l = r; r = t ^ F1(r, Km[0], Kr[0]); 690 t = l; l = r; r = t ^ F1(r, Km[0], Kr[0]);
691 } 691 }
692 692
693 outbuf[0] = (r >> 24) & 0xff; 693 dst[0] = cpu_to_be32(r);
694 outbuf[1] = (r >> 16) & 0xff; 694 dst[1] = cpu_to_be32(l);
695 outbuf[2] = (r >> 8) & 0xff;
696 outbuf[3] = r & 0xff;
697 outbuf[4] = (l >> 24) & 0xff;
698 outbuf[5] = (l >> 16) & 0xff;
699 outbuf[6] = (l >> 8) & 0xff;
700 outbuf[7] = l & 0xff;
701} 695}
702 696
703static void key_schedule(u32 * x, u32 * z, u32 * k) 697static 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)
782 u32 x[4]; 776 u32 x[4];
783 u32 z[4]; 777 u32 z[4];
784 u32 k[16]; 778 u32 k[16];
785 u8 p_key[16]; 779 __be32 p_key[4];
786 struct cast5_ctx *c = (struct cast5_ctx *) ctx; 780 struct cast5_ctx *c = (struct cast5_ctx *) ctx;
787 781
788 if (key_len < 5 || key_len > 16) { 782 if (key_len < 5 || key_len > 16) {
@@ -796,12 +790,10 @@ cast5_setkey(void *ctx, const u8 * key, unsigned key_len, u32 * flags)
796 memcpy(p_key, key, key_len); 790 memcpy(p_key, key, key_len);
797 791
798 792
799 x[0] = p_key[0] << 24 | p_key[1] << 16 | p_key[2] << 8 | p_key[3]; 793 x[0] = be32_to_cpu(p_key[0]);
800 x[1] = p_key[4] << 24 | p_key[5] << 16 | p_key[6] << 8 | p_key[7]; 794 x[1] = be32_to_cpu(p_key[1]);
801 x[2] = 795 x[2] = be32_to_cpu(p_key[2]);
802 p_key[8] << 24 | p_key[9] << 16 | p_key[10] << 8 | p_key[11]; 796 x[3] = be32_to_cpu(p_key[3]);
803 x[3] =
804 p_key[12] << 24 | p_key[13] << 16 | p_key[14] << 8 | p_key[15];
805 797
806 key_schedule(x, z, k); 798 key_schedule(x, z, k);
807 for (i = 0; i < 16; i++) 799 for (i = 0; i < 16; i++)
@@ -817,6 +809,7 @@ static struct crypto_alg alg = {
817 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 809 .cra_flags = CRYPTO_ALG_TYPE_CIPHER,
818 .cra_blocksize = CAST5_BLOCK_SIZE, 810 .cra_blocksize = CAST5_BLOCK_SIZE,
819 .cra_ctxsize = sizeof(struct cast5_ctx), 811 .cra_ctxsize = sizeof(struct cast5_ctx),
812 .cra_alignmask = 3,
820 .cra_module = THIS_MODULE, 813 .cra_module = THIS_MODULE,
821 .cra_list = LIST_HEAD_INIT(alg.cra_list), 814 .cra_list = LIST_HEAD_INIT(alg.cra_list),
822 .cra_u = { 815 .cra_u = {
diff --git a/crypto/cast6.c b/crypto/cast6.c
index 3eb081073423..9e28740ba775 100644
--- a/crypto/cast6.c
+++ b/crypto/cast6.c
@@ -18,11 +18,13 @@
18 */ 18 */
19 19
20 20
21#include <asm/byteorder.h>
21#include <linux/init.h> 22#include <linux/init.h>
22#include <linux/crypto.h> 23#include <linux/crypto.h>
23#include <linux/module.h> 24#include <linux/module.h>
24#include <linux/errno.h> 25#include <linux/errno.h>
25#include <linux/string.h> 26#include <linux/string.h>
27#include <linux/types.h>
26 28
27#define CAST6_BLOCK_SIZE 16 29#define CAST6_BLOCK_SIZE 16
28#define CAST6_MIN_KEY_SIZE 16 30#define CAST6_MIN_KEY_SIZE 16
@@ -384,7 +386,7 @@ cast6_setkey(void *ctx, const u8 * in_key, unsigned key_len, u32 * flags)
384{ 386{
385 int i; 387 int i;
386 u32 key[8]; 388 u32 key[8];
387 u8 p_key[32]; /* padded key */ 389 __be32 p_key[8]; /* padded key */
388 struct cast6_ctx *c = (struct cast6_ctx *) ctx; 390 struct cast6_ctx *c = (struct cast6_ctx *) ctx;
389 391
390 if (key_len < 16 || key_len > 32 || key_len % 4 != 0) { 392 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)
395 memset (p_key, 0, 32); 397 memset (p_key, 0, 32);
396 memcpy (p_key, in_key, key_len); 398 memcpy (p_key, in_key, key_len);
397 399
398 key[0] = p_key[0] << 24 | p_key[1] << 16 | p_key[2] << 8 | p_key[3]; /* A */ 400 key[0] = be32_to_cpu(p_key[0]); /* A */
399 key[1] = p_key[4] << 24 | p_key[5] << 16 | p_key[6] << 8 | p_key[7]; /* B */ 401 key[1] = be32_to_cpu(p_key[1]); /* B */
400 key[2] = p_key[8] << 24 | p_key[9] << 16 | p_key[10] << 8 | p_key[11]; /* C */ 402 key[2] = be32_to_cpu(p_key[2]); /* C */
401 key[3] = p_key[12] << 24 | p_key[13] << 16 | p_key[14] << 8 | p_key[15]; /* D */ 403 key[3] = be32_to_cpu(p_key[3]); /* D */
402 key[4] = p_key[16] << 24 | p_key[17] << 16 | p_key[18] << 8 | p_key[19]; /* E */ 404 key[4] = be32_to_cpu(p_key[4]); /* E */
403 key[5] = p_key[20] << 24 | p_key[21] << 16 | p_key[22] << 8 | p_key[23]; /* F */ 405 key[5] = be32_to_cpu(p_key[5]); /* F */
404 key[6] = p_key[24] << 24 | p_key[25] << 16 | p_key[26] << 8 | p_key[27]; /* G */ 406 key[6] = be32_to_cpu(p_key[6]); /* G */
405 key[7] = p_key[28] << 24 | p_key[29] << 16 | p_key[30] << 8 | p_key[31]; /* H */ 407 key[7] = be32_to_cpu(p_key[7]); /* H */
406 408
407 409
408 410
@@ -444,14 +446,16 @@ static inline void QBAR (u32 * block, u8 * Kr, u32 * Km) {
444 446
445static void cast6_encrypt (void * ctx, u8 * outbuf, const u8 * inbuf) { 447static void cast6_encrypt (void * ctx, u8 * outbuf, const u8 * inbuf) {
446 struct cast6_ctx * c = (struct cast6_ctx *)ctx; 448 struct cast6_ctx * c = (struct cast6_ctx *)ctx;
449 const __be32 *src = (const __be32 *)inbuf;
450 __be32 *dst = (__be32 *)outbuf;
447 u32 block[4]; 451 u32 block[4];
448 u32 * Km; 452 u32 * Km;
449 u8 * Kr; 453 u8 * Kr;
450 454
451 block[0] = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3]; 455 block[0] = be32_to_cpu(src[0]);
452 block[1] = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7]; 456 block[1] = be32_to_cpu(src[1]);
453 block[2] = inbuf[8] << 24 | inbuf[9] << 16 | inbuf[10] << 8 | inbuf[11]; 457 block[2] = be32_to_cpu(src[2]);
454 block[3] = inbuf[12] << 24 | inbuf[13] << 16 | inbuf[14] << 8 | inbuf[15]; 458 block[3] = be32_to_cpu(src[3]);
455 459
456 Km = c->Km[0]; Kr = c->Kr[0]; Q (block, Kr, Km); 460 Km = c->Km[0]; Kr = c->Kr[0]; Q (block, Kr, Km);
457 Km = c->Km[1]; Kr = c->Kr[1]; Q (block, Kr, Km); 461 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) {
465 Km = c->Km[9]; Kr = c->Kr[9]; QBAR (block, Kr, Km); 469 Km = c->Km[9]; Kr = c->Kr[9]; QBAR (block, Kr, Km);
466 Km = c->Km[10]; Kr = c->Kr[10]; QBAR (block, Kr, Km); 470 Km = c->Km[10]; Kr = c->Kr[10]; QBAR (block, Kr, Km);
467 Km = c->Km[11]; Kr = c->Kr[11]; QBAR (block, Kr, Km); 471 Km = c->Km[11]; Kr = c->Kr[11]; QBAR (block, Kr, Km);
468 472
469 outbuf[0] = (block[0] >> 24) & 0xff; 473 dst[0] = cpu_to_be32(block[0]);
470 outbuf[1] = (block[0] >> 16) & 0xff; 474 dst[1] = cpu_to_be32(block[1]);
471 outbuf[2] = (block[0] >> 8) & 0xff; 475 dst[2] = cpu_to_be32(block[2]);
472 outbuf[3] = block[0] & 0xff; 476 dst[3] = cpu_to_be32(block[3]);
473 outbuf[4] = (block[1] >> 24) & 0xff;
474 outbuf[5] = (block[1] >> 16) & 0xff;
475 outbuf[6] = (block[1] >> 8) & 0xff;
476 outbuf[7] = block[1] & 0xff;
477 outbuf[8] = (block[2] >> 24) & 0xff;
478 outbuf[9] = (block[2] >> 16) & 0xff;
479 outbuf[10] = (block[2] >> 8) & 0xff;
480 outbuf[11] = block[2] & 0xff;
481 outbuf[12] = (block[3] >> 24) & 0xff;
482 outbuf[13] = (block[3] >> 16) & 0xff;
483 outbuf[14] = (block[3] >> 8) & 0xff;
484 outbuf[15] = block[3] & 0xff;
485} 477}
486 478
487static void cast6_decrypt (void * ctx, u8 * outbuf, const u8 * inbuf) { 479static void cast6_decrypt (void * ctx, u8 * outbuf, const u8 * inbuf) {
488 struct cast6_ctx * c = (struct cast6_ctx *)ctx; 480 struct cast6_ctx * c = (struct cast6_ctx *)ctx;
481 const __be32 *src = (const __be32 *)inbuf;
482 __be32 *dst = (__be32 *)outbuf;
489 u32 block[4]; 483 u32 block[4];
490 u32 * Km; 484 u32 * Km;
491 u8 * Kr; 485 u8 * Kr;
492 486
493 block[0] = inbuf[0] << 24 | inbuf[1] << 16 | inbuf[2] << 8 | inbuf[3]; 487 block[0] = be32_to_cpu(src[0]);
494 block[1] = inbuf[4] << 24 | inbuf[5] << 16 | inbuf[6] << 8 | inbuf[7]; 488 block[1] = be32_to_cpu(src[1]);
495 block[2] = inbuf[8] << 24 | inbuf[9] << 16 | inbuf[10] << 8 | inbuf[11]; 489 block[2] = be32_to_cpu(src[2]);
496 block[3] = inbuf[12] << 24 | inbuf[13] << 16 | inbuf[14] << 8 | inbuf[15]; 490 block[3] = be32_to_cpu(src[3]);
497 491
498 Km = c->Km[11]; Kr = c->Kr[11]; Q (block, Kr, Km); 492 Km = c->Km[11]; Kr = c->Kr[11]; Q (block, Kr, Km);
499 Km = c->Km[10]; Kr = c->Kr[10]; Q (block, Kr, Km); 493 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) {
508 Km = c->Km[1]; Kr = c->Kr[1]; QBAR (block, Kr, Km); 502 Km = c->Km[1]; Kr = c->Kr[1]; QBAR (block, Kr, Km);
509 Km = c->Km[0]; Kr = c->Kr[0]; QBAR (block, Kr, Km); 503 Km = c->Km[0]; Kr = c->Kr[0]; QBAR (block, Kr, Km);
510 504
511 outbuf[0] = (block[0] >> 24) & 0xff; 505 dst[0] = cpu_to_be32(block[0]);
512 outbuf[1] = (block[0] >> 16) & 0xff; 506 dst[1] = cpu_to_be32(block[1]);
513 outbuf[2] = (block[0] >> 8) & 0xff; 507 dst[2] = cpu_to_be32(block[2]);
514 outbuf[3] = block[0] & 0xff; 508 dst[3] = cpu_to_be32(block[3]);
515 outbuf[4] = (block[1] >> 24) & 0xff;
516 outbuf[5] = (block[1] >> 16) & 0xff;
517 outbuf[6] = (block[1] >> 8) & 0xff;
518 outbuf[7] = block[1] & 0xff;
519 outbuf[8] = (block[2] >> 24) & 0xff;
520 outbuf[9] = (block[2] >> 16) & 0xff;
521 outbuf[10] = (block[2] >> 8) & 0xff;
522 outbuf[11] = block[2] & 0xff;
523 outbuf[12] = (block[3] >> 24) & 0xff;
524 outbuf[13] = (block[3] >> 16) & 0xff;
525 outbuf[14] = (block[3] >> 8) & 0xff;
526 outbuf[15] = block[3] & 0xff;
527} 509}
528 510
529static struct crypto_alg alg = { 511static struct crypto_alg alg = {
@@ -531,6 +513,7 @@ static struct crypto_alg alg = {
531 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 513 .cra_flags = CRYPTO_ALG_TYPE_CIPHER,
532 .cra_blocksize = CAST6_BLOCK_SIZE, 514 .cra_blocksize = CAST6_BLOCK_SIZE,
533 .cra_ctxsize = sizeof(struct cast6_ctx), 515 .cra_ctxsize = sizeof(struct cast6_ctx),
516 .cra_alignmask = 3,
534 .cra_module = THIS_MODULE, 517 .cra_module = THIS_MODULE,
535 .cra_list = LIST_HEAD_INIT(alg.cra_list), 518 .cra_list = LIST_HEAD_INIT(alg.cra_list),
536 .cra_u = { 519 .cra_u = {
diff --git a/crypto/cipher.c b/crypto/cipher.c
index dfd4bcfc5975..65bcea0cd17c 100644
--- a/crypto/cipher.c
+++ b/crypto/cipher.c
@@ -212,9 +212,10 @@ static unsigned int cbc_process_decrypt(const struct cipher_desc *desc,
212 struct crypto_tfm *tfm = desc->tfm; 212 struct crypto_tfm *tfm = desc->tfm;
213 void (*xor)(u8 *, const u8 *) = tfm->crt_u.cipher.cit_xor_block; 213 void (*xor)(u8 *, const u8 *) = tfm->crt_u.cipher.cit_xor_block;
214 int bsize = crypto_tfm_alg_blocksize(tfm); 214 int bsize = crypto_tfm_alg_blocksize(tfm);
215 unsigned long alignmask = crypto_tfm_alg_alignmask(desc->tfm);
215 216
216 u8 stack[src == dst ? bsize : 0]; 217 u8 stack[src == dst ? bsize + alignmask : 0];
217 u8 *buf = stack; 218 u8 *buf = (u8 *)ALIGN((unsigned long)stack, alignmask + 1);
218 u8 **dst_p = src == dst ? &buf : &dst; 219 u8 **dst_p = src == dst ? &buf : &dst;
219 220
220 void (*fn)(void *, u8 *, const u8 *) = desc->crfn; 221 void (*fn)(void *, u8 *, const u8 *) = desc->crfn;
diff --git a/crypto/crc32c.c b/crypto/crc32c.c
index 256956cd9377..953362423a5c 100644
--- a/crypto/crc32c.c
+++ b/crypto/crc32c.c
@@ -16,6 +16,7 @@
16#include <linux/string.h> 16#include <linux/string.h>
17#include <linux/crypto.h> 17#include <linux/crypto.h>
18#include <linux/crc32c.h> 18#include <linux/crc32c.h>
19#include <linux/types.h>
19#include <asm/byteorder.h> 20#include <asm/byteorder.h>
20 21
21#define CHKSUM_BLOCK_SIZE 32 22#define CHKSUM_BLOCK_SIZE 32
diff --git a/crypto/des.c b/crypto/des.c
index a3c863dddded..7bb548653dc6 100644
--- a/crypto/des.c
+++ b/crypto/des.c
@@ -12,11 +12,13 @@
12 * 12 *
13 */ 13 */
14 14
15#include <asm/byteorder.h>
15#include <linux/bitops.h> 16#include <linux/bitops.h>
16#include <linux/init.h> 17#include <linux/init.h>
17#include <linux/module.h> 18#include <linux/module.h>
18#include <linux/errno.h> 19#include <linux/errno.h>
19#include <linux/crypto.h> 20#include <linux/crypto.h>
21#include <linux/types.h>
20 22
21#define DES_KEY_SIZE 8 23#define DES_KEY_SIZE 8
22#define DES_EXPKEY_WORDS 32 24#define DES_EXPKEY_WORDS 32
@@ -947,6 +949,7 @@ static struct crypto_alg des_alg = {
947 .cra_blocksize = DES_BLOCK_SIZE, 949 .cra_blocksize = DES_BLOCK_SIZE,
948 .cra_ctxsize = sizeof(struct des_ctx), 950 .cra_ctxsize = sizeof(struct des_ctx),
949 .cra_module = THIS_MODULE, 951 .cra_module = THIS_MODULE,
952 .cra_alignmask = 3,
950 .cra_list = LIST_HEAD_INIT(des_alg.cra_list), 953 .cra_list = LIST_HEAD_INIT(des_alg.cra_list),
951 .cra_u = { .cipher = { 954 .cra_u = { .cipher = {
952 .cia_min_keysize = DES_KEY_SIZE, 955 .cia_min_keysize = DES_KEY_SIZE,
diff --git a/crypto/internal.h b/crypto/internal.h
index 37aa652ce5ce..959e602909a6 100644
--- a/crypto/internal.h
+++ b/crypto/internal.h
@@ -2,6 +2,7 @@
2 * Cryptographic API. 2 * Cryptographic API.
3 * 3 *
4 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> 4 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
5 * Copyright (c) 2005 Herbert Xu <herbert@gondor.apana.org.au>
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify it 7 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free 8 * under the terms of the GNU General Public License as published by the Free
@@ -16,10 +17,15 @@
16#include <linux/highmem.h> 17#include <linux/highmem.h>
17#include <linux/interrupt.h> 18#include <linux/interrupt.h>
18#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/list.h>
19#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/rwsem.h>
20#include <linux/slab.h> 23#include <linux/slab.h>
21#include <asm/kmap_types.h> 24#include <asm/kmap_types.h>
22 25
26extern struct list_head crypto_alg_list;
27extern struct rw_semaphore crypto_alg_sem;
28
23extern enum km_type crypto_km_types[]; 29extern enum km_type crypto_km_types[];
24 30
25static inline enum km_type crypto_kmap_type(int out) 31static inline enum km_type crypto_kmap_type(int out)
diff --git a/crypto/khazad.c b/crypto/khazad.c
index 738cb0dd1e7c..807f2bf4ea24 100644
--- a/crypto/khazad.c
+++ b/crypto/khazad.c
@@ -22,8 +22,10 @@
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <asm/byteorder.h>
25#include <asm/scatterlist.h> 26#include <asm/scatterlist.h>
26#include <linux/crypto.h> 27#include <linux/crypto.h>
28#include <linux/types.h>
27 29
28#define KHAZAD_KEY_SIZE 16 30#define KHAZAD_KEY_SIZE 16
29#define KHAZAD_BLOCK_SIZE 8 31#define KHAZAD_BLOCK_SIZE 8
@@ -755,8 +757,8 @@ static const u64 c[KHAZAD_ROUNDS + 1] = {
755static int khazad_setkey(void *ctx_arg, const u8 *in_key, 757static int khazad_setkey(void *ctx_arg, const u8 *in_key,
756 unsigned int key_len, u32 *flags) 758 unsigned int key_len, u32 *flags)
757{ 759{
758
759 struct khazad_ctx *ctx = ctx_arg; 760 struct khazad_ctx *ctx = ctx_arg;
761 const __be64 *key = (const __be64 *)in_key;
760 int r; 762 int r;
761 const u64 *S = T7; 763 const u64 *S = T7;
762 u64 K2, K1; 764 u64 K2, K1;
@@ -767,22 +769,8 @@ static int khazad_setkey(void *ctx_arg, const u8 *in_key,
767 return -EINVAL; 769 return -EINVAL;
768 } 770 }
769 771
770 K2 = ((u64)in_key[ 0] << 56) ^ 772 K2 = be64_to_cpu(key[0]);
771 ((u64)in_key[ 1] << 48) ^ 773 K1 = be64_to_cpu(key[1]);
772 ((u64)in_key[ 2] << 40) ^
773 ((u64)in_key[ 3] << 32) ^
774 ((u64)in_key[ 4] << 24) ^
775 ((u64)in_key[ 5] << 16) ^
776 ((u64)in_key[ 6] << 8) ^
777 ((u64)in_key[ 7] );
778 K1 = ((u64)in_key[ 8] << 56) ^
779 ((u64)in_key[ 9] << 48) ^
780 ((u64)in_key[10] << 40) ^
781 ((u64)in_key[11] << 32) ^
782 ((u64)in_key[12] << 24) ^
783 ((u64)in_key[13] << 16) ^
784 ((u64)in_key[14] << 8) ^
785 ((u64)in_key[15] );
786 774
787 /* setup the encrypt key */ 775 /* setup the encrypt key */
788 for (r = 0; r <= KHAZAD_ROUNDS; r++) { 776 for (r = 0; r <= KHAZAD_ROUNDS; r++) {
@@ -820,19 +808,12 @@ static int khazad_setkey(void *ctx_arg, const u8 *in_key,
820static void khazad_crypt(const u64 roundKey[KHAZAD_ROUNDS + 1], 808static void khazad_crypt(const u64 roundKey[KHAZAD_ROUNDS + 1],
821 u8 *ciphertext, const u8 *plaintext) 809 u8 *ciphertext, const u8 *plaintext)
822{ 810{
823 811 const __be64 *src = (const __be64 *)plaintext;
812 __be64 *dst = (__be64 *)ciphertext;
824 int r; 813 int r;
825 u64 state; 814 u64 state;
826 815
827 state = ((u64)plaintext[0] << 56) ^ 816 state = be64_to_cpu(*src) ^ roundKey[0];
828 ((u64)plaintext[1] << 48) ^
829 ((u64)plaintext[2] << 40) ^
830 ((u64)plaintext[3] << 32) ^
831 ((u64)plaintext[4] << 24) ^
832 ((u64)plaintext[5] << 16) ^
833 ((u64)plaintext[6] << 8) ^
834 ((u64)plaintext[7] ) ^
835 roundKey[0];
836 817
837 for (r = 1; r < KHAZAD_ROUNDS; r++) { 818 for (r = 1; r < KHAZAD_ROUNDS; r++) {
838 state = T0[(int)(state >> 56) ] ^ 819 state = T0[(int)(state >> 56) ] ^
@@ -856,15 +837,7 @@ static void khazad_crypt(const u64 roundKey[KHAZAD_ROUNDS + 1],
856 (T7[(int)(state ) & 0xff] & 0x00000000000000ffULL) ^ 837 (T7[(int)(state ) & 0xff] & 0x00000000000000ffULL) ^
857 roundKey[KHAZAD_ROUNDS]; 838 roundKey[KHAZAD_ROUNDS];
858 839
859 ciphertext[0] = (u8)(state >> 56); 840 *dst = cpu_to_be64(state);
860 ciphertext[1] = (u8)(state >> 48);
861 ciphertext[2] = (u8)(state >> 40);
862 ciphertext[3] = (u8)(state >> 32);
863 ciphertext[4] = (u8)(state >> 24);
864 ciphertext[5] = (u8)(state >> 16);
865 ciphertext[6] = (u8)(state >> 8);
866 ciphertext[7] = (u8)(state );
867
868} 841}
869 842
870static void khazad_encrypt(void *ctx_arg, u8 *dst, const u8 *src) 843static void khazad_encrypt(void *ctx_arg, u8 *dst, const u8 *src)
@@ -884,6 +857,7 @@ static struct crypto_alg khazad_alg = {
884 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 857 .cra_flags = CRYPTO_ALG_TYPE_CIPHER,
885 .cra_blocksize = KHAZAD_BLOCK_SIZE, 858 .cra_blocksize = KHAZAD_BLOCK_SIZE,
886 .cra_ctxsize = sizeof (struct khazad_ctx), 859 .cra_ctxsize = sizeof (struct khazad_ctx),
860 .cra_alignmask = 7,
887 .cra_module = THIS_MODULE, 861 .cra_module = THIS_MODULE,
888 .cra_list = LIST_HEAD_INIT(khazad_alg.cra_list), 862 .cra_list = LIST_HEAD_INIT(khazad_alg.cra_list),
889 .cra_u = { .cipher = { 863 .cra_u = { .cipher = {
diff --git a/crypto/md4.c b/crypto/md4.c
index bef6a9e5ac9b..a2d6df5c0f8c 100644
--- a/crypto/md4.c
+++ b/crypto/md4.c
@@ -24,6 +24,7 @@
24#include <linux/crypto.h> 24#include <linux/crypto.h>
25#include <linux/kernel.h> 25#include <linux/kernel.h>
26#include <linux/string.h> 26#include <linux/string.h>
27#include <linux/types.h>
27#include <asm/byteorder.h> 28#include <asm/byteorder.h>
28 29
29#define MD4_DIGEST_SIZE 16 30#define MD4_DIGEST_SIZE 16
diff --git a/crypto/md5.c b/crypto/md5.c
index 1ed45f9c263e..7f041aef5da2 100644
--- a/crypto/md5.c
+++ b/crypto/md5.c
@@ -19,6 +19,7 @@
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/string.h> 20#include <linux/string.h>
21#include <linux/crypto.h> 21#include <linux/crypto.h>
22#include <linux/types.h>
22#include <asm/byteorder.h> 23#include <asm/byteorder.h>
23 24
24#define MD5_DIGEST_SIZE 16 25#define MD5_DIGEST_SIZE 16
diff --git a/crypto/michael_mic.c b/crypto/michael_mic.c
index a470bcb3693e..4f6ab23e14ad 100644
--- a/crypto/michael_mic.c
+++ b/crypto/michael_mic.c
@@ -10,10 +10,12 @@
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 */ 11 */
12 12
13#include <asm/byteorder.h>
13#include <linux/init.h> 14#include <linux/init.h>
14#include <linux/module.h> 15#include <linux/module.h>
15#include <linux/string.h> 16#include <linux/string.h>
16#include <linux/crypto.h> 17#include <linux/crypto.h>
18#include <linux/types.h>
17 19
18 20
19struct michael_mic_ctx { 21struct michael_mic_ctx {
@@ -43,21 +45,6 @@ do { \
43} while (0) 45} while (0)
44 46
45 47
46static inline u32 get_le32(const u8 *p)
47{
48 return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
49}
50
51
52static inline void put_le32(u8 *p, u32 v)
53{
54 p[0] = v;
55 p[1] = v >> 8;
56 p[2] = v >> 16;
57 p[3] = v >> 24;
58}
59
60
61static void michael_init(void *ctx) 48static void michael_init(void *ctx)
62{ 49{
63 struct michael_mic_ctx *mctx = ctx; 50 struct michael_mic_ctx *mctx = ctx;
@@ -68,6 +55,7 @@ static void michael_init(void *ctx)
68static void michael_update(void *ctx, const u8 *data, unsigned int len) 55static void michael_update(void *ctx, const u8 *data, unsigned int len)
69{ 56{
70 struct michael_mic_ctx *mctx = ctx; 57 struct michael_mic_ctx *mctx = ctx;
58 const __le32 *src;
71 59
72 if (mctx->pending_len) { 60 if (mctx->pending_len) {
73 int flen = 4 - mctx->pending_len; 61 int flen = 4 - mctx->pending_len;
@@ -81,21 +69,23 @@ static void michael_update(void *ctx, const u8 *data, unsigned int len)
81 if (mctx->pending_len < 4) 69 if (mctx->pending_len < 4)
82 return; 70 return;
83 71
84 mctx->l ^= get_le32(mctx->pending); 72 src = (const __le32 *)mctx->pending;
73 mctx->l ^= le32_to_cpup(src);
85 michael_block(mctx->l, mctx->r); 74 michael_block(mctx->l, mctx->r);
86 mctx->pending_len = 0; 75 mctx->pending_len = 0;
87 } 76 }
88 77
78 src = (const __le32 *)data;
79
89 while (len >= 4) { 80 while (len >= 4) {
90 mctx->l ^= get_le32(data); 81 mctx->l ^= le32_to_cpup(src++);
91 michael_block(mctx->l, mctx->r); 82 michael_block(mctx->l, mctx->r);
92 data += 4;
93 len -= 4; 83 len -= 4;
94 } 84 }
95 85
96 if (len > 0) { 86 if (len > 0) {
97 mctx->pending_len = len; 87 mctx->pending_len = len;
98 memcpy(mctx->pending, data, len); 88 memcpy(mctx->pending, src, len);
99 } 89 }
100} 90}
101 91
@@ -104,6 +94,7 @@ static void michael_final(void *ctx, u8 *out)
104{ 94{
105 struct michael_mic_ctx *mctx = ctx; 95 struct michael_mic_ctx *mctx = ctx;
106 u8 *data = mctx->pending; 96 u8 *data = mctx->pending;
97 __le32 *dst = (__le32 *)out;
107 98
108 /* Last block and padding (0x5a, 4..7 x 0) */ 99 /* Last block and padding (0x5a, 4..7 x 0) */
109 switch (mctx->pending_len) { 100 switch (mctx->pending_len) {
@@ -125,8 +116,8 @@ static void michael_final(void *ctx, u8 *out)
125 /* l ^= 0; */ 116 /* l ^= 0; */
126 michael_block(mctx->l, mctx->r); 117 michael_block(mctx->l, mctx->r);
127 118
128 put_le32(out, mctx->l); 119 dst[0] = cpu_to_le32(mctx->l);
129 put_le32(out + 4, mctx->r); 120 dst[1] = cpu_to_le32(mctx->r);
130} 121}
131 122
132 123
@@ -134,13 +125,16 @@ static int michael_setkey(void *ctx, const u8 *key, unsigned int keylen,
134 u32 *flags) 125 u32 *flags)
135{ 126{
136 struct michael_mic_ctx *mctx = ctx; 127 struct michael_mic_ctx *mctx = ctx;
128 const __le32 *data = (const __le32 *)key;
129
137 if (keylen != 8) { 130 if (keylen != 8) {
138 if (flags) 131 if (flags)
139 *flags = CRYPTO_TFM_RES_BAD_KEY_LEN; 132 *flags = CRYPTO_TFM_RES_BAD_KEY_LEN;
140 return -EINVAL; 133 return -EINVAL;
141 } 134 }
142 mctx->l = get_le32(key); 135
143 mctx->r = get_le32(key + 4); 136 mctx->l = le32_to_cpu(data[0]);
137 mctx->r = le32_to_cpu(data[1]);
144 return 0; 138 return 0;
145} 139}
146 140
diff --git a/crypto/proc.c b/crypto/proc.c
index 630ba91c08f1..c0a5dd7ce2cc 100644
--- a/crypto/proc.c
+++ b/crypto/proc.c
@@ -4,6 +4,7 @@
4 * Procfs information. 4 * Procfs information.
5 * 5 *
6 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> 6 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
7 * Copyright (c) 2005 Herbert Xu <herbert@gondor.apana.org.au>
7 * 8 *
8 * This program is free software; you can redistribute it and/or modify it 9 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the Free 10 * under the terms of the GNU General Public License as published by the Free
@@ -18,9 +19,6 @@
18#include <linux/seq_file.h> 19#include <linux/seq_file.h>
19#include "internal.h" 20#include "internal.h"
20 21
21extern struct list_head crypto_alg_list;
22extern struct rw_semaphore crypto_alg_sem;
23
24static void *c_start(struct seq_file *m, loff_t *pos) 22static void *c_start(struct seq_file *m, loff_t *pos)
25{ 23{
26 struct list_head *v; 24 struct list_head *v;
@@ -53,7 +51,9 @@ static int c_show(struct seq_file *m, void *p)
53 struct crypto_alg *alg = (struct crypto_alg *)p; 51 struct crypto_alg *alg = (struct crypto_alg *)p;
54 52
55 seq_printf(m, "name : %s\n", alg->cra_name); 53 seq_printf(m, "name : %s\n", alg->cra_name);
54 seq_printf(m, "driver : %s\n", alg->cra_driver_name);
56 seq_printf(m, "module : %s\n", module_name(alg->cra_module)); 55 seq_printf(m, "module : %s\n", module_name(alg->cra_module));
56 seq_printf(m, "priority : %d\n", alg->cra_priority);
57 57
58 switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) { 58 switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) {
59 case CRYPTO_ALG_TYPE_CIPHER: 59 case CRYPTO_ALG_TYPE_CIPHER:
diff --git a/crypto/serpent.c b/crypto/serpent.c
index 3cf2c5067eea..52ad1a492620 100644
--- a/crypto/serpent.c
+++ b/crypto/serpent.c
@@ -20,6 +20,7 @@
20#include <linux/errno.h> 20#include <linux/errno.h>
21#include <asm/byteorder.h> 21#include <asm/byteorder.h>
22#include <linux/crypto.h> 22#include <linux/crypto.h>
23#include <linux/types.h>
23 24
24/* Key is padded to the maximum of 256 bits before round key generation. 25/* Key is padded to the maximum of 256 bits before round key generation.
25 * Any key length <= 256 bits (32 bytes) is allowed by the algorithm. 26 * Any key length <= 256 bits (32 bytes) is allowed by the algorithm.
@@ -552,6 +553,7 @@ static struct crypto_alg tnepres_alg = {
552 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 553 .cra_flags = CRYPTO_ALG_TYPE_CIPHER,
553 .cra_blocksize = SERPENT_BLOCK_SIZE, 554 .cra_blocksize = SERPENT_BLOCK_SIZE,
554 .cra_ctxsize = sizeof(struct serpent_ctx), 555 .cra_ctxsize = sizeof(struct serpent_ctx),
556 .cra_alignmask = 3,
555 .cra_module = THIS_MODULE, 557 .cra_module = THIS_MODULE,
556 .cra_list = LIST_HEAD_INIT(serpent_alg.cra_list), 558 .cra_list = LIST_HEAD_INIT(serpent_alg.cra_list),
557 .cra_u = { .cipher = { 559 .cra_u = { .cipher = {
diff --git a/crypto/sha1.c b/crypto/sha1.c
index 4016f3b8ce9b..21571ed35b7e 100644
--- a/crypto/sha1.c
+++ b/crypto/sha1.c
@@ -21,6 +21,7 @@
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <linux/crypto.h> 22#include <linux/crypto.h>
23#include <linux/cryptohash.h> 23#include <linux/cryptohash.h>
24#include <linux/types.h>
24#include <asm/scatterlist.h> 25#include <asm/scatterlist.h>
25#include <asm/byteorder.h> 26#include <asm/byteorder.h>
26 27
@@ -48,23 +49,33 @@ static void sha1_init(void *ctx)
48static void sha1_update(void *ctx, const u8 *data, unsigned int len) 49static void sha1_update(void *ctx, const u8 *data, unsigned int len)
49{ 50{
50 struct sha1_ctx *sctx = ctx; 51 struct sha1_ctx *sctx = ctx;
51 unsigned int i, j; 52 unsigned int partial, done;
52 u32 temp[SHA_WORKSPACE_WORDS]; 53 const u8 *src;
53 54
54 j = (sctx->count >> 3) & 0x3f; 55 partial = sctx->count & 0x3f;
55 sctx->count += len << 3; 56 sctx->count += len;
57 done = 0;
58 src = data;
56 59
57 if ((j + len) > 63) { 60 if ((partial + len) > 63) {
58 memcpy(&sctx->buffer[j], data, (i = 64-j)); 61 u32 temp[SHA_WORKSPACE_WORDS];
59 sha_transform(sctx->state, sctx->buffer, temp); 62
60 for ( ; i + 63 < len; i += 64) { 63 if (partial) {
61 sha_transform(sctx->state, &data[i], temp); 64 done = -partial;
65 memcpy(sctx->buffer + partial, data, done + 64);
66 src = sctx->buffer;
62 } 67 }
63 j = 0; 68
69 do {
70 sha_transform(sctx->state, src, temp);
71 done += 64;
72 src = data + done;
73 } while (done + 63 < len);
74
75 memset(temp, 0, sizeof(temp));
76 partial = 0;
64 } 77 }
65 else i = 0; 78 memcpy(sctx->buffer + partial, src, len - done);
66 memset(temp, 0, sizeof(temp));
67 memcpy(&sctx->buffer[j], &data[i], len - i);
68} 79}
69 80
70 81
@@ -72,37 +83,24 @@ static void sha1_update(void *ctx, const u8 *data, unsigned int len)
72static void sha1_final(void* ctx, u8 *out) 83static void sha1_final(void* ctx, u8 *out)
73{ 84{
74 struct sha1_ctx *sctx = ctx; 85 struct sha1_ctx *sctx = ctx;
75 u32 i, j, index, padlen; 86 __be32 *dst = (__be32 *)out;
76 u64 t; 87 u32 i, index, padlen;
77 u8 bits[8] = { 0, }; 88 __be64 bits;
78 static const u8 padding[64] = { 0x80, }; 89 static const u8 padding[64] = { 0x80, };
79 90
80 t = sctx->count; 91 bits = cpu_to_be64(sctx->count << 3);
81 bits[7] = 0xff & t; t>>=8;
82 bits[6] = 0xff & t; t>>=8;
83 bits[5] = 0xff & t; t>>=8;
84 bits[4] = 0xff & t; t>>=8;
85 bits[3] = 0xff & t; t>>=8;
86 bits[2] = 0xff & t; t>>=8;
87 bits[1] = 0xff & t; t>>=8;
88 bits[0] = 0xff & t;
89 92
90 /* Pad out to 56 mod 64 */ 93 /* Pad out to 56 mod 64 */
91 index = (sctx->count >> 3) & 0x3f; 94 index = sctx->count & 0x3f;
92 padlen = (index < 56) ? (56 - index) : ((64+56) - index); 95 padlen = (index < 56) ? (56 - index) : ((64+56) - index);
93 sha1_update(sctx, padding, padlen); 96 sha1_update(sctx, padding, padlen);
94 97
95 /* Append length */ 98 /* Append length */
96 sha1_update(sctx, bits, sizeof bits); 99 sha1_update(sctx, (const u8 *)&bits, sizeof(bits));
97 100
98 /* Store state in digest */ 101 /* Store state in digest */
99 for (i = j = 0; i < 5; i++, j += 4) { 102 for (i = 0; i < 5; i++)
100 u32 t2 = sctx->state[i]; 103 dst[i] = cpu_to_be32(sctx->state[i]);
101 out[j+3] = t2 & 0xff; t2>>=8;
102 out[j+2] = t2 & 0xff; t2>>=8;
103 out[j+1] = t2 & 0xff; t2>>=8;
104 out[j ] = t2 & 0xff;
105 }
106 104
107 /* Wipe context */ 105 /* Wipe context */
108 memset(sctx, 0, sizeof *sctx); 106 memset(sctx, 0, sizeof *sctx);
diff --git a/crypto/sha256.c b/crypto/sha256.c
index c78da50a9b7a..9d5ef674d6a9 100644
--- a/crypto/sha256.c
+++ b/crypto/sha256.c
@@ -20,6 +20,7 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <linux/crypto.h> 22#include <linux/crypto.h>
23#include <linux/types.h>
23#include <asm/scatterlist.h> 24#include <asm/scatterlist.h>
24#include <asm/byteorder.h> 25#include <asm/byteorder.h>
25 26
@@ -279,22 +280,15 @@ static void sha256_update(void *ctx, const u8 *data, unsigned int len)
279static void sha256_final(void* ctx, u8 *out) 280static void sha256_final(void* ctx, u8 *out)
280{ 281{
281 struct sha256_ctx *sctx = ctx; 282 struct sha256_ctx *sctx = ctx;
282 u8 bits[8]; 283 __be32 *dst = (__be32 *)out;
283 unsigned int index, pad_len, t; 284 __be32 bits[2];
284 int i, j; 285 unsigned int index, pad_len;
286 int i;
285 static const u8 padding[64] = { 0x80, }; 287 static const u8 padding[64] = { 0x80, };
286 288
287 /* Save number of bits */ 289 /* Save number of bits */
288 t = sctx->count[0]; 290 bits[1] = cpu_to_be32(sctx->count[0]);
289 bits[7] = t; t >>= 8; 291 bits[0] = cpu_to_be32(sctx->count[1]);
290 bits[6] = t; t >>= 8;
291 bits[5] = t; t >>= 8;
292 bits[4] = t;
293 t = sctx->count[1];
294 bits[3] = t; t >>= 8;
295 bits[2] = t; t >>= 8;
296 bits[1] = t; t >>= 8;
297 bits[0] = t;
298 292
299 /* Pad out to 56 mod 64. */ 293 /* Pad out to 56 mod 64. */
300 index = (sctx->count[0] >> 3) & 0x3f; 294 index = (sctx->count[0] >> 3) & 0x3f;
@@ -302,16 +296,11 @@ static void sha256_final(void* ctx, u8 *out)
302 sha256_update(sctx, padding, pad_len); 296 sha256_update(sctx, padding, pad_len);
303 297
304 /* Append length (before padding) */ 298 /* Append length (before padding) */
305 sha256_update(sctx, bits, 8); 299 sha256_update(sctx, (const u8 *)bits, sizeof(bits));
306 300
307 /* Store state in digest */ 301 /* Store state in digest */
308 for (i = j = 0; i < 8; i++, j += 4) { 302 for (i = 0; i < 8; i++)
309 t = sctx->state[i]; 303 dst[i] = cpu_to_be32(sctx->state[i]);
310 out[j+3] = t; t >>= 8;
311 out[j+2] = t; t >>= 8;
312 out[j+1] = t; t >>= 8;
313 out[j ] = t;
314 }
315 304
316 /* Zeroize sensitive information. */ 305 /* Zeroize sensitive information. */
317 memset(sctx, 0, sizeof(*sctx)); 306 memset(sctx, 0, sizeof(*sctx));
diff --git a/crypto/sha512.c b/crypto/sha512.c
index c663438322e9..3e6e9392310c 100644
--- a/crypto/sha512.c
+++ b/crypto/sha512.c
@@ -17,6 +17,7 @@
17#include <linux/mm.h> 17#include <linux/mm.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/crypto.h> 19#include <linux/crypto.h>
20#include <linux/types.h>
20 21
21#include <asm/scatterlist.h> 22#include <asm/scatterlist.h>
22#include <asm/byteorder.h> 23#include <asm/byteorder.h>
@@ -235,39 +236,17 @@ static void
235sha512_final(void *ctx, u8 *hash) 236sha512_final(void *ctx, u8 *hash)
236{ 237{
237 struct sha512_ctx *sctx = ctx; 238 struct sha512_ctx *sctx = ctx;
238
239 static u8 padding[128] = { 0x80, }; 239 static u8 padding[128] = { 0x80, };
240 240 __be64 *dst = (__be64 *)hash;
241 u32 t; 241 __be32 bits[4];
242 u64 t2;
243 u8 bits[128];
244 unsigned int index, pad_len; 242 unsigned int index, pad_len;
245 int i, j; 243 int i;
246
247 index = pad_len = t = i = j = 0;
248 t2 = 0;
249 244
250 /* Save number of bits */ 245 /* Save number of bits */
251 t = sctx->count[0]; 246 bits[3] = cpu_to_be32(sctx->count[0]);
252 bits[15] = t; t>>=8; 247 bits[2] = cpu_to_be32(sctx->count[1]);
253 bits[14] = t; t>>=8; 248 bits[1] = cpu_to_be32(sctx->count[2]);
254 bits[13] = t; t>>=8; 249 bits[0] = cpu_to_be32(sctx->count[3]);
255 bits[12] = t;
256 t = sctx->count[1];
257 bits[11] = t; t>>=8;
258 bits[10] = t; t>>=8;
259 bits[9 ] = t; t>>=8;
260 bits[8 ] = t;
261 t = sctx->count[2];
262 bits[7 ] = t; t>>=8;
263 bits[6 ] = t; t>>=8;
264 bits[5 ] = t; t>>=8;
265 bits[4 ] = t;
266 t = sctx->count[3];
267 bits[3 ] = t; t>>=8;
268 bits[2 ] = t; t>>=8;
269 bits[1 ] = t; t>>=8;
270 bits[0 ] = t;
271 250
272 /* Pad out to 112 mod 128. */ 251 /* Pad out to 112 mod 128. */
273 index = (sctx->count[0] >> 3) & 0x7f; 252 index = (sctx->count[0] >> 3) & 0x7f;
@@ -275,21 +254,12 @@ sha512_final(void *ctx, u8 *hash)
275 sha512_update(sctx, padding, pad_len); 254 sha512_update(sctx, padding, pad_len);
276 255
277 /* Append length (before padding) */ 256 /* Append length (before padding) */
278 sha512_update(sctx, bits, 16); 257 sha512_update(sctx, (const u8 *)bits, sizeof(bits));
279 258
280 /* Store state in digest */ 259 /* Store state in digest */
281 for (i = j = 0; i < 8; i++, j += 8) { 260 for (i = 0; i < 8; i++)
282 t2 = sctx->state[i]; 261 dst[i] = cpu_to_be64(sctx->state[i]);
283 hash[j+7] = (char)t2 & 0xff; t2>>=8; 262
284 hash[j+6] = (char)t2 & 0xff; t2>>=8;
285 hash[j+5] = (char)t2 & 0xff; t2>>=8;
286 hash[j+4] = (char)t2 & 0xff; t2>>=8;
287 hash[j+3] = (char)t2 & 0xff; t2>>=8;
288 hash[j+2] = (char)t2 & 0xff; t2>>=8;
289 hash[j+1] = (char)t2 & 0xff; t2>>=8;
290 hash[j ] = (char)t2 & 0xff;
291 }
292
293 /* Zeroize sensitive information. */ 263 /* Zeroize sensitive information. */
294 memset(sctx, 0, sizeof(struct sha512_ctx)); 264 memset(sctx, 0, sizeof(struct sha512_ctx));
295} 265}
diff --git a/crypto/tea.c b/crypto/tea.c
index 5924efdd3a16..a6a02b30e470 100644
--- a/crypto/tea.c
+++ b/crypto/tea.c
@@ -22,8 +22,10 @@
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <asm/byteorder.h>
25#include <asm/scatterlist.h> 26#include <asm/scatterlist.h>
26#include <linux/crypto.h> 27#include <linux/crypto.h>
28#include <linux/types.h>
27 29
28#define TEA_KEY_SIZE 16 30#define TEA_KEY_SIZE 16
29#define TEA_BLOCK_SIZE 8 31#define TEA_BLOCK_SIZE 8
@@ -35,9 +37,6 @@
35#define XTEA_ROUNDS 32 37#define XTEA_ROUNDS 32
36#define XTEA_DELTA 0x9e3779b9 38#define XTEA_DELTA 0x9e3779b9
37 39
38#define u32_in(x) le32_to_cpu(*(const __le32 *)(x))
39#define u32_out(to, from) (*(__le32 *)(to) = cpu_to_le32(from))
40
41struct tea_ctx { 40struct tea_ctx {
42 u32 KEY[4]; 41 u32 KEY[4];
43}; 42};
@@ -49,8 +48,8 @@ struct xtea_ctx {
49static int tea_setkey(void *ctx_arg, const u8 *in_key, 48static int tea_setkey(void *ctx_arg, const u8 *in_key,
50 unsigned int key_len, u32 *flags) 49 unsigned int key_len, u32 *flags)
51{ 50{
52
53 struct tea_ctx *ctx = ctx_arg; 51 struct tea_ctx *ctx = ctx_arg;
52 const __le32 *key = (const __le32 *)in_key;
54 53
55 if (key_len != 16) 54 if (key_len != 16)
56 { 55 {
@@ -58,10 +57,10 @@ static int tea_setkey(void *ctx_arg, const u8 *in_key,
58 return -EINVAL; 57 return -EINVAL;
59 } 58 }
60 59
61 ctx->KEY[0] = u32_in (in_key); 60 ctx->KEY[0] = le32_to_cpu(key[0]);
62 ctx->KEY[1] = u32_in (in_key + 4); 61 ctx->KEY[1] = le32_to_cpu(key[1]);
63 ctx->KEY[2] = u32_in (in_key + 8); 62 ctx->KEY[2] = le32_to_cpu(key[2]);
64 ctx->KEY[3] = u32_in (in_key + 12); 63 ctx->KEY[3] = le32_to_cpu(key[3]);
65 64
66 return 0; 65 return 0;
67 66
@@ -73,9 +72,11 @@ static void tea_encrypt(void *ctx_arg, u8 *dst, const u8 *src)
73 u32 k0, k1, k2, k3; 72 u32 k0, k1, k2, k3;
74 73
75 struct tea_ctx *ctx = ctx_arg; 74 struct tea_ctx *ctx = ctx_arg;
75 const __le32 *in = (const __le32 *)src;
76 __le32 *out = (__le32 *)dst;
76 77
77 y = u32_in (src); 78 y = le32_to_cpu(in[0]);
78 z = u32_in (src + 4); 79 z = le32_to_cpu(in[1]);
79 80
80 k0 = ctx->KEY[0]; 81 k0 = ctx->KEY[0];
81 k1 = ctx->KEY[1]; 82 k1 = ctx->KEY[1];
@@ -90,19 +91,20 @@ static void tea_encrypt(void *ctx_arg, u8 *dst, const u8 *src)
90 z += ((y << 4) + k2) ^ (y + sum) ^ ((y >> 5) + k3); 91 z += ((y << 4) + k2) ^ (y + sum) ^ ((y >> 5) + k3);
91 } 92 }
92 93
93 u32_out (dst, y); 94 out[0] = cpu_to_le32(y);
94 u32_out (dst + 4, z); 95 out[1] = cpu_to_le32(z);
95} 96}
96 97
97static void tea_decrypt(void *ctx_arg, u8 *dst, const u8 *src) 98static void tea_decrypt(void *ctx_arg, u8 *dst, const u8 *src)
98{ 99{
99 u32 y, z, n, sum; 100 u32 y, z, n, sum;
100 u32 k0, k1, k2, k3; 101 u32 k0, k1, k2, k3;
101
102 struct tea_ctx *ctx = ctx_arg; 102 struct tea_ctx *ctx = ctx_arg;
103 const __le32 *in = (const __le32 *)src;
104 __le32 *out = (__le32 *)dst;
103 105
104 y = u32_in (src); 106 y = le32_to_cpu(in[0]);
105 z = u32_in (src + 4); 107 z = le32_to_cpu(in[1]);
106 108
107 k0 = ctx->KEY[0]; 109 k0 = ctx->KEY[0];
108 k1 = ctx->KEY[1]; 110 k1 = ctx->KEY[1];
@@ -119,16 +121,15 @@ static void tea_decrypt(void *ctx_arg, u8 *dst, const u8 *src)
119 sum -= TEA_DELTA; 121 sum -= TEA_DELTA;
120 } 122 }
121 123
122 u32_out (dst, y); 124 out[0] = cpu_to_le32(y);
123 u32_out (dst + 4, z); 125 out[1] = cpu_to_le32(z);
124
125} 126}
126 127
127static int xtea_setkey(void *ctx_arg, const u8 *in_key, 128static int xtea_setkey(void *ctx_arg, const u8 *in_key,
128 unsigned int key_len, u32 *flags) 129 unsigned int key_len, u32 *flags)
129{ 130{
130
131 struct xtea_ctx *ctx = ctx_arg; 131 struct xtea_ctx *ctx = ctx_arg;
132 const __le32 *key = (const __le32 *)in_key;
132 133
133 if (key_len != 16) 134 if (key_len != 16)
134 { 135 {
@@ -136,10 +137,10 @@ static int xtea_setkey(void *ctx_arg, const u8 *in_key,
136 return -EINVAL; 137 return -EINVAL;
137 } 138 }
138 139
139 ctx->KEY[0] = u32_in (in_key); 140 ctx->KEY[0] = le32_to_cpu(key[0]);
140 ctx->KEY[1] = u32_in (in_key + 4); 141 ctx->KEY[1] = le32_to_cpu(key[1]);
141 ctx->KEY[2] = u32_in (in_key + 8); 142 ctx->KEY[2] = le32_to_cpu(key[2]);
142 ctx->KEY[3] = u32_in (in_key + 12); 143 ctx->KEY[3] = le32_to_cpu(key[3]);
143 144
144 return 0; 145 return 0;
145 146
@@ -147,14 +148,15 @@ static int xtea_setkey(void *ctx_arg, const u8 *in_key,
147 148
148static void xtea_encrypt(void *ctx_arg, u8 *dst, const u8 *src) 149static void xtea_encrypt(void *ctx_arg, u8 *dst, const u8 *src)
149{ 150{
150
151 u32 y, z, sum = 0; 151 u32 y, z, sum = 0;
152 u32 limit = XTEA_DELTA * XTEA_ROUNDS; 152 u32 limit = XTEA_DELTA * XTEA_ROUNDS;
153 153
154 struct xtea_ctx *ctx = ctx_arg; 154 struct xtea_ctx *ctx = ctx_arg;
155 const __le32 *in = (const __le32 *)src;
156 __le32 *out = (__le32 *)dst;
155 157
156 y = u32_in (src); 158 y = le32_to_cpu(in[0]);
157 z = u32_in (src + 4); 159 z = le32_to_cpu(in[1]);
158 160
159 while (sum != limit) { 161 while (sum != limit) {
160 y += ((z << 4 ^ z >> 5) + z) ^ (sum + ctx->KEY[sum&3]); 162 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)
162 z += ((y << 4 ^ y >> 5) + y) ^ (sum + ctx->KEY[sum>>11 &3]); 164 z += ((y << 4 ^ y >> 5) + y) ^ (sum + ctx->KEY[sum>>11 &3]);
163 } 165 }
164 166
165 u32_out (dst, y); 167 out[0] = cpu_to_le32(y);
166 u32_out (dst + 4, z); 168 out[1] = cpu_to_le32(z);
167
168} 169}
169 170
170static void xtea_decrypt(void *ctx_arg, u8 *dst, const u8 *src) 171static void xtea_decrypt(void *ctx_arg, u8 *dst, const u8 *src)
171{ 172{
172
173 u32 y, z, sum; 173 u32 y, z, sum;
174 struct tea_ctx *ctx = ctx_arg; 174 struct tea_ctx *ctx = ctx_arg;
175 const __le32 *in = (const __le32 *)src;
176 __le32 *out = (__le32 *)dst;
175 177
176 y = u32_in (src); 178 y = le32_to_cpu(in[0]);
177 z = u32_in (src + 4); 179 z = le32_to_cpu(in[1]);
178 180
179 sum = XTEA_DELTA * XTEA_ROUNDS; 181 sum = XTEA_DELTA * XTEA_ROUNDS;
180 182
@@ -184,22 +186,22 @@ static void xtea_decrypt(void *ctx_arg, u8 *dst, const u8 *src)
184 y -= ((z << 4 ^ z >> 5) + z) ^ (sum + ctx->KEY[sum & 3]); 186 y -= ((z << 4 ^ z >> 5) + z) ^ (sum + ctx->KEY[sum & 3]);
185 } 187 }
186 188
187 u32_out (dst, y); 189 out[0] = cpu_to_le32(y);
188 u32_out (dst + 4, z); 190 out[1] = cpu_to_le32(z);
189
190} 191}
191 192
192 193
193static void xeta_encrypt(void *ctx_arg, u8 *dst, const u8 *src) 194static void xeta_encrypt(void *ctx_arg, u8 *dst, const u8 *src)
194{ 195{
195
196 u32 y, z, sum = 0; 196 u32 y, z, sum = 0;
197 u32 limit = XTEA_DELTA * XTEA_ROUNDS; 197 u32 limit = XTEA_DELTA * XTEA_ROUNDS;
198 198
199 struct xtea_ctx *ctx = ctx_arg; 199 struct xtea_ctx *ctx = ctx_arg;
200 const __le32 *in = (const __le32 *)src;
201 __le32 *out = (__le32 *)dst;
200 202
201 y = u32_in (src); 203 y = le32_to_cpu(in[0]);
202 z = u32_in (src + 4); 204 z = le32_to_cpu(in[1]);
203 205
204 while (sum != limit) { 206 while (sum != limit) {
205 y += (z << 4 ^ z >> 5) + (z ^ sum) + ctx->KEY[sum&3]; 207 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)
207 z += (y << 4 ^ y >> 5) + (y ^ sum) + ctx->KEY[sum>>11 &3]; 209 z += (y << 4 ^ y >> 5) + (y ^ sum) + ctx->KEY[sum>>11 &3];
208 } 210 }
209 211
210 u32_out (dst, y); 212 out[0] = cpu_to_le32(y);
211 u32_out (dst + 4, z); 213 out[1] = cpu_to_le32(z);
212
213} 214}
214 215
215static void xeta_decrypt(void *ctx_arg, u8 *dst, const u8 *src) 216static void xeta_decrypt(void *ctx_arg, u8 *dst, const u8 *src)
216{ 217{
217
218 u32 y, z, sum; 218 u32 y, z, sum;
219 struct tea_ctx *ctx = ctx_arg; 219 struct tea_ctx *ctx = ctx_arg;
220 const __le32 *in = (const __le32 *)src;
221 __le32 *out = (__le32 *)dst;
220 222
221 y = u32_in (src); 223 y = le32_to_cpu(in[0]);
222 z = u32_in (src + 4); 224 z = le32_to_cpu(in[1]);
223 225
224 sum = XTEA_DELTA * XTEA_ROUNDS; 226 sum = XTEA_DELTA * XTEA_ROUNDS;
225 227
@@ -229,9 +231,8 @@ static void xeta_decrypt(void *ctx_arg, u8 *dst, const u8 *src)
229 y -= (z << 4 ^ z >> 5) + (z ^ sum) + ctx->KEY[sum & 3]; 231 y -= (z << 4 ^ z >> 5) + (z ^ sum) + ctx->KEY[sum & 3];
230 } 232 }
231 233
232 u32_out (dst, y); 234 out[0] = cpu_to_le32(y);
233 u32_out (dst + 4, z); 235 out[1] = cpu_to_le32(z);
234
235} 236}
236 237
237static struct crypto_alg tea_alg = { 238static struct crypto_alg tea_alg = {
@@ -239,6 +240,7 @@ static struct crypto_alg tea_alg = {
239 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 240 .cra_flags = CRYPTO_ALG_TYPE_CIPHER,
240 .cra_blocksize = TEA_BLOCK_SIZE, 241 .cra_blocksize = TEA_BLOCK_SIZE,
241 .cra_ctxsize = sizeof (struct tea_ctx), 242 .cra_ctxsize = sizeof (struct tea_ctx),
243 .cra_alignmask = 3,
242 .cra_module = THIS_MODULE, 244 .cra_module = THIS_MODULE,
243 .cra_list = LIST_HEAD_INIT(tea_alg.cra_list), 245 .cra_list = LIST_HEAD_INIT(tea_alg.cra_list),
244 .cra_u = { .cipher = { 246 .cra_u = { .cipher = {
@@ -254,6 +256,7 @@ static struct crypto_alg xtea_alg = {
254 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 256 .cra_flags = CRYPTO_ALG_TYPE_CIPHER,
255 .cra_blocksize = XTEA_BLOCK_SIZE, 257 .cra_blocksize = XTEA_BLOCK_SIZE,
256 .cra_ctxsize = sizeof (struct xtea_ctx), 258 .cra_ctxsize = sizeof (struct xtea_ctx),
259 .cra_alignmask = 3,
257 .cra_module = THIS_MODULE, 260 .cra_module = THIS_MODULE,
258 .cra_list = LIST_HEAD_INIT(xtea_alg.cra_list), 261 .cra_list = LIST_HEAD_INIT(xtea_alg.cra_list),
259 .cra_u = { .cipher = { 262 .cra_u = { .cipher = {
@@ -269,6 +272,7 @@ static struct crypto_alg xeta_alg = {
269 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 272 .cra_flags = CRYPTO_ALG_TYPE_CIPHER,
270 .cra_blocksize = XTEA_BLOCK_SIZE, 273 .cra_blocksize = XTEA_BLOCK_SIZE,
271 .cra_ctxsize = sizeof (struct xtea_ctx), 274 .cra_ctxsize = sizeof (struct xtea_ctx),
275 .cra_alignmask = 3,
272 .cra_module = THIS_MODULE, 276 .cra_module = THIS_MODULE,
273 .cra_list = LIST_HEAD_INIT(xtea_alg.cra_list), 277 .cra_list = LIST_HEAD_INIT(xtea_alg.cra_list),
274 .cra_u = { .cipher = { 278 .cra_u = { .cipher = {
diff --git a/crypto/tgr192.c b/crypto/tgr192.c
index f0a45cf716d0..2d8e44f6fbe9 100644
--- a/crypto/tgr192.c
+++ b/crypto/tgr192.c
@@ -24,8 +24,10 @@
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/mm.h> 26#include <linux/mm.h>
27#include <asm/byteorder.h>
27#include <asm/scatterlist.h> 28#include <asm/scatterlist.h>
28#include <linux/crypto.h> 29#include <linux/crypto.h>
30#include <linux/types.h>
29 31
30#define TGR192_DIGEST_SIZE 24 32#define TGR192_DIGEST_SIZE 24
31#define TGR160_DIGEST_SIZE 20 33#define TGR160_DIGEST_SIZE 20
@@ -467,18 +469,10 @@ static void tgr192_transform(struct tgr192_ctx *tctx, const u8 * data)
467 u64 a, b, c, aa, bb, cc; 469 u64 a, b, c, aa, bb, cc;
468 u64 x[8]; 470 u64 x[8];
469 int i; 471 int i;
470 const u8 *ptr = data; 472 const __le64 *ptr = (const __le64 *)data;
471 473
472 for (i = 0; i < 8; i++, ptr += 8) { 474 for (i = 0; i < 8; i++)
473 x[i] = (((u64)ptr[7] ) << 56) ^ 475 x[i] = le64_to_cpu(ptr[i]);
474 (((u64)ptr[6] & 0xffL) << 48) ^
475 (((u64)ptr[5] & 0xffL) << 40) ^
476 (((u64)ptr[4] & 0xffL) << 32) ^
477 (((u64)ptr[3] & 0xffL) << 24) ^
478 (((u64)ptr[2] & 0xffL) << 16) ^
479 (((u64)ptr[1] & 0xffL) << 8) ^
480 (((u64)ptr[0] & 0xffL) );
481 }
482 476
483 /* save */ 477 /* save */
484 a = aa = tctx->a; 478 a = aa = tctx->a;
@@ -558,9 +552,10 @@ static void tgr192_update(void *ctx, const u8 * inbuf, unsigned int len)
558static void tgr192_final(void *ctx, u8 * out) 552static void tgr192_final(void *ctx, u8 * out)
559{ 553{
560 struct tgr192_ctx *tctx = ctx; 554 struct tgr192_ctx *tctx = ctx;
555 __be64 *dst = (__be64 *)out;
556 __be64 *be64p;
557 __le32 *le32p;
561 u32 t, msb, lsb; 558 u32 t, msb, lsb;
562 u8 *p;
563 int i, j;
564 559
565 tgr192_update(tctx, NULL, 0); /* flush */ ; 560 tgr192_update(tctx, NULL, 0); /* flush */ ;
566 561
@@ -594,41 +589,16 @@ static void tgr192_final(void *ctx, u8 * out)
594 memset(tctx->hash, 0, 56); /* fill next block with zeroes */ 589 memset(tctx->hash, 0, 56); /* fill next block with zeroes */
595 } 590 }
596 /* append the 64 bit count */ 591 /* append the 64 bit count */
597 tctx->hash[56] = lsb; 592 le32p = (__le32 *)&tctx->hash[56];
598 tctx->hash[57] = lsb >> 8; 593 le32p[0] = cpu_to_le32(lsb);
599 tctx->hash[58] = lsb >> 16; 594 le32p[1] = cpu_to_le32(msb);
600 tctx->hash[59] = lsb >> 24; 595
601 tctx->hash[60] = msb;
602 tctx->hash[61] = msb >> 8;
603 tctx->hash[62] = msb >> 16;
604 tctx->hash[63] = msb >> 24;
605 tgr192_transform(tctx, tctx->hash); 596 tgr192_transform(tctx, tctx->hash);
606 597
607 p = tctx->hash; 598 be64p = (__be64 *)tctx->hash;
608 *p++ = tctx->a >> 56; *p++ = tctx->a >> 48; *p++ = tctx->a >> 40; 599 dst[0] = be64p[0] = cpu_to_be64(tctx->a);
609 *p++ = tctx->a >> 32; *p++ = tctx->a >> 24; *p++ = tctx->a >> 16; 600 dst[1] = be64p[1] = cpu_to_be64(tctx->b);
610 *p++ = tctx->a >> 8; *p++ = tctx->a;\ 601 dst[2] = be64p[2] = cpu_to_be64(tctx->c);
611 *p++ = tctx->b >> 56; *p++ = tctx->b >> 48; *p++ = tctx->b >> 40;
612 *p++ = tctx->b >> 32; *p++ = tctx->b >> 24; *p++ = tctx->b >> 16;
613 *p++ = tctx->b >> 8; *p++ = tctx->b;
614 *p++ = tctx->c >> 56; *p++ = tctx->c >> 48; *p++ = tctx->c >> 40;
615 *p++ = tctx->c >> 32; *p++ = tctx->c >> 24; *p++ = tctx->c >> 16;
616 *p++ = tctx->c >> 8; *p++ = tctx->c;
617
618
619 /* unpack the hash */
620 j = 7;
621 for (i = 0; i < 8; i++) {
622 out[j--] = (tctx->a >> 8 * i) & 0xff;
623 }
624 j = 15;
625 for (i = 0; i < 8; i++) {
626 out[j--] = (tctx->b >> 8 * i) & 0xff;
627 }
628 j = 23;
629 for (i = 0; i < 8; i++) {
630 out[j--] = (tctx->c >> 8 * i) & 0xff;
631 }
632} 602}
633 603
634static void tgr160_final(void *ctx, u8 * out) 604static void tgr160_final(void *ctx, u8 * out)
diff --git a/crypto/twofish.c b/crypto/twofish.c
index 4efff8cf9958..a26d885486fb 100644
--- a/crypto/twofish.c
+++ b/crypto/twofish.c
@@ -37,6 +37,8 @@
37 * Abstract Algebra_ by Joseph A. Gallian, especially chapter 22 in the 37 * Abstract Algebra_ by Joseph A. Gallian, especially chapter 22 in the
38 * Third Edition. 38 * Third Edition.
39 */ 39 */
40
41#include <asm/byteorder.h>
40#include <linux/module.h> 42#include <linux/module.h>
41#include <linux/init.h> 43#include <linux/init.h>
42#include <linux/types.h> 44#include <linux/types.h>
@@ -621,13 +623,11 @@ static const u8 calc_sb_tbl[512] = {
621 * whitening subkey number m. */ 623 * whitening subkey number m. */
622 624
623#define INPACK(n, x, m) \ 625#define INPACK(n, x, m) \
624 x = in[4 * (n)] ^ (in[4 * (n) + 1] << 8) \ 626 x = le32_to_cpu(src[n]) ^ ctx->w[m]
625 ^ (in[4 * (n) + 2] << 16) ^ (in[4 * (n) + 3] << 24) ^ ctx->w[m]
626 627
627#define OUTUNPACK(n, x, m) \ 628#define OUTUNPACK(n, x, m) \
628 x ^= ctx->w[m]; \ 629 x ^= ctx->w[m]; \
629 out[4 * (n)] = x; out[4 * (n) + 1] = x >> 8; \ 630 dst[n] = cpu_to_le32(x)
630 out[4 * (n) + 2] = x >> 16; out[4 * (n) + 3] = x >> 24
631 631
632#define TF_MIN_KEY_SIZE 16 632#define TF_MIN_KEY_SIZE 16
633#define TF_MAX_KEY_SIZE 32 633#define TF_MAX_KEY_SIZE 32
@@ -804,6 +804,8 @@ static int twofish_setkey(void *cx, const u8 *key,
804static void twofish_encrypt(void *cx, u8 *out, const u8 *in) 804static void twofish_encrypt(void *cx, u8 *out, const u8 *in)
805{ 805{
806 struct twofish_ctx *ctx = cx; 806 struct twofish_ctx *ctx = cx;
807 const __le32 *src = (const __le32 *)in;
808 __le32 *dst = (__le32 *)out;
807 809
808 /* The four 32-bit chunks of the text. */ 810 /* The four 32-bit chunks of the text. */
809 u32 a, b, c, d; 811 u32 a, b, c, d;
@@ -839,6 +841,8 @@ static void twofish_encrypt(void *cx, u8 *out, const u8 *in)
839static void twofish_decrypt(void *cx, u8 *out, const u8 *in) 841static void twofish_decrypt(void *cx, u8 *out, const u8 *in)
840{ 842{
841 struct twofish_ctx *ctx = cx; 843 struct twofish_ctx *ctx = cx;
844 const __le32 *src = (const __le32 *)in;
845 __le32 *dst = (__le32 *)out;
842 846
843 /* The four 32-bit chunks of the text. */ 847 /* The four 32-bit chunks of the text. */
844 u32 a, b, c, d; 848 u32 a, b, c, d;
@@ -875,6 +879,7 @@ static struct crypto_alg alg = {
875 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 879 .cra_flags = CRYPTO_ALG_TYPE_CIPHER,
876 .cra_blocksize = TF_BLOCK_SIZE, 880 .cra_blocksize = TF_BLOCK_SIZE,
877 .cra_ctxsize = sizeof(struct twofish_ctx), 881 .cra_ctxsize = sizeof(struct twofish_ctx),
882 .cra_alignmask = 3,
878 .cra_module = THIS_MODULE, 883 .cra_module = THIS_MODULE,
879 .cra_list = LIST_HEAD_INIT(alg.cra_list), 884 .cra_list = LIST_HEAD_INIT(alg.cra_list),
880 .cra_u = { .cipher = { 885 .cra_u = { .cipher = {
diff --git a/crypto/wp512.c b/crypto/wp512.c
index fd6e20e1f291..b226a126cfae 100644
--- a/crypto/wp512.c
+++ b/crypto/wp512.c
@@ -22,8 +22,10 @@
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <asm/byteorder.h>
25#include <asm/scatterlist.h> 26#include <asm/scatterlist.h>
26#include <linux/crypto.h> 27#include <linux/crypto.h>
28#include <linux/types.h>
27 29
28#define WP512_DIGEST_SIZE 64 30#define WP512_DIGEST_SIZE 64
29#define WP384_DIGEST_SIZE 48 31#define WP384_DIGEST_SIZE 48
@@ -778,19 +780,10 @@ static void wp512_process_buffer(struct wp512_ctx *wctx) {
778 u64 block[8]; /* mu(buffer) */ 780 u64 block[8]; /* mu(buffer) */
779 u64 state[8]; /* the cipher state */ 781 u64 state[8]; /* the cipher state */
780 u64 L[8]; 782 u64 L[8];
781 u8 *buffer = wctx->buffer; 783 const __be64 *buffer = (const __be64 *)wctx->buffer;
782 784
783 for (i = 0; i < 8; i++, buffer += 8) { 785 for (i = 0; i < 8; i++)
784 block[i] = 786 block[i] = be64_to_cpu(buffer[i]);
785 (((u64)buffer[0] ) << 56) ^
786 (((u64)buffer[1] & 0xffL) << 48) ^
787 (((u64)buffer[2] & 0xffL) << 40) ^
788 (((u64)buffer[3] & 0xffL) << 32) ^
789 (((u64)buffer[4] & 0xffL) << 24) ^
790 (((u64)buffer[5] & 0xffL) << 16) ^
791 (((u64)buffer[6] & 0xffL) << 8) ^
792 (((u64)buffer[7] & 0xffL) );
793 }
794 787
795 state[0] = block[0] ^ (K[0] = wctx->hash[0]); 788 state[0] = block[0] ^ (K[0] = wctx->hash[0]);
796 state[1] = block[1] ^ (K[1] = wctx->hash[1]); 789 state[1] = block[1] ^ (K[1] = wctx->hash[1]);
@@ -1069,7 +1062,7 @@ static void wp512_final(void *ctx, u8 *out)
1069 u8 *bitLength = wctx->bitLength; 1062 u8 *bitLength = wctx->bitLength;
1070 int bufferBits = wctx->bufferBits; 1063 int bufferBits = wctx->bufferBits;
1071 int bufferPos = wctx->bufferPos; 1064 int bufferPos = wctx->bufferPos;
1072 u8 *digest = out; 1065 __be64 *digest = (__be64 *)out;
1073 1066
1074 buffer[bufferPos] |= 0x80U >> (bufferBits & 7); 1067 buffer[bufferPos] |= 0x80U >> (bufferBits & 7);
1075 bufferPos++; 1068 bufferPos++;
@@ -1088,17 +1081,8 @@ static void wp512_final(void *ctx, u8 *out)
1088 memcpy(&buffer[WP512_BLOCK_SIZE - WP512_LENGTHBYTES], 1081 memcpy(&buffer[WP512_BLOCK_SIZE - WP512_LENGTHBYTES],
1089 bitLength, WP512_LENGTHBYTES); 1082 bitLength, WP512_LENGTHBYTES);
1090 wp512_process_buffer(wctx); 1083 wp512_process_buffer(wctx);
1091 for (i = 0; i < WP512_DIGEST_SIZE/8; i++) { 1084 for (i = 0; i < WP512_DIGEST_SIZE/8; i++)
1092 digest[0] = (u8)(wctx->hash[i] >> 56); 1085 digest[i] = cpu_to_be64(wctx->hash[i]);
1093 digest[1] = (u8)(wctx->hash[i] >> 48);
1094 digest[2] = (u8)(wctx->hash[i] >> 40);
1095 digest[3] = (u8)(wctx->hash[i] >> 32);
1096 digest[4] = (u8)(wctx->hash[i] >> 24);
1097 digest[5] = (u8)(wctx->hash[i] >> 16);
1098 digest[6] = (u8)(wctx->hash[i] >> 8);
1099 digest[7] = (u8)(wctx->hash[i] );
1100 digest += 8;
1101 }
1102 wctx->bufferBits = bufferBits; 1086 wctx->bufferBits = bufferBits;
1103 wctx->bufferPos = bufferPos; 1087 wctx->bufferPos = bufferPos;
1104} 1088}
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index 1bbdd1693d57..889855d8d9f9 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -15,7 +15,6 @@
15#include <linux/amba/bus.h> 15#include <linux/amba/bus.h>
16 16
17#include <asm/io.h> 17#include <asm/io.h>
18#include <asm/irq.h>
19#include <asm/sizes.h> 18#include <asm/sizes.h>
20 19
21#define to_amba_device(d) container_of(d, struct amba_device, dev) 20#define to_amba_device(d) container_of(d, struct amba_device, dev)
diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c
index 71407c578afe..64819aa7cac4 100644
--- a/drivers/crypto/padlock-aes.c
+++ b/drivers/crypto/padlock-aes.c
@@ -99,9 +99,6 @@ byte(const uint32_t x, const unsigned n)
99 return x >> (n << 3); 99 return x >> (n << 3);
100} 100}
101 101
102#define uint32_t_in(x) le32_to_cpu(*(const uint32_t *)(x))
103#define uint32_t_out(to, from) (*(uint32_t *)(to) = cpu_to_le32(from))
104
105#define E_KEY ctx->E 102#define E_KEY ctx->E
106#define D_KEY ctx->D 103#define D_KEY ctx->D
107 104
@@ -294,6 +291,7 @@ static int
294aes_set_key(void *ctx_arg, const uint8_t *in_key, unsigned int key_len, uint32_t *flags) 291aes_set_key(void *ctx_arg, const uint8_t *in_key, unsigned int key_len, uint32_t *flags)
295{ 292{
296 struct aes_ctx *ctx = aes_ctx(ctx_arg); 293 struct aes_ctx *ctx = aes_ctx(ctx_arg);
294 const __le32 *key = (const __le32 *)in_key;
297 uint32_t i, t, u, v, w; 295 uint32_t i, t, u, v, w;
298 uint32_t P[AES_EXTENDED_KEY_SIZE]; 296 uint32_t P[AES_EXTENDED_KEY_SIZE];
299 uint32_t rounds; 297 uint32_t rounds;
@@ -313,10 +311,10 @@ aes_set_key(void *ctx_arg, const uint8_t *in_key, unsigned int key_len, uint32_t
313 ctx->E = ctx->e_data; 311 ctx->E = ctx->e_data;
314 ctx->D = ctx->e_data; 312 ctx->D = ctx->e_data;
315 313
316 E_KEY[0] = uint32_t_in (in_key); 314 E_KEY[0] = le32_to_cpu(key[0]);
317 E_KEY[1] = uint32_t_in (in_key + 4); 315 E_KEY[1] = le32_to_cpu(key[1]);
318 E_KEY[2] = uint32_t_in (in_key + 8); 316 E_KEY[2] = le32_to_cpu(key[2]);
319 E_KEY[3] = uint32_t_in (in_key + 12); 317 E_KEY[3] = le32_to_cpu(key[3]);
320 318
321 /* Prepare control words. */ 319 /* Prepare control words. */
322 memset(&ctx->cword, 0, sizeof(ctx->cword)); 320 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
343 break; 341 break;
344 342
345 case 24: 343 case 24:
346 E_KEY[4] = uint32_t_in (in_key + 16); 344 E_KEY[4] = le32_to_cpu(key[4]);
347 t = E_KEY[5] = uint32_t_in (in_key + 20); 345 t = E_KEY[5] = le32_to_cpu(key[5]);
348 for (i = 0; i < 8; ++i) 346 for (i = 0; i < 8; ++i)
349 loop6 (i); 347 loop6 (i);
350 break; 348 break;
351 349
352 case 32: 350 case 32:
353 E_KEY[4] = uint32_t_in (in_key + 16); 351 E_KEY[4] = le32_to_cpu(in_key[4]);
354 E_KEY[5] = uint32_t_in (in_key + 20); 352 E_KEY[5] = le32_to_cpu(in_key[5]);
355 E_KEY[6] = uint32_t_in (in_key + 24); 353 E_KEY[6] = le32_to_cpu(in_key[6]);
356 t = E_KEY[7] = uint32_t_in (in_key + 28); 354 t = E_KEY[7] = le32_to_cpu(in_key[7]);
357 for (i = 0; i < 7; ++i) 355 for (i = 0; i < 7; ++i)
358 loop8 (i); 356 loop8 (i);
359 break; 357 break;
@@ -468,6 +466,8 @@ static unsigned int aes_decrypt_cbc(const struct cipher_desc *desc, u8 *out,
468 466
469static struct crypto_alg aes_alg = { 467static struct crypto_alg aes_alg = {
470 .cra_name = "aes", 468 .cra_name = "aes",
469 .cra_driver_name = "aes-padlock",
470 .cra_priority = 300,
471 .cra_flags = CRYPTO_ALG_TYPE_CIPHER, 471 .cra_flags = CRYPTO_ALG_TYPE_CIPHER,
472 .cra_blocksize = AES_BLOCK_SIZE, 472 .cra_blocksize = AES_BLOCK_SIZE,
473 .cra_ctxsize = sizeof(struct aes_ctx), 473 .cra_ctxsize = sizeof(struct aes_ctx),
diff --git a/drivers/crypto/padlock.h b/drivers/crypto/padlock.h
index 3cf2b7a12348..b78489bc298a 100644
--- a/drivers/crypto/padlock.h
+++ b/drivers/crypto/padlock.h
@@ -17,7 +17,7 @@
17 17
18/* Control word. */ 18/* Control word. */
19struct cword { 19struct cword {
20 int __attribute__ ((__packed__)) 20 unsigned int __attribute__ ((__packed__))
21 rounds:4, 21 rounds:4,
22 algo:3, 22 algo:3,
23 keygen:1, 23 keygen:1,
diff --git a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c
index 3f0df3330fb2..ebd9976fc811 100644
--- a/drivers/input/serio/sa1111ps2.c
+++ b/drivers/input/serio/sa1111ps2.c
@@ -20,7 +20,6 @@
20#include <linux/spinlock.h> 20#include <linux/spinlock.h>
21 21
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/irq.h>
24#include <asm/system.h> 23#include <asm/system.h>
25 24
26#include <asm/hardware/sa1111.h> 25#include <asm/hardware/sa1111.h>
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 6696f71363b9..bfca5c176e88 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -495,6 +495,7 @@ static void mmc_decode_cid(struct mmc_card *card)
495 495
496 case 2: /* MMC v2.0 - v2.2 */ 496 case 2: /* MMC v2.0 - v2.2 */
497 case 3: /* MMC v3.1 - v3.3 */ 497 case 3: /* MMC v3.1 - v3.3 */
498 case 4: /* MMC v4 */
498 card->cid.manfid = UNSTUFF_BITS(resp, 120, 8); 499 card->cid.manfid = UNSTUFF_BITS(resp, 120, 8);
499 card->cid.oemid = UNSTUFF_BITS(resp, 104, 16); 500 card->cid.oemid = UNSTUFF_BITS(resp, 104, 16);
500 card->cid.prod_name[0] = UNSTUFF_BITS(resp, 96, 8); 501 card->cid.prod_name[0] = UNSTUFF_BITS(resp, 96, 8);
diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c
index d5f28981596b..f2c42b13945d 100644
--- a/drivers/mmc/mmc_block.c
+++ b/drivers/mmc/mmc_block.c
@@ -187,7 +187,13 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
187 brq.data.flags |= MMC_DATA_WRITE; 187 brq.data.flags |= MMC_DATA_WRITE;
188 brq.data.blocks = 1; 188 brq.data.blocks = 1;
189 } 189 }
190 brq.mrq.stop = brq.data.blocks > 1 ? &brq.stop : NULL; 190
191 if (brq.data.blocks > 1) {
192 brq.data.flags |= MMC_DATA_MULTI;
193 brq.mrq.stop = &brq.stop;
194 } else {
195 brq.mrq.stop = NULL;
196 }
191 197
192 brq.data.sg = mq->sg; 198 brq.data.sg = mq->sg;
193 brq.data.sg_len = blk_rq_map_sg(req->q, req, brq.data.sg); 199 brq.data.sg_len = blk_rq_map_sg(req->q, req, brq.data.sg);
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c
index 4f13bd2ccf9a..f25757625361 100644
--- a/drivers/mmc/wbsd.c
+++ b/drivers/mmc/wbsd.c
@@ -90,7 +90,7 @@ static int dma = 2;
90 * Basic functions 90 * Basic functions
91 */ 91 */
92 92
93static inline void wbsd_unlock_config(struct wbsd_host* host) 93static inline void wbsd_unlock_config(struct wbsd_host *host)
94{ 94{
95 BUG_ON(host->config == 0); 95 BUG_ON(host->config == 0);
96 96
@@ -98,14 +98,14 @@ static inline void wbsd_unlock_config(struct wbsd_host* host)
98 outb(host->unlock_code, host->config); 98 outb(host->unlock_code, host->config);
99} 99}
100 100
101static inline void wbsd_lock_config(struct wbsd_host* host) 101static inline void wbsd_lock_config(struct wbsd_host *host)
102{ 102{
103 BUG_ON(host->config == 0); 103 BUG_ON(host->config == 0);
104 104
105 outb(LOCK_CODE, host->config); 105 outb(LOCK_CODE, host->config);
106} 106}
107 107
108static inline void wbsd_write_config(struct wbsd_host* host, u8 reg, u8 value) 108static inline void wbsd_write_config(struct wbsd_host *host, u8 reg, u8 value)
109{ 109{
110 BUG_ON(host->config == 0); 110 BUG_ON(host->config == 0);
111 111
@@ -113,7 +113,7 @@ static inline void wbsd_write_config(struct wbsd_host* host, u8 reg, u8 value)
113 outb(value, host->config + 1); 113 outb(value, host->config + 1);
114} 114}
115 115
116static inline u8 wbsd_read_config(struct wbsd_host* host, u8 reg) 116static inline u8 wbsd_read_config(struct wbsd_host *host, u8 reg)
117{ 117{
118 BUG_ON(host->config == 0); 118 BUG_ON(host->config == 0);
119 119
@@ -121,13 +121,13 @@ static inline u8 wbsd_read_config(struct wbsd_host* host, u8 reg)
121 return inb(host->config + 1); 121 return inb(host->config + 1);
122} 122}
123 123
124static inline void wbsd_write_index(struct wbsd_host* host, u8 index, u8 value) 124static inline void wbsd_write_index(struct wbsd_host *host, u8 index, u8 value)
125{ 125{
126 outb(index, host->base + WBSD_IDXR); 126 outb(index, host->base + WBSD_IDXR);
127 outb(value, host->base + WBSD_DATAR); 127 outb(value, host->base + WBSD_DATAR);
128} 128}
129 129
130static inline u8 wbsd_read_index(struct wbsd_host* host, u8 index) 130static inline u8 wbsd_read_index(struct wbsd_host *host, u8 index)
131{ 131{
132 outb(index, host->base + WBSD_IDXR); 132 outb(index, host->base + WBSD_IDXR);
133 return inb(host->base + WBSD_DATAR); 133 return inb(host->base + WBSD_DATAR);
@@ -137,7 +137,7 @@ static inline u8 wbsd_read_index(struct wbsd_host* host, u8 index)
137 * Common routines 137 * Common routines
138 */ 138 */
139 139
140static void wbsd_init_device(struct wbsd_host* host) 140static void wbsd_init_device(struct wbsd_host *host)
141{ 141{
142 u8 setup, ier; 142 u8 setup, ier;
143 143
@@ -197,7 +197,7 @@ static void wbsd_init_device(struct wbsd_host* host)
197 inb(host->base + WBSD_ISR); 197 inb(host->base + WBSD_ISR);
198} 198}
199 199
200static void wbsd_reset(struct wbsd_host* host) 200static void wbsd_reset(struct wbsd_host *host)
201{ 201{
202 u8 setup; 202 u8 setup;
203 203
@@ -211,14 +211,13 @@ static void wbsd_reset(struct wbsd_host* host)
211 wbsd_write_index(host, WBSD_IDX_SETUP, setup); 211 wbsd_write_index(host, WBSD_IDX_SETUP, setup);
212} 212}
213 213
214static void wbsd_request_end(struct wbsd_host* host, struct mmc_request* mrq) 214static void wbsd_request_end(struct wbsd_host *host, struct mmc_request *mrq)
215{ 215{
216 unsigned long dmaflags; 216 unsigned long dmaflags;
217 217
218 DBGF("Ending request, cmd (%x)\n", mrq->cmd->opcode); 218 DBGF("Ending request, cmd (%x)\n", mrq->cmd->opcode);
219 219
220 if (host->dma >= 0) 220 if (host->dma >= 0) {
221 {
222 /* 221 /*
223 * Release ISA DMA controller. 222 * Release ISA DMA controller.
224 */ 223 */
@@ -247,7 +246,7 @@ static void wbsd_request_end(struct wbsd_host* host, struct mmc_request* mrq)
247 * Scatter/gather functions 246 * Scatter/gather functions
248 */ 247 */
249 248
250static inline void wbsd_init_sg(struct wbsd_host* host, struct mmc_data* data) 249static inline void wbsd_init_sg(struct wbsd_host *host, struct mmc_data *data)
251{ 250{
252 /* 251 /*
253 * Get info. about SG list from data structure. 252 * 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)
259 host->remain = host->cur_sg->length; 258 host->remain = host->cur_sg->length;
260} 259}
261 260
262static inline int wbsd_next_sg(struct wbsd_host* host) 261static inline int wbsd_next_sg(struct wbsd_host *host)
263{ 262{
264 /* 263 /*
265 * Skip to next SG entry. 264 * Skip to next SG entry.
@@ -270,33 +269,32 @@ static inline int wbsd_next_sg(struct wbsd_host* host)
270 /* 269 /*
271 * Any entries left? 270 * Any entries left?
272 */ 271 */
273 if (host->num_sg > 0) 272 if (host->num_sg > 0) {
274 { 273 host->offset = 0;
275 host->offset = 0; 274 host->remain = host->cur_sg->length;
276 host->remain = host->cur_sg->length; 275 }
277 }
278 276
279 return host->num_sg; 277 return host->num_sg;
280} 278}
281 279
282static inline char* wbsd_kmap_sg(struct wbsd_host* host) 280static inline char *wbsd_kmap_sg(struct wbsd_host *host)
283{ 281{
284 host->mapped_sg = kmap_atomic(host->cur_sg->page, KM_BIO_SRC_IRQ) + 282 host->mapped_sg = kmap_atomic(host->cur_sg->page, KM_BIO_SRC_IRQ) +
285 host->cur_sg->offset; 283 host->cur_sg->offset;
286 return host->mapped_sg; 284 return host->mapped_sg;
287} 285}
288 286
289static inline void wbsd_kunmap_sg(struct wbsd_host* host) 287static inline void wbsd_kunmap_sg(struct wbsd_host *host)
290{ 288{
291 kunmap_atomic(host->mapped_sg, KM_BIO_SRC_IRQ); 289 kunmap_atomic(host->mapped_sg, KM_BIO_SRC_IRQ);
292} 290}
293 291
294static inline void wbsd_sg_to_dma(struct wbsd_host* host, struct mmc_data* data) 292static inline void wbsd_sg_to_dma(struct wbsd_host *host, struct mmc_data *data)
295{ 293{
296 unsigned int len, i, size; 294 unsigned int len, i, size;
297 struct scatterlist* sg; 295 struct scatterlist *sg;
298 char* dmabuf = host->dma_buffer; 296 char *dmabuf = host->dma_buffer;
299 char* sgbuf; 297 char *sgbuf;
300 298
301 size = host->size; 299 size = host->size;
302 300
@@ -308,8 +306,7 @@ static inline void wbsd_sg_to_dma(struct wbsd_host* host, struct mmc_data* data)
308 * be the entire list though so make sure that 306 * be the entire list though so make sure that
309 * we do not transfer too much. 307 * we do not transfer too much.
310 */ 308 */
311 for (i = 0;i < len;i++) 309 for (i = 0; i < len; i++) {
312 {
313 sgbuf = kmap_atomic(sg[i].page, KM_BIO_SRC_IRQ) + sg[i].offset; 310 sgbuf = kmap_atomic(sg[i].page, KM_BIO_SRC_IRQ) + sg[i].offset;
314 if (size < sg[i].length) 311 if (size < sg[i].length)
315 memcpy(dmabuf, sgbuf, size); 312 memcpy(dmabuf, sgbuf, size);
@@ -337,12 +334,12 @@ static inline void wbsd_sg_to_dma(struct wbsd_host* host, struct mmc_data* data)
337 host->size -= size; 334 host->size -= size;
338} 335}
339 336
340static inline void wbsd_dma_to_sg(struct wbsd_host* host, struct mmc_data* data) 337static inline void wbsd_dma_to_sg(struct wbsd_host *host, struct mmc_data *data)
341{ 338{
342 unsigned int len, i, size; 339 unsigned int len, i, size;
343 struct scatterlist* sg; 340 struct scatterlist *sg;
344 char* dmabuf = host->dma_buffer; 341 char *dmabuf = host->dma_buffer;
345 char* sgbuf; 342 char *sgbuf;
346 343
347 size = host->size; 344 size = host->size;
348 345
@@ -354,8 +351,7 @@ static inline void wbsd_dma_to_sg(struct wbsd_host* host, struct mmc_data* data)
354 * be the entire list though so make sure that 351 * be the entire list though so make sure that
355 * we do not transfer too much. 352 * we do not transfer too much.
356 */ 353 */
357 for (i = 0;i < len;i++) 354 for (i = 0; i < len; i++) {
358 {
359 sgbuf = kmap_atomic(sg[i].page, KM_BIO_SRC_IRQ) + sg[i].offset; 355 sgbuf = kmap_atomic(sg[i].page, KM_BIO_SRC_IRQ) + sg[i].offset;
360 if (size < sg[i].length) 356 if (size < sg[i].length)
361 memcpy(sgbuf, dmabuf, size); 357 memcpy(sgbuf, dmabuf, size);
@@ -387,46 +383,38 @@ static inline void wbsd_dma_to_sg(struct wbsd_host* host, struct mmc_data* data)
387 * Command handling 383 * Command handling
388 */ 384 */
389 385
390static inline void wbsd_get_short_reply(struct wbsd_host* host, 386static inline void wbsd_get_short_reply(struct wbsd_host *host,
391 struct mmc_command* cmd) 387 struct mmc_command *cmd)
392{ 388{
393 /* 389 /*
394 * Correct response type? 390 * Correct response type?
395 */ 391 */
396 if (wbsd_read_index(host, WBSD_IDX_RSPLEN) != WBSD_RSP_SHORT) 392 if (wbsd_read_index(host, WBSD_IDX_RSPLEN) != WBSD_RSP_SHORT) {
397 {
398 cmd->error = MMC_ERR_INVALID; 393 cmd->error = MMC_ERR_INVALID;
399 return; 394 return;
400 } 395 }
401 396
402 cmd->resp[0] = 397 cmd->resp[0] = wbsd_read_index(host, WBSD_IDX_RESP12) << 24;
403 wbsd_read_index(host, WBSD_IDX_RESP12) << 24; 398 cmd->resp[0] |= wbsd_read_index(host, WBSD_IDX_RESP13) << 16;
404 cmd->resp[0] |= 399 cmd->resp[0] |= wbsd_read_index(host, WBSD_IDX_RESP14) << 8;
405 wbsd_read_index(host, WBSD_IDX_RESP13) << 16; 400 cmd->resp[0] |= wbsd_read_index(host, WBSD_IDX_RESP15) << 0;
406 cmd->resp[0] |= 401 cmd->resp[1] = wbsd_read_index(host, WBSD_IDX_RESP16) << 24;
407 wbsd_read_index(host, WBSD_IDX_RESP14) << 8;
408 cmd->resp[0] |=
409 wbsd_read_index(host, WBSD_IDX_RESP15) << 0;
410 cmd->resp[1] =
411 wbsd_read_index(host, WBSD_IDX_RESP16) << 24;
412} 402}
413 403
414static inline void wbsd_get_long_reply(struct wbsd_host* host, 404static inline void wbsd_get_long_reply(struct wbsd_host *host,
415 struct mmc_command* cmd) 405 struct mmc_command *cmd)
416{ 406{
417 int i; 407 int i;
418 408
419 /* 409 /*
420 * Correct response type? 410 * Correct response type?
421 */ 411 */
422 if (wbsd_read_index(host, WBSD_IDX_RSPLEN) != WBSD_RSP_LONG) 412 if (wbsd_read_index(host, WBSD_IDX_RSPLEN) != WBSD_RSP_LONG) {
423 {
424 cmd->error = MMC_ERR_INVALID; 413 cmd->error = MMC_ERR_INVALID;
425 return; 414 return;
426 } 415 }
427 416
428 for (i = 0;i < 4;i++) 417 for (i = 0; i < 4; i++) {
429 {
430 cmd->resp[i] = 418 cmd->resp[i] =
431 wbsd_read_index(host, WBSD_IDX_RESP1 + i * 4) << 24; 419 wbsd_read_index(host, WBSD_IDX_RESP1 + i * 4) << 24;
432 cmd->resp[i] |= 420 cmd->resp[i] |=
@@ -438,7 +426,7 @@ static inline void wbsd_get_long_reply(struct wbsd_host* host,
438 } 426 }
439} 427}
440 428
441static void wbsd_send_command(struct wbsd_host* host, struct mmc_command* cmd) 429static void wbsd_send_command(struct wbsd_host *host, struct mmc_command *cmd)
442{ 430{
443 int i; 431 int i;
444 u8 status, isr; 432 u8 status, isr;
@@ -456,7 +444,7 @@ static void wbsd_send_command(struct wbsd_host* host, struct mmc_command* cmd)
456 * Send the command (CRC calculated by host). 444 * Send the command (CRC calculated by host).
457 */ 445 */
458 outb(cmd->opcode, host->base + WBSD_CMDR); 446 outb(cmd->opcode, host->base + WBSD_CMDR);
459 for (i = 3;i >= 0;i--) 447 for (i = 3; i >= 0; i--)
460 outb((cmd->arg >> (i * 8)) & 0xff, host->base + WBSD_CMDR); 448 outb((cmd->arg >> (i * 8)) & 0xff, host->base + WBSD_CMDR);
461 449
462 cmd->error = MMC_ERR_NONE; 450 cmd->error = MMC_ERR_NONE;
@@ -471,8 +459,7 @@ static void wbsd_send_command(struct wbsd_host* host, struct mmc_command* cmd)
471 /* 459 /*
472 * Do we expect a reply? 460 * Do we expect a reply?
473 */ 461 */
474 if ((cmd->flags & MMC_RSP_MASK) != MMC_RSP_NONE) 462 if ((cmd->flags & MMC_RSP_MASK) != MMC_RSP_NONE) {
475 {
476 /* 463 /*
477 * Read back status. 464 * Read back status.
478 */ 465 */
@@ -488,8 +475,7 @@ static void wbsd_send_command(struct wbsd_host* host, struct mmc_command* cmd)
488 else if ((cmd->flags & MMC_RSP_CRC) && (isr & WBSD_INT_CRC)) 475 else if ((cmd->flags & MMC_RSP_CRC) && (isr & WBSD_INT_CRC))
489 cmd->error = MMC_ERR_BADCRC; 476 cmd->error = MMC_ERR_BADCRC;
490 /* All ok */ 477 /* All ok */
491 else 478 else {
492 {
493 if ((cmd->flags & MMC_RSP_MASK) == MMC_RSP_SHORT) 479 if ((cmd->flags & MMC_RSP_MASK) == MMC_RSP_SHORT)
494 wbsd_get_short_reply(host, cmd); 480 wbsd_get_short_reply(host, cmd);
495 else 481 else
@@ -504,10 +490,10 @@ static void wbsd_send_command(struct wbsd_host* host, struct mmc_command* cmd)
504 * Data functions 490 * Data functions
505 */ 491 */
506 492
507static void wbsd_empty_fifo(struct wbsd_host* host) 493static void wbsd_empty_fifo(struct wbsd_host *host)
508{ 494{
509 struct mmc_data* data = host->mrq->cmd->data; 495 struct mmc_data *data = host->mrq->cmd->data;
510 char* buffer; 496 char *buffer;
511 int i, fsr, fifo; 497 int i, fsr, fifo;
512 498
513 /* 499 /*
@@ -522,8 +508,7 @@ static void wbsd_empty_fifo(struct wbsd_host* host)
522 * Drain the fifo. This has a tendency to loop longer 508 * Drain the fifo. This has a tendency to loop longer
523 * than the FIFO length (usually one block). 509 * than the FIFO length (usually one block).
524 */ 510 */
525 while (!((fsr = inb(host->base + WBSD_FSR)) & WBSD_FIFO_EMPTY)) 511 while (!((fsr = inb(host->base + WBSD_FSR)) & WBSD_FIFO_EMPTY)) {
526 {
527 /* 512 /*
528 * The size field in the FSR is broken so we have to 513 * The size field in the FSR is broken so we have to
529 * do some guessing. 514 * do some guessing.
@@ -535,8 +520,7 @@ static void wbsd_empty_fifo(struct wbsd_host* host)
535 else 520 else
536 fifo = 1; 521 fifo = 1;
537 522
538 for (i = 0;i < fifo;i++) 523 for (i = 0; i < fifo; i++) {
539 {
540 *buffer = inb(host->base + WBSD_DFR); 524 *buffer = inb(host->base + WBSD_DFR);
541 buffer++; 525 buffer++;
542 host->offset++; 526 host->offset++;
@@ -547,8 +531,7 @@ static void wbsd_empty_fifo(struct wbsd_host* host)
547 /* 531 /*
548 * Transfer done? 532 * Transfer done?
549 */ 533 */
550 if (data->bytes_xfered == host->size) 534 if (data->bytes_xfered == host->size) {
551 {
552 wbsd_kunmap_sg(host); 535 wbsd_kunmap_sg(host);
553 return; 536 return;
554 } 537 }
@@ -556,15 +539,13 @@ static void wbsd_empty_fifo(struct wbsd_host* host)
556 /* 539 /*
557 * End of scatter list entry? 540 * End of scatter list entry?
558 */ 541 */
559 if (host->remain == 0) 542 if (host->remain == 0) {
560 {
561 wbsd_kunmap_sg(host); 543 wbsd_kunmap_sg(host);
562 544
563 /* 545 /*
564 * Get next entry. Check if last. 546 * Get next entry. Check if last.
565 */ 547 */
566 if (!wbsd_next_sg(host)) 548 if (!wbsd_next_sg(host)) {
567 {
568 /* 549 /*
569 * We should never reach this point. 550 * We should never reach this point.
570 * It means that we're trying to 551 * It means that we're trying to
@@ -594,10 +575,10 @@ static void wbsd_empty_fifo(struct wbsd_host* host)
594 tasklet_schedule(&host->fifo_tasklet); 575 tasklet_schedule(&host->fifo_tasklet);
595} 576}
596 577
597static void wbsd_fill_fifo(struct wbsd_host* host) 578static void wbsd_fill_fifo(struct wbsd_host *host)
598{ 579{
599 struct mmc_data* data = host->mrq->cmd->data; 580 struct mmc_data *data = host->mrq->cmd->data;
600 char* buffer; 581 char *buffer;
601 int i, fsr, fifo; 582 int i, fsr, fifo;
602 583
603 /* 584 /*
@@ -613,8 +594,7 @@ static void wbsd_fill_fifo(struct wbsd_host* host)
613 * Fill the fifo. This has a tendency to loop longer 594 * Fill the fifo. This has a tendency to loop longer
614 * than the FIFO length (usually one block). 595 * than the FIFO length (usually one block).
615 */ 596 */
616 while (!((fsr = inb(host->base + WBSD_FSR)) & WBSD_FIFO_FULL)) 597 while (!((fsr = inb(host->base + WBSD_FSR)) & WBSD_FIFO_FULL)) {
617 {
618 /* 598 /*
619 * The size field in the FSR is broken so we have to 599 * The size field in the FSR is broken so we have to
620 * do some guessing. 600 * do some guessing.
@@ -626,8 +606,7 @@ static void wbsd_fill_fifo(struct wbsd_host* host)
626 else 606 else
627 fifo = 15; 607 fifo = 15;
628 608
629 for (i = 16;i > fifo;i--) 609 for (i = 16; i > fifo; i--) {
630 {
631 outb(*buffer, host->base + WBSD_DFR); 610 outb(*buffer, host->base + WBSD_DFR);
632 buffer++; 611 buffer++;
633 host->offset++; 612 host->offset++;
@@ -638,8 +617,7 @@ static void wbsd_fill_fifo(struct wbsd_host* host)
638 /* 617 /*
639 * Transfer done? 618 * Transfer done?
640 */ 619 */
641 if (data->bytes_xfered == host->size) 620 if (data->bytes_xfered == host->size) {
642 {
643 wbsd_kunmap_sg(host); 621 wbsd_kunmap_sg(host);
644 return; 622 return;
645 } 623 }
@@ -647,15 +625,13 @@ static void wbsd_fill_fifo(struct wbsd_host* host)
647 /* 625 /*
648 * End of scatter list entry? 626 * End of scatter list entry?
649 */ 627 */
650 if (host->remain == 0) 628 if (host->remain == 0) {
651 {
652 wbsd_kunmap_sg(host); 629 wbsd_kunmap_sg(host);
653 630
654 /* 631 /*
655 * Get next entry. Check if last. 632 * Get next entry. Check if last.
656 */ 633 */
657 if (!wbsd_next_sg(host)) 634 if (!wbsd_next_sg(host)) {
658 {
659 /* 635 /*
660 * We should never reach this point. 636 * We should never reach this point.
661 * It means that we're trying to 637 * It means that we're trying to
@@ -684,7 +660,7 @@ static void wbsd_fill_fifo(struct wbsd_host* host)
684 tasklet_schedule(&host->fifo_tasklet); 660 tasklet_schedule(&host->fifo_tasklet);
685} 661}
686 662
687static void wbsd_prepare_data(struct wbsd_host* host, struct mmc_data* data) 663static void wbsd_prepare_data(struct wbsd_host *host, struct mmc_data *data)
688{ 664{
689 u16 blksize; 665 u16 blksize;
690 u8 setup; 666 u8 setup;
@@ -706,8 +682,10 @@ static void wbsd_prepare_data(struct wbsd_host* host, struct mmc_data* data)
706 */ 682 */
707 if (data->timeout_ns > 127000000) 683 if (data->timeout_ns > 127000000)
708 wbsd_write_index(host, WBSD_IDX_TAAC, 127); 684 wbsd_write_index(host, WBSD_IDX_TAAC, 127);
709 else 685 else {
710 wbsd_write_index(host, WBSD_IDX_TAAC, data->timeout_ns/1000000); 686 wbsd_write_index(host, WBSD_IDX_TAAC,
687 data->timeout_ns / 1000000);
688 }
711 689
712 if (data->timeout_clks > 255) 690 if (data->timeout_clks > 255)
713 wbsd_write_index(host, WBSD_IDX_NSAC, 255); 691 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)
722 * Space for CRC must be included in the size. 700 * Space for CRC must be included in the size.
723 * Two bytes are needed for each data line. 701 * Two bytes are needed for each data line.
724 */ 702 */
725 if (host->bus_width == MMC_BUS_WIDTH_1) 703 if (host->bus_width == MMC_BUS_WIDTH_1) {
726 {
727 blksize = (1 << data->blksz_bits) + 2; 704 blksize = (1 << data->blksz_bits) + 2;
728 705
729 wbsd_write_index(host, WBSD_IDX_PBSMSB, (blksize >> 4) & 0xF0); 706 wbsd_write_index(host, WBSD_IDX_PBSMSB, (blksize >> 4) & 0xF0);
730 wbsd_write_index(host, WBSD_IDX_PBSLSB, blksize & 0xFF); 707 wbsd_write_index(host, WBSD_IDX_PBSLSB, blksize & 0xFF);
731 } 708 } else if (host->bus_width == MMC_BUS_WIDTH_4) {
732 else if (host->bus_width == MMC_BUS_WIDTH_4)
733 {
734 blksize = (1 << data->blksz_bits) + 2 * 4; 709 blksize = (1 << data->blksz_bits) + 2 * 4;
735 710
736 wbsd_write_index(host, WBSD_IDX_PBSMSB, ((blksize >> 4) & 0xF0) 711 wbsd_write_index(host, WBSD_IDX_PBSMSB,
737 | WBSD_DATA_WIDTH); 712 ((blksize >> 4) & 0xF0) | WBSD_DATA_WIDTH);
738 wbsd_write_index(host, WBSD_IDX_PBSLSB, blksize & 0xFF); 713 wbsd_write_index(host, WBSD_IDX_PBSLSB, blksize & 0xFF);
739 } 714 } else {
740 else
741 {
742 data->error = MMC_ERR_INVALID; 715 data->error = MMC_ERR_INVALID;
743 return; 716 return;
744 } 717 }
@@ -755,14 +728,12 @@ static void wbsd_prepare_data(struct wbsd_host* host, struct mmc_data* data)
755 /* 728 /*
756 * DMA transfer? 729 * DMA transfer?
757 */ 730 */
758 if (host->dma >= 0) 731 if (host->dma >= 0) {
759 {
760 /* 732 /*
761 * The buffer for DMA is only 64 kB. 733 * The buffer for DMA is only 64 kB.
762 */ 734 */
763 BUG_ON(host->size > 0x10000); 735 BUG_ON(host->size > 0x10000);
764 if (host->size > 0x10000) 736 if (host->size > 0x10000) {
765 {
766 data->error = MMC_ERR_INVALID; 737 data->error = MMC_ERR_INVALID;
767 return; 738 return;
768 } 739 }
@@ -794,9 +765,7 @@ static void wbsd_prepare_data(struct wbsd_host* host, struct mmc_data* data)
794 * Enable DMA on the host. 765 * Enable DMA on the host.
795 */ 766 */
796 wbsd_write_index(host, WBSD_IDX_DMA, WBSD_DMA_ENABLE); 767 wbsd_write_index(host, WBSD_IDX_DMA, WBSD_DMA_ENABLE);
797 } 768 } else {
798 else
799 {
800 /* 769 /*
801 * This flag is used to keep printk 770 * This flag is used to keep printk
802 * output to a minimum. 771 * output to a minimum.
@@ -817,13 +786,10 @@ static void wbsd_prepare_data(struct wbsd_host* host, struct mmc_data* data)
817 * Set up FIFO threshold levels (and fill 786 * Set up FIFO threshold levels (and fill
818 * buffer if doing a write). 787 * buffer if doing a write).
819 */ 788 */
820 if (data->flags & MMC_DATA_READ) 789 if (data->flags & MMC_DATA_READ) {
821 {
822 wbsd_write_index(host, WBSD_IDX_FIFOEN, 790 wbsd_write_index(host, WBSD_IDX_FIFOEN,
823 WBSD_FIFOEN_FULL | 8); 791 WBSD_FIFOEN_FULL | 8);
824 } 792 } else {
825 else
826 {
827 wbsd_write_index(host, WBSD_IDX_FIFOEN, 793 wbsd_write_index(host, WBSD_IDX_FIFOEN,
828 WBSD_FIFOEN_EMPTY | 8); 794 WBSD_FIFOEN_EMPTY | 8);
829 wbsd_fill_fifo(host); 795 wbsd_fill_fifo(host);
@@ -833,7 +799,7 @@ static void wbsd_prepare_data(struct wbsd_host* host, struct mmc_data* data)
833 data->error = MMC_ERR_NONE; 799 data->error = MMC_ERR_NONE;
834} 800}
835 801
836static void wbsd_finish_data(struct wbsd_host* host, struct mmc_data* data) 802static void wbsd_finish_data(struct wbsd_host *host, struct mmc_data *data)
837{ 803{
838 unsigned long dmaflags; 804 unsigned long dmaflags;
839 int count; 805 int count;
@@ -851,16 +817,14 @@ static void wbsd_finish_data(struct wbsd_host* host, struct mmc_data* data)
851 * Wait for the controller to leave data 817 * Wait for the controller to leave data
852 * transfer state. 818 * transfer state.
853 */ 819 */
854 do 820 do {
855 {
856 status = wbsd_read_index(host, WBSD_IDX_STATUS); 821 status = wbsd_read_index(host, WBSD_IDX_STATUS);
857 } while (status & (WBSD_BLOCK_READ | WBSD_BLOCK_WRITE)); 822 } while (status & (WBSD_BLOCK_READ | WBSD_BLOCK_WRITE));
858 823
859 /* 824 /*
860 * DMA transfer? 825 * DMA transfer?
861 */ 826 */
862 if (host->dma >= 0) 827 if (host->dma >= 0) {
863 {
864 /* 828 /*
865 * Disable DMA on the host. 829 * Disable DMA on the host.
866 */ 830 */
@@ -878,16 +842,13 @@ static void wbsd_finish_data(struct wbsd_host* host, struct mmc_data* data)
878 /* 842 /*
879 * Any leftover data? 843 * Any leftover data?
880 */ 844 */
881 if (count) 845 if (count) {
882 {
883 printk(KERN_ERR "%s: Incomplete DMA transfer. " 846 printk(KERN_ERR "%s: Incomplete DMA transfer. "
884 "%d bytes left.\n", 847 "%d bytes left.\n",
885 mmc_hostname(host->mmc), count); 848 mmc_hostname(host->mmc), count);
886 849
887 data->error = MMC_ERR_FAILED; 850 data->error = MMC_ERR_FAILED;
888 } 851 } else {
889 else
890 {
891 /* 852 /*
892 * Transfer data from DMA buffer to 853 * Transfer data from DMA buffer to
893 * SG list. 854 * SG list.
@@ -910,10 +871,10 @@ static void wbsd_finish_data(struct wbsd_host* host, struct mmc_data* data)
910 * * 871 * *
911\*****************************************************************************/ 872\*****************************************************************************/
912 873
913static void wbsd_request(struct mmc_host* mmc, struct mmc_request* mrq) 874static void wbsd_request(struct mmc_host *mmc, struct mmc_request *mrq)
914{ 875{
915 struct wbsd_host* host = mmc_priv(mmc); 876 struct wbsd_host *host = mmc_priv(mmc);
916 struct mmc_command* cmd; 877 struct mmc_command *cmd;
917 878
918 /* 879 /*
919 * Disable tasklets to avoid a deadlock. 880 * Disable tasklets to avoid a deadlock.
@@ -930,8 +891,7 @@ static void wbsd_request(struct mmc_host* mmc, struct mmc_request* mrq)
930 * If there is no card in the slot then 891 * If there is no card in the slot then
931 * timeout immediatly. 892 * timeout immediatly.
932 */ 893 */
933 if (!(host->flags & WBSD_FCARD_PRESENT)) 894 if (!(host->flags & WBSD_FCARD_PRESENT)) {
934 {
935 cmd->error = MMC_ERR_TIMEOUT; 895 cmd->error = MMC_ERR_TIMEOUT;
936 goto done; 896 goto done;
937 } 897 }
@@ -939,8 +899,7 @@ static void wbsd_request(struct mmc_host* mmc, struct mmc_request* mrq)
939 /* 899 /*
940 * Does the request include data? 900 * Does the request include data?
941 */ 901 */
942 if (cmd->data) 902 if (cmd->data) {
943 {
944 wbsd_prepare_data(host, cmd->data); 903 wbsd_prepare_data(host, cmd->data);
945 904
946 if (cmd->data->error != MMC_ERR_NONE) 905 if (cmd->data->error != MMC_ERR_NONE)
@@ -954,8 +913,7 @@ static void wbsd_request(struct mmc_host* mmc, struct mmc_request* mrq)
954 * will be finished after the data has 913 * will be finished after the data has
955 * transfered. 914 * transfered.
956 */ 915 */
957 if (cmd->data && (cmd->error == MMC_ERR_NONE)) 916 if (cmd->data && (cmd->error == MMC_ERR_NONE)) {
958 {
959 /* 917 /*
960 * Dirty fix for hardware bug. 918 * Dirty fix for hardware bug.
961 */ 919 */
@@ -973,14 +931,14 @@ done:
973 spin_unlock_bh(&host->lock); 931 spin_unlock_bh(&host->lock);
974} 932}
975 933
976static void wbsd_set_ios(struct mmc_host* mmc, struct mmc_ios* ios) 934static void wbsd_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
977{ 935{
978 struct wbsd_host* host = mmc_priv(mmc); 936 struct wbsd_host *host = mmc_priv(mmc);
979 u8 clk, setup, pwr; 937 u8 clk, setup, pwr;
980 938
981 DBGF("clock %uHz busmode %u powermode %u cs %u Vdd %u width %u\n", 939 DBGF("clock %uHz busmode %u powermode %u cs %u Vdd %u width %u\n",
982 ios->clock, ios->bus_mode, ios->power_mode, ios->chip_select, 940 ios->clock, ios->bus_mode, ios->power_mode, ios->chip_select,
983 ios->vdd, ios->bus_width); 941 ios->vdd, ios->bus_width);
984 942
985 spin_lock_bh(&host->lock); 943 spin_lock_bh(&host->lock);
986 944
@@ -1004,8 +962,7 @@ static void wbsd_set_ios(struct mmc_host* mmc, struct mmc_ios* ios)
1004 * Only write to the clock register when 962 * Only write to the clock register when
1005 * there is an actual change. 963 * there is an actual change.
1006 */ 964 */
1007 if (clk != host->clk) 965 if (clk != host->clk) {
1008 {
1009 wbsd_write_index(host, WBSD_IDX_CLK, clk); 966 wbsd_write_index(host, WBSD_IDX_CLK, clk);
1010 host->clk = clk; 967 host->clk = clk;
1011 } 968 }
@@ -1013,8 +970,7 @@ static void wbsd_set_ios(struct mmc_host* mmc, struct mmc_ios* ios)
1013 /* 970 /*
1014 * Power up card. 971 * Power up card.
1015 */ 972 */
1016 if (ios->power_mode != MMC_POWER_OFF) 973 if (ios->power_mode != MMC_POWER_OFF) {
1017 {
1018 pwr = inb(host->base + WBSD_CSR); 974 pwr = inb(host->base + WBSD_CSR);
1019 pwr &= ~WBSD_POWER_N; 975 pwr &= ~WBSD_POWER_N;
1020 outb(pwr, host->base + WBSD_CSR); 976 outb(pwr, host->base + WBSD_CSR);
@@ -1026,23 +982,19 @@ static void wbsd_set_ios(struct mmc_host* mmc, struct mmc_ios* ios)
1026 * that needs to be disabled. 982 * that needs to be disabled.
1027 */ 983 */
1028 setup = wbsd_read_index(host, WBSD_IDX_SETUP); 984 setup = wbsd_read_index(host, WBSD_IDX_SETUP);
1029 if (ios->chip_select == MMC_CS_HIGH) 985 if (ios->chip_select == MMC_CS_HIGH) {
1030 {
1031 BUG_ON(ios->bus_width != MMC_BUS_WIDTH_1); 986 BUG_ON(ios->bus_width != MMC_BUS_WIDTH_1);
1032 setup |= WBSD_DAT3_H; 987 setup |= WBSD_DAT3_H;
1033 host->flags |= WBSD_FIGNORE_DETECT; 988 host->flags |= WBSD_FIGNORE_DETECT;
1034 } 989 } else {
1035 else 990 if (setup & WBSD_DAT3_H) {
1036 {
1037 if (setup & WBSD_DAT3_H)
1038 {
1039 setup &= ~WBSD_DAT3_H; 991 setup &= ~WBSD_DAT3_H;
1040 992
1041 /* 993 /*
1042 * We cannot resume card detection immediatly 994 * We cannot resume card detection immediatly
1043 * because of capacitance and delays in the chip. 995 * because of capacitance and delays in the chip.
1044 */ 996 */
1045 mod_timer(&host->ignore_timer, jiffies + HZ/100); 997 mod_timer(&host->ignore_timer, jiffies + HZ / 100);
1046 } 998 }
1047 } 999 }
1048 wbsd_write_index(host, WBSD_IDX_SETUP, setup); 1000 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)
1056 spin_unlock_bh(&host->lock); 1008 spin_unlock_bh(&host->lock);
1057} 1009}
1058 1010
1059static int wbsd_get_ro(struct mmc_host* mmc) 1011static int wbsd_get_ro(struct mmc_host *mmc)
1060{ 1012{
1061 struct wbsd_host* host = mmc_priv(mmc); 1013 struct wbsd_host *host = mmc_priv(mmc);
1062 u8 csr; 1014 u8 csr;
1063 1015
1064 spin_lock_bh(&host->lock); 1016 spin_lock_bh(&host->lock);
@@ -1096,7 +1048,7 @@ static struct mmc_host_ops wbsd_ops = {
1096 1048
1097static void wbsd_reset_ignore(unsigned long data) 1049static void wbsd_reset_ignore(unsigned long data)
1098{ 1050{
1099 struct wbsd_host *host = (struct wbsd_host*)data; 1051 struct wbsd_host *host = (struct wbsd_host *)data;
1100 1052
1101 BUG_ON(host == NULL); 1053 BUG_ON(host == NULL);
1102 1054
@@ -1119,7 +1071,7 @@ static void wbsd_reset_ignore(unsigned long data)
1119 * Tasklets 1071 * Tasklets
1120 */ 1072 */
1121 1073
1122static inline struct mmc_data* wbsd_get_data(struct wbsd_host* host) 1074static inline struct mmc_data *wbsd_get_data(struct wbsd_host *host)
1123{ 1075{
1124 WARN_ON(!host->mrq); 1076 WARN_ON(!host->mrq);
1125 if (!host->mrq) 1077 if (!host->mrq)
@@ -1138,14 +1090,13 @@ static inline struct mmc_data* wbsd_get_data(struct wbsd_host* host)
1138 1090
1139static void wbsd_tasklet_card(unsigned long param) 1091static void wbsd_tasklet_card(unsigned long param)
1140{ 1092{
1141 struct wbsd_host* host = (struct wbsd_host*)param; 1093 struct wbsd_host *host = (struct wbsd_host *)param;
1142 u8 csr; 1094 u8 csr;
1143 int delay = -1; 1095 int delay = -1;
1144 1096
1145 spin_lock(&host->lock); 1097 spin_lock(&host->lock);
1146 1098
1147 if (host->flags & WBSD_FIGNORE_DETECT) 1099 if (host->flags & WBSD_FIGNORE_DETECT) {
1148 {
1149 spin_unlock(&host->lock); 1100 spin_unlock(&host->lock);
1150 return; 1101 return;
1151 } 1102 }
@@ -1153,23 +1104,18 @@ static void wbsd_tasklet_card(unsigned long param)
1153 csr = inb(host->base + WBSD_CSR); 1104 csr = inb(host->base + WBSD_CSR);
1154 WARN_ON(csr == 0xff); 1105 WARN_ON(csr == 0xff);
1155 1106
1156 if (csr & WBSD_CARDPRESENT) 1107 if (csr & WBSD_CARDPRESENT) {
1157 { 1108 if (!(host->flags & WBSD_FCARD_PRESENT)) {
1158 if (!(host->flags & WBSD_FCARD_PRESENT))
1159 {
1160 DBG("Card inserted\n"); 1109 DBG("Card inserted\n");
1161 host->flags |= WBSD_FCARD_PRESENT; 1110 host->flags |= WBSD_FCARD_PRESENT;
1162 1111
1163 delay = 500; 1112 delay = 500;
1164 } 1113 }
1165 } 1114 } else if (host->flags & WBSD_FCARD_PRESENT) {
1166 else if (host->flags & WBSD_FCARD_PRESENT)
1167 {
1168 DBG("Card removed\n"); 1115 DBG("Card removed\n");
1169 host->flags &= ~WBSD_FCARD_PRESENT; 1116 host->flags &= ~WBSD_FCARD_PRESENT;
1170 1117
1171 if (host->mrq) 1118 if (host->mrq) {
1172 {
1173 printk(KERN_ERR "%s: Card removed during transfer!\n", 1119 printk(KERN_ERR "%s: Card removed during transfer!\n",
1174 mmc_hostname(host->mmc)); 1120 mmc_hostname(host->mmc));
1175 wbsd_reset(host); 1121 wbsd_reset(host);
@@ -1193,8 +1139,8 @@ static void wbsd_tasklet_card(unsigned long param)
1193 1139
1194static void wbsd_tasklet_fifo(unsigned long param) 1140static void wbsd_tasklet_fifo(unsigned long param)
1195{ 1141{
1196 struct wbsd_host* host = (struct wbsd_host*)param; 1142 struct wbsd_host *host = (struct wbsd_host *)param;
1197 struct mmc_data* data; 1143 struct mmc_data *data;
1198 1144
1199 spin_lock(&host->lock); 1145 spin_lock(&host->lock);
1200 1146
@@ -1213,8 +1159,7 @@ static void wbsd_tasklet_fifo(unsigned long param)
1213 /* 1159 /*
1214 * Done? 1160 * Done?
1215 */ 1161 */
1216 if (host->size == data->bytes_xfered) 1162 if (host->size == data->bytes_xfered) {
1217 {
1218 wbsd_write_index(host, WBSD_IDX_FIFOEN, 0); 1163 wbsd_write_index(host, WBSD_IDX_FIFOEN, 0);
1219 tasklet_schedule(&host->finish_tasklet); 1164 tasklet_schedule(&host->finish_tasklet);
1220 } 1165 }
@@ -1225,8 +1170,8 @@ end:
1225 1170
1226static void wbsd_tasklet_crc(unsigned long param) 1171static void wbsd_tasklet_crc(unsigned long param)
1227{ 1172{
1228 struct wbsd_host* host = (struct wbsd_host*)param; 1173 struct wbsd_host *host = (struct wbsd_host *)param;
1229 struct mmc_data* data; 1174 struct mmc_data *data;
1230 1175
1231 spin_lock(&host->lock); 1176 spin_lock(&host->lock);
1232 1177
@@ -1249,8 +1194,8 @@ end:
1249 1194
1250static void wbsd_tasklet_timeout(unsigned long param) 1195static void wbsd_tasklet_timeout(unsigned long param)
1251{ 1196{
1252 struct wbsd_host* host = (struct wbsd_host*)param; 1197 struct wbsd_host *host = (struct wbsd_host *)param;
1253 struct mmc_data* data; 1198 struct mmc_data *data;
1254 1199
1255 spin_lock(&host->lock); 1200 spin_lock(&host->lock);
1256 1201
@@ -1273,8 +1218,8 @@ end:
1273 1218
1274static void wbsd_tasklet_finish(unsigned long param) 1219static void wbsd_tasklet_finish(unsigned long param)
1275{ 1220{
1276 struct wbsd_host* host = (struct wbsd_host*)param; 1221 struct wbsd_host *host = (struct wbsd_host *)param;
1277 struct mmc_data* data; 1222 struct mmc_data *data;
1278 1223
1279 spin_lock(&host->lock); 1224 spin_lock(&host->lock);
1280 1225
@@ -1294,14 +1239,13 @@ end:
1294 1239
1295static void wbsd_tasklet_block(unsigned long param) 1240static void wbsd_tasklet_block(unsigned long param)
1296{ 1241{
1297 struct wbsd_host* host = (struct wbsd_host*)param; 1242 struct wbsd_host *host = (struct wbsd_host *)param;
1298 struct mmc_data* data; 1243 struct mmc_data *data;
1299 1244
1300 spin_lock(&host->lock); 1245 spin_lock(&host->lock);
1301 1246
1302 if ((wbsd_read_index(host, WBSD_IDX_CRCSTATUS) & WBSD_CRC_MASK) != 1247 if ((wbsd_read_index(host, WBSD_IDX_CRCSTATUS) & WBSD_CRC_MASK) !=
1303 WBSD_CRC_OK) 1248 WBSD_CRC_OK) {
1304 {
1305 data = wbsd_get_data(host); 1249 data = wbsd_get_data(host);
1306 if (!data) 1250 if (!data)
1307 goto end; 1251 goto end;
@@ -1323,7 +1267,7 @@ end:
1323 1267
1324static irqreturn_t wbsd_irq(int irq, void *dev_id, struct pt_regs *regs) 1268static irqreturn_t wbsd_irq(int irq, void *dev_id, struct pt_regs *regs)
1325{ 1269{
1326 struct wbsd_host* host = dev_id; 1270 struct wbsd_host *host = dev_id;
1327 int isr; 1271 int isr;
1328 1272
1329 isr = inb(host->base + WBSD_ISR); 1273 isr = inb(host->base + WBSD_ISR);
@@ -1365,10 +1309,10 @@ static irqreturn_t wbsd_irq(int irq, void *dev_id, struct pt_regs *regs)
1365 * Allocate/free MMC structure. 1309 * Allocate/free MMC structure.
1366 */ 1310 */
1367 1311
1368static int __devinit wbsd_alloc_mmc(struct device* dev) 1312static int __devinit wbsd_alloc_mmc(struct device *dev)
1369{ 1313{
1370 struct mmc_host* mmc; 1314 struct mmc_host *mmc;
1371 struct wbsd_host* host; 1315 struct wbsd_host *host;
1372 1316
1373 /* 1317 /*
1374 * Allocate MMC structure. 1318 * Allocate MMC structure.
@@ -1388,7 +1332,7 @@ static int __devinit wbsd_alloc_mmc(struct device* dev)
1388 mmc->ops = &wbsd_ops; 1332 mmc->ops = &wbsd_ops;
1389 mmc->f_min = 375000; 1333 mmc->f_min = 375000;
1390 mmc->f_max = 24000000; 1334 mmc->f_max = 24000000;
1391 mmc->ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34; 1335 mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
1392 mmc->caps = MMC_CAP_4_BIT_DATA; 1336 mmc->caps = MMC_CAP_4_BIT_DATA;
1393 1337
1394 spin_lock_init(&host->lock); 1338 spin_lock_init(&host->lock);
@@ -1424,10 +1368,10 @@ static int __devinit wbsd_alloc_mmc(struct device* dev)
1424 return 0; 1368 return 0;
1425} 1369}
1426 1370
1427static void __devexit wbsd_free_mmc(struct device* dev) 1371static void __devexit wbsd_free_mmc(struct device *dev)
1428{ 1372{
1429 struct mmc_host* mmc; 1373 struct mmc_host *mmc;
1430 struct wbsd_host* host; 1374 struct wbsd_host *host;
1431 1375
1432 mmc = dev_get_drvdata(dev); 1376 mmc = dev_get_drvdata(dev);
1433 if (!mmc) 1377 if (!mmc)
@@ -1447,7 +1391,7 @@ static void __devexit wbsd_free_mmc(struct device* dev)
1447 * Scan for known chip id:s 1391 * Scan for known chip id:s
1448 */ 1392 */
1449 1393
1450static int __devinit wbsd_scan(struct wbsd_host* host) 1394static int __devinit wbsd_scan(struct wbsd_host *host)
1451{ 1395{
1452 int i, j, k; 1396 int i, j, k;
1453 int id; 1397 int id;
@@ -1477,16 +1421,14 @@ static int __devinit wbsd_scan(struct wbsd_host* host)
1477 wbsd_lock_config(host); 1421 wbsd_lock_config(host);
1478 1422
1479 for (k = 0; k < ARRAY_SIZE(valid_ids); k++) { 1423 for (k = 0; k < ARRAY_SIZE(valid_ids); k++) {
1480 if (id == valid_ids[k]) 1424 if (id == valid_ids[k]) {
1481 {
1482 host->chip_id = id; 1425 host->chip_id = id;
1483 1426
1484 return 0; 1427 return 0;
1485 } 1428 }
1486 } 1429 }
1487 1430
1488 if (id != 0xFFFF) 1431 if (id != 0xFFFF) {
1489 {
1490 DBG("Unknown hardware (id %x) found at %x\n", 1432 DBG("Unknown hardware (id %x) found at %x\n",
1491 id, config_ports[i]); 1433 id, config_ports[i]);
1492 } 1434 }
@@ -1505,7 +1447,7 @@ static int __devinit wbsd_scan(struct wbsd_host* host)
1505 * Allocate/free io port ranges 1447 * Allocate/free io port ranges
1506 */ 1448 */
1507 1449
1508static int __devinit wbsd_request_region(struct wbsd_host* host, int base) 1450static int __devinit wbsd_request_region(struct wbsd_host *host, int base)
1509{ 1451{
1510 if (io & 0x7) 1452 if (io & 0x7)
1511 return -EINVAL; 1453 return -EINVAL;
@@ -1518,7 +1460,7 @@ static int __devinit wbsd_request_region(struct wbsd_host* host, int base)
1518 return 0; 1460 return 0;
1519} 1461}
1520 1462
1521static void __devexit wbsd_release_regions(struct wbsd_host* host) 1463static void __devexit wbsd_release_regions(struct wbsd_host *host)
1522{ 1464{
1523 if (host->base) 1465 if (host->base)
1524 release_region(host->base, 8); 1466 release_region(host->base, 8);
@@ -1535,7 +1477,7 @@ static void __devexit wbsd_release_regions(struct wbsd_host* host)
1535 * Allocate/free DMA port and buffer 1477 * Allocate/free DMA port and buffer
1536 */ 1478 */
1537 1479
1538static void __devinit wbsd_request_dma(struct wbsd_host* host, int dma) 1480static void __devinit wbsd_request_dma(struct wbsd_host *host, int dma)
1539{ 1481{
1540 if (dma < 0) 1482 if (dma < 0)
1541 return; 1483 return;
@@ -1579,8 +1521,8 @@ kfree:
1579 */ 1521 */
1580 BUG_ON(1); 1522 BUG_ON(1);
1581 1523
1582 dma_unmap_single(host->mmc->dev, host->dma_addr, WBSD_DMA_SIZE, 1524 dma_unmap_single(host->mmc->dev, host->dma_addr,
1583 DMA_BIDIRECTIONAL); 1525 WBSD_DMA_SIZE, DMA_BIDIRECTIONAL);
1584 host->dma_addr = (dma_addr_t)NULL; 1526 host->dma_addr = (dma_addr_t)NULL;
1585 1527
1586 kfree(host->dma_buffer); 1528 kfree(host->dma_buffer);
@@ -1594,11 +1536,12 @@ err:
1594 "Falling back on FIFO.\n", dma); 1536 "Falling back on FIFO.\n", dma);
1595} 1537}
1596 1538
1597static void __devexit wbsd_release_dma(struct wbsd_host* host) 1539static void __devexit wbsd_release_dma(struct wbsd_host *host)
1598{ 1540{
1599 if (host->dma_addr) 1541 if (host->dma_addr) {
1600 dma_unmap_single(host->mmc->dev, host->dma_addr, WBSD_DMA_SIZE, 1542 dma_unmap_single(host->mmc->dev, host->dma_addr,
1601 DMA_BIDIRECTIONAL); 1543 WBSD_DMA_SIZE, DMA_BIDIRECTIONAL);
1544 }
1602 kfree(host->dma_buffer); 1545 kfree(host->dma_buffer);
1603 if (host->dma >= 0) 1546 if (host->dma >= 0)
1604 free_dma(host->dma); 1547 free_dma(host->dma);
@@ -1612,7 +1555,7 @@ static void __devexit wbsd_release_dma(struct wbsd_host* host)
1612 * Allocate/free IRQ. 1555 * Allocate/free IRQ.
1613 */ 1556 */
1614 1557
1615static int __devinit wbsd_request_irq(struct wbsd_host* host, int irq) 1558static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq)
1616{ 1559{
1617 int ret; 1560 int ret;
1618 1561
@@ -1629,17 +1572,23 @@ static int __devinit wbsd_request_irq(struct wbsd_host* host, int irq)
1629 /* 1572 /*
1630 * Set up tasklets. 1573 * Set up tasklets.
1631 */ 1574 */
1632 tasklet_init(&host->card_tasklet, wbsd_tasklet_card, (unsigned long)host); 1575 tasklet_init(&host->card_tasklet, wbsd_tasklet_card,
1633 tasklet_init(&host->fifo_tasklet, wbsd_tasklet_fifo, (unsigned long)host); 1576 (unsigned long)host);
1634 tasklet_init(&host->crc_tasklet, wbsd_tasklet_crc, (unsigned long)host); 1577 tasklet_init(&host->fifo_tasklet, wbsd_tasklet_fifo,
1635 tasklet_init(&host->timeout_tasklet, wbsd_tasklet_timeout, (unsigned long)host); 1578 (unsigned long)host);
1636 tasklet_init(&host->finish_tasklet, wbsd_tasklet_finish, (unsigned long)host); 1579 tasklet_init(&host->crc_tasklet, wbsd_tasklet_crc,
1637 tasklet_init(&host->block_tasklet, wbsd_tasklet_block, (unsigned long)host); 1580 (unsigned long)host);
1581 tasklet_init(&host->timeout_tasklet, wbsd_tasklet_timeout,
1582 (unsigned long)host);
1583 tasklet_init(&host->finish_tasklet, wbsd_tasklet_finish,
1584 (unsigned long)host);
1585 tasklet_init(&host->block_tasklet, wbsd_tasklet_block,
1586 (unsigned long)host);
1638 1587
1639 return 0; 1588 return 0;
1640} 1589}
1641 1590
1642static void __devexit wbsd_release_irq(struct wbsd_host* host) 1591static void __devexit wbsd_release_irq(struct wbsd_host *host)
1643{ 1592{
1644 if (!host->irq) 1593 if (!host->irq)
1645 return; 1594 return;
@@ -1660,7 +1609,7 @@ static void __devexit wbsd_release_irq(struct wbsd_host* host)
1660 * Allocate all resources for the host. 1609 * Allocate all resources for the host.
1661 */ 1610 */
1662 1611
1663static int __devinit wbsd_request_resources(struct wbsd_host* host, 1612static int __devinit wbsd_request_resources(struct wbsd_host *host,
1664 int base, int irq, int dma) 1613 int base, int irq, int dma)
1665{ 1614{
1666 int ret; 1615 int ret;
@@ -1691,7 +1640,7 @@ static int __devinit wbsd_request_resources(struct wbsd_host* host,
1691 * Release all resources for the host. 1640 * Release all resources for the host.
1692 */ 1641 */
1693 1642
1694static void __devexit wbsd_release_resources(struct wbsd_host* host) 1643static void __devexit wbsd_release_resources(struct wbsd_host *host)
1695{ 1644{
1696 wbsd_release_dma(host); 1645 wbsd_release_dma(host);
1697 wbsd_release_irq(host); 1646 wbsd_release_irq(host);
@@ -1702,7 +1651,7 @@ static void __devexit wbsd_release_resources(struct wbsd_host* host)
1702 * Configure the resources the chip should use. 1651 * Configure the resources the chip should use.
1703 */ 1652 */
1704 1653
1705static void wbsd_chip_config(struct wbsd_host* host) 1654static void wbsd_chip_config(struct wbsd_host *host)
1706{ 1655{
1707 wbsd_unlock_config(host); 1656 wbsd_unlock_config(host);
1708 1657
@@ -1746,7 +1695,7 @@ static void wbsd_chip_config(struct wbsd_host* host)
1746 * Check that configured resources are correct. 1695 * Check that configured resources are correct.
1747 */ 1696 */
1748 1697
1749static int wbsd_chip_validate(struct wbsd_host* host) 1698static int wbsd_chip_validate(struct wbsd_host *host)
1750{ 1699{
1751 int base, irq, dma; 1700 int base, irq, dma;
1752 1701
@@ -1786,7 +1735,7 @@ static int wbsd_chip_validate(struct wbsd_host* host)
1786 * Powers down the SD function 1735 * Powers down the SD function
1787 */ 1736 */
1788 1737
1789static void wbsd_chip_poweroff(struct wbsd_host* host) 1738static void wbsd_chip_poweroff(struct wbsd_host *host)
1790{ 1739{
1791 wbsd_unlock_config(host); 1740 wbsd_unlock_config(host);
1792 1741
@@ -1802,11 +1751,11 @@ static void wbsd_chip_poweroff(struct wbsd_host* host)
1802 * * 1751 * *
1803\*****************************************************************************/ 1752\*****************************************************************************/
1804 1753
1805static int __devinit wbsd_init(struct device* dev, int base, int irq, int dma, 1754static int __devinit wbsd_init(struct device *dev, int base, int irq, int dma,
1806 int pnp) 1755 int pnp)
1807{ 1756{
1808 struct wbsd_host* host = NULL; 1757 struct wbsd_host *host = NULL;
1809 struct mmc_host* mmc = NULL; 1758 struct mmc_host *mmc = NULL;
1810 int ret; 1759 int ret;
1811 1760
1812 ret = wbsd_alloc_mmc(dev); 1761 ret = wbsd_alloc_mmc(dev);
@@ -1820,16 +1769,12 @@ static int __devinit wbsd_init(struct device* dev, int base, int irq, int dma,
1820 * Scan for hardware. 1769 * Scan for hardware.
1821 */ 1770 */
1822 ret = wbsd_scan(host); 1771 ret = wbsd_scan(host);
1823 if (ret) 1772 if (ret) {
1824 { 1773 if (pnp && (ret == -ENODEV)) {
1825 if (pnp && (ret == -ENODEV))
1826 {
1827 printk(KERN_WARNING DRIVER_NAME 1774 printk(KERN_WARNING DRIVER_NAME
1828 ": Unable to confirm device presence. You may " 1775 ": Unable to confirm device presence. You may "
1829 "experience lock-ups.\n"); 1776 "experience lock-ups.\n");
1830 } 1777 } else {
1831 else
1832 {
1833 wbsd_free_mmc(dev); 1778 wbsd_free_mmc(dev);
1834 return ret; 1779 return ret;
1835 } 1780 }
@@ -1839,8 +1784,7 @@ static int __devinit wbsd_init(struct device* dev, int base, int irq, int dma,
1839 * Request resources. 1784 * Request resources.
1840 */ 1785 */
1841 ret = wbsd_request_resources(host, io, irq, dma); 1786 ret = wbsd_request_resources(host, io, irq, dma);
1842 if (ret) 1787 if (ret) {
1843 {
1844 wbsd_release_resources(host); 1788 wbsd_release_resources(host);
1845 wbsd_free_mmc(dev); 1789 wbsd_free_mmc(dev);
1846 return ret; 1790 return ret;
@@ -1849,18 +1793,15 @@ static int __devinit wbsd_init(struct device* dev, int base, int irq, int dma,
1849 /* 1793 /*
1850 * See if chip needs to be configured. 1794 * See if chip needs to be configured.
1851 */ 1795 */
1852 if (pnp) 1796 if (pnp) {
1853 { 1797 if ((host->config != 0) && !wbsd_chip_validate(host)) {
1854 if ((host->config != 0) && !wbsd_chip_validate(host))
1855 {
1856 printk(KERN_WARNING DRIVER_NAME 1798 printk(KERN_WARNING DRIVER_NAME
1857 ": PnP active but chip not configured! " 1799 ": PnP active but chip not configured! "
1858 "You probably have a buggy BIOS. " 1800 "You probably have a buggy BIOS. "
1859 "Configuring chip manually.\n"); 1801 "Configuring chip manually.\n");
1860 wbsd_chip_config(host); 1802 wbsd_chip_config(host);
1861 } 1803 }
1862 } 1804 } else
1863 else
1864 wbsd_chip_config(host); 1805 wbsd_chip_config(host);
1865 1806
1866 /* 1807 /*
@@ -1868,8 +1809,7 @@ static int __devinit wbsd_init(struct device* dev, int base, int irq, int dma,
1868 * Not tested. 1809 * Not tested.
1869 */ 1810 */
1870#ifdef CONFIG_PM 1811#ifdef CONFIG_PM
1871 if (host->config) 1812 if (host->config) {
1872 {
1873 wbsd_unlock_config(host); 1813 wbsd_unlock_config(host);
1874 wbsd_write_config(host, WBSD_CONF_PME, 0xA0); 1814 wbsd_write_config(host, WBSD_CONF_PME, 0xA0);
1875 wbsd_lock_config(host); 1815 wbsd_lock_config(host);
@@ -1902,10 +1842,10 @@ static int __devinit wbsd_init(struct device* dev, int base, int irq, int dma,
1902 return 0; 1842 return 0;
1903} 1843}
1904 1844
1905static void __devexit wbsd_shutdown(struct device* dev, int pnp) 1845static void __devexit wbsd_shutdown(struct device *dev, int pnp)
1906{ 1846{
1907 struct mmc_host* mmc = dev_get_drvdata(dev); 1847 struct mmc_host *mmc = dev_get_drvdata(dev);
1908 struct wbsd_host* host; 1848 struct wbsd_host *host;
1909 1849
1910 if (!mmc) 1850 if (!mmc)
1911 return; 1851 return;
@@ -1929,12 +1869,12 @@ static void __devexit wbsd_shutdown(struct device* dev, int pnp)
1929 * Non-PnP 1869 * Non-PnP
1930 */ 1870 */
1931 1871
1932static int __devinit wbsd_probe(struct platform_device* dev) 1872static int __devinit wbsd_probe(struct platform_device *dev)
1933{ 1873{
1934 return wbsd_init(&dev->dev, io, irq, dma, 0); 1874 return wbsd_init(&dev->dev, io, irq, dma, 0);
1935} 1875}
1936 1876
1937static int __devexit wbsd_remove(struct platform_device* dev) 1877static int __devexit wbsd_remove(struct platform_device *dev)
1938{ 1878{
1939 wbsd_shutdown(&dev->dev, 0); 1879 wbsd_shutdown(&dev->dev, 0);
1940 1880
@@ -1948,7 +1888,7 @@ static int __devexit wbsd_remove(struct platform_device* dev)
1948#ifdef CONFIG_PNP 1888#ifdef CONFIG_PNP
1949 1889
1950static int __devinit 1890static int __devinit
1951wbsd_pnp_probe(struct pnp_dev * pnpdev, const struct pnp_device_id *dev_id) 1891wbsd_pnp_probe(struct pnp_dev *pnpdev, const struct pnp_device_id *dev_id)
1952{ 1892{
1953 int io, irq, dma; 1893 int io, irq, dma;
1954 1894
@@ -1967,7 +1907,7 @@ wbsd_pnp_probe(struct pnp_dev * pnpdev, const struct pnp_device_id *dev_id)
1967 return wbsd_init(&pnpdev->dev, io, irq, dma, 1); 1907 return wbsd_init(&pnpdev->dev, io, irq, dma, 1);
1968} 1908}
1969 1909
1970static void __devexit wbsd_pnp_remove(struct pnp_dev * dev) 1910static void __devexit wbsd_pnp_remove(struct pnp_dev *dev)
1971{ 1911{
1972 wbsd_shutdown(&dev->dev, 1); 1912 wbsd_shutdown(&dev->dev, 1);
1973} 1913}
@@ -1980,37 +1920,54 @@ static void __devexit wbsd_pnp_remove(struct pnp_dev * dev)
1980 1920
1981#ifdef CONFIG_PM 1921#ifdef CONFIG_PM
1982 1922
1983static int wbsd_suspend(struct platform_device *dev, pm_message_t state) 1923static int wbsd_suspend(struct wbsd_host *host, pm_message_t state)
1924{
1925 BUG_ON(host == NULL);
1926
1927 return mmc_suspend_host(host->mmc, state);
1928}
1929
1930static int wbsd_resume(struct wbsd_host *host)
1931{
1932 BUG_ON(host == NULL);
1933
1934 wbsd_init_device(host);
1935
1936 return mmc_resume_host(host->mmc);
1937}
1938
1939static int wbsd_platform_suspend(struct platform_device *dev,
1940 pm_message_t state)
1984{ 1941{
1985 struct mmc_host *mmc = platform_get_drvdata(dev); 1942 struct mmc_host *mmc = platform_get_drvdata(dev);
1986 struct wbsd_host *host; 1943 struct wbsd_host *host;
1987 int ret; 1944 int ret;
1988 1945
1989 if (!mmc) 1946 if (mmc == NULL)
1990 return 0; 1947 return 0;
1991 1948
1992 DBG("Suspending...\n"); 1949 DBGF("Suspending...\n");
1993
1994 ret = mmc_suspend_host(mmc, state);
1995 if (!ret)
1996 return ret;
1997 1950
1998 host = mmc_priv(mmc); 1951 host = mmc_priv(mmc);
1999 1952
1953 ret = wbsd_suspend(host, state);
1954 if (ret)
1955 return ret;
1956
2000 wbsd_chip_poweroff(host); 1957 wbsd_chip_poweroff(host);
2001 1958
2002 return 0; 1959 return 0;
2003} 1960}
2004 1961
2005static int wbsd_resume(struct platform_device *dev) 1962static int wbsd_platform_resume(struct platform_device *dev)
2006{ 1963{
2007 struct mmc_host *mmc = platform_get_drvdata(dev); 1964 struct mmc_host *mmc = platform_get_drvdata(dev);
2008 struct wbsd_host *host; 1965 struct wbsd_host *host;
2009 1966
2010 if (!mmc) 1967 if (mmc == NULL)
2011 return 0; 1968 return 0;
2012 1969
2013 DBG("Resuming...\n"); 1970 DBGF("Resuming...\n");
2014 1971
2015 host = mmc_priv(mmc); 1972 host = mmc_priv(mmc);
2016 1973
@@ -2021,15 +1978,68 @@ static int wbsd_resume(struct platform_device *dev)
2021 */ 1978 */
2022 mdelay(5); 1979 mdelay(5);
2023 1980
2024 wbsd_init_device(host); 1981 return wbsd_resume(host);
1982}
1983
1984#ifdef CONFIG_PNP
1985
1986static int wbsd_pnp_suspend(struct pnp_dev *pnp_dev, pm_message_t state)
1987{
1988 struct mmc_host *mmc = dev_get_drvdata(&pnp_dev->dev);
1989 struct wbsd_host *host;
1990
1991 if (mmc == NULL)
1992 return 0;
1993
1994 DBGF("Suspending...\n");
1995
1996 host = mmc_priv(mmc);
1997
1998 return wbsd_suspend(host, state);
1999}
2000
2001static int wbsd_pnp_resume(struct pnp_dev *pnp_dev)
2002{
2003 struct mmc_host *mmc = dev_get_drvdata(&pnp_dev->dev);
2004 struct wbsd_host *host;
2005
2006 if (mmc == NULL)
2007 return 0;
2008
2009 DBGF("Resuming...\n");
2025 2010
2026 return mmc_resume_host(mmc); 2011 host = mmc_priv(mmc);
2012
2013 /*
2014 * See if chip needs to be configured.
2015 */
2016 if (host->config != 0) {
2017 if (!wbsd_chip_validate(host)) {
2018 printk(KERN_WARNING DRIVER_NAME
2019 ": PnP active but chip not configured! "
2020 "You probably have a buggy BIOS. "
2021 "Configuring chip manually.\n");
2022 wbsd_chip_config(host);
2023 }
2024 }
2025
2026 /*
2027 * Allow device to initialise itself properly.
2028 */
2029 mdelay(5);
2030
2031 return wbsd_resume(host);
2027} 2032}
2028 2033
2034#endif /* CONFIG_PNP */
2035
2029#else /* CONFIG_PM */ 2036#else /* CONFIG_PM */
2030 2037
2031#define wbsd_suspend NULL 2038#define wbsd_platform_suspend NULL
2032#define wbsd_resume NULL 2039#define wbsd_platform_resume NULL
2040
2041#define wbsd_pnp_suspend NULL
2042#define wbsd_pnp_resume NULL
2033 2043
2034#endif /* CONFIG_PM */ 2044#endif /* CONFIG_PM */
2035 2045
@@ -2039,8 +2049,8 @@ static struct platform_driver wbsd_driver = {
2039 .probe = wbsd_probe, 2049 .probe = wbsd_probe,
2040 .remove = __devexit_p(wbsd_remove), 2050 .remove = __devexit_p(wbsd_remove),
2041 2051
2042 .suspend = wbsd_suspend, 2052 .suspend = wbsd_platform_suspend,
2043 .resume = wbsd_resume, 2053 .resume = wbsd_platform_resume,
2044 .driver = { 2054 .driver = {
2045 .name = DRIVER_NAME, 2055 .name = DRIVER_NAME,
2046 }, 2056 },
@@ -2053,6 +2063,9 @@ static struct pnp_driver wbsd_pnp_driver = {
2053 .id_table = pnp_dev_table, 2063 .id_table = pnp_dev_table,
2054 .probe = wbsd_pnp_probe, 2064 .probe = wbsd_pnp_probe,
2055 .remove = __devexit_p(wbsd_pnp_remove), 2065 .remove = __devexit_p(wbsd_pnp_remove),
2066
2067 .suspend = wbsd_pnp_suspend,
2068 .resume = wbsd_pnp_resume,
2056}; 2069};
2057 2070
2058#endif /* CONFIG_PNP */ 2071#endif /* CONFIG_PNP */
@@ -2072,31 +2085,26 @@ static int __init wbsd_drv_init(void)
2072 2085
2073#ifdef CONFIG_PNP 2086#ifdef CONFIG_PNP
2074 2087
2075 if (!nopnp) 2088 if (!nopnp) {
2076 {
2077 result = pnp_register_driver(&wbsd_pnp_driver); 2089 result = pnp_register_driver(&wbsd_pnp_driver);
2078 if (result < 0) 2090 if (result < 0)
2079 return result; 2091 return result;
2080 } 2092 }
2081
2082#endif /* CONFIG_PNP */ 2093#endif /* CONFIG_PNP */
2083 2094
2084 if (nopnp) 2095 if (nopnp) {
2085 {
2086 result = platform_driver_register(&wbsd_driver); 2096 result = platform_driver_register(&wbsd_driver);
2087 if (result < 0) 2097 if (result < 0)
2088 return result; 2098 return result;
2089 2099
2090 wbsd_device = platform_device_alloc(DRIVER_NAME, -1); 2100 wbsd_device = platform_device_alloc(DRIVER_NAME, -1);
2091 if (!wbsd_device) 2101 if (!wbsd_device) {
2092 {
2093 platform_driver_unregister(&wbsd_driver); 2102 platform_driver_unregister(&wbsd_driver);
2094 return -ENOMEM; 2103 return -ENOMEM;
2095 } 2104 }
2096 2105
2097 result = platform_device_add(wbsd_device); 2106 result = platform_device_add(wbsd_device);
2098 if (result) 2107 if (result) {
2099 {
2100 platform_device_put(wbsd_device); 2108 platform_device_put(wbsd_device);
2101 platform_driver_unregister(&wbsd_driver); 2109 platform_driver_unregister(&wbsd_driver);
2102 return result; 2110 return result;
@@ -2115,8 +2123,7 @@ static void __exit wbsd_drv_exit(void)
2115 2123
2116#endif /* CONFIG_PNP */ 2124#endif /* CONFIG_PNP */
2117 2125
2118 if (nopnp) 2126 if (nopnp) {
2119 {
2120 platform_device_unregister(wbsd_device); 2127 platform_device_unregister(wbsd_device);
2121 2128
2122 platform_driver_unregister(&wbsd_driver); 2129 platform_driver_unregister(&wbsd_driver);
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index b9b77cf39a18..7abd7fee0dda 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -473,14 +473,6 @@ config MTD_IXP2000
473 IXDP425 and Coyote. If you have an IXP2000 based board and 473 IXDP425 and Coyote. If you have an IXP2000 based board and
474 would like to use the flash chips on it, say 'Y'. 474 would like to use the flash chips on it, say 'Y'.
475 475
476config MTD_EPXA10DB
477 tristate "CFI Flash device mapped on Epxa10db"
478 depends on MTD_CFI && MTD_PARTITIONS && ARCH_CAMELOT
479 help
480 This enables support for the flash devices on the Altera
481 Excalibur XA10 Development Board. If you are building a kernel
482 for on of these boards then you should say 'Y' otherwise say 'N'.
483
484config MTD_FORTUNET 476config MTD_FORTUNET
485 tristate "CFI Flash device mapped on the FortuNet board" 477 tristate "CFI Flash device mapped on the FortuNet board"
486 depends on MTD_CFI && MTD_PARTITIONS && SA1100_FORTUNET 478 depends on MTD_CFI && MTD_PARTITIONS && SA1100_FORTUNET
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
index 2f7e254912f0..ab71f172eb77 100644
--- a/drivers/mtd/maps/Makefile
+++ b/drivers/mtd/maps/Makefile
@@ -15,7 +15,6 @@ obj-$(CONFIG_MTD_CFI_FLAGADM) += cfi_flagadm.o
15obj-$(CONFIG_MTD_CSTM_MIPS_IXX) += cstm_mips_ixx.o 15obj-$(CONFIG_MTD_CSTM_MIPS_IXX) += cstm_mips_ixx.o
16obj-$(CONFIG_MTD_DC21285) += dc21285.o 16obj-$(CONFIG_MTD_DC21285) += dc21285.o
17obj-$(CONFIG_MTD_DILNETPC) += dilnetpc.o 17obj-$(CONFIG_MTD_DILNETPC) += dilnetpc.o
18obj-$(CONFIG_MTD_EPXA10DB) += epxa10db-flash.o
19obj-$(CONFIG_MTD_IQ80310) += iq80310.o 18obj-$(CONFIG_MTD_IQ80310) += iq80310.o
20obj-$(CONFIG_MTD_L440GX) += l440gx.o 19obj-$(CONFIG_MTD_L440GX) += l440gx.o
21obj-$(CONFIG_MTD_AMD76XROM) += amd76xrom.o 20obj-$(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
index 265b079fe934..000000000000
--- a/drivers/mtd/maps/epxa10db-flash.c
+++ /dev/null
@@ -1,179 +0,0 @@
1/*
2 * Flash memory access on EPXA based devices
3 *
4 * (C) 2000 Nicolas Pitre <nico@cam.org>
5 * Copyright (C) 2001 Altera Corporation
6 * Copyright (C) 2001 Red Hat, Inc.
7 *
8 * $Id: epxa10db-flash.c,v 1.15 2005/11/07 11:14:27 gleixner Exp $
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24
25#include <linux/config.h>
26#include <linux/module.h>
27#include <linux/types.h>
28#include <linux/kernel.h>
29#include <linux/init.h>
30#include <linux/slab.h>
31
32#include <linux/mtd/mtd.h>
33#include <linux/mtd/map.h>
34#include <linux/mtd/partitions.h>
35
36#include <asm/io.h>
37#include <asm/hardware.h>
38
39#ifdef CONFIG_EPXA10DB
40#define BOARD_NAME "EPXA10DB"
41#else
42#define BOARD_NAME "EPXA1DB"
43#endif
44
45static int nr_parts = 0;
46static struct mtd_partition *parts;
47
48static struct mtd_info *mymtd;
49
50static int epxa_default_partitions(struct mtd_info *master, struct mtd_partition **pparts);
51
52
53static struct map_info epxa_map = {
54 .name = "EPXA flash",
55 .size = FLASH_SIZE,
56 .bankwidth = 2,
57 .phys = FLASH_START,
58};
59
60static const char *probes[] = { "RedBoot", "afs", NULL };
61
62static int __init epxa_mtd_init(void)
63{
64 int i;
65
66 printk(KERN_NOTICE "%s flash device: 0x%x at 0x%x\n", BOARD_NAME, FLASH_SIZE, FLASH_START);
67
68 epxa_map.virt = ioremap(FLASH_START, FLASH_SIZE);
69 if (!epxa_map.virt) {
70 printk("Failed to ioremap %s flash\n",BOARD_NAME);
71 return -EIO;
72 }
73 simple_map_init(&epxa_map);
74
75 mymtd = do_map_probe("cfi_probe", &epxa_map);
76 if (!mymtd) {
77 iounmap((void *)epxa_map.virt);
78 return -ENXIO;
79 }
80
81 mymtd->owner = THIS_MODULE;
82
83 /* Unlock the flash device. */
84 if(mymtd->unlock){
85 for (i=0; i<mymtd->numeraseregions;i++){
86 int j;
87 for(j=0;j<mymtd->eraseregions[i].numblocks;j++){
88 mymtd->unlock(mymtd,mymtd->eraseregions[i].offset + j * mymtd->eraseregions[i].erasesize,mymtd->eraseregions[i].erasesize);
89 }
90 }
91 }
92
93#ifdef CONFIG_MTD_PARTITIONS
94 nr_parts = parse_mtd_partitions(mymtd, probes, &parts, 0);
95
96 if (nr_parts > 0) {
97 add_mtd_partitions(mymtd, parts, nr_parts);
98 return 0;
99 }
100#endif
101 /* No recognised partitioning schemes found - use defaults */
102 nr_parts = epxa_default_partitions(mymtd, &parts);
103 if (nr_parts > 0) {
104 add_mtd_partitions(mymtd, parts, nr_parts);
105 return 0;
106 }
107
108 /* If all else fails... */
109 add_mtd_device(mymtd);
110 return 0;
111}
112
113static void __exit epxa_mtd_cleanup(void)
114{
115 if (mymtd) {
116 if (nr_parts)
117 del_mtd_partitions(mymtd);
118 else
119 del_mtd_device(mymtd);
120 map_destroy(mymtd);
121 }
122 if (epxa_map.virt) {
123 iounmap((void *)epxa_map.virt);
124 epxa_map.virt = 0;
125 }
126}
127
128
129/*
130 * This will do for now, once we decide which bootldr we're finally
131 * going to use then we'll remove this function and do it properly
132 *
133 * Partions are currently (as offsets from base of flash):
134 * 0x00000000 - 0x003FFFFF - bootloader (!)
135 * 0x00400000 - 0x00FFFFFF - Flashdisk
136 */
137
138static int __init epxa_default_partitions(struct mtd_info *master, struct mtd_partition **pparts)
139{
140 struct mtd_partition *parts;
141 int ret, i;
142 int npartitions = 0;
143 char *names;
144 const char *name = "jffs";
145
146 printk("Using default partitions for %s\n",BOARD_NAME);
147 npartitions=1;
148 parts = kmalloc(npartitions*sizeof(*parts)+strlen(name), GFP_KERNEL);
149 memzero(parts,npartitions*sizeof(*parts)+strlen(name));
150 if (!parts) {
151 ret = -ENOMEM;
152 goto out;
153 }
154 i=0;
155 names = (char *)&parts[npartitions];
156 parts[i].name = names;
157 names += strlen(name) + 1;
158 strcpy(parts[i].name, name);
159
160#ifdef CONFIG_EPXA10DB
161 parts[i].size = FLASH_SIZE-0x00400000;
162 parts[i].offset = 0x00400000;
163#else
164 parts[i].size = FLASH_SIZE-0x00180000;
165 parts[i].offset = 0x00180000;
166#endif
167
168 out:
169 *pparts = parts;
170 return npartitions;
171}
172
173
174module_init(epxa_mtd_init);
175module_exit(epxa_mtd_cleanup);
176
177MODULE_AUTHOR("Clive Davies");
178MODULE_DESCRIPTION("Altera epxa mtd flash map");
179MODULE_LICENSE("GPL");
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 733bc25b2bf9..4959800a18d7 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -27,6 +27,19 @@ config NETDEVICES
27# that for each of the symbols. 27# that for each of the symbols.
28if NETDEVICES 28if NETDEVICES
29 29
30config IFB
31 tristate "Intermediate Functional Block support"
32 depends on NET_CLS_ACT
33 ---help---
34 This is an intermidiate driver that allows sharing of
35 resources.
36 To compile this driver as a module, choose M here: the module
37 will be called ifb. If you want to use more than one ifb
38 device at a time, you need to compile this driver as a module.
39 Instead of 'ifb', the devices will then be called 'ifb0',
40 'ifb1' etc.
41 Look at the iproute2 documentation directory for usage etc
42
30config DUMMY 43config DUMMY
31 tristate "Dummy net driver support" 44 tristate "Dummy net driver support"
32 ---help--- 45 ---help---
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index b74a7cb5bae6..00e72b12fb92 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -125,6 +125,7 @@ ifeq ($(CONFIG_SLIP_COMPRESSED),y)
125endif 125endif
126 126
127obj-$(CONFIG_DUMMY) += dummy.o 127obj-$(CONFIG_DUMMY) += dummy.o
128obj-$(CONFIG_IFB) += ifb.o
128obj-$(CONFIG_DE600) += de600.o 129obj-$(CONFIG_DE600) += de600.o
129obj-$(CONFIG_DE620) += de620.o 130obj-$(CONFIG_DE620) += de620.o
130obj-$(CONFIG_LANCE) += lance.o 131obj-$(CONFIG_LANCE) += lance.o
diff --git a/drivers/net/arm/Kconfig b/drivers/net/arm/Kconfig
index 470364deded0..625184b65e38 100644
--- a/drivers/net/arm/Kconfig
+++ b/drivers/net/arm/Kconfig
@@ -31,16 +31,3 @@ config ARM_ETHERH
31 help 31 help
32 If you have an Acorn system with one of these network cards, you 32 If you have an Acorn system with one of these network cards, you
33 should say Y to this option if you wish to use it with Linux. 33 should say Y to this option if you wish to use it with Linux.
34
35config ARM_ETHER00
36 tristate "Altera Ether00 support"
37 depends on NET_ETHERNET && ARM && ARCH_CAMELOT
38 help
39 This is the driver for Altera's ether00 ethernet mac IP core. Say
40 Y here if you want to build support for this into the kernel. It
41 is also available as a module (say M here) that can be inserted/
42 removed from the kernel at the same time as the PLD is configured.
43 If this driver is running on an epxa10 development board then it
44 will generate a suitable hw address based on the board serial
45 number (MTD support is required for this). Otherwise you will
46 need to set a suitable hw address using ifconfig.
diff --git a/drivers/net/arm/Makefile b/drivers/net/arm/Makefile
index b0d706834d89..bc263edf06a7 100644
--- a/drivers/net/arm/Makefile
+++ b/drivers/net/arm/Makefile
@@ -4,7 +4,6 @@
4# 4#
5 5
6obj-$(CONFIG_ARM_AM79C961A) += am79c961a.o 6obj-$(CONFIG_ARM_AM79C961A) += am79c961a.o
7obj-$(CONFIG_ARM_ETHER00) += ether00.o
8obj-$(CONFIG_ARM_ETHERH) += etherh.o 7obj-$(CONFIG_ARM_ETHERH) += etherh.o
9obj-$(CONFIG_ARM_ETHER3) += ether3.o 8obj-$(CONFIG_ARM_ETHER3) += ether3.o
10obj-$(CONFIG_ARM_ETHER1) += ether1.o 9obj-$(CONFIG_ARM_ETHER1) += ether1.o
diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c
index 877891a29aaa..53e3afc1b7b7 100644
--- a/drivers/net/arm/am79c961a.c
+++ b/drivers/net/arm/am79c961a.c
@@ -668,9 +668,8 @@ static void __init am79c961_banner(void)
668 printk(KERN_INFO "%s", version); 668 printk(KERN_INFO "%s", version);
669} 669}
670 670
671static int __init am79c961_probe(struct device *_dev) 671static int __init am79c961_probe(struct platform_device *pdev)
672{ 672{
673 struct platform_device *pdev = to_platform_device(_dev);
674 struct resource *res; 673 struct resource *res;
675 struct net_device *dev; 674 struct net_device *dev;
676 struct dev_priv *priv; 675 struct dev_priv *priv;
@@ -758,15 +757,16 @@ out:
758 return ret; 757 return ret;
759} 758}
760 759
761static struct device_driver am79c961_driver = { 760static struct platform_driver am79c961_driver = {
762 .name = "am79c961",
763 .bus = &platform_bus_type,
764 .probe = am79c961_probe, 761 .probe = am79c961_probe,
762 .driver = {
763 .name = "am79c961",
764 },
765}; 765};
766 766
767static int __init am79c961_init(void) 767static int __init am79c961_init(void)
768{ 768{
769 return driver_register(&am79c961_driver); 769 return platform_driver_register(&am79c961_driver);
770} 770}
771 771
772__initcall(am79c961_init); 772__initcall(am79c961_init);
diff --git a/drivers/net/arm/ether00.c b/drivers/net/arm/ether00.c
deleted file mode 100644
index 4f1f4e31bda5..000000000000
--- a/drivers/net/arm/ether00.c
+++ /dev/null
@@ -1,1017 +0,0 @@
1/*
2 * drivers/net/ether00.c
3 *
4 * Copyright (C) 2001 Altera Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21/* includes */
22#include <linux/config.h>
23#include <linux/pci.h>
24#include <linux/sched.h>
25#include <linux/netdevice.h>
26#include <linux/skbuff.h>
27#include <linux/etherdevice.h>
28#include <linux/module.h>
29#include <linux/tqueue.h>
30#include <linux/mtd/mtd.h>
31#include <linux/pld/pld_hotswap.h>
32#include <asm/arch/excalibur.h>
33#include <asm/arch/hardware.h>
34#include <asm/irq.h>
35#include <asm/io.h>
36#include <asm/sizes.h>
37
38#include <asm/arch/ether00.h>
39#include <asm/arch/tdkphy.h>
40
41
42MODULE_AUTHOR("Clive Davies");
43MODULE_DESCRIPTION("Altera Ether00 IP core driver");
44MODULE_LICENSE("GPL");
45
46#define PKT_BUF_SZ 1540 /* Size of each rx buffer */
47#define ETH_NR 4 /* Number of MACs this driver supports */
48
49#define DEBUG(x)
50
51#define __dma_va(x) (unsigned int)((unsigned int)priv->dma_data+(((unsigned int)(x))&(EXC_SPSRAM_BLOCK0_SIZE-1)))
52#define __dma_pa(x) (unsigned int)(EXC_SPSRAM_BLOCK0_BASE+(((unsigned int)(x))-(unsigned int)priv->dma_data))
53
54#define ETHER00_BASE 0
55#define ETHER00_TYPE
56#define ETHER00_NAME "ether00"
57#define MAC_REG_SIZE 0x400 /* size of MAC register area */
58
59
60
61/* typedefs */
62
63/* The definition of the driver control structure */
64
65#define RX_NUM_BUFF 10
66#define RX_NUM_FDESC 10
67#define TX_NUM_FDESC 10
68
69struct tx_fda_ent{
70 FDA_DESC fd;
71 BUF_DESC bd;
72 BUF_DESC pad;
73};
74struct rx_fda_ent{
75 FDA_DESC fd;
76 BUF_DESC bd;
77 BUF_DESC pad;
78};
79struct rx_blist_ent{
80 FDA_DESC fd;
81 BUF_DESC bd;
82 BUF_DESC pad;
83};
84struct net_priv
85{
86 struct net_device_stats stats;
87 struct sk_buff* skb;
88 void* dma_data;
89 struct rx_blist_ent* rx_blist_vp;
90 struct rx_fda_ent* rx_fda_ptr;
91 struct tx_fda_ent* tx_fdalist_vp;
92 struct tq_struct tq_memupdate;
93 unsigned char memupdate_scheduled;
94 unsigned char rx_disabled;
95 unsigned char queue_stopped;
96 spinlock_t rx_lock;
97};
98
99static const char vendor_id[2]={0x07,0xed};
100
101#ifdef ETHER00_DEBUG
102
103/* Dump (most) registers for debugging puposes */
104
105static void dump_regs(struct net_device *dev){
106 struct net_priv* priv=dev->priv;
107 unsigned int* i;
108
109 printk("\n RX free descriptor area:\n");
110
111 for(i=(unsigned int*)priv->rx_fda_ptr;
112 i<((unsigned int*)(priv->rx_fda_ptr+RX_NUM_FDESC));){
113 printk("%#8x %#8x %#8x %#8x\n",*i,*(i+1),*(i+2),*(i+3));
114 i+=4;
115 }
116
117 printk("\n RX buffer list:\n");
118
119 for(i=(unsigned int*)priv->rx_blist_vp;
120 i<((unsigned int*)(priv->rx_blist_vp+RX_NUM_BUFF));){
121 printk("%#8x %#8x %#8x %#8x\n",*i,*(i+1),*(i+2),*(i+3));
122 i+=4;
123 }
124
125 printk("\n TX frame descriptor list:\n");
126
127 for(i=(unsigned int*)priv->tx_fdalist_vp;
128 i<((unsigned int*)(priv->tx_fdalist_vp+TX_NUM_FDESC));){
129 printk("%#8x %#8x %#8x %#8x\n",*i,*(i+1),*(i+2),*(i+3));
130 i+=4;
131 }
132
133 printk("\ndma ctl=%#x\n",readw(ETHER_DMA_CTL(dev->base_addr)));
134 printk("txfrmptr=%#x\n",readw(ETHER_TXFRMPTR(dev->base_addr)));
135 printk("txthrsh=%#x\n",readw(ETHER_TXTHRSH(dev->base_addr)));
136 printk("txpollctr=%#x\n",readw(ETHER_TXPOLLCTR(dev->base_addr)));
137 printk("blfrmptr=%#x\n",readw(ETHER_BLFRMPTR(dev->base_addr)));
138 printk("rxfragsize=%#x\n",readw(ETHER_RXFRAGSIZE(dev->base_addr)));
139 printk("tx_int_en=%#x\n",readw(ETHER_INT_EN(dev->base_addr)));
140 printk("fda_bas=%#x\n",readw(ETHER_FDA_BAS(dev->base_addr)));
141 printk("fda_lim=%#x\n",readw(ETHER_FDA_LIM(dev->base_addr)));
142 printk("int_src=%#x\n",readw(ETHER_INT_SRC(dev->base_addr)));
143 printk("pausecnt=%#x\n",readw(ETHER_PAUSECNT(dev->base_addr)));
144 printk("rempaucnt=%#x\n",readw(ETHER_REMPAUCNT(dev->base_addr)));
145 printk("txconfrmstat=%#x\n",readw(ETHER_TXCONFRMSTAT(dev->base_addr)));
146 printk("mac_ctl=%#x\n",readw(ETHER_MAC_CTL(dev->base_addr)));
147 printk("arc_ctl=%#x\n",readw(ETHER_ARC_CTL(dev->base_addr)));
148 printk("tx_ctl=%#x\n",readw(ETHER_TX_CTL(dev->base_addr)));
149}
150#endif /* ETHER00_DEBUG */
151
152
153static int ether00_write_phy(struct net_device *dev, short address, short value)
154{
155 volatile int count = 1024;
156 writew(value,ETHER_MD_DATA(dev->base_addr));
157 writew( ETHER_MD_CA_BUSY_MSK |
158 ETHER_MD_CA_WR_MSK |
159 (address & ETHER_MD_CA_ADDR_MSK),
160 ETHER_MD_CA(dev->base_addr));
161
162 /* Wait for the command to complete */
163 while((readw(ETHER_MD_CA(dev->base_addr)) & ETHER_MD_CA_BUSY_MSK)&&count){
164 count--;
165 }
166 if (!count){
167 printk("Write to phy failed, addr=%#x, data=%#x\n",address, value);
168 return -EIO;
169 }
170 return 0;
171}
172
173static int ether00_read_phy(struct net_device *dev, short address)
174{
175 volatile int count = 1024;
176 writew( ETHER_MD_CA_BUSY_MSK |
177 (address & ETHER_MD_CA_ADDR_MSK),
178 ETHER_MD_CA(dev->base_addr));
179
180 /* Wait for the command to complete */
181 while((readw(ETHER_MD_CA(dev->base_addr)) & ETHER_MD_CA_BUSY_MSK)&&count){
182 count--;
183 }
184 if (!count){
185 printk(KERN_WARNING "Read from phy timed out\n");
186 return -EIO;
187 }
188 return readw(ETHER_MD_DATA(dev->base_addr));
189}
190
191static void ether00_phy_int(int irq_num, void* dev_id, struct pt_regs* regs)
192{
193 struct net_device* dev=dev_id;
194 int irq_status;
195
196 irq_status=ether00_read_phy(dev, PHY_IRQ_CONTROL);
197
198 if(irq_status & PHY_IRQ_CONTROL_ANEG_COMP_INT_MSK){
199 /*
200 * Autonegotiation complete on epxa10db. The mac doesn't
201 * twig if we're in full duplex so we need to check the
202 * phy status register and configure the mac accordingly
203 */
204 if(ether00_read_phy(dev, PHY_STATUS)&(PHY_STATUS_10T_F_MSK|PHY_STATUS_100_X_F_MSK)){
205 int tmp;
206 tmp=readl(ETHER_MAC_CTL(dev->base_addr));
207 writel(tmp|ETHER_MAC_CTL_FULLDUP_MSK,ETHER_MAC_CTL(dev->base_addr));
208 }
209 }
210
211 if(irq_status&PHY_IRQ_CONTROL_LS_CHG_INT_MSK){
212
213 if(ether00_read_phy(dev, PHY_STATUS)& PHY_STATUS_LINK_MSK){
214 /* Link is up */
215 netif_carrier_on(dev);
216 //printk("Carrier on\n");
217 }else{
218 netif_carrier_off(dev);
219 //printk("Carrier off\n");
220
221 }
222 }
223
224}
225
226static void setup_blist_entry(struct sk_buff* skb,struct rx_blist_ent* blist_ent_ptr){
227 /* Make the buffer consistent with the cache as the mac is going to write
228 * directly into it*/
229 blist_ent_ptr->fd.FDSystem=(unsigned int)skb;
230 blist_ent_ptr->bd.BuffData=(char*)__pa(skb->data);
231 consistent_sync(skb->data,PKT_BUF_SZ,PCI_DMA_FROMDEVICE);
232 /* align IP on 16 Byte (DMA_CTL set to skip 2 bytes) */
233 skb_reserve(skb,2);
234 blist_ent_ptr->bd.BuffLength=PKT_BUF_SZ-2;
235 blist_ent_ptr->fd.FDLength=1;
236 blist_ent_ptr->fd.FDCtl=FDCTL_COWNSFD_MSK;
237 blist_ent_ptr->bd.BDCtl=BDCTL_COWNSBD_MSK;
238}
239
240
241static int ether00_mem_init(struct net_device* dev)
242{
243 struct net_priv* priv=dev->priv;
244 struct tx_fda_ent *tx_fd_ptr,*tx_end_ptr;
245 struct rx_blist_ent* blist_ent_ptr;
246 int i;
247
248 /*
249 * Grab a block of on chip SRAM to contain the control stuctures for
250 * the ethernet MAC. This uncached becuase it needs to be accesses by both
251 * bus masters (cpu + mac). However, it shouldn't matter too much in terms
252 * of speed as its on chip memory
253 */
254 priv->dma_data=ioremap_nocache(EXC_SPSRAM_BLOCK0_BASE,EXC_SPSRAM_BLOCK0_SIZE );
255 if (!priv->dma_data)
256 return -ENOMEM;
257
258 priv->rx_fda_ptr=(struct rx_fda_ent*)priv->dma_data;
259 /*
260 * Now share it out amongst the Frame descriptors and the buffer list
261 */
262 priv->rx_blist_vp=(struct rx_blist_ent*)((unsigned int)priv->dma_data+RX_NUM_FDESC*sizeof(struct rx_fda_ent));
263
264 /*
265 *Initalise the FDA list
266 */
267 /* set ownership to the controller */
268 memset(priv->rx_fda_ptr,0x80,RX_NUM_FDESC*sizeof(struct rx_fda_ent));
269
270 /*
271 *Initialise the buffer list
272 */
273 blist_ent_ptr=priv->rx_blist_vp;
274 i=0;
275 while(blist_ent_ptr<(priv->rx_blist_vp+RX_NUM_BUFF)){
276 struct sk_buff *skb;
277 blist_ent_ptr->fd.FDLength=1;
278 skb=dev_alloc_skb(PKT_BUF_SZ);
279 if(skb){
280 setup_blist_entry(skb,blist_ent_ptr);
281 blist_ent_ptr->fd.FDNext=(FDA_DESC*)__dma_pa(blist_ent_ptr+1);
282 blist_ent_ptr->bd.BDStat=i++;
283 blist_ent_ptr++;
284 }
285 else
286 {
287 printk("Failed to initalise buffer list\n");
288 }
289
290 }
291 blist_ent_ptr--;
292 blist_ent_ptr->fd.FDNext=(FDA_DESC*)__dma_pa(priv->rx_blist_vp);
293
294 priv->tx_fdalist_vp=(struct tx_fda_ent*)(priv->rx_blist_vp+RX_NUM_BUFF);
295
296 /* Initialise the buffers to be a circular list. The mac will then go poll
297 * the list until it finds a frame ready to transmit */
298 tx_end_ptr=priv->tx_fdalist_vp+TX_NUM_FDESC;
299 for(tx_fd_ptr=priv->tx_fdalist_vp;tx_fd_ptr<tx_end_ptr;tx_fd_ptr++){
300 tx_fd_ptr->fd.FDNext=(FDA_DESC*)__dma_pa((tx_fd_ptr+1));
301 tx_fd_ptr->fd.FDCtl=1;
302 tx_fd_ptr->fd.FDStat=0;
303 tx_fd_ptr->fd.FDLength=1;
304
305 }
306 /* Change the last FDNext pointer to make a circular list */
307 tx_fd_ptr--;
308 tx_fd_ptr->fd.FDNext=(FDA_DESC*)__dma_pa(priv->tx_fdalist_vp);
309
310 /* Point the device at the chain of Rx and Tx Buffers */
311 writel((unsigned int)__dma_pa(priv->rx_fda_ptr),ETHER_FDA_BAS(dev->base_addr));
312 writel((RX_NUM_FDESC-1)*sizeof(struct rx_fda_ent),ETHER_FDA_LIM(dev->base_addr));
313 writel((unsigned int)__dma_pa(priv->rx_blist_vp),ETHER_BLFRMPTR(dev->base_addr));
314
315 writel((unsigned int)__dma_pa(priv->tx_fdalist_vp),ETHER_TXFRMPTR(dev->base_addr));
316
317 return 0;
318}
319
320
321void ether00_mem_update(void* dev_id)
322{
323 struct net_device* dev=dev_id;
324 struct net_priv* priv=dev->priv;
325 struct sk_buff* skb;
326 struct tx_fda_ent *fda_ptr=priv->tx_fdalist_vp;
327 struct rx_blist_ent* blist_ent_ptr;
328 unsigned long flags;
329
330 priv->tq_memupdate.sync=0;
331 //priv->tq_memupdate.list=
332 priv->memupdate_scheduled=0;
333
334 /* Transmit interrupt */
335 while(fda_ptr<(priv->tx_fdalist_vp+TX_NUM_FDESC)){
336 if(!(FDCTL_COWNSFD_MSK&fda_ptr->fd.FDCtl) && (ETHER_TX_STAT_COMP_MSK&fda_ptr->fd.FDStat)){
337 priv->stats.tx_packets++;
338 priv->stats.tx_bytes+=fda_ptr->bd.BuffLength;
339 skb=(struct sk_buff*)fda_ptr->fd.FDSystem;
340 //printk("%d:txcln:fda=%#x skb=%#x\n",jiffies,fda_ptr,skb);
341 dev_kfree_skb(skb);
342 fda_ptr->fd.FDSystem=0;
343 fda_ptr->fd.FDStat=0;
344 fda_ptr->fd.FDCtl=0;
345 }
346 fda_ptr++;
347 }
348 /* Fill in any missing buffers from the received queue */
349 spin_lock_irqsave(&priv->rx_lock,flags);
350 blist_ent_ptr=priv->rx_blist_vp;
351 while(blist_ent_ptr<(priv->rx_blist_vp+RX_NUM_BUFF)){
352 /* fd.FDSystem of 0 indicates we failed to allocate the buffer in the ISR */
353 if(!blist_ent_ptr->fd.FDSystem){
354 struct sk_buff *skb;
355 skb=dev_alloc_skb(PKT_BUF_SZ);
356 blist_ent_ptr->fd.FDSystem=(unsigned int)skb;
357 if(skb){
358 setup_blist_entry(skb,blist_ent_ptr);
359 }
360 else
361 {
362 break;
363 }
364 }
365 blist_ent_ptr++;
366 }
367 spin_unlock_irqrestore(&priv->rx_lock,flags);
368 if(priv->queue_stopped){
369 //printk("%d:cln:start q\n",jiffies);
370 netif_start_queue(dev);
371 }
372 if(priv->rx_disabled){
373 //printk("%d:enable_irq\n",jiffies);
374 priv->rx_disabled=0;
375 writel(ETHER_RX_CTL_RXEN_MSK,ETHER_RX_CTL(dev->base_addr));
376
377 }
378}
379
380
381static void ether00_int( int irq_num, void* dev_id, struct pt_regs* regs)
382{
383 struct net_device* dev=dev_id;
384 struct net_priv* priv=dev->priv;
385
386 unsigned int interruptValue;
387
388 interruptValue=readl(ETHER_INT_SRC(dev->base_addr));
389
390 //printk("INT_SRC=%x\n",interruptValue);
391
392 if(!(readl(ETHER_INT_SRC(dev->base_addr)) & ETHER_INT_SRC_IRQ_MSK))
393 {
394 return; /* Interrupt wasn't caused by us!! */
395 }
396
397 if(readl(ETHER_INT_SRC(dev->base_addr))&
398 (ETHER_INT_SRC_INTMACRX_MSK |
399 ETHER_INT_SRC_FDAEX_MSK |
400 ETHER_INT_SRC_BLEX_MSK)) {
401 struct rx_blist_ent* blist_ent_ptr;
402 struct rx_fda_ent* fda_ent_ptr;
403 struct sk_buff* skb;
404
405 fda_ent_ptr=priv->rx_fda_ptr;
406 spin_lock(&priv->rx_lock);
407 while(fda_ent_ptr<(priv->rx_fda_ptr+RX_NUM_FDESC)){
408 int result;
409
410 if(!(fda_ent_ptr->fd.FDCtl&FDCTL_COWNSFD_MSK))
411 {
412 /* This frame is ready for processing */
413 /*find the corresponding buffer in the bufferlist */
414 blist_ent_ptr=priv->rx_blist_vp+fda_ent_ptr->bd.BDStat;
415 skb=(struct sk_buff*)blist_ent_ptr->fd.FDSystem;
416
417 /* Pass this skb up the stack */
418 skb->dev=dev;
419 skb_put(skb,fda_ent_ptr->fd.FDLength);
420 skb->protocol=eth_type_trans(skb,dev);
421 skb->ip_summed=CHECKSUM_UNNECESSARY;
422 result=netif_rx(skb);
423 /* Update statistics */
424 priv->stats.rx_packets++;
425 priv->stats.rx_bytes+=fda_ent_ptr->fd.FDLength;
426
427 /* Free the FDA entry */
428 fda_ent_ptr->bd.BDStat=0xff;
429 fda_ent_ptr->fd.FDCtl=FDCTL_COWNSFD_MSK;
430
431 /* Allocate a new skb and point the bd entry to it */
432 blist_ent_ptr->fd.FDSystem=0;
433 skb=dev_alloc_skb(PKT_BUF_SZ);
434 //printk("allocskb=%#x\n",skb);
435 if(skb){
436 setup_blist_entry(skb,blist_ent_ptr);
437
438 }
439 else if(!priv->memupdate_scheduled){
440 int tmp;
441 /* There are no buffers at the moment, so schedule */
442 /* the background task to sort this out */
443 schedule_task(&priv->tq_memupdate);
444 priv->memupdate_scheduled=1;
445 printk(KERN_DEBUG "%s:No buffers",dev->name);
446 /* If this interrupt was due to a lack of buffers then
447 * we'd better stop the receiver too */
448 if(interruptValue&ETHER_INT_SRC_BLEX_MSK){
449 priv->rx_disabled=1;
450 tmp=readl(ETHER_INT_SRC(dev->base_addr));
451 writel(tmp&~ETHER_RX_CTL_RXEN_MSK,ETHER_RX_CTL(dev->base_addr));
452 printk(KERN_DEBUG "%s:Halting rx",dev->name);
453 }
454
455 }
456
457 }
458 fda_ent_ptr++;
459 }
460 spin_unlock(&priv->rx_lock);
461
462 /* Clear the interrupts */
463 writel(ETHER_INT_SRC_INTMACRX_MSK | ETHER_INT_SRC_FDAEX_MSK
464 | ETHER_INT_SRC_BLEX_MSK,ETHER_INT_SRC(dev->base_addr));
465
466 }
467
468 if(readl(ETHER_INT_SRC(dev->base_addr))&ETHER_INT_SRC_INTMACTX_MSK){
469
470 if(!priv->memupdate_scheduled){
471 schedule_task(&priv->tq_memupdate);
472 priv->memupdate_scheduled=1;
473 }
474 /* Clear the interrupt */
475 writel(ETHER_INT_SRC_INTMACTX_MSK,ETHER_INT_SRC(dev->base_addr));
476 }
477
478 if (readl(ETHER_INT_SRC(dev->base_addr)) & (ETHER_INT_SRC_SWINT_MSK|
479 ETHER_INT_SRC_INTEARNOT_MSK|
480 ETHER_INT_SRC_INTLINK_MSK|
481 ETHER_INT_SRC_INTEXBD_MSK|
482 ETHER_INT_SRC_INTTXCTLCMP_MSK))
483 {
484 /*
485 * Not using any of these so they shouldn't happen
486 *
487 * In the cased of INTEXBD - if you allocate more
488 * than 28 decsriptors you may need to think about this
489 */
490 printk("Not using this interrupt\n");
491 }
492
493 if (readl(ETHER_INT_SRC(dev->base_addr)) &
494 (ETHER_INT_SRC_INTSBUS_MSK |
495 ETHER_INT_SRC_INTNRABT_MSK
496 |ETHER_INT_SRC_DMPARERR_MSK))
497 {
498 /*
499 * Hardware errors, we can either ignore them and hope they go away
500 *or reset the device, I'll try the first for now to see if they happen
501 */
502 printk("Hardware error\n");
503 }
504}
505
506static void ether00_setup_ethernet_address(struct net_device* dev)
507{
508 int tmp;
509
510 dev->addr_len=6;
511 writew(0,ETHER_ARC_ADR(dev->base_addr));
512 writel((dev->dev_addr[0]<<24) |
513 (dev->dev_addr[1]<<16) |
514 (dev->dev_addr[2]<<8) |
515 dev->dev_addr[3],
516 ETHER_ARC_DATA(dev->base_addr));
517
518 writew(4,ETHER_ARC_ADR(dev->base_addr));
519 tmp=readl(ETHER_ARC_DATA(dev->base_addr));
520 tmp&=0xffff;
521 tmp|=(dev->dev_addr[4]<<24) | (dev->dev_addr[5]<<16);
522 writel(tmp, ETHER_ARC_DATA(dev->base_addr));
523 /* Enable this entry in the ARC */
524
525 writel(1,ETHER_ARC_ENA(dev->base_addr));
526
527 return;
528}
529
530
531static void ether00_reset(struct net_device *dev)
532{
533 /* reset the controller */
534 writew(ETHER_MAC_CTL_RESET_MSK,ETHER_MAC_CTL(dev->base_addr));
535
536 /*
537 * Make sure we're not going to send anything
538 */
539
540 writew(ETHER_TX_CTL_TXHALT_MSK,ETHER_TX_CTL(dev->base_addr));
541
542 /*
543 * Make sure we're not going to receive anything
544 */
545 writew(ETHER_RX_CTL_RXHALT_MSK,ETHER_RX_CTL(dev->base_addr));
546
547 /*
548 * Disable Interrupts for now, and set the burst size to 8 bytes
549 */
550
551 writel(ETHER_DMA_CTL_INTMASK_MSK |
552 ((8 << ETHER_DMA_CTL_DMBURST_OFST) & ETHER_DMA_CTL_DMBURST_MSK)
553 |(2<<ETHER_DMA_CTL_RXALIGN_OFST),
554 ETHER_DMA_CTL(dev->base_addr));
555
556
557 /*
558 * Set TxThrsh - start transmitting a packet after 1514
559 * bytes or when a packet is complete, whichever comes first
560 */
561 writew(1514,ETHER_TXTHRSH(dev->base_addr));
562
563 /*
564 * Set TxPollCtr. Each cycle is
565 * 61.44 microseconds with a 33 MHz bus
566 */
567 writew(1,ETHER_TXPOLLCTR(dev->base_addr));
568
569 /*
570 * Set Rx_Ctl - Turn off reception and let RxData turn it
571 * on later
572 */
573 writew(ETHER_RX_CTL_RXHALT_MSK,ETHER_RX_CTL(dev->base_addr));
574
575}
576
577
578static void ether00_set_multicast(struct net_device* dev)
579{
580 int count=dev->mc_count;
581
582 /* Set promiscuous mode if it's asked for. */
583
584 if (dev->flags&IFF_PROMISC){
585
586 writew( ETHER_ARC_CTL_COMPEN_MSK |
587 ETHER_ARC_CTL_BROADACC_MSK |
588 ETHER_ARC_CTL_GROUPACC_MSK |
589 ETHER_ARC_CTL_STATIONACC_MSK,
590 ETHER_ARC_CTL(dev->base_addr));
591 return;
592 }
593
594 /*
595 * Get all multicast packets if required, or if there are too
596 * many addresses to fit in hardware
597 */
598 if (dev->flags & IFF_ALLMULTI){
599 writew( ETHER_ARC_CTL_COMPEN_MSK |
600 ETHER_ARC_CTL_GROUPACC_MSK |
601 ETHER_ARC_CTL_BROADACC_MSK,
602 ETHER_ARC_CTL(dev->base_addr));
603 return;
604 }
605 if (dev->mc_count > (ETHER_ARC_SIZE - 1)){
606
607 printk(KERN_WARNING "Too many multicast addresses for hardware to filter - receiving all multicast packets\n");
608 writew( ETHER_ARC_CTL_COMPEN_MSK |
609 ETHER_ARC_CTL_GROUPACC_MSK |
610 ETHER_ARC_CTL_BROADACC_MSK,
611 ETHER_ARC_CTL(dev->base_addr));
612 return;
613 }
614
615 if(dev->mc_count){
616 struct dev_mc_list *mc_list_ent=dev->mc_list;
617 unsigned int temp,i;
618 DEBUG(printk("mc_count=%d mc_list=%#x\n",dev-> mc_count, dev->mc_list));
619 DEBUG(printk("mc addr=%02#x%02x%02x%02x%02x%02x\n",
620 mc_list_ent->dmi_addr[5],
621 mc_list_ent->dmi_addr[4],
622 mc_list_ent->dmi_addr[3],
623 mc_list_ent->dmi_addr[2],
624 mc_list_ent->dmi_addr[1],
625 mc_list_ent->dmi_addr[0]);)
626
627 /*
628 * The first 6 bytes are the MAC address, so
629 * don't change them!
630 */
631 writew(4,ETHER_ARC_ADR(dev->base_addr));
632 temp=readl(ETHER_ARC_DATA(dev->base_addr));
633 temp&=0xffff0000;
634
635 /* Disable the current multicast stuff */
636 writel(1,ETHER_ARC_ENA(dev->base_addr));
637
638 for(;;){
639 temp|=mc_list_ent->dmi_addr[1] |
640 mc_list_ent->dmi_addr[0]<<8;
641 writel(temp,ETHER_ARC_DATA(dev->base_addr));
642
643 i=readl(ETHER_ARC_ADR(dev->base_addr));
644 writew(i+4,ETHER_ARC_ADR(dev->base_addr));
645
646 temp=mc_list_ent->dmi_addr[5]|
647 mc_list_ent->dmi_addr[4]<<8 |
648 mc_list_ent->dmi_addr[3]<<16 |
649 mc_list_ent->dmi_addr[2]<<24;
650 writel(temp,ETHER_ARC_DATA(dev->base_addr));
651
652 count--;
653 if(!mc_list_ent->next || !count){
654 break;
655 }
656 DEBUG(printk("mc_list_next=%#x\n",mc_list_ent->next);)
657 mc_list_ent=mc_list_ent->next;
658
659
660 i=readl(ETHER_ARC_ADR(dev->base_addr));
661 writel(i+4,ETHER_ARC_ADR(dev->base_addr));
662
663 temp=mc_list_ent->dmi_addr[3]|
664 mc_list_ent->dmi_addr[2]<<8 |
665 mc_list_ent->dmi_addr[1]<<16 |
666 mc_list_ent->dmi_addr[0]<<24;
667 writel(temp,ETHER_ARC_DATA(dev->base_addr));
668
669 i=readl(ETHER_ARC_ADR(dev->base_addr));
670 writel(i+4,ETHER_ARC_ADR(dev->base_addr));
671
672 temp=mc_list_ent->dmi_addr[4]<<16 |
673 mc_list_ent->dmi_addr[5]<<24;
674
675 writel(temp,ETHER_ARC_DATA(dev->base_addr));
676
677 count--;
678 if(!mc_list_ent->next || !count){
679 break;
680 }
681 mc_list_ent=mc_list_ent->next;
682 }
683
684
685 if(count)
686 printk(KERN_WARNING "Multicast list size error\n");
687
688
689 writew( ETHER_ARC_CTL_BROADACC_MSK|
690 ETHER_ARC_CTL_COMPEN_MSK,
691 ETHER_ARC_CTL(dev->base_addr));
692
693 }
694
695 /* enable the active ARC enties */
696 writew((1<<(count+2))-1,ETHER_ARC_ENA(dev->base_addr));
697}
698
699
700static int ether00_open(struct net_device* dev)
701{
702 int result,tmp;
703 struct net_priv* priv;
704
705 if (!is_valid_ether_addr(dev->dev_addr))
706 return -EINVAL;
707
708 /* Install interrupt handlers */
709 result=request_irq(dev->irq,ether00_int,0,"ether00",dev);
710 if(result)
711 goto open_err1;
712
713 result=request_irq(2,ether00_phy_int,0,"ether00_phy",dev);
714 if(result)
715 goto open_err2;
716
717 ether00_reset(dev);
718 result=ether00_mem_init(dev);
719 if(result)
720 goto open_err3;
721
722
723 ether00_setup_ethernet_address(dev);
724
725 ether00_set_multicast(dev);
726
727 result=ether00_write_phy(dev,PHY_CONTROL, PHY_CONTROL_ANEGEN_MSK | PHY_CONTROL_RANEG_MSK);
728 if(result)
729 goto open_err4;
730 result=ether00_write_phy(dev,PHY_IRQ_CONTROL, PHY_IRQ_CONTROL_LS_CHG_IE_MSK |
731 PHY_IRQ_CONTROL_ANEG_COMP_IE_MSK);
732 if(result)
733 goto open_err4;
734
735 /* Start the device enable interrupts */
736 writew(ETHER_RX_CTL_RXEN_MSK
737// | ETHER_RX_CTL_STRIPCRC_MSK
738 | ETHER_RX_CTL_ENGOOD_MSK
739 | ETHER_RX_CTL_ENRXPAR_MSK| ETHER_RX_CTL_ENLONGERR_MSK
740 | ETHER_RX_CTL_ENOVER_MSK| ETHER_RX_CTL_ENCRCERR_MSK,
741 ETHER_RX_CTL(dev->base_addr));
742
743 writew(ETHER_TX_CTL_TXEN_MSK|
744 ETHER_TX_CTL_ENEXDEFER_MSK|
745 ETHER_TX_CTL_ENLCARR_MSK|
746 ETHER_TX_CTL_ENEXCOLL_MSK|
747 ETHER_TX_CTL_ENLATECOLL_MSK|
748 ETHER_TX_CTL_ENTXPAR_MSK|
749 ETHER_TX_CTL_ENCOMP_MSK,
750 ETHER_TX_CTL(dev->base_addr));
751
752 tmp=readl(ETHER_DMA_CTL(dev->base_addr));
753 writel(tmp&~ETHER_DMA_CTL_INTMASK_MSK,ETHER_DMA_CTL(dev->base_addr));
754
755 return 0;
756
757 open_err4:
758 ether00_reset(dev);
759 open_err3:
760 free_irq(2,dev);
761 open_err2:
762 free_irq(dev->irq,dev);
763 open_err1:
764 return result;
765
766}
767
768
769static int ether00_tx(struct sk_buff* skb, struct net_device* dev)
770{
771 struct net_priv *priv=dev->priv;
772 struct tx_fda_ent *fda_ptr;
773 int i;
774
775
776 /*
777 * Find an empty slot in which to stick the frame
778 */
779 fda_ptr=(struct tx_fda_ent*)__dma_va(readl(ETHER_TXFRMPTR(dev->base_addr)));
780 i=0;
781 while(i<TX_NUM_FDESC){
782 if (fda_ptr->fd.FDStat||(fda_ptr->fd.FDCtl & FDCTL_COWNSFD_MSK)){
783 fda_ptr =(struct tx_fda_ent*) __dma_va((struct tx_fda_ent*)fda_ptr->fd.FDNext);
784 }
785 else {
786 break;
787 }
788 i++;
789 }
790
791 /* Write the skb data from the cache*/
792 consistent_sync(skb->data,skb->len,PCI_DMA_TODEVICE);
793 fda_ptr->bd.BuffData=(char*)__pa(skb->data);
794 fda_ptr->bd.BuffLength=(unsigned short)skb->len;
795 /* Save the pointer to the skb for freeing later */
796 fda_ptr->fd.FDSystem=(unsigned int)skb;
797 fda_ptr->fd.FDStat=0;
798 /* Pass ownership of the buffers to the controller */
799 fda_ptr->fd.FDCtl=1;
800 fda_ptr->fd.FDCtl|=FDCTL_COWNSFD_MSK;
801
802 /* If the next buffer in the list is full, stop the queue */
803 fda_ptr=(struct tx_fda_ent*)__dma_va(fda_ptr->fd.FDNext);
804 if ((fda_ptr->fd.FDStat)||(fda_ptr->fd.FDCtl & FDCTL_COWNSFD_MSK)){
805 netif_stop_queue(dev);
806 priv->queue_stopped=1;
807 }
808
809 return 0;
810}
811
812static struct net_device_stats *ether00_stats(struct net_device* dev)
813{
814 struct net_priv *priv=dev->priv;
815 return &priv->stats;
816}
817
818
819static int ether00_stop(struct net_device* dev)
820{
821 struct net_priv *priv=dev->priv;
822 int tmp;
823
824 /* Stop/disable the device. */
825 tmp=readw(ETHER_RX_CTL(dev->base_addr));
826 tmp&=~(ETHER_RX_CTL_RXEN_MSK | ETHER_RX_CTL_ENGOOD_MSK);
827 tmp|=ETHER_RX_CTL_RXHALT_MSK;
828 writew(tmp,ETHER_RX_CTL(dev->base_addr));
829
830 tmp=readl(ETHER_TX_CTL(dev->base_addr));
831 tmp&=~ETHER_TX_CTL_TXEN_MSK;
832 tmp|=ETHER_TX_CTL_TXHALT_MSK;
833 writel(tmp,ETHER_TX_CTL(dev->base_addr));
834
835 /* Free up system resources */
836 free_irq(dev->irq,dev);
837 free_irq(2,dev);
838 iounmap(priv->dma_data);
839
840 return 0;
841}
842
843
844static void ether00_get_ethernet_address(struct net_device* dev)
845{
846 struct mtd_info *mymtd=NULL;
847 int i;
848 size_t retlen;
849
850 /*
851 * For the Epxa10 dev board (camelot), the ethernet MAC
852 * address is of the form 00:aa:aa:00:xx:xx where
853 * 00:aa:aa is the Altera vendor ID and xx:xx is the
854 * last 2 bytes of the board serial number, as programmed
855 * into the OTP area of the flash device on EBI1. If this
856 * isn't an expa10 dev board, or there's no mtd support to
857 * read the serial number from flash then we'll force the
858 * use to set their own mac address using ifconfig.
859 */
860
861#ifdef CONFIG_ARCH_CAMELOT
862#ifdef CONFIG_MTD
863 /* get the mtd_info structure for the first mtd device*/
864 for(i=0;i<MAX_MTD_DEVICES;i++){
865 mymtd=get_mtd_device(NULL,i);
866 if(!mymtd||!strcmp(mymtd->name,"EPXA10DB flash"))
867 break;
868 }
869
870 if(!mymtd || !mymtd->read_user_prot_reg){
871 printk(KERN_WARNING "%s: Failed to read MAC address from flash\n",dev->name);
872 }else{
873 mymtd->read_user_prot_reg(mymtd,2,1,&retlen,&dev->dev_addr[5]);
874 mymtd->read_user_prot_reg(mymtd,3,1,&retlen,&dev->dev_addr[4]);
875 dev->dev_addr[3]=0;
876 dev->dev_addr[2]=vendor_id[1];
877 dev->dev_addr[1]=vendor_id[0];
878 dev->dev_addr[0]=0;
879 }
880#else
881 printk(KERN_WARNING "%s: MTD support required to read MAC address from EPXA10 dev board\n", dev->name);
882#endif
883#endif
884
885 if (!is_valid_ether_addr(dev->dev_addr))
886 printk("%s: Invalid ethernet MAC address. Please set using "
887 "ifconfig\n", dev->name);
888
889}
890
891/*
892 * Keep a mapping of dev_info addresses -> port lines to use when
893 * removing ports dev==NULL indicates unused entry
894 */
895
896
897static struct net_device* dev_list[ETH_NR];
898
899static int ether00_add_device(struct pldhs_dev_info* dev_info,void* dev_ps_data)
900{
901 struct net_device *dev;
902 struct net_priv *priv;
903 void *map_addr;
904 int result;
905 int i;
906
907 i=0;
908 while(dev_list[i] && i < ETH_NR)
909 i++;
910
911 if(i==ETH_NR){
912 printk(KERN_WARNING "ether00: Maximum number of ports reached\n");
913 return 0;
914 }
915
916
917 if (!request_mem_region(dev_info->base_addr, MAC_REG_SIZE, "ether00"))
918 return -EBUSY;
919
920 dev = alloc_etherdev(sizeof(struct net_priv));
921 if(!dev) {
922 result = -ENOMEM;
923 goto out_release;
924 }
925 priv = dev->priv;
926
927 priv->tq_memupdate.routine=ether00_mem_update;
928 priv->tq_memupdate.data=(void*) dev;
929
930 spin_lock_init(&priv->rx_lock);
931
932 map_addr=ioremap_nocache(dev_info->base_addr,SZ_4K);
933 if(!map_addr){
934 result = -ENOMEM;
935 out_kfree;
936 }
937
938 dev->open=ether00_open;
939 dev->stop=ether00_stop;
940 dev->set_multicast_list=ether00_set_multicast;
941 dev->hard_start_xmit=ether00_tx;
942 dev->get_stats=ether00_stats;
943
944 ether00_get_ethernet_address(dev);
945
946 SET_MODULE_OWNER(dev);
947
948 dev->base_addr=(unsigned int)map_addr;
949 dev->irq=dev_info->irq;
950 dev->features=NETIF_F_DYNALLOC | NETIF_F_HW_CSUM;
951
952 result=register_netdev(dev);
953 if(result){
954 printk("Ether00: Error %i registering driver\n",result);
955 goto out_unmap;
956 }
957 printk("registered ether00 device at %#x\n",dev_info->base_addr);
958
959 dev_list[i]=dev;
960
961 return result;
962
963 out_unmap:
964 iounmap(map_addr);
965 out_kfree:
966 free_netdev(dev);
967 out_release:
968 release_mem_region(dev_info->base_addr, MAC_REG_SIZE);
969 return result;
970}
971
972
973static int ether00_remove_devices(void)
974{
975 int i;
976
977 for(i=0;i<ETH_NR;i++){
978 if(dev_list[i]){
979 netif_device_detach(dev_list[i]);
980 unregister_netdev(dev_list[i]);
981 iounmap((void*)dev_list[i]->base_addr);
982 release_mem_region(dev_list[i]->base_addr, MAC_REG_SIZE);
983 free_netdev(dev_list[i]);
984 dev_list[i]=0;
985 }
986 }
987 return 0;
988}
989
990static struct pld_hotswap_ops ether00_pldhs_ops={
991 .name = ETHER00_NAME,
992 .add_device = ether00_add_device,
993 .remove_devices = ether00_remove_devices,
994};
995
996
997static void __exit ether00_cleanup_module(void)
998{
999 int result;
1000 result=ether00_remove_devices();
1001 if(result)
1002 printk(KERN_WARNING "ether00: failed to remove all devices\n");
1003
1004 pldhs_unregister_driver(ETHER00_NAME);
1005}
1006module_exit(ether00_cleanup_module);
1007
1008
1009static int __init ether00_mod_init(void)
1010{
1011 printk("mod init\n");
1012 return pldhs_register_driver(&ether00_pldhs_ops);
1013
1014}
1015
1016module_init(ether00_mod_init);
1017
diff --git a/drivers/net/arm/ether3.c b/drivers/net/arm/ether3.c
index 1cc53abc3a39..f1d5b1027ff7 100644
--- a/drivers/net/arm/ether3.c
+++ b/drivers/net/arm/ether3.c
@@ -69,7 +69,6 @@
69#include <asm/system.h> 69#include <asm/system.h>
70#include <asm/ecard.h> 70#include <asm/ecard.h>
71#include <asm/io.h> 71#include <asm/io.h>
72#include <asm/irq.h>
73 72
74static char version[] __initdata = "ether3 ethernet driver (c) 1995-2000 R.M.King v1.17\n"; 73static char version[] __initdata = "ether3 ethernet driver (c) 1995-2000 R.M.King v1.17\n";
75 74
diff --git a/drivers/net/arm/etherh.c b/drivers/net/arm/etherh.c
index 942a2819576c..6a93b666eb72 100644
--- a/drivers/net/arm/etherh.c
+++ b/drivers/net/arm/etherh.c
@@ -50,7 +50,6 @@
50#include <asm/system.h> 50#include <asm/system.h>
51#include <asm/ecard.h> 51#include <asm/ecard.h>
52#include <asm/io.h> 52#include <asm/io.h>
53#include <asm/irq.h>
54 53
55#include "../8390.h" 54#include "../8390.h"
56 55
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index 41b3d83c2ab8..f4424cf886c5 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -515,6 +515,7 @@ static void ax_encaps(struct net_device *dev, unsigned char *icp, int len)
515 count = kiss_esc(p, (unsigned char *)ax->xbuff, len); 515 count = kiss_esc(p, (unsigned char *)ax->xbuff, len);
516 } 516 }
517 } 517 }
518 spin_unlock_bh(&ax->buflock);
518 519
519 set_bit(TTY_DO_WRITE_WAKEUP, &ax->tty->flags); 520 set_bit(TTY_DO_WRITE_WAKEUP, &ax->tty->flags);
520 actual = ax->tty->driver->write(ax->tty, ax->xbuff, count); 521 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)
524 ax->dev->trans_start = jiffies; 525 ax->dev->trans_start = jiffies;
525 ax->xleft = count - actual; 526 ax->xleft = count - actual;
526 ax->xhead = ax->xbuff + actual; 527 ax->xhead = ax->xbuff + actual;
527 spin_unlock_bh(&ax->buflock);
528} 528}
529 529
530/* Encapsulate an AX.25 packet and kick it into a TTY queue. */ 530/* 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
index 000000000000..1b699259b4ec
--- /dev/null
+++ b/drivers/net/ifb.c
@@ -0,0 +1,294 @@
1/* drivers/net/ifb.c:
2
3 The purpose of this driver is to provide a device that allows
4 for sharing of resources:
5
6 1) qdiscs/policies that are per device as opposed to system wide.
7 ifb allows for a device which can be redirected to thus providing
8 an impression of sharing.
9
10 2) Allows for queueing incoming traffic for shaping instead of
11 dropping.
12
13 The original concept is based on what is known as the IMQ
14 driver initially written by Martin Devera, later rewritten
15 by Patrick McHardy and then maintained by Andre Correa.
16
17 You need the tc action mirror or redirect to feed this device
18 packets.
19
20 This program is free software; you can redistribute it and/or
21 modify it under the terms of the GNU General Public License
22 as published by the Free Software Foundation; either version
23 2 of the License, or (at your option) any later version.
24
25 Authors: Jamal Hadi Salim (2005)
26
27*/
28
29
30#include <linux/config.h>
31#include <linux/module.h>
32#include <linux/kernel.h>
33#include <linux/netdevice.h>
34#include <linux/etherdevice.h>
35#include <linux/init.h>
36#include <linux/moduleparam.h>
37#include <net/pkt_sched.h>
38
39#define TX_TIMEOUT (2*HZ)
40
41#define TX_Q_LIMIT 32
42struct ifb_private {
43 struct net_device_stats stats;
44 struct tasklet_struct ifb_tasklet;
45 int tasklet_pending;
46 /* mostly debug stats leave in for now */
47 unsigned long st_task_enter; /* tasklet entered */
48 unsigned long st_txq_refl_try; /* transmit queue refill attempt */
49 unsigned long st_rxq_enter; /* receive queue entered */
50 unsigned long st_rx2tx_tran; /* receive to trasmit transfers */
51 unsigned long st_rxq_notenter; /*receiveQ not entered, resched */
52 unsigned long st_rx_frm_egr; /* received from egress path */
53 unsigned long st_rx_frm_ing; /* received from ingress path */
54 unsigned long st_rxq_check;
55 unsigned long st_rxq_rsch;
56 struct sk_buff_head rq;
57 struct sk_buff_head tq;
58};
59
60static int numifbs = 1;
61
62static void ri_tasklet(unsigned long dev);
63static int ifb_xmit(struct sk_buff *skb, struct net_device *dev);
64static struct net_device_stats *ifb_get_stats(struct net_device *dev);
65static int ifb_open(struct net_device *dev);
66static int ifb_close(struct net_device *dev);
67
68static void ri_tasklet(unsigned long dev)
69{
70
71 struct net_device *_dev = (struct net_device *)dev;
72 struct ifb_private *dp = netdev_priv(_dev);
73 struct net_device_stats *stats = &dp->stats;
74 struct sk_buff *skb;
75
76 dp->st_task_enter++;
77 if ((skb = skb_peek(&dp->tq)) == NULL) {
78 dp->st_txq_refl_try++;
79 if (spin_trylock(&_dev->xmit_lock)) {
80 dp->st_rxq_enter++;
81 while ((skb = skb_dequeue(&dp->rq)) != NULL) {
82 skb_queue_tail(&dp->tq, skb);
83 dp->st_rx2tx_tran++;
84 }
85 spin_unlock(&_dev->xmit_lock);
86 } else {
87 /* reschedule */
88 dp->st_rxq_notenter++;
89 goto resched;
90 }
91 }
92
93 while ((skb = skb_dequeue(&dp->tq)) != NULL) {
94 u32 from = G_TC_FROM(skb->tc_verd);
95
96 skb->tc_verd = 0;
97 skb->tc_verd = SET_TC_NCLS(skb->tc_verd);
98 stats->tx_packets++;
99 stats->tx_bytes +=skb->len;
100 if (from & AT_EGRESS) {
101 dp->st_rx_frm_egr++;
102 dev_queue_xmit(skb);
103 } else if (from & AT_INGRESS) {
104
105 dp->st_rx_frm_ing++;
106 netif_rx(skb);
107 } else {
108 dev_kfree_skb(skb);
109 stats->tx_dropped++;
110 }
111 }
112
113 if (spin_trylock(&_dev->xmit_lock)) {
114 dp->st_rxq_check++;
115 if ((skb = skb_peek(&dp->rq)) == NULL) {
116 dp->tasklet_pending = 0;
117 if (netif_queue_stopped(_dev))
118 netif_wake_queue(_dev);
119 } else {
120 dp->st_rxq_rsch++;
121 spin_unlock(&_dev->xmit_lock);
122 goto resched;
123 }
124 spin_unlock(&_dev->xmit_lock);
125 } else {
126resched:
127 dp->tasklet_pending = 1;
128 tasklet_schedule(&dp->ifb_tasklet);
129 }
130
131}
132
133static void __init ifb_setup(struct net_device *dev)
134{
135 /* Initialize the device structure. */
136 dev->get_stats = ifb_get_stats;
137 dev->hard_start_xmit = ifb_xmit;
138 dev->open = &ifb_open;
139 dev->stop = &ifb_close;
140
141 /* Fill in device structure with ethernet-generic values. */
142 ether_setup(dev);
143 dev->tx_queue_len = TX_Q_LIMIT;
144 dev->change_mtu = NULL;
145 dev->flags |= IFF_NOARP;
146 dev->flags &= ~IFF_MULTICAST;
147 SET_MODULE_OWNER(dev);
148 random_ether_addr(dev->dev_addr);
149}
150
151static int ifb_xmit(struct sk_buff *skb, struct net_device *dev)
152{
153 struct ifb_private *dp = netdev_priv(dev);
154 struct net_device_stats *stats = &dp->stats;
155 int ret = 0;
156 u32 from = G_TC_FROM(skb->tc_verd);
157
158 stats->tx_packets++;
159 stats->tx_bytes+=skb->len;
160
161 if (!from || !skb->input_dev) {
162dropped:
163 dev_kfree_skb(skb);
164 stats->rx_dropped++;
165 return ret;
166 } else {
167 /*
168 * note we could be going
169 * ingress -> egress or
170 * egress -> ingress
171 */
172 skb->dev = skb->input_dev;
173 skb->input_dev = dev;
174 if (from & AT_INGRESS) {
175 skb_pull(skb, skb->dev->hard_header_len);
176 } else {
177 if (!(from & AT_EGRESS)) {
178 goto dropped;
179 }
180 }
181 }
182
183 if (skb_queue_len(&dp->rq) >= dev->tx_queue_len) {
184 netif_stop_queue(dev);
185 }
186
187 dev->trans_start = jiffies;
188 skb_queue_tail(&dp->rq, skb);
189 if (!dp->tasklet_pending) {
190 dp->tasklet_pending = 1;
191 tasklet_schedule(&dp->ifb_tasklet);
192 }
193
194 return ret;
195}
196
197static struct net_device_stats *ifb_get_stats(struct net_device *dev)
198{
199 struct ifb_private *dp = netdev_priv(dev);
200 struct net_device_stats *stats = &dp->stats;
201
202 pr_debug("tasklets stats %ld:%ld:%ld:%ld:%ld:%ld:%ld:%ld:%ld \n",
203 dp->st_task_enter, dp->st_txq_refl_try, dp->st_rxq_enter,
204 dp->st_rx2tx_tran dp->st_rxq_notenter, dp->st_rx_frm_egr,
205 dp->st_rx_frm_ing, dp->st_rxq_check, dp->st_rxq_rsch );
206
207 return stats;
208}
209
210static struct net_device **ifbs;
211
212/* Number of ifb devices to be set up by this module. */
213module_param(numifbs, int, 0);
214MODULE_PARM_DESC(numifbs, "Number of ifb devices");
215
216static int ifb_close(struct net_device *dev)
217{
218 struct ifb_private *dp = netdev_priv(dev);
219
220 tasklet_kill(&dp->ifb_tasklet);
221 netif_stop_queue(dev);
222 skb_queue_purge(&dp->rq);
223 skb_queue_purge(&dp->tq);
224 return 0;
225}
226
227static int ifb_open(struct net_device *dev)
228{
229 struct ifb_private *dp = netdev_priv(dev);
230
231 tasklet_init(&dp->ifb_tasklet, ri_tasklet, (unsigned long)dev);
232 skb_queue_head_init(&dp->rq);
233 skb_queue_head_init(&dp->tq);
234 netif_start_queue(dev);
235
236 return 0;
237}
238
239static int __init ifb_init_one(int index)
240{
241 struct net_device *dev_ifb;
242 int err;
243
244 dev_ifb = alloc_netdev(sizeof(struct ifb_private),
245 "ifb%d", ifb_setup);
246
247 if (!dev_ifb)
248 return -ENOMEM;
249
250 if ((err = register_netdev(dev_ifb))) {
251 free_netdev(dev_ifb);
252 dev_ifb = NULL;
253 } else {
254 ifbs[index] = dev_ifb;
255 }
256
257 return err;
258}
259
260static void ifb_free_one(int index)
261{
262 unregister_netdev(ifbs[index]);
263 free_netdev(ifbs[index]);
264}
265
266static int __init ifb_init_module(void)
267{
268 int i, err = 0;
269 ifbs = kmalloc(numifbs * sizeof(void *), GFP_KERNEL);
270 if (!ifbs)
271 return -ENOMEM;
272 for (i = 0; i < numifbs && !err; i++)
273 err = ifb_init_one(i);
274 if (err) {
275 while (--i >= 0)
276 ifb_free_one(i);
277 }
278
279 return err;
280}
281
282static void __exit ifb_cleanup_module(void)
283{
284 int i;
285
286 for (i = 0; i < numifbs; i++)
287 ifb_free_one(i);
288 kfree(ifbs);
289}
290
291module_init(ifb_init_module);
292module_exit(ifb_cleanup_module);
293MODULE_LICENSE("GPL");
294MODULE_AUTHOR("Jamal Hadi Salim");
diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c
index 09ed05727bcb..dda5a5f79c53 100644
--- a/drivers/scsi/arm/acornscsi.c
+++ b/drivers/scsi/arm/acornscsi.c
@@ -146,7 +146,6 @@
146 146
147#include <asm/system.h> 147#include <asm/system.h>
148#include <asm/io.h> 148#include <asm/io.h>
149#include <asm/irq.h>
150#include <asm/ecard.h> 149#include <asm/ecard.h>
151 150
152#include "../scsi.h" 151#include "../scsi.h"
diff --git a/drivers/scsi/arm/arxescsi.c b/drivers/scsi/arm/arxescsi.c
index 804125e35fc3..a28940156703 100644
--- a/drivers/scsi/arm/arxescsi.c
+++ b/drivers/scsi/arm/arxescsi.c
@@ -33,7 +33,6 @@
33 33
34#include <asm/dma.h> 34#include <asm/dma.h>
35#include <asm/io.h> 35#include <asm/io.h>
36#include <asm/irq.h>
37#include <asm/ecard.h> 36#include <asm/ecard.h>
38 37
39#include "../scsi.h" 38#include "../scsi.h"
diff --git a/drivers/scsi/arm/cumana_1.c b/drivers/scsi/arm/cumana_1.c
index 81e266be26d0..e6c9491dc5c0 100644
--- a/drivers/scsi/arm/cumana_1.c
+++ b/drivers/scsi/arm/cumana_1.c
@@ -13,7 +13,6 @@
13 13
14#include <asm/ecard.h> 14#include <asm/ecard.h>
15#include <asm/io.h> 15#include <asm/io.h>
16#include <asm/irq.h>
17#include <asm/system.h> 16#include <asm/system.h>
18 17
19#include "../scsi.h" 18#include "../scsi.h"
diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c
index 3a7a46b0dc41..583d2d8c8335 100644
--- a/drivers/scsi/arm/cumana_2.c
+++ b/drivers/scsi/arm/cumana_2.c
@@ -31,7 +31,6 @@
31#include <asm/dma.h> 31#include <asm/dma.h>
32#include <asm/ecard.h> 32#include <asm/ecard.h>
33#include <asm/io.h> 33#include <asm/io.h>
34#include <asm/irq.h>
35#include <asm/pgtable.h> 34#include <asm/pgtable.h>
36 35
37#include "../scsi.h" 36#include "../scsi.h"
diff --git a/drivers/scsi/arm/eesox.c b/drivers/scsi/arm/eesox.c
index 4d1e8f52c924..3ffec7efc9d5 100644
--- a/drivers/scsi/arm/eesox.c
+++ b/drivers/scsi/arm/eesox.c
@@ -35,7 +35,6 @@
35#include <linux/dma-mapping.h> 35#include <linux/dma-mapping.h>
36 36
37#include <asm/io.h> 37#include <asm/io.h>
38#include <asm/irq.h>
39#include <asm/dma.h> 38#include <asm/dma.h>
40#include <asm/ecard.h> 39#include <asm/ecard.h>
41#include <asm/pgtable.h> 40#include <asm/pgtable.h>
diff --git a/drivers/scsi/arm/powertec.c b/drivers/scsi/arm/powertec.c
index 3333d7b39139..3113bdcedb13 100644
--- a/drivers/scsi/arm/powertec.c
+++ b/drivers/scsi/arm/powertec.c
@@ -22,7 +22,6 @@
22#include <asm/dma.h> 22#include <asm/dma.h>
23#include <asm/ecard.h> 23#include <asm/ecard.h>
24#include <asm/io.h> 24#include <asm/io.h>
25#include <asm/irq.h>
26#include <asm/pgtable.h> 25#include <asm/pgtable.h>
27 26
28#include "../scsi.h" 27#include "../scsi.h"
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 1891cf5bdeef..e8454611cb65 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -54,6 +54,8 @@
54 */ 54 */
55static unsigned int share_irqs = SERIAL8250_SHARE_IRQS; 55static unsigned int share_irqs = SERIAL8250_SHARE_IRQS;
56 56
57static unsigned int nr_uarts = CONFIG_SERIAL_8250_RUNTIME_UARTS;
58
57/* 59/*
58 * Debugging. 60 * Debugging.
59 */ 61 */
@@ -2118,7 +2120,7 @@ static void __init serial8250_isa_init_ports(void)
2118 return; 2120 return;
2119 first = 0; 2121 first = 0;
2120 2122
2121 for (i = 0; i < UART_NR; i++) { 2123 for (i = 0; i < nr_uarts; i++) {
2122 struct uart_8250_port *up = &serial8250_ports[i]; 2124 struct uart_8250_port *up = &serial8250_ports[i];
2123 2125
2124 up->port.line = i; 2126 up->port.line = i;
@@ -2137,7 +2139,7 @@ static void __init serial8250_isa_init_ports(void)
2137 } 2139 }
2138 2140
2139 for (i = 0, up = serial8250_ports; 2141 for (i = 0, up = serial8250_ports;
2140 i < ARRAY_SIZE(old_serial_port) && i < UART_NR; 2142 i < ARRAY_SIZE(old_serial_port) && i < nr_uarts;
2141 i++, up++) { 2143 i++, up++) {
2142 up->port.iobase = old_serial_port[i].port; 2144 up->port.iobase = old_serial_port[i].port;
2143 up->port.irq = irq_canonicalize(old_serial_port[i].irq); 2145 up->port.irq = irq_canonicalize(old_serial_port[i].irq);
@@ -2159,7 +2161,7 @@ serial8250_register_ports(struct uart_driver *drv, struct device *dev)
2159 2161
2160 serial8250_isa_init_ports(); 2162 serial8250_isa_init_ports();
2161 2163
2162 for (i = 0; i < UART_NR; i++) { 2164 for (i = 0; i < nr_uarts; i++) {
2163 struct uart_8250_port *up = &serial8250_ports[i]; 2165 struct uart_8250_port *up = &serial8250_ports[i];
2164 2166
2165 up->port.dev = dev; 2167 up->port.dev = dev;
@@ -2262,7 +2264,7 @@ static int serial8250_console_setup(struct console *co, char *options)
2262 * if so, search for the first available port that does have 2264 * if so, search for the first available port that does have
2263 * console support. 2265 * console support.
2264 */ 2266 */
2265 if (co->index >= UART_NR) 2267 if (co->index >= nr_uarts)
2266 co->index = 0; 2268 co->index = 0;
2267 port = &serial8250_ports[co->index].port; 2269 port = &serial8250_ports[co->index].port;
2268 if (!port->iobase && !port->membase) 2270 if (!port->iobase && !port->membase)
@@ -2298,7 +2300,7 @@ static int __init find_port(struct uart_port *p)
2298 int line; 2300 int line;
2299 struct uart_port *port; 2301 struct uart_port *port;
2300 2302
2301 for (line = 0; line < UART_NR; line++) { 2303 for (line = 0; line < nr_uarts; line++) {
2302 port = &serial8250_ports[line].port; 2304 port = &serial8250_ports[line].port;
2303 if (uart_match_port(p, port)) 2305 if (uart_match_port(p, port))
2304 return line; 2306 return line;
@@ -2420,7 +2422,7 @@ static int __devexit serial8250_remove(struct platform_device *dev)
2420{ 2422{
2421 int i; 2423 int i;
2422 2424
2423 for (i = 0; i < UART_NR; i++) { 2425 for (i = 0; i < nr_uarts; i++) {
2424 struct uart_8250_port *up = &serial8250_ports[i]; 2426 struct uart_8250_port *up = &serial8250_ports[i];
2425 2427
2426 if (up->port.dev == &dev->dev) 2428 if (up->port.dev == &dev->dev)
@@ -2487,7 +2489,7 @@ static struct uart_8250_port *serial8250_find_match_or_unused(struct uart_port *
2487 /* 2489 /*
2488 * First, find a port entry which matches. 2490 * First, find a port entry which matches.
2489 */ 2491 */
2490 for (i = 0; i < UART_NR; i++) 2492 for (i = 0; i < nr_uarts; i++)
2491 if (uart_match_port(&serial8250_ports[i].port, port)) 2493 if (uart_match_port(&serial8250_ports[i].port, port))
2492 return &serial8250_ports[i]; 2494 return &serial8250_ports[i];
2493 2495
@@ -2496,7 +2498,7 @@ static struct uart_8250_port *serial8250_find_match_or_unused(struct uart_port *
2496 * free entry. We look for one which hasn't been previously 2498 * free entry. We look for one which hasn't been previously
2497 * used (indicated by zero iobase). 2499 * used (indicated by zero iobase).
2498 */ 2500 */
2499 for (i = 0; i < UART_NR; i++) 2501 for (i = 0; i < nr_uarts; i++)
2500 if (serial8250_ports[i].port.type == PORT_UNKNOWN && 2502 if (serial8250_ports[i].port.type == PORT_UNKNOWN &&
2501 serial8250_ports[i].port.iobase == 0) 2503 serial8250_ports[i].port.iobase == 0)
2502 return &serial8250_ports[i]; 2504 return &serial8250_ports[i];
@@ -2505,7 +2507,7 @@ static struct uart_8250_port *serial8250_find_match_or_unused(struct uart_port *
2505 * That also failed. Last resort is to find any entry which 2507 * That also failed. Last resort is to find any entry which
2506 * doesn't have a real port associated with it. 2508 * doesn't have a real port associated with it.
2507 */ 2509 */
2508 for (i = 0; i < UART_NR; i++) 2510 for (i = 0; i < nr_uarts; i++)
2509 if (serial8250_ports[i].port.type == PORT_UNKNOWN) 2511 if (serial8250_ports[i].port.type == PORT_UNKNOWN)
2510 return &serial8250_ports[i]; 2512 return &serial8250_ports[i];
2511 2513
@@ -2590,8 +2592,11 @@ static int __init serial8250_init(void)
2590{ 2592{
2591 int ret, i; 2593 int ret, i;
2592 2594
2595 if (nr_uarts > UART_NR)
2596 nr_uarts = UART_NR;
2597
2593 printk(KERN_INFO "Serial: 8250/16550 driver $Revision: 1.90 $ " 2598 printk(KERN_INFO "Serial: 8250/16550 driver $Revision: 1.90 $ "
2594 "%d ports, IRQ sharing %sabled\n", (int) UART_NR, 2599 "%d ports, IRQ sharing %sabled\n", nr_uarts,
2595 share_irqs ? "en" : "dis"); 2600 share_irqs ? "en" : "dis");
2596 2601
2597 for (i = 0; i < NR_IRQS; i++) 2602 for (i = 0; i < NR_IRQS; i++)
@@ -2651,6 +2656,9 @@ module_param(share_irqs, uint, 0644);
2651MODULE_PARM_DESC(share_irqs, "Share IRQs with other non-8250/16x50 devices" 2656MODULE_PARM_DESC(share_irqs, "Share IRQs with other non-8250/16x50 devices"
2652 " (unsafe)"); 2657 " (unsafe)");
2653 2658
2659module_param(nr_uarts, uint, 0644);
2660MODULE_PARM_DESC(nr_uarts, "Maximum number of UARTs supported. (1-" __MODULE_STRING(CONFIG_SERIAL_8250_NR_UARTS) ")");
2661
2654#ifdef CONFIG_SERIAL_8250_RSA 2662#ifdef CONFIG_SERIAL_8250_RSA
2655module_param_array(probe_rsa, ulong, &probe_rsa_count, 0444); 2663module_param_array(probe_rsa, ulong, &probe_rsa_count, 0444);
2656MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA"); 2664MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA");
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 812bae62c8ec..1bae26a8a503 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -95,6 +95,16 @@ config SERIAL_8250_NR_UARTS
95 PCI enumeration and any ports that may be added at run-time 95 PCI enumeration and any ports that may be added at run-time
96 via hot-plug, or any ISA multi-port serial cards. 96 via hot-plug, or any ISA multi-port serial cards.
97 97
98config SERIAL_8250_RUNTIME_UARTS
99 int "Number of 8250/16550 serial ports to register at runtime"
100 depends on SERIAL_8250
101 default "4"
102 help
103 Set this to the maximum number of serial ports you want
104 the kernel to register at boot time. This can be overriden
105 with the module parameter "nr_uarts", or boot-time parameter
106 8250.nr_uarts
107
98config SERIAL_8250_EXTENDED 108config SERIAL_8250_EXTENDED
99 bool "Extended 8250/16550 serial driver options" 109 bool "Extended 8250/16550 serial driver options"
100 depends on SERIAL_8250 110 depends on SERIAL_8250
@@ -359,29 +369,6 @@ config SERIAL_21285_CONSOLE
359 your boot loader (lilo or loadlin) about how to pass options to the 369 your boot loader (lilo or loadlin) about how to pass options to the
360 kernel at boot time.) 370 kernel at boot time.)
361 371
362config SERIAL_UART00
363 bool "Excalibur serial port (uart00) support"
364 depends on ARM && ARCH_CAMELOT
365 select SERIAL_CORE
366 help
367 Say Y here if you want to use the hard logic uart on Excalibur. This
368 driver also supports soft logic implementations of this uart core.
369
370config SERIAL_UART00_CONSOLE
371 bool "Support for console on Excalibur serial port"
372 depends on SERIAL_UART00
373 select SERIAL_CORE_CONSOLE
374 help
375 Say Y here if you want to support a serial console on an Excalibur
376 hard logic uart or uart00 IP core.
377
378 Even if you say Y here, the currently visible virtual console
379 (/dev/tty0) will still be used as the system console by default, but
380 you can alter that using a kernel command line option such as
381 "console=ttyS1". (Try "man bootparam" or see the documentation of
382 your boot loader (lilo or loadlin) about how to pass options to the
383 kernel at boot time.)
384
385config SERIAL_MPSC 372config SERIAL_MPSC
386 bool "Marvell MPSC serial port support" 373 bool "Marvell MPSC serial port support"
387 depends on PPC32 && MV64X60 374 depends on PPC32 && MV64X60
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index d7c7c7180e33..137148bba4fa 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -29,7 +29,6 @@ obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o
29obj-$(CONFIG_SERIAL_PXA) += pxa.o 29obj-$(CONFIG_SERIAL_PXA) += pxa.o
30obj-$(CONFIG_SERIAL_SA1100) += sa1100.o 30obj-$(CONFIG_SERIAL_SA1100) += sa1100.o
31obj-$(CONFIG_SERIAL_S3C2410) += s3c2410.o 31obj-$(CONFIG_SERIAL_S3C2410) += s3c2410.o
32obj-$(CONFIG_SERIAL_UART00) += uart00.o
33obj-$(CONFIG_SERIAL_SUNCORE) += suncore.o 32obj-$(CONFIG_SERIAL_SUNCORE) += suncore.o
34obj-$(CONFIG_SERIAL_SUNZILOG) += sunzilog.o 33obj-$(CONFIG_SERIAL_SUNZILOG) += sunzilog.o
35obj-$(CONFIG_SERIAL_IP22_ZILOG) += ip22zilog.o 34obj-$(CONFIG_SERIAL_IP22_ZILOG) += ip22zilog.o
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 34c576dfad8d..9589509fc5bd 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1440,6 +1440,7 @@ uart_block_til_ready(struct file *filp, struct uart_state *state)
1440 * modem is ready for us. 1440 * modem is ready for us.
1441 */ 1441 */
1442 spin_lock_irq(&port->lock); 1442 spin_lock_irq(&port->lock);
1443 port->ops->enable_ms(port);
1443 mctrl = port->ops->get_mctrl(port); 1444 mctrl = port->ops->get_mctrl(port);
1444 spin_unlock_irq(&port->lock); 1445 spin_unlock_irq(&port->lock);
1445 if (mctrl & TIOCM_CAR) 1446 if (mctrl & TIOCM_CAR)
diff --git a/drivers/serial/uart00.c b/drivers/serial/uart00.c
deleted file mode 100644
index 47b504ff38b2..000000000000
--- a/drivers/serial/uart00.c
+++ /dev/null
@@ -1,782 +0,0 @@
1/*
2 * linux/drivers/serial/uart00.c
3 *
4 * Driver for UART00 serial ports
5 *
6 * Based on drivers/char/serial_amba.c, by ARM Limited &
7 * Deep Blue Solutions Ltd.
8 * Copyright 2001 Altera Corporation
9 *
10 * Update for 2.6.4 by Dirk Behme <dirk.behme@de.bosch.com>
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 * $Id: uart00.c,v 1.35 2002/07/28 10:03:28 rmk Exp $
27 *
28 */
29#include <linux/config.h>
30
31#if defined(CONFIG_SERIAL_UART00_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
32#define SUPPORT_SYSRQ
33#endif
34
35#include <linux/module.h>
36#include <linux/ioport.h>
37#include <linux/init.h>
38#include <linux/console.h>
39#include <linux/sysrq.h>
40#include <linux/tty.h>
41#include <linux/tty_flip.h>
42#include <linux/serial_core.h>
43#include <linux/serial.h>
44
45#include <asm/io.h>
46#include <asm/irq.h>
47#include <asm/sizes.h>
48
49#include <asm/arch/excalibur.h>
50#define UART00_TYPE (volatile unsigned int*)
51#include <asm/arch/uart00.h>
52#include <asm/arch/int_ctrl00.h>
53
54#define UART_NR 2
55
56#define SERIAL_UART00_NAME "ttyUA"
57#define SERIAL_UART00_MAJOR 204
58#define SERIAL_UART00_MINOR 16 /* Temporary - will change in future */
59#define SERIAL_UART00_NR UART_NR
60#define UART_PORT_SIZE 0x50
61
62#define UART00_ISR_PASS_LIMIT 256
63
64/*
65 * Access macros for the UART00 UARTs
66 */
67#define UART_GET_INT_STATUS(p) inl(UART_ISR((p)->membase))
68#define UART_PUT_IES(p, c) outl(c,UART_IES((p)->membase))
69#define UART_GET_IES(p) inl(UART_IES((p)->membase))
70#define UART_PUT_IEC(p, c) outl(c,UART_IEC((p)->membase))
71#define UART_GET_IEC(p) inl(UART_IEC((p)->membase))
72#define UART_PUT_CHAR(p, c) outl(c,UART_TD((p)->membase))
73#define UART_GET_CHAR(p) inl(UART_RD((p)->membase))
74#define UART_GET_RSR(p) inl(UART_RSR((p)->membase))
75#define UART_GET_RDS(p) inl(UART_RDS((p)->membase))
76#define UART_GET_MSR(p) inl(UART_MSR((p)->membase))
77#define UART_GET_MCR(p) inl(UART_MCR((p)->membase))
78#define UART_PUT_MCR(p, c) outl(c,UART_MCR((p)->membase))
79#define UART_GET_MC(p) inl(UART_MC((p)->membase))
80#define UART_PUT_MC(p, c) outl(c,UART_MC((p)->membase))
81#define UART_GET_TSR(p) inl(UART_TSR((p)->membase))
82#define UART_GET_DIV_HI(p) inl(UART_DIV_HI((p)->membase))
83#define UART_PUT_DIV_HI(p,c) outl(c,UART_DIV_HI((p)->membase))
84#define UART_GET_DIV_LO(p) inl(UART_DIV_LO((p)->membase))
85#define UART_PUT_DIV_LO(p,c) outl(c,UART_DIV_LO((p)->membase))
86#define UART_RX_DATA(s) ((s) & UART_RSR_RX_LEVEL_MSK)
87#define UART_TX_READY(s) (((s) & UART_TSR_TX_LEVEL_MSK) < 15)
88//#define UART_TX_EMPTY(p) ((UART_GET_FR(p) & UART00_UARTFR_TMSK) == 0)
89
90static void uart00_stop_tx(struct uart_port *port)
91{
92 UART_PUT_IEC(port, UART_IEC_TIE_MSK);
93}
94
95static void uart00_stop_rx(struct uart_port *port)
96{
97 UART_PUT_IEC(port, UART_IEC_RE_MSK);
98}
99
100static void uart00_enable_ms(struct uart_port *port)
101{
102 UART_PUT_IES(port, UART_IES_ME_MSK);
103}
104
105static void
106uart00_rx_chars(struct uart_port *port, struct pt_regs *regs)
107{
108 struct tty_struct *tty = port->info->tty;
109 unsigned int status, ch, rds, flg, ignored = 0;
110
111 status = UART_GET_RSR(port);
112 while (UART_RX_DATA(status)) {
113 /*
114 * We need to read rds before reading the
115 * character from the fifo
116 */
117 rds = UART_GET_RDS(port);
118 ch = UART_GET_CHAR(port);
119 port->icount.rx++;
120
121 if (tty->flip.count >= TTY_FLIPBUF_SIZE)
122 goto ignore_char;
123
124 flg = TTY_NORMAL;
125
126 /*
127 * Note that the error handling code is
128 * out of the main execution path
129 */
130 if (rds & (UART_RDS_BI_MSK |UART_RDS_FE_MSK|
131 UART_RDS_PE_MSK |UART_RDS_PE_MSK))
132 goto handle_error;
133 if (uart_handle_sysrq_char(port, ch, regs))
134 goto ignore_char;
135
136 error_return:
137 tty_insert_flip_char(tty, ch, flg);
138
139 ignore_char:
140 status = UART_GET_RSR(port);
141 }
142 out:
143 tty_flip_buffer_push(tty);
144 return;
145
146 handle_error:
147 if (rds & UART_RDS_BI_MSK) {
148 status &= ~(UART_RDS_FE_MSK | UART_RDS_PE_MSK);
149 port->icount.brk++;
150 if (uart_handle_break(port))
151 goto ignore_char;
152 } else if (rds & UART_RDS_PE_MSK)
153 port->icount.parity++;
154 else if (rds & UART_RDS_FE_MSK)
155 port->icount.frame++;
156 if (rds & UART_RDS_OE_MSK)
157 port->icount.overrun++;
158
159 if (rds & port->ignore_status_mask) {
160 if (++ignored > 100)
161 goto out;
162 goto ignore_char;
163 }
164 rds &= port->read_status_mask;
165
166 if (rds & UART_RDS_BI_MSK)
167 flg = TTY_BREAK;
168 else if (rds & UART_RDS_PE_MSK)
169 flg = TTY_PARITY;
170 else if (rds & UART_RDS_FE_MSK)
171 flg = TTY_FRAME;
172
173 if (rds & UART_RDS_OE_MSK) {
174 /*
175 * CHECK: does overrun affect the current character?
176 * ASSUMPTION: it does not.
177 */
178 tty_insert_flip_char(tty, ch, flg);
179 ch = 0;
180 flg = TTY_OVERRUN;
181 }
182#ifdef SUPPORT_SYSRQ
183 port->sysrq = 0;
184#endif
185 goto error_return;
186}
187
188static void uart00_tx_chars(struct uart_port *port)
189{
190 struct circ_buf *xmit = &port->info->xmit;
191 int count;
192
193 if (port->x_char) {
194 while ((UART_GET_TSR(port) & UART_TSR_TX_LEVEL_MSK) == 15)
195 barrier();
196 UART_PUT_CHAR(port, port->x_char);
197 port->icount.tx++;
198 port->x_char = 0;
199 return;
200 }
201 if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
202 uart00_stop_tx(port);
203 return;
204 }
205
206 count = port->fifosize >> 1;
207 do {
208 while ((UART_GET_TSR(port) & UART_TSR_TX_LEVEL_MSK) == 15)
209 barrier();
210 UART_PUT_CHAR(port, xmit->buf[xmit->tail]);
211 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
212 port->icount.tx++;
213 if (uart_circ_empty(xmit))
214 break;
215 } while (--count > 0);
216
217 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
218 uart_write_wakeup(port);
219
220 if (uart_circ_empty(xmit))
221 uart00_stop_tx(port);
222}
223
224static void uart00_start_tx(struct uart_port *port)
225{
226 UART_PUT_IES(port, UART_IES_TIE_MSK);
227 uart00_tx_chars(port);
228}
229
230static void uart00_modem_status(struct uart_port *port)
231{
232 unsigned int status;
233
234 status = UART_GET_MSR(port);
235
236 if (!(status & (UART_MSR_DCTS_MSK | UART_MSR_DDSR_MSK |
237 UART_MSR_TERI_MSK | UART_MSR_DDCD_MSK)))
238 return;
239
240 if (status & UART_MSR_DDCD_MSK)
241 uart_handle_dcd_change(port, status & UART_MSR_DCD_MSK);
242
243 if (status & UART_MSR_DDSR_MSK)
244 port->icount.dsr++;
245
246 if (status & UART_MSR_DCTS_MSK)
247 uart_handle_cts_change(port, status & UART_MSR_CTS_MSK);
248
249 wake_up_interruptible(&port->info->delta_msr_wait);
250}
251
252static irqreturn_t uart00_int(int irq, void *dev_id, struct pt_regs *regs)
253{
254 struct uart_port *port = dev_id;
255 unsigned int status, pass_counter = 0;
256
257 status = UART_GET_INT_STATUS(port);
258 do {
259 if (status & UART_ISR_RI_MSK)
260 uart00_rx_chars(port, regs);
261 if (status & UART_ISR_MI_MSK)
262 uart00_modem_status(port);
263 if (status & (UART_ISR_TI_MSK | UART_ISR_TII_MSK))
264 uart00_tx_chars(port);
265 if (pass_counter++ > UART00_ISR_PASS_LIMIT)
266 break;
267
268 status = UART_GET_INT_STATUS(port);
269 } while (status);
270
271 return IRQ_HANDLED;
272}
273
274static unsigned int uart00_tx_empty(struct uart_port *port)
275{
276 return UART_GET_TSR(port) & UART_TSR_TX_LEVEL_MSK? 0 : TIOCSER_TEMT;
277}
278
279static unsigned int uart00_get_mctrl(struct uart_port *port)
280{
281 unsigned int result = 0;
282 unsigned int status;
283
284 status = UART_GET_MSR(port);
285 if (status & UART_MSR_DCD_MSK)
286 result |= TIOCM_CAR;
287 if (status & UART_MSR_DSR_MSK)
288 result |= TIOCM_DSR;
289 if (status & UART_MSR_CTS_MSK)
290 result |= TIOCM_CTS;
291 if (status & UART_MSR_RI_MSK)
292 result |= TIOCM_RI;
293
294 return result;
295}
296
297static void uart00_set_mctrl_null(struct uart_port *port, unsigned int mctrl)
298{
299}
300
301static void uart00_break_ctl(struct uart_port *port, int break_state)
302{
303 unsigned long flags;
304 unsigned int mcr;
305
306 spin_lock_irqsave(&port->lock, flags);
307 mcr = UART_GET_MCR(port);
308 if (break_state == -1)
309 mcr |= UART_MCR_BR_MSK;
310 else
311 mcr &= ~UART_MCR_BR_MSK;
312 UART_PUT_MCR(port, mcr);
313 spin_unlock_irqrestore(&port->lock, flags);
314}
315
316static void
317uart00_set_termios(struct uart_port *port, struct termios *termios,
318 struct termios *old)
319{
320 unsigned int uart_mc, old_ies, baud, quot;
321 unsigned long flags;
322
323 /*
324 * We don't support CREAD (yet)
325 */
326 termios->c_cflag |= CREAD;
327
328 /*
329 * Ask the core to calculate the divisor for us.
330 */
331 baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
332 quot = uart_get_divisor(port, baud);
333
334 /* byte size and parity */
335 switch (termios->c_cflag & CSIZE) {
336 case CS5:
337 uart_mc = UART_MC_CLS_CHARLEN_5;
338 break;
339 case CS6:
340 uart_mc = UART_MC_CLS_CHARLEN_6;
341 break;
342 case CS7:
343 uart_mc = UART_MC_CLS_CHARLEN_7;
344 break;
345 default: // CS8
346 uart_mc = UART_MC_CLS_CHARLEN_8;
347 break;
348 }
349 if (termios->c_cflag & CSTOPB)
350 uart_mc|= UART_MC_ST_TWO;
351 if (termios->c_cflag & PARENB) {
352 uart_mc |= UART_MC_PE_MSK;
353 if (!(termios->c_cflag & PARODD))
354 uart_mc |= UART_MC_EP_MSK;
355 }
356
357 spin_lock_irqsave(&port->lock, flags);
358
359 /*
360 * Update the per-port timeout.
361 */
362 uart_update_timeout(port, termios->c_cflag, baud);
363
364 port->read_status_mask = UART_RDS_OE_MSK;
365 if (termios->c_iflag & INPCK)
366 port->read_status_mask |= UART_RDS_FE_MSK | UART_RDS_PE_MSK;
367 if (termios->c_iflag & (BRKINT | PARMRK))
368 port->read_status_mask |= UART_RDS_BI_MSK;
369
370 /*
371 * Characters to ignore
372 */
373 port->ignore_status_mask = 0;
374 if (termios->c_iflag & IGNPAR)
375 port->ignore_status_mask |= UART_RDS_FE_MSK | UART_RDS_PE_MSK;
376 if (termios->c_iflag & IGNBRK) {
377 port->ignore_status_mask |= UART_RDS_BI_MSK;
378 /*
379 * If we're ignoring parity and break indicators,
380 * ignore overruns to (for real raw support).
381 */
382 if (termios->c_iflag & IGNPAR)
383 port->ignore_status_mask |= UART_RDS_OE_MSK;
384 }
385
386 /* first, disable everything */
387 old_ies = UART_GET_IES(port);
388
389 if (UART_ENABLE_MS(port, termios->c_cflag))
390 old_ies |= UART_IES_ME_MSK;
391
392 /* Set baud rate */
393 UART_PUT_DIV_LO(port, (quot & 0xff));
394 UART_PUT_DIV_HI(port, ((quot & 0xf00) >> 8));
395
396 UART_PUT_MC(port, uart_mc);
397 UART_PUT_IES(port, old_ies);
398
399 spin_unlock_irqrestore(&port->lock, flags);
400}
401
402static int uart00_startup(struct uart_port *port)
403{
404 int result;
405
406 /*
407 * Allocate the IRQ
408 */
409 result = request_irq(port->irq, uart00_int, 0, "uart00", port);
410 if (result) {
411 printk(KERN_ERR "Request of irq %d failed\n", port->irq);
412 return result;
413 }
414
415 /*
416 * Finally, enable interrupts. Use the TII interrupt to minimise
417 * the number of interrupts generated. If higher performance is
418 * needed, consider using the TI interrupt with a suitable FIFO
419 * threshold
420 */
421 UART_PUT_IES(port, UART_IES_RE_MSK | UART_IES_TIE_MSK);
422
423 return 0;
424}
425
426static void uart00_shutdown(struct uart_port *port)
427{
428 /*
429 * disable all interrupts, disable the port
430 */
431 UART_PUT_IEC(port, 0xff);
432
433 /* disable break condition and fifos */
434 UART_PUT_MCR(port, UART_GET_MCR(port) &~UART_MCR_BR_MSK);
435
436 /*
437 * Free the interrupt
438 */
439 free_irq(port->irq, port);
440}
441
442static const char *uart00_type(struct uart_port *port)
443{
444 return port->type == PORT_UART00 ? "Altera UART00" : NULL;
445}
446
447/*
448 * Release the memory region(s) being used by 'port'
449 */
450static void uart00_release_port(struct uart_port *port)
451{
452 release_mem_region(port->mapbase, UART_PORT_SIZE);
453
454#ifdef CONFIG_ARCH_CAMELOT
455 if (port->membase != (void*)IO_ADDRESS(EXC_UART00_BASE)) {
456 iounmap(port->membase);
457 }
458#endif
459}
460
461/*
462 * Request the memory region(s) being used by 'port'
463 */
464static int uart00_request_port(struct uart_port *port)
465{
466 return request_mem_region(port->mapbase, UART_PORT_SIZE, "serial_uart00")
467 != NULL ? 0 : -EBUSY;
468}
469
470/*
471 * Configure/autoconfigure the port.
472 */
473static void uart00_config_port(struct uart_port *port, int flags)
474{
475
476 /*
477 * Map the io memory if this is a soft uart
478 */
479 if (!port->membase)
480 port->membase = ioremap_nocache(port->mapbase,SZ_4K);
481
482 if (!port->membase)
483 printk(KERN_ERR "serial00: cannot map io memory\n");
484 else
485 port->type = PORT_UART00;
486
487}
488
489/*
490 * verify the new serial_struct (for TIOCSSERIAL).
491 */
492static int uart00_verify_port(struct uart_port *port, struct serial_struct *ser)
493{
494 int ret = 0;
495 if (ser->type != PORT_UNKNOWN && ser->type != PORT_UART00)
496 ret = -EINVAL;
497 if (ser->irq < 0 || ser->irq >= NR_IRQS)
498 ret = -EINVAL;
499 if (ser->baud_base < 9600)
500 ret = -EINVAL;
501 return ret;
502}
503
504static struct uart_ops uart00_pops = {
505 .tx_empty = uart00_tx_empty,
506 .set_mctrl = uart00_set_mctrl_null,
507 .get_mctrl = uart00_get_mctrl,
508 .stop_tx = uart00_stop_tx,
509 .start_tx = uart00_start_tx,
510 .stop_rx = uart00_stop_rx,
511 .enable_ms = uart00_enable_ms,
512 .break_ctl = uart00_break_ctl,
513 .startup = uart00_startup,
514 .shutdown = uart00_shutdown,
515 .set_termios = uart00_set_termios,
516 .type = uart00_type,
517 .release_port = uart00_release_port,
518 .request_port = uart00_request_port,
519 .config_port = uart00_config_port,
520 .verify_port = uart00_verify_port,
521};
522
523
524#ifdef CONFIG_ARCH_CAMELOT
525static struct uart_port epxa10db_port = {
526 .membase = (void*)IO_ADDRESS(EXC_UART00_BASE),
527 .mapbase = EXC_UART00_BASE,
528 .iotype = SERIAL_IO_MEM,
529 .irq = IRQ_UART,
530 .uartclk = EXC_AHB2_CLK_FREQUENCY,
531 .fifosize = 16,
532 .ops = &uart00_pops,
533 .flags = ASYNC_BOOT_AUTOCONF,
534};
535#endif
536
537
538#ifdef CONFIG_SERIAL_UART00_CONSOLE
539static void uart00_console_write(struct console *co, const char *s, unsigned count)
540{
541#ifdef CONFIG_ARCH_CAMELOT
542 struct uart_port *port = &epxa10db_port;
543 unsigned int status, old_ies;
544 int i;
545
546 /*
547 * First save the CR then disable the interrupts
548 */
549 old_ies = UART_GET_IES(port);
550 UART_PUT_IEC(port,0xff);
551
552 /*
553 * Now, do each character
554 */
555 for (i = 0; i < count; i++) {
556 do {
557 status = UART_GET_TSR(port);
558 } while (!UART_TX_READY(status));
559 UART_PUT_CHAR(port, s[i]);
560 if (s[i] == '\n') {
561 do {
562 status = UART_GET_TSR(port);
563 } while (!UART_TX_READY(status));
564 UART_PUT_CHAR(port, '\r');
565 }
566 }
567
568 /*
569 * Finally, wait for transmitter to become empty
570 * and restore the IES
571 */
572 do {
573 status = UART_GET_TSR(port);
574 } while (status & UART_TSR_TX_LEVEL_MSK);
575 UART_PUT_IES(port, old_ies);
576#endif
577}
578
579static void __init
580uart00_console_get_options(struct uart_port *port, int *baud,
581 int *parity, int *bits)
582{
583 unsigned int uart_mc, quot;
584
585 uart_mc = UART_GET_MC(port);
586
587 *parity = 'n';
588 if (uart_mc & UART_MC_PE_MSK) {
589 if (uart_mc & UART_MC_EP_MSK)
590 *parity = 'e';
591 else
592 *parity = 'o';
593 }
594
595 switch (uart_mc & UART_MC_CLS_MSK) {
596 case UART_MC_CLS_CHARLEN_5:
597 *bits = 5;
598 break;
599 case UART_MC_CLS_CHARLEN_6:
600 *bits = 6;
601 break;
602 case UART_MC_CLS_CHARLEN_7:
603 *bits = 7;
604 break;
605 case UART_MC_CLS_CHARLEN_8:
606 *bits = 8;
607 break;
608 }
609 quot = UART_GET_DIV_LO(port) | (UART_GET_DIV_HI(port) << 8);
610 *baud = port->uartclk / (16 *quot );
611}
612
613static int __init uart00_console_setup(struct console *co, char *options)
614{
615 struct uart_port *port;
616 int baud = 115200;
617 int bits = 8;
618 int parity = 'n';
619 int flow = 'n';
620
621#ifdef CONFIG_ARCH_CAMELOT
622 port = &epxa10db_port; ;
623#else
624 return -ENODEV;
625#endif
626 if (options)
627 uart_parse_options(options, &baud, &parity, &bits, &flow);
628 else
629 uart00_console_get_options(port, &baud, &parity, &bits);
630
631 return uart_set_options(port, co, baud, parity, bits, flow);
632}
633
634extern struct uart_driver uart00_reg;
635static struct console uart00_console = {
636 .name = SERIAL_UART00_NAME,
637 .write = uart00_console_write,
638 .device = uart_console_device,
639 .setup = uart00_console_setup,
640 .flags = CON_PRINTBUFFER,
641 .index = 0,
642 .data = &uart00_reg,
643};
644
645static int __init uart00_console_init(void)
646{
647 register_console(&uart00_console);
648 return 0;
649}
650console_initcall(uart00_console_init);
651
652#define UART00_CONSOLE &uart00_console
653#else
654#define UART00_CONSOLE NULL
655#endif
656
657static struct uart_driver uart00_reg = {
658 .owner = NULL,
659 .driver_name = SERIAL_UART00_NAME,
660 .dev_name = SERIAL_UART00_NAME,
661 .major = SERIAL_UART00_MAJOR,
662 .minor = SERIAL_UART00_MINOR,
663 .nr = UART_NR,
664 .cons = UART00_CONSOLE,
665};
666
667struct dev_port_entry{
668 unsigned int base_addr;
669 struct uart_port *port;
670};
671
672#ifdef CONFIG_PLD_HOTSWAP
673
674static struct dev_port_entry dev_port_map[UART_NR];
675
676/*
677 * Keep a mapping of dev_info addresses -> port lines to use when
678 * removing ports dev==NULL indicates unused entry
679 */
680
681struct uart00_ps_data{
682 unsigned int clk;
683 unsigned int fifosize;
684};
685
686int uart00_add_device(struct pldhs_dev_info* dev_info, void* dev_ps_data)
687{
688 struct uart00_ps_data* dev_ps=dev_ps_data;
689 struct uart_port * port;
690 int i,result;
691
692 i=0;
693 while(dev_port_map[i].port)
694 i++;
695
696 if(i==UART_NR){
697 printk(KERN_WARNING "uart00: Maximum number of ports reached\n");
698 return 0;
699 }
700
701 port=kmalloc(sizeof(struct uart_port),GFP_KERNEL);
702 if(!port)
703 return -ENOMEM;
704
705 printk("clk=%d fifo=%d\n",dev_ps->clk,dev_ps->fifosize);
706 port->membase=0;
707 port->mapbase=dev_info->base_addr;
708 port->iotype=SERIAL_IO_MEM;
709 port->irq=dev_info->irq;
710 port->uartclk=dev_ps->clk;
711 port->fifosize=dev_ps->fifosize;
712 port->ops=&uart00_pops;
713 port->line=i;
714 port->flags=ASYNC_BOOT_AUTOCONF;
715
716 result=uart_add_one_port(&uart00_reg, port);
717 if(result){
718 printk("uart_add_one_port returned %d\n",result);
719 return result;
720 }
721 dev_port_map[i].base_addr=dev_info->base_addr;
722 dev_port_map[i].port=port;
723 printk("uart00: added device at %x as ttyUA%d\n",dev_port_map[i].base_addr,i);
724 return 0;
725
726}
727
728int uart00_remove_devices(void)
729{
730 int i,result;
731
732
733 result=0;
734 for(i=1;i<UART_NR;i++){
735 if(dev_port_map[i].base_addr){
736 result=uart_remove_one_port(&uart00_reg, dev_port_map[i].port);
737 if(result)
738 return result;
739
740 /* port removed sucessfully, so now tidy up */
741 kfree(dev_port_map[i].port);
742 dev_port_map[i].base_addr=0;
743 dev_port_map[i].port=NULL;
744 }
745 }
746 return 0;
747
748}
749
750struct pld_hotswap_ops uart00_pldhs_ops={
751 .name = "uart00",
752 .add_device = uart00_add_device,
753 .remove_devices = uart00_remove_devices,
754};
755
756#endif
757
758static int __init uart00_init(void)
759{
760 int result;
761
762 printk(KERN_INFO "Serial: UART00 driver $Revision: 1.35 $\n");
763
764 printk(KERN_WARNING "serial_uart00:Using temporary major/minor pairs"
765 " - these WILL change in the future\n");
766
767 result = uart_register_driver(&uart00_reg);
768 if (result)
769 return result;
770#ifdef CONFIG_ARCH_CAMELOT
771 result = uart_add_one_port(&uart00_reg,&epxa10db_port);
772#endif
773 if (result)
774 uart_unregister_driver(&uart00_reg);
775
776#ifdef CONFIG_PLD_HOTSWAP
777 pldhs_register_driver(&uart00_pldhs_ops);
778#endif
779 return result;
780}
781
782__initcall(uart00_init);
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c
index a9300f930ef2..55a3514157ed 100644
--- a/drivers/video/cyber2000fb.c
+++ b/drivers/video/cyber2000fb.c
@@ -50,7 +50,6 @@
50#include <linux/init.h> 50#include <linux/init.h>
51 51
52#include <asm/io.h> 52#include <asm/io.h>
53#include <asm/irq.h>
54#include <asm/pgtable.h> 53#include <asm/pgtable.h>
55#include <asm/system.h> 54#include <asm/system.h>
56#include <asm/uaccess.h> 55#include <asm/uaccess.h>
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
index 2ea1354e439f..087e58689e4c 100644
--- a/drivers/video/sa1100fb.c
+++ b/drivers/video/sa1100fb.c
@@ -178,7 +178,6 @@
178 178
179#include <asm/hardware.h> 179#include <asm/hardware.h>
180#include <asm/io.h> 180#include <asm/io.h>
181#include <asm/irq.h>
182#include <asm/mach-types.h> 181#include <asm/mach-types.h>
183#include <asm/uaccess.h> 182#include <asm/uaccess.h>
184#include <asm/arch/assabet.h> 183#include <asm/arch/assabet.h>
@@ -1455,7 +1454,11 @@ static struct sa1100fb_info * __init sa1100fb_init_fbinfo(struct device *dev)
1455static int __init sa1100fb_probe(struct platform_device *pdev) 1454static int __init sa1100fb_probe(struct platform_device *pdev)
1456{ 1455{
1457 struct sa1100fb_info *fbi; 1456 struct sa1100fb_info *fbi;
1458 int ret; 1457 int ret, irq;
1458
1459 irq = platform_get_irq(pdev, 0);
1460 if (irq <= 0)
1461 return -EINVAL;
1459 1462
1460 if (!request_mem_region(0xb0100000, 0x10000, "LCD")) 1463 if (!request_mem_region(0xb0100000, 0x10000, "LCD"))
1461 return -EBUSY; 1464 return -EBUSY;
@@ -1470,7 +1473,7 @@ static int __init sa1100fb_probe(struct platform_device *pdev)
1470 if (ret) 1473 if (ret)
1471 goto failed; 1474 goto failed;
1472 1475
1473 ret = request_irq(IRQ_LCD, sa1100fb_handle_irq, SA_INTERRUPT, 1476 ret = request_irq(irq, sa1100fb_handle_irq, SA_INTERRUPT,
1474 "LCD", fbi); 1477 "LCD", fbi);
1475 if (ret) { 1478 if (ret) {
1476 printk(KERN_ERR "sa1100fb: request_irq failed: %d\n", ret); 1479 printk(KERN_ERR "sa1100fb: request_irq failed: %d\n", ret);
@@ -1492,7 +1495,7 @@ static int __init sa1100fb_probe(struct platform_device *pdev)
1492 1495
1493 ret = register_framebuffer(&fbi->fb); 1496 ret = register_framebuffer(&fbi->fb);
1494 if (ret < 0) 1497 if (ret < 0)
1495 goto failed; 1498 goto err_free_irq;
1496 1499
1497#ifdef CONFIG_CPU_FREQ 1500#ifdef CONFIG_CPU_FREQ
1498 fbi->freq_transition.notifier_call = sa1100fb_freq_transition; 1501 fbi->freq_transition.notifier_call = sa1100fb_freq_transition;
@@ -1504,7 +1507,9 @@ static int __init sa1100fb_probe(struct platform_device *pdev)
1504 /* This driver cannot be unloaded at the moment */ 1507 /* This driver cannot be unloaded at the moment */
1505 return 0; 1508 return 0;
1506 1509
1507failed: 1510 err_free_irq:
1511 free_irq(irq, fbi);
1512 failed:
1508 platform_set_drvdata(pdev, NULL); 1513 platform_set_drvdata(pdev, NULL);
1509 kfree(fbi); 1514 kfree(fbi);
1510 release_mem_region(0xb0100000, 0x10000); 1515 release_mem_region(0xb0100000, 0x10000);
diff --git a/fs/partitions/Kconfig b/fs/partitions/Kconfig
index e227a04261ab..7490cc9208b3 100644
--- a/fs/partitions/Kconfig
+++ b/fs/partitions/Kconfig
@@ -21,26 +21,30 @@ config ACORN_PARTITION
21 Support hard disks partitioned under Acorn operating systems. 21 Support hard disks partitioned under Acorn operating systems.
22 22
23config ACORN_PARTITION_CUMANA 23config ACORN_PARTITION_CUMANA
24 bool "Cumana partition support" if PARTITION_ADVANCED && ACORN_PARTITION 24 bool "Cumana partition support" if PARTITION_ADVANCED
25 default y if ARCH_ACORN 25 default y if ARCH_ACORN
26 depends on ACORN_PARTITION
26 help 27 help
27 Say Y here if you would like to use hard disks under Linux which 28 Say Y here if you would like to use hard disks under Linux which
28 were partitioned using the Cumana interface on Acorn machines. 29 were partitioned using the Cumana interface on Acorn machines.
29 30
30config ACORN_PARTITION_EESOX 31config ACORN_PARTITION_EESOX
31 bool "EESOX partition support" if PARTITION_ADVANCED && ACORN_PARTITION 32 bool "EESOX partition support" if PARTITION_ADVANCED
32 default y if ARCH_ACORN 33 default y if ARCH_ACORN
34 depends on ACORN_PARTITION
33 35
34config ACORN_PARTITION_ICS 36config ACORN_PARTITION_ICS
35 bool "ICS partition support" if PARTITION_ADVANCED && ACORN_PARTITION 37 bool "ICS partition support" if PARTITION_ADVANCED
36 default y if ARCH_ACORN 38 default y if ARCH_ACORN
39 depends on ACORN_PARTITION
37 help 40 help
38 Say Y here if you would like to use hard disks under Linux which 41 Say Y here if you would like to use hard disks under Linux which
39 were partitioned using the ICS interface on Acorn machines. 42 were partitioned using the ICS interface on Acorn machines.
40 43
41config ACORN_PARTITION_ADFS 44config ACORN_PARTITION_ADFS
42 bool "Native filecore partition support" if PARTITION_ADVANCED && ACORN_PARTITION 45 bool "Native filecore partition support" if PARTITION_ADVANCED
43 default y if ARCH_ACORN 46 default y if ARCH_ACORN
47 depends on ACORN_PARTITION
44 help 48 help
45 The Acorn Disc Filing System is the standard file system of the 49 The Acorn Disc Filing System is the standard file system of the
46 RiscOS operating system which runs on Acorn's ARM-based Risc PC 50 RiscOS operating system which runs on Acorn's ARM-based Risc PC
@@ -48,15 +52,17 @@ config ACORN_PARTITION_ADFS
48 `Y' here, Linux will support disk partitions created under ADFS. 52 `Y' here, Linux will support disk partitions created under ADFS.
49 53
50config ACORN_PARTITION_POWERTEC 54config ACORN_PARTITION_POWERTEC
51 bool "PowerTec partition support" if PARTITION_ADVANCED && ACORN_PARTITION 55 bool "PowerTec partition support" if PARTITION_ADVANCED
52 default y if ARCH_ACORN 56 default y if ARCH_ACORN
57 depends on ACORN_PARTITION
53 help 58 help
54 Support reading partition tables created on Acorn machines using 59 Support reading partition tables created on Acorn machines using
55 the PowerTec SCSI drive. 60 the PowerTec SCSI drive.
56 61
57config ACORN_PARTITION_RISCIX 62config ACORN_PARTITION_RISCIX
58 bool "RISCiX partition support" if PARTITION_ADVANCED && ACORN_PARTITION 63 bool "RISCiX partition support" if PARTITION_ADVANCED
59 default y if ARCH_ACORN 64 default y if ARCH_ACORN
65 depends on ACORN_PARTITION
60 help 66 help
61 Once upon a time, there was a native Unix port for the Acorn series 67 Once upon a time, there was a native Unix port for the Acorn series
62 of machines called RISCiX. If you say 'Y' here, Linux will be able 68 of machines called RISCiX. If you say 'Y' here, Linux will be able
@@ -224,5 +230,3 @@ config EFI_PARTITION
224 Say Y here if you would like to use hard disks under Linux which 230 Say Y here if you would like to use hard disks under Linux which
225 were partitioned using EFI GPT. Presently only useful on the 231 were partitioned using EFI GPT. Presently only useful on the
226 IA-64 platform. 232 IA-64 platform.
227
228# 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
index 000000000000..58f40931a5c1
--- /dev/null
+++ b/include/asm-arm/arch-at91rm9200/at91rm9200.h
@@ -0,0 +1,261 @@
1/*
2 * include/asm-arm/arch-at91rm9200/at91rm9200.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Common definitions.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91RM9200_H
17#define AT91RM9200_H
18
19/*
20 * Peripheral identifiers/interrupts.
21 */
22#define AT91_ID_FIQ 0 /* Advanced Interrupt Controller (FIQ) */
23#define AT91_ID_SYS 1 /* System Peripheral */
24#define AT91_ID_PIOA 2 /* Parallel IO Controller A */
25#define AT91_ID_PIOB 3 /* Parallel IO Controller B */
26#define AT91_ID_PIOC 4 /* Parallel IO Controller C */
27#define AT91_ID_PIOD 5 /* Parallel IO Controller D */
28#define AT91_ID_US0 6 /* USART 0 */
29#define AT91_ID_US1 7 /* USART 1 */
30#define AT91_ID_US2 8 /* USART 2 */
31#define AT91_ID_US3 9 /* USART 3 */
32#define AT91_ID_MCI 10 /* Multimedia Card Interface */
33#define AT91_ID_UDP 11 /* USB Device Port */
34#define AT91_ID_TWI 12 /* Two-Wire Interface */
35#define AT91_ID_SPI 13 /* Serial Peripheral Interface */
36#define AT91_ID_SSC0 14 /* Serial Synchronous Controller 0 */
37#define AT91_ID_SSC1 15 /* Serial Synchronous Controller 1 */
38#define AT91_ID_SSC2 16 /* Serial Synchronous Controller 2 */
39#define AT91_ID_TC0 17 /* Timer Counter 0 */
40#define AT91_ID_TC1 18 /* Timer Counter 1 */
41#define AT91_ID_TC2 19 /* Timer Counter 2 */
42#define AT91_ID_TC3 20 /* Timer Counter 3 */
43#define AT91_ID_TC4 21 /* Timer Counter 4 */
44#define AT91_ID_TC5 22 /* Timer Counter 5 */
45#define AT91_ID_UHP 23 /* USB Host port */
46#define AT91_ID_EMAC 24 /* Ethernet MAC */
47#define AT91_ID_IRQ0 25 /* Advanced Interrupt Controller (IRQ0) */
48#define AT91_ID_IRQ1 26 /* Advanced Interrupt Controller (IRQ1) */
49#define AT91_ID_IRQ2 27 /* Advanced Interrupt Controller (IRQ2) */
50#define AT91_ID_IRQ3 28 /* Advanced Interrupt Controller (IRQ3) */
51#define AT91_ID_IRQ4 29 /* Advanced Interrupt Controller (IRQ4) */
52#define AT91_ID_IRQ5 30 /* Advanced Interrupt Controller (IRQ5) */
53#define AT91_ID_IRQ6 31 /* Advanced Interrupt Controller (IRQ6) */
54
55
56/*
57 * Peripheral physical base addresses.
58 */
59#define AT91_BASE_TCB0 0xfffa0000
60#define AT91_BASE_TC0 0xfffa0000
61#define AT91_BASE_TC1 0xfffa0040
62#define AT91_BASE_TC2 0xfffa0080
63#define AT91_BASE_TCB1 0xfffa4000
64#define AT91_BASE_TC3 0xfffa4000
65#define AT91_BASE_TC4 0xfffa4040
66#define AT91_BASE_TC5 0xfffa4080
67#define AT91_BASE_UDP 0xfffb0000
68#define AT91_BASE_MCI 0xfffb4000
69#define AT91_BASE_TWI 0xfffb8000
70#define AT91_BASE_EMAC 0xfffbc000
71#define AT91_BASE_US0 0xfffc0000
72#define AT91_BASE_US1 0xfffc4000
73#define AT91_BASE_US2 0xfffc8000
74#define AT91_BASE_US3 0xfffcc000
75#define AT91_BASE_SSC0 0xfffd0000
76#define AT91_BASE_SSC1 0xfffd4000
77#define AT91_BASE_SSC2 0xfffd8000
78#define AT91_BASE_SPI 0xfffe0000
79#define AT91_BASE_SYS 0xfffff000
80
81
82/*
83 * PIO pin definitions (peripheral A/B multiplexing).
84 */
85#define AT91_PA0_MISO (1 << 0) /* A: SPI Master-In Slave-Out */
86#define AT91_PA0_PCK3 (1 << 0) /* B: PMC Programmable Clock Output 3 */
87#define AT91_PA1_MOSI (1 << 1) /* A: SPI Master-Out Slave-In */
88#define AT91_PA1_PCK0 (1 << 1) /* B: PMC Programmable Clock Output 0 */
89#define AT91_PA2_SPCK (1 << 2) /* A: SPI Serial Clock */
90#define AT91_PA2_IRQ4 (1 << 2) /* B: External Interrupt 4 */
91#define AT91_PA3_NPCS0 (1 << 3) /* A: SPI Peripheral Chip Select 0 */
92#define AT91_PA3_IRQ5 (1 << 3) /* B: External Interrupt 5 */
93#define AT91_PA4_NPCS1 (1 << 4) /* A: SPI Peripheral Chip Select 1 */
94#define AT91_PA4_PCK1 (1 << 4) /* B: PMC Programmable Clock Output 1 */
95#define AT91_PA5_NPCS2 (1 << 5) /* A: SPI Peripheral Chip Select 2 */
96#define AT91_PA5_TXD3 (1 << 5) /* B: USART Transmit Data 3 */
97#define AT91_PA6_NPCS3 (1 << 6) /* A: SPI Peripheral Chip Select 3 */
98#define AT91_PA6_RXD3 (1 << 6) /* B: USART Receive Data 3 */
99#define AT91_PA7_ETXCK_EREFCK (1 << 7) /* A: Ethernet Reference Clock / Transmit Clock */
100#define AT91_PA7_PCK2 (1 << 7) /* B: PMC Programmable Clock Output 2 */
101#define AT91_PA8_ETXEN (1 << 8) /* A: Ethernet Transmit Enable */
102#define AT91_PA8_MCCDB (1 << 8) /* B: MMC Multimedia Card B Command */
103#define AT91_PA9_ETX0 (1 << 9) /* A: Ethernet Transmit Data 0 */
104#define AT91_PA9_MCDB0 (1 << 9) /* B: MMC Multimedia Card B Data 0 */
105#define AT91_PA10_ETX1 (1 << 10) /* A: Ethernet Transmit Data 1 */
106#define AT91_PA10_MCDB1 (1 << 10) /* B: MMC Multimedia Card B Data 1 */
107#define AT91_PA11_ECRS_ECRSDV (1 << 11) /* A: Ethernet Carrier Sense / Data Valid */
108#define AT91_PA11_MCDB2 (1 << 11) /* B: MMC Multimedia Card B Data 2 */
109#define AT91_PA12_ERX0 (1 << 12) /* A: Ethernet Receive Data 0 */
110#define AT91_PA12_MCDB3 (1 << 12) /* B: MMC Multimedia Card B Data 3 */
111#define AT91_PA13_ERX1 (1 << 13) /* A: Ethernet Receive Data 1 */
112#define AT91_PA13_TCLK0 (1 << 13) /* B: TC External Clock Input 0 */
113#define AT91_PA14_ERXER (1 << 14) /* A: Ethernet Receive Error */
114#define AT91_PA14_TCLK1 (1 << 14) /* B: TC External Clock Input 1 */
115#define AT91_PA15_EMDC (1 << 15) /* A: Ethernet Management Data Clock */
116#define AT91_PA15_TCLK2 (1 << 15) /* B: TC External Clock Input 2 */
117#define AT91_PA16_EMDIO (1 << 16) /* A: Ethernet Management Data I/O */
118#define AT91_PA16_IRQ6 (1 << 16) /* B: External Interrupt 6 */
119#define AT91_PA17_TXD0 (1 << 17) /* A: USART Transmit Data 0 */
120#define AT91_PA17_TIOA0 (1 << 17) /* B: TC I/O Line A 0 */
121#define AT91_PA18_RXD0 (1 << 18) /* A: USART Receive Data 0 */
122#define AT91_PA18_TIOB0 (1 << 18) /* B: TC I/O Line B 0 */
123#define AT91_PA19_SCK0 (1 << 19) /* A: USART Serial Clock 0 */
124#define AT91_PA19_TIOA1 (1 << 19) /* B: TC I/O Line A 1 */
125#define AT91_PA20_CTS0 (1 << 20) /* A: USART Clear To Send 0 */
126#define AT91_PA20_TIOB1 (1 << 20) /* B: TC I/O Line B 1 */
127#define AT91_PA21_RTS0 (1 << 21) /* A: USART Ready To Send 0 */
128#define AT91_PA21_TIOA2 (1 << 21) /* B: TC I/O Line A 2 */
129#define AT91_PA22_RXD2 (1 << 22) /* A: USART Receive Data 2 */
130#define AT91_PA22_TIOB2 (1 << 22) /* B: TC I/O Line B 2 */
131#define AT91_PA23_TXD2 (1 << 23) /* A: USART Transmit Data 2 */
132#define AT91_PA23_IRQ3 (1 << 23) /* B: External Interrupt 3 */
133#define AT91_PA24_SCK2 (1 << 24) /* A: USART Serial Clock 2 */
134#define AT91_PA24_PCK1 (1 << 24) /* B: PMC Programmable Clock Output 1 */
135#define AT91_PA25_TWD (1 << 25) /* A: TWI Two-wire Serial Data */
136#define AT91_PA25_IRQ2 (1 << 25) /* B: External Interrupt 2 */
137#define AT91_PA26_TWCK (1 << 26) /* A: TWI Two-wire Serial Clock */
138#define AT91_PA26_IRQ1 (1 << 26) /* B: External Interrupt 1 */
139#define AT91_PA27_MCCK (1 << 27) /* A: MMC Multimedia Card Clock */
140#define AT91_PA27_TCLK3 (1 << 27) /* B: TC External Clock Input 3 */
141#define AT91_PA28_MCCDA (1 << 28) /* A: MMC Multimedia Card A Command */
142#define AT91_PA28_TCLK4 (1 << 28) /* B: TC External Clock Input 4 */
143#define AT91_PA29_MCDA0 (1 << 29) /* A: MMC Multimedia Card A Data 0 */
144#define AT91_PA29_TCLK5 (1 << 29) /* B: TC External Clock Input 5 */
145#define AT91_PA30_DRXD (1 << 30) /* A: DBGU Receive Data */
146#define AT91_PA30_CTS2 (1 << 30) /* B: USART Clear To Send 2 */
147#define AT91_PA31_DTXD (1 << 31) /* A: DBGU Transmit Data */
148#define AT91_PA31_RTS2 (1 << 31) /* B: USART Ready To Send 2 */
149
150#define AT91_PB0_TF0 (1 << 0) /* A: SSC Transmit Frame Sync 0 */
151#define AT91_PB0_RTS3 (1 << 0) /* B: USART Ready To Send 3 */
152#define AT91_PB1_TK0 (1 << 1) /* A: SSC Transmit Clock 0 */
153#define AT91_PB1_CTS3 (1 << 1) /* B: USART Clear To Send 3 */
154#define AT91_PB2_TD0 (1 << 2) /* A: SSC Transmit Data 0 */
155#define AT91_PB2_SCK3 (1 << 2) /* B: USART Serial Clock 3 */
156#define AT91_PB3_RD0 (1 << 3) /* A: SSC Receive Data 0 */
157#define AT91_PB3_MCDA1 (1 << 3) /* B: MMC Multimedia Card A Data 1 */
158#define AT91_PB4_RK0 (1 << 4) /* A: SSC Receive Clock 0 */
159#define AT91_PB4_MCDA2 (1 << 4) /* B: MMC Multimedia Card A Data 2 */
160#define AT91_PB5_RF0 (1 << 5) /* A: SSC Receive Frame Sync 0 */
161#define AT91_PB5_MCDA3 (1 << 5) /* B: MMC Multimedia Card A Data 3 */
162#define AT91_PB6_TF1 (1 << 6) /* A: SSC Transmit Frame Sync 1 */
163#define AT91_PB6_TIOA3 (1 << 6) /* B: TC I/O Line A 3 */
164#define AT91_PB7_TK1 (1 << 7) /* A: SSC Transmit Clock 1 */
165#define AT91_PB7_TIOB3 (1 << 7) /* B: TC I/O Line B 3 */
166#define AT91_PB8_TD1 (1 << 8) /* A: SSC Transmit Data 1 */
167#define AT91_PB8_TIOA4 (1 << 8) /* B: TC I/O Line A 4 */
168#define AT91_PB9_RD1 (1 << 9) /* A: SSC Receive Data 1 */
169#define AT91_PB9_TIOB4 (1 << 9) /* B: TC I/O Line B 4 */
170#define AT91_PB10_RK1 (1 << 10) /* A: SSC Receive Clock 1 */
171#define AT91_PB10_TIOA5 (1 << 10) /* B: TC I/O Line A 5 */
172#define AT91_PB11_RF1 (1 << 11) /* A: SSC Receive Frame Sync 1 */
173#define AT91_PB11_TIOB5 (1 << 11) /* B: TC I/O Line B 5 */
174#define AT91_PB12_TF2 (1 << 12) /* A: SSC Transmit Frame Sync 2 */
175#define AT91_PB12_ETX2 (1 << 12) /* B: Ethernet Transmit Data 2 */
176#define AT91_PB13_TK2 (1 << 13) /* A: SSC Transmit Clock 3 */
177#define AT91_PB13_ETX3 (1 << 13) /* B: Ethernet Transmit Data 3 */
178#define AT91_PB14_TD2 (1 << 14) /* A: SSC Transmit Data 2 */
179#define AT91_PB14_ETXER (1 << 14) /* B: Ethernet Transmit Coding Error */
180#define AT91_PB15_RD2 (1 << 15) /* A: SSC Receive Data 2 */
181#define AT91_PB15_ERX2 (1 << 15) /* B: Ethernet Receive Data 2 */
182#define AT91_PB16_RK2 (1 << 16) /* A: SSC Receive Clock 2 */
183#define AT91_PB16_ERX3 (1 << 16) /* B: Ethernet Receive Data 3 */
184#define AT91_PB17_RF2 (1 << 17) /* A: SSC Receive Frame Sync 2 */
185#define AT91_PB17_ERXDV (1 << 17) /* B: Ethernet Receive Data Valid */
186#define AT91_PB18_RI1 (1 << 18) /* A: USART Ring Indicator 1 */
187#define AT91_PB18_ECOL (1 << 18) /* B: Ethernet Collision Detected */
188#define AT91_PB19_DTR1 (1 << 19) /* A: USART Data Terminal Ready 1 */
189#define AT91_PB19_ERXCK (1 << 19) /* B: Ethernet Receive Clock */
190#define AT91_PB20_TXD1 (1 << 20) /* A: USART Transmit Data 1 */
191#define AT91_PB21_RXD1 (1 << 21) /* A: USART Receive Data 1 */
192#define AT91_PB22_SCK1 (1 << 22) /* A: USART Serial Clock 1 */
193#define AT91_PB23_DCD1 (1 << 23) /* A: USART Data Carrier Detect 1 */
194#define AT91_PB24_CTS1 (1 << 24) /* A: USART Clear To Send 1 */
195#define AT91_PB25_DSR1 (1 << 25) /* A: USART Data Set Ready 1 */
196#define AT91_PB25_EF100 (1 << 25) /* B: Ethernet Force 100 Mbit */
197#define AT91_PB26_RTS1 (1 << 26) /* A: USART Ready To Send 1 */
198#define AT91_PB27_PCK0 (1 << 27) /* B: PMC Programmable Clock Output 0 */
199#define AT91_PB28_FIQ (1 << 28) /* A: Fast Interrupt */
200#define AT91_PB29_IRQ0 (1 << 29) /* A: External Interrupt 0 */
201
202#define AT91_PC0_BFCK (1 << 0) /* A: Burst Flash Clock */
203#define AT91_PC1_BFRDY_SMOE (1 << 1) /* A: Burst Flash Ready / SmartMedia Output Enable */
204#define AT91_PC2_BFAVD (1 << 2) /* A: Burst Flash Address Valid */
205#define AT91_PC3_BFBAA_SMWE (1 << 3) /* A: Burst Flash Address Advance / SmartMedia Write Enable */
206#define AT91_PC4_BFOE (1 << 4) /* A: Burst Flash Output Enable */
207#define AT91_PC5_BFWE (1 << 5) /* A: Burst Flash Write Enable */
208#define AT91_PC6_NWAIT (1 << 6) /* A: SMC Wait Signal */
209#define AT91_PC7_A23 (1 << 7) /* A: Address Bus 23 */
210#define AT91_PC8_A24 (1 << 8) /* A: Address Bus 24 */
211#define AT91_PC9_A25_CFRNW (1 << 9) /* A: Address Bus 25 / Compact Flash Read Not Write */
212#define AT91_PC10_NCS4_CFCS (1 << 10) /* A: SMC Chip Select 4 / Compact Flash Chip Select */
213#define AT91_PC11_NCS5_CFCE1 (1 << 11) /* A: SMC Chip Select 5 / Compact Flash Chip Enable 1 */
214#define AT91_PC12_NCS6_CFCE2 (1 << 12) /* A: SMC Chip Select 6 / Compact Flash Chip Enable 2 */
215#define AT91_PC13_NCS7 (1 << 13) /* A: Chip Select 7 */
216
217#define AT91_PD0_ETX0 (1 << 0) /* A: Ethernet Transmit Data 0 */
218#define AT91_PD1_ETX1 (1 << 1) /* A: Ethernet Transmit Data 1 */
219#define AT91_PD2_ETX2 (1 << 2) /* A: Ethernet Transmit Data 2 */
220#define AT91_PD3_ETX3 (1 << 3) /* A: Ethernet Transmit Data 3 */
221#define AT91_PD4_ETXEN (1 << 4) /* A: Ethernet Transmit Enable */
222#define AT91_PD5_ETXER (1 << 5) /* A: Ethernet Transmit Coding Error */
223#define AT91_PD6_DTXD (1 << 6) /* A: DBGU Transmit Data */
224#define AT91_PD7_PCK0 (1 << 7) /* A: PMC Programmable Clock Output 0 */
225#define AT91_PD7_TSYNC (1 << 7) /* B: ETM Trace Synchronization Signal */
226#define AT91_PD8_PCK1 (1 << 8) /* A: PMC Programmable Clock Output 1 */
227#define AT91_PD8_TCLK (1 << 8) /* B: ETM Trace Clock */
228#define AT91_PD9_PCK2 (1 << 9) /* A: PMC Programmable Clock Output 2 */
229#define AT91_PD9_TPS0 (1 << 9) /* B: ETM Trace ARM Pipeline Status 0 */
230#define AT91_PD10_PCK3 (1 << 10) /* A: PMC Programmable Clock Output 3 */
231#define AT91_PD10_TPS1 (1 << 10) /* B: ETM Trace ARM Pipeline Status 1 */
232#define AT91_PD11_TPS2 (1 << 11) /* B: ETM Trace ARM Pipeline Status 2 */
233#define AT91_PD12_TPK0 (1 << 12) /* B: ETM Trace Packet Port 0 */
234#define AT91_PD13_TPK1 (1 << 13) /* B: ETM Trace Packet Port 1 */
235#define AT91_PD14_TPK2 (1 << 14) /* B: ETM Trace Packet Port 2 */
236#define AT91_PD15_TD0 (1 << 15) /* A: SSC Transmit Data 0 */
237#define AT91_PD15_TPK3 (1 << 15) /* B: ETM Trace Packet Port 3 */
238#define AT91_PD16_TD1 (1 << 16) /* A: SSC Transmit Data 1 */
239#define AT91_PD16_TPK4 (1 << 16) /* B: ETM Trace Packet Port 4 */
240#define AT91_PD17_TD2 (1 << 17) /* A: SSC Transmit Data 2 */
241#define AT91_PD17_TPK5 (1 << 17) /* B: ETM Trace Packet Port 5 */
242#define AT91_PD18_NPCS1 (1 << 18) /* A: SPI Peripheral Chip Select 1 */
243#define AT91_PD18_TPK6 (1 << 18) /* B: ETM Trace Packet Port 6 */
244#define AT91_PD19_NPCS2 (1 << 19) /* A: SPI Peripheral Chip Select 2 */
245#define AT91_PD19_TPK7 (1 << 19) /* B: ETM Trace Packet Port 7 */
246#define AT91_PD20_NPCS3 (1 << 20) /* A: SPI Peripheral Chip Select 3 */
247#define AT91_PD20_TPK8 (1 << 20) /* B: ETM Trace Packet Port 8 */
248#define AT91_PD21_RTS0 (1 << 21) /* A: USART Ready To Send 0 */
249#define AT91_PD21_TPK9 (1 << 21) /* B: ETM Trace Packet Port 9 */
250#define AT91_PD22_RTS1 (1 << 22) /* A: USART Ready To Send 1 */
251#define AT91_PD22_TPK10 (1 << 22) /* B: ETM Trace Packet Port 10 */
252#define AT91_PD23_RTS2 (1 << 23) /* A: USART Ready To Send 2 */
253#define AT91_PD23_TPK11 (1 << 23) /* B: ETM Trace Packet Port 11 */
254#define AT91_PD24_RTS3 (1 << 24) /* A: USART Ready To Send 3 */
255#define AT91_PD24_TPK12 (1 << 24) /* B: ETM Trace Packet Port 12 */
256#define AT91_PD25_DTR1 (1 << 25) /* A: USART Data Terminal Ready 1 */
257#define AT91_PD25_TPK13 (1 << 25) /* B: ETM Trace Packet Port 13 */
258#define AT91_PD26_TPK14 (1 << 26) /* B: ETM Trace Packet Port 14 */
259#define AT91_PD27_TPK15 (1 << 27) /* B: ETM Trace Packet Port 15 */
260
261#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
index 000000000000..9bfffdbf1e0b
--- /dev/null
+++ b/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h
@@ -0,0 +1,328 @@
1/*
2 * include/asm-arm/arch-at91rm9200/at91rm9200_sys.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * System peripherals registers.
8 * Based on AT91RM9200 datasheet revision E.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91RM9200_SYS_H
17#define AT91RM9200_SYS_H
18
19/*
20 * Advanced Interrupt Controller.
21 */
22#define AT91_AIC 0x000
23
24#define AT91_AIC_SMR(n) (AT91_AIC + ((n) * 4)) /* Source Mode Registers 0-31 */
25#define AT91_AIC_PRIOR (7 << 0) /* Priority Level */
26#define AT91_AIC_SRCTYPE (3 << 5) /* Interrupt Source Type */
27#define AT91_AIC_SRCTYPE_LOW (0 << 5)
28#define AT91_AIC_SRCTYPE_FALLING (1 << 5)
29#define AT91_AIC_SRCTYPE_HIGH (2 << 5)
30#define AT91_AIC_SRCTYPE_RISING (3 << 5)
31
32#define AT91_AIC_SVR(n) (AT91_AIC + 0x80 + ((n) * 4)) /* Source Vector Registers 0-31 */
33#define AT91_AIC_IVR (AT91_AIC + 0x100) /* Interrupt Vector Register */
34#define AT91_AIC_FVR (AT91_AIC + 0x104) /* Fast Interrupt Vector Register */
35#define AT91_AIC_ISR (AT91_AIC + 0x108) /* Interrupt Status Register */
36#define AT91_AIC_IRQID (0x1f << 0) /* Current Interrupt Identifier */
37
38#define AT91_AIC_IPR (AT91_AIC + 0x10c) /* Interrupt Pending Register */
39#define AT91_AIC_IMR (AT91_AIC + 0x110) /* Interrupt Mask Register */
40#define AT91_AIC_CISR (AT91_AIC + 0x114) /* Core Interrupt Status Register */
41#define AT91_AIC_NFIQ (1 << 0) /* nFIQ Status */
42#define AT91_AIC_NIRQ (1 << 1) /* nIRQ Status */
43
44#define AT91_AIC_IECR (AT91_AIC + 0x120) /* Interrupt Enable Command Register */
45#define AT91_AIC_IDCR (AT91_AIC + 0x124) /* Interrupt Disable Command Register */
46#define AT91_AIC_ICCR (AT91_AIC + 0x128) /* Interrupt Clear Command Register */
47#define AT91_AIC_ISCR (AT91_AIC + 0x12c) /* Interrupt Set Command Register */
48#define AT91_AIC_EOICR (AT91_AIC + 0x130) /* End of Interrupt Command Register */
49#define AT91_AIC_SPU (AT91_AIC + 0x134) /* Spurious Interrupt Vector Register */
50#define AT91_AIC_DCR (AT91_AIC + 0x138) /* Debug Control Register */
51#define AT91_AIC_DCR_PROT (1 << 0) /* Protection Mode */
52#define AT91_AIC_DCR_GMSK (1 << 1) /* General Mask */
53
54
55/*
56 * Debug Unit.
57 */
58#define AT91_DBGU 0x200
59
60#define AT91_DBGU_CR (AT91_DBGU + 0x00) /* Control Register */
61#define AT91_DBGU_MR (AT91_DBGU + 0x04) /* Mode Register */
62#define AT91_DBGU_IER (AT91_DBGU + 0x08) /* Interrupt Enable Register */
63#define AT91_DBGU_TXRDY (1 << 1) /* Transmitter Ready */
64#define AT91_DBGU_TXEMPTY (1 << 9) /* Transmitter Empty */
65#define AT91_DBGU_IDR (AT91_DBGU + 0x0c) /* Interrupt Disable Register */
66#define AT91_DBGU_IMR (AT91_DBGU + 0x10) /* Interrupt Mask Register */
67#define AT91_DBGU_SR (AT91_DBGU + 0x14) /* Status Register */
68#define AT91_DBGU_RHR (AT91_DBGU + 0x18) /* Receiver Holding Register */
69#define AT91_DBGU_THR (AT91_DBGU + 0x1c) /* Transmitter Holding Register */
70#define AT91_DBGU_BRGR (AT91_DBGU + 0x20) /* Baud Rate Generator Register */
71#define AT91_DBGU_CIDR (AT91_DBGU + 0x40) /* Chip ID Register */
72#define AT91_DBGU_EXID (AT91_DBGU + 0x44) /* Chip ID Extension Register */
73
74
75/*
76 * PIO Controllers.
77 */
78#define AT91_PIOA 0x400
79#define AT91_PIOB 0x600
80#define AT91_PIOC 0x800
81#define AT91_PIOD 0xa00
82
83#define PIO_PER 0x00 /* Enable Register */
84#define PIO_PDR 0x04 /* Disable Register */
85#define PIO_PSR 0x08 /* Status Register */
86#define PIO_OER 0x10 /* Output Enable Register */
87#define PIO_ODR 0x14 /* Output Disable Register */
88#define PIO_OSR 0x18 /* Output Status Register */
89#define PIO_IFER 0x20 /* Glitch Input Filter Enable */
90#define PIO_IFDR 0x24 /* Glitch Input Filter Disable */
91#define PIO_IFSR 0x28 /* Glitch Input Filter Status */
92#define PIO_SODR 0x30 /* Set Output Data Register */
93#define PIO_CODR 0x34 /* Clear Output Data Register */
94#define PIO_ODSR 0x38 /* Output Data Status Register */
95#define PIO_PDSR 0x3c /* Pin Data Status Register */
96#define PIO_IER 0x40 /* Interrupt Enable Register */
97#define PIO_IDR 0x44 /* Interrupt Disable Register */
98#define PIO_IMR 0x48 /* Interrupt Mask Register */
99#define PIO_ISR 0x4c /* Interrupt Status Register */
100#define PIO_MDER 0x50 /* Multi-driver Enable Register */
101#define PIO_MDDR 0x54 /* Multi-driver Disable Register */
102#define PIO_MDSR 0x58 /* Multi-driver Status Register */
103#define PIO_PUDR 0x60 /* Pull-up Disable Register */
104#define PIO_PUER 0x64 /* Pull-up Enable Register */
105#define PIO_PUSR 0x68 /* Pull-up Status Register */
106#define PIO_ASR 0x70 /* Peripheral A Select Register */
107#define PIO_BSR 0x74 /* Peripheral B Select Register */
108#define PIO_ABSR 0x78 /* AB Status Register */
109#define PIO_OWER 0xa0 /* Output Write Enable Register */
110#define PIO_OWDR 0xa4 /* Output Write Disable Register */
111#define PIO_OWSR 0xa8 /* Output Write Status Register */
112
113#define AT91_PIO_P(n) (1 << (n))
114
115
116/*
117 * Power Management Controller.
118 */
119#define AT91_PMC 0xc00
120
121#define AT91_PMC_SCER (AT91_PMC + 0x00) /* System Clock Enable Register */
122#define AT91_PMC_SCDR (AT91_PMC + 0x04) /* System Clock Disable Register */
123
124#define AT91_PMC_SCSR (AT91_PMC + 0x08) /* System Clock Status Register */
125#define AT91_PMC_PCK (1 << 0) /* Processor Clock */
126#define AT91_PMC_UDP (1 << 1) /* USB Devcice Port Clock */
127#define AT91_PMC_MCKUDP (1 << 2) /* USB Device Port Master Clock Automatic Disable on Suspend */
128#define AT91_PMC_UHP (1 << 4) /* USB Host Port Clock */
129#define AT91_PMC_PCK0 (1 << 8) /* Programmable Clock 0 */
130#define AT91_PMC_PCK1 (1 << 9) /* Programmable Clock 1 */
131#define AT91_PMC_PCK2 (1 << 10) /* Programmable Clock 2 */
132#define AT91_PMC_PCK3 (1 << 11) /* Programmable Clock 3 */
133
134#define AT91_PMC_PCER (AT91_PMC + 0x10) /* Peripheral Clock Enable Register */
135#define AT91_PMC_PCDR (AT91_PMC + 0x14) /* Peripheral Clock Disable Register */
136#define AT91_PMC_PCSR (AT91_PMC + 0x18) /* Peripheral Clock Status Register */
137
138#define AT91_CKGR_MOR (AT91_PMC + 0x20) /* Main Oscillator Register */
139#define AT91_PMC_MOSCEN (1 << 0) /* Main Oscillator Enable */
140#define AT91_PMC_OSCOUNT (0xff << 8) /* Main Oscillator Start-up Time */
141
142#define AT91_CKGR_MCFR (AT91_PMC + 0x24) /* Main Clock Frequency Register */
143#define AT91_PMC_MAINF (0xffff << 0) /* Main Clock Frequency */
144#define AT91_PMC_MAINRDY (1 << 16) /* Main Clock Ready */
145
146#define AT91_CKGR_PLLAR (AT91_PMC + 0x28) /* PLL A Register */
147#define AT91_CKGR_PLLBR (AT91_PMC + 0x2c) /* PLL B Register */
148#define AT91_PMC_DIV (0xff << 0) /* Divider */
149#define AT91_PMC_PLLCOUNT (0x3f << 8) /* PLL Counter */
150#define AT91_PMC_OUT (3 << 14) /* PLL Clock Frequency Range */
151#define AT91_PMC_MUL (0x7ff << 16) /* PLL Multiplier */
152#define AT91_PMC_USB96M (1 << 28) /* Divider by 2 Enable (PLLB only) */
153
154#define AT91_PMC_MCKR (AT91_PMC + 0x30) /* Master Clock Register */
155#define AT91_PMC_CSS (3 << 0) /* Master Clock Selection */
156#define AT91_PMC_CSS_SLOW (0 << 0)
157#define AT91_PMC_CSS_MAIN (1 << 0)
158#define AT91_PMC_CSS_PLLA (2 << 0)
159#define AT91_PMC_CSS_PLLB (3 << 0)
160#define AT91_PMC_PRES (7 << 2) /* Master Clock Prescaler */
161#define AT91_PMC_PRES_1 (0 << 2)
162#define AT91_PMC_PRES_2 (1 << 2)
163#define AT91_PMC_PRES_4 (2 << 2)
164#define AT91_PMC_PRES_8 (3 << 2)
165#define AT91_PMC_PRES_16 (4 << 2)
166#define AT91_PMC_PRES_32 (5 << 2)
167#define AT91_PMC_PRES_64 (6 << 2)
168#define AT91_PMC_MDIV (3 << 8) /* Master Clock Division */
169#define AT91_PMC_MDIV_1 (0 << 8)
170#define AT91_PMC_MDIV_2 (1 << 8)
171#define AT91_PMC_MDIV_3 (2 << 8)
172#define AT91_PMC_MDIV_4 (3 << 8)
173
174#define AT91_PMC_PCKR(n) (AT91_PMC + 0x40 + ((n) * 4)) /* Programmable Clock 0-3 Registers */
175#define AT91_PMC_IER (AT91_PMC + 0x60) /* Interrupt Enable Register */
176#define AT91_PMC_IDR (AT91_PMC + 0x64) /* Interrupt Disable Register */
177#define AT91_PMC_SR (AT91_PMC + 0x68) /* Status Register */
178#define AT91_PMC_MOSCS (1 << 0) /* MOSCS Flag */
179#define AT91_PMC_LOCKA (1 << 1) /* PLLA Lock */
180#define AT91_PMC_LOCKB (1 << 2) /* PLLB Lock */
181#define AT91_PMC_MCKRDY (1 << 3) /* Master Clock */
182#define AT91_PMC_PCK0RDY (1 << 8) /* Programmable Clock 0 */
183#define AT91_PMC_PCK1RDY (1 << 9) /* Programmable Clock 1 */
184#define AT91_PMC_PCK2RDY (1 << 10) /* Programmable Clock 2 */
185#define AT91_PMC_PCK3RDY (1 << 11) /* Programmable Clock 3 */
186#define AT91_PMC_IMR (AT91_PMC + 0x6c) /* Interrupt Mask Register */
187
188
189/*
190 * System Timer.
191 */
192#define AT91_ST 0xd00
193
194#define AT91_ST_CR (AT91_ST + 0x00) /* Control Register */
195#define AT91_ST_WDRST (1 << 0) /* Watchdog Timer Restart */
196#define AT91_ST_PIMR (AT91_ST + 0x04) /* Period Interval Mode Register */
197#define AT91_ST_PIV (0xffff << 0) /* Period Interval Value */
198#define AT91_ST_WDMR (AT91_ST + 0x08) /* Watchdog Mode Register */
199#define AT91_ST_WDV (0xffff << 0) /* Watchdog Counter Value */
200#define AT91_ST_RSTEN (1 << 16) /* Reset Enable */
201#define AT91_ST_EXTEN (1 << 17) /* External Signal Assertion Enable */
202#define AT91_ST_RTMR (AT91_ST + 0x0c) /* Real-time Mode Register */
203#define AT91_ST_RTPRES (0xffff << 0) /* Real-time Prescalar Value */
204#define AT91_ST_SR (AT91_ST + 0x10) /* Status Register */
205#define AT91_ST_PITS (1 << 0) /* Period Interval Timer Status */
206#define AT91_ST_WDOVF (1 << 1) /* Watchdog Overflow */
207#define AT91_ST_RTTINC (1 << 2) /* Real-time Timer Increment */
208#define AT91_ST_ALMS (1 << 3) /* Alarm Status */
209#define AT91_ST_IER (AT91_ST + 0x14) /* Interrupt Enable Register */
210#define AT91_ST_IDR (AT91_ST + 0x18) /* Interrupt Disable Register */
211#define AT91_ST_IMR (AT91_ST + 0x1c) /* Interrupt Mask Register */
212#define AT91_ST_RTAR (AT91_ST + 0x20) /* Real-time Alarm Register */
213#define AT91_ST_ALMV (0xfffff << 0) /* Alarm Value */
214#define AT91_ST_CRTR (AT91_ST + 0x24) /* Current Real-time Register */
215#define AT91_ST_CRTV (0xfffff << 0) /* Current Real-Time Value */
216
217
218/*
219 * Real-time Clock.
220 */
221#define AT91_RTC 0xe00
222
223#define AT91_RTC_CR (AT91_RTC + 0x00) /* Control Register */
224#define AT91_RTC_UPDTIM (1 << 0) /* Update Request Time Register */
225#define AT91_RTC_UPDCAL (1 << 1) /* Update Request Calendar Register */
226#define AT91_RTC_TIMEVSEL (3 << 8) /* Time Event Selection */
227#define AT91_RTC_TIMEVSEL_MINUTE (0 << 8)
228#define AT91_RTC_TIMEVSEL_HOUR (1 << 8)
229#define AT91_RTC_TIMEVSEL_DAY24 (2 << 8)
230#define AT91_RTC_TIMEVSEL_DAY12 (3 << 8)
231#define AT91_RTC_CALEVSEL (3 << 16) /* Calendar Event Selection */
232#define AT91_RTC_CALEVSEL_WEEK (0 << 16)
233#define AT91_RTC_CALEVSEL_MONTH (1 << 16)
234#define AT91_RTC_CALEVSEL_YEAR (2 << 16)
235
236#define AT91_RTC_MR (AT91_RTC + 0x04) /* Mode Register */
237#define AT91_RTC_HRMOD (1 << 0) /* 12/24 Hour Mode */
238
239#define AT91_RTC_TIMR (AT91_RTC + 0x08) /* Time Register */
240#define AT91_RTC_SEC (0x7f << 0) /* Current Second */
241#define AT91_RTC_MIN (0x7f << 8) /* Current Minute */
242#define AT91_RTC_HOUR (0x3f << 16) /* Current Hour */
243#define At91_RTC_AMPM (1 << 22) /* Ante Meridiem Post Meridiem Indicator */
244
245#define AT91_RTC_CALR (AT91_RTC + 0x0c) /* Calendar Register */
246#define AT91_RTC_CENT (0x7f << 0) /* Current Century */
247#define AT91_RTC_YEAR (0xff << 8) /* Current Year */
248#define AT91_RTC_MONTH (0x1f << 16) /* Current Month */
249#define AT91_RTC_DAY (7 << 21) /* Current Day */
250#define AT91_RTC_DATE (0x3f << 24) /* Current Date */
251
252#define AT91_RTC_TIMALR (AT91_RTC + 0x10) /* Time Alarm Register */
253#define AT91_RTC_SECEN (1 << 7) /* Second Alarm Enable */
254#define AT91_RTC_MINEN (1 << 15) /* Minute Alarm Enable */
255#define AT91_RTC_HOUREN (1 << 23) /* Hour Alarm Enable */
256
257#define AT91_RTC_CALALR (AT91_RTC + 0x14) /* Calendar Alarm Register */
258#define AT91_RTC_MTHEN (1 << 23) /* Month Alarm Enable */
259#define AT91_RTC_DATEEN (1 << 31) /* Date Alarm Enable */
260
261#define AT91_RTC_SR (AT91_RTC + 0x18) /* Status Register */
262#define AT91_RTC_ACKUPD (1 << 0) /* Acknowledge for Update */
263#define AT91_RTC_ALARM (1 << 1) /* Alarm Flag */
264#define AT91_RTC_SECEV (1 << 2) /* Second Event */
265#define AT91_RTC_TIMEV (1 << 3) /* Time Event */
266#define AT91_RTC_CALEV (1 << 4) /* Calendar Event */
267
268#define AT91_RTC_SCCR (AT91_RTC + 0x1c) /* Status Clear Command Register */
269#define AT91_RTC_IER (AT91_RTC + 0x20) /* Interrupt Enable Register */
270#define AT91_RTC_IDR (AT91_RTC + 0x24) /* Interrupt Disable Register */
271#define AT91_RTC_IMR (AT91_RTC + 0x28) /* Interrupt Mask Register */
272
273#define AT91_RTC_VER (AT91_RTC + 0x2c) /* Valid Entry Register */
274#define AT91_RTC_NVTIM (1 << 0) /* Non valid Time */
275#define AT91_RTC_NVCAL (1 << 1) /* Non valid Calendar */
276#define AT91_RTC_NVTIMALR (1 << 2) /* Non valid Time Alarm */
277#define AT91_RTC_NVCALALR (1 << 3) /* Non valid Calendar Alarm */
278
279
280/*
281 * Memory Controller.
282 */
283#define AT91_MC 0xf00
284
285#define AT91_MC_RCR (AT91_MC + 0x00) /* MC Remap Control Register */
286#define AT91_MC_RCB (1 << 0) /* Remap Command Bit */
287
288#define AT91_MC_ASR (AT91_MC + 0x04) /* MC Abort Status Register */
289#define AT91_MC_AASR (AT91_MC + 0x08) /* MC Abort Address Status Register */
290#define AT91_MC_MPR (AT91_MC + 0x0c) /* MC Master Priority Register */
291
292/* External Bus Interface (EBI) registers */
293#define AT91_EBI_CSA (AT91_MC + 0x60) /* Chip Select Assignment Register */
294#define AT91_EBI_CS0A (1 << 0) /* Chip Select 0 Assignment */
295#define AT91_EBI_CS0A_SMC (0 << 0)
296#define AT91_EBI_CS0A_BFC (1 << 0)
297#define AT91_EBI_CS1A (1 << 1) /* Chip Select 1 Assignment */
298#define AT91_EBI_CS1A_SMC (0 << 1)
299#define AT91_EBI_CS1A_SDRAMC (1 << 1)
300#define AT91_EBI_CS3A (1 << 3) /* Chip Select 2 Assignment */
301#define AT91_EBI_CS3A_SMC (0 << 3)
302#define AT91_EBI_CS3A_SMC_SMARTMEDIA (1 << 3)
303#define AT91_EBI_CS4A (1 << 4) /* Chip Select 3 Assignment */
304#define AT91_EBI_CS4A_SMC (0 << 4)
305#define AT91_EBI_CS4A_SMC_COMPACTFLASH (1 << 4)
306#define AT91_EBI_CFGR (AT91_MC + 0x64) /* Configuration Register */
307#define AT91_EBI_DBPUC (1 << 0) /* Data Bus Pull-Up Configuration */
308
309/* Static Memory Controller (SMC) registers */
310#define AT91_SMC_CSR(n) (AT91_MC + 0x70 + ((n) * 4))/* SMC Chip Select Register */
311#define AT91_SMC_NWS (0x7f << 0) /* Number of Wait States */
312#define AT91_SMC_WSEN (1 << 7) /* Wait State Enable */
313#define AT91_SMC_TDF (0xf << 8) /* Data Float Time */
314#define AT91_SMC_BAT (1 << 12) /* Byte Access Type */
315#define AT91_SMC_DBW (3 << 13) /* Data Bus Width */
316#define AT91_SMC_DBW_16 (1 << 13)
317#define AT91_SMC_DBW_8 (2 << 13)
318#define AT91_SMC_DPR (1 << 15) /* Data Read Protocol */
319#define AT91_SMC_ACSS (3 << 16) /* Address to Chip Select Setup */
320#define AT91_SMC_ACSS_STD (0 << 16)
321#define AT91_SMC_ACSS_1 (1 << 16)
322#define AT91_SMC_ACSS_2 (2 << 16)
323#define AT91_SMC_ACSS_3 (3 << 16)
324#define AT91_SMC_RWSETUP (7 << 24) /* Read & Write Signal Time Setup */
325#define AT91_SMC_RWHOLD (7 << 28) /* Read & Write Signal Hold Time */
326
327
328#endif
diff --git a/include/asm-arm/arch-at91rm9200/board.h b/include/asm-arm/arch-at91rm9200/board.h
new file mode 100644
index 000000000000..2e7d1139a799
--- /dev/null
+++ b/include/asm-arm/arch-at91rm9200/board.h
@@ -0,0 +1,80 @@
1/*
2 * include/asm-arm/arch-at91rm9200/board.h
3 *
4 * Copyright (C) 2005 HP Labs
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21/*
22 * These are data structures found in platform_device.dev.platform_data,
23 * and describing board-specfic data needed by drivers. For example,
24 * which pin is used for a given GPIO role.
25 *
26 * In 2.6, drivers should strongly avoid board-specific knowledge so
27 * that supporting new boards normally won't require driver patches.
28 * Most board-specific knowledge should be in arch/.../board-*.c files.
29 */
30
31#ifndef __ASM_ARCH_BOARD_H
32#define __ASM_ARCH_BOARD_H
33
34 /* Clocks */
35extern unsigned long at91_master_clock;
36
37 /* Serial Port */
38extern int at91_serial_map[AT91_NR_UART];
39extern int at91_console_port;
40
41 /* USB Device */
42struct at91_udc_data {
43 u8 vbus_pin; /* high == host powering us */
44 u8 pullup_pin; /* high == D+ pulled up */
45};
46extern void __init at91_add_device_udc(struct at91_udc_data *data);
47
48 /* Compact Flash */
49struct at91_cf_data {
50 u8 irq_pin; /* I/O IRQ */
51 u8 det_pin; /* Card detect */
52 u8 vcc_pin; /* power switching */
53 u8 rst_pin; /* card reset */
54};
55extern void __init at91_add_device_cf(struct at91_cf_data *data);
56
57 /* MMC / SD */
58struct at91_mmc_data {
59 u8 det_pin; /* card detect IRQ */
60 unsigned is_b:1; /* uses B side (vs A) */
61 unsigned wire4:1; /* (SD) supports DAT0..DAT3 */
62 u8 wp_pin; /* (SD) writeprotect detect */
63 u8 vcc_pin; /* power switching (high == on) */
64};
65extern void __init at91_add_device_mmc(struct at91_mmc_data *data);
66
67 /* Ethernet */
68struct at91_eth_data {
69 u8 phy_irq_pin; /* PHY IRQ */
70 u8 is_rmii; /* using RMII interface? */
71};
72extern void __init at91_add_device_eth(struct at91_eth_data *data);
73
74 /* USB Host */
75struct at91_usbh_data {
76 u8 ports; /* number of ports on root hub */
77};
78extern void __init at91_add_device_usbh(struct at91_usbh_data *data);
79
80#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
index 000000000000..f496b54c4c3e
--- /dev/null
+++ b/include/asm-arm/arch-at91rm9200/debug-macro.S
@@ -0,0 +1,38 @@
1/*
2 * include/asm-arm/arch-at91rm9200/debug-macro.S
3 *
4 * Copyright (C) 2003-2005 SAN People
5 *
6 * Debugging macro include header
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14#include <asm/hardware.h>
15
16 .macro addruart,rx
17 mrc p15, 0, \rx, c1, c0
18 tst \rx, #1 @ MMU enabled?
19 ldreq \rx, =AT91_BASE_SYS @ System peripherals (phys address)
20 ldrne \rx, =AT91_VA_BASE_SYS @ System peripherals (virt address)
21 .endm
22
23 .macro senduart,rd,rx
24 strb \rd, [\rx, #AT91_DBGU_THR] @ Write to Transmitter Holding Register
25 .endm
26
27 .macro waituart,rd,rx
281001: ldr \rd, [\rx, #AT91_DBGU_SR] @ Read Status Register
29 tst \rd, #AT91_DBGU_TXRDY @ DBGU_TXRDY = 1 when ready to transmit
30 beq 1001b
31 .endm
32
33 .macro busyuart,rd,rx
341001: ldr \rd, [\rx, #AT91_DBGU_SR] @ Read Status Register
35 tst \rd, #AT91_DBGU_TXEMPTY @ DBGU_TXEMPTY = 1 when transmission complete
36 beq 1001b
37 .endm
38
diff --git a/include/asm-arm/arch-epxa10db/param.h b/include/asm-arm/arch-at91rm9200/dma.h
index 783dedd71c8f..22c1dfdd8da3 100644
--- a/include/asm-arm/arch-epxa10db/param.h
+++ b/include/asm-arm/arch-at91rm9200/dma.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/include/asm-arm/arch-epxa10db/param.h 2 * include/asm-arm/arch-at91rm9200/dma.h
3 * 3 *
4 * Copyright (C) 1999 ARM Limited 4 * Copyright (C) 2003 SAN People
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * 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
index 000000000000..61a326e94909
--- /dev/null
+++ b/include/asm-arm/arch-at91rm9200/entry-macro.S
@@ -0,0 +1,25 @@
1/*
2 * include/asm-arm/arch-at91rm9200/entry-macro.S
3 *
4 * Copyright (C) 2003-2005 SAN People
5 *
6 * Low-level IRQ helper macros for AT91RM9200 platforms
7 *
8 * This file is licensed under the terms of the GNU General Public
9 * License version 2. This program is licensed "as is" without any
10 * warranty of any kind, whether express or implied.
11 */
12
13#include <asm/hardware.h>
14
15 .macro disable_fiq
16 .endm
17
18 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
19 ldr \base, =(AT91_VA_BASE_SYS) @ base virtual address of SYS peripherals
20 ldr \irqnr, [\base, #AT91_AIC_IVR] @ read IRQ vector register: de-asserts nIRQ to processor (and clears interrupt)
21 ldr \irqstat, [\base, #AT91_AIC_ISR] @ read interrupt source number
22 teq \irqstat, #0 @ ISR is 0 when no current interrupt, or spurious interrupt
23 streq \tmp, [\base, #AT91_AIC_EOICR] @ not going to be handled further, then ACK it now.
24 .endm
25
diff --git a/include/asm-arm/arch-at91rm9200/gpio.h b/include/asm-arm/arch-at91rm9200/gpio.h
new file mode 100644
index 000000000000..0f0a61e2f129
--- /dev/null
+++ b/include/asm-arm/arch-at91rm9200/gpio.h
@@ -0,0 +1,193 @@
1/*
2 * include/asm-arm/arch-at91rm9200/gpio.h
3 *
4 * Copyright (C) 2005 HP Labs
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 */
12
13#ifndef __ASM_ARCH_AT91RM9200_GPIO_H
14#define __ASM_ARCH_AT91RM9200_GPIO_H
15
16#define PIN_BASE NR_AIC_IRQS
17
18#define PQFP_GPIO_BANKS 3 /* PQFP package has 3 banks */
19#define BGA_GPIO_BANKS 4 /* BGA package has 4 banks */
20
21/* these pin numbers double as IRQ numbers, like AT91_ID_* values */
22
23#define AT91_PIN_PA0 (PIN_BASE + 0x00 + 0)
24#define AT91_PIN_PA1 (PIN_BASE + 0x00 + 1)
25#define AT91_PIN_PA2 (PIN_BASE + 0x00 + 2)
26#define AT91_PIN_PA3 (PIN_BASE + 0x00 + 3)
27#define AT91_PIN_PA4 (PIN_BASE + 0x00 + 4)
28
29#define AT91_PIN_PA5 (PIN_BASE + 0x00 + 5)
30#define AT91_PIN_PA6 (PIN_BASE + 0x00 + 6)
31#define AT91_PIN_PA7 (PIN_BASE + 0x00 + 7)
32#define AT91_PIN_PA8 (PIN_BASE + 0x00 + 8)
33#define AT91_PIN_PA9 (PIN_BASE + 0x00 + 9)
34
35#define AT91_PIN_PA10 (PIN_BASE + 0x00 + 10)
36#define AT91_PIN_PA11 (PIN_BASE + 0x00 + 11)
37#define AT91_PIN_PA12 (PIN_BASE + 0x00 + 12)
38#define AT91_PIN_PA13 (PIN_BASE + 0x00 + 13)
39#define AT91_PIN_PA14 (PIN_BASE + 0x00 + 14)
40
41#define AT91_PIN_PA15 (PIN_BASE + 0x00 + 15)
42#define AT91_PIN_PA16 (PIN_BASE + 0x00 + 16)
43#define AT91_PIN_PA17 (PIN_BASE + 0x00 + 17)
44#define AT91_PIN_PA18 (PIN_BASE + 0x00 + 18)
45#define AT91_PIN_PA19 (PIN_BASE + 0x00 + 19)
46
47#define AT91_PIN_PA20 (PIN_BASE + 0x00 + 20)
48#define AT91_PIN_PA21 (PIN_BASE + 0x00 + 21)
49#define AT91_PIN_PA22 (PIN_BASE + 0x00 + 22)
50#define AT91_PIN_PA23 (PIN_BASE + 0x00 + 23)
51#define AT91_PIN_PA24 (PIN_BASE + 0x00 + 24)
52
53#define AT91_PIN_PA25 (PIN_BASE + 0x00 + 25)
54#define AT91_PIN_PA26 (PIN_BASE + 0x00 + 26)
55#define AT91_PIN_PA27 (PIN_BASE + 0x00 + 27)
56#define AT91_PIN_PA28 (PIN_BASE + 0x00 + 28)
57#define AT91_PIN_PA29 (PIN_BASE + 0x00 + 29)
58
59#define AT91_PIN_PA30 (PIN_BASE + 0x00 + 30)
60#define AT91_PIN_PA31 (PIN_BASE + 0x00 + 31)
61
62#define AT91_PIN_PB0 (PIN_BASE + 0x20 + 0)
63#define AT91_PIN_PB1 (PIN_BASE + 0x20 + 1)
64#define AT91_PIN_PB2 (PIN_BASE + 0x20 + 2)
65#define AT91_PIN_PB3 (PIN_BASE + 0x20 + 3)
66#define AT91_PIN_PB4 (PIN_BASE + 0x20 + 4)
67
68#define AT91_PIN_PB5 (PIN_BASE + 0x20 + 5)
69#define AT91_PIN_PB6 (PIN_BASE + 0x20 + 6)
70#define AT91_PIN_PB7 (PIN_BASE + 0x20 + 7)
71#define AT91_PIN_PB8 (PIN_BASE + 0x20 + 8)
72#define AT91_PIN_PB9 (PIN_BASE + 0x20 + 9)
73
74#define AT91_PIN_PB10 (PIN_BASE + 0x20 + 10)
75#define AT91_PIN_PB11 (PIN_BASE + 0x20 + 11)
76#define AT91_PIN_PB12 (PIN_BASE + 0x20 + 12)
77#define AT91_PIN_PB13 (PIN_BASE + 0x20 + 13)
78#define AT91_PIN_PB14 (PIN_BASE + 0x20 + 14)
79
80#define AT91_PIN_PB15 (PIN_BASE + 0x20 + 15)
81#define AT91_PIN_PB16 (PIN_BASE + 0x20 + 16)
82#define AT91_PIN_PB17 (PIN_BASE + 0x20 + 17)
83#define AT91_PIN_PB18 (PIN_BASE + 0x20 + 18)
84#define AT91_PIN_PB19 (PIN_BASE + 0x20 + 19)
85
86#define AT91_PIN_PB20 (PIN_BASE + 0x20 + 20)
87#define AT91_PIN_PB21 (PIN_BASE + 0x20 + 21)
88#define AT91_PIN_PB22 (PIN_BASE + 0x20 + 22)
89#define AT91_PIN_PB23 (PIN_BASE + 0x20 + 23)
90#define AT91_PIN_PB24 (PIN_BASE + 0x20 + 24)
91
92#define AT91_PIN_PB25 (PIN_BASE + 0x20 + 25)
93#define AT91_PIN_PB26 (PIN_BASE + 0x20 + 26)
94#define AT91_PIN_PB27 (PIN_BASE + 0x20 + 27)
95#define AT91_PIN_PB28 (PIN_BASE + 0x20 + 28)
96#define AT91_PIN_PB29 (PIN_BASE + 0x20 + 29)
97
98#define AT91_PIN_PB30 (PIN_BASE + 0x20 + 30)
99#define AT91_PIN_PB31 (PIN_BASE + 0x20 + 31)
100
101#define AT91_PIN_PC0 (PIN_BASE + 0x40 + 0)
102#define AT91_PIN_PC1 (PIN_BASE + 0x40 + 1)
103#define AT91_PIN_PC2 (PIN_BASE + 0x40 + 2)
104#define AT91_PIN_PC3 (PIN_BASE + 0x40 + 3)
105#define AT91_PIN_PC4 (PIN_BASE + 0x40 + 4)
106
107#define AT91_PIN_PC5 (PIN_BASE + 0x40 + 5)
108#define AT91_PIN_PC6 (PIN_BASE + 0x40 + 6)
109#define AT91_PIN_PC7 (PIN_BASE + 0x40 + 7)
110#define AT91_PIN_PC8 (PIN_BASE + 0x40 + 8)
111#define AT91_PIN_PC9 (PIN_BASE + 0x40 + 9)
112
113#define AT91_PIN_PC10 (PIN_BASE + 0x40 + 10)
114#define AT91_PIN_PC11 (PIN_BASE + 0x40 + 11)
115#define AT91_PIN_PC12 (PIN_BASE + 0x40 + 12)
116#define AT91_PIN_PC13 (PIN_BASE + 0x40 + 13)
117#define AT91_PIN_PC14 (PIN_BASE + 0x40 + 14)
118
119#define AT91_PIN_PC15 (PIN_BASE + 0x40 + 15)
120#define AT91_PIN_PC16 (PIN_BASE + 0x40 + 16)
121#define AT91_PIN_PC17 (PIN_BASE + 0x40 + 17)
122#define AT91_PIN_PC18 (PIN_BASE + 0x40 + 18)
123#define AT91_PIN_PC19 (PIN_BASE + 0x40 + 19)
124
125#define AT91_PIN_PC20 (PIN_BASE + 0x40 + 20)
126#define AT91_PIN_PC21 (PIN_BASE + 0x40 + 21)
127#define AT91_PIN_PC22 (PIN_BASE + 0x40 + 22)
128#define AT91_PIN_PC23 (PIN_BASE + 0x40 + 23)
129#define AT91_PIN_PC24 (PIN_BASE + 0x40 + 24)
130
131#define AT91_PIN_PC25 (PIN_BASE + 0x40 + 25)
132#define AT91_PIN_PC26 (PIN_BASE + 0x40 + 26)
133#define AT91_PIN_PC27 (PIN_BASE + 0x40 + 27)
134#define AT91_PIN_PC28 (PIN_BASE + 0x40 + 28)
135#define AT91_PIN_PC29 (PIN_BASE + 0x40 + 29)
136
137#define AT91_PIN_PC30 (PIN_BASE + 0x40 + 30)
138#define AT91_PIN_PC31 (PIN_BASE + 0x40 + 31)
139
140#define AT91_PIN_PD0 (PIN_BASE + 0x60 + 0)
141#define AT91_PIN_PD1 (PIN_BASE + 0x60 + 1)
142#define AT91_PIN_PD2 (PIN_BASE + 0x60 + 2)
143#define AT91_PIN_PD3 (PIN_BASE + 0x60 + 3)
144#define AT91_PIN_PD4 (PIN_BASE + 0x60 + 4)
145
146#define AT91_PIN_PD5 (PIN_BASE + 0x60 + 5)
147#define AT91_PIN_PD6 (PIN_BASE + 0x60 + 6)
148#define AT91_PIN_PD7 (PIN_BASE + 0x60 + 7)
149#define AT91_PIN_PD8 (PIN_BASE + 0x60 + 8)
150#define AT91_PIN_PD9 (PIN_BASE + 0x60 + 9)
151
152#define AT91_PIN_PD10 (PIN_BASE + 0x60 + 10)
153#define AT91_PIN_PD11 (PIN_BASE + 0x60 + 11)
154#define AT91_PIN_PD12 (PIN_BASE + 0x60 + 12)
155#define AT91_PIN_PD13 (PIN_BASE + 0x60 + 13)
156#define AT91_PIN_PD14 (PIN_BASE + 0x60 + 14)
157
158#define AT91_PIN_PD15 (PIN_BASE + 0x60 + 15)
159#define AT91_PIN_PD16 (PIN_BASE + 0x60 + 16)
160#define AT91_PIN_PD17 (PIN_BASE + 0x60 + 17)
161#define AT91_PIN_PD18 (PIN_BASE + 0x60 + 18)
162#define AT91_PIN_PD19 (PIN_BASE + 0x60 + 19)
163
164#define AT91_PIN_PD20 (PIN_BASE + 0x60 + 20)
165#define AT91_PIN_PD21 (PIN_BASE + 0x60 + 21)
166#define AT91_PIN_PD22 (PIN_BASE + 0x60 + 22)
167#define AT91_PIN_PD23 (PIN_BASE + 0x60 + 23)
168#define AT91_PIN_PD24 (PIN_BASE + 0x60 + 24)
169
170#define AT91_PIN_PD25 (PIN_BASE + 0x60 + 25)
171#define AT91_PIN_PD26 (PIN_BASE + 0x60 + 26)
172#define AT91_PIN_PD27 (PIN_BASE + 0x60 + 27)
173#define AT91_PIN_PD28 (PIN_BASE + 0x60 + 28)
174#define AT91_PIN_PD29 (PIN_BASE + 0x60 + 29)
175
176#define AT91_PIN_PD30 (PIN_BASE + 0x60 + 30)
177#define AT91_PIN_PD31 (PIN_BASE + 0x60 + 31)
178
179#ifndef __ASSEMBLY__
180/* setup setup routines, called from board init or driver probe() */
181extern int at91_set_A_periph(unsigned pin, int use_pullup);
182extern int at91_set_B_periph(unsigned pin, int use_pullup);
183extern int at91_set_gpio_input(unsigned pin, int use_pullup);
184extern int at91_set_gpio_output(unsigned pin, int value);
185extern int at91_set_deglitch(unsigned pin, int is_on);
186
187/* callable at any time */
188extern int at91_set_gpio_value(unsigned pin, int value);
189extern int at91_get_gpio_value(unsigned pin);
190#endif
191
192#endif
193
diff --git a/include/asm-arm/arch-at91rm9200/hardware.h b/include/asm-arm/arch-at91rm9200/hardware.h
new file mode 100644
index 000000000000..2646c01f8e97
--- /dev/null
+++ b/include/asm-arm/arch-at91rm9200/hardware.h
@@ -0,0 +1,92 @@
1/*
2 * include/asm-arm/arch-at91rm9200/hardware.h
3 *
4 * Copyright (C) 2003 SAN People
5 * Copyright (C) 2003 ATMEL
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 */
13
14#ifndef __ASM_ARCH_HARDWARE_H
15#define __ASM_ARCH_HARDWARE_H
16
17#include <asm/sizes.h>
18
19#include <asm/arch/at91rm9200.h>
20#include <asm/arch/at91rm9200_sys.h>
21
22/*
23 * Remap the peripherals from address 0xFFFA0000 .. 0xFFFFFFFF
24 * to 0xFEFA0000 .. 0xFF000000. (384Kb)
25 */
26#define AT91_IO_PHYS_BASE 0xFFFA0000
27#define AT91_IO_SIZE (0xFFFFFFFF - AT91_IO_PHYS_BASE + 1)
28#define AT91_IO_VIRT_BASE (0xFF000000 - AT91_IO_SIZE)
29
30 /* Convert a physical IO address to virtual IO address */
31#define AT91_IO_P2V(x) ((x) - AT91_IO_PHYS_BASE + AT91_IO_VIRT_BASE)
32
33/*
34 * Virtual to Physical Address mapping for IO devices.
35 */
36#define AT91_VA_BASE_SYS AT91_IO_P2V(AT91_BASE_SYS)
37#define AT91_VA_BASE_SPI AT91_IO_P2V(AT91_BASE_SPI)
38#define AT91_VA_BASE_SSC2 AT91_IO_P2V(AT91_BASE_SSC2)
39#define AT91_VA_BASE_SSC1 AT91_IO_P2V(AT91_BASE_SSC1)
40#define AT91_VA_BASE_SSC0 AT91_IO_P2V(AT91_BASE_SSC0)
41#define AT91_VA_BASE_US3 AT91_IO_P2V(AT91_BASE_US3)
42#define AT91_VA_BASE_US2 AT91_IO_P2V(AT91_BASE_US2)
43#define AT91_VA_BASE_US1 AT91_IO_P2V(AT91_BASE_US1)
44#define AT91_VA_BASE_US0 AT91_IO_P2V(AT91_BASE_US0)
45#define AT91_VA_BASE_EMAC AT91_IO_P2V(AT91_BASE_EMAC)
46#define AT91_VA_BASE_TWI AT91_IO_P2V(AT91_BASE_TWI)
47#define AT91_VA_BASE_MCI AT91_IO_P2V(AT91_BASE_MCI)
48#define AT91_VA_BASE_UDP AT91_IO_P2V(AT91_BASE_UDP)
49#define AT91_VA_BASE_TCB1 AT91_IO_P2V(AT91_BASE_TCB1)
50#define AT91_VA_BASE_TCB0 AT91_IO_P2V(AT91_BASE_TCB0)
51
52/* Internal SRAM */
53#define AT91_BASE_SRAM 0x00200000 /* Internal SRAM base address */
54#define AT91_SRAM_SIZE 0x00004000 /* Internal SRAM SIZE (16Kb) */
55
56/* Serial ports */
57#define AT91_NR_UART 5 /* 4 USART3's and one DBGU port */
58
59/* FLASH */
60#define AT91_FLASH_BASE 0x10000000 /* NCS0: Flash physical base address */
61
62/* SDRAM */
63#define AT91_SDRAM_BASE 0x20000000 /* NCS1: SDRAM physical base address */
64
65/* SmartMedia */
66#define AT91_SMARTMEDIA_BASE 0x40000000 /* NCS3: Smartmedia physical base address */
67
68/* Multi-Master Memory controller */
69#define AT91_UHP_BASE 0x00300000 /* USB Host controller */
70
71/* Clocks */
72#define AT91_SLOW_CLOCK 32768 /* slow clock */
73
74#ifndef __ASSEMBLY__
75#include <asm/io.h>
76
77static inline unsigned int at91_sys_read(unsigned int reg_offset)
78{
79 void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
80
81 return readl(addr + reg_offset);
82}
83
84static inline void at91_sys_write(unsigned int reg_offset, unsigned long value)
85{
86 void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
87
88 writel(value, addr + reg_offset);
89}
90#endif
91
92#endif
diff --git a/include/asm-arm/arch-at91rm9200/io.h b/include/asm-arm/arch-at91rm9200/io.h
new file mode 100644
index 000000000000..23e670d85c9d
--- /dev/null
+++ b/include/asm-arm/arch-at91rm9200/io.h
@@ -0,0 +1,33 @@
1/*
2 * include/asm-arm/arch-at91rm9200/io.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_IO_H
22#define __ASM_ARCH_IO_H
23
24#include <asm/arch/at91rm9200.h>
25#include <asm/io.h>
26
27#define IO_SPACE_LIMIT 0xFFFFFFFF
28
29#define __io(a) ((void __iomem *)(a))
30#define __mem_pci(a) (a)
31
32
33#endif
diff --git a/include/asm-arm/arch-at91rm9200/irqs.h b/include/asm-arm/arch-at91rm9200/irqs.h
new file mode 100644
index 000000000000..27b0497f1b36
--- /dev/null
+++ b/include/asm-arm/arch-at91rm9200/irqs.h
@@ -0,0 +1,52 @@
1/*
2 * include/asm-arm/arch-at91rm9200/irqs.h
3 *
4 * Copyright (C) 2004 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_IRQS_H
22#define __ASM_ARCH_IRQS_H
23
24#define NR_AIC_IRQS 32
25
26
27/*
28 * Acknowledge interrupt with AIC after interrupt has been handled.
29 * (by kernel/irq.c)
30 */
31#define irq_finish(irq) do { at91_sys_write(AT91_AIC_EOICR, 0); } while (0)
32
33
34/*
35 * IRQ interrupt symbols are the AT91_ID_* symbols in at91rm9200.h
36 * for IRQs handled directly through the AIC, or else the AT91_PIN_*
37 * symbols in gpio.h for ones handled indirectly as GPIOs.
38 * We make provision for 4 banks of GPIO.
39 */
40#include <asm/arch/gpio.h>
41
42#define NR_IRQS (NR_AIC_IRQS + (4 * 32))
43
44
45#ifndef __ASSEMBLY__
46/*
47 * Initialize the IRQ controller.
48 */
49extern void at91rm9200_init_irq(unsigned int priority[]);
50#endif
51
52#endif
diff --git a/include/asm-arm/arch-epxa10db/memory.h b/include/asm-arm/arch-at91rm9200/memory.h
index 999541b6a9f5..462f1f0ad67c 100644
--- a/include/asm-arm/arch-epxa10db/memory.h
+++ b/include/asm-arm/arch-at91rm9200/memory.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/include/asm-arm/arch-epxa10/memory.h 2 * include/asm-arm/arch-at91rm9200/memory.h
3 * 3 *
4 * Copyright (C) 2001 Altera Corporation 4 * Copyright (C) 2004 SAN People
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
@@ -17,13 +17,14 @@
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20
20#ifndef __ASM_ARCH_MEMORY_H 21#ifndef __ASM_ARCH_MEMORY_H
21#define __ASM_ARCH_MEMORY_H 22#define __ASM_ARCH_MEMORY_H
22 23
23/* 24#include <asm/arch/hardware.h>
24 * Physical DRAM offset. 25
25 */ 26#define PHYS_OFFSET (AT91_SDRAM_BASE)
26#define PHYS_OFFSET UL(0x00000000) 27
27 28
28/* 29/*
29 * Virtual view <-> DMA view memory address translations 30 * Virtual view <-> DMA view memory address translations
@@ -32,7 +33,9 @@
32 * bus_to_virt: Used to convert an address for DMA operations 33 * bus_to_virt: Used to convert an address for DMA operations
33 * to an address that the kernel can use. 34 * to an address that the kernel can use.
34 */ 35 */
35#define __virt_to_bus(x) (x - PAGE_OFFSET + /*SDRAM_BASE*/0) 36#define __virt_to_bus__is_a_macro
36#define __bus_to_virt(x) (x - /*SDRAM_BASE*/0 + PAGE_OFFSET) 37#define __virt_to_bus(x) __virt_to_phys(x)
38#define __bus_to_virt__is_a_macro
39#define __bus_to_virt(x) __phys_to_virt(x)
37 40
38#endif 41#endif
diff --git a/include/asm-arm/arch-epxa10db/vmalloc.h b/include/asm-arm/arch-at91rm9200/param.h
index 546fb7d2b6ad..9480f8446852 100644
--- a/include/asm-arm/arch-epxa10db/vmalloc.h
+++ b/include/asm-arm/arch-at91rm9200/param.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/include/asm-arm/arch-epxa10db/vmalloc.h 2 * include/asm-arm/arch-at91rm9200/param.h
3 * 3 *
4 * Copyright (C) 2000 Russell King. 4 * Copyright (C) 2003 SAN People
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
@@ -17,4 +17,12 @@
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20#define VMALLOC_END (PAGE_OFFSET + 0x10000000) 20
21#ifndef __ASM_ARCH_PARAM_H
22#define __ASM_ARCH_PARAM_H
23
24/*
25 * We use default params
26 */
27
28#endif
diff --git a/include/asm-arm/arch-at91rm9200/pio.h b/include/asm-arm/arch-at91rm9200/pio.h
new file mode 100644
index 000000000000..a89501b4a703
--- /dev/null
+++ b/include/asm-arm/arch-at91rm9200/pio.h
@@ -0,0 +1,115 @@
1/*
2 * include/asm-arm/arch-at91rm9200/pio.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 */
12
13#ifndef __ASM_ARCH_PIO_H
14#define __ASM_ARCH_PIO_H
15
16#include <asm/arch/hardware.h>
17
18static inline void AT91_CfgPIO_USART0(void) {
19 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA17_TXD0 | AT91_PA18_RXD0 | AT91_PA20_CTS0);
20
21 /*
22 * Errata #39 - RTS0 is not internally connected to PA21. We need to drive
23 * the pin manually. Default is off (RTS is active low).
24 */
25 at91_sys_write(AT91_PIOA + PIO_PER, AT91_PA21_RTS0);
26 at91_sys_write(AT91_PIOA + PIO_OER, AT91_PA21_RTS0);
27 at91_sys_write(AT91_PIOA + PIO_SODR, AT91_PA21_RTS0);
28}
29
30static inline void AT91_CfgPIO_USART1(void) {
31 at91_sys_write(AT91_PIOB + PIO_PDR, AT91_PB18_RI1 | AT91_PB19_DTR1
32 | AT91_PB20_TXD1 | AT91_PB21_RXD1 | AT91_PB23_DCD1
33 | AT91_PB24_CTS1 | AT91_PB25_DSR1 | AT91_PB26_RTS1);
34}
35
36static inline void AT91_CfgPIO_USART2(void) {
37 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA22_RXD2 | AT91_PA23_TXD2);
38}
39
40static inline void AT91_CfgPIO_USART3(void) {
41 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA5_TXD3 | AT91_PA6_RXD3);
42 at91_sys_write(AT91_PIOA + PIO_BSR, AT91_PA5_TXD3 | AT91_PA6_RXD3);
43}
44
45static inline void AT91_CfgPIO_DBGU(void) {
46 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA31_DTXD | AT91_PA30_DRXD);
47}
48
49/*
50 * Enable the Two-Wire interface.
51 */
52static inline void AT91_CfgPIO_TWI(void) {
53 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA25_TWD | AT91_PA26_TWCK);
54 at91_sys_write(AT91_PIOA + PIO_ASR, AT91_PA25_TWD | AT91_PA26_TWCK);
55 at91_sys_write(AT91_PIOA + PIO_MDER, AT91_PA25_TWD | AT91_PA26_TWCK); /* open drain */
56}
57
58/*
59 * Enable the Serial Peripheral Interface.
60 */
61static inline void AT91_CfgPIO_SPI(void) {
62 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA0_MISO | AT91_PA1_MOSI | AT91_PA2_SPCK);
63}
64
65static inline void AT91_CfgPIO_SPI_CS0(void) {
66 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA3_NPCS0);
67}
68
69static inline void AT91_CfgPIO_SPI_CS1(void) {
70 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA4_NPCS1);
71}
72
73static inline void AT91_CfgPIO_SPI_CS2(void) {
74 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA5_NPCS2);
75}
76
77static inline void AT91_CfgPIO_SPI_CS3(void) {
78 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA6_NPCS3);
79}
80
81/*
82 * Select the DataFlash card.
83 */
84static inline void AT91_CfgPIO_DataFlashCard(void) {
85 at91_sys_write(AT91_PIOB + PIO_PER, AT91_PIO_P(7));
86 at91_sys_write(AT91_PIOB + PIO_OER, AT91_PIO_P(7));
87 at91_sys_write(AT91_PIOB + PIO_CODR, AT91_PIO_P(7));
88}
89
90/*
91 * Enable NAND Flash (SmartMedia) interface.
92 */
93static inline void AT91_CfgPIO_SmartMedia(void) {
94 /* enable PC0=SMCE, PC1=SMOE, PC3=SMWE, A21=CLE, A22=ALE */
95 at91_sys_write(AT91_PIOC + PIO_ASR, AT91_PC0_BFCK | AT91_PC1_BFRDY_SMOE | AT91_PC3_BFBAA_SMWE);
96 at91_sys_write(AT91_PIOC + PIO_PDR, AT91_PC0_BFCK | AT91_PC1_BFRDY_SMOE | AT91_PC3_BFBAA_SMWE);
97
98 /* Configure PC2 as input (signal READY of the SmartMedia) */
99 at91_sys_write(AT91_PIOC + PIO_PER, AT91_PC2_BFAVD); /* enable direct output enable */
100 at91_sys_write(AT91_PIOC + PIO_ODR, AT91_PC2_BFAVD); /* disable output */
101
102 /* Configure PB1 as input (signal Card Detect of the SmartMedia) */
103 at91_sys_write(AT91_PIOB + PIO_PER, AT91_PIO_P(1)); /* enable direct output enable */
104 at91_sys_write(AT91_PIOB + PIO_ODR, AT91_PIO_P(1)); /* disable output */
105}
106
107static inline int AT91_PIO_SmartMedia_RDY(void) {
108 return (at91_sys_read(AT91_PIOC + PIO_PDSR) & AT91_PIO_P(2)) ? 1 : 0;
109}
110
111static inline int AT91_PIO_SmartMedia_CardDetect(void) {
112 return (at91_sys_read(AT91_PIOB + PIO_PDSR) & AT91_PIO_P(1)) ? 1 : 0;
113}
114
115#endif
diff --git a/include/asm-arm/arch-epxa10db/system.h b/include/asm-arm/arch-at91rm9200/system.h
index 345b092a1ed5..29c42655f05c 100644
--- a/include/asm-arm/arch-epxa10db/system.h
+++ b/include/asm-arm/arch-at91rm9200/system.h
@@ -1,9 +1,7 @@
1/* 1/*
2 * linux/include/asm-arm/arch-epxa10db/system.h 2 * include/asm-arm/arch-at91rm9200/system.h
3 * 3 *
4 * Copyright (C) 1999 ARM Limited 4 * Copyright (C) 2003 SAN People
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 * Copyright (C) 2001 Altera Corporation
7 * 5 *
8 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
@@ -19,23 +17,35 @@
19 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */ 19 */
20
22#ifndef __ASM_ARCH_SYSTEM_H 21#ifndef __ASM_ARCH_SYSTEM_H
23#define __ASM_ARCH_SYSTEM_H 22#define __ASM_ARCH_SYSTEM_H
24 23
25#include <asm/arch/platform.h> 24#include <asm/arch/hardware.h>
26 25
27static inline void arch_idle(void) 26static inline void arch_idle(void)
28{ 27{
29 /* 28 /*
30 * This should do all the clock switching 29 * Disable the processor clock. The processor will be automatically
31 * and wait for interrupt tricks 30 * re-enabled by an interrupt or by a reset.
31 */
32// at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
33
34 /*
35 * Set the processor (CP15) into 'Wait for Interrupt' mode.
36 * Unlike disabling the processor clock via the PMC (above)
37 * this allows the processor to be woken via JTAG.
32 */ 38 */
33 cpu_do_idle(); 39 cpu_do_idle();
34} 40}
35 41
36extern __inline__ void arch_reset(char mode) 42static inline void arch_reset(char mode)
37{ 43{
38 /* Hmm... We can probably do something with the watchdog... */ 44 /*
45 * Perform a hardware reset with the use of the Watchdog timer.
46 */
47 at91_sys_write(AT91_ST_WDMR, AT91_ST_RSTEN | AT91_ST_EXTEN | 1);
48 at91_sys_write(AT91_ST_CR, AT91_ST_WDRST);
39} 49}
40 50
41#endif 51#endif
diff --git a/include/asm-arm/arch-epxa10db/dma.h b/include/asm-arm/arch-at91rm9200/timex.h
index de20ec8e74b1..3f112dd12587 100644
--- a/include/asm-arm/arch-epxa10db/dma.h
+++ b/include/asm-arm/arch-at91rm9200/timex.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/include/asm-arm/arch-camelot/dma.h 2 * include/asm-arm/arch-at91rm9200/timex.h
3 * 3 *
4 * Copyright (C) 1997,1998 Russell King 4 * Copyright (C) 2003 SAN People
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
@@ -17,3 +17,12 @@
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20
21#ifndef __ASM_ARCH_TIMEX_H
22#define __ASM_ARCH_TIMEX_H
23
24#include <asm/arch/hardware.h>
25
26#define CLOCK_TICK_RATE (AT91_SLOW_CLOCK)
27
28#endif
diff --git a/include/asm-arm/arch-at91rm9200/uncompress.h b/include/asm-arm/arch-at91rm9200/uncompress.h
new file mode 100644
index 000000000000..b30dd5520713
--- /dev/null
+++ b/include/asm-arm/arch-at91rm9200/uncompress.h
@@ -0,0 +1,55 @@
1/*
2 * include/asm-arm/arch-at91rm9200/uncompress.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_UNCOMPRESS_H
22#define __ASM_ARCH_UNCOMPRESS_H
23
24#include <asm/arch/hardware.h>
25
26/*
27 * The following code assumes the serial port has already been
28 * initialized by the bootloader. We search for the first enabled
29 * port in the most probable order. If you didn't setup a port in
30 * your bootloader then nothing will appear (which might be desired).
31 *
32 * This does not append a newline
33 */
34static void putstr(const char *s)
35{
36 void __iomem *sys = (void __iomem *) AT91_BASE_SYS; /* physical address */
37
38 while (*s) {
39 while (!(__raw_readl(sys + AT91_DBGU_SR) & AT91_DBGU_TXRDY)) { barrier(); }
40 __raw_writel(*s, sys + AT91_DBGU_THR);
41 if (*s == '\n') {
42 while (!(__raw_readl(sys + AT91_DBGU_SR) & AT91_DBGU_TXRDY)) { barrier(); }
43 __raw_writel('\r', sys + AT91_DBGU_THR);
44 }
45 s++;
46 }
47 /* wait for transmission to complete */
48 while (!(__raw_readl(sys + AT91_DBGU_SR) & AT91_DBGU_TXEMPTY)) { barrier(); }
49}
50
51#define arch_decomp_setup()
52
53#define arch_decomp_wdog()
54
55#endif
diff --git a/include/asm-arm/arch-epxa10db/timex.h b/include/asm-arm/arch-at91rm9200/vmalloc.h
index b87a75fc9589..34d9718feb90 100644
--- a/include/asm-arm/arch-epxa10db/timex.h
+++ b/include/asm-arm/arch-at91rm9200/vmalloc.h
@@ -1,9 +1,7 @@
1/* 1/*
2 * linux/include/asm-arm/arch-epxa10db/timex.h 2 * include/asm-arm/arch-at91rm9200/vmalloc.h
3 * 3 *
4 * Excalibur timex specifications 4 * Copyright (C) 2003 SAN People
5 *
6 * Copyright (C) 2001 Altera Corporation
7 * 5 *
8 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
@@ -20,7 +18,9 @@
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */ 19 */
22 20
23/* 21#ifndef __ASM_ARCH_VMALLOC_H
24 * ?? 22#define __ASM_ARCH_VMALLOC_H
25 */ 23
26#define CLOCK_TICK_RATE (50000000 / 16) 24#define VMALLOC_END (AT91_IO_VIRT_BASE & PGDIR_MASK)
25
26#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
index 1d11c51f498f..000000000000
--- a/include/asm-arm/arch-epxa10db/debug-macro.S
+++ /dev/null
@@ -1,41 +0,0 @@
1/* linux/include/asm-arm/arch-epxa10db/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13
14#include <asm/arch/excalibur.h>
15#define UART00_TYPE
16#include <asm/arch/uart00.h>
17
18 .macro addruart,rx
19 mrc p15, 0, \rx, c1, c0
20 tst \rx, #1 @ MMU enabled?
21 ldr \rx, =EXC_UART00_BASE @ physical base address
22 orrne \rx, \rx, #0xff000000 @ virtual base
23 orrne \rx, \rx, #0x00f00000
24 .endm
25
26 .macro senduart,rd,rx
27 str \rd, [\rx, #UART_TD(0)]
28 .endm
29
30 .macro waituart,rd,rx
311001: ldr \rd, [\rx, #UART_TSR(0)]
32 and \rd, \rd, #UART_TSR_TX_LEVEL_MSK
33 cmp \rd, #15
34 beq 1001b
35 .endm
36
37 .macro busyuart,rd,rx
381001: ldr \rd, [\rx, #UART_TSR(0)]
39 ands \rd, \rd, #UART_TSR_TX_LEVEL_MSK
40 bne 1001b
41 .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
index de6ae08334e2..000000000000
--- a/include/asm-arm/arch-epxa10db/entry-macro.S
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * include/asm-arm/arch-epxa10db/entry-macro.S
3 *
4 * Low-level IRQ helper macros for epxa10db platform
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10#include <asm/arch/platform.h>
11#undef IRQ_MODE /* same name defined in asm/proc/ptrace.h */
12#include <asm/arch/int_ctrl00.h>
13
14 .macro disable_fiq
15 .endm
16
17 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
18
19 ldr \irqstat, =INT_ID(IO_ADDRESS(EXC_INT_CTRL00_BASE))
20 ldr \irqnr,[\irqstat]
21 cmp \irqnr,#0
22 subne \irqnr,\irqnr,#1
23
24 .endm
25
diff --git a/include/asm-arm/arch-epxa10db/ether00.h b/include/asm-arm/arch-epxa10db/ether00.h
deleted file mode 100644
index b737b8aabe2f..000000000000
--- a/include/asm-arm/arch-epxa10db/ether00.h
+++ /dev/null
@@ -1,482 +0,0 @@
1#ifndef __ETHER00_H
2#define __ETHER00_H
3
4
5
6/*
7 * Register definitions for the Ethernet MAC
8 */
9
10/*
11 * Copyright (c) Altera Corporation 2000.
12 * All rights reserved.
13 */
14
15/*
16* Structures for the DMA controller
17*/
18typedef struct fda_desc
19 {
20 struct fda_desc * FDNext;
21 long FDSystem;
22 long FDStat;
23 short FDLength;
24 short FDCtl;
25 }FDA_DESC;
26
27typedef struct buf_desc
28 {
29 char * BuffData;
30 short BuffLength;
31 char BDStat;
32 char BDCtl;
33 }BUF_DESC;
34
35/*
36* Control masks for the DMA controller
37*/
38#define FDCTL_BDCOUNT_MSK (0x1F)
39#define FDCTL_BDCOUNT_OFST (0)
40#define FDCTL_FRMOPT_MSK (0x7C00)
41#define FDCTL_FRMOPT_OFST (10)
42#define FDCTL_COWNSFD_MSK (0x8000)
43#define FDCTL_COWNSFD_OFST (15)
44
45#define BDCTL_RXBDSEQN_MSK (0x7F)
46#define BDCTL_RXBDSEQN_OFST (0)
47#define BDCTL_COWNSBD_MSK (0x80)
48#define BDCTL_COWNSBD_OFST (7)
49
50#define FDNEXT_EOL_MSK (0x1)
51#define FDNEXT_EOL_OFST (0)
52#define FDNEXT_EOL_POINTER_MSK (0xFFFFFFF0)
53#define FDNEXT_EOL_POINTER_OFST (4)
54
55#define ETHER_ARC_SIZE (21)
56
57/*
58* Register definitions and masks
59*/
60#define ETHER_DMA_CTL(base) (ETHER00_TYPE (base + 0x100))
61#define ETHER_DMA_CTL_DMBURST_OFST (2)
62#define ETHER_DMA_CTL_DMBURST_MSK (0x1FC)
63#define ETHER_DMA_CTL_POWRMGMNT_OFST (11)
64#define ETHER_DMA_CTL_POWRMGMNT_MSK (0x1000)
65#define ETHER_DMA_CTL_TXBIGE_OFST (14)
66#define ETHER_DMA_CTL_TXBIGE_MSK (0x4000)
67#define ETHER_DMA_CTL_RXBIGE_OFST (15)
68#define ETHER_DMA_CTL_RXBIGE_MSK (0x8000)
69#define ETHER_DMA_CTL_TXWAKEUP_OFST (16)
70#define ETHER_DMA_CTL_TXWAKEUP_MSK (0x10000)
71#define ETHER_DMA_CTL_SWINTREQ_OFST (17)
72#define ETHER_DMA_CTL_SWINTREQ_MSK (0x20000)
73#define ETHER_DMA_CTL_INTMASK_OFST (18)
74#define ETHER_DMA_CTL_INTMASK_MSK (0x40000)
75#define ETHER_DMA_CTL_M66ENSTAT_OFST (19)
76#define ETHER_DMA_CTL_M66ENSTAT_MSK (0x80000)
77#define ETHER_DMA_CTL_RMTXINIT_OFST (20)
78#define ETHER_DMA_CTL_RMTXINIT_MSK (0x100000)
79#define ETHER_DMA_CTL_RMRXINIT_OFST (21)
80#define ETHER_DMA_CTL_RMRXINIT_MSK (0x200000)
81#define ETHER_DMA_CTL_RXALIGN_OFST (22)
82#define ETHER_DMA_CTL_RXALIGN_MSK (0xC00000)
83#define ETHER_DMA_CTL_RMSWRQ_OFST (24)
84#define ETHER_DMA_CTL_RMSWRQ_MSK (0x1000000)
85#define ETHER_DMA_CTL_RMEMBANK_OFST (25)
86#define ETHER_DMA_CTL_RMEMBANK_MSK (0x2000000)
87
88#define ETHER_TXFRMPTR(base) (ETHER00_TYPE (base + 0x104))
89
90#define ETHER_TXTHRSH(base) (ETHER00_TYPE (base + 0x308))
91
92#define ETHER_TXPOLLCTR(base) (ETHER00_TYPE (base + 0x30c))
93
94#define ETHER_BLFRMPTR(base) (ETHER00_TYPE (base + 0x110))
95#define ETHER_BLFFRMPTR_EOL_OFST (0)
96#define ETHER_BLFFRMPTR_EOL_MSK (0x1)
97#define ETHER_BLFFRMPTR_ADDRESS_OFST (4)
98#define ETHER_BLFFRMPTR_ADDRESS_MSK (0xFFFFFFF0)
99
100#define ETHER_RXFRAGSIZE(base) (ETHER00_TYPE (base + 0x114))
101#define ETHER_RXFRAGSIZE_MINFRAG_OFST (2)
102#define ETHER_RXFRAGSIZE_MINFRAG_MSK (0xFFC)
103#define ETHER_RXFRAGSIZE_ENPACK_OFST (15)
104#define ETHER_RXFRAGSIZE_ENPACK_MSK (0x8000)
105
106#define ETHER_INT_EN(base) (ETHER00_TYPE (base + 0x118))
107#define ETHER_INT_EN_FDAEXEN_OFST (0)
108#define ETHER_INT_EN_FDAEXEN_MSK (0x1)
109#define ETHER_INT_EN_BLEXEN_OFST (1)
110#define ETHER_INT_EN_BLEXN_MSK (0x2)
111#define ETHER_INT_EN_STARGABTEN_OFST (2)
112#define ETHER_INT_EN_STARGABTEN_MSK (0x4)
113#define ETHER_INT_EN_RTARGABTEN_OFST (3)
114#define ETHER_INT_EN_RTARGABTEN_MSK (0x8)
115#define ETHER_INT_EN_RMASABTEN_OFST (4)
116#define ETHER_INT_EN_RMASABTEN_MSK (0x10)
117#define ETHER_INT_EN_SSYSERREN_OFST (5)
118#define ETHER_INT_EN_SSYSERREN_MSK (0x20)
119#define ETHER_INT_EN_DPARERREN_OFST (6)
120#define ETHER_INT_EN_DPARERREN_MSK (0x40)
121#define ETHER_INT_EN_EARNOTEN_OFST (7)
122#define ETHER_INT_EN_EARNOTEN_MSK (0x80)
123#define ETHER_INT_EN_DPARDEN_OFST (8)
124#define ETHER_INT_EN_DPARDEN_MSK (0x100)
125#define ETHER_INT_EN_DMPARERREN_OFST (9)
126#define ETHER_INT_EN_DMPARERREN_MSK (0x200)
127#define ETHER_INT_EN_TXCTLCMPEN_OFST (10)
128#define ETHER_INT_EN_TXCTLCMPEN_MSK (0x400)
129#define ETHER_INT_EN_NRABTEN_OFST (11)
130#define ETHER_INT_EN_NRABTEN_MSK (0x800)
131
132#define ETHER_FDA_BAS(base) (ETHER00_TYPE (base + 0x11C))
133#define ETHER_FDA_BAS_ADDRESS_OFST (4)
134#define ETHER_FDA_BAS_ADDRESS_MSK (0xFFFFFFF0)
135
136#define ETHER_FDA_LIM(base) (ETHER00_TYPE (base + 0x120))
137#define ETHER_FDA_LIM_COUNT_OFST (4)
138#define ETHER_FDA_LIM_COUNT_MSK (0xFFF0)
139
140#define ETHER_INT_SRC(base) (ETHER00_TYPE (base + 0x124))
141#define ETHER_INT_SRC_INTMACTX_OFST (0)
142#define ETHER_INT_SRC_INTMACTX_MSK (0x1)
143#define ETHER_INT_SRC_INTMACRX_OFST (1)
144#define ETHER_INT_SRC_INTMACRX_MSK (0x2)
145#define ETHER_INT_SRC_INTSBUS_OFST (2)
146#define ETHER_INT_SRC_INTSBUS_MSK (0x4)
147#define ETHER_INT_SRC_INTFDAEX_OFST (3)
148#define ETHER_INT_SRC_INTFDAEX_MSK (0x8)
149#define ETHER_INT_SRC_INTBLEX_OFST (4)
150#define ETHER_INT_SRC_INTBLEX_MSK (0x10)
151#define ETHER_INT_SRC_SWINT_OFST (5)
152#define ETHER_INT_SRC_SWINT_MSK (0x20)
153#define ETHER_INT_SRC_INTEARNOT_OFST (6)
154#define ETHER_INT_SRC_INTEARNOT_MSK (0x40)
155#define ETHER_INT_SRC_DMPARERR_OFST (7)
156#define ETHER_INT_SRC_DMPARERR_MSK (0x80)
157#define ETHER_INT_SRC_INTEXBD_OFST (8)
158#define ETHER_INT_SRC_INTEXBD_MSK (0x100)
159#define ETHER_INT_SRC_INTTXCTLCMP_OFST (9)
160#define ETHER_INT_SRC_INTTXCTLCMP_MSK (0x200)
161#define ETHER_INT_SRC_INTNRABT_OFST (10)
162#define ETHER_INT_SRC_INTNRABT_MSK (0x400)
163#define ETHER_INT_SRC_FDAEX_OFST (11)
164#define ETHER_INT_SRC_FDAEX_MSK (0x800)
165#define ETHER_INT_SRC_BLEX_OFST (12)
166#define ETHER_INT_SRC_BLEX_MSK (0x1000)
167#define ETHER_INT_SRC_DMPARERRSTAT_OFST (13)
168#define ETHER_INT_SRC_DMPARERRSTAT_MSK (0x2000)
169#define ETHER_INT_SRC_NRABT_OFST (14)
170#define ETHER_INT_SRC_NRABT_MSK (0x4000)
171#define ETHER_INT_SRC_INTLINK_OFST (15)
172#define ETHER_INT_SRC_INTLINK_MSK (0x8000)
173#define ETHER_INT_SRC_INTEXDEFER_OFST (16)
174#define ETHER_INT_SRC_INTEXDEFER_MSK (0x10000)
175#define ETHER_INT_SRC_INTRMON_OFST (17)
176#define ETHER_INT_SRC_INTRMON_MSK (0x20000)
177#define ETHER_INT_SRC_IRQ_MSK (0x83FF)
178
179#define ETHER_PAUSECNT(base) (ETHER00_TYPE (base + 0x40))
180#define ETHER_PAUSECNT_COUNT_OFST (0)
181#define ETHER_PAUSECNT_COUNT_MSK (0xFFFF)
182
183#define ETHER_REMPAUCNT(base) (ETHER00_TYPE (base + 0x44))
184#define ETHER_REMPAUCNT_COUNT_OFST (0)
185#define ETHER_REMPAUCNT_COUNT_MSK (0xFFFF)
186
187#define ETHER_TXCONFRMSTAT(base) (ETHER00_TYPE (base + 0x348))
188#define ETHER_TXCONFRMSTAT_TS_STAT_VALUE_OFST (0)
189#define ETHER_TXCONFRMSTAT_TS_STAT_VALUE_MSK (0x3FFFFF)
190
191#define ETHER_MAC_CTL(base) (ETHER00_TYPE (base + 0))
192#define ETHER_MAC_CTL_HALTREQ_OFST (0)
193#define ETHER_MAC_CTL_HALTREQ_MSK (0x1)
194#define ETHER_MAC_CTL_HALTIMM_OFST (1)
195#define ETHER_MAC_CTL_HALTIMM_MSK (0x2)
196#define ETHER_MAC_CTL_RESET_OFST (2)
197#define ETHER_MAC_CTL_RESET_MSK (0x4)
198#define ETHER_MAC_CTL_FULLDUP_OFST (3)
199#define ETHER_MAC_CTL_FULLDUP_MSK (0x8)
200#define ETHER_MAC_CTL_MACLOOP_OFST (4)
201#define ETHER_MAC_CTL_MACLOOP_MSK (0x10)
202#define ETHER_MAC_CTL_CONN_OFST (5)
203#define ETHER_MAC_CTL_CONN_MSK (0x60)
204#define ETHER_MAC_CTL_LOOP10_OFST (7)
205#define ETHER_MAC_CTL_LOOP10_MSK (0x80)
206#define ETHER_MAC_CTL_LNKCHG_OFST (8)
207#define ETHER_MAC_CTL_LNKCHG_MSK (0x100)
208#define ETHER_MAC_CTL_MISSROLL_OFST (10)
209#define ETHER_MAC_CTL_MISSROLL_MSK (0x400)
210#define ETHER_MAC_CTL_ENMISSROLL_OFST (13)
211#define ETHER_MAC_CTL_ENMISSROLL_MSK (0x2000)
212#define ETHER_MAC_CTL_LINK10_OFST (15)
213#define ETHER_MAC_CTL_LINK10_MSK (0x8000)
214
215#define ETHER_ARC_CTL(base) (ETHER00_TYPE (base + 0x4))
216#define ETHER_ARC_CTL_STATIONACC_OFST (0)
217#define ETHER_ARC_CTL_STATIONACC_MSK (0x1)
218#define ETHER_ARC_CTL_GROUPACC_OFST (1)
219#define ETHER_ARC_CTL_GROUPACC_MSK (0x2)
220#define ETHER_ARC_CTL_BROADACC_OFST (2)
221#define ETHER_ARC_CTL_BROADACC_MSK (0x4)
222#define ETHER_ARC_CTL_NEGARC_OFST (3)
223#define ETHER_ARC_CTL_NEGARC_MSK (0x8)
224#define ETHER_ARC_CTL_COMPEN_OFST (4)
225#define ETHER_ARC_CTL_COMPEN_MSK (0x10)
226
227#define ETHER_TX_CTL(base) (ETHER00_TYPE (base + 0x8))
228#define ETHER_TX_CTL_TXEN_OFST (0)
229#define ETHER_TX_CTL_TXEN_MSK (0x1)
230#define ETHER_TX_CTL_TXHALT_OFST (1)
231#define ETHER_TX_CTL_TXHALT_MSK (0x2)
232#define ETHER_TX_CTL_NOPAD_OFST (2)
233#define ETHER_TX_CTL_NOPAD_MSK (0x4)
234#define ETHER_TX_CTL_NOCRC_OFST (3)
235#define ETHER_TX_CTL_NOCRC_MSK (0x8)
236#define ETHER_TX_CTL_FBACK_OFST (4)
237#define ETHER_TX_CTL_FBACK_MSK (0x10)
238#define ETHER_TX_CTL_NOEXDEF_OFST (5)
239#define ETHER_TX_CTL_NOEXDEF_MSK (0x20)
240#define ETHER_TX_CTL_SDPAUSE_OFST (6)
241#define ETHER_TX_CTL_SDPAUSE_MSK (0x40)
242#define ETHER_TX_CTL_MII10_OFST (7)
243#define ETHER_TX_CTL_MII10_MSK (0x80)
244#define ETHER_TX_CTL_ENUNDER_OFST (8)
245#define ETHER_TX_CTL_ENUNDER_MSK (0x100)
246#define ETHER_TX_CTL_ENEXDEFER_OFST (9)
247#define ETHER_TX_CTL_ENEXDEFER_MSK (0x200)
248#define ETHER_TX_CTL_ENLCARR_OFST (10)
249#define ETHER_TX_CTL_ENLCARR_MSK (0x400)
250#define ETHER_TX_CTL_ENEXCOLL_OFST (11)
251#define ETHER_TX_CTL_ENEXCOLL_MSK (0x800)
252#define ETHER_TX_CTL_ENLATECOLL_OFST (12)
253#define ETHER_TX_CTL_ENLATECOLL_MSK (0x1000)
254#define ETHER_TX_CTL_ENTXPAR_OFST (13)
255#define ETHER_TX_CTL_ENTXPAR_MSK (0x2000)
256#define ETHER_TX_CTL_ENCOMP_OFST (14)
257#define ETHER_TX_CTL_ENCOMP_MSK (0x4000)
258
259#define ETHER_TX_STAT(base) (ETHER00_TYPE (base + 0xc))
260#define ETHER_TX_STAT_TXCOLL_OFST (0)
261#define ETHER_TX_STAT_TXCOLL_MSK (0xF)
262#define ETHER_TX_STAT_EXCOLL_OFST (4)
263#define ETHER_TX_STAT_EXCOLL_MSK (0x10)
264#define ETHER_TX_STAT_TXDEFER_OFST (5)
265#define ETHER_TX_STAT_TXDEFER_MSK (0x20)
266#define ETHER_TX_STAT_PAUSED_OFST (6)
267#define ETHER_TX_STAT_PAUSED_MSK (0x40)
268#define ETHER_TX_STAT_INTTX_OFST (7)
269#define ETHER_TX_STAT_INTTX_MSK (0x80)
270#define ETHER_TX_STAT_UNDER_OFST (8)
271#define ETHER_TX_STAT_UNDER_MSK (0x100)
272#define ETHER_TX_STAT_EXDEFER_OFST (9)
273#define ETHER_TX_STAT_EXDEFER_MSK (0x200)
274#define ETHER_TX_STAT_LCARR_OFST (10)
275#define ETHER_TX_STAT_LCARR_MSK (0x400)
276#define ETHER_TX_STAT_TX10STAT_OFST (11)
277#define ETHER_TX_STAT_TX10STAT_MSK (0x800)
278#define ETHER_TX_STAT_LATECOLL_OFST (12)
279#define ETHER_TX_STAT_LATECOLL_MSK (0x1000)
280#define ETHER_TX_STAT_TXPAR_OFST (13)
281#define ETHER_TX_STAT_TXPAR_MSK (0x2000)
282#define ETHER_TX_STAT_COMP_OFST (14)
283#define ETHER_TX_STAT_COMP_MSK (0x4000)
284#define ETHER_TX_STAT_TXHALTED_OFST (15)
285#define ETHER_TX_STAT_TXHALTED_MSK (0x8000)
286#define ETHER_TX_STAT_SQERR_OFST (16)
287#define ETHER_TX_STAT_SQERR_MSK (0x10000)
288#define ETHER_TX_STAT_TXMCAST_OFST (17)
289#define ETHER_TX_STAT_TXMCAST_MSK (0x20000)
290#define ETHER_TX_STAT_TXBCAST_OFST (18)
291#define ETHER_TX_STAT_TXBCAST_MSK (0x40000)
292#define ETHER_TX_STAT_VLAN_OFST (19)
293#define ETHER_TX_STAT_VLAN_MSK (0x80000)
294#define ETHER_TX_STAT_MACC_OFST (20)
295#define ETHER_TX_STAT_MACC_MSK (0x100000)
296#define ETHER_TX_STAT_TXPAUSE_OFST (21)
297#define ETHER_TX_STAT_TXPAUSE_MSK (0x200000)
298
299#define ETHER_RX_CTL(base) (ETHER00_TYPE (base + 0x10))
300#define ETHER_RX_CTL_RXEN_OFST (0)
301#define ETHER_RX_CTL_RXEN_MSK (0x1)
302#define ETHER_RX_CTL_RXHALT_OFST (1)
303#define ETHER_RX_CTL_RXHALT_MSK (0x2)
304#define ETHER_RX_CTL_LONGEN_OFST (2)
305#define ETHER_RX_CTL_LONGEN_MSK (0x4)
306#define ETHER_RX_CTL_SHORTEN_OFST (3)
307#define ETHER_RX_CTL_SHORTEN_MSK (0x8)
308#define ETHER_RX_CTL_STRIPCRC_OFST (4)
309#define ETHER_RX_CTL_STRIPCRC_MSK (0x10)
310#define ETHER_RX_CTL_PASSCTL_OFST (5)
311#define ETHER_RX_CTL_PASSCTL_MSK (0x20)
312#define ETHER_RX_CTL_IGNORECRC_OFST (6)
313#define ETHER_RX_CTL_IGNORECRC_MSK (0x40)
314#define ETHER_RX_CTL_ENALIGN_OFST (8)
315#define ETHER_RX_CTL_ENALIGN_MSK (0x100)
316#define ETHER_RX_CTL_ENCRCERR_OFST (9)
317#define ETHER_RX_CTL_ENCRCERR_MSK (0x200)
318#define ETHER_RX_CTL_ENOVER_OFST (10)
319#define ETHER_RX_CTL_ENOVER_MSK (0x400)
320#define ETHER_RX_CTL_ENLONGERR_OFST (11)
321#define ETHER_RX_CTL_ENLONGERR_MSK (0x800)
322#define ETHER_RX_CTL_ENRXPAR_OFST (13)
323#define ETHER_RX_CTL_ENRXPAR_MSK (0x2000)
324#define ETHER_RX_CTL_ENGOOD_OFST (14)
325#define ETHER_RX_CTL_ENGOOD_MSK (0x4000)
326
327#define ETHER_RX_STAT(base) (ETHER00_TYPE (base + 0x14))
328#define ETHER_RX_STAT_LENERR_OFST (4)
329#define ETHER_RX_STAT_LENERR_MSK (0x10)
330#define ETHER_RX_STAT_CTLRECD_OFST (5)
331#define ETHER_RX_STAT_CTLRECD_MSK (0x20)
332#define ETHER_RX_STAT_INTRX_OFST (6)
333#define ETHER_RX_STAT_INTRX_MSK (0x40)
334#define ETHER_RX_STAT_RX10STAT_OFST (7)
335#define ETHER_RX_STAT_RX10STAT_MSK (0x80)
336#define ETHER_RX_STAT_ALIGNERR_OFST (8)
337#define ETHER_RX_STAT_ALIGNERR_MSK (0x100)
338#define ETHER_RX_STAT_CRCERR_OFST (9)
339#define ETHER_RX_STAT_CRCERR_MSK (0x200)
340#define ETHER_RX_STAT_OVERFLOW_OFST (10)
341#define ETHER_RX_STAT_OVERFLOW_MSK (0x400)
342#define ETHER_RX_STAT_LONGERR_OFST (11)
343#define ETHER_RX_STAT_LONGERR_MSK (0x800)
344#define ETHER_RX_STAT_RXPAR_OFST (13)
345#define ETHER_RX_STAT_RXPAR_MSK (0x2000)
346#define ETHER_RX_STAT_GOOD_OFST (14)
347#define ETHER_RX_STAT_GOOD_MSK (0x4000)
348#define ETHER_RX_STAT_RXHALTED_OFST (15)
349#define ETHER_RX_STAT_RXHALTED_MSK (0x8000)
350#define ETHER_RX_STAT_RXMCAST_OFST (17)
351#define ETHER_RX_STAT_RXMCAST_MSK (0x10000)
352#define ETHER_RX_STAT_RXBCAST_OFST (18)
353#define ETHER_RX_STAT_RXBCAST_MSK (0x20000)
354#define ETHER_RX_STAT_RXVLAN_OFST (19)
355#define ETHER_RX_STAT_RXVLAN_MSK (0x40000)
356#define ETHER_RX_STAT_RXPAUSE_OFST (20)
357#define ETHER_RX_STAT_RXPAUSE_MSK (0x80000)
358#define ETHER_RX_STAT_ARCSTATUS_OFST (21)
359#define ETHER_RX_STAT_ARCSTATUS_MSK (0xF00000)
360#define ETHER_RX_STAT_ARCENT_OFST (25)
361#define ETHER_RX_STAT_ARCENT_MSK (0x1F000000)
362
363#define ETHER_MD_DATA(base) (ETHER00_TYPE (base + 0x18))
364
365#define ETHER_MD_CA(base) (ETHER00_TYPE (base + 0x1c))
366#define ETHER_MD_CA_ADDR_OFST (0)
367#define ETHER_MD_CA_ADDR_MSK (0x1F)
368#define ETHER_MD_CA_PHY_OFST (5)
369#define ETHER_MD_CA_PHY_MSK (0x3E0)
370#define ETHER_MD_CA_WR_OFST (10)
371#define ETHER_MD_CA_WR_MSK (0x400)
372#define ETHER_MD_CA_BUSY_OFST (11)
373#define ETHER_MD_CA_BUSY_MSK (0x800)
374#define ETHER_MD_CA_PRESUPP_OFST (12)
375#define ETHER_MD_CA_PRESUPP_MSK (0x1000)
376
377#define ETHER_ARC_ADR(base) (ETHER00_TYPE (base + 0x160))
378#define ETHER_ARC_ADR_ARC_LOC_OFST (2)
379#define ETHER_ARC_ADR_ARC_LOC_MSK (0xFFC)
380
381#define ETHER_ARC_DATA(base) (ETHER00_TYPE (base + 0x364))
382
383#define ETHER_ARC_ENA(base) (ETHER00_TYPE (base + 0x28))
384#define ETHER_ARC_ENA_MSK (0x1FFFFF)
385
386#define ETHER_PROM_CTL(base) (ETHER00_TYPE (base + 0x2c))
387#define ETHER_PROM_CTL_PROM_ADDR_OFST (0)
388#define ETHER_PROM_CTL_PROM_ADDR_MSK (0x3F)
389#define ETHER_PROM_CTL_OPCODE_OFST (13)
390#define ETHER_PROM_CTL_OPCODE_MSK (0x6000)
391#define ETHER_PROM_CTL_OPCODE_READ_MSK (0x4000)
392#define ETHER_PROM_CTL_OPCODE_WRITE_MSK (0x2000)
393#define ETHER_PROM_CTL_OPCODE_ERASE_MSK (0x6000)
394#define ETHER_PROM_CTL_ENABLE_MSK (0x0030)
395#define ETHER_PROM_CTL_DISABLE_MSK (0x0000)
396#define ETHER_PROM_CTL_BUSY_OFST (15)
397#define ETHER_PROM_CTL_BUSY_MSK (0x8000)
398
399#define ETHER_PROM_DATA(base) (ETHER00_TYPE (base + 0x30))
400
401#define ETHER_MISS_CNT(base) (ETHER00_TYPE (base + 0x3c))
402#define ETHER_MISS_CNT_COUNT_OFST (0)
403#define ETHER_MISS_CNT_COUNT_MSK (0xFFFF)
404
405#define ETHER_CNTDATA(base) (ETHER00_TYPE (base + 0x80))
406
407#define ETHER_CNTACC(base) (ETHER00_TYPE (base + 0x84))
408#define ETHER_CNTACC_ADDR_OFST (0)
409#define ETHER_CNTACC_ADDR_MSK (0xFF)
410#define ETHER_CNTACC_WRRDN_OFST (8)
411#define ETHER_CNTACC_WRRDN_MSK (0x100)
412#define ETHER_CNTACC_CLEAR_OFST (9)
413#define ETHER_CNTACC_CLEAR_MSK (0x200)
414
415#define ETHER_TXRMINTEN(base) (ETHER00_TYPE (base + 0x88))
416#define ETHER_TXRMINTEN_MSK (0x3FFFFFFF)
417
418#define ETHER_RXRMINTEN(base) (ETHER00_TYPE (base + 0x8C))
419#define ETHER_RXRMINTEN_MSK (0xFFFFFF)
420
421/*
422* RMON Registers
423*/
424#define RMON_COLLISION0 0x0
425#define RMON_COLLISION1 0x1
426#define RMON_COLLISION2 0x2
427#define RMON_COLLISION3 0x3
428#define RMON_COLLISION4 0x4
429#define RMON_COLLISION5 0x5
430#define RMON_COLLISION6 0x6
431#define RMON_COLLISION7 0x7
432#define RMON_COLLISION8 0x8
433#define RMON_COLLISION9 0x9
434#define RMON_COLLISION10 0xa
435#define RMON_COLLISION11 0xb
436#define RMON_COLLISION12 0xc
437#define RMON_COLLISION13 0xd
438#define RMON_COLLISION14 0xe
439#define RMON_COLLISION15 0xf
440#define RMON_COLLISION16 0x10
441#define RMON_FRAMES_WITH_DEFERRED_XMISSIONS 0x11
442#define RMON_LATE_COLLISIONS 0x12
443#define RMON_FRAMES_LOST_DUE_TO_MAC_XMIT 0x13
444#define RMON_CARRIER_SENSE_ERRORS 0x14
445#define RMON_FRAMES_WITH_EXCESSIVE_DEFERAL 0x15
446#define RMON_UNICAST_FRAMES_TRANSMITTED_OK 0x16
447#define RMON_MULTICAST_FRAMES_XMITTED_OK 0x17
448#define RMON_BROADCAST_FRAMES_XMITTED_OK 0x18
449#define RMON_SQE_TEST_ERRORS 0x19
450#define RMON_PAUSE_MACCTRL_FRAMES_XMITTED 0x1A
451#define RMON_MACCTRL_FRAMES_XMITTED 0x1B
452#define RMON_VLAN_FRAMES_XMITTED 0x1C
453#define RMON_OCTETS_XMITTED_OK 0x1D
454#define RMON_OCTETS_XMITTED_OK_HI 0x1E
455
456#define RMON_RX_PACKET_SIZES0 0x40
457#define RMON_RX_PACKET_SIZES1 0x41
458#define RMON_RX_PACKET_SIZES2 0x42
459#define RMON_RX_PACKET_SIZES3 0x43
460#define RMON_RX_PACKET_SIZES4 0x44
461#define RMON_RX_PACKET_SIZES5 0x45
462#define RMON_RX_PACKET_SIZES6 0x46
463#define RMON_RX_PACKET_SIZES7 0x47
464#define RMON_FRAME_CHECK_SEQUENCE_ERRORS 0x48
465#define RMON_ALIGNMENT_ERRORS 0x49
466#define RMON_FRAGMENTS 0x4A
467#define RMON_JABBERS 0x4B
468#define RMON_FRAMES_LOST_TO_INTMACRCVERR 0x4C
469#define RMON_UNICAST_FRAMES_RCVD_OK 0x4D
470#define RMON_MULTICAST_FRAMES_RCVD_OK 0x4E
471#define RMON_BROADCAST_FRAMES_RCVD_OK 0x4F
472#define RMON_IN_RANGE_LENGTH_ERRORS 0x50
473#define RMON_OUT_OF_RANGE_LENGTH_ERRORS 0x51
474#define RMON_VLAN_FRAMES_RCVD 0x52
475#define RMON_PAUSE_MAC_CTRL_FRAMES_RCVD 0x53
476#define RMON_MAC_CTRL_FRAMES_RCVD 0x54
477#define RMON_OCTETS_RCVD_OK 0x55
478#define RMON_OCTETS_RCVD_OK_HI 0x56
479#define RMON_OCTETS_RCVD_OTHER 0x57
480#define RMON_OCTETS_RCVD_OTHER_HI 0x58
481
482#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
index 5c91dd6d7822..000000000000
--- a/include/asm-arm/arch-epxa10db/excalibur.h
+++ /dev/null
@@ -1,91 +0,0 @@
1/* megafunction wizard: %ARM-Based Excalibur%
2 GENERATION: STANDARD
3 VERSION: WM1.0
4 MODULE: ARM-Based Excalibur
5 PROJECT: excalibur
6 ============================================================
7 File Name: v:\embedded\linux\bootldr\excalibur.h
8 Megafunction Name(s): ARM-Based Excalibur
9 ============================================================
10
11 ************************************************************
12 THIS IS A WIZARD-GENERATED FILE. DO NOT EDIT THIS FILE!
13 ************************************************************/
14
15#ifndef EXCALIBUR_H_INCLUDED
16#define EXCALIBUR_H_INCLUDED
17
18#define EXC_DEFINE_PROCESSOR_LITTLE_ENDIAN
19#define EXC_DEFINE_BOOT_FROM_FLASH
20
21#define EXC_INPUT_CLK_FREQUENCY (50000000)
22#define EXC_AHB1_CLK_FREQUENCY (150000000)
23#define EXC_AHB2_CLK_FREQUENCY (75000000)
24#define EXC_SDRAM_CLK_FREQUENCY (75000000)
25
26/* Registers Block */
27#define EXC_REGISTERS_BASE (0x7fffc000)
28#define EXC_MODE_CTRL00_BASE (EXC_REGISTERS_BASE + 0x000)
29#define EXC_IO_CTRL00_BASE (EXC_REGISTERS_BASE + 0x040)
30#define EXC_MMAP00_BASE (EXC_REGISTERS_BASE + 0x080)
31#define EXC_PLD_CONFIG00_BASE (EXC_REGISTERS_BASE + 0x140)
32#define EXC_TIMER00_BASE (EXC_REGISTERS_BASE + 0x200)
33#define EXC_INT_CTRL00_BASE (EXC_REGISTERS_BASE + 0xc00)
34#define EXC_CLOCK_CTRL00_BASE (EXC_REGISTERS_BASE + 0x300)
35#define EXC_WATCHDOG00_BASE (EXC_REGISTERS_BASE + 0xa00)
36#define EXC_UART00_BASE (EXC_REGISTERS_BASE + 0x280)
37#define EXC_EBI00_BASE (EXC_REGISTERS_BASE + 0x380)
38#define EXC_SDRAM00_BASE (EXC_REGISTERS_BASE + 0x400)
39#define EXC_AHB12_BRIDGE_CTRL00_BASE (EXC_REGISTERS_BASE + 0x800)
40#define EXC_PLD_STRIPE_BRIDGE_CTRL00_BASE (EXC_REGISTERS_BASE + 0x100)
41#define EXC_STRIPE_PLD_BRIDGE_CTRL00_BASE (EXC_REGISTERS_BASE + 0x100)
42
43#define EXC_REGISTERS_SIZE (0x00004000)
44
45/* EBI Block(s) */
46#define EXC_EBI_BLOCK0_BASE (0x40000000)
47#define EXC_EBI_BLOCK0_SIZE (0x00400000)
48#define EXC_EBI_BLOCK0_WIDTH (8)
49#define EXC_EBI_BLOCK0_NON_CACHEABLE
50#define EXC_EBI_BLOCK1_BASE (0x40400000)
51#define EXC_EBI_BLOCK1_SIZE (0x00400000)
52#define EXC_EBI_BLOCK1_WIDTH (16)
53#define EXC_EBI_BLOCK1_NON_CACHEABLE
54#define EXC_EBI_BLOCK2_BASE (0x40800000)
55#define EXC_EBI_BLOCK2_SIZE (0x00400000)
56#define EXC_EBI_BLOCK2_WIDTH (16)
57#define EXC_EBI_BLOCK2_NON_CACHEABLE
58#define EXC_EBI_BLOCK3_BASE (0x40c00000)
59#define EXC_EBI_BLOCK3_SIZE (0x00400000)
60#define EXC_EBI_BLOCK3_WIDTH (16)
61#define EXC_EBI_BLOCK3_NON_CACHEABLE
62
63/* SDRAM Block(s) */
64#define EXC_SDRAM_BLOCK0_BASE (0x00000000)
65#define EXC_SDRAM_BLOCK0_SIZE (0x04000000)
66#define EXC_SDRAM_BLOCK0_WIDTH (32)
67#define EXC_SDRAM_BLOCK1_BASE (0x04000000)
68#define EXC_SDRAM_BLOCK1_SIZE (0x04000000)
69#define EXC_SDRAM_BLOCK1_WIDTH (32)
70
71/* Single Port SRAM Block(s) */
72#define EXC_SPSRAM_BLOCK0_BASE (0x08000000)
73#define EXC_SPSRAM_BLOCK0_SIZE (0x00020000)
74#define EXC_SPSRAM_BLOCK1_BASE (0x08020000)
75#define EXC_SPSRAM_BLOCK1_SIZE (0x00020000)
76
77/* PLD Block(s) */
78#define EXC_PLD_BLOCK0_BASE (0x80000000)
79#define EXC_PLD_BLOCK0_SIZE (0x00004000)
80#define EXC_PLD_BLOCK0_NON_CACHEABLE
81#define EXC_PLD_BLOCK1_BASE (0xf000000)
82#define EXC_PLD_BLOCK1_SIZE (0x00004000)
83#define EXC_PLD_BLOCK1_NON_CACHEABLE
84#define EXC_PLD_BLOCK2_BASE (0x80008000)
85#define EXC_PLD_BLOCK2_SIZE (0x00004000)
86#define EXC_PLD_BLOCK2_NON_CACHEABLE
87#define EXC_PLD_BLOCK3_BASE (0x8000c000)
88#define EXC_PLD_BLOCK3_SIZE (0x00004000)
89#define EXC_PLD_BLOCK3_NON_CACHEABLE
90
91#endif
diff --git a/include/asm-arm/arch-epxa10db/hardware.h b/include/asm-arm/arch-epxa10db/hardware.h
deleted file mode 100644
index b992c2924a77..000000000000
--- a/include/asm-arm/arch-epxa10db/hardware.h
+++ /dev/null
@@ -1,64 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-epxa10/hardware.h
3 *
4 * This file contains the hardware definitions of the Integrator.
5 *
6 * Copyright (C) 1999 ARM Limited.
7 * Copyright (C) 2001 Altera Corporation
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23#ifndef __ASM_ARCH_HARDWARE_H
24#define __ASM_ARCH_HARDWARE_H
25
26#include <asm/arch/platform.h>
27
28/*
29 * Where in virtual memory the IO devices (timers, system controllers
30 * and so on)
31 */
32#define IO_BASE 0xf0000000 // VA of IO
33#define IO_SIZE 0x10000000 // How much?
34#define IO_START EXC_REGISTERS_BASE // PA of IO
35/* macro to get at IO space when running virtually */
36#define IO_ADDRESS(x) ((x) | 0xf0000000)
37
38#define FLASH_VBASE 0xFE000000
39#define FLASH_SIZE 0x01000000
40#define FLASH_START EXC_EBI_BLOCK0_BASE
41#define FLASH_VADDR(x) ((x)|0xFE000000)
42/*
43 * Similar to above, but for PCI addresses (memory, IO, Config and the
44 * V3 chip itself). WARNING: this has to mirror definitions in platform.h
45 */
46#if 0
47#define PCI_MEMORY_VADDR 0xe8000000
48#define PCI_CONFIG_VADDR 0xec000000
49#define PCI_V3_VADDR 0xed000000
50#define PCI_IO_VADDR 0xee000000
51
52#define PCIO_BASE PCI_IO_VADDR
53#define PCIMEM_BASE PCI_MEMORY_VADDR
54
55
56#define pcibios_assign_all_busses() 1
57
58#define PCIBIOS_MIN_IO 0x6000
59#define PCIBIOS_MIN_MEM 0x00100000
60#endif
61
62
63#endif
64
diff --git a/include/asm-arm/arch-epxa10db/int_ctrl00.h b/include/asm-arm/arch-epxa10db/int_ctrl00.h
deleted file mode 100644
index 23ec864c40bb..000000000000
--- a/include/asm-arm/arch-epxa10db/int_ctrl00.h
+++ /dev/null
@@ -1,288 +0,0 @@
1/*
2 *
3 * This file contains the register definitions for the Excalibur
4 * Timer TIMER00.
5 *
6 * Copyright (C) 2001 Altera Corporation
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#ifndef __INT_CTRL00_H
24#define __INT_CTRL00_H
25
26#define INT_MS(base_addr) (INT_CTRL00_TYPE (base_addr + 0x00 ))
27#define INT_MS_FC_MSK (0x10000)
28#define INT_MS_FC_OFST (16)
29#define INT_MS_M1_MSK (0x8000)
30#define INT_MS_M1_OFST (15)
31#define INT_MS_M0_MSK (0x4000)
32#define INT_MS_M0_OFST (14)
33#define INT_MS_AE_MSK (0x2000)
34#define INT_MS_AE_OFST (13)
35#define INT_MS_PE_MSK (0x1000)
36#define INT_MS_PE_OFST (12)
37#define INT_MS_EE_MSK (0x0800)
38#define INT_MS_EE_OFST (11)
39#define INT_MS_PS_MSK (0x0400)
40#define INT_MS_PS_OFST (10)
41#define INT_MS_T1_MSK (0x0200)
42#define INT_MS_T1_OFST (9)
43#define INT_MS_T0_MSK (0x0100)
44#define INT_MS_T0_OFST (8)
45#define INT_MS_UA_MSK (0x0080)
46#define INT_MS_UA_OFST (7)
47#define INT_MS_IP_MSK (0x0040)
48#define INT_MS_IP_OFST (6)
49#define INT_MS_P5_MSK (0x0020)
50#define INT_MS_P5_OFST (5)
51#define INT_MS_P4_MSK (0x0010)
52#define INT_MS_P4_OFST (4)
53#define INT_MS_P3_MSK (0x0008)
54#define INT_MS_P3_OFST (3)
55#define INT_MS_P2_MSK (0x0004)
56#define INT_MS_P2_OFST (2)
57#define INT_MS_P1_MSK (0x0002)
58#define INT_MS_P1_OFST (1)
59#define INT_MS_P0_MSK (0x0001)
60#define INT_MS_P0_OFST (0)
61
62#define INT_MC(base_addr) (INT_CTRL00_TYPE (base_addr + 0x04 ))
63#define INT_MC_FC_MSK (0x10000)
64#define INT_MC_FC_OFST (16)
65#define INT_MC_M1_MSK (0x8000)
66#define INT_MC_M1_OFST (15)
67#define INT_MC_M0_MSK (0x4000)
68#define INT_MC_M0_OFST (14)
69#define INT_MC_AE_MSK (0x2000)
70#define INT_MC_AE_OFST (13)
71#define INT_MC_PE_MSK (0x1000)
72#define INT_MC_PE_OFST (12)
73#define INT_MC_EE_MSK (0x0800)
74#define INT_MC_EE_OFST (11)
75#define INT_MC_PS_MSK (0x0400)
76#define INT_MC_PS_OFST (10)
77#define INT_MC_T1_MSK (0x0200)
78#define INT_MC_T1_OFST (9)
79#define INT_MC_T0_MSK (0x0100)
80#define INT_MC_T0_OFST (8)
81#define INT_MC_UA_MSK (0x0080)
82#define INT_MC_UA_OFST (7)
83#define INT_MC_IP_MSK (0x0040)
84#define INT_MC_IP_OFST (6)
85#define INT_MC_P5_MSK (0x0020)
86#define INT_MC_P5_OFST (5)
87#define INT_MC_P4_MSK (0x0010)
88#define INT_MC_P4_OFST (4)
89#define INT_MC_P3_MSK (0x0008)
90#define INT_MC_P3_OFST (3)
91#define INT_MC_P2_MSK (0x0004)
92#define INT_MC_P2_OFST (2)
93#define INT_MC_P1_MSK (0x0002)
94#define INT_MC_P1_OFST (1)
95#define INT_MC_P0_MSK (0x0001)
96#define INT_MC_P0_OFST (0)
97
98#define INT_SS(base_addr) (INT_CTRL00_TYPE (base_addr + 0x08 ))
99#define INT_SS_FC_SSK (0x8000)
100#define INT_SS_FC_OFST (15)
101#define INT_SS_M1_SSK (0x8000)
102#define INT_SS_M1_OFST (15)
103#define INT_SS_M0_SSK (0x4000)
104#define INT_SS_M0_OFST (14)
105#define INT_SS_AE_SSK (0x2000)
106#define INT_SS_AE_OFST (13)
107#define INT_SS_PE_SSK (0x1000)
108#define INT_SS_PE_OFST (12)
109#define INT_SS_EE_SSK (0x0800)
110#define INT_SS_EE_OFST (11)
111#define INT_SS_PS_SSK (0x0400)
112#define INT_SS_PS_OFST (10)
113#define INT_SS_T1_SSK (0x0200)
114#define INT_SS_T1_OFST (9)
115#define INT_SS_T0_SSK (0x0100)
116#define INT_SS_T0_OFST (8)
117#define INT_SS_UA_SSK (0x0080)
118#define INT_SS_UA_OFST (7)
119#define INT_SS_IP_SSK (0x0040)
120#define INT_SS_IP_OFST (6)
121#define INT_SS_P5_SSK (0x0020)
122#define INT_SS_P5_OFST (5)
123#define INT_SS_P4_SSK (0x0010)
124#define INT_SS_P4_OFST (4)
125#define INT_SS_P3_SSK (0x0008)
126#define INT_SS_P3_OFST (3)
127#define INT_SS_P2_SSK (0x0004)
128#define INT_SS_P2_OFST (2)
129#define INT_SS_P1_SSK (0x0002)
130#define INT_SS_P1_OFST (1)
131#define INT_SS_P0_SSK (0x0001)
132#define INT_SS_P0_OFST (0)
133
134#define INT_RS(base_addr) (INT_CTRL00_TYPE (base_addr + 0x0C ))
135#define INT_RS_FC_RSK (0x10000)
136#define INT_RS_FC_OFST (16)
137#define INT_RS_M1_RSK (0x8000)
138#define INT_RS_M1_OFST (15)
139#define INT_RS_M0_RSK (0x4000)
140#define INT_RS_M0_OFST (14)
141#define INT_RS_AE_RSK (0x2000)
142#define INT_RS_AE_OFST (13)
143#define INT_RS_PE_RSK (0x1000)
144#define INT_RS_PE_OFST (12)
145#define INT_RS_EE_RSK (0x0800)
146#define INT_RS_EE_OFST (11)
147#define INT_RS_PS_RSK (0x0400)
148#define INT_RS_PS_OFST (10)
149#define INT_RS_T1_RSK (0x0200)
150#define INT_RS_T1_OFST (9)
151#define INT_RS_T0_RSK (0x0100)
152#define INT_RS_T0_OFST (8)
153#define INT_RS_UA_RSK (0x0080)
154#define INT_RS_UA_OFST (7)
155#define INT_RS_IP_RSK (0x0040)
156#define INT_RS_IP_OFST (6)
157#define INT_RS_P5_RSK (0x0020)
158#define INT_RS_P5_OFST (5)
159#define INT_RS_P4_RSK (0x0010)
160#define INT_RS_P4_OFST (4)
161#define INT_RS_P3_RSK (0x0008)
162#define INT_RS_P3_OFST (3)
163#define INT_RS_P2_RSK (0x0004)
164#define INT_RS_P2_OFST (2)
165#define INT_RS_P1_RSK (0x0002)
166#define INT_RS_P1_OFST (1)
167#define INT_RS_P0_RSK (0x0001)
168#define INT_RS_P0_OFST (0)
169
170#define INT_ID(base_addr) (INT_CTRL00_TYPE (base_addr + 0x10 ))
171#define INT_ID_ID_MSK (0x3F)
172#define INT_ID_ID_OFST (0)
173
174#define INT_PLD_PRIORITY(base_addr) (INT_CTRL00_TYPE (base_addr + 0x14 ))
175#define INT_PLD_PRIORITY_PRI_MSK (0x3F)
176#define INT_PLD_PRIORITY_PRI_OFST (0)
177#define INT_PLD_PRIORITY_GA_MSK (0x40)
178#define INT_PLD_PRIORITY_GA_OFST (6)
179
180#define INT_MODE(base_addr) (INT_CTRL00_TYPE (base_addr + 0x18 ))
181#define INT_MODE_MODE_MSK (0x3)
182#define INT_MODE_MODE_OFST (0)
183
184#define INT_PRIORITY_P0(base_addr) (INT_CTRL00_TYPE (base_addr + 0x80 ))
185#define INT_PRIORITY_P0_PRI_MSK (0x3F)
186#define INT_PRIORITY_P0_PRI_OFST (0)
187#define INT_PRIORITY_P0_FQ_MSK (0x40)
188#define INT_PRIORITY_P0_FQ_OFST (6)
189
190#define INT_PRIORITY_P1(base_addr) (INT_CTRL00_TYPE (base_addr + 0x84 ))
191#define INT_PRIORITY_P1_PRI_MSK (0x3F)
192#define INT_PRIORITY_P1_PRI_OFST (0)
193#define INT_PRIORITY_P1_FQ_MSK (0x40)
194#define INT_PRIORITY_P1_FQ_OFST (6)
195
196#define INT_PRIORITY_P2(base_addr) (INT_CTRL00_TYPE (base_addr + 0x88 ))
197#define INT_PRIORITY_P2_PRI_MSK (0x3F)
198#define INT_PRIORITY_P2_PRI_OFST (0)
199#define INT_PRIORITY_P2_FQ_MSK (0x40)
200#define INT_PRIORITY_P2_FQ_OFST (6)
201
202#define INT_PRIORITY_P3(base_addr) (INT_CTRL00_TYPE (base_addr + 0x8C ))
203#define INT_PRIORITY_P3_PRI_MSK (0x3F)
204#define INT_PRIORITY_P3_PRI_OFST (0)
205#define INT_PRIORITY_P3_FQ_MSK (0x40)
206#define INT_PRIORITY_P3_FQ_OFST (6)
207
208#define INT_PRIORITY_P4(base_addr) (INT_CTRL00_TYPE (base_addr + 0x90 ))
209#define INT_PRIORITY_P4_PRI_MSK (0x3F)
210#define INT_PRIORITY_P4_PRI_OFST (0)
211#define INT_PRIORITY_P4_FQ_MSK (0x40)
212#define INT_PRIORITY_P4_FQ_OFST (6)
213
214#define INT_PRIORITY_P5(base_addr) (INT_CTRL00_TYPE (base_addr + 0x94 ))
215#define INT_PRIORITY_P5_PRI_MSK (0x3F)
216#define INT_PRIORITY_P5_PRI_OFST (0)
217#define INT_PRIORITY_P5_FQ_MSK (0x40)
218#define INT_PRIORITY_P5_FQ_OFST (6)
219
220#define INT_PRIORITY_IP(base_addr) (INT_CTRL00_TYPE (base_addr + 0x94 ))
221#define INT_PRIORITY_IP_PRI_MSK (0x3F)
222#define INT_PRIORITY_IP_PRI_OFST (0)
223#define INT_PRIORITY_IP_FQ_MSK (0x40)
224#define INT_PRIORITY_IP_FQ_OFST (6)
225
226#define INT_PRIORITY_UA(base_addr) (INT_CTRL00_TYPE (base_addr + 0x9C ))
227#define INT_PRIORITY_UA_PRI_MSK (0x3F)
228#define INT_PRIORITY_UA_PRI_OFST (0)
229#define INT_PRIORITY_UA_FQ_MSK (0x40)
230#define INT_PRIORITY_UA_FQ_OFST (6)
231
232#define INT_PRIORITY_T0(base_addr) (INT_CTRL00_TYPE (base_addr + 0xA0 ))
233#define INT_PRIORITY_T0_PRI_MSK (0x3F)
234#define INT_PRIORITY_T0_PRI_OFST (0)
235#define INT_PRIORITY_T0_FQ_MSK (0x40)
236#define INT_PRIORITY_T0_FQ_OFST (6)
237
238#define INT_PRIORITY_T1(base_addr) (INT_CTRL00_TYPE (base_addr + 0xA4 ))
239#define INT_PRIORITY_T1_PRI_MSK (0x3F)
240#define INT_PRIORITY_T1_PRI_OFST (0)
241#define INT_PRIORITY_T1_FQ_MSK (0x40)
242#define INT_PRIORITY_T1_FQ_OFST (6)
243
244#define INT_PRIORITY_PS(base_addr) (INT_CTRL00_TYPE (base_addr + 0xA8 ))
245#define INT_PRIORITY_PS_PRI_MSK (0x3F)
246#define INT_PRIORITY_PS_PRI_OFST (0)
247#define INT_PRIORITY_PS_FQ_MSK (0x40)
248#define INT_PRIORITY_PS_FQ_OFST (6)
249
250#define INT_PRIORITY_EE(base_addr) (INT_CTRL00_TYPE (base_addr + 0xAC ))
251#define INT_PRIORITY_EE_PRI_MSK (0x3F)
252#define INT_PRIORITY_EE_PRI_OFST (0)
253#define INT_PRIORITY_EE_FQ_MSK (0x40)
254#define INT_PRIORITY_EE_FQ_OFST (6)
255
256#define INT_PRIORITY_PE(base_addr) (INT_CTRL00_TYPE (base_addr + 0xB0 ))
257#define INT_PRIORITY_PE_PRI_MSK (0x3F)
258#define INT_PRIORITY_PE_PRI_OFST (0)
259#define INT_PRIORITY_PE_FQ_MSK (0x40)
260#define INT_PRIORITY_PE_FQ_OFST (6)
261
262#define INT_PRIORITY_AE(base_addr) (INT_CTRL00_TYPE (base_addr + 0xB4 ))
263#define INT_PRIORITY_AE_PRI_MSK (0x3F)
264#define INT_PRIORITY_AE_PRI_OFST (0)
265#define INT_PRIORITY_AE_FQ_MSK (0x40)
266#define INT_PRIORITY_AE_FQ_OFST (6)
267
268#define INT_PRIORITY_M0(base_addr) (INT_CTRL00_TYPE (base_addr + 0xB8 ))
269#define INT_PRIORITY_M0_PRI_MSK (0x3F)
270#define INT_PRIORITY_M0_PRI_OFST (0)
271#define INT_PRIORITY_M0_FQ_MSK (0x40)
272#define INT_PRIORITY_M0_FQ_OFST (6)
273
274#define INT_PRIORITY_M1(base_addr) (INT_CTRL00_TYPE (base_addr + 0xBC ))
275#define INT_PRIORITY_M1_PRI_MSK (0x3F)
276#define INT_PRIORITY_M1_PRI_OFST (0)
277#define INT_PRIORITY_M1_FQ_MSK (0x40)
278#define INT_PRIORITY_M1_FQ_OFST (6)
279
280#define INT_PRIORITY_FC(base_addr) (INT_CTRL00_TYPE (base_addr + 0xC0 ))
281#define INT_PRIORITY_FC_PRI_MSK (0x3F)
282#define INT_PRIORITY_FC_PRI_OFST (0)
283#define INT_PRIORITY_FC_FQ_MSK (0x40)
284#define INT_PRIORITY_FC_FQ_OFST (6)
285
286#endif /* __INT_CTRL00_H */
287
288
diff --git a/include/asm-arm/arch-epxa10db/io.h b/include/asm-arm/arch-epxa10db/io.h
deleted file mode 100644
index 9fe100c9d6be..000000000000
--- a/include/asm-arm/arch-epxa10db/io.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-epxa10db/io.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARM_ARCH_IO_H
21#define __ASM_ARM_ARCH_IO_H
22
23#include <asm/hardware.h>
24
25#define IO_SPACE_LIMIT 0xffff
26
27
28/*
29 * Generic virtual read/write
30 */
31/*#define outsw __arch_writesw
32#define outsl __arch_writesl
33#define outsb __arch_writesb
34#define insb __arch_readsb
35#define insw __arch_readsw
36#define insl __arch_readsl*/
37
38#define __io(a) ((void __iomem *)(a))
39#define __mem_pci(a) (a)
40
41#endif
diff --git a/include/asm-arm/arch-epxa10db/irqs.h b/include/asm-arm/arch-epxa10db/irqs.h
deleted file mode 100644
index c3758a3b5d9d..000000000000
--- a/include/asm-arm/arch-epxa10db/irqs.h
+++ /dev/null
@@ -1,45 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-camelot/irqs.h
3 *
4 * Copyright (C) 2001 Altera Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21/* Use the Excalibur chip definitions */
22#define INT_CTRL00_TYPE
23#include "asm/arch/int_ctrl00.h"
24
25
26#define IRQ_PLD0 INT_MS_P0_OFST
27#define IRQ_PLD1 INT_MS_P1_OFST
28#define IRQ_PLD2 INT_MS_P2_OFST
29#define IRQ_PLD3 INT_MS_P3_OFST
30#define IRQ_PLD4 INT_MS_P4_OFST
31#define IRQ_PLD5 INT_MS_P5_OFST
32#define IRQ_EXT INT_MS_IP_OFST
33#define IRQ_UART INT_MS_UA_OFST
34#define IRQ_TIMER0 INT_MS_T0_OFST
35#define IRQ_TIMER1 INT_MS_T1_OFST
36#define IRQ_PLL INT_MS_PLL_OFST
37#define IRQ_EBI INT_MS_EBI_OFST
38#define IRQ_STRIPE_BRIDGE INT_MS_PLL_OFST
39#define IRQ_AHB_BRIDGE INT_MS_PLL_OFST
40#define IRQ_COMMRX INT_MS_CR_OFST
41#define IRQ_COMMTX INT_MS_CT_OFST
42#define IRQ_FAST_COMM INT_MS_FC_OFST
43
44#define NR_IRQS (INT_MS_FC_OFST + 1)
45
diff --git a/include/asm-arm/arch-epxa10db/mode_ctrl00.h b/include/asm-arm/arch-epxa10db/mode_ctrl00.h
deleted file mode 100644
index d8a7efa12e19..000000000000
--- a/include/asm-arm/arch-epxa10db/mode_ctrl00.h
+++ /dev/null
@@ -1,80 +0,0 @@
1#ifndef __MODE_CTRL00_H
2#define __MODE_CTRL00_H
3
4/*
5 * Register definitions for the reset and mode control
6 */
7
8/*
9 * Copyright (C) 2001 Altera Corporation
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */
25
26
27
28#define BOOT_CR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR ))
29#define BOOT_CR_BF_MSK (0x1)
30#define BOOT_CR_BF_OFST (0)
31#define BOOT_CR_HM_MSK (0x2)
32#define BOOT_CR_HM_OFST (1)
33#define BOOT_CR_RE_MSK (0x4)
34#define BOOT_CR_RE_OFST (2)
35
36#define RESET_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR + 0x4 ))
37#define RESET_SR_WR_MSK (0x1)
38#define RESET_SR_WR_OFST (0)
39#define RESET_SR_CR_MSK (0x2)
40#define RESET_SR_CR_OFST (1)
41#define RESET_SR_JT_MSK (0x4)
42#define RESET_SR_JT_OFST (2)
43#define RESET_SR_ER_MSK (0x8)
44#define RESET_SR_ER_OFST (3)
45
46#define ID_CODE(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR + 0x08 ))
47
48#define SRAM0_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR + 0x20 ))
49#define SRAM0_SR_SIZE_MSK (0xFFFFF000)
50#define SRAM0_SR_SIZE_OFST (12)
51
52#define SRAM1_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR + 0x24 ))
53#define SRAM1_SR_SIZE_MSK (0xFFFFF000)
54#define SRAM1_SR_SIZE_OFST (12)
55
56#define DPSRAM0_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR + 0x30 ))
57
58#define DPSRAM0_SR_MODE_MSK (0xF)
59#define DPSRAM0_SR_MODE_OFST (0)
60#define DPSRAM0_SR_GLBL_MSK (0x30)
61#define DPSRAM0_SR_SIZE_MSK (0xFFFFF000)
62#define DPSRAM0_SR_SIZE_OFST (12)
63
64#define DPSRAM0_LCR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR + 0x34 ))
65#define DPSRAM0_LCR_LCKADDR_MSK (0x1FFE0)
66#define DPSRAM0_LCR_LCKADDR_OFST (4)
67
68#define DPSRAM1_SR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR + 0x38 ))
69#define DPSRAM1_SR_MODE_MSK (0xF)
70#define DPSRAM1_SR_MODE_OFST (0)
71#define DPSRAM1_SR_GLBL_MSK (0x30)
72#define DPSRAM1_SR_GLBL_OFST (4)
73#define DPSRAM1_SR_SIZE_MSK (0xFFFFF000)
74#define DPSRAM1_SR_SIZE_OFST (12)
75
76#define DPSRAM1_LCR(BASE_ADDR) (MODE_CTRL00_TYPE (BASE_ADDR + 0x3C ))
77#define DPSRAM1_LCR_LCKADDR_MSK (0x1FFE0)
78#define DPSRAM1_LCR_LCKADDR_OFST (4)
79
80#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
index 129bb0f212a0..000000000000
--- a/include/asm-arm/arch-epxa10db/platform.h
+++ /dev/null
@@ -1,7 +0,0 @@
1#ifndef PLATFORM_H
2#define PLATFORM_H
3#include "excalibur.h"
4
5#define MAXIRQNUM 15
6#endif
7
diff --git a/include/asm-arm/arch-epxa10db/pld_conf00.h b/include/asm-arm/arch-epxa10db/pld_conf00.h
deleted file mode 100644
index 7af2c38dacc6..000000000000
--- a/include/asm-arm/arch-epxa10db/pld_conf00.h
+++ /dev/null
@@ -1,73 +0,0 @@
1#ifndef __PLD_CONF00_H
2#define __PLD_CONF00_H
3
4/*
5 * Register definitions for the PLD Configuration Logic
6 */
7
8/*
9 *
10 * This file contains the register definitions for the Excalibur
11 * Interrupt controller INT_CTRL00.
12 *
13 * Copyright (C) 2001 Altera Corporation
14 *
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 */
29
30#define CONFIG_CONTROL(BASE_ADDR) (PLD_CONF00_TYPE (BASE_ADDR))
31#define CONFIG_CONTROL_LK_MSK (0x1)
32#define CONFIG_CONTROL_LK_OFST (0)
33#define CONFIG_CONTROL_CO_MSK (0x2)
34#define CONFIG_CONTROL_CO_OFST (1)
35#define CONFIG_CONTROL_B_MSK (0x4)
36#define CONFIG_CONTROL_B_OFST (2)
37#define CONFIG_CONTROL_PC_MSK (0x8)
38#define CONFIG_CONTROL_PC_OFST (3)
39#define CONFIG_CONTROL_E_MSK (0x10)
40#define CONFIG_CONTROL_E_OFST (4)
41#define CONFIG_CONTROL_ES_MSK (0xE0)
42#define CONFIG_CONTROL_ES_OFST (5)
43#define CONFIG_CONTROL_ES_0_MSK (0x20)
44#define CONFIG_CONTROL_ES_1_MSK (0x40)
45#define CONFIG_CONTROL_ES_2_MSK (0x80)
46
47#define CONFIG_CONTROL_CLOCK(BASE_ADDR) (PLD_CONF00_TYPE (BASE_ADDR + 0x4 ))
48#define CONFIG_CONTROL_CLOCK_RATIO_MSK (0xFFFF)
49#define CONFIG_CONTROL_CLOCK_RATIO_OFST (0)
50
51#define CONFIG_CONTROL_DATA(BASE_ADDR) (PLD_CONF00_TYPE (BASE_ADDR + 0x8 ))
52#define CONFIG_CONTROL_DATA_MSK (0xFFFFFFFF)
53#define CONFIG_CONTROL_DATA_OFST (0)
54
55#define CONFIG_UNLOCK(BASE_ADDR) (PLD_CONF00_TYPE (BASE_ADDR + 0xC ))
56#define CONFIG_UNLOCK_MSK (0xFFFFFFFF)
57#define CONFIG_UNLOCK_OFST (0)
58
59#define CONFIG_UNLOCK_MAGIC (0x554E4C4B)
60
61#endif /* __PLD_CONF00_H */
62
63
64
65
66
67
68
69
70
71
72
73
diff --git a/include/asm-arm/arch-epxa10db/tdkphy.h b/include/asm-arm/arch-epxa10db/tdkphy.h
deleted file mode 100644
index 5e107bd4e109..000000000000
--- a/include/asm-arm/arch-epxa10db/tdkphy.h
+++ /dev/null
@@ -1,209 +0,0 @@
1/*
2 * linux/drivers/tdkphy.h
3 *
4 * Copyright (C) 2001 Altera Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __TDKPHY_H
22#define __TDKPHY_H
23
24/*
25 * Register definitions for the TDK 78Q2120 PHY
26 * which is on the Camelot board
27 */
28
29/*
30 * Copyright (c) Altera Corporation 2000.
31 * All rights reserved.
32 */
33#define PHY_CONTROL (0)
34#define PHY_CONTROL_COLT_MSK (0x80)
35#define PHY_CONTROL_COLT_OFST (7)
36#define PHY_CONTROL_DUPLEX_MSK (0x100)
37#define PHY_CONTROL_DUPLEX_OFST (8)
38#define PHY_CONTROL_RANEG_MSK (0x200)
39#define PHY_CONTROL_RANEG_OFST (9)
40#define PHY_CONTROL_ISO_MSK (0x400)
41#define PHY_CONTROL_ISO_OFST (10)
42#define PHY_CONTROL_PWRDN_MSK (0x800)
43#define PHY_CONTROL_PWRDN_OFST (11)
44#define PHY_CONTROL_ANEGEN_MSK (0x1000)
45#define PHY_CONTROL_ANEGEN_OFST (12)
46#define PHY_CONTROL_SPEEDSL_MSK (0x2000)
47#define PHY_CONTROL_SPEEDSL_OFST (13)
48#define PHY_CONTROL_LOOPBK_MSK (0x4000)
49#define PHY_CONTROL_LOOPBK_OFST (14)
50#define PHY_CONTROL_RESET_MSK (0x8000)
51#define PHY_CONTROL_RESET_OFST (15)
52
53#define PHY_STATUS (1)
54#define PHY_STATUS_ETXD_MSK (0x1)
55#define PHY_STATUS_EXTD_OFST (0)
56#define PHY_STATUS_JAB_MSK (0x2)
57#define PHY_STATUS_JAB_OFST (1)
58#define PHY_STATUS_LINK_MSK (0x4)
59#define PHY_STATUS_LINK_OFST (2)
60#define PHY_STATUS_ANEGA_MSK (0x8)
61#define PHY_STATUS_ANEGA_OFST (3)
62#define PHY_STATUS_RFAULT_MSK (0x10)
63#define PHY_STATUS_RFAULT_OFST (4)
64#define PHY_STATUS_ANEGC_MSK (0x20)
65#define PHY_STATUS_ANEGC_OFST (5)
66#define PHY_STATUS_10T_H_MSK (0x800)
67#define PHY_STATUS_10T_H_OFST (11)
68#define PHY_STATUS_10T_F_MSK (0x1000)
69#define PHY_STATUS_10T_F_OFST (12)
70#define PHY_STATUS_100_X_H_MSK (0x2000)
71#define PHY_STATUS_100_X_H_OFST (13)
72#define PHY_STATUS_100_X_F_MSK (0x4000)
73#define PHY_STATUS_100_X_F_OFST (14)
74#define PHY_STATUS_100T4_MSK (0x8000)
75#define PHY_STATUS_100T4_OFST (15)
76
77#define PHY_ID1 (2)
78#define PHY_ID1_OUI_MSK (0xFFFF)
79#define PHY_ID1_OUI_OFST (0)
80
81#define PHY_ID2 (3)
82#define PHY_ID2_RN_MSK (0xF)
83#define PHY_ID2_RN_OFST (0)
84#define PHY_ID2_MN_MSK (0x3F0)
85#define PHY_ID2_MN_OFST (4)
86#define PHY_ID2_OUI_MSK (0xFC00)
87#define PHY_ID2_OUI_OFST (10)
88
89#define PHY_AUTO_NEG_ADVERTISEMENT (4)
90#define PHY_AUTO_NEG_ADVERTISEMENT_SELECTOR_MSK (0x1F)
91#define PHY_AUTO_NEG_ADVERTISEMENT_SELECTOR_OFST (0)
92#define PHY_AUTO_NEG_ADVERTISEMENT_A0_MSK (0x20)
93#define PHY_AUTO_NEG_ADVERTISEMENT_A0_OFST (5)
94#define PHY_AUTO_NEG_ADVERTISEMENT_A1_MSK (0x40)
95#define PHY_AUTO_NEG_ADVERTISEMENT_A1_OFST (6)
96#define PHY_AUTO_NEG_ADVERTISEMENT_A2_MSK (0x80)
97#define PHY_AUTO_NEG_ADVERTISEMENT_A2_OFST (7)
98#define PHY_AUTO_NEG_ADVERTISEMENT_A3_MSK (0x100)
99#define PHY_AUTO_NEG_ADVERTISEMENT_A3_OFST (8)
100#define PHY_AUTO_NEG_ADVERTISEMENT_A4_MSK (0x200)
101#define PHY_AUTO_NEG_ADVERTISEMENT_A4_OFST (9)
102#define PHY_AUTO_NEG_ADVERTISEMENT_TAF_MSK (0x1FE0)
103#define PHY_AUTO_NEG_ADVERTISEMENT_TAF_OFST (5)
104#define PHY_AUTO_NEG_ADVERTISEMENT_RF_MSK (0x2000)
105#define PHY_AUTO_NEG_ADVERTISEMENT_RF_OFST (13)
106#define PHY_AUTO_NEG_ADVERTISEMENT_RSVD_MSK (0x4000)
107#define PHY_AUTO_NEG_ADVERTISEMENT_RVSD_OFST (14)
108#define PHY_AUTO_NEG_ADVERTISEMENT_NP_MSK (0x8000)
109#define PHY_AUTO_NEG_ADVERTISEMENT_NP_OFST (15)
110
111#define PHY_AUTO_NEG_LINK_PARTNER (5)
112#define PHY_AUTO_NEG_LINK_PARTNER_S4_MSK (0x1F)
113#define PHY_AUTO_NEG_LINK_PARTNER_S4_OFST (0)
114#define PHY_AUTO_NEG_LINK_PARTNER_A7_MSK (0x1FE0)
115#define PHY_AUTO_NEG_LINK_PARTNER_A7_OFST (5)
116#define PHY_AUTO_NEG_LINK_PARTNER_RF_MSK (0x2000)
117#define PHY_AUTO_NEG_LINK_PARTNER_RF_OFST (13)
118#define PHY_AUTO_NEG_LINK_PARTNER_ACK_MSK (0x4000)
119#define PHY_AUTO_NEG_LINK_PARTNER_ACK_OFST (14)
120#define PHY_AUTO_NEG_LINK_PARTNER_NP_MSK (0x8000)
121#define PHY_AUTO_NEG_LINK_PARTNER_NP_OFST (15)
122
123#define PHY_AUTO_NEG_EXPANSION (6)
124#define PHY_AUTO_NEG_EXPANSION_LPANEGA_MSK (0x1)
125#define PHY_AUTO_NEG_EXPANSION_LPANEGA_OFST (0)
126#define PHY_AUTO_NEG_EXPANSION_PRX_MSK (0x2)
127#define PHY_AUTO_NEG_EXPANSION_PRX_OFST (1)
128#define PHY_AUTO_NEG_EXPANSION_NPA_MSK (0x4)
129#define PHY_AUTO_NEG_EXPANSION_NPA_OFST (2)
130#define PHY_AUTO_NEG_EXPANSION_LPNPA_MSK (0x8)
131#define PHY_AUTO_NEG_EXPANSION_LPNPA_OFST (3)
132#define PHY_AUTO_NEG_EXPANSION_PDF_MSK (0x10)
133#define PHY_AUTO_NEG_EXPANSION_PDF_OFST (4)
134
135#define PHY_VENDOR_SPECIFIC (16)
136#define PHY_VENDOR_SPECIFIC_RXCC_MSK (0x1)
137#define PHY_VENDOR_SPECIFIC_RXCC_OFST (0)
138#define PHY_VENDOR_SPECIFIC_PCSBP_MSK (0x2)
139#define PHY_VENDOR_SPECIFIC_PCSBP_OFST (1)
140#define PHY_VENDOR_SPECIFIC_RVSPOL_MSK (0x10)
141#define PHY_VENDOR_SPECIFIC_RVSPOL_OFST (4)
142#define PHY_VENDOR_SPECIFIC_APOL_MSK (0x20)
143#define PHY_VENDOR_SPECIFIC_APOL_OFST (5)
144#define PHY_VENDOR_SPECIFIC_GPIO0_DIR_MSK (0x40)
145#define PHY_VENDOR_SPECIFIC_GPIO0_DIR_OFST (6)
146#define PHY_VENDOR_SPECIFIC_GPIO0_DAT_MSK (0x80)
147#define PHY_VENDOR_SPECIFIC_GPIO0_DAT_OFST (7)
148#define PHY_VENDOR_SPECIFIC_GPIO1_DIR_MSK (0x100)
149#define PHY_VENDOR_SPECIFIC_GPIO1_DIR_OFST (8)
150#define PHY_VENDOR_SPECIFIC_GPIO1_DAT_MSK (0x200)
151#define PHY_VENDOR_SPECIFIC_GPIO1_DAT_OFST (9)
152#define PHY_VENDOR_SPECIFIC_10BT_NATURAL_LOOPBACK_DAT_MSK (0x400)
153#define PHY_VENDOR_SPECIFIC_10BT_NATURAL_LOOPBACK_DAT_OFST (10)
154#define PHY_VENDOR_SPECIFIC_10BT_SQE_TEST_INHIBIT_MSK (0x800)
155#define PHY_VENDOR_SPECIFIC_10BT_SQE_TEST_INHIBIT_OFST (11)
156#define PHY_VENDOR_SPECIFIC_TXHIM_MSK (0x1000)
157#define PHY_VENDOR_SPECIFIC_TXHIM_OFST (12)
158#define PHY_VENDOR_SPECIFIC_INT_LEVEL_MSK (0x4000)
159#define PHY_VENDOR_SPECIFIC_INT_LEVEL_OFST (14)
160#define PHY_VENDOR_SPECIFIC_RPTR_MSK (0x8000)
161#define PHY_VENDOR_SPECIFIC_RPTR_OFST (15)
162
163#define PHY_IRQ_CONTROL (17)
164#define PHY_IRQ_CONTROL_ANEG_COMP_INT_MSK (0x1)
165#define PHY_IRQ_CONTROL_ANEG_COMP_INT_OFST (0)
166#define PHY_IRQ_CONTROL_RFAULT_INT_MSK (0x2)
167#define PHY_IRQ_CONTROL_RFAULT_INT_OFST (1)
168#define PHY_IRQ_CONTROL_LS_CHG_INT_MSK (0x4)
169#define PHY_IRQ_CONTROL_LS_CHG_INT_OFST (2)
170#define PHY_IRQ_CONTROL_LP_ACK_INT_MSK (0x8)
171#define PHY_IRQ_CONTROL_LP_ACK_INT_OFST (3)
172#define PHY_IRQ_CONTROL_PDF_INT_MSK (0x10)
173#define PHY_IRQ_CONTROL_PDF_INT_OFST (4)
174#define PHY_IRQ_CONTROL_PRX_INT_MSK (0x20)
175#define PHY_IRQ_CONTROL_PRX_INT_OFST (5)
176#define PHY_IRQ_CONTROL_RXER_INT_MSK (0x40)
177#define PHY_IRQ_CONTROL_RXER_INT_OFST (6)
178#define PHY_IRQ_CONTROL_JABBER_INT_MSK (0x80)
179#define PHY_IRQ_CONTROL_JABBER_INT_OFST (7)
180#define PHY_IRQ_CONTROL_ANEG_COMP_IE_MSK (0x100)
181#define PHY_IRQ_CONTROL_ANEG_COMP_IE_OFST (8)
182#define PHY_IRQ_CONTROL_RFAULT_IE_MSK (0x200)
183#define PHY_IRQ_CONTROL_RFAULT_IE_OFST (9)
184#define PHY_IRQ_CONTROL_LS_CHG_IE_MSK (0x400)
185#define PHY_IRQ_CONTROL_LS_CHG_IE_OFST (10)
186#define PHY_IRQ_CONTROL_LP_ACK_IE_MSK (0x800)
187#define PHY_IRQ_CONTROL_LP_ACK_IE_OFST (11)
188#define PHY_IRQ_CONTROL_PDF_IE_MSK (0x1000)
189#define PHY_IRQ_CONTROL_PDF_IE_OFST (12)
190#define PHY_IRQ_CONTROL_PRX_IE_MSK (0x2000)
191#define PHY_IRQ_CONTROL_PRX_IE_OFST (13)
192#define PHY_IRQ_CONTROL_RXER_IE_MSK (0x4000)
193#define PHY_IRQ_CONTROL_RXER_IE_OFST (14)
194#define PHY_IRQ_CONTROL_JABBER_IE_MSK (0x8000)
195#define PHY_IRQ_CONTROL_JABBER_IE_OFST (15)
196
197#define PHY_DIAGNOSTIC (18)
198#define PHY_DIAGNOSTIC_RX_LOCK_MSK (0x100)
199#define PHY_DIAGNOSTIC_RX_LOCK_OFST (8)
200#define PHY_DIAGNOSTIC_RX_PASS_MSK (0x200)
201#define PHY_DIAGNOSTIC_RX_PASS_OFST (9)
202#define PHY_DIAGNOSTIC_RATE_MSK (0x400)
203#define PHY_DIAGNOSTIC_RATE_OFST (10)
204#define PHY_DIAGNOSTIC_DPLX_MSK (0x800)
205#define PHY_DIAGNOSTIC_DPLX_OFST (11)
206#define PHY_DIAGNOSTIC_ANEGF_MSK (0x1000)
207#define PHY_DIAGNOSTIC_ANEGF_OFST (12)
208
209#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
index 52a3fb58b59d..000000000000
--- a/include/asm-arm/arch-epxa10db/timer00.h
+++ /dev/null
@@ -1,98 +0,0 @@
1/*
2 *
3 * This file contains the register definitions for the Excalibur
4 * Timer TIMER00.
5 *
6 * Copyright (C) 2001 Altera Corporation
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22#ifndef __TIMER00_H
23#define __TIMER00_H
24
25/*
26 * Register definitions for the timers
27 */
28
29
30#define TIMER0_CR(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR + 0x00 ))
31#define TIMER0_CR_B_MSK (0x20)
32#define TIMER0_CR_B_OFST (0x5)
33#define TIMER0_CR_S_MSK (0x10)
34#define TIMER0_CR_S_OFST (0x4)
35#define TIMER0_CR_CI_MSK (0x08)
36#define TIMER0_CR_CI_OFST (0x3)
37#define TIMER0_CR_IE_MSK (0x04)
38#define TIMER0_CR_IE_OFST (0x2)
39#define TIMER0_CR_MODE_MSK (0x3)
40#define TIMER0_CR_MODE_OFST (0)
41#define TIMER0_CR_MODE_FREE (0)
42#define TIMER0_CR_MODE_ONE (1)
43#define TIMER0_CR_MODE_INTVL (2)
44
45#define TIMER0_SR(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR + 0x00 ))
46#define TIMER0_SR_B_MSK (0x20)
47#define TIMER0_SR_B_OFST (0x5)
48#define TIMER0_SR_S_MSK (0x10)
49#define TIMER0_SR_S_OFST (0x4)
50#define TIMER0_SR_CI_MSK (0x08)
51#define TIMER0_SR_CI_OFST (0x3)
52#define TIMER0_SR_IE_MSK (0x04)
53#define TIMER0_SR_IE_OFST (0x2)
54#define TIMER0_SR_MODE_MSK (0x3)
55#define TIMER0_SR_MODE_OFST (0)
56#define TIMER0_SR_MODE_FREE (0)
57#define TIMER0_SR_MODE_ONE (1)
58#define TIMER0_SR_MODE_INTVL (2)
59
60#define TIMER0_PRESCALE(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR + 0x010 ))
61#define TIMER0_LIMIT(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR + 0x020 ))
62#define TIMER0_READ(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR + 0x030 ))
63
64#define TIMER1_CR(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR + 0x40 ))
65#define TIMER1_CR_B_MSK (0x20)
66#define TIMER1_CR_B_OFST (0x5)
67#define TIMER1_CR_S_MSK (0x10)
68#define TIMER1_CR_S_OFST (0x4)
69#define TIMER1_CR_CI_MSK (0x08)
70#define TIMER1_CR_CI_OFST (0x3)
71#define TIMER1_CR_IE_MSK (0x04)
72#define TIMER1_CR_IE_OFST (0x2)
73#define TIMER1_CR_MODE_MSK (0x3)
74#define TIMER1_CR_MODE_OFST (0)
75#define TIMER1_CR_MODE_FREE (0)
76#define TIMER1_CR_MODE_ONE (1)
77#define TIMER1_CR_MODE_INTVL (2)
78
79#define TIMER1_SR(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR + 0x40 ))
80#define TIMER1_SR_B_MSK (0x20)
81#define TIMER1_SR_B_OFST (0x5)
82#define TIMER1_SR_S_MSK (0x10)
83#define TIMER1_SR_S_OFST (0x4)
84#define TIMER1_SR_CI_MSK (0x08)
85#define TIMER1_SR_CI_OFST (0x3)
86#define TIMER1_SR_IE_MSK (0x04)
87#define TIMER1_SR_IE_OFST (0x2)
88#define TIMER1_SR_MODE_MSK (0x3)
89#define TIMER1_SR_MODE_OFST (0)
90#define TIMER1_SR_MODE_FREE (0)
91#define TIMER1_SR_MODE_ONE (1)
92#define TIMER1_SR_MODE_INTVL (2)
93
94#define TIMER1_PRESCALE(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR + 0x050 ))
95#define TIMER1_LIMIT(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR + 0x060 ))
96#define TIMER1_READ(BASE_ADDR) (TIMER00_TYPE (BASE_ADDR + 0x070 ))
97
98#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
index 5abd8914d68b..000000000000
--- a/include/asm-arm/arch-epxa10db/uart00.h
+++ /dev/null
@@ -1,181 +0,0 @@
1/* *
2 * Copyright (C) 2001 Altera Corporation
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18#ifndef __UART00_H
19#define __UART00_H
20
21/*
22 * Register definitions for the UART
23 */
24
25#define UART_TX_FIFO_SIZE (15)
26
27#define UART_RSR(BASE_ADDR) (UART00_TYPE (BASE_ADDR + 0x00 ))
28#define UART_RSR_RX_LEVEL_MSK (0x1f)
29#define UART_RSR_RX_LEVEL_OFST (0)
30#define UART_RSR_RE_MSK (0x80)
31#define UART_RSR_RE_OFST (7)
32
33#define UART_RDS(BASE_ADDR) (UART00_TYPE (BASE_ADDR + 0x04 ))
34#define UART_RDS_BI_MSK (0x8)
35#define UART_RDS_BI_OFST (4)
36#define UART_RDS_FE_MSK (0x4)
37#define UART_RDS_FE_OFST (2)
38#define UART_RDS_PE_MSK (0x2)
39#define UART_RDS_PE_OFST (1)
40#define UART_RDS_OE_MSK (0x1)
41#define UART_RDS_OE_OFST (0)
42
43#define UART_RD(BASE_ADDR) (UART00_TYPE (BASE_ADDR + 0x08 ))
44#define UART_RD_RX_DATA_MSK (0xff)
45#define UART_RD_RX_DATA_OFST (0)
46
47#define UART_TSR(BASE_ADDR) (UART00_TYPE (BASE_ADDR + 0x0c ))
48#define UART_TSR_TX_LEVEL_MSK (0x1f)
49#define UART_TSR_TX_LEVEL_OFST (0)
50#define UART_TSR_TXI_MSK (0x80)
51#define UART_TSR_TXI_OFST (7)
52
53#define UART_TD(BASE_ADDR) (UART00_TYPE (BASE_ADDR + 0x10 ))
54#define UART_TD_TX_DATA_MSK (0xff)
55#define UART_TD_TX_DATA_OFST (0)
56
57#define UART_FCR(BASE_ADDR) (UART00_TYPE (BASE_ADDR + 0x14 ))
58#define UART_FCR_RX_THR_MSK (0xd0)
59#define UART_FCR_RX_THR_OFST (5)
60#define UART_FCR_RX_THR_1 (0x00)
61#define UART_FCR_RX_THR_2 (0x20)
62#define UART_FCR_RX_THR_4 (0x40)
63#define UART_FCR_RX_THR_6 (0x60)
64#define UART_FCR_RX_THR_8 (0x80)
65#define UART_FCR_RX_THR_10 (0xa0)
66#define UART_FCR_RX_THR_12 (0xc0)
67#define UART_FCR_RX_THR_14 (0xd0)
68#define UART_FCR_TX_THR_MSK (0x1c)
69#define UART_FCR_TX_THR_OFST (2)
70#define UART_FCR_TX_THR_0 (0x00)
71#define UART_FCR_TX_THR_2 (0x04)
72#define UART_FCR_TX_THR_4 (0x08)
73#define UART_FCR_TX_THR_8 (0x0c)
74#define UART_FCR_TX_THR_10 (0x10)
75#define UART_FCR_TX_THR_12 (0x14)
76#define UART_FCR_TX_THR_14 (0x18)
77#define UART_FCR_TX_THR_15 (0x1c)
78#define UART_FCR_RC_MSK (0x02)
79#define UART_FCR_RC_OFST (1)
80#define UART_FCR_TC_MSK (0x01)
81#define UART_FCR_TC_OFST (0)
82
83#define UART_IES(BASE_ADDR) (UART00_TYPE (BASE_ADDR + 0x18 ))
84#define UART_IES_ME_MSK (0x8)
85#define UART_IES_ME_OFST (3)
86#define UART_IES_TIE_MSK (0x4)
87#define UART_IES_TIE_OFST (2)
88#define UART_IES_TE_MSK (0x2)
89#define UART_IES_TE_OFST (1)
90#define UART_IES_RE_MSK (0x1)
91#define UART_IES_RE_OFST (0)
92
93#define UART_IEC(BASE_ADDR) (UART00_TYPE (BASE_ADDR + 0x1c ))
94#define UART_IEC_ME_MSK (0x8)
95#define UART_IEC_ME_OFST (3)
96#define UART_IEC_TIE_MSK (0x4)
97#define UART_IEC_TIE_OFST (2)
98#define UART_IEC_TE_MSK (0x2)
99#define UART_IEC_TE_OFST (1)
100#define UART_IEC_RE_MSK (0x1)
101#define UART_IEC_RE_OFST (0)
102
103#define UART_ISR(BASE_ADDR) (UART00_TYPE (BASE_ADDR + 0x20 ))
104#define UART_ISR_MI_MSK (0x8)
105#define UART_ISR_MI_OFST (3)
106#define UART_ISR_TII_MSK (0x4)
107#define UART_ISR_TII_OFST (2)
108#define UART_ISR_TI_MSK (0x2)
109#define UART_ISR_TI_OFST (1)
110#define UART_ISR_RI_MSK (0x1)
111#define UART_ISR_RI_OFST (0)
112
113#define UART_IID(BASE_ADDR) (UART00_TYPE (BASE_ADDR + 0x24 ))
114#define UART_IID_IID_MSK (0x7)
115#define UART_IID_IID_OFST (0)
116
117#define UART_MC(BASE_ADDR) (UART00_TYPE (BASE_ADDR + 0x28 ))
118#define UART_MC_OE_MSK (0x40)
119#define UART_MC_OE_OFST (6)
120#define UART_MC_SP_MSK (0x20)
121#define UART_MC_SP_OFST (5)
122#define UART_MC_EP_MSK (0x10)
123#define UART_MC_EP_OFST (4)
124#define UART_MC_PE_MSK (0x08)
125#define UART_MC_PE_OFST (3)
126#define UART_MC_ST_MSK (0x04)
127#define UART_MC_ST_ONE (0x0)
128#define UART_MC_ST_TWO (0x04)
129#define UART_MC_ST_OFST (2)
130#define UART_MC_CLS_MSK (0x03)
131#define UART_MC_CLS_OFST (0)
132#define UART_MC_CLS_CHARLEN_5 (0)
133#define UART_MC_CLS_CHARLEN_6 (1)
134#define UART_MC_CLS_CHARLEN_7 (2)
135#define UART_MC_CLS_CHARLEN_8 (3)
136
137#define UART_MCR(BASE_ADDR) (UART00_TYPE (BASE_ADDR + 0x2c ))
138#define UART_MCR_AC_MSK (0x80)
139#define UART_MCR_AC_OFST (7)
140#define UART_MCR_AR_MSK (0x40)
141#define UART_MCR_AR_OFST (6)
142#define UART_MCR_BR_MSK (0x20)
143#define UART_MCR_BR_OFST (5)
144#define UART_MCR_LB_MSK (0x10)
145#define UART_MCR_LB_OFST (4)
146#define UART_MCR_DCD_MSK (0x08)
147#define UART_MCR_DCD_OFST (3)
148#define UART_MCR_RI_MSK (0x04)
149#define UART_MCR_RI_OFST (2)
150#define UART_MCR_DTR_MSK (0x02)
151#define UART_MCR_DTR_OFST (1)
152#define UART_MCR_RTS_MSK (0x01)
153#define UART_MCR_RTS_OFST (0)
154
155#define UART_MSR(BASE_ADDR) (UART00_TYPE (BASE_ADDR + 0x30 ))
156#define UART_MSR_DCD_MSK (0x80)
157#define UART_MSR_DCD_OFST (7)
158#define UART_MSR_RI_MSK (0x40)
159#define UART_MSR_RI_OFST (6)
160#define UART_MSR_DSR_MSK (0x20)
161#define UART_MSR_DSR_OFST (5)
162#define UART_MSR_CTS_MSK (0x10)
163#define UART_MSR_CTS_OFST (4)
164#define UART_MSR_DDCD_MSK (0x08)
165#define UART_MSR_DDCD_OFST (3)
166#define UART_MSR_TERI_MSK (0x04)
167#define UART_MSR_TERI_OFST (2)
168#define UART_MSR_DDSR_MSK (0x02)
169#define UART_MSR_DDSR_OFST (1)
170#define UART_MSR_DCTS_MSK (0x01)
171#define UART_MSR_DCTS_OFST (0)
172
173#define UART_DIV_LO(BASE_ADDR) (UART00_TYPE (BASE_ADDR + 0x34 ))
174#define UART_DIV_LO_DIV_MSK (0xff)
175#define UART_DIV_LO_DIV_OFST (0)
176
177#define UART_DIV_HI(BASE_ADDR) (UART00_TYPE (BASE_ADDR + 0x38 ))
178#define UART_DIV_HI_DIV_MSK (0xff)
179#define UART_DIV_HI_DIV_OFST (0)
180
181#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
index fdfe0e6848f8..000000000000
--- a/include/asm-arm/arch-epxa10db/uncompress.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-epxa10db/uncompress.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) 2001 Altera Corporation
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#include "asm/arch/platform.h"
22#include "asm/hardware.h"
23#define UART00_TYPE (volatile unsigned int*)
24#include "asm/arch/uart00.h"
25
26/*
27 * This does not append a newline
28 */
29static void putstr(const char *s)
30{
31 while (*s) {
32 while ((*UART_TSR(EXC_UART00_BASE) &
33 UART_TSR_TX_LEVEL_MSK)==15)
34 barrier();
35
36 *UART_TD(EXC_UART00_BASE) = *s;
37
38 if (*s == '\n') {
39 while ((*UART_TSR(EXC_UART00_BASE) &
40 UART_TSR_TX_LEVEL_MSK)==15)
41 barrier();
42
43 *UART_TD(EXC_UART00_BASE) = '\r';
44 }
45 s++;
46 }
47}
48
49/*
50 * nothing to do
51 */
52#define arch_decomp_setup()
53
54#define arch_decomp_wdog()
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h
index 0cf4d4f99600..fd0147e52dbb 100644
--- a/include/asm-arm/io.h
+++ b/include/asm-arm/io.h
@@ -56,7 +56,12 @@ extern void __raw_readsl(const void __iomem *addr, void *data, int longlen);
56 56
57/* 57/*
58 * Architecture ioremap implementation. 58 * Architecture ioremap implementation.
59 *
60 * __ioremap takes CPU physical address.
61 *
62 * __ioremap_pfn takes a Page Frame Number and an offset into that page
59 */ 63 */
64extern void __iomem * __ioremap_pfn(unsigned long, unsigned long, size_t, unsigned long);
60extern void __iomem * __ioremap(unsigned long, size_t, unsigned long); 65extern void __iomem * __ioremap(unsigned long, size_t, unsigned long);
61extern void __iounmap(void __iomem *addr); 66extern void __iounmap(void __iomem *addr);
62 67
@@ -261,6 +266,7 @@ out:
261 * 266 *
262 * ioremap takes a PCI memory address, as specified in 267 * ioremap takes a PCI memory address, as specified in
263 * Documentation/IO-mapping.txt. 268 * Documentation/IO-mapping.txt.
269 *
264 */ 270 */
265#ifndef __arch_ioremap 271#ifndef __arch_ioremap
266#define ioremap(cookie,size) __ioremap(cookie,size,0) 272#define ioremap(cookie,size) __ioremap(cookie,size,0)
diff --git a/include/asm-arm/mach/map.h b/include/asm-arm/mach/map.h
index b338936bde4f..3351b77fab36 100644
--- a/include/asm-arm/mach/map.h
+++ b/include/asm-arm/mach/map.h
@@ -27,9 +27,6 @@ struct meminfo;
27#define MT_ROM 6 27#define MT_ROM 6
28#define MT_IXP2000_DEVICE 7 28#define MT_IXP2000_DEVICE 7
29 29
30#define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT)
31#define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT)
32
33extern void create_memmap_holes(struct meminfo *); 30extern void create_memmap_holes(struct meminfo *);
34extern void memtable_init(struct meminfo *); 31extern void memtable_init(struct meminfo *);
35extern void iotable_init(struct map_desc *, int); 32extern void iotable_init(struct map_desc *, int);
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h
index 3e572364ee73..3d7f08bd9030 100644
--- a/include/asm-arm/memory.h
+++ b/include/asm-arm/memory.h
@@ -58,6 +58,12 @@
58#endif 58#endif
59 59
60/* 60/*
61 * Convert a physical address to a Page Frame Number and back
62 */
63#define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT)
64#define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT)
65
66/*
61 * The module space lives between the addresses given by TASK_SIZE 67 * The module space lives between the addresses given by TASK_SIZE
62 * and PAGE_OFFSET - it must be within 32MB of the kernel text. 68 * and PAGE_OFFSET - it must be within 32MB of the kernel text.
63 */ 69 */
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index 3c89df6e7768..d88bf8aa8b47 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -3,6 +3,7 @@
3 * 3 *
4 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> 4 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
5 * Copyright (c) 2002 David S. Miller (davem@redhat.com) 5 * Copyright (c) 2002 David S. Miller (davem@redhat.com)
6 * Copyright (c) 2005 Herbert Xu <herbert@gondor.apana.org.au>
6 * 7 *
7 * Portions derived from Cryptoapi, by Alexander Kjeldaas <astor@fast.no> 8 * Portions derived from Cryptoapi, by Alexander Kjeldaas <astor@fast.no>
8 * and Nettle, by Niels Möller. 9 * and Nettle, by Niels Möller.
@@ -126,7 +127,11 @@ struct crypto_alg {
126 unsigned int cra_blocksize; 127 unsigned int cra_blocksize;
127 unsigned int cra_ctxsize; 128 unsigned int cra_ctxsize;
128 unsigned int cra_alignmask; 129 unsigned int cra_alignmask;
130
131 int cra_priority;
132
129 const char cra_name[CRYPTO_MAX_ALG_NAME]; 133 const char cra_name[CRYPTO_MAX_ALG_NAME];
134 const char cra_driver_name[CRYPTO_MAX_ALG_NAME];
130 135
131 union { 136 union {
132 struct cipher_alg cipher; 137 struct cipher_alg cipher;
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index aef6042f8f0b..ccd3e13de1e8 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -27,14 +27,15 @@ struct mmc_command {
27#define MMC_RSP_MASK (3 << 0) 27#define MMC_RSP_MASK (3 << 0)
28#define MMC_RSP_CRC (1 << 3) /* expect valid crc */ 28#define MMC_RSP_CRC (1 << 3) /* expect valid crc */
29#define MMC_RSP_BUSY (1 << 4) /* card may send busy */ 29#define MMC_RSP_BUSY (1 << 4) /* card may send busy */
30#define MMC_RSP_OPCODE (1 << 5) /* response contains opcode */
30 31
31/* 32/*
32 * These are the response types, and correspond to valid bit 33 * These are the response types, and correspond to valid bit
33 * patterns of the above flags. One additional valid pattern 34 * patterns of the above flags. One additional valid pattern
34 * is all zeros, which means we don't expect a response. 35 * is all zeros, which means we don't expect a response.
35 */ 36 */
36#define MMC_RSP_R1 (MMC_RSP_SHORT|MMC_RSP_CRC) 37#define MMC_RSP_R1 (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_OPCODE)
37#define MMC_RSP_R1B (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_BUSY) 38#define MMC_RSP_R1B (MMC_RSP_SHORT|MMC_RSP_CRC|MMC_RSP_OPCODE|MMC_RSP_BUSY)
38#define MMC_RSP_R2 (MMC_RSP_LONG|MMC_RSP_CRC) 39#define MMC_RSP_R2 (MMC_RSP_LONG|MMC_RSP_CRC)
39#define MMC_RSP_R3 (MMC_RSP_SHORT) 40#define MMC_RSP_R3 (MMC_RSP_SHORT)
40#define MMC_RSP_R6 (MMC_RSP_SHORT|MMC_RSP_CRC) 41#define MMC_RSP_R6 (MMC_RSP_SHORT|MMC_RSP_CRC)
@@ -64,6 +65,7 @@ struct mmc_data {
64#define MMC_DATA_WRITE (1 << 8) 65#define MMC_DATA_WRITE (1 << 8)
65#define MMC_DATA_READ (1 << 9) 66#define MMC_DATA_READ (1 << 9)
66#define MMC_DATA_STREAM (1 << 10) 67#define MMC_DATA_STREAM (1 << 10)
68#define MMC_DATA_MULTI (1 << 11)
67 69
68 unsigned int bytes_xfered; 70 unsigned int bytes_xfered;
69 71
diff --git a/include/net/act_api.h b/include/net/act_api.h
index b55eb7c7f033..11e9eaf79f5a 100644
--- a/include/net/act_api.h
+++ b/include/net/act_api.h
@@ -63,7 +63,7 @@ struct tc_action_ops
63 __u32 type; /* TBD to match kind */ 63 __u32 type; /* TBD to match kind */
64 __u32 capab; /* capabilities includes 4 bit version */ 64 __u32 capab; /* capabilities includes 4 bit version */
65 struct module *owner; 65 struct module *owner;
66 int (*act)(struct sk_buff **, struct tc_action *, struct tcf_result *); 66 int (*act)(struct sk_buff *, struct tc_action *, struct tcf_result *);
67 int (*get_stats)(struct sk_buff *, struct tc_action *); 67 int (*get_stats)(struct sk_buff *, struct tc_action *);
68 int (*dump)(struct sk_buff *, struct tc_action *,int , int); 68 int (*dump)(struct sk_buff *, struct tc_action *,int , int);
69 int (*cleanup)(struct tc_action *, int bind); 69 int (*cleanup)(struct tc_action *, int bind);
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 6492e7363d84..b94d1ad92c4d 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -1,6 +1,7 @@
1#ifndef __NET_PKT_SCHED_H 1#ifndef __NET_PKT_SCHED_H
2#define __NET_PKT_SCHED_H 2#define __NET_PKT_SCHED_H
3 3
4#include <linux/jiffies.h>
4#include <net/sch_generic.h> 5#include <net/sch_generic.h>
5 6
6struct qdisc_walker 7struct qdisc_walker
@@ -59,8 +60,8 @@ typedef struct timeval psched_time_t;
59typedef long psched_tdiff_t; 60typedef long psched_tdiff_t;
60 61
61#define PSCHED_GET_TIME(stamp) do_gettimeofday(&(stamp)) 62#define PSCHED_GET_TIME(stamp) do_gettimeofday(&(stamp))
62#define PSCHED_US2JIFFIE(usecs) (((usecs)+(1000000/HZ-1))/(1000000/HZ)) 63#define PSCHED_US2JIFFIE(usecs) usecs_to_jiffies(usecs)
63#define PSCHED_JIFFIE2US(delay) ((delay)*(1000000/HZ)) 64#define PSCHED_JIFFIE2US(delay) jiffies_to_usecs(delay)
64 65
65#else /* !CONFIG_NET_SCH_CLK_GETTIMEOFDAY */ 66#else /* !CONFIG_NET_SCH_CLK_GETTIMEOFDAY */
66 67
@@ -123,9 +124,9 @@ do { \
123 default: \ 124 default: \
124 __delta = 0; \ 125 __delta = 0; \
125 case 2: \ 126 case 2: \
126 __delta += 1000000; \ 127 __delta += USEC_PER_SEC; \
127 case 1: \ 128 case 1: \
128 __delta += 1000000; \ 129 __delta += USEC_PER_SEC; \
129 } \ 130 } \
130 } \ 131 } \
131 __delta; \ 132 __delta; \
@@ -136,9 +137,9 @@ psched_tod_diff(int delta_sec, int bound)
136{ 137{
137 int delta; 138 int delta;
138 139
139 if (bound <= 1000000 || delta_sec > (0x7FFFFFFF/1000000)-1) 140 if (bound <= USEC_PER_SEC || delta_sec > (0x7FFFFFFF/USEC_PER_SEC)-1)
140 return bound; 141 return bound;
141 delta = delta_sec * 1000000; 142 delta = delta_sec * USEC_PER_SEC;
142 if (delta > bound || delta < 0) 143 if (delta > bound || delta < 0)
143 delta = bound; 144 delta = bound;
144 return delta; 145 return delta;
@@ -152,9 +153,9 @@ psched_tod_diff(int delta_sec, int bound)
152 default: \ 153 default: \
153 __delta = psched_tod_diff(__delta_sec, bound); break; \ 154 __delta = psched_tod_diff(__delta_sec, bound); break; \
154 case 2: \ 155 case 2: \
155 __delta += 1000000; \ 156 __delta += USEC_PER_SEC; \
156 case 1: \ 157 case 1: \
157 __delta += 1000000; \ 158 __delta += USEC_PER_SEC; \
158 case 0: \ 159 case 0: \
159 if (__delta > bound || __delta < 0) \ 160 if (__delta > bound || __delta < 0) \
160 __delta = bound; \ 161 __delta = bound; \
@@ -170,15 +171,15 @@ psched_tod_diff(int delta_sec, int bound)
170({ \ 171({ \
171 int __delta = (tv).tv_usec + (delta); \ 172 int __delta = (tv).tv_usec + (delta); \
172 (tv_res).tv_sec = (tv).tv_sec; \ 173 (tv_res).tv_sec = (tv).tv_sec; \
173 if (__delta > 1000000) { (tv_res).tv_sec++; __delta -= 1000000; } \ 174 if (__delta > USEC_PER_SEC) { (tv_res).tv_sec++; __delta -= USEC_PER_SEC; } \
174 (tv_res).tv_usec = __delta; \ 175 (tv_res).tv_usec = __delta; \
175}) 176})
176 177
177#define PSCHED_TADD(tv, delta) \ 178#define PSCHED_TADD(tv, delta) \
178({ \ 179({ \
179 (tv).tv_usec += (delta); \ 180 (tv).tv_usec += (delta); \
180 if ((tv).tv_usec > 1000000) { (tv).tv_sec++; \ 181 if ((tv).tv_usec > USEC_PER_SEC) { (tv).tv_sec++; \
181 (tv).tv_usec -= 1000000; } \ 182 (tv).tv_usec -= USEC_PER_SEC; } \
182}) 183})
183 184
184/* Set/check that time is in the "past perfect"; 185/* Set/check that time is in the "past perfect";
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index ccc45d49ce71..05ee48316f70 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -236,12 +236,8 @@ static void rcu_do_batch(struct rcu_data *rdp)
236 * active batch and the batch to be registered has not already occurred. 236 * active batch and the batch to be registered has not already occurred.
237 * Caller must hold rcu_state.lock. 237 * Caller must hold rcu_state.lock.
238 */ 238 */
239static void rcu_start_batch(struct rcu_ctrlblk *rcp, struct rcu_state *rsp, 239static void rcu_start_batch(struct rcu_ctrlblk *rcp, struct rcu_state *rsp)
240 int next_pending)
241{ 240{
242 if (next_pending)
243 rcp->next_pending = 1;
244
245 if (rcp->next_pending && 241 if (rcp->next_pending &&
246 rcp->completed == rcp->cur) { 242 rcp->completed == rcp->cur) {
247 rcp->next_pending = 0; 243 rcp->next_pending = 0;
@@ -275,7 +271,7 @@ static void cpu_quiet(int cpu, struct rcu_ctrlblk *rcp, struct rcu_state *rsp)
275 if (cpus_empty(rsp->cpumask)) { 271 if (cpus_empty(rsp->cpumask)) {
276 /* batch completed ! */ 272 /* batch completed ! */
277 rcp->completed = rcp->cur; 273 rcp->completed = rcp->cur;
278 rcu_start_batch(rcp, rsp, 0); 274 rcu_start_batch(rcp, rsp);
279 } 275 }
280} 276}
281 277
@@ -410,7 +406,8 @@ static void __rcu_process_callbacks(struct rcu_ctrlblk *rcp,
410 if (!rcp->next_pending) { 406 if (!rcp->next_pending) {
411 /* and start it/schedule start if it's a new batch */ 407 /* and start it/schedule start if it's a new batch */
412 spin_lock(&rsp->lock); 408 spin_lock(&rsp->lock);
413 rcu_start_batch(rcp, rsp, 1); 409 rcp->next_pending = 1;
410 rcu_start_batch(rcp, rsp);
414 spin_unlock(&rsp->lock); 411 spin_unlock(&rsp->lock);
415 } 412 }
416 } else { 413 } else {
diff --git a/net/core/dev.c b/net/core/dev.c
index 5081287923d5..bf66b114d3c2 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1092,15 +1092,12 @@ int skb_checksum_help(struct sk_buff *skb, int inward)
1092 goto out; 1092 goto out;
1093 } 1093 }
1094 1094
1095 if (offset > (int)skb->len) 1095 BUG_ON(offset > (int)skb->len);
1096 BUG();
1097 csum = skb_checksum(skb, offset, skb->len-offset, 0); 1096 csum = skb_checksum(skb, offset, skb->len-offset, 0);
1098 1097
1099 offset = skb->tail - skb->h.raw; 1098 offset = skb->tail - skb->h.raw;
1100 if (offset <= 0) 1099 BUG_ON(offset <= 0);
1101 BUG(); 1100 BUG_ON(skb->csum + 2 > offset);
1102 if (skb->csum + 2 > offset)
1103 BUG();
1104 1101
1105 *(u16*)(skb->h.raw + skb->csum) = csum_fold(csum); 1102 *(u16*)(skb->h.raw + skb->csum) = csum_fold(csum);
1106 skb->ip_summed = CHECKSUM_NONE; 1103 skb->ip_summed = CHECKSUM_NONE;
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 070f91cfde59..d0732e9c8560 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -791,8 +791,7 @@ int ___pskb_trim(struct sk_buff *skb, unsigned int len, int realloc)
791 int end = offset + skb_shinfo(skb)->frags[i].size; 791 int end = offset + skb_shinfo(skb)->frags[i].size;
792 if (end > len) { 792 if (end > len) {
793 if (skb_cloned(skb)) { 793 if (skb_cloned(skb)) {
794 if (!realloc) 794 BUG_ON(!realloc);
795 BUG();
796 if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) 795 if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
797 return -ENOMEM; 796 return -ENOMEM;
798 } 797 }
@@ -894,8 +893,7 @@ unsigned char *__pskb_pull_tail(struct sk_buff *skb, int delta)
894 struct sk_buff *insp = NULL; 893 struct sk_buff *insp = NULL;
895 894
896 do { 895 do {
897 if (!list) 896 BUG_ON(!list);
898 BUG();
899 897
900 if (list->len <= eat) { 898 if (list->len <= eat) {
901 /* Eaten as whole. */ 899 /* Eaten as whole. */
@@ -1199,8 +1197,7 @@ unsigned int skb_checksum(const struct sk_buff *skb, int offset,
1199 start = end; 1197 start = end;
1200 } 1198 }
1201 } 1199 }
1202 if (len) 1200 BUG_ON(len);
1203 BUG();
1204 1201
1205 return csum; 1202 return csum;
1206} 1203}
@@ -1282,8 +1279,7 @@ unsigned int skb_copy_and_csum_bits(const struct sk_buff *skb, int offset,
1282 start = end; 1279 start = end;
1283 } 1280 }
1284 } 1281 }
1285 if (len) 1282 BUG_ON(len);
1286 BUG();
1287 return csum; 1283 return csum;
1288} 1284}
1289 1285
@@ -1297,8 +1293,7 @@ void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to)
1297 else 1293 else
1298 csstart = skb_headlen(skb); 1294 csstart = skb_headlen(skb);
1299 1295
1300 if (csstart > skb_headlen(skb)) 1296 BUG_ON(csstart > skb_headlen(skb));
1301 BUG();
1302 1297
1303 memcpy(to, skb->data, csstart); 1298 memcpy(to, skb->data, csstart);
1304 1299
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index be5a519cd2f8..105039eb7629 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -899,8 +899,7 @@ static void icmp_address_reply(struct sk_buff *skb)
899 u32 _mask, *mp; 899 u32 _mask, *mp;
900 900
901 mp = skb_header_pointer(skb, 0, sizeof(_mask), &_mask); 901 mp = skb_header_pointer(skb, 0, sizeof(_mask), &_mask);
902 if (mp == NULL) 902 BUG_ON(mp == NULL);
903 BUG();
904 for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) { 903 for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) {
905 if (*mp == ifa->ifa_mask && 904 if (*mp == ifa->ifa_mask &&
906 inet_ifa_match(rt->rt_src, ifa)) 905 inet_ifa_match(rt->rt_src, ifa))
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index c49908192047..457db99c76df 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -50,9 +50,10 @@ static struct sock *idiagnl;
50#define INET_DIAG_PUT(skb, attrtype, attrlen) \ 50#define INET_DIAG_PUT(skb, attrtype, attrlen) \
51 RTA_DATA(__RTA_PUT(skb, attrtype, attrlen)) 51 RTA_DATA(__RTA_PUT(skb, attrtype, attrlen))
52 52
53static int inet_diag_fill(struct sk_buff *skb, struct sock *sk, 53static int inet_csk_diag_fill(struct sock *sk,
54 int ext, u32 pid, u32 seq, u16 nlmsg_flags, 54 struct sk_buff *skb,
55 const struct nlmsghdr *unlh) 55 int ext, u32 pid, u32 seq, u16 nlmsg_flags,
56 const struct nlmsghdr *unlh)
56{ 57{
57 const struct inet_sock *inet = inet_sk(sk); 58 const struct inet_sock *inet = inet_sk(sk);
58 const struct inet_connection_sock *icsk = inet_csk(sk); 59 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,
70 nlh->nlmsg_flags = nlmsg_flags; 71 nlh->nlmsg_flags = nlmsg_flags;
71 72
72 r = NLMSG_DATA(nlh); 73 r = NLMSG_DATA(nlh);
73 if (sk->sk_state != TCP_TIME_WAIT) { 74 BUG_ON(sk->sk_state == TCP_TIME_WAIT);
74 if (ext & (1 << (INET_DIAG_MEMINFO - 1))) 75
75 minfo = INET_DIAG_PUT(skb, INET_DIAG_MEMINFO, 76 if (ext & (1 << (INET_DIAG_MEMINFO - 1)))
76 sizeof(*minfo)); 77 minfo = INET_DIAG_PUT(skb, INET_DIAG_MEMINFO, sizeof(*minfo));
77 if (ext & (1 << (INET_DIAG_INFO - 1))) 78
78 info = INET_DIAG_PUT(skb, INET_DIAG_INFO, 79 if (ext & (1 << (INET_DIAG_INFO - 1)))
79 handler->idiag_info_size); 80 info = INET_DIAG_PUT(skb, INET_DIAG_INFO,
80 81 handler->idiag_info_size);
81 if ((ext & (1 << (INET_DIAG_CONG - 1))) && icsk->icsk_ca_ops) { 82
82 size_t len = strlen(icsk->icsk_ca_ops->name); 83 if ((ext & (1 << (INET_DIAG_CONG - 1))) && icsk->icsk_ca_ops) {
83 strcpy(INET_DIAG_PUT(skb, INET_DIAG_CONG, len + 1), 84 const size_t len = strlen(icsk->icsk_ca_ops->name);
84 icsk->icsk_ca_ops->name); 85
85 } 86 strcpy(INET_DIAG_PUT(skb, INET_DIAG_CONG, len + 1),
87 icsk->icsk_ca_ops->name);
86 } 88 }
89
87 r->idiag_family = sk->sk_family; 90 r->idiag_family = sk->sk_family;
88 r->idiag_state = sk->sk_state; 91 r->idiag_state = sk->sk_state;
89 r->idiag_timer = 0; 92 r->idiag_timer = 0;
@@ -93,37 +96,6 @@ static int inet_diag_fill(struct sk_buff *skb, struct sock *sk,
93 r->id.idiag_cookie[0] = (u32)(unsigned long)sk; 96 r->id.idiag_cookie[0] = (u32)(unsigned long)sk;
94 r->id.idiag_cookie[1] = (u32)(((unsigned long)sk >> 31) >> 1); 97 r->id.idiag_cookie[1] = (u32)(((unsigned long)sk >> 31) >> 1);
95 98
96 if (r->idiag_state == TCP_TIME_WAIT) {
97 const struct inet_timewait_sock *tw = inet_twsk(sk);
98 long tmo = tw->tw_ttd - jiffies;
99 if (tmo < 0)
100 tmo = 0;
101
102 r->id.idiag_sport = tw->tw_sport;
103 r->id.idiag_dport = tw->tw_dport;
104 r->id.idiag_src[0] = tw->tw_rcv_saddr;
105 r->id.idiag_dst[0] = tw->tw_daddr;
106 r->idiag_state = tw->tw_substate;
107 r->idiag_timer = 3;
108 r->idiag_expires = (tmo * 1000 + HZ - 1) / HZ;
109 r->idiag_rqueue = 0;
110 r->idiag_wqueue = 0;
111 r->idiag_uid = 0;
112 r->idiag_inode = 0;
113#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
114 if (r->idiag_family == AF_INET6) {
115 const struct inet6_timewait_sock *tw6 = inet6_twsk(sk);
116
117 ipv6_addr_copy((struct in6_addr *)r->id.idiag_src,
118 &tw6->tw_v6_rcv_saddr);
119 ipv6_addr_copy((struct in6_addr *)r->id.idiag_dst,
120 &tw6->tw_v6_daddr);
121 }
122#endif
123 nlh->nlmsg_len = skb->tail - b;
124 return skb->len;
125 }
126
127 r->id.idiag_sport = inet->sport; 99 r->id.idiag_sport = inet->sport;
128 r->id.idiag_dport = inet->dport; 100 r->id.idiag_dport = inet->dport;
129 r->id.idiag_src[0] = inet->rcv_saddr; 101 r->id.idiag_src[0] = inet->rcv_saddr;
@@ -185,7 +157,75 @@ nlmsg_failure:
185 return -1; 157 return -1;
186} 158}
187 159
188static int inet_diag_get_exact(struct sk_buff *in_skb, const struct nlmsghdr *nlh) 160static int inet_twsk_diag_fill(struct inet_timewait_sock *tw,
161 struct sk_buff *skb, int ext, u32 pid,
162 u32 seq, u16 nlmsg_flags,
163 const struct nlmsghdr *unlh)
164{
165 long tmo;
166 struct inet_diag_msg *r;
167 const unsigned char *previous_tail = skb->tail;
168 struct nlmsghdr *nlh = NLMSG_PUT(skb, pid, seq,
169 unlh->nlmsg_type, sizeof(*r));
170
171 r = NLMSG_DATA(nlh);
172 BUG_ON(tw->tw_state != TCP_TIME_WAIT);
173
174 nlh->nlmsg_flags = nlmsg_flags;
175
176 tmo = tw->tw_ttd - jiffies;
177 if (tmo < 0)
178 tmo = 0;
179
180 r->idiag_family = tw->tw_family;
181 r->idiag_state = tw->tw_state;
182 r->idiag_timer = 0;
183 r->idiag_retrans = 0;
184 r->id.idiag_if = tw->tw_bound_dev_if;
185 r->id.idiag_cookie[0] = (u32)(unsigned long)tw;
186 r->id.idiag_cookie[1] = (u32)(((unsigned long)tw >> 31) >> 1);
187 r->id.idiag_sport = tw->tw_sport;
188 r->id.idiag_dport = tw->tw_dport;
189 r->id.idiag_src[0] = tw->tw_rcv_saddr;
190 r->id.idiag_dst[0] = tw->tw_daddr;
191 r->idiag_state = tw->tw_substate;
192 r->idiag_timer = 3;
193 r->idiag_expires = (tmo * 1000 + HZ - 1) / HZ;
194 r->idiag_rqueue = 0;
195 r->idiag_wqueue = 0;
196 r->idiag_uid = 0;
197 r->idiag_inode = 0;
198#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
199 if (tw->tw_family == AF_INET6) {
200 const struct inet6_timewait_sock *tw6 =
201 inet6_twsk((struct sock *)tw);
202
203 ipv6_addr_copy((struct in6_addr *)r->id.idiag_src,
204 &tw6->tw_v6_rcv_saddr);
205 ipv6_addr_copy((struct in6_addr *)r->id.idiag_dst,
206 &tw6->tw_v6_daddr);
207 }
208#endif
209 nlh->nlmsg_len = skb->tail - previous_tail;
210 return skb->len;
211nlmsg_failure:
212 skb_trim(skb, previous_tail - skb->data);
213 return -1;
214}
215
216static int sk_diag_fill(struct sock *sk, struct sk_buff *skb,
217 int ext, u32 pid, u32 seq, u16 nlmsg_flags,
218 const struct nlmsghdr *unlh)
219{
220 if (sk->sk_state == TCP_TIME_WAIT)
221 return inet_twsk_diag_fill((struct inet_timewait_sock *)sk,
222 skb, ext, pid, seq, nlmsg_flags,
223 unlh);
224 return inet_csk_diag_fill(sk, skb, ext, pid, seq, nlmsg_flags, unlh);
225}
226
227static int inet_diag_get_exact(struct sk_buff *in_skb,
228 const struct nlmsghdr *nlh)
189{ 229{
190 int err; 230 int err;
191 struct sock *sk; 231 struct sock *sk;
@@ -235,7 +275,7 @@ static int inet_diag_get_exact(struct sk_buff *in_skb, const struct nlmsghdr *nl
235 if (!rep) 275 if (!rep)
236 goto out; 276 goto out;
237 277
238 if (inet_diag_fill(rep, sk, req->idiag_ext, 278 if (sk_diag_fill(sk, rep, req->idiag_ext,
239 NETLINK_CB(in_skb).pid, 279 NETLINK_CB(in_skb).pid,
240 nlh->nlmsg_seq, 0, nlh) <= 0) 280 nlh->nlmsg_seq, 0, nlh) <= 0)
241 BUG(); 281 BUG();
@@ -283,7 +323,7 @@ static int bitstring_match(const u32 *a1, const u32 *a2, int bits)
283 323
284 324
285static int inet_diag_bc_run(const void *bc, int len, 325static int inet_diag_bc_run(const void *bc, int len,
286 const struct inet_diag_entry *entry) 326 const struct inet_diag_entry *entry)
287{ 327{
288 while (len > 0) { 328 while (len > 0) {
289 int yes = 1; 329 int yes = 1;
@@ -322,7 +362,7 @@ static int inet_diag_bc_run(const void *bc, int len,
322 yes = 0; 362 yes = 0;
323 break; 363 break;
324 } 364 }
325 365
326 if (cond->prefix_len == 0) 366 if (cond->prefix_len == 0)
327 break; 367 break;
328 368
@@ -331,7 +371,8 @@ static int inet_diag_bc_run(const void *bc, int len,
331 else 371 else
332 addr = entry->daddr; 372 addr = entry->daddr;
333 373
334 if (bitstring_match(addr, cond->addr, cond->prefix_len)) 374 if (bitstring_match(addr, cond->addr,
375 cond->prefix_len))
335 break; 376 break;
336 if (entry->family == AF_INET6 && 377 if (entry->family == AF_INET6 &&
337 cond->family == AF_INET) { 378 cond->family == AF_INET) {
@@ -346,7 +387,7 @@ static int inet_diag_bc_run(const void *bc, int len,
346 } 387 }
347 } 388 }
348 389
349 if (yes) { 390 if (yes) {
350 len -= op->yes; 391 len -= op->yes;
351 bc += op->yes; 392 bc += op->yes;
352 } else { 393 } else {
@@ -407,14 +448,15 @@ static int inet_diag_bc_audit(const void *bytecode, int bytecode_len)
407 default: 448 default:
408 return -EINVAL; 449 return -EINVAL;
409 } 450 }
410 bc += op->yes; 451 bc += op->yes;
411 len -= op->yes; 452 len -= op->yes;
412 } 453 }
413 return len == 0 ? 0 : -EINVAL; 454 return len == 0 ? 0 : -EINVAL;
414} 455}
415 456
416static int inet_diag_dump_sock(struct sk_buff *skb, struct sock *sk, 457static int inet_csk_diag_dump(struct sock *sk,
417 struct netlink_callback *cb) 458 struct sk_buff *skb,
459 struct netlink_callback *cb)
418{ 460{
419 struct inet_diag_req *r = NLMSG_DATA(cb->nlh); 461 struct inet_diag_req *r = NLMSG_DATA(cb->nlh);
420 462
@@ -444,14 +486,50 @@ static int inet_diag_dump_sock(struct sk_buff *skb, struct sock *sk,
444 return 0; 486 return 0;
445 } 487 }
446 488
447 return inet_diag_fill(skb, sk, r->idiag_ext, NETLINK_CB(cb->skb).pid, 489 return inet_csk_diag_fill(sk, skb, r->idiag_ext,
448 cb->nlh->nlmsg_seq, NLM_F_MULTI, cb->nlh); 490 NETLINK_CB(cb->skb).pid,
491 cb->nlh->nlmsg_seq, NLM_F_MULTI, cb->nlh);
492}
493
494static int inet_twsk_diag_dump(struct inet_timewait_sock *tw,
495 struct sk_buff *skb,
496 struct netlink_callback *cb)
497{
498 struct inet_diag_req *r = NLMSG_DATA(cb->nlh);
499
500 if (cb->nlh->nlmsg_len > 4 + NLMSG_SPACE(sizeof(*r))) {
501 struct inet_diag_entry entry;
502 struct rtattr *bc = (struct rtattr *)(r + 1);
503
504 entry.family = tw->tw_family;
505#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
506 if (tw->tw_family == AF_INET6) {
507 struct inet6_timewait_sock *tw6 =
508 inet6_twsk((struct sock *)tw);
509 entry.saddr = tw6->tw_v6_rcv_saddr.s6_addr32;
510 entry.daddr = tw6->tw_v6_daddr.s6_addr32;
511 } else
512#endif
513 {
514 entry.saddr = &tw->tw_rcv_saddr;
515 entry.daddr = &tw->tw_daddr;
516 }
517 entry.sport = tw->tw_num;
518 entry.dport = ntohs(tw->tw_dport);
519 entry.userlocks = 0;
520
521 if (!inet_diag_bc_run(RTA_DATA(bc), RTA_PAYLOAD(bc), &entry))
522 return 0;
523 }
524
525 return inet_twsk_diag_fill(tw, skb, r->idiag_ext,
526 NETLINK_CB(cb->skb).pid,
527 cb->nlh->nlmsg_seq, NLM_F_MULTI, cb->nlh);
449} 528}
450 529
451static int inet_diag_fill_req(struct sk_buff *skb, struct sock *sk, 530static int inet_diag_fill_req(struct sk_buff *skb, struct sock *sk,
452 struct request_sock *req, 531 struct request_sock *req, u32 pid, u32 seq,
453 u32 pid, u32 seq, 532 const struct nlmsghdr *unlh)
454 const struct nlmsghdr *unlh)
455{ 533{
456 const struct inet_request_sock *ireq = inet_rsk(req); 534 const struct inet_request_sock *ireq = inet_rsk(req);
457 struct inet_sock *inet = inet_sk(sk); 535 struct inet_sock *inet = inet_sk(sk);
@@ -504,7 +582,7 @@ nlmsg_failure:
504} 582}
505 583
506static int inet_diag_dump_reqs(struct sk_buff *skb, struct sock *sk, 584static int inet_diag_dump_reqs(struct sk_buff *skb, struct sock *sk,
507 struct netlink_callback *cb) 585 struct netlink_callback *cb)
508{ 586{
509 struct inet_diag_entry entry; 587 struct inet_diag_entry entry;
510 struct inet_diag_req *r = NLMSG_DATA(cb->nlh); 588 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,
556 inet6_rsk(req)->loc_addr.s6_addr32 : 634 inet6_rsk(req)->loc_addr.s6_addr32 :
557#endif 635#endif
558 &ireq->loc_addr; 636 &ireq->loc_addr;
559 entry.daddr = 637 entry.daddr =
560#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) 638#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
561 (entry.family == AF_INET6) ? 639 (entry.family == AF_INET6) ?
562 inet6_rsk(req)->rmt_addr.s6_addr32 : 640 inet6_rsk(req)->rmt_addr.s6_addr32 :
@@ -599,7 +677,7 @@ static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb)
599 handler = inet_diag_table[cb->nlh->nlmsg_type]; 677 handler = inet_diag_table[cb->nlh->nlmsg_type];
600 BUG_ON(handler == NULL); 678 BUG_ON(handler == NULL);
601 hashinfo = handler->idiag_hashinfo; 679 hashinfo = handler->idiag_hashinfo;
602 680
603 s_i = cb->args[1]; 681 s_i = cb->args[1];
604 s_num = num = cb->args[2]; 682 s_num = num = cb->args[2];
605 683
@@ -630,7 +708,7 @@ static int inet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb)
630 cb->args[3] > 0) 708 cb->args[3] > 0)
631 goto syn_recv; 709 goto syn_recv;
632 710
633 if (inet_diag_dump_sock(skb, sk, cb) < 0) { 711 if (inet_csk_diag_dump(sk, skb, cb) < 0) {
634 inet_listen_unlock(hashinfo); 712 inet_listen_unlock(hashinfo);
635 goto done; 713 goto done;
636 } 714 }
@@ -672,7 +750,6 @@ skip_listen_ht:
672 s_num = 0; 750 s_num = 0;
673 751
674 read_lock_bh(&head->lock); 752 read_lock_bh(&head->lock);
675
676 num = 0; 753 num = 0;
677 sk_for_each(sk, node, &head->chain) { 754 sk_for_each(sk, node, &head->chain) {
678 struct inet_sock *inet = inet_sk(sk); 755 struct inet_sock *inet = inet_sk(sk);
@@ -684,9 +761,10 @@ skip_listen_ht:
684 if (r->id.idiag_sport != inet->sport && 761 if (r->id.idiag_sport != inet->sport &&
685 r->id.idiag_sport) 762 r->id.idiag_sport)
686 goto next_normal; 763 goto next_normal;
687 if (r->id.idiag_dport != inet->dport && r->id.idiag_dport) 764 if (r->id.idiag_dport != inet->dport &&
765 r->id.idiag_dport)
688 goto next_normal; 766 goto next_normal;
689 if (inet_diag_dump_sock(skb, sk, cb) < 0) { 767 if (inet_csk_diag_dump(sk, skb, cb) < 0) {
690 read_unlock_bh(&head->lock); 768 read_unlock_bh(&head->lock);
691 goto done; 769 goto done;
692 } 770 }
@@ -695,19 +773,20 @@ next_normal:
695 } 773 }
696 774
697 if (r->idiag_states & TCPF_TIME_WAIT) { 775 if (r->idiag_states & TCPF_TIME_WAIT) {
698 sk_for_each(sk, node, 776 struct inet_timewait_sock *tw;
777
778 inet_twsk_for_each(tw, node,
699 &hashinfo->ehash[i + hashinfo->ehash_size].chain) { 779 &hashinfo->ehash[i + hashinfo->ehash_size].chain) {
700 struct inet_sock *inet = inet_sk(sk);
701 780
702 if (num < s_num) 781 if (num < s_num)
703 goto next_dying; 782 goto next_dying;
704 if (r->id.idiag_sport != inet->sport && 783 if (r->id.idiag_sport != tw->tw_sport &&
705 r->id.idiag_sport) 784 r->id.idiag_sport)
706 goto next_dying; 785 goto next_dying;
707 if (r->id.idiag_dport != inet->dport && 786 if (r->id.idiag_dport != tw->tw_dport &&
708 r->id.idiag_dport) 787 r->id.idiag_dport)
709 goto next_dying; 788 goto next_dying;
710 if (inet_diag_dump_sock(skb, sk, cb) < 0) { 789 if (inet_twsk_diag_dump(tw, skb, cb) < 0) {
711 read_unlock_bh(&head->lock); 790 read_unlock_bh(&head->lock);
712 goto done; 791 goto done;
713 } 792 }
@@ -724,8 +803,7 @@ done:
724 return skb->len; 803 return skb->len;
725} 804}
726 805
727static __inline__ int 806static inline int inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
728inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
729{ 807{
730 if (!(nlh->nlmsg_flags&NLM_F_REQUEST)) 808 if (!(nlh->nlmsg_flags&NLM_F_REQUEST))
731 return 0; 809 return 0;
@@ -755,9 +833,8 @@ inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
755 } 833 }
756 return netlink_dump_start(idiagnl, skb, nlh, 834 return netlink_dump_start(idiagnl, skb, nlh,
757 inet_diag_dump, NULL); 835 inet_diag_dump, NULL);
758 } else { 836 } else
759 return inet_diag_get_exact(skb, nlh); 837 return inet_diag_get_exact(skb, nlh);
760 }
761 838
762err_inval: 839err_inval:
763 return -EINVAL; 840 return -EINVAL;
@@ -766,15 +843,15 @@ err_inval:
766 843
767static inline void inet_diag_rcv_skb(struct sk_buff *skb) 844static inline void inet_diag_rcv_skb(struct sk_buff *skb)
768{ 845{
769 int err;
770 struct nlmsghdr * nlh;
771
772 if (skb->len >= NLMSG_SPACE(0)) { 846 if (skb->len >= NLMSG_SPACE(0)) {
773 nlh = (struct nlmsghdr *)skb->data; 847 int err;
774 if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len) 848 struct nlmsghdr *nlh = (struct nlmsghdr *)skb->data;
849
850 if (nlh->nlmsg_len < sizeof(*nlh) ||
851 skb->len < nlh->nlmsg_len)
775 return; 852 return;
776 err = inet_diag_rcv_msg(skb, nlh); 853 err = inet_diag_rcv_msg(skb, nlh);
777 if (err || nlh->nlmsg_flags & NLM_F_ACK) 854 if (err || nlh->nlmsg_flags & NLM_F_ACK)
778 netlink_ack(skb, nlh, err); 855 netlink_ack(skb, nlh, err);
779 } 856 }
780} 857}
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index ce5fe3f74a3d..2160874ce7aa 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -304,8 +304,7 @@ static void unlink_from_pool(struct inet_peer *p)
304 /* look for a node to insert instead of p */ 304 /* look for a node to insert instead of p */
305 struct inet_peer *t; 305 struct inet_peer *t;
306 t = lookup_rightempty(p); 306 t = lookup_rightempty(p);
307 if (*stackptr[-1] != t) 307 BUG_ON(*stackptr[-1] != t);
308 BUG();
309 **--stackptr = t->avl_left; 308 **--stackptr = t->avl_left;
310 /* t is removed, t->v4daddr > x->v4daddr for any 309 /* t is removed, t->v4daddr > x->v4daddr for any
311 * x in p->avl_left subtree. 310 * x in p->avl_left subtree.
@@ -314,8 +313,7 @@ static void unlink_from_pool(struct inet_peer *p)
314 t->avl_left = p->avl_left; 313 t->avl_left = p->avl_left;
315 t->avl_right = p->avl_right; 314 t->avl_right = p->avl_right;
316 t->avl_height = p->avl_height; 315 t->avl_height = p->avl_height;
317 if (delp[1] != &p->avl_left) 316 BUG_ON(delp[1] != &p->avl_left);
318 BUG();
319 delp[1] = &t->avl_left; /* was &p->avl_left */ 317 delp[1] = &t->avl_left; /* was &p->avl_left */
320 } 318 }
321 peer_avl_rebalance(stack, stackptr); 319 peer_avl_rebalance(stack, stackptr);
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index de16e944777f..1e93eafa7af1 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -188,7 +188,7 @@ static struct ip_tunnel * ipgre_tunnel_lookup(u32 remote, u32 local, u32 key)
188 } 188 }
189 189
190 if (ipgre_fb_tunnel_dev->flags&IFF_UP) 190 if (ipgre_fb_tunnel_dev->flags&IFF_UP)
191 return ipgre_fb_tunnel_dev->priv; 191 return netdev_priv(ipgre_fb_tunnel_dev);
192 return NULL; 192 return NULL;
193} 193}
194 194
@@ -278,7 +278,7 @@ static struct ip_tunnel * ipgre_tunnel_locate(struct ip_tunnel_parm *parms, int
278 return NULL; 278 return NULL;
279 279
280 dev->init = ipgre_tunnel_init; 280 dev->init = ipgre_tunnel_init;
281 nt = dev->priv; 281 nt = netdev_priv(dev);
282 nt->parms = *parms; 282 nt->parms = *parms;
283 283
284 if (register_netdevice(dev) < 0) { 284 if (register_netdevice(dev) < 0) {
@@ -286,9 +286,6 @@ static struct ip_tunnel * ipgre_tunnel_locate(struct ip_tunnel_parm *parms, int
286 goto failed; 286 goto failed;
287 } 287 }
288 288
289 nt = dev->priv;
290 nt->parms = *parms;
291
292 dev_hold(dev); 289 dev_hold(dev);
293 ipgre_tunnel_link(nt); 290 ipgre_tunnel_link(nt);
294 return nt; 291 return nt;
@@ -299,7 +296,7 @@ failed:
299 296
300static void ipgre_tunnel_uninit(struct net_device *dev) 297static void ipgre_tunnel_uninit(struct net_device *dev)
301{ 298{
302 ipgre_tunnel_unlink((struct ip_tunnel*)dev->priv); 299 ipgre_tunnel_unlink(netdev_priv(dev));
303 dev_put(dev); 300 dev_put(dev);
304} 301}
305 302
@@ -518,7 +515,7 @@ out:
518 skb2->dst->ops->update_pmtu(skb2->dst, rel_info); 515 skb2->dst->ops->update_pmtu(skb2->dst, rel_info);
519 rel_info = htonl(rel_info); 516 rel_info = htonl(rel_info);
520 } else if (type == ICMP_TIME_EXCEEDED) { 517 } else if (type == ICMP_TIME_EXCEEDED) {
521 struct ip_tunnel *t = (struct ip_tunnel*)skb2->dev->priv; 518 struct ip_tunnel *t = netdev_priv(skb2->dev);
522 if (t->parms.iph.ttl) { 519 if (t->parms.iph.ttl) {
523 rel_type = ICMP_DEST_UNREACH; 520 rel_type = ICMP_DEST_UNREACH;
524 rel_code = ICMP_HOST_UNREACH; 521 rel_code = ICMP_HOST_UNREACH;
@@ -669,7 +666,7 @@ drop_nolock:
669 666
670static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) 667static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
671{ 668{
672 struct ip_tunnel *tunnel = (struct ip_tunnel*)dev->priv; 669 struct ip_tunnel *tunnel = netdev_priv(dev);
673 struct net_device_stats *stats = &tunnel->stat; 670 struct net_device_stats *stats = &tunnel->stat;
674 struct iphdr *old_iph = skb->nh.iph; 671 struct iphdr *old_iph = skb->nh.iph;
675 struct iphdr *tiph; 672 struct iphdr *tiph;
@@ -915,7 +912,7 @@ ipgre_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
915 t = ipgre_tunnel_locate(&p, 0); 912 t = ipgre_tunnel_locate(&p, 0);
916 } 913 }
917 if (t == NULL) 914 if (t == NULL)
918 t = (struct ip_tunnel*)dev->priv; 915 t = netdev_priv(dev);
919 memcpy(&p, &t->parms, sizeof(p)); 916 memcpy(&p, &t->parms, sizeof(p));
920 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p))) 917 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p)))
921 err = -EFAULT; 918 err = -EFAULT;
@@ -955,7 +952,7 @@ ipgre_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
955 } else { 952 } else {
956 unsigned nflags=0; 953 unsigned nflags=0;
957 954
958 t = (struct ip_tunnel*)dev->priv; 955 t = netdev_priv(dev);
959 956
960 if (MULTICAST(p.iph.daddr)) 957 if (MULTICAST(p.iph.daddr))
961 nflags = IFF_BROADCAST; 958 nflags = IFF_BROADCAST;
@@ -1004,7 +1001,7 @@ ipgre_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
1004 if ((t = ipgre_tunnel_locate(&p, 0)) == NULL) 1001 if ((t = ipgre_tunnel_locate(&p, 0)) == NULL)
1005 goto done; 1002 goto done;
1006 err = -EPERM; 1003 err = -EPERM;
1007 if (t == ipgre_fb_tunnel_dev->priv) 1004 if (t == netdev_priv(ipgre_fb_tunnel_dev))
1008 goto done; 1005 goto done;
1009 dev = t->dev; 1006 dev = t->dev;
1010 } 1007 }
@@ -1021,12 +1018,12 @@ done:
1021 1018
1022static struct net_device_stats *ipgre_tunnel_get_stats(struct net_device *dev) 1019static struct net_device_stats *ipgre_tunnel_get_stats(struct net_device *dev)
1023{ 1020{
1024 return &(((struct ip_tunnel*)dev->priv)->stat); 1021 return &(((struct ip_tunnel*)netdev_priv(dev))->stat);
1025} 1022}
1026 1023
1027static int ipgre_tunnel_change_mtu(struct net_device *dev, int new_mtu) 1024static int ipgre_tunnel_change_mtu(struct net_device *dev, int new_mtu)
1028{ 1025{
1029 struct ip_tunnel *tunnel = (struct ip_tunnel*)dev->priv; 1026 struct ip_tunnel *tunnel = netdev_priv(dev);
1030 if (new_mtu < 68 || new_mtu > 0xFFF8 - tunnel->hlen) 1027 if (new_mtu < 68 || new_mtu > 0xFFF8 - tunnel->hlen)
1031 return -EINVAL; 1028 return -EINVAL;
1032 dev->mtu = new_mtu; 1029 dev->mtu = new_mtu;
@@ -1066,7 +1063,7 @@ static int ipgre_tunnel_change_mtu(struct net_device *dev, int new_mtu)
1066static int ipgre_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, 1063static int ipgre_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
1067 void *daddr, void *saddr, unsigned len) 1064 void *daddr, void *saddr, unsigned len)
1068{ 1065{
1069 struct ip_tunnel *t = (struct ip_tunnel*)dev->priv; 1066 struct ip_tunnel *t = netdev_priv(dev);
1070 struct iphdr *iph = (struct iphdr *)skb_push(skb, t->hlen); 1067 struct iphdr *iph = (struct iphdr *)skb_push(skb, t->hlen);
1071 u16 *p = (u16*)(iph+1); 1068 u16 *p = (u16*)(iph+1);
1072 1069
@@ -1093,7 +1090,7 @@ static int ipgre_header(struct sk_buff *skb, struct net_device *dev, unsigned sh
1093 1090
1094static int ipgre_open(struct net_device *dev) 1091static int ipgre_open(struct net_device *dev)
1095{ 1092{
1096 struct ip_tunnel *t = (struct ip_tunnel*)dev->priv; 1093 struct ip_tunnel *t = netdev_priv(dev);
1097 1094
1098 if (MULTICAST(t->parms.iph.daddr)) { 1095 if (MULTICAST(t->parms.iph.daddr)) {
1099 struct flowi fl = { .oif = t->parms.link, 1096 struct flowi fl = { .oif = t->parms.link,
@@ -1117,7 +1114,7 @@ static int ipgre_open(struct net_device *dev)
1117 1114
1118static int ipgre_close(struct net_device *dev) 1115static int ipgre_close(struct net_device *dev)
1119{ 1116{
1120 struct ip_tunnel *t = (struct ip_tunnel*)dev->priv; 1117 struct ip_tunnel *t = netdev_priv(dev);
1121 if (MULTICAST(t->parms.iph.daddr) && t->mlink) { 1118 if (MULTICAST(t->parms.iph.daddr) && t->mlink) {
1122 struct in_device *in_dev = inetdev_by_index(t->mlink); 1119 struct in_device *in_dev = inetdev_by_index(t->mlink);
1123 if (in_dev) { 1120 if (in_dev) {
@@ -1157,7 +1154,7 @@ static int ipgre_tunnel_init(struct net_device *dev)
1157 int mtu = ETH_DATA_LEN; 1154 int mtu = ETH_DATA_LEN;
1158 int addend = sizeof(struct iphdr) + 4; 1155 int addend = sizeof(struct iphdr) + 4;
1159 1156
1160 tunnel = (struct ip_tunnel*)dev->priv; 1157 tunnel = netdev_priv(dev);
1161 iph = &tunnel->parms.iph; 1158 iph = &tunnel->parms.iph;
1162 1159
1163 tunnel->dev = dev; 1160 tunnel->dev = dev;
@@ -1221,7 +1218,7 @@ static int ipgre_tunnel_init(struct net_device *dev)
1221 1218
1222static int __init ipgre_fb_tunnel_init(struct net_device *dev) 1219static int __init ipgre_fb_tunnel_init(struct net_device *dev)
1223{ 1220{
1224 struct ip_tunnel *tunnel = (struct ip_tunnel*)dev->priv; 1221 struct ip_tunnel *tunnel = netdev_priv(dev);
1225 struct iphdr *iph = &tunnel->parms.iph; 1222 struct iphdr *iph = &tunnel->parms.iph;
1226 1223
1227 tunnel->dev = dev; 1224 tunnel->dev = dev;
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index c2169b47ddfd..3324fbfe528a 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -69,6 +69,7 @@
69#include <net/ip.h> 69#include <net/ip.h>
70#include <net/protocol.h> 70#include <net/protocol.h>
71#include <net/route.h> 71#include <net/route.h>
72#include <net/xfrm.h>
72#include <linux/skbuff.h> 73#include <linux/skbuff.h>
73#include <net/sock.h> 74#include <net/sock.h>
74#include <net/arp.h> 75#include <net/arp.h>
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index bbd85f5ec985..bc5ca23b2646 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -244,7 +244,7 @@ static struct ip_tunnel * ipip_tunnel_locate(struct ip_tunnel_parm *parms, int c
244 if (dev == NULL) 244 if (dev == NULL)
245 return NULL; 245 return NULL;
246 246
247 nt = dev->priv; 247 nt = netdev_priv(dev);
248 SET_MODULE_OWNER(dev); 248 SET_MODULE_OWNER(dev);
249 dev->init = ipip_tunnel_init; 249 dev->init = ipip_tunnel_init;
250 nt->parms = *parms; 250 nt->parms = *parms;
@@ -269,7 +269,7 @@ static void ipip_tunnel_uninit(struct net_device *dev)
269 tunnels_wc[0] = NULL; 269 tunnels_wc[0] = NULL;
270 write_unlock_bh(&ipip_lock); 270 write_unlock_bh(&ipip_lock);
271 } else 271 } else
272 ipip_tunnel_unlink((struct ip_tunnel*)dev->priv); 272 ipip_tunnel_unlink(netdev_priv(dev));
273 dev_put(dev); 273 dev_put(dev);
274} 274}
275 275
@@ -443,7 +443,7 @@ out:
443 skb2->dst->ops->update_pmtu(skb2->dst, rel_info); 443 skb2->dst->ops->update_pmtu(skb2->dst, rel_info);
444 rel_info = htonl(rel_info); 444 rel_info = htonl(rel_info);
445 } else if (type == ICMP_TIME_EXCEEDED) { 445 } else if (type == ICMP_TIME_EXCEEDED) {
446 struct ip_tunnel *t = (struct ip_tunnel*)skb2->dev->priv; 446 struct ip_tunnel *t = netdev_priv(skb2->dev);
447 if (t->parms.iph.ttl) { 447 if (t->parms.iph.ttl) {
448 rel_type = ICMP_DEST_UNREACH; 448 rel_type = ICMP_DEST_UNREACH;
449 rel_code = ICMP_HOST_UNREACH; 449 rel_code = ICMP_HOST_UNREACH;
@@ -514,7 +514,7 @@ out:
514 514
515static int ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) 515static int ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
516{ 516{
517 struct ip_tunnel *tunnel = (struct ip_tunnel*)dev->priv; 517 struct ip_tunnel *tunnel = netdev_priv(dev);
518 struct net_device_stats *stats = &tunnel->stat; 518 struct net_device_stats *stats = &tunnel->stat;
519 struct iphdr *tiph = &tunnel->parms.iph; 519 struct iphdr *tiph = &tunnel->parms.iph;
520 u8 tos = tunnel->parms.iph.tos; 520 u8 tos = tunnel->parms.iph.tos;
@@ -674,7 +674,7 @@ ipip_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
674 t = ipip_tunnel_locate(&p, 0); 674 t = ipip_tunnel_locate(&p, 0);
675 } 675 }
676 if (t == NULL) 676 if (t == NULL)
677 t = (struct ip_tunnel*)dev->priv; 677 t = netdev_priv(dev);
678 memcpy(&p, &t->parms, sizeof(p)); 678 memcpy(&p, &t->parms, sizeof(p));
679 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p))) 679 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p)))
680 err = -EFAULT; 680 err = -EFAULT;
@@ -711,7 +711,7 @@ ipip_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
711 err = -EINVAL; 711 err = -EINVAL;
712 break; 712 break;
713 } 713 }
714 t = (struct ip_tunnel*)dev->priv; 714 t = netdev_priv(dev);
715 ipip_tunnel_unlink(t); 715 ipip_tunnel_unlink(t);
716 t->parms.iph.saddr = p.iph.saddr; 716 t->parms.iph.saddr = p.iph.saddr;
717 t->parms.iph.daddr = p.iph.daddr; 717 t->parms.iph.daddr = p.iph.daddr;
@@ -765,7 +765,7 @@ done:
765 765
766static struct net_device_stats *ipip_tunnel_get_stats(struct net_device *dev) 766static struct net_device_stats *ipip_tunnel_get_stats(struct net_device *dev)
767{ 767{
768 return &(((struct ip_tunnel*)dev->priv)->stat); 768 return &(((struct ip_tunnel*)netdev_priv(dev))->stat);
769} 769}
770 770
771static int ipip_tunnel_change_mtu(struct net_device *dev, int new_mtu) 771static 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)
800 struct ip_tunnel *tunnel; 800 struct ip_tunnel *tunnel;
801 struct iphdr *iph; 801 struct iphdr *iph;
802 802
803 tunnel = (struct ip_tunnel*)dev->priv; 803 tunnel = netdev_priv(dev);
804 iph = &tunnel->parms.iph; 804 iph = &tunnel->parms.iph;
805 805
806 tunnel->dev = dev; 806 tunnel->dev = dev;
@@ -838,7 +838,7 @@ static int ipip_tunnel_init(struct net_device *dev)
838 838
839static int __init ipip_fb_tunnel_init(struct net_device *dev) 839static int __init ipip_fb_tunnel_init(struct net_device *dev)
840{ 840{
841 struct ip_tunnel *tunnel = dev->priv; 841 struct ip_tunnel *tunnel = netdev_priv(dev);
842 struct iphdr *iph = &tunnel->parms.iph; 842 struct iphdr *iph = &tunnel->parms.iph;
843 843
844 tunnel->dev = dev; 844 tunnel->dev = dev;
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 9a5c0ce7ff35..f58ac9854c3f 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -178,8 +178,8 @@ static int reg_vif_num = -1;
178static int reg_vif_xmit(struct sk_buff *skb, struct net_device *dev) 178static int reg_vif_xmit(struct sk_buff *skb, struct net_device *dev)
179{ 179{
180 read_lock(&mrt_lock); 180 read_lock(&mrt_lock);
181 ((struct net_device_stats*)dev->priv)->tx_bytes += skb->len; 181 ((struct net_device_stats*)netdev_priv(dev))->tx_bytes += skb->len;
182 ((struct net_device_stats*)dev->priv)->tx_packets++; 182 ((struct net_device_stats*)netdev_priv(dev))->tx_packets++;
183 ipmr_cache_report(skb, reg_vif_num, IGMPMSG_WHOLEPKT); 183 ipmr_cache_report(skb, reg_vif_num, IGMPMSG_WHOLEPKT);
184 read_unlock(&mrt_lock); 184 read_unlock(&mrt_lock);
185 kfree_skb(skb); 185 kfree_skb(skb);
@@ -188,7 +188,7 @@ static int reg_vif_xmit(struct sk_buff *skb, struct net_device *dev)
188 188
189static struct net_device_stats *reg_vif_get_stats(struct net_device *dev) 189static struct net_device_stats *reg_vif_get_stats(struct net_device *dev)
190{ 190{
191 return (struct net_device_stats*)dev->priv; 191 return (struct net_device_stats*)netdev_priv(dev);
192} 192}
193 193
194static void reg_vif_setup(struct net_device *dev) 194static 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)
1149 if (vif->flags & VIFF_REGISTER) { 1149 if (vif->flags & VIFF_REGISTER) {
1150 vif->pkt_out++; 1150 vif->pkt_out++;
1151 vif->bytes_out+=skb->len; 1151 vif->bytes_out+=skb->len;
1152 ((struct net_device_stats*)vif->dev->priv)->tx_bytes += skb->len; 1152 ((struct net_device_stats*)netdev_priv(vif->dev))->tx_bytes += skb->len;
1153 ((struct net_device_stats*)vif->dev->priv)->tx_packets++; 1153 ((struct net_device_stats*)netdev_priv(vif->dev))->tx_packets++;
1154 ipmr_cache_report(skb, vifi, IGMPMSG_WHOLEPKT); 1154 ipmr_cache_report(skb, vifi, IGMPMSG_WHOLEPKT);
1155 kfree_skb(skb); 1155 kfree_skb(skb);
1156 return; 1156 return;
@@ -1210,8 +1210,8 @@ static void ipmr_queue_xmit(struct sk_buff *skb, struct mfc_cache *c, int vifi)
1210 if (vif->flags & VIFF_TUNNEL) { 1210 if (vif->flags & VIFF_TUNNEL) {
1211 ip_encap(skb, vif->local, vif->remote); 1211 ip_encap(skb, vif->local, vif->remote);
1212 /* FIXME: extra output firewall step used to be here. --RR */ 1212 /* FIXME: extra output firewall step used to be here. --RR */
1213 ((struct ip_tunnel *)vif->dev->priv)->stat.tx_packets++; 1213 ((struct ip_tunnel *)netdev_priv(vif->dev))->stat.tx_packets++;
1214 ((struct ip_tunnel *)vif->dev->priv)->stat.tx_bytes+=skb->len; 1214 ((struct ip_tunnel *)netdev_priv(vif->dev))->stat.tx_bytes+=skb->len;
1215 } 1215 }
1216 1216
1217 IPCB(skb)->flags |= IPSKB_FORWARDED; 1217 IPCB(skb)->flags |= IPSKB_FORWARDED;
@@ -1467,8 +1467,8 @@ int pim_rcv_v1(struct sk_buff * skb)
1467 skb->pkt_type = PACKET_HOST; 1467 skb->pkt_type = PACKET_HOST;
1468 dst_release(skb->dst); 1468 dst_release(skb->dst);
1469 skb->dst = NULL; 1469 skb->dst = NULL;
1470 ((struct net_device_stats*)reg_dev->priv)->rx_bytes += skb->len; 1470 ((struct net_device_stats*)netdev_priv(reg_dev))->rx_bytes += skb->len;
1471 ((struct net_device_stats*)reg_dev->priv)->rx_packets++; 1471 ((struct net_device_stats*)netdev_priv(reg_dev))->rx_packets++;
1472 nf_reset(skb); 1472 nf_reset(skb);
1473 netif_rx(skb); 1473 netif_rx(skb);
1474 dev_put(reg_dev); 1474 dev_put(reg_dev);
@@ -1522,8 +1522,8 @@ static int pim_rcv(struct sk_buff * skb)
1522 skb->ip_summed = 0; 1522 skb->ip_summed = 0;
1523 skb->pkt_type = PACKET_HOST; 1523 skb->pkt_type = PACKET_HOST;
1524 dst_release(skb->dst); 1524 dst_release(skb->dst);
1525 ((struct net_device_stats*)reg_dev->priv)->rx_bytes += skb->len; 1525 ((struct net_device_stats*)netdev_priv(reg_dev))->rx_bytes += skb->len;
1526 ((struct net_device_stats*)reg_dev->priv)->rx_packets++; 1526 ((struct net_device_stats*)netdev_priv(reg_dev))->rx_packets++;
1527 skb->dst = NULL; 1527 skb->dst = NULL;
1528 nf_reset(skb); 1528 nf_reset(skb);
1529 netif_rx(skb); 1529 netif_rx(skb);
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 0a461232329f..a97ed5416c28 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3347,7 +3347,7 @@ tcp_collapse(struct sock *sk, struct sk_buff_head *list,
3347 int offset = start - TCP_SKB_CB(skb)->seq; 3347 int offset = start - TCP_SKB_CB(skb)->seq;
3348 int size = TCP_SKB_CB(skb)->end_seq - start; 3348 int size = TCP_SKB_CB(skb)->end_seq - start;
3349 3349
3350 if (offset < 0) BUG(); 3350 BUG_ON(offset < 0);
3351 if (size > 0) { 3351 if (size > 0) {
3352 size = min(copy, size); 3352 size = min(copy, size);
3353 if (skb_copy_bits(skb, offset, skb_put(nskb, size), size)) 3353 if (skb_copy_bits(skb, offset, skb_put(nskb, size), size))
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index b4c4beba0ede..efa3e72cfcfa 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -226,6 +226,8 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
226 ipv6_addr_copy(&hdr->saddr, &fl->fl6_src); 226 ipv6_addr_copy(&hdr->saddr, &fl->fl6_src);
227 ipv6_addr_copy(&hdr->daddr, first_hop); 227 ipv6_addr_copy(&hdr->daddr, first_hop);
228 228
229 skb->priority = sk->sk_priority;
230
229 mtu = dst_mtu(dst); 231 mtu = dst_mtu(dst);
230 if ((skb->len <= mtu) || ipfragok) { 232 if ((skb->len <= mtu) || ipfragok) {
231 IP6_INC_STATS(IPSTATS_MIB_OUTREQUESTS); 233 IP6_INC_STATS(IPSTATS_MIB_OUTREQUESTS);
@@ -1182,6 +1184,8 @@ int ip6_push_pending_frames(struct sock *sk)
1182 ipv6_addr_copy(&hdr->saddr, &fl->fl6_src); 1184 ipv6_addr_copy(&hdr->saddr, &fl->fl6_src);
1183 ipv6_addr_copy(&hdr->daddr, final_dst); 1185 ipv6_addr_copy(&hdr->daddr, final_dst);
1184 1186
1187 skb->priority = sk->sk_priority;
1188
1185 skb->dst = dst_clone(&rt->u.dst); 1189 skb->dst = dst_clone(&rt->u.dst);
1186 IP6_INC_STATS(IPSTATS_MIB_OUTREQUESTS); 1190 IP6_INC_STATS(IPSTATS_MIB_OUTREQUESTS);
1187 err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, skb->dst->dev, dst_output); 1191 err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, skb->dst->dev, dst_output);
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index f079621c8b67..c3c2bf699a67 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -243,7 +243,7 @@ ip6_tnl_create(struct ip6_tnl_parm *p, struct ip6_tnl **pt)
243 if (dev == NULL) 243 if (dev == NULL)
244 return -ENOMEM; 244 return -ENOMEM;
245 245
246 t = dev->priv; 246 t = netdev_priv(dev);
247 dev->init = ip6ip6_tnl_dev_init; 247 dev->init = ip6ip6_tnl_dev_init;
248 t->parms = *p; 248 t->parms = *p;
249 249
@@ -308,7 +308,7 @@ ip6ip6_tnl_locate(struct ip6_tnl_parm *p, struct ip6_tnl **pt, int create)
308static void 308static void
309ip6ip6_tnl_dev_uninit(struct net_device *dev) 309ip6ip6_tnl_dev_uninit(struct net_device *dev)
310{ 310{
311 struct ip6_tnl *t = dev->priv; 311 struct ip6_tnl *t = netdev_priv(dev);
312 312
313 if (dev == ip6ip6_fb_tnl_dev) { 313 if (dev == ip6ip6_fb_tnl_dev) {
314 write_lock_bh(&ip6ip6_lock); 314 write_lock_bh(&ip6ip6_lock);
@@ -623,7 +623,7 @@ ip6ip6_tnl_addr_conflict(struct ip6_tnl *t, struct ipv6hdr *hdr)
623static int 623static int
624ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev) 624ip6ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev)
625{ 625{
626 struct ip6_tnl *t = (struct ip6_tnl *) dev->priv; 626 struct ip6_tnl *t = netdev_priv(dev);
627 struct net_device_stats *stats = &t->stat; 627 struct net_device_stats *stats = &t->stat;
628 struct ipv6hdr *ipv6h = skb->nh.ipv6h; 628 struct ipv6hdr *ipv6h = skb->nh.ipv6h;
629 struct ipv6_txoptions *opt = NULL; 629 struct ipv6_txoptions *opt = NULL;
@@ -933,11 +933,11 @@ ip6ip6_tnl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
933 break; 933 break;
934 } 934 }
935 if ((err = ip6ip6_tnl_locate(&p, &t, 0)) == -ENODEV) 935 if ((err = ip6ip6_tnl_locate(&p, &t, 0)) == -ENODEV)
936 t = (struct ip6_tnl *) dev->priv; 936 t = netdev_priv(dev);
937 else if (err) 937 else if (err)
938 break; 938 break;
939 } else 939 } else
940 t = (struct ip6_tnl *) dev->priv; 940 t = netdev_priv(dev);
941 941
942 memcpy(&p, &t->parms, sizeof (p)); 942 memcpy(&p, &t->parms, sizeof (p));
943 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof (p))) { 943 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)
955 break; 955 break;
956 } 956 }
957 if (!create && dev != ip6ip6_fb_tnl_dev) { 957 if (!create && dev != ip6ip6_fb_tnl_dev) {
958 t = (struct ip6_tnl *) dev->priv; 958 t = netdev_priv(dev);
959 } 959 }
960 if (!t && (err = ip6ip6_tnl_locate(&p, &t, create))) { 960 if (!t && (err = ip6ip6_tnl_locate(&p, &t, create))) {
961 break; 961 break;
@@ -991,12 +991,12 @@ ip6ip6_tnl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
991 err = ip6ip6_tnl_locate(&p, &t, 0); 991 err = ip6ip6_tnl_locate(&p, &t, 0);
992 if (err) 992 if (err)
993 break; 993 break;
994 if (t == ip6ip6_fb_tnl_dev->priv) { 994 if (t == netdev_priv(ip6ip6_fb_tnl_dev)) {
995 err = -EPERM; 995 err = -EPERM;
996 break; 996 break;
997 } 997 }
998 } else { 998 } else {
999 t = (struct ip6_tnl *) dev->priv; 999 t = netdev_priv(dev);
1000 } 1000 }
1001 err = unregister_netdevice(t->dev); 1001 err = unregister_netdevice(t->dev);
1002 break; 1002 break;
@@ -1016,7 +1016,7 @@ ip6ip6_tnl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
1016static struct net_device_stats * 1016static struct net_device_stats *
1017ip6ip6_tnl_get_stats(struct net_device *dev) 1017ip6ip6_tnl_get_stats(struct net_device *dev)
1018{ 1018{
1019 return &(((struct ip6_tnl *) dev->priv)->stat); 1019 return &(((struct ip6_tnl *)netdev_priv(dev))->stat);
1020} 1020}
1021 1021
1022/** 1022/**
@@ -1073,7 +1073,7 @@ static void ip6ip6_tnl_dev_setup(struct net_device *dev)
1073static inline void 1073static inline void
1074ip6ip6_tnl_dev_init_gen(struct net_device *dev) 1074ip6ip6_tnl_dev_init_gen(struct net_device *dev)
1075{ 1075{
1076 struct ip6_tnl *t = (struct ip6_tnl *) dev->priv; 1076 struct ip6_tnl *t = netdev_priv(dev);
1077 t->fl.proto = IPPROTO_IPV6; 1077 t->fl.proto = IPPROTO_IPV6;
1078 t->dev = dev; 1078 t->dev = dev;
1079 strcpy(t->parms.name, dev->name); 1079 strcpy(t->parms.name, dev->name);
@@ -1087,7 +1087,7 @@ ip6ip6_tnl_dev_init_gen(struct net_device *dev)
1087static int 1087static int
1088ip6ip6_tnl_dev_init(struct net_device *dev) 1088ip6ip6_tnl_dev_init(struct net_device *dev)
1089{ 1089{
1090 struct ip6_tnl *t = (struct ip6_tnl *) dev->priv; 1090 struct ip6_tnl *t = netdev_priv(dev);
1091 ip6ip6_tnl_dev_init_gen(dev); 1091 ip6ip6_tnl_dev_init_gen(dev);
1092 ip6ip6_tnl_link_config(t); 1092 ip6ip6_tnl_link_config(t);
1093 return 0; 1093 return 0;
@@ -1103,7 +1103,7 @@ ip6ip6_tnl_dev_init(struct net_device *dev)
1103static int 1103static int
1104ip6ip6_fb_tnl_dev_init(struct net_device *dev) 1104ip6ip6_fb_tnl_dev_init(struct net_device *dev)
1105{ 1105{
1106 struct ip6_tnl *t = dev->priv; 1106 struct ip6_tnl *t = netdev_priv(dev);
1107 ip6ip6_tnl_dev_init_gen(dev); 1107 ip6ip6_tnl_dev_init_gen(dev);
1108 dev_hold(dev); 1108 dev_hold(dev);
1109 tnls_wc[0] = t; 1109 tnls_wc[0] = t;
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 02872ae8a439..0dae48aa1cec 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -184,7 +184,7 @@ static struct ip_tunnel * ipip6_tunnel_locate(struct ip_tunnel_parm *parms, int
184 if (dev == NULL) 184 if (dev == NULL)
185 return NULL; 185 return NULL;
186 186
187 nt = dev->priv; 187 nt = netdev_priv(dev);
188 dev->init = ipip6_tunnel_init; 188 dev->init = ipip6_tunnel_init;
189 nt->parms = *parms; 189 nt->parms = *parms;
190 190
@@ -210,7 +210,7 @@ static void ipip6_tunnel_uninit(struct net_device *dev)
210 write_unlock_bh(&ipip6_lock); 210 write_unlock_bh(&ipip6_lock);
211 dev_put(dev); 211 dev_put(dev);
212 } else { 212 } else {
213 ipip6_tunnel_unlink((struct ip_tunnel*)dev->priv); 213 ipip6_tunnel_unlink(netdev_priv(dev));
214 dev_put(dev); 214 dev_put(dev);
215 } 215 }
216} 216}
@@ -346,7 +346,7 @@ out:
346 rt6i = rt6_lookup(&iph6->daddr, &iph6->saddr, NULL, 0); 346 rt6i = rt6_lookup(&iph6->daddr, &iph6->saddr, NULL, 0);
347 347
348 if (rt6i && rt6i->rt6i_dev && rt6i->rt6i_dev->type == ARPHRD_SIT) { 348 if (rt6i && rt6i->rt6i_dev && rt6i->rt6i_dev->type == ARPHRD_SIT) {
349 struct ip_tunnel * t = (struct ip_tunnel*)rt6i->rt6i_dev->priv; 349 struct ip_tunnel *t = netdev_priv(rt6i->rt6i_dev);
350 if (rel_type == ICMPV6_TIME_EXCEED && t->parms.iph.ttl) { 350 if (rel_type == ICMPV6_TIME_EXCEED && t->parms.iph.ttl) {
351 rel_type = ICMPV6_DEST_UNREACH; 351 rel_type = ICMPV6_DEST_UNREACH;
352 rel_code = ICMPV6_ADDR_UNREACH; 352 rel_code = ICMPV6_ADDR_UNREACH;
@@ -424,7 +424,7 @@ static inline u32 try_6to4(struct in6_addr *v6dst)
424 424
425static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) 425static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
426{ 426{
427 struct ip_tunnel *tunnel = (struct ip_tunnel*)dev->priv; 427 struct ip_tunnel *tunnel = netdev_priv(dev);
428 struct net_device_stats *stats = &tunnel->stat; 428 struct net_device_stats *stats = &tunnel->stat;
429 struct iphdr *tiph = &tunnel->parms.iph; 429 struct iphdr *tiph = &tunnel->parms.iph;
430 struct ipv6hdr *iph6 = skb->nh.ipv6h; 430 struct ipv6hdr *iph6 = skb->nh.ipv6h;
@@ -610,7 +610,7 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
610 t = ipip6_tunnel_locate(&p, 0); 610 t = ipip6_tunnel_locate(&p, 0);
611 } 611 }
612 if (t == NULL) 612 if (t == NULL)
613 t = (struct ip_tunnel*)dev->priv; 613 t = netdev_priv(dev);
614 memcpy(&p, &t->parms, sizeof(p)); 614 memcpy(&p, &t->parms, sizeof(p));
615 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p))) 615 if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p)))
616 err = -EFAULT; 616 err = -EFAULT;
@@ -647,7 +647,7 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
647 err = -EINVAL; 647 err = -EINVAL;
648 break; 648 break;
649 } 649 }
650 t = (struct ip_tunnel*)dev->priv; 650 t = netdev_priv(dev);
651 ipip6_tunnel_unlink(t); 651 ipip6_tunnel_unlink(t);
652 t->parms.iph.saddr = p.iph.saddr; 652 t->parms.iph.saddr = p.iph.saddr;
653 t->parms.iph.daddr = p.iph.daddr; 653 t->parms.iph.daddr = p.iph.daddr;
@@ -683,7 +683,7 @@ ipip6_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
683 if ((t = ipip6_tunnel_locate(&p, 0)) == NULL) 683 if ((t = ipip6_tunnel_locate(&p, 0)) == NULL)
684 goto done; 684 goto done;
685 err = -EPERM; 685 err = -EPERM;
686 if (t == ipip6_fb_tunnel_dev->priv) 686 if (t == netdev_priv(ipip6_fb_tunnel_dev))
687 goto done; 687 goto done;
688 dev = t->dev; 688 dev = t->dev;
689 } 689 }
@@ -700,7 +700,7 @@ done:
700 700
701static struct net_device_stats *ipip6_tunnel_get_stats(struct net_device *dev) 701static struct net_device_stats *ipip6_tunnel_get_stats(struct net_device *dev)
702{ 702{
703 return &(((struct ip_tunnel*)dev->priv)->stat); 703 return &(((struct ip_tunnel*)netdev_priv(dev))->stat);
704} 704}
705 705
706static int ipip6_tunnel_change_mtu(struct net_device *dev, int new_mtu) 706static 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)
735 struct ip_tunnel *tunnel; 735 struct ip_tunnel *tunnel;
736 struct iphdr *iph; 736 struct iphdr *iph;
737 737
738 tunnel = (struct ip_tunnel*)dev->priv; 738 tunnel = netdev_priv(dev);
739 iph = &tunnel->parms.iph; 739 iph = &tunnel->parms.iph;
740 740
741 tunnel->dev = dev; 741 tunnel->dev = dev;
@@ -775,7 +775,7 @@ static int ipip6_tunnel_init(struct net_device *dev)
775 775
776static int __init ipip6_fb_tunnel_init(struct net_device *dev) 776static int __init ipip6_fb_tunnel_init(struct net_device *dev)
777{ 777{
778 struct ip_tunnel *tunnel = dev->priv; 778 struct ip_tunnel *tunnel = netdev_priv(dev);
779 struct iphdr *iph = &tunnel->parms.iph; 779 struct iphdr *iph = &tunnel->parms.iph;
780 780
781 tunnel->dev = dev; 781 tunnel->dev = dev;
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 52efd04cbedb..4c2f6d694f88 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -297,8 +297,7 @@ static int pfkey_error(struct sadb_msg *orig, int err, struct sock *sk)
297 err = EINTR; 297 err = EINTR;
298 if (err >= 512) 298 if (err >= 512)
299 err = EINVAL; 299 err = EINVAL;
300 if (err <= 0 || err >= 256) 300 BUG_ON(err <= 0 || err >= 256);
301 BUG();
302 301
303 hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); 302 hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg));
304 pfkey_hdr_dup(hdr, orig); 303 pfkey_hdr_dup(hdr, orig);
diff --git a/net/sched/Makefile b/net/sched/Makefile
index e48d0d456b3e..0f06aec66094 100644
--- a/net/sched/Makefile
+++ b/net/sched/Makefile
@@ -7,13 +7,13 @@ obj-y := sch_generic.o
7obj-$(CONFIG_NET_SCHED) += sch_api.o sch_fifo.o sch_blackhole.o 7obj-$(CONFIG_NET_SCHED) += sch_api.o sch_fifo.o sch_blackhole.o
8obj-$(CONFIG_NET_CLS) += cls_api.o 8obj-$(CONFIG_NET_CLS) += cls_api.o
9obj-$(CONFIG_NET_CLS_ACT) += act_api.o 9obj-$(CONFIG_NET_CLS_ACT) += act_api.o
10obj-$(CONFIG_NET_ACT_POLICE) += police.o 10obj-$(CONFIG_NET_ACT_POLICE) += act_police.o
11obj-$(CONFIG_NET_CLS_POLICE) += police.o 11obj-$(CONFIG_NET_CLS_POLICE) += act_police.o
12obj-$(CONFIG_NET_ACT_GACT) += gact.o 12obj-$(CONFIG_NET_ACT_GACT) += act_gact.o
13obj-$(CONFIG_NET_ACT_MIRRED) += mirred.o 13obj-$(CONFIG_NET_ACT_MIRRED) += act_mirred.o
14obj-$(CONFIG_NET_ACT_IPT) += ipt.o 14obj-$(CONFIG_NET_ACT_IPT) += act_ipt.o
15obj-$(CONFIG_NET_ACT_PEDIT) += pedit.o 15obj-$(CONFIG_NET_ACT_PEDIT) += act_pedit.o
16obj-$(CONFIG_NET_ACT_SIMP) += simple.o 16obj-$(CONFIG_NET_ACT_SIMP) += act_simple.o
17obj-$(CONFIG_NET_SCH_CBQ) += sch_cbq.o 17obj-$(CONFIG_NET_SCH_CBQ) += sch_cbq.o
18obj-$(CONFIG_NET_SCH_HTB) += sch_htb.o 18obj-$(CONFIG_NET_SCH_HTB) += sch_htb.o
19obj-$(CONFIG_NET_SCH_HPFQ) += sch_hpfq.o 19obj-$(CONFIG_NET_SCH_HPFQ) += sch_hpfq.o
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 2ce1cb2aa2ed..792ce59940ec 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -165,7 +165,7 @@ int tcf_action_exec(struct sk_buff *skb, struct tc_action *act,
165 while ((a = act) != NULL) { 165 while ((a = act) != NULL) {
166repeat: 166repeat:
167 if (a->ops && a->ops->act) { 167 if (a->ops && a->ops->act) {
168 ret = a->ops->act(&skb, a, res); 168 ret = a->ops->act(skb, a, res);
169 if (TC_MUNGED & skb->tc_verd) { 169 if (TC_MUNGED & skb->tc_verd) {
170 /* copied already, allow trampling */ 170 /* copied already, allow trampling */
171 skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd); 171 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,
290 if (a_o == NULL) { 290 if (a_o == NULL) {
291#ifdef CONFIG_KMOD 291#ifdef CONFIG_KMOD
292 rtnl_unlock(); 292 rtnl_unlock();
293 request_module(act_name); 293 request_module("act_%s", act_name);
294 rtnl_lock(); 294 rtnl_lock();
295 295
296 a_o = tc_lookup_action_n(act_name); 296 a_o = tc_lookup_action_n(act_name);
diff --git a/net/sched/gact.c b/net/sched/act_gact.c
index d1c6d542912a..a1e68f78dcc2 100644
--- a/net/sched/gact.c
+++ b/net/sched/act_gact.c
@@ -135,10 +135,9 @@ tcf_gact_cleanup(struct tc_action *a, int bind)
135} 135}
136 136
137static int 137static int
138tcf_gact(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) 138tcf_gact(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res)
139{ 139{
140 struct tcf_gact *p = PRIV(a, gact); 140 struct tcf_gact *p = PRIV(a, gact);
141 struct sk_buff *skb = *pskb;
142 int action = TC_ACT_SHOT; 141 int action = TC_ACT_SHOT;
143 142
144 spin_lock(&p->lock); 143 spin_lock(&p->lock);
diff --git a/net/sched/ipt.c b/net/sched/act_ipt.c
index f50136eed211..b5001939b74b 100644
--- a/net/sched/ipt.c
+++ b/net/sched/act_ipt.c
@@ -201,11 +201,10 @@ tcf_ipt_cleanup(struct tc_action *a, int bind)
201} 201}
202 202
203static int 203static int
204tcf_ipt(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) 204tcf_ipt(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res)
205{ 205{
206 int ret = 0, result = 0; 206 int ret = 0, result = 0;
207 struct tcf_ipt *p = PRIV(a, ipt); 207 struct tcf_ipt *p = PRIV(a, ipt);
208 struct sk_buff *skb = *pskb;
209 208
210 if (skb_cloned(skb)) { 209 if (skb_cloned(skb)) {
211 if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) 210 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)
222 worry later - danger - this API seems to have changed 221 worry later - danger - this API seems to have changed
223 from earlier kernels */ 222 from earlier kernels */
224 223
224 /* iptables targets take a double skb pointer in case the skb
225 * needs to be replaced. We don't own the skb, so this must not
226 * happen. The pskb_expand_head above should make sure of this */
225 ret = p->t->u.kernel.target->target(&skb, skb->dev, NULL, 227 ret = p->t->u.kernel.target->target(&skb, skb->dev, NULL,
226 p->hook, p->t->data, NULL); 228 p->hook, p->t->data, NULL);
227 switch (ret) { 229 switch (ret) {
diff --git a/net/sched/mirred.c b/net/sched/act_mirred.c
index 20d06916dc0b..4fcccbd50885 100644
--- a/net/sched/mirred.c
+++ b/net/sched/act_mirred.c
@@ -158,12 +158,11 @@ tcf_mirred_cleanup(struct tc_action *a, int bind)
158} 158}
159 159
160static int 160static int
161tcf_mirred(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) 161tcf_mirred(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res)
162{ 162{
163 struct tcf_mirred *p = PRIV(a, mirred); 163 struct tcf_mirred *p = PRIV(a, mirred);
164 struct net_device *dev; 164 struct net_device *dev;
165 struct sk_buff *skb2 = NULL; 165 struct sk_buff *skb2 = NULL;
166 struct sk_buff *skb = *pskb;
167 u32 at = G_TC_AT(skb->tc_verd); 166 u32 at = G_TC_AT(skb->tc_verd);
168 167
169 spin_lock(&p->lock); 168 spin_lock(&p->lock);
diff --git a/net/sched/pedit.c b/net/sched/act_pedit.c
index 767d24f4610e..1742a68e0122 100644
--- a/net/sched/pedit.c
+++ b/net/sched/act_pedit.c
@@ -130,10 +130,9 @@ tcf_pedit_cleanup(struct tc_action *a, int bind)
130} 130}
131 131
132static int 132static int
133tcf_pedit(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) 133tcf_pedit(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res)
134{ 134{
135 struct tcf_pedit *p = PRIV(a, pedit); 135 struct tcf_pedit *p = PRIV(a, pedit);
136 struct sk_buff *skb = *pskb;
137 int i, munged = 0; 136 int i, munged = 0;
138 u8 *pptr; 137 u8 *pptr;
139 138
@@ -246,10 +245,12 @@ tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a,int bind, int ref)
246 t.lastuse = jiffies_to_clock_t(jiffies - p->tm.lastuse); 245 t.lastuse = jiffies_to_clock_t(jiffies - p->tm.lastuse);
247 t.expires = jiffies_to_clock_t(p->tm.expires); 246 t.expires = jiffies_to_clock_t(p->tm.expires);
248 RTA_PUT(skb, TCA_PEDIT_TM, sizeof(t), &t); 247 RTA_PUT(skb, TCA_PEDIT_TM, sizeof(t), &t);
248 kfree(opt);
249 return skb->len; 249 return skb->len;
250 250
251rtattr_failure: 251rtattr_failure:
252 skb_trim(skb, b - skb->data); 252 skb_trim(skb, b - skb->data);
253 kfree(opt);
253 return -1; 254 return -1;
254} 255}
255 256
diff --git a/net/sched/police.c b/net/sched/act_police.c
index eb39fb2f39b6..fa877f8f652c 100644
--- a/net/sched/police.c
+++ b/net/sched/act_police.c
@@ -284,11 +284,10 @@ static int tcf_act_police_cleanup(struct tc_action *a, int bind)
284 return 0; 284 return 0;
285} 285}
286 286
287static int tcf_act_police(struct sk_buff **pskb, struct tc_action *a, 287static int tcf_act_police(struct sk_buff *skb, struct tc_action *a,
288 struct tcf_result *res) 288 struct tcf_result *res)
289{ 289{
290 psched_time_t now; 290 psched_time_t now;
291 struct sk_buff *skb = *pskb;
292 struct tcf_police *p = PRIV(a); 291 struct tcf_police *p = PRIV(a);
293 long toks; 292 long toks;
294 long ptoks = 0; 293 long ptoks = 0;
@@ -408,7 +407,7 @@ police_cleanup_module(void)
408module_init(police_init_module); 407module_init(police_init_module);
409module_exit(police_cleanup_module); 408module_exit(police_cleanup_module);
410 409
411#endif 410#else /* CONFIG_NET_CLS_ACT */
412 411
413struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est) 412struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est)
414{ 413{
@@ -545,6 +544,7 @@ int tcf_police(struct sk_buff *skb, struct tcf_police *p)
545 spin_unlock(&p->lock); 544 spin_unlock(&p->lock);
546 return p->action; 545 return p->action;
547} 546}
547EXPORT_SYMBOL(tcf_police);
548 548
549int tcf_police_dump(struct sk_buff *skb, struct tcf_police *p) 549int tcf_police_dump(struct sk_buff *skb, struct tcf_police *p)
550{ 550{
@@ -601,13 +601,4 @@ errout:
601 return -1; 601 return -1;
602} 602}
603 603
604 604#endif /* CONFIG_NET_CLS_ACT */
605EXPORT_SYMBOL(tcf_police);
606EXPORT_SYMBOL(tcf_police_destroy);
607EXPORT_SYMBOL(tcf_police_dump);
608EXPORT_SYMBOL(tcf_police_dump_stats);
609EXPORT_SYMBOL(tcf_police_hash);
610EXPORT_SYMBOL(tcf_police_ht);
611EXPORT_SYMBOL(tcf_police_locate);
612EXPORT_SYMBOL(tcf_police_lookup);
613EXPORT_SYMBOL(tcf_police_new_index);
diff --git a/net/sched/simple.c b/net/sched/act_simple.c
index 8a6ae4f491e8..e5f2e1f431e2 100644
--- a/net/sched/simple.c
+++ b/net/sched/act_simple.c
@@ -44,9 +44,8 @@ static DEFINE_RWLOCK(simp_lock);
44#include <net/pkt_act.h> 44#include <net/pkt_act.h>
45#include <net/act_generic.h> 45#include <net/act_generic.h>
46 46
47static int tcf_simp(struct sk_buff **pskb, struct tc_action *a, struct tcf_result *res) 47static int tcf_simp(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res)
48{ 48{
49 struct sk_buff *skb = *pskb;
50 struct tcf_defact *p = PRIV(a, defact); 49 struct tcf_defact *p = PRIV(a, defact);
51 50
52 spin_lock(&p->lock); 51 spin_lock(&p->lock);
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 09453f997d8c..6cd81708bf71 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -257,7 +257,7 @@ cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
257 (cl = cbq_class_lookup(q, prio)) != NULL) 257 (cl = cbq_class_lookup(q, prio)) != NULL)
258 return cl; 258 return cl;
259 259
260 *qerr = NET_XMIT_DROP; 260 *qerr = NET_XMIT_BYPASS;
261 for (;;) { 261 for (;;) {
262 int result = 0; 262 int result = 0;
263 defmap = head->defaults; 263 defmap = head->defaults;
@@ -413,7 +413,7 @@ cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
413 q->rx_class = cl; 413 q->rx_class = cl;
414#endif 414#endif
415 if (cl == NULL) { 415 if (cl == NULL) {
416 if (ret == NET_XMIT_DROP) 416 if (ret == NET_XMIT_BYPASS)
417 sch->qstats.drops++; 417 sch->qstats.drops++;
418 kfree_skb(skb); 418 kfree_skb(skb);
419 return ret; 419 return ret;
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index c26764bc4103..91132f6871d7 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -208,7 +208,7 @@ struct hfsc_sched
208do { \ 208do { \
209 struct timeval tv; \ 209 struct timeval tv; \
210 do_gettimeofday(&tv); \ 210 do_gettimeofday(&tv); \
211 (stamp) = 1000000ULL * tv.tv_sec + tv.tv_usec; \ 211 (stamp) = 1ULL * USEC_PER_SEC * tv.tv_sec + tv.tv_usec; \
212} while (0) 212} while (0)
213#endif 213#endif
214 214
@@ -502,8 +502,8 @@ d2dx(u32 d)
502 u64 dx; 502 u64 dx;
503 503
504 dx = ((u64)d * PSCHED_JIFFIE2US(HZ)); 504 dx = ((u64)d * PSCHED_JIFFIE2US(HZ));
505 dx += 1000000 - 1; 505 dx += USEC_PER_SEC - 1;
506 do_div(dx, 1000000); 506 do_div(dx, USEC_PER_SEC);
507 return dx; 507 return dx;
508} 508}
509 509
@@ -523,7 +523,7 @@ dx2d(u64 dx)
523{ 523{
524 u64 d; 524 u64 d;
525 525
526 d = dx * 1000000; 526 d = dx * USEC_PER_SEC;
527 do_div(d, PSCHED_JIFFIE2US(HZ)); 527 do_div(d, PSCHED_JIFFIE2US(HZ));
528 return (u32)d; 528 return (u32)d;
529} 529}
@@ -1227,7 +1227,7 @@ hfsc_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
1227 if (cl->level == 0) 1227 if (cl->level == 0)
1228 return cl; 1228 return cl;
1229 1229
1230 *qerr = NET_XMIT_DROP; 1230 *qerr = NET_XMIT_BYPASS;
1231 tcf = q->root.filter_list; 1231 tcf = q->root.filter_list;
1232 while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) { 1232 while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) {
1233#ifdef CONFIG_NET_CLS_ACT 1233#ifdef CONFIG_NET_CLS_ACT
@@ -1643,7 +1643,7 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
1643 1643
1644 cl = hfsc_classify(skb, sch, &err); 1644 cl = hfsc_classify(skb, sch, &err);
1645 if (cl == NULL) { 1645 if (cl == NULL) {
1646 if (err == NET_XMIT_DROP) 1646 if (err == NET_XMIT_BYPASS)
1647 sch->qstats.drops++; 1647 sch->qstats.drops++;
1648 kfree_skb(skb); 1648 kfree_skb(skb);
1649 return err; 1649 return err;
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 558cc087e602..3ec95df4a85e 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -321,7 +321,7 @@ static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch, in
321 if ((cl = htb_find(skb->priority,sch)) != NULL && cl->level == 0) 321 if ((cl = htb_find(skb->priority,sch)) != NULL && cl->level == 0)
322 return cl; 322 return cl;
323 323
324 *qerr = NET_XMIT_DROP; 324 *qerr = NET_XMIT_BYPASS;
325 tcf = q->filter_list; 325 tcf = q->filter_list;
326 while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) { 326 while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) {
327#ifdef CONFIG_NET_CLS_ACT 327#ifdef CONFIG_NET_CLS_ACT
@@ -724,7 +724,7 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch)
724 } 724 }
725#ifdef CONFIG_NET_CLS_ACT 725#ifdef CONFIG_NET_CLS_ACT
726 } else if (!cl) { 726 } else if (!cl) {
727 if (ret == NET_XMIT_DROP) 727 if (ret == NET_XMIT_BYPASS)
728 sch->qstats.drops++; 728 sch->qstats.drops++;
729 kfree_skb (skb); 729 kfree_skb (skb);
730 return ret; 730 return ret;
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
index 3ac0f495bad0..5b3a3e48ed92 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -54,7 +54,7 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
54 u32 band = skb->priority; 54 u32 band = skb->priority;
55 struct tcf_result res; 55 struct tcf_result res;
56 56
57 *qerr = NET_XMIT_DROP; 57 *qerr = NET_XMIT_BYPASS;
58 if (TC_H_MAJ(skb->priority) != sch->handle) { 58 if (TC_H_MAJ(skb->priority) != sch->handle) {
59#ifdef CONFIG_NET_CLS_ACT 59#ifdef CONFIG_NET_CLS_ACT
60 switch (tc_classify(skb, q->filter_list, &res)) { 60 switch (tc_classify(skb, q->filter_list, &res)) {
@@ -91,7 +91,8 @@ prio_enqueue(struct sk_buff *skb, struct Qdisc *sch)
91 qdisc = prio_classify(skb, sch, &ret); 91 qdisc = prio_classify(skb, sch, &ret);
92#ifdef CONFIG_NET_CLS_ACT 92#ifdef CONFIG_NET_CLS_ACT
93 if (qdisc == NULL) { 93 if (qdisc == NULL) {
94 if (ret == NET_XMIT_DROP) 94
95 if (ret == NET_XMIT_BYPASS)
95 sch->qstats.drops++; 96 sch->qstats.drops++;
96 kfree_skb(skb); 97 kfree_skb(skb);
97 return ret; 98 return ret;
@@ -118,7 +119,7 @@ prio_requeue(struct sk_buff *skb, struct Qdisc* sch)
118 qdisc = prio_classify(skb, sch, &ret); 119 qdisc = prio_classify(skb, sch, &ret);
119#ifdef CONFIG_NET_CLS_ACT 120#ifdef CONFIG_NET_CLS_ACT
120 if (qdisc == NULL) { 121 if (qdisc == NULL) {
121 if (ret == NET_XMIT_DROP) 122 if (ret == NET_XMIT_BYPASS)
122 sch->qstats.drops++; 123 sch->qstats.drops++;
123 kfree_skb(skb); 124 kfree_skb(skb);
124 return ret; 125 return ret;
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c
index c4a2a8c4c339..79b8ef34c6e4 100644
--- a/net/sched/sch_teql.c
+++ b/net/sched/sch_teql.c
@@ -274,7 +274,7 @@ teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *de
274 274
275static int teql_master_xmit(struct sk_buff *skb, struct net_device *dev) 275static int teql_master_xmit(struct sk_buff *skb, struct net_device *dev)
276{ 276{
277 struct teql_master *master = (void*)dev->priv; 277 struct teql_master *master = netdev_priv(dev);
278 struct Qdisc *start, *q; 278 struct Qdisc *start, *q;
279 int busy; 279 int busy;
280 int nores; 280 int nores;
@@ -350,7 +350,7 @@ drop:
350static int teql_master_open(struct net_device *dev) 350static int teql_master_open(struct net_device *dev)
351{ 351{
352 struct Qdisc * q; 352 struct Qdisc * q;
353 struct teql_master *m = (void*)dev->priv; 353 struct teql_master *m = netdev_priv(dev);
354 int mtu = 0xFFFE; 354 int mtu = 0xFFFE;
355 unsigned flags = IFF_NOARP|IFF_MULTICAST; 355 unsigned flags = IFF_NOARP|IFF_MULTICAST;
356 356
@@ -397,13 +397,13 @@ static int teql_master_close(struct net_device *dev)
397 397
398static struct net_device_stats *teql_master_stats(struct net_device *dev) 398static struct net_device_stats *teql_master_stats(struct net_device *dev)
399{ 399{
400 struct teql_master *m = (void*)dev->priv; 400 struct teql_master *m = netdev_priv(dev);
401 return &m->stats; 401 return &m->stats;
402} 402}
403 403
404static int teql_master_mtu(struct net_device *dev, int new_mtu) 404static int teql_master_mtu(struct net_device *dev, int new_mtu)
405{ 405{
406 struct teql_master *m = (void*)dev->priv; 406 struct teql_master *m = netdev_priv(dev);
407 struct Qdisc *q; 407 struct Qdisc *q;
408 408
409 if (new_mtu < 68) 409 if (new_mtu < 68)
@@ -423,7 +423,7 @@ static int teql_master_mtu(struct net_device *dev, int new_mtu)
423 423
424static __init void teql_master_setup(struct net_device *dev) 424static __init void teql_master_setup(struct net_device *dev)
425{ 425{
426 struct teql_master *master = dev->priv; 426 struct teql_master *master = netdev_priv(dev);
427 struct Qdisc_ops *ops = &master->qops; 427 struct Qdisc_ops *ops = &master->qops;
428 428
429 master->dev = dev; 429 master->dev = dev;
@@ -476,7 +476,7 @@ static int __init teql_init(void)
476 break; 476 break;
477 } 477 }
478 478
479 master = dev->priv; 479 master = netdev_priv(dev);
480 480
481 strlcpy(master->qops.id, dev->name, IFNAMSIZ); 481 strlcpy(master->qops.id, dev->name, IFNAMSIZ);
482 err = register_qdisc(&master->qops); 482 err = register_qdisc(&master->qops);
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
index 2d7d8a5db2ac..b8b38aba92b3 100644
--- a/net/sctp/sm_sideeffect.c
+++ b/net/sctp/sm_sideeffect.c
@@ -1250,8 +1250,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
1250 case SCTP_CMD_TIMER_START: 1250 case SCTP_CMD_TIMER_START:
1251 timer = &asoc->timers[cmd->obj.to]; 1251 timer = &asoc->timers[cmd->obj.to];
1252 timeout = asoc->timeouts[cmd->obj.to]; 1252 timeout = asoc->timeouts[cmd->obj.to];
1253 if (!timeout) 1253 BUG_ON(!timeout);
1254 BUG();
1255 1254
1256 timer->expires = jiffies + timeout; 1255 timer->expires = jiffies + timeout;
1257 sctp_association_hold(asoc); 1256 sctp_association_hold(asoc);
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index f509e9992767..dcaa0c4453ff 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -575,12 +575,11 @@ cache_read(struct file *filp, char __user *buf, size_t count, loff_t *ppos)
575 if (rp->q.list.next == &cd->queue) { 575 if (rp->q.list.next == &cd->queue) {
576 spin_unlock(&queue_lock); 576 spin_unlock(&queue_lock);
577 up(&queue_io_sem); 577 up(&queue_io_sem);
578 if (rp->offset) 578 BUG_ON(rp->offset);
579 BUG();
580 return 0; 579 return 0;
581 } 580 }
582 rq = container_of(rp->q.list.next, struct cache_request, q.list); 581 rq = container_of(rp->q.list.next, struct cache_request, q.list);
583 if (rq->q.reader) BUG(); 582 BUG_ON(rq->q.reader);
584 if (rp->offset == 0) 583 if (rp->offset == 0)
585 rq->readers++; 584 rq->readers++;
586 spin_unlock(&queue_lock); 585 spin_unlock(&queue_lock);
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index e4296c8b861e..b19cc26fa9c2 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -122,8 +122,7 @@ svc_init_buffer(struct svc_rqst *rqstp, unsigned int size)
122 rqstp->rq_argused = 0; 122 rqstp->rq_argused = 0;
123 rqstp->rq_resused = 0; 123 rqstp->rq_resused = 0;
124 arghi = 0; 124 arghi = 0;
125 if (pages > RPCSVC_MAXPAGES) 125 BUG_ON(pages > RPCSVC_MAXPAGES);
126 BUG();
127 while (pages) { 126 while (pages) {
128 struct page *p = alloc_page(GFP_KERNEL); 127 struct page *p = alloc_page(GFP_KERNEL);
129 if (!p) 128 if (!p)
diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c
index 2f4531fcaca2..6ed3302312fb 100644
--- a/net/xfrm/xfrm_algo.c
+++ b/net/xfrm/xfrm_algo.c
@@ -540,8 +540,7 @@ void skb_icv_walk(const struct sk_buff *skb, struct crypto_tfm *tfm,
540 start = end; 540 start = end;
541 } 541 }
542 } 542 }
543 if (len) 543 BUG_ON(len);
544 BUG();
545} 544}
546EXPORT_SYMBOL_GPL(skb_icv_walk); 545EXPORT_SYMBOL_GPL(skb_icv_walk);
547 546
@@ -610,8 +609,7 @@ skb_to_sgvec(struct sk_buff *skb, struct scatterlist *sg, int offset, int len)
610 start = end; 609 start = end;
611 } 610 }
612 } 611 }
613 if (len) 612 BUG_ON(len);
614 BUG();
615 return elt; 613 return elt;
616} 614}
617EXPORT_SYMBOL_GPL(skb_to_sgvec); 615EXPORT_SYMBOL_GPL(skb_to_sgvec);
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 59614a994b4e..077bbf9fb9b7 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -248,11 +248,9 @@ EXPORT_SYMBOL(xfrm_policy_alloc);
248 248
249void __xfrm_policy_destroy(struct xfrm_policy *policy) 249void __xfrm_policy_destroy(struct xfrm_policy *policy)
250{ 250{
251 if (!policy->dead) 251 BUG_ON(!policy->dead);
252 BUG();
253 252
254 if (policy->bundles) 253 BUG_ON(policy->bundles);
255 BUG();
256 254
257 if (del_timer(&policy->timer)) 255 if (del_timer(&policy->timer))
258 BUG(); 256 BUG();