aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/arm/Samsung-S3C24XX/Overview.txt42
-rw-r--r--arch/arm/Kconfig16
-rw-r--r--arch/arm/Makefile1
-rw-r--r--arch/arm/common/Makefile1
-rw-r--r--arch/arm/common/dmabounce.c2
-rw-r--r--arch/arm/common/locomo.c49
-rw-r--r--arch/arm/common/sa1111.c46
-rw-r--r--arch/arm/common/scoop.c6
-rw-r--r--arch/arm/common/uengine.c (renamed from arch/arm/mach-ixp2000/uengine.c)2
-rw-r--r--arch/arm/common/vic.c49
-rw-r--r--arch/arm/configs/ep93xx_defconfig (renamed from arch/arm/configs/enp2611_defconfig)553
-rw-r--r--arch/arm/configs/ixdp2401_defconfig976
-rw-r--r--arch/arm/configs/ixdp2800_defconfig975
-rw-r--r--arch/arm/configs/ixdp2801_defconfig976
-rw-r--r--arch/arm/configs/ixp2000_defconfig (renamed from arch/arm/configs/ixdp2400_defconfig)61
-rw-r--r--arch/arm/configs/s3c2410_defconfig147
-rw-r--r--arch/arm/kernel/apm.c4
-rw-r--r--arch/arm/kernel/bios32.c4
-rw-r--r--arch/arm/kernel/debug.S1
-rw-r--r--arch/arm/kernel/ecard.c4
-rw-r--r--arch/arm/kernel/entry-armv.S2
-rw-r--r--arch/arm/kernel/head.S7
-rw-r--r--arch/arm/kernel/irq.c11
-rw-r--r--arch/arm/lib/delay.S20
-rw-r--r--arch/arm/lib/io-acorn.S1
-rw-r--r--arch/arm/mach-at91rm9200/clock.c85
-rw-r--r--arch/arm/mach-at91rm9200/gpio.c4
-rw-r--r--arch/arm/mach-at91rm9200/time.c4
-rw-r--r--arch/arm/mach-ep93xx/Kconfig21
-rw-r--r--arch/arm/mach-ep93xx/Makefile10
-rw-r--r--arch/arm/mach-ep93xx/Makefile.boot2
-rw-r--r--arch/arm/mach-ep93xx/core.c374
-rw-r--r--arch/arm/mach-ep93xx/gesbc9312.c40
-rw-r--r--arch/arm/mach-ep93xx/ts72xx.c118
-rw-r--r--arch/arm/mach-footbridge/dc21285.c4
-rw-r--r--arch/arm/mach-integrator/impd1.c7
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c4
-rw-r--r--arch/arm/mach-iop3xx/iq31244-pci.c4
-rw-r--r--arch/arm/mach-iop3xx/iq80321-pci.c4
-rw-r--r--arch/arm/mach-iop3xx/iq80331-pci.c4
-rw-r--r--arch/arm/mach-iop3xx/iq80332-pci.c4
-rw-r--r--arch/arm/mach-ixp2000/Kconfig9
-rw-r--r--arch/arm/mach-ixp2000/Makefile2
-rw-r--r--arch/arm/mach-ixp2000/core.c13
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x01.c20
-rw-r--r--arch/arm/mach-ixp4xx/common-pci.c3
-rw-r--r--arch/arm/mach-ixp4xx/common.c5
-rw-r--r--arch/arm/mach-lh7a40x/common.h1
-rw-r--r--arch/arm/mach-lh7a40x/irq-kev7a400.c1
-rw-r--r--arch/arm/mach-lh7a40x/irq-lh7a400.c2
-rw-r--r--arch/arm/mach-lh7a40x/irq-lh7a404.c3
-rw-r--r--arch/arm/mach-lh7a40x/irq-lpd7a40x.c1
-rw-r--r--arch/arm/mach-pxa/Makefile2
-rw-r--r--arch/arm/mach-pxa/clock.c124
-rw-r--r--arch/arm/mach-pxa/corgi.c1
-rw-r--r--arch/arm/mach-pxa/poodle.c1
-rw-r--r--arch/arm/mach-pxa/spitz.c1
-rw-r--r--arch/arm/mach-pxa/tosa.c1
-rw-r--r--arch/arm/mach-s3c2410/Kconfig7
-rw-r--r--arch/arm/mach-s3c2410/Makefile1
-rw-r--r--arch/arm/mach-s3c2410/clock.c178
-rw-r--r--arch/arm/mach-s3c2410/clock.h8
-rw-r--r--arch/arm/mach-s3c2410/mach-osiris.c294
-rw-r--r--arch/arm/mach-s3c2410/s3c2440-clock.c89
-rw-r--r--arch/arm/mach-s3c2410/time.c8
-rw-r--r--arch/arm/mach-sa1100/Makefile2
-rw-r--r--arch/arm/mach-sa1100/clock.c132
-rw-r--r--arch/arm/mach-versatile/core.c2
-rw-r--r--arch/arm/mm/Kconfig2
-rw-r--r--arch/arm/mm/init.c1
-rw-r--r--arch/arm/mm/ioremap.c1
-rw-r--r--arch/arm/mm/proc-arm1020.S1
-rw-r--r--arch/arm/mm/proc-arm1020e.S1
-rw-r--r--arch/arm/mm/proc-arm720.S1
-rw-r--r--arch/arm/mm/proc-arm920.S1
-rw-r--r--arch/arm/mm/proc-arm922.S1
-rw-r--r--arch/arm/mm/proc-arm925.S1
-rw-r--r--arch/arm/mm/proc-arm926.S1
-rw-r--r--arch/arm/mm/proc-xscale.S1
-rw-r--r--arch/arm/oprofile/common.c34
-rw-r--r--arch/arm/oprofile/op_counter.h2
-rw-r--r--arch/arm/vfp/entry.S1
-rw-r--r--drivers/net/Makefile4
-rw-r--r--drivers/net/au1000_eth.c18
-rw-r--r--drivers/net/depca.c2
-rw-r--r--drivers/net/ixp2000/enp2611.c2
-rw-r--r--drivers/net/ixp2000/ixpdev.c2
-rw-r--r--drivers/net/sis900.c1
-rw-r--r--drivers/net/sky2.c27
-rw-r--r--drivers/net/sky2.h71
-rw-r--r--drivers/net/tulip/de2104x.c2
-rw-r--r--drivers/parport/parport_serial.c75
-rw-r--r--drivers/s390/net/qeth_main.c57
-rw-r--r--drivers/s390/net/qeth_proc.c56
-rw-r--r--drivers/s390/net/qeth_sys.c2
-rw-r--r--drivers/scsi/Kconfig4
-rw-r--r--drivers/scsi/Makefile4
-rw-r--r--drivers/scsi/ahci.c135
-rw-r--r--drivers/scsi/libata-bmdma.c39
-rw-r--r--drivers/scsi/libata-core.c140
-rw-r--r--drivers/scsi/libata-scsi.c140
-rw-r--r--drivers/scsi/pdc_adma.c2
-rw-r--r--drivers/scsi/sata_mv.c5
-rw-r--r--drivers/scsi/sata_svw.c56
-rw-r--r--drivers/scsi/sata_vsc.c124
-rw-r--r--drivers/serial/21285.c19
-rw-r--r--drivers/serial/8250.c26
-rw-r--r--drivers/serial/8250_early.c9
-rw-r--r--drivers/serial/amba-pl010.c24
-rw-r--r--drivers/serial/amba-pl011.c20
-rw-r--r--drivers/serial/at91_serial.c24
-rw-r--r--drivers/serial/au1x00_uart.c26
-rw-r--r--drivers/serial/clps711x.c24
-rw-r--r--drivers/serial/dz.c12
-rw-r--r--drivers/serial/imx.c26
-rw-r--r--drivers/serial/ip22zilog.c11
-rw-r--r--drivers/serial/m32r_sio.c26
-rw-r--r--drivers/serial/mpc52xx_uart.c11
-rw-r--r--drivers/serial/pmac_zilog.c23
-rw-r--r--drivers/serial/pxa.c26
-rw-r--r--drivers/serial/s3c2410.c26
-rw-r--r--drivers/serial/sa1100.c26
-rw-r--r--drivers/serial/serial_core.c21
-rw-r--r--drivers/serial/serial_lh7a40x.c17
-rw-r--r--drivers/serial/serial_txx9.c26
-rw-r--r--drivers/serial/sunsab.c10
-rw-r--r--drivers/serial/sunsu.c26
-rw-r--r--drivers/serial/sunzilog.c13
-rw-r--r--drivers/serial/vr41xx_siu.c16
-rw-r--r--include/asm-arm/arch-aaec2000/param.h15
-rw-r--r--include/asm-arm/arch-at91rm9200/param.h28
-rw-r--r--include/asm-arm/arch-cl7500/debug-macro.S14
-rw-r--r--include/asm-arm/arch-cl7500/param.h5
-rw-r--r--include/asm-arm/arch-clps711x/param.h19
-rw-r--r--include/asm-arm/arch-ebsa110/debug-macro.S19
-rw-r--r--include/asm-arm/arch-ebsa110/param.h4
-rw-r--r--include/asm-arm/arch-ebsa285/debug-macro.S18
-rw-r--r--include/asm-arm/arch-ebsa285/param.h3
-rw-r--r--include/asm-arm/arch-ep93xx/debug-macro.S22
-rw-r--r--include/asm-arm/arch-ep93xx/dma.h3
-rw-r--r--include/asm-arm/arch-ep93xx/entry-macro.S53
-rw-r--r--include/asm-arm/arch-ep93xx/ep93xx-regs.h125
-rw-r--r--include/asm-arm/arch-ep93xx/gesbc9312.h3
-rw-r--r--include/asm-arm/arch-ep93xx/gpio.h107
-rw-r--r--include/asm-arm/arch-ep93xx/hardware.h12
-rw-r--r--include/asm-arm/arch-ep93xx/io.h8
-rw-r--r--include/asm-arm/arch-ep93xx/irqs.h80
-rw-r--r--include/asm-arm/arch-ep93xx/memory.h14
-rw-r--r--include/asm-arm/arch-ep93xx/platform.h14
-rw-r--r--include/asm-arm/arch-ep93xx/system.h26
-rw-r--r--include/asm-arm/arch-ep93xx/timex.h5
-rw-r--r--include/asm-arm/arch-ep93xx/ts72xx.h90
-rw-r--r--include/asm-arm/arch-ep93xx/uncompress.h53
-rw-r--r--include/asm-arm/arch-ep93xx/vmalloc.h5
-rw-r--r--include/asm-arm/arch-h720x/irq.h14
-rw-r--r--include/asm-arm/arch-h720x/param.h10
-rw-r--r--include/asm-arm/arch-imx/irq.h20
-rw-r--r--include/asm-arm/arch-imx/param.h19
-rw-r--r--include/asm-arm/arch-integrator/debug-macro.S18
-rw-r--r--include/asm-arm/arch-integrator/param.h19
-rw-r--r--include/asm-arm/arch-iop3xx/debug-macro.S19
-rw-r--r--include/asm-arm/arch-iop3xx/param.h3
-rw-r--r--include/asm-arm/arch-ixp2000/debug-macro.S17
-rw-r--r--include/asm-arm/arch-ixp2000/irq.h13
-rw-r--r--include/asm-arm/arch-ixp2000/ixdp2x00.h5
-rw-r--r--include/asm-arm/arch-ixp2000/ixp2000-regs.h4
-rw-r--r--include/asm-arm/arch-ixp2000/param.h3
-rw-r--r--include/asm-arm/arch-ixp2000/system.h2
-rw-r--r--include/asm-arm/arch-ixp4xx/debug-macro.S15
-rw-r--r--include/asm-arm/arch-ixp4xx/irq.h13
-rw-r--r--include/asm-arm/arch-ixp4xx/param.h3
-rw-r--r--include/asm-arm/arch-ixp4xx/platform.h27
-rw-r--r--include/asm-arm/arch-l7200/param.h19
-rw-r--r--include/asm-arm/arch-lh7a40x/irq.h11
-rw-r--r--include/asm-arm/arch-lh7a40x/param.h9
-rw-r--r--include/asm-arm/arch-omap/param.h8
-rw-r--r--include/asm-arm/arch-pxa/debug-macro.S17
-rw-r--r--include/asm-arm/arch-pxa/irq.h14
-rw-r--r--include/asm-arm/arch-pxa/param.h3
-rw-r--r--include/asm-arm/arch-realview/debug-macro.S18
-rw-r--r--include/asm-arm/arch-realview/param.h19
-rw-r--r--include/asm-arm/arch-rpc/debug-macro.S19
-rw-r--r--include/asm-arm/arch-rpc/param.h3
-rw-r--r--include/asm-arm/arch-s3c2410/osiris-cpld.h25
-rw-r--r--include/asm-arm/arch-s3c2410/osiris-map.h41
-rw-r--r--include/asm-arm/arch-s3c2410/param.h27
-rw-r--r--include/asm-arm/arch-s3c2410/regs-gpio.h2
-rw-r--r--include/asm-arm/arch-sa1100/debug-macro.S1
-rw-r--r--include/asm-arm/arch-sa1100/param.h3
-rw-r--r--include/asm-arm/arch-shark/param.h5
-rw-r--r--include/asm-arm/arch-versatile/debug-macro.S18
-rw-r--r--include/asm-arm/arch-versatile/param.h19
-rw-r--r--include/asm-arm/delay.h12
-rw-r--r--include/asm-arm/hardware/debug-8250.S29
-rw-r--r--include/asm-arm/hardware/debug-pl01x.S29
-rw-r--r--include/asm-arm/hardware/uengine.h (renamed from include/asm-arm/arch-ixp2000/uengine.h)0
-rw-r--r--include/asm-arm/hardware/vic.h2
-rw-r--r--include/asm-arm/mach/arch.h5
-rw-r--r--include/asm-arm/mach/irq.h7
-rw-r--r--include/asm-arm/param.h7
-rw-r--r--include/linux/ata.h7
-rw-r--r--include/linux/libata.h4
-rw-r--r--include/linux/netfilter/x_tables.h64
-rw-r--r--include/linux/netfilter_arp/arp_tables.h37
-rw-r--r--include/linux/netfilter_ipv4/ip_tables.h70
-rw-r--r--include/linux/netfilter_ipv6/ip6_tables.h69
-rw-r--r--include/linux/serial_core.h3
-rw-r--r--include/net/netfilter/nf_conntrack.h4
-rw-r--r--include/net/tc_act/tc_ipt.h4
-rw-r--r--net/ipv4/ip_output.c6
-rw-r--r--net/ipv4/netfilter/arp_tables.c6
-rw-r--r--net/ipv4/netfilter/ip_conntrack_core.c4
-rw-r--r--net/ipv4/netfilter/ip_conntrack_helper_h323.c4
-rw-r--r--net/ipv4/netfilter/ip_conntrack_netlink.c72
-rw-r--r--net/ipv4/netfilter/ip_tables.c15
-rw-r--r--net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c1
-rw-r--r--net/ipv6/ipv6_sockglue.c4
-rw-r--r--net/ipv6/netfilter/ip6_tables.c15
-rw-r--r--net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c1
-rw-r--r--net/netfilter/Kconfig6
-rw-r--r--net/netfilter/nf_conntrack_core.c35
-rw-r--r--net/netfilter/nf_conntrack_netlink.c84
-rw-r--r--net/netfilter/nf_conntrack_standalone.c2
-rw-r--r--net/netfilter/nfnetlink_queue.c19
-rw-r--r--net/netfilter/x_tables.c16
-rw-r--r--net/netfilter/xt_CLASSIFY.c12
-rw-r--r--net/netfilter/xt_CONNMARK.c12
-rw-r--r--net/netfilter/xt_MARK.c21
-rw-r--r--net/netfilter/xt_NFQUEUE.c19
-rw-r--r--net/netfilter/xt_NOTRACK.c12
-rw-r--r--net/netfilter/xt_comment.c12
-rw-r--r--net/netfilter/xt_connbytes.c12
-rw-r--r--net/netfilter/xt_connmark.c29
-rw-r--r--net/netfilter/xt_conntrack.c33
-rw-r--r--net/netfilter/xt_dccp.c12
-rw-r--r--net/netfilter/xt_helper.c29
-rw-r--r--net/netfilter/xt_length.c12
-rw-r--r--net/netfilter/xt_limit.c12
-rw-r--r--net/netfilter/xt_mac.c12
-rw-r--r--net/netfilter/xt_mark.c12
-rw-r--r--net/netfilter/xt_physdev.c12
-rw-r--r--net/netfilter/xt_pkttype.c12
-rw-r--r--net/netfilter/xt_policy.c18
-rw-r--r--net/netfilter/xt_realm.c5
-rw-r--r--net/netfilter/xt_sctp.c12
-rw-r--r--net/netfilter/xt_state.c41
-rw-r--r--net/netfilter/xt_string.c12
-rw-r--r--net/netfilter/xt_tcpmss.c12
-rw-r--r--net/netfilter/xt_tcpudp.c26
249 files changed, 4377 insertions, 4978 deletions
diff --git a/Documentation/arm/Samsung-S3C24XX/Overview.txt b/Documentation/arm/Samsung-S3C24XX/Overview.txt
index 89aa89d526ac..8c6ee684174c 100644
--- a/Documentation/arm/Samsung-S3C24XX/Overview.txt
+++ b/Documentation/arm/Samsung-S3C24XX/Overview.txt
@@ -10,6 +10,8 @@ Introduction
10 by the 's3c2410' architecture of ARM Linux. Currently the S3C2410 and 10 by the 's3c2410' architecture of ARM Linux. Currently the S3C2410 and
11 the S3C2440 are supported CPUs. 11 the S3C2440 are supported CPUs.
12 12
13 Support for the S3C2400 series is in progress.
14
13 15
14Configuration 16Configuration
15------------- 17-------------
@@ -32,6 +34,11 @@ Machines
32 A general purpose development board, see EB2410ITX.txt for further 34 A general purpose development board, see EB2410ITX.txt for further
33 details 35 details
34 36
37 Simtec Electronics IM2440D20 (Osiris)
38
39 CPU Module from Simtec Electronics, with a S3C2440A CPU, nand flash
40 and a PCMCIA controller.
41
35 Samsung SMDK2410 42 Samsung SMDK2410
36 43
37 Samsung's own development board, geared for PDA work. 44 Samsung's own development board, geared for PDA work.
@@ -85,6 +92,26 @@ Adding New Machines
85 mailing list information. 92 mailing list information.
86 93
87 94
95I2C
96---
97
98 The hardware I2C core in the CPU is supported in single master
99 mode, and can be configured via platform data.
100
101
102RTC
103---
104
105 Support for the onboard RTC unit, including alarm function.
106
107
108Watchdog
109--------
110
111 The onchip watchdog is available via the standard watchdog
112 interface.
113
114
88NAND 115NAND
89---- 116----
90 117
@@ -121,6 +148,15 @@ Clock Management
121 various clock units 148 various clock units
122 149
123 150
151Suspend to RAM
152--------------
153
154 For boards that provide support for suspend to RAM, the
155 system can be placed into low power suspend.
156
157 See Suspend.txt for more information.
158
159
124Platform Data 160Platform Data
125------------- 161-------------
126 162
@@ -158,6 +194,7 @@ Platform Data
158 exported outside arch/arm/mach-s3c2410/, or exported to 194 exported outside arch/arm/mach-s3c2410/, or exported to
159 modules via EXPORT_SYMBOL() and related functions. 195 modules via EXPORT_SYMBOL() and related functions.
160 196
197
161Port Contributors 198Port Contributors
162----------------- 199-----------------
163 200
@@ -188,8 +225,11 @@ Document Changes
188 08 Mar 2005 - BJD - Added LCVR to list of people, updated introduction 225 08 Mar 2005 - BJD - Added LCVR to list of people, updated introduction
189 08 Mar 2005 - BJD - Added section on adding machines 226 08 Mar 2005 - BJD - Added section on adding machines
190 09 Sep 2005 - BJD - Added section on platform data 227 09 Sep 2005 - BJD - Added section on platform data
228 11 Feb 2006 - BJD - Added I2C, RTC and Watchdog sections
229 11 Feb 2006 - BJD - Added Osiris machine, and S3C2400 information
230
191 231
192Document Author 232Document Author
193--------------- 233---------------
194 234
195Ben Dooks, (c) 2004-2005 Simtec Electronics 235Ben Dooks, (c) 2004-2005,2006 Simtec Electronics
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 32ba00bd0a2f..0dd24ebdf6ac 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -108,6 +108,13 @@ config ARCH_EBSA110
108 Ethernet interface, two PCMCIA sockets, two serial ports and a 108 Ethernet interface, two PCMCIA sockets, two serial ports and a
109 parallel port. 109 parallel port.
110 110
111config ARCH_EP93XX
112 bool "EP93xx-based"
113 select ARM_AMBA
114 select ARM_VIC
115 help
116 This enables support for the Cirrus EP93xx series of CPUs.
117
111config ARCH_FOOTBRIDGE 118config ARCH_FOOTBRIDGE
112 bool "FootBridge" 119 bool "FootBridge"
113 select FOOTBRIDGE 120 select FOOTBRIDGE
@@ -250,6 +257,8 @@ endchoice
250 257
251source "arch/arm/mach-clps711x/Kconfig" 258source "arch/arm/mach-clps711x/Kconfig"
252 259
260source "arch/arm/mach-ep93xx/Kconfig"
261
253source "arch/arm/mach-footbridge/Kconfig" 262source "arch/arm/mach-footbridge/Kconfig"
254 263
255source "arch/arm/mach-integrator/Kconfig" 264source "arch/arm/mach-integrator/Kconfig"
@@ -434,6 +443,13 @@ config NO_IDLE_HZ
434 Currently at least OMAP, PXA2xx and SA11x0 platforms are known 443 Currently at least OMAP, PXA2xx and SA11x0 platforms are known
435 to have accurate timekeeping with dynamic tick. 444 to have accurate timekeeping with dynamic tick.
436 445
446config HZ
447 int
448 default 128 if ARCH_L7200
449 default 200 if ARCH_EBSA110 || ARCH_S3C2410
450 default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER
451 default 100
452
437config AEABI 453config AEABI
438 bool "Use the ARM EABI to compile the kernel" 454 bool "Use the ARM EABI to compile the kernel"
439 help 455 help
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index fbfc14a56b96..b5b1e4087516 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -105,6 +105,7 @@ endif
105 machine-$(CONFIG_ARCH_AAEC2000) := aaec2000 105 machine-$(CONFIG_ARCH_AAEC2000) := aaec2000
106 machine-$(CONFIG_ARCH_REALVIEW) := realview 106 machine-$(CONFIG_ARCH_REALVIEW) := realview
107 machine-$(CONFIG_ARCH_AT91RM9200) := at91rm9200 107 machine-$(CONFIG_ARCH_AT91RM9200) := at91rm9200
108 machine-$(CONFIG_ARCH_EP93XX) := ep93xx
108 109
109ifeq ($(CONFIG_ARCH_EBSA110),y) 110ifeq ($(CONFIG_ARCH_EBSA110),y)
110# This is what happens if you forget the IOCS16 line. 111# This is what happens if you forget the IOCS16 line.
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile
index c81a2ff6b5be..847e3e6356c6 100644
--- a/arch/arm/common/Makefile
+++ b/arch/arm/common/Makefile
@@ -15,3 +15,4 @@ obj-$(CONFIG_SHARP_LOCOMO) += locomo.o
15obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o 15obj-$(CONFIG_SHARP_PARAM) += sharpsl_param.o
16obj-$(CONFIG_SHARPSL_PM) += sharpsl_pm.o 16obj-$(CONFIG_SHARPSL_PM) += sharpsl_pm.o
17obj-$(CONFIG_SHARP_SCOOP) += scoop.o 17obj-$(CONFIG_SHARP_SCOOP) += scoop.o
18obj-$(CONFIG_ARCH_IXP2000) += uengine.o
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c
index ad6c89a555bb..7971d0dc6892 100644
--- a/arch/arm/common/dmabounce.c
+++ b/arch/arm/common/dmabounce.c
@@ -5,7 +5,7 @@
5 * limited DMA windows. These functions utilize bounce buffers to 5 * limited DMA windows. These functions utilize bounce buffers to
6 * copy data to/from buffers located outside the DMA region. This 6 * copy data to/from buffers located outside the DMA region. This
7 * only works for systems in which DMA memory is at the bottom of 7 * only works for systems in which DMA memory is at the bottom of
8 * RAM and the remainder of memory is at the top an the DMA memory 8 * RAM, the remainder of memory is at the top and the DMA memory
9 * can be marked as ZONE_DMA. Anything beyond that such as discontigous 9 * can be marked as ZONE_DMA. Anything beyond that such as discontigous
10 * DMA windows will require custom implementations that reserve memory 10 * DMA windows will require custom implementations that reserve memory
11 * areas at early bootup. 11 * areas at early bootup.
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index 23609400a8e2..a7dc1370695b 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -60,7 +60,7 @@ struct locomo {
60 unsigned long phys; 60 unsigned long phys;
61 unsigned int irq; 61 unsigned int irq;
62 spinlock_t lock; 62 spinlock_t lock;
63 void *base; 63 void __iomem *base;
64}; 64};
65 65
66struct locomo_dev_info { 66struct locomo_dev_info {
@@ -162,7 +162,7 @@ static void locomo_handler(unsigned int irq, struct irqdesc *desc,
162{ 162{
163 int req, i; 163 int req, i;
164 struct irqdesc *d; 164 struct irqdesc *d;
165 void *mapbase = get_irq_chipdata(irq); 165 void __iomem *mapbase = get_irq_chipdata(irq);
166 166
167 /* Acknowledge the parent IRQ */ 167 /* Acknowledge the parent IRQ */
168 desc->chip->ack(irq); 168 desc->chip->ack(irq);
@@ -189,7 +189,7 @@ static void locomo_ack_irq(unsigned int irq)
189 189
190static void locomo_mask_irq(unsigned int irq) 190static void locomo_mask_irq(unsigned int irq)
191{ 191{
192 void *mapbase = get_irq_chipdata(irq); 192 void __iomem *mapbase = get_irq_chipdata(irq);
193 unsigned int r; 193 unsigned int r;
194 r = locomo_readl(mapbase + LOCOMO_ICR); 194 r = locomo_readl(mapbase + LOCOMO_ICR);
195 r &= ~(0x0010 << (irq - LOCOMO_IRQ_START)); 195 r &= ~(0x0010 << (irq - LOCOMO_IRQ_START));
@@ -198,7 +198,7 @@ static void locomo_mask_irq(unsigned int irq)
198 198
199static void locomo_unmask_irq(unsigned int irq) 199static void locomo_unmask_irq(unsigned int irq)
200{ 200{
201 void *mapbase = get_irq_chipdata(irq); 201 void __iomem *mapbase = get_irq_chipdata(irq);
202 unsigned int r; 202 unsigned int r;
203 r = locomo_readl(mapbase + LOCOMO_ICR); 203 r = locomo_readl(mapbase + LOCOMO_ICR);
204 r |= (0x0010 << (irq - LOCOMO_IRQ_START)); 204 r |= (0x0010 << (irq - LOCOMO_IRQ_START));
@@ -215,7 +215,7 @@ static void locomo_key_handler(unsigned int irq, struct irqdesc *desc,
215 struct pt_regs *regs) 215 struct pt_regs *regs)
216{ 216{
217 struct irqdesc *d; 217 struct irqdesc *d;
218 void *mapbase = get_irq_chipdata(irq); 218 void __iomem *mapbase = get_irq_chipdata(irq);
219 219
220 if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) { 220 if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) {
221 d = irq_desc + LOCOMO_IRQ_KEY_START; 221 d = irq_desc + LOCOMO_IRQ_KEY_START;
@@ -225,7 +225,7 @@ static void locomo_key_handler(unsigned int irq, struct irqdesc *desc,
225 225
226static void locomo_key_ack_irq(unsigned int irq) 226static void locomo_key_ack_irq(unsigned int irq)
227{ 227{
228 void *mapbase = get_irq_chipdata(irq); 228 void __iomem *mapbase = get_irq_chipdata(irq);
229 unsigned int r; 229 unsigned int r;
230 r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); 230 r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC);
231 r &= ~(0x0100 << (irq - LOCOMO_IRQ_KEY_START)); 231 r &= ~(0x0100 << (irq - LOCOMO_IRQ_KEY_START));
@@ -234,7 +234,7 @@ static void locomo_key_ack_irq(unsigned int irq)
234 234
235static void locomo_key_mask_irq(unsigned int irq) 235static void locomo_key_mask_irq(unsigned int irq)
236{ 236{
237 void *mapbase = get_irq_chipdata(irq); 237 void __iomem *mapbase = get_irq_chipdata(irq);
238 unsigned int r; 238 unsigned int r;
239 r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); 239 r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC);
240 r &= ~(0x0010 << (irq - LOCOMO_IRQ_KEY_START)); 240 r &= ~(0x0010 << (irq - LOCOMO_IRQ_KEY_START));
@@ -243,7 +243,7 @@ static void locomo_key_mask_irq(unsigned int irq)
243 243
244static void locomo_key_unmask_irq(unsigned int irq) 244static void locomo_key_unmask_irq(unsigned int irq)
245{ 245{
246 void *mapbase = get_irq_chipdata(irq); 246 void __iomem *mapbase = get_irq_chipdata(irq);
247 unsigned int r; 247 unsigned int r;
248 r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC); 248 r = locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC);
249 r |= (0x0010 << (irq - LOCOMO_IRQ_KEY_START)); 249 r |= (0x0010 << (irq - LOCOMO_IRQ_KEY_START));
@@ -261,7 +261,7 @@ static void locomo_gpio_handler(unsigned int irq, struct irqdesc *desc,
261{ 261{
262 int req, i; 262 int req, i;
263 struct irqdesc *d; 263 struct irqdesc *d;
264 void *mapbase = get_irq_chipdata(irq); 264 void __iomem *mapbase = get_irq_chipdata(irq);
265 265
266 req = locomo_readl(mapbase + LOCOMO_GIR) & 266 req = locomo_readl(mapbase + LOCOMO_GIR) &
267 locomo_readl(mapbase + LOCOMO_GPD) & 267 locomo_readl(mapbase + LOCOMO_GPD) &
@@ -280,7 +280,7 @@ static void locomo_gpio_handler(unsigned int irq, struct irqdesc *desc,
280 280
281static void locomo_gpio_ack_irq(unsigned int irq) 281static void locomo_gpio_ack_irq(unsigned int irq)
282{ 282{
283 void *mapbase = get_irq_chipdata(irq); 283 void __iomem *mapbase = get_irq_chipdata(irq);
284 unsigned int r; 284 unsigned int r;
285 r = locomo_readl(mapbase + LOCOMO_GWE); 285 r = locomo_readl(mapbase + LOCOMO_GWE);
286 r |= (0x0001 << (irq - LOCOMO_IRQ_GPIO_START)); 286 r |= (0x0001 << (irq - LOCOMO_IRQ_GPIO_START));
@@ -297,7 +297,7 @@ static void locomo_gpio_ack_irq(unsigned int irq)
297 297
298static void locomo_gpio_mask_irq(unsigned int irq) 298static void locomo_gpio_mask_irq(unsigned int irq)
299{ 299{
300 void *mapbase = get_irq_chipdata(irq); 300 void __iomem *mapbase = get_irq_chipdata(irq);
301 unsigned int r; 301 unsigned int r;
302 r = locomo_readl(mapbase + LOCOMO_GIE); 302 r = locomo_readl(mapbase + LOCOMO_GIE);
303 r &= ~(0x0001 << (irq - LOCOMO_IRQ_GPIO_START)); 303 r &= ~(0x0001 << (irq - LOCOMO_IRQ_GPIO_START));
@@ -306,7 +306,7 @@ static void locomo_gpio_mask_irq(unsigned int irq)
306 306
307static void locomo_gpio_unmask_irq(unsigned int irq) 307static void locomo_gpio_unmask_irq(unsigned int irq)
308{ 308{
309 void *mapbase = get_irq_chipdata(irq); 309 void __iomem *mapbase = get_irq_chipdata(irq);
310 unsigned int r; 310 unsigned int r;
311 r = locomo_readl(mapbase + LOCOMO_GIE); 311 r = locomo_readl(mapbase + LOCOMO_GIE);
312 r |= (0x0001 << (irq - LOCOMO_IRQ_GPIO_START)); 312 r |= (0x0001 << (irq - LOCOMO_IRQ_GPIO_START));
@@ -323,7 +323,7 @@ static void locomo_lt_handler(unsigned int irq, struct irqdesc *desc,
323 struct pt_regs *regs) 323 struct pt_regs *regs)
324{ 324{
325 struct irqdesc *d; 325 struct irqdesc *d;
326 void *mapbase = get_irq_chipdata(irq); 326 void __iomem *mapbase = get_irq_chipdata(irq);
327 327
328 if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) { 328 if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) {
329 d = irq_desc + LOCOMO_IRQ_LT_START; 329 d = irq_desc + LOCOMO_IRQ_LT_START;
@@ -333,7 +333,7 @@ static void locomo_lt_handler(unsigned int irq, struct irqdesc *desc,
333 333
334static void locomo_lt_ack_irq(unsigned int irq) 334static void locomo_lt_ack_irq(unsigned int irq)
335{ 335{
336 void *mapbase = get_irq_chipdata(irq); 336 void __iomem *mapbase = get_irq_chipdata(irq);
337 unsigned int r; 337 unsigned int r;
338 r = locomo_readl(mapbase + LOCOMO_LTINT); 338 r = locomo_readl(mapbase + LOCOMO_LTINT);
339 r &= ~(0x0100 << (irq - LOCOMO_IRQ_LT_START)); 339 r &= ~(0x0100 << (irq - LOCOMO_IRQ_LT_START));
@@ -342,7 +342,7 @@ static void locomo_lt_ack_irq(unsigned int irq)
342 342
343static void locomo_lt_mask_irq(unsigned int irq) 343static void locomo_lt_mask_irq(unsigned int irq)
344{ 344{
345 void *mapbase = get_irq_chipdata(irq); 345 void __iomem *mapbase = get_irq_chipdata(irq);
346 unsigned int r; 346 unsigned int r;
347 r = locomo_readl(mapbase + LOCOMO_LTINT); 347 r = locomo_readl(mapbase + LOCOMO_LTINT);
348 r &= ~(0x0010 << (irq - LOCOMO_IRQ_LT_START)); 348 r &= ~(0x0010 << (irq - LOCOMO_IRQ_LT_START));
@@ -351,7 +351,7 @@ static void locomo_lt_mask_irq(unsigned int irq)
351 351
352static void locomo_lt_unmask_irq(unsigned int irq) 352static void locomo_lt_unmask_irq(unsigned int irq)
353{ 353{
354 void *mapbase = get_irq_chipdata(irq); 354 void __iomem *mapbase = get_irq_chipdata(irq);
355 unsigned int r; 355 unsigned int r;
356 r = locomo_readl(mapbase + LOCOMO_LTINT); 356 r = locomo_readl(mapbase + LOCOMO_LTINT);
357 r |= (0x0010 << (irq - LOCOMO_IRQ_LT_START)); 357 r |= (0x0010 << (irq - LOCOMO_IRQ_LT_START));
@@ -369,7 +369,7 @@ static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc,
369{ 369{
370 int req, i; 370 int req, i;
371 struct irqdesc *d; 371 struct irqdesc *d;
372 void *mapbase = get_irq_chipdata(irq); 372 void __iomem *mapbase = get_irq_chipdata(irq);
373 373
374 req = locomo_readl(mapbase + LOCOMO_SPIIR) & 0x000F; 374 req = locomo_readl(mapbase + LOCOMO_SPIIR) & 0x000F;
375 if (req) { 375 if (req) {
@@ -386,7 +386,7 @@ static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc,
386 386
387static void locomo_spi_ack_irq(unsigned int irq) 387static void locomo_spi_ack_irq(unsigned int irq)
388{ 388{
389 void *mapbase = get_irq_chipdata(irq); 389 void __iomem *mapbase = get_irq_chipdata(irq);
390 unsigned int r; 390 unsigned int r;
391 r = locomo_readl(mapbase + LOCOMO_SPIWE); 391 r = locomo_readl(mapbase + LOCOMO_SPIWE);
392 r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START)); 392 r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START));
@@ -403,7 +403,7 @@ static void locomo_spi_ack_irq(unsigned int irq)
403 403
404static void locomo_spi_mask_irq(unsigned int irq) 404static void locomo_spi_mask_irq(unsigned int irq)
405{ 405{
406 void *mapbase = get_irq_chipdata(irq); 406 void __iomem *mapbase = get_irq_chipdata(irq);
407 unsigned int r; 407 unsigned int r;
408 r = locomo_readl(mapbase + LOCOMO_SPIIE); 408 r = locomo_readl(mapbase + LOCOMO_SPIIE);
409 r &= ~(0x0001 << (irq - LOCOMO_IRQ_SPI_START)); 409 r &= ~(0x0001 << (irq - LOCOMO_IRQ_SPI_START));
@@ -412,7 +412,7 @@ static void locomo_spi_mask_irq(unsigned int irq)
412 412
413static void locomo_spi_unmask_irq(unsigned int irq) 413static void locomo_spi_unmask_irq(unsigned int irq)
414{ 414{
415 void *mapbase = get_irq_chipdata(irq); 415 void __iomem *mapbase = get_irq_chipdata(irq);
416 unsigned int r; 416 unsigned int r;
417 r = locomo_readl(mapbase + LOCOMO_SPIIE); 417 r = locomo_readl(mapbase + LOCOMO_SPIIE);
418 r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START)); 418 r |= (0x0001 << (irq - LOCOMO_IRQ_SPI_START));
@@ -428,7 +428,7 @@ static struct irqchip locomo_spi_chip = {
428static void locomo_setup_irq(struct locomo *lchip) 428static void locomo_setup_irq(struct locomo *lchip)
429{ 429{
430 int irq; 430 int irq;
431 void *irqbase = lchip->base; 431 void __iomem *irqbase = lchip->base;
432 432
433 /* 433 /*
434 * Install handler for IRQ_LOCOMO_HW. 434 * Install handler for IRQ_LOCOMO_HW.
@@ -501,12 +501,11 @@ locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info)
501 struct locomo_dev *dev; 501 struct locomo_dev *dev;
502 int ret; 502 int ret;
503 503
504 dev = kmalloc(sizeof(struct locomo_dev), GFP_KERNEL); 504 dev = kzalloc(sizeof(struct locomo_dev), GFP_KERNEL);
505 if (!dev) { 505 if (!dev) {
506 ret = -ENOMEM; 506 ret = -ENOMEM;
507 goto out; 507 goto out;
508 } 508 }
509 memset(dev, 0, sizeof(struct locomo_dev));
510 509
511 strncpy(dev->dev.bus_id,info->name,sizeof(dev->dev.bus_id)); 510 strncpy(dev->dev.bus_id,info->name,sizeof(dev->dev.bus_id));
512 /* 511 /*
@@ -664,12 +663,10 @@ __locomo_probe(struct device *me, struct resource *mem, int irq)
664 unsigned long r; 663 unsigned long r;
665 int i, ret = -ENODEV; 664 int i, ret = -ENODEV;
666 665
667 lchip = kmalloc(sizeof(struct locomo), GFP_KERNEL); 666 lchip = kzalloc(sizeof(struct locomo), GFP_KERNEL);
668 if (!lchip) 667 if (!lchip)
669 return -ENOMEM; 668 return -ENOMEM;
670 669
671 memset(lchip, 0, sizeof(struct locomo));
672
673 spin_lock_init(&lchip->lock); 670 spin_lock_init(&lchip->lock);
674 671
675 lchip->dev = me; 672 lchip->dev = me;
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 93352f6097c1..3f68db84e5e6 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -26,6 +26,7 @@
26#include <linux/slab.h> 26#include <linux/slab.h>
27#include <linux/spinlock.h> 27#include <linux/spinlock.h>
28#include <linux/dma-mapping.h> 28#include <linux/dma-mapping.h>
29#include <linux/clk.h>
29 30
30#include <asm/hardware.h> 31#include <asm/hardware.h>
31#include <asm/mach-types.h> 32#include <asm/mach-types.h>
@@ -36,10 +37,6 @@
36 37
37#include <asm/hardware/sa1111.h> 38#include <asm/hardware/sa1111.h>
38 39
39#ifdef CONFIG_ARCH_PXA
40#include <asm/arch/pxa-regs.h>
41#endif
42
43extern void __init sa1110_mb_enable(void); 40extern void __init sa1110_mb_enable(void);
44 41
45/* 42/*
@@ -51,6 +48,7 @@ extern void __init sa1110_mb_enable(void);
51 */ 48 */
52struct sa1111 { 49struct sa1111 {
53 struct device *dev; 50 struct device *dev;
51 struct clk *clk;
54 unsigned long phys; 52 unsigned long phys;
55 int irq; 53 int irq;
56 spinlock_t lock; 54 spinlock_t lock;
@@ -451,19 +449,7 @@ static void sa1111_wake(struct sa1111 *sachip)
451 449
452 spin_lock_irqsave(&sachip->lock, flags); 450 spin_lock_irqsave(&sachip->lock, flags);
453 451
454#ifdef CONFIG_ARCH_SA1100 452 clk_enable(sachip->clk);
455 /*
456 * First, set up the 3.6864MHz clock on GPIO 27 for the SA-1111:
457 * (SA-1110 Developer's Manual, section 9.1.2.1)
458 */
459 GAFR |= GPIO_32_768kHz;
460 GPDR |= GPIO_32_768kHz;
461 TUCR = TUCR_3_6864MHz;
462#elif CONFIG_ARCH_PXA
463 pxa_gpio_mode(GPIO11_3_6MHz_MD);
464#else
465#error missing clock setup
466#endif
467 453
468 /* 454 /*
469 * Turn VCO on, and disable PLL Bypass. 455 * Turn VCO on, and disable PLL Bypass.
@@ -555,12 +541,11 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
555 struct sa1111_dev *dev; 541 struct sa1111_dev *dev;
556 int ret; 542 int ret;
557 543
558 dev = kmalloc(sizeof(struct sa1111_dev), GFP_KERNEL); 544 dev = kzalloc(sizeof(struct sa1111_dev), GFP_KERNEL);
559 if (!dev) { 545 if (!dev) {
560 ret = -ENOMEM; 546 ret = -ENOMEM;
561 goto out; 547 goto out;
562 } 548 }
563 memset(dev, 0, sizeof(struct sa1111_dev));
564 549
565 snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), 550 snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id),
566 "%4.4lx", info->offset); 551 "%4.4lx", info->offset);
@@ -635,11 +620,15 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
635 unsigned int has_devs, val; 620 unsigned int has_devs, val;
636 int i, ret = -ENODEV; 621 int i, ret = -ENODEV;
637 622
638 sachip = kmalloc(sizeof(struct sa1111), GFP_KERNEL); 623 sachip = kzalloc(sizeof(struct sa1111), GFP_KERNEL);
639 if (!sachip) 624 if (!sachip)
640 return -ENOMEM; 625 return -ENOMEM;
641 626
642 memset(sachip, 0, sizeof(struct sa1111)); 627 sachip->clk = clk_get(me, "GPIO27_CLK");
628 if (!sachip->clk) {
629 ret = PTR_ERR(sachip->clk);
630 goto err_free;
631 }
643 632
644 spin_lock_init(&sachip->lock); 633 spin_lock_init(&sachip->lock);
645 634
@@ -656,7 +645,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
656 sachip->base = ioremap(mem->start, PAGE_SIZE * 2); 645 sachip->base = ioremap(mem->start, PAGE_SIZE * 2);
657 if (!sachip->base) { 646 if (!sachip->base) {
658 ret = -ENOMEM; 647 ret = -ENOMEM;
659 goto out; 648 goto err_clkput;
660 } 649 }
661 650
662 /* 651 /*
@@ -666,7 +655,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
666 if ((id & SKID_ID_MASK) != SKID_SA1111_ID) { 655 if ((id & SKID_ID_MASK) != SKID_SA1111_ID) {
667 printk(KERN_DEBUG "SA1111 not detected: ID = %08lx\n", id); 656 printk(KERN_DEBUG "SA1111 not detected: ID = %08lx\n", id);
668 ret = -ENODEV; 657 ret = -ENODEV;
669 goto unmap; 658 goto err_unmap;
670 } 659 }
671 660
672 printk(KERN_INFO "SA1111 Microprocessor Companion Chip: " 661 printk(KERN_INFO "SA1111 Microprocessor Companion Chip: "
@@ -726,9 +715,11 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
726 715
727 return 0; 716 return 0;
728 717
729 unmap: 718 err_unmap:
730 iounmap(sachip->base); 719 iounmap(sachip->base);
731 out: 720 err_clkput:
721 clk_put(sachip->clk);
722 err_free:
732 kfree(sachip); 723 kfree(sachip);
733 return ret; 724 return ret;
734} 725}
@@ -751,6 +742,8 @@ static void __sa1111_remove(struct sa1111 *sachip)
751 sa1111_writel(0, irqbase + SA1111_WAKEEN0); 742 sa1111_writel(0, irqbase + SA1111_WAKEEN0);
752 sa1111_writel(0, irqbase + SA1111_WAKEEN1); 743 sa1111_writel(0, irqbase + SA1111_WAKEEN1);
753 744
745 clk_disable(sachip->clk);
746
754 if (sachip->irq != NO_IRQ) { 747 if (sachip->irq != NO_IRQ) {
755 set_irq_chained_handler(sachip->irq, NULL); 748 set_irq_chained_handler(sachip->irq, NULL);
756 set_irq_data(sachip->irq, NULL); 749 set_irq_data(sachip->irq, NULL);
@@ -759,6 +752,7 @@ static void __sa1111_remove(struct sa1111 *sachip)
759 } 752 }
760 753
761 iounmap(sachip->base); 754 iounmap(sachip->base);
755 clk_put(sachip->clk);
762 kfree(sachip); 756 kfree(sachip);
763} 757}
764 758
@@ -857,6 +851,8 @@ static int sa1111_suspend(struct platform_device *dev, pm_message_t state)
857 sa1111_writel(0, sachip->base + SA1111_SKPWM0); 851 sa1111_writel(0, sachip->base + SA1111_SKPWM0);
858 sa1111_writel(0, sachip->base + SA1111_SKPWM1); 852 sa1111_writel(0, sachip->base + SA1111_SKPWM1);
859 853
854 clk_disable(sachip->clk);
855
860 spin_unlock_irqrestore(&sachip->lock, flags); 856 spin_unlock_irqrestore(&sachip->lock, flags);
861 857
862 return 0; 858 return 0;
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c
index a2dfe0b0f1ec..5e830f444c6c 100644
--- a/arch/arm/common/scoop.c
+++ b/arch/arm/common/scoop.c
@@ -132,12 +132,10 @@ int __init scoop_probe(struct platform_device *pdev)
132 if (!mem) 132 if (!mem)
133 return -EINVAL; 133 return -EINVAL;
134 134
135 devptr = kmalloc(sizeof(struct scoop_dev), GFP_KERNEL); 135 devptr = kzalloc(sizeof(struct scoop_dev), GFP_KERNEL);
136
137 if (!devptr) 136 if (!devptr)
138 return -ENOMEM; 137 return -ENOMEM;
139 138
140 memset(devptr, 0, sizeof(struct scoop_dev));
141 spin_lock_init(&devptr->scoop_lock); 139 spin_lock_init(&devptr->scoop_lock);
142 140
143 inf = pdev->dev.platform_data; 141 inf = pdev->dev.platform_data;
diff --git a/arch/arm/mach-ixp2000/uengine.c b/arch/arm/common/uengine.c
index ec4e007a22ef..a1310b71004e 100644
--- a/arch/arm/mach-ixp2000/uengine.c
+++ b/arch/arm/common/uengine.c
@@ -19,7 +19,7 @@
19#include <linux/string.h> 19#include <linux/string.h>
20#include <asm/hardware.h> 20#include <asm/hardware.h>
21#include <asm/arch/ixp2000-regs.h> 21#include <asm/arch/ixp2000-regs.h>
22#include <asm/arch/uengine.h> 22#include <asm/hardware/uengine.h>
23#include <asm/io.h> 23#include <asm/io.h>
24 24
25#define USTORE_ADDRESS 0x000 25#define USTORE_ADDRESS 0x000
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c
index a45ed1687a59..a19bc4a6196d 100644
--- a/arch/arm/common/vic.c
+++ b/arch/arm/common/vic.c
@@ -22,22 +22,21 @@
22#include <linux/list.h> 22#include <linux/list.h>
23 23
24#include <asm/io.h> 24#include <asm/io.h>
25#include <asm/irq.h>
26#include <asm/mach/irq.h> 25#include <asm/mach/irq.h>
27#include <asm/hardware/vic.h> 26#include <asm/hardware/vic.h>
28 27
29static void __iomem *vic_base;
30
31static void vic_mask_irq(unsigned int irq) 28static void vic_mask_irq(unsigned int irq)
32{ 29{
33 irq -= IRQ_VIC_START; 30 void __iomem *base = get_irq_chipdata(irq);
34 writel(1 << irq, vic_base + VIC_INT_ENABLE_CLEAR); 31 irq &= 31;
32 writel(1 << irq, base + VIC_INT_ENABLE_CLEAR);
35} 33}
36 34
37static void vic_unmask_irq(unsigned int irq) 35static void vic_unmask_irq(unsigned int irq)
38{ 36{
39 irq -= IRQ_VIC_START; 37 void __iomem *base = get_irq_chipdata(irq);
40 writel(1 << irq, vic_base + VIC_INT_ENABLE); 38 irq &= 31;
39 writel(1 << irq, base + VIC_INT_ENABLE);
41} 40}
42 41
43static struct irqchip vic_chip = { 42static struct irqchip vic_chip = {
@@ -46,43 +45,49 @@ static struct irqchip vic_chip = {
46 .unmask = vic_unmask_irq, 45 .unmask = vic_unmask_irq,
47}; 46};
48 47
49void __init vic_init(void __iomem *base, u32 vic_sources) 48/**
49 * vic_init - initialise a vectored interrupt controller
50 * @base: iomem base address
51 * @irq_start: starting interrupt number, must be muliple of 32
52 * @vic_sources: bitmask of interrupt sources to allow
53 */
54void __init vic_init(void __iomem *base, unsigned int irq_start,
55 u32 vic_sources)
50{ 56{
51 unsigned int i; 57 unsigned int i;
52 58
53 vic_base = base;
54
55 /* Disable all interrupts initially. */ 59 /* Disable all interrupts initially. */
56 60
57 writel(0, vic_base + VIC_INT_SELECT); 61 writel(0, base + VIC_INT_SELECT);
58 writel(0, vic_base + VIC_INT_ENABLE); 62 writel(0, base + VIC_INT_ENABLE);
59 writel(~0, vic_base + VIC_INT_ENABLE_CLEAR); 63 writel(~0, base + VIC_INT_ENABLE_CLEAR);
60 writel(0, vic_base + VIC_IRQ_STATUS); 64 writel(0, base + VIC_IRQ_STATUS);
61 writel(0, vic_base + VIC_ITCR); 65 writel(0, base + VIC_ITCR);
62 writel(~0, vic_base + VIC_INT_SOFT_CLEAR); 66 writel(~0, base + VIC_INT_SOFT_CLEAR);
63 67
64 /* 68 /*
65 * Make sure we clear all existing interrupts 69 * Make sure we clear all existing interrupts
66 */ 70 */
67 writel(0, vic_base + VIC_VECT_ADDR); 71 writel(0, base + VIC_VECT_ADDR);
68 for (i = 0; i < 19; i++) { 72 for (i = 0; i < 19; i++) {
69 unsigned int value; 73 unsigned int value;
70 74
71 value = readl(vic_base + VIC_VECT_ADDR); 75 value = readl(base + VIC_VECT_ADDR);
72 writel(value, vic_base + VIC_VECT_ADDR); 76 writel(value, base + VIC_VECT_ADDR);
73 } 77 }
74 78
75 for (i = 0; i < 16; i++) { 79 for (i = 0; i < 16; i++) {
76 void __iomem *reg = vic_base + VIC_VECT_CNTL0 + (i * 4); 80 void __iomem *reg = base + VIC_VECT_CNTL0 + (i * 4);
77 writel(VIC_VECT_CNTL_ENABLE | i, reg); 81 writel(VIC_VECT_CNTL_ENABLE | i, reg);
78 } 82 }
79 83
80 writel(32, vic_base + VIC_DEF_VECT_ADDR); 84 writel(32, base + VIC_DEF_VECT_ADDR);
81 85
82 for (i = 0; i < 32; i++) { 86 for (i = 0; i < 32; i++) {
83 unsigned int irq = IRQ_VIC_START + i; 87 unsigned int irq = irq_start + i;
84 88
85 set_irq_chip(irq, &vic_chip); 89 set_irq_chip(irq, &vic_chip);
90 set_irq_chipdata(irq, base);
86 91
87 if (vic_sources & (1 << i)) { 92 if (vic_sources & (1 << i)) {
88 set_irq_handler(irq, do_level_IRQ); 93 set_irq_handler(irq, do_level_IRQ);
diff --git a/arch/arm/configs/enp2611_defconfig b/arch/arm/configs/ep93xx_defconfig
index 5fdaf3ce9d56..8dcc8e8ec813 100644
--- a/arch/arm/configs/enp2611_defconfig
+++ b/arch/arm/configs/ep93xx_defconfig
@@ -1,11 +1,10 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14-git13 3# Linux kernel version: 2.6.16
4# Thu Nov 10 15:12:48 2005 4# Mon Mar 20 14:54:51 2006
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 8CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 9CONFIG_GENERIC_CALIBRATE_DELAY=y
11 10
@@ -13,7 +12,6 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y
13# Code maturity level options 12# Code maturity level options
14# 13#
15CONFIG_EXPERIMENTAL=y 14CONFIG_EXPERIMENTAL=y
16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN_ON_SMP=y 15CONFIG_BROKEN_ON_SMP=y
18CONFIG_INIT_ENV_ARG_LIMIT=32 16CONFIG_INIT_ENV_ARG_LIMIT=32
19 17
@@ -25,38 +23,42 @@ CONFIG_LOCALVERSION_AUTO=y
25CONFIG_SWAP=y 23CONFIG_SWAP=y
26CONFIG_SYSVIPC=y 24CONFIG_SYSVIPC=y
27# CONFIG_POSIX_MQUEUE is not set 25# CONFIG_POSIX_MQUEUE is not set
28CONFIG_BSD_PROCESS_ACCT=y 26# CONFIG_BSD_PROCESS_ACCT is not set
29# CONFIG_BSD_PROCESS_ACCT_V3 is not set
30CONFIG_SYSCTL=y 27CONFIG_SYSCTL=y
31# CONFIG_AUDIT is not set 28# CONFIG_AUDIT is not set
32# CONFIG_HOTPLUG is not set 29CONFIG_IKCONFIG=y
33CONFIG_KOBJECT_UEVENT=y 30CONFIG_IKCONFIG_PROC=y
34# CONFIG_IKCONFIG is not set
35CONFIG_INITRAMFS_SOURCE="" 31CONFIG_INITRAMFS_SOURCE=""
32CONFIG_UID16=y
33CONFIG_CC_OPTIMIZE_FOR_SIZE=y
36CONFIG_EMBEDDED=y 34CONFIG_EMBEDDED=y
37CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
38# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
39# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_HOTPLUG=y
40CONFIG_PRINTK=y 39CONFIG_PRINTK=y
41CONFIG_BUG=y 40CONFIG_BUG=y
41CONFIG_ELF_CORE=y
42CONFIG_BASE_FULL=y 42CONFIG_BASE_FULL=y
43CONFIG_FUTEX=y 43CONFIG_FUTEX=y
44CONFIG_EPOLL=y 44CONFIG_EPOLL=y
45CONFIG_CC_OPTIMIZE_FOR_SIZE=y
46CONFIG_SHMEM=y 45CONFIG_SHMEM=y
47CONFIG_CC_ALIGN_FUNCTIONS=0 46CONFIG_CC_ALIGN_FUNCTIONS=0
48CONFIG_CC_ALIGN_LABELS=0 47CONFIG_CC_ALIGN_LABELS=0
49CONFIG_CC_ALIGN_LOOPS=0 48CONFIG_CC_ALIGN_LOOPS=0
50CONFIG_CC_ALIGN_JUMPS=0 49CONFIG_CC_ALIGN_JUMPS=0
50CONFIG_SLAB=y
51# CONFIG_TINY_SHMEM is not set 51# CONFIG_TINY_SHMEM is not set
52CONFIG_BASE_SMALL=0 52CONFIG_BASE_SMALL=0
53# CONFIG_SLOB is not set
54CONFIG_OBSOLETE_INTERMODULE=y
53 55
54# 56#
55# Loadable module support 57# Loadable module support
56# 58#
57CONFIG_MODULES=y 59CONFIG_MODULES=y
58CONFIG_MODULE_UNLOAD=y 60CONFIG_MODULE_UNLOAD=y
59# CONFIG_MODULE_FORCE_UNLOAD is not set 61CONFIG_MODULE_FORCE_UNLOAD=y
60CONFIG_OBSOLETE_MODPARM=y 62CONFIG_OBSOLETE_MODPARM=y
61# CONFIG_MODVERSIONS is not set 63# CONFIG_MODVERSIONS is not set
62# CONFIG_MODULE_SRCVERSION_ALL is not set 64# CONFIG_MODULE_SRCVERSION_ALL is not set
@@ -70,14 +72,14 @@ CONFIG_KMOD=y
70# IO Schedulers 72# IO Schedulers
71# 73#
72CONFIG_IOSCHED_NOOP=y 74CONFIG_IOSCHED_NOOP=y
73CONFIG_IOSCHED_AS=y 75# CONFIG_IOSCHED_AS is not set
74CONFIG_IOSCHED_DEADLINE=y 76CONFIG_IOSCHED_DEADLINE=y
75CONFIG_IOSCHED_CFQ=y 77# CONFIG_IOSCHED_CFQ is not set
76CONFIG_DEFAULT_AS=y 78# CONFIG_DEFAULT_AS is not set
77# CONFIG_DEFAULT_DEADLINE is not set 79CONFIG_DEFAULT_DEADLINE=y
78# CONFIG_DEFAULT_CFQ is not set 80# CONFIG_DEFAULT_CFQ is not set
79# CONFIG_DEFAULT_NOOP is not set 81# CONFIG_DEFAULT_NOOP is not set
80CONFIG_DEFAULT_IOSCHED="anticipatory" 82CONFIG_DEFAULT_IOSCHED="deadline"
81 83
82# 84#
83# System Type 85# System Type
@@ -86,11 +88,12 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
86# CONFIG_ARCH_CLPS711X is not set 88# CONFIG_ARCH_CLPS711X is not set
87# CONFIG_ARCH_CO285 is not set 89# CONFIG_ARCH_CO285 is not set
88# CONFIG_ARCH_EBSA110 is not set 90# CONFIG_ARCH_EBSA110 is not set
91CONFIG_ARCH_EP93XX=y
89# CONFIG_ARCH_FOOTBRIDGE is not set 92# CONFIG_ARCH_FOOTBRIDGE is not set
90# CONFIG_ARCH_INTEGRATOR is not set 93# CONFIG_ARCH_INTEGRATOR is not set
91# CONFIG_ARCH_IOP3XX is not set 94# CONFIG_ARCH_IOP3XX is not set
92# CONFIG_ARCH_IXP4XX is not set 95# CONFIG_ARCH_IXP4XX is not set
93CONFIG_ARCH_IXP2000=y 96# CONFIG_ARCH_IXP2000 is not set
94# CONFIG_ARCH_L7200 is not set 97# CONFIG_ARCH_L7200 is not set
95# CONFIG_ARCH_PXA is not set 98# CONFIG_ARCH_PXA is not set
96# CONFIG_ARCH_RPC is not set 99# CONFIG_ARCH_RPC is not set
@@ -104,46 +107,44 @@ CONFIG_ARCH_IXP2000=y
104# CONFIG_ARCH_IMX is not set 107# CONFIG_ARCH_IMX is not set
105# CONFIG_ARCH_H720X is not set 108# CONFIG_ARCH_H720X is not set
106# CONFIG_ARCH_AAEC2000 is not set 109# CONFIG_ARCH_AAEC2000 is not set
107CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y 110# CONFIG_ARCH_AT91RM9200 is not set
108 111
109# 112#
110# Intel IXP2400/2800 Implementation Options 113# Cirrus EP93xx Implementation Options
111# 114#
115CONFIG_CRUNCH=y
112 116
113# 117#
114# IXP2400/2800 Platforms 118# EP93xx Platforms
115# 119#
116CONFIG_ARCH_ENP2611=y 120CONFIG_MACH_GESBC9312=y
117# CONFIG_ARCH_IXDP2400 is not set 121CONFIG_MACH_TS72XX=y
118# CONFIG_ARCH_IXDP2800 is not set
119# CONFIG_ARCH_IXDP2401 is not set
120# CONFIG_ARCH_IXDP2801 is not set
121# CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set
122 122
123# 123#
124# Processor Type 124# Processor Type
125# 125#
126CONFIG_CPU_32=y 126CONFIG_CPU_32=y
127CONFIG_CPU_XSCALE=y 127CONFIG_CPU_ARM920T=y
128CONFIG_CPU_32v5=y 128CONFIG_CPU_32v4=y
129CONFIG_CPU_ABRT_EV5T=y 129CONFIG_CPU_ABRT_EV4T=y
130CONFIG_CPU_CACHE_V4WT=y
130CONFIG_CPU_CACHE_VIVT=y 131CONFIG_CPU_CACHE_VIVT=y
132CONFIG_CPU_COPY_V4WB=y
131CONFIG_CPU_TLB_V4WBI=y 133CONFIG_CPU_TLB_V4WBI=y
132 134
133# 135#
134# Processor Features 136# Processor Features
135# 137#
136# CONFIG_ARM_THUMB is not set 138CONFIG_ARM_THUMB=y
137CONFIG_CPU_BIG_ENDIAN=y 139# CONFIG_CPU_ICACHE_DISABLE is not set
138CONFIG_XSCALE_PMU=y 140# CONFIG_CPU_DCACHE_DISABLE is not set
141# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
142CONFIG_ARM_VIC=y
139 143
140# 144#
141# Bus support 145# Bus support
142# 146#
143CONFIG_ISA_DMA_API=y 147CONFIG_ARM_AMBA=y
144CONFIG_PCI=y
145CONFIG_PCI_LEGACY_PROC=y
146# CONFIG_PCI_DEBUG is not set
147 148
148# 149#
149# PCCARD (PCMCIA/CardBus) support 150# PCCARD (PCMCIA/CardBus) support
@@ -155,6 +156,8 @@ CONFIG_PCI_LEGACY_PROC=y
155# 156#
156# CONFIG_PREEMPT is not set 157# CONFIG_PREEMPT is not set
157# CONFIG_NO_IDLE_HZ is not set 158# CONFIG_NO_IDLE_HZ is not set
159CONFIG_HZ=100
160# CONFIG_AEABI is not set
158# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 161# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
159CONFIG_SELECT_MEMORY_MODEL=y 162CONFIG_SELECT_MEMORY_MODEL=y
160CONFIG_FLATMEM_MANUAL=y 163CONFIG_FLATMEM_MANUAL=y
@@ -171,7 +174,7 @@ CONFIG_ALIGNMENT_TRAP=y
171# 174#
172CONFIG_ZBOOT_ROM_TEXT=0x0 175CONFIG_ZBOOT_ROM_TEXT=0x0
173CONFIG_ZBOOT_ROM_BSS=0x0 176CONFIG_ZBOOT_ROM_BSS=0x0
174CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0" 177CONFIG_CMDLINE="console=ttyAM0,115200 root=/dev/nfs ip=bootp"
175# CONFIG_XIP_KERNEL is not set 178# CONFIG_XIP_KERNEL is not set
176 179
177# 180#
@@ -197,6 +200,7 @@ CONFIG_BINFMT_ELF=y
197# Power management options 200# Power management options
198# 201#
199# CONFIG_PM is not set 202# CONFIG_PM is not set
203# CONFIG_APM is not set
200 204
201# 205#
202# Networking 206# Networking
@@ -206,10 +210,13 @@ CONFIG_NET=y
206# 210#
207# Networking options 211# Networking options
208# 212#
213# CONFIG_NETDEBUG is not set
209CONFIG_PACKET=y 214CONFIG_PACKET=y
210CONFIG_PACKET_MMAP=y 215CONFIG_PACKET_MMAP=y
211CONFIG_UNIX=y 216CONFIG_UNIX=y
212# CONFIG_NET_KEY is not set 217CONFIG_XFRM=y
218# CONFIG_XFRM_USER is not set
219CONFIG_NET_KEY=y
213CONFIG_INET=y 220CONFIG_INET=y
214# CONFIG_IP_MULTICAST is not set 221# CONFIG_IP_MULTICAST is not set
215# CONFIG_IP_ADVANCED_ROUTER is not set 222# CONFIG_IP_ADVANCED_ROUTER is not set
@@ -242,6 +249,11 @@ CONFIG_TCP_CONG_BIC=y
242# SCTP Configuration (EXPERIMENTAL) 249# SCTP Configuration (EXPERIMENTAL)
243# 250#
244# CONFIG_IP_SCTP is not set 251# CONFIG_IP_SCTP is not set
252
253#
254# TIPC Configuration (EXPERIMENTAL)
255#
256# CONFIG_TIPC is not set
245# CONFIG_ATM is not set 257# CONFIG_ATM is not set
246# CONFIG_BRIDGE is not set 258# CONFIG_BRIDGE is not set
247# CONFIG_VLAN_8021Q is not set 259# CONFIG_VLAN_8021Q is not set
@@ -259,7 +271,6 @@ CONFIG_TCP_CONG_BIC=y
259# QoS and/or fair queueing 271# QoS and/or fair queueing
260# 272#
261# CONFIG_NET_SCHED is not set 273# CONFIG_NET_SCHED is not set
262# CONFIG_NET_CLS_ROUTE is not set
263 274
264# 275#
265# Network testing 276# Network testing
@@ -278,21 +289,26 @@ CONFIG_TCP_CONG_BIC=y
278# Generic Driver Options 289# Generic Driver Options
279# 290#
280CONFIG_STANDALONE=y 291CONFIG_STANDALONE=y
281# CONFIG_PREVENT_FIRMWARE_BUILD is not set 292CONFIG_PREVENT_FIRMWARE_BUILD=y
282# CONFIG_FW_LOADER is not set 293# CONFIG_FW_LOADER is not set
283# CONFIG_DEBUG_DRIVER is not set 294# CONFIG_DEBUG_DRIVER is not set
284 295
285# 296#
297# Connector - unified userspace <-> kernelspace linker
298#
299# CONFIG_CONNECTOR is not set
300
301#
286# Memory Technology Devices (MTD) 302# Memory Technology Devices (MTD)
287# 303#
288CONFIG_MTD=y 304CONFIG_MTD=y
289# CONFIG_MTD_DEBUG is not set 305# CONFIG_MTD_DEBUG is not set
290# CONFIG_MTD_CONCAT is not set 306CONFIG_MTD_CONCAT=y
291CONFIG_MTD_PARTITIONS=y 307CONFIG_MTD_PARTITIONS=y
292CONFIG_MTD_REDBOOT_PARTS=y 308CONFIG_MTD_REDBOOT_PARTS=y
293CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 309CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
294CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y 310# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
295CONFIG_MTD_REDBOOT_PARTS_READONLY=y 311# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
296# CONFIG_MTD_CMDLINE_PARTS is not set 312# CONFIG_MTD_CMDLINE_PARTS is not set
297# CONFIG_MTD_AFS_PARTS is not set 313# CONFIG_MTD_AFS_PARTS is not set
298 314
@@ -312,7 +328,11 @@ CONFIG_MTD_BLOCK=y
312CONFIG_MTD_CFI=y 328CONFIG_MTD_CFI=y
313# CONFIG_MTD_JEDECPROBE is not set 329# CONFIG_MTD_JEDECPROBE is not set
314CONFIG_MTD_GEN_PROBE=y 330CONFIG_MTD_GEN_PROBE=y
315# CONFIG_MTD_CFI_ADV_OPTIONS is not set 331CONFIG_MTD_CFI_ADV_OPTIONS=y
332CONFIG_MTD_CFI_NOSWAP=y
333# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
334# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
335# CONFIG_MTD_CFI_GEOMETRY is not set
316CONFIG_MTD_MAP_BANK_WIDTH_1=y 336CONFIG_MTD_MAP_BANK_WIDTH_1=y
317CONFIG_MTD_MAP_BANK_WIDTH_2=y 337CONFIG_MTD_MAP_BANK_WIDTH_2=y
318CONFIG_MTD_MAP_BANK_WIDTH_4=y 338CONFIG_MTD_MAP_BANK_WIDTH_4=y
@@ -323,29 +343,31 @@ CONFIG_MTD_CFI_I1=y
323CONFIG_MTD_CFI_I2=y 343CONFIG_MTD_CFI_I2=y
324# CONFIG_MTD_CFI_I4 is not set 344# CONFIG_MTD_CFI_I4 is not set
325# CONFIG_MTD_CFI_I8 is not set 345# CONFIG_MTD_CFI_I8 is not set
346# CONFIG_MTD_OTP is not set
326CONFIG_MTD_CFI_INTELEXT=y 347CONFIG_MTD_CFI_INTELEXT=y
327# CONFIG_MTD_CFI_AMDSTD is not set 348CONFIG_MTD_CFI_AMDSTD=y
328# CONFIG_MTD_CFI_STAA is not set 349CONFIG_MTD_CFI_AMDSTD_RETRY=0
350CONFIG_MTD_CFI_STAA=y
329CONFIG_MTD_CFI_UTIL=y 351CONFIG_MTD_CFI_UTIL=y
330# CONFIG_MTD_RAM is not set 352# CONFIG_MTD_RAM is not set
331# CONFIG_MTD_ROM is not set 353CONFIG_MTD_ROM=y
332# CONFIG_MTD_ABSENT is not set 354# CONFIG_MTD_ABSENT is not set
333# CONFIG_MTD_XIP is not set 355# CONFIG_MTD_OBSOLETE_CHIPS is not set
334 356
335# 357#
336# Mapping drivers for chip access 358# Mapping drivers for chip access
337# 359#
338CONFIG_MTD_COMPLEX_MAPPINGS=y 360# CONFIG_MTD_COMPLEX_MAPPINGS is not set
339# CONFIG_MTD_PHYSMAP is not set 361CONFIG_MTD_PHYSMAP=y
362CONFIG_MTD_PHYSMAP_START=0x0
363CONFIG_MTD_PHYSMAP_LEN=0x0
364CONFIG_MTD_PHYSMAP_BANKWIDTH=1
340# CONFIG_MTD_ARM_INTEGRATOR is not set 365# CONFIG_MTD_ARM_INTEGRATOR is not set
341CONFIG_MTD_IXP2000=y
342# CONFIG_MTD_PCI is not set
343# CONFIG_MTD_PLATRAM is not set 366# CONFIG_MTD_PLATRAM is not set
344 367
345# 368#
346# Self-contained MTD device drivers 369# Self-contained MTD device drivers
347# 370#
348# CONFIG_MTD_PMC551 is not set
349# CONFIG_MTD_SLRAM is not set 371# CONFIG_MTD_SLRAM is not set
350# CONFIG_MTD_PHRAM is not set 372# CONFIG_MTD_PHRAM is not set
351# CONFIG_MTD_MTDRAM is not set 373# CONFIG_MTD_MTDRAM is not set
@@ -362,7 +384,11 @@ CONFIG_MTD_IXP2000=y
362# 384#
363# NAND Flash Device Drivers 385# NAND Flash Device Drivers
364# 386#
365# CONFIG_MTD_NAND is not set 387CONFIG_MTD_NAND=y
388CONFIG_MTD_NAND_VERIFY_WRITE=y
389CONFIG_MTD_NAND_IDS=y
390# CONFIG_MTD_NAND_DISKONCHIP is not set
391# CONFIG_MTD_NAND_NANDSIM is not set
366 392
367# 393#
368# OneNAND Flash Device Drivers 394# OneNAND Flash Device Drivers
@@ -381,19 +407,12 @@ CONFIG_MTD_IXP2000=y
381# 407#
382# Block devices 408# Block devices
383# 409#
384# CONFIG_BLK_CPQ_DA is not set
385# CONFIG_BLK_CPQ_CISS_DA is not set
386# CONFIG_BLK_DEV_DAC960 is not set
387# CONFIG_BLK_DEV_UMEM is not set
388# CONFIG_BLK_DEV_COW_COMMON is not set 410# CONFIG_BLK_DEV_COW_COMMON is not set
389CONFIG_BLK_DEV_LOOP=y 411# CONFIG_BLK_DEV_LOOP is not set
390# CONFIG_BLK_DEV_CRYPTOLOOP is not set
391# CONFIG_BLK_DEV_NBD is not set 412# CONFIG_BLK_DEV_NBD is not set
392# CONFIG_BLK_DEV_SX8 is not set 413# CONFIG_BLK_DEV_UB is not set
393CONFIG_BLK_DEV_RAM=y 414# CONFIG_BLK_DEV_RAM is not set
394CONFIG_BLK_DEV_RAM_COUNT=16 415CONFIG_BLK_DEV_RAM_COUNT=16
395CONFIG_BLK_DEV_RAM_SIZE=8192
396CONFIG_BLK_DEV_INITRD=y
397# CONFIG_CDROM_PKTCDVD is not set 416# CONFIG_CDROM_PKTCDVD is not set
398# CONFIG_ATA_OVER_ETH is not set 417# CONFIG_ATA_OVER_ETH is not set
399 418
@@ -401,7 +420,40 @@ CONFIG_BLK_DEV_INITRD=y
401# SCSI device support 420# SCSI device support
402# 421#
403# CONFIG_RAID_ATTRS is not set 422# CONFIG_RAID_ATTRS is not set
404# CONFIG_SCSI is not set 423CONFIG_SCSI=y
424# CONFIG_SCSI_PROC_FS is not set
425
426#
427# SCSI support type (disk, tape, CD-ROM)
428#
429CONFIG_BLK_DEV_SD=y
430# CONFIG_CHR_DEV_ST is not set
431# CONFIG_CHR_DEV_OSST is not set
432# CONFIG_BLK_DEV_SR is not set
433# CONFIG_CHR_DEV_SG is not set
434# CONFIG_CHR_DEV_SCH is not set
435
436#
437# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
438#
439# CONFIG_SCSI_MULTI_LUN is not set
440# CONFIG_SCSI_CONSTANTS is not set
441# CONFIG_SCSI_LOGGING is not set
442
443#
444# SCSI Transport Attributes
445#
446# CONFIG_SCSI_SPI_ATTRS is not set
447# CONFIG_SCSI_FC_ATTRS is not set
448# CONFIG_SCSI_ISCSI_ATTRS is not set
449# CONFIG_SCSI_SAS_ATTRS is not set
450
451#
452# SCSI low-level drivers
453#
454# CONFIG_ISCSI_TCP is not set
455# CONFIG_SCSI_SATA is not set
456# CONFIG_SCSI_DEBUG is not set
405 457
406# 458#
407# Multi-device support (RAID and LVM) 459# Multi-device support (RAID and LVM)
@@ -416,28 +468,21 @@ CONFIG_BLK_DEV_INITRD=y
416# 468#
417# IEEE 1394 (FireWire) support 469# IEEE 1394 (FireWire) support
418# 470#
419# CONFIG_IEEE1394 is not set
420 471
421# 472#
422# I2O device support 473# I2O device support
423# 474#
424# CONFIG_I2O is not set
425 475
426# 476#
427# Network device support 477# Network device support
428# 478#
429CONFIG_NETDEVICES=y 479CONFIG_NETDEVICES=y
430CONFIG_DUMMY=y 480# CONFIG_DUMMY is not set
431# CONFIG_BONDING is not set 481# CONFIG_BONDING is not set
432# CONFIG_EQUALIZER is not set 482# CONFIG_EQUALIZER is not set
433# CONFIG_TUN is not set 483# CONFIG_TUN is not set
434 484
435# 485#
436# ARCnet devices
437#
438# CONFIG_ARCNET is not set
439
440#
441# PHY device support 486# PHY device support
442# 487#
443# CONFIG_PHYLIB is not set 488# CONFIG_PHYLIB is not set
@@ -447,66 +492,20 @@ CONFIG_DUMMY=y
447# 492#
448CONFIG_NET_ETHERNET=y 493CONFIG_NET_ETHERNET=y
449CONFIG_MII=y 494CONFIG_MII=y
450# CONFIG_HAPPYMEAL is not set
451# CONFIG_SUNGEM is not set
452# CONFIG_CASSINI is not set
453# CONFIG_NET_VENDOR_3COM is not set
454# CONFIG_SMC91X is not set 495# CONFIG_SMC91X is not set
455# CONFIG_DM9000 is not set 496# CONFIG_DM9000 is not set
456 497
457# 498#
458# Tulip family network device support
459#
460# CONFIG_NET_TULIP is not set
461# CONFIG_HP100 is not set
462CONFIG_NET_PCI=y
463# CONFIG_PCNET32 is not set
464# CONFIG_AMD8111_ETH is not set
465# CONFIG_ADAPTEC_STARFIRE is not set
466# CONFIG_B44 is not set
467# CONFIG_FORCEDETH is not set
468# CONFIG_DGRS is not set
469CONFIG_EEPRO100=y
470# CONFIG_E100 is not set
471# CONFIG_FEALNX is not set
472# CONFIG_NATSEMI is not set
473# CONFIG_NE2K_PCI is not set
474# CONFIG_8139CP is not set
475# CONFIG_8139TOO is not set
476# CONFIG_SIS900 is not set
477# CONFIG_EPIC100 is not set
478# CONFIG_SUNDANCE is not set
479# CONFIG_TLAN is not set
480# CONFIG_VIA_RHINE is not set
481
482#
483# Ethernet (1000 Mbit) 499# Ethernet (1000 Mbit)
484# 500#
485# CONFIG_ACENIC is not set
486# CONFIG_DL2K is not set
487# CONFIG_E1000 is not set
488# CONFIG_NS83820 is not set
489# CONFIG_HAMACHI is not set
490# CONFIG_YELLOWFIN is not set
491# CONFIG_R8169 is not set
492# CONFIG_SIS190 is not set
493# CONFIG_SKGE is not set
494# CONFIG_SK98LIN is not set
495# CONFIG_VIA_VELOCITY is not set
496# CONFIG_TIGON3 is not set
497# CONFIG_BNX2 is not set
498 501
499# 502#
500# Ethernet (10000 Mbit) 503# Ethernet (10000 Mbit)
501# 504#
502# CONFIG_CHELSIO_T1 is not set
503# CONFIG_IXGB is not set
504# CONFIG_S2IO is not set
505 505
506# 506#
507# Token Ring devices 507# Token Ring devices
508# 508#
509# CONFIG_TR is not set
510 509
511# 510#
512# Wireless LAN (non-hamradio) 511# Wireless LAN (non-hamradio)
@@ -516,29 +515,7 @@ CONFIG_EEPRO100=y
516# 515#
517# Wan interfaces 516# Wan interfaces
518# 517#
519CONFIG_WAN=y 518# CONFIG_WAN is not set
520# CONFIG_DSCC4 is not set
521# CONFIG_LANMEDIA is not set
522# CONFIG_SYNCLINK_SYNCPPP is not set
523CONFIG_HDLC=y
524CONFIG_HDLC_RAW=y
525# CONFIG_HDLC_RAW_ETH is not set
526CONFIG_HDLC_CISCO=y
527CONFIG_HDLC_FR=y
528CONFIG_HDLC_PPP=y
529
530#
531# X.25/LAPB support is disabled
532#
533# CONFIG_PCI200SYN is not set
534# CONFIG_WANXL is not set
535# CONFIG_PC300 is not set
536# CONFIG_FARSYNC is not set
537CONFIG_DLCI=y
538CONFIG_DLCI_COUNT=24
539CONFIG_DLCI_MAX=8
540# CONFIG_FDDI is not set
541# CONFIG_HIPPI is not set
542# CONFIG_PPP is not set 519# CONFIG_PPP is not set
543# CONFIG_SLIP is not set 520# CONFIG_SLIP is not set
544# CONFIG_SHAPER is not set 521# CONFIG_SHAPER is not set
@@ -554,28 +531,7 @@ CONFIG_DLCI_MAX=8
554# 531#
555# Input device support 532# Input device support
556# 533#
557CONFIG_INPUT=y 534# CONFIG_INPUT is not set
558
559#
560# Userland interfaces
561#
562CONFIG_INPUT_MOUSEDEV=y
563CONFIG_INPUT_MOUSEDEV_PSAUX=y
564CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
565CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
566# CONFIG_INPUT_JOYDEV is not set
567# CONFIG_INPUT_TSDEV is not set
568# CONFIG_INPUT_EVDEV is not set
569# CONFIG_INPUT_EVBUG is not set
570
571#
572# Input Device Drivers
573#
574# CONFIG_INPUT_KEYBOARD is not set
575# CONFIG_INPUT_MOUSE is not set
576# CONFIG_INPUT_JOYSTICK is not set
577# CONFIG_INPUT_TOUCHSCREEN is not set
578# CONFIG_INPUT_MISC is not set
579 535
580# 536#
581# Hardware I/O ports 537# Hardware I/O ports
@@ -592,20 +548,18 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
592# 548#
593# Serial drivers 549# Serial drivers
594# 550#
595CONFIG_SERIAL_8250=y 551# CONFIG_SERIAL_8250 is not set
596CONFIG_SERIAL_8250_CONSOLE=y
597CONFIG_SERIAL_8250_NR_UARTS=2
598# CONFIG_SERIAL_8250_EXTENDED is not set
599 552
600# 553#
601# Non-8250 serial port support 554# Non-8250 serial port support
602# 555#
556CONFIG_SERIAL_AMBA_PL010=y
557CONFIG_SERIAL_AMBA_PL010_CONSOLE=y
558# CONFIG_SERIAL_AMBA_PL011 is not set
603CONFIG_SERIAL_CORE=y 559CONFIG_SERIAL_CORE=y
604CONFIG_SERIAL_CORE_CONSOLE=y 560CONFIG_SERIAL_CORE_CONSOLE=y
605# CONFIG_SERIAL_JSM is not set
606CONFIG_UNIX98_PTYS=y 561CONFIG_UNIX98_PTYS=y
607CONFIG_LEGACY_PTYS=y 562# CONFIG_LEGACY_PTYS is not set
608CONFIG_LEGACY_PTY_COUNT=256
609 563
610# 564#
611# IPMI 565# IPMI
@@ -622,23 +576,19 @@ CONFIG_WATCHDOG=y
622# Watchdog Device Drivers 576# Watchdog Device Drivers
623# 577#
624# CONFIG_SOFT_WATCHDOG is not set 578# CONFIG_SOFT_WATCHDOG is not set
625CONFIG_IXP2000_WATCHDOG=y
626 579
627# 580#
628# PCI-based Watchdog Cards 581# USB-based Watchdog Cards
629# 582#
630# CONFIG_PCIPCWATCHDOG is not set 583# CONFIG_USBPCWATCHDOG is not set
631# CONFIG_WDTPCI is not set
632# CONFIG_NVRAM is not set 584# CONFIG_NVRAM is not set
633# CONFIG_RTC is not set 585# CONFIG_RTC is not set
634# CONFIG_DTLK is not set 586# CONFIG_DTLK is not set
635# CONFIG_R3964 is not set 587# CONFIG_R3964 is not set
636# CONFIG_APPLICOM is not set
637 588
638# 589#
639# Ftape, the floppy tape device driver 590# Ftape, the floppy tape device driver
640# 591#
641# CONFIG_DRM is not set
642# CONFIG_RAW_DRIVER is not set 592# CONFIG_RAW_DRIVER is not set
643 593
644# 594#
@@ -663,27 +613,8 @@ CONFIG_I2C_ALGOBIT=y
663# 613#
664# I2C Hardware Bus support 614# I2C Hardware Bus support
665# 615#
666# CONFIG_I2C_ALI1535 is not set
667# CONFIG_I2C_ALI1563 is not set
668# CONFIG_I2C_ALI15X3 is not set
669# CONFIG_I2C_AMD756 is not set
670# CONFIG_I2C_AMD8111 is not set
671# CONFIG_I2C_I801 is not set
672# CONFIG_I2C_I810 is not set
673# CONFIG_I2C_PIIX4 is not set
674CONFIG_I2C_IXP2000=y
675# CONFIG_I2C_NFORCE2 is not set
676# CONFIG_I2C_PARPORT_LIGHT is not set 616# CONFIG_I2C_PARPORT_LIGHT is not set
677# CONFIG_I2C_PROSAVAGE is not set
678# CONFIG_I2C_SAVAGE4 is not set
679# CONFIG_SCx200_ACB is not set
680# CONFIG_I2C_SIS5595 is not set
681# CONFIG_I2C_SIS630 is not set
682# CONFIG_I2C_SIS96X is not set
683# CONFIG_I2C_STUB is not set 617# CONFIG_I2C_STUB is not set
684# CONFIG_I2C_VIA is not set
685# CONFIG_I2C_VIAPRO is not set
686# CONFIG_I2C_VOODOO3 is not set
687# CONFIG_I2C_PCA_ISA is not set 618# CONFIG_I2C_PCA_ISA is not set
688 619
689# 620#
@@ -691,17 +622,28 @@ CONFIG_I2C_IXP2000=y
691# 622#
692# CONFIG_SENSORS_DS1337 is not set 623# CONFIG_SENSORS_DS1337 is not set
693# CONFIG_SENSORS_DS1374 is not set 624# CONFIG_SENSORS_DS1374 is not set
694CONFIG_SENSORS_EEPROM=y 625# CONFIG_SENSORS_EEPROM is not set
695# CONFIG_SENSORS_PCF8574 is not set 626# CONFIG_SENSORS_PCF8574 is not set
696# CONFIG_SENSORS_PCA9539 is not set 627# CONFIG_SENSORS_PCA9539 is not set
697# CONFIG_SENSORS_PCF8591 is not set 628# CONFIG_SENSORS_PCF8591 is not set
698# CONFIG_SENSORS_RTC8564 is not set 629# CONFIG_SENSORS_RTC8564 is not set
699# CONFIG_SENSORS_MAX6875 is not set 630# CONFIG_SENSORS_MAX6875 is not set
700# CONFIG_RTC_X1205_I2C is not set 631# CONFIG_RTC_X1205_I2C is not set
701# CONFIG_I2C_DEBUG_CORE is not set 632CONFIG_I2C_DEBUG_CORE=y
702# CONFIG_I2C_DEBUG_ALGO is not set 633CONFIG_I2C_DEBUG_ALGO=y
703# CONFIG_I2C_DEBUG_BUS is not set 634CONFIG_I2C_DEBUG_BUS=y
704# CONFIG_I2C_DEBUG_CHIP is not set 635CONFIG_I2C_DEBUG_CHIP=y
636
637#
638# SPI support
639#
640# CONFIG_SPI is not set
641# CONFIG_SPI_MASTER is not set
642
643#
644# Dallas's 1-wire bus
645#
646# CONFIG_W1 is not set
705 647
706# 648#
707# Hardware Monitoring support 649# Hardware Monitoring support
@@ -716,6 +658,7 @@ CONFIG_HWMON=y
716# CONFIG_SENSORS_ASB100 is not set 658# CONFIG_SENSORS_ASB100 is not set
717# CONFIG_SENSORS_ATXP1 is not set 659# CONFIG_SENSORS_ATXP1 is not set
718# CONFIG_SENSORS_DS1621 is not set 660# CONFIG_SENSORS_DS1621 is not set
661# CONFIG_SENSORS_F71805F is not set
719# CONFIG_SENSORS_FSCHER is not set 662# CONFIG_SENSORS_FSCHER is not set
720# CONFIG_SENSORS_FSCPOS is not set 663# CONFIG_SENSORS_FSCPOS is not set
721# CONFIG_SENSORS_GL518SM is not set 664# CONFIG_SENSORS_GL518SM is not set
@@ -733,10 +676,8 @@ CONFIG_HWMON=y
733# CONFIG_SENSORS_LM92 is not set 676# CONFIG_SENSORS_LM92 is not set
734# CONFIG_SENSORS_MAX1619 is not set 677# CONFIG_SENSORS_MAX1619 is not set
735# CONFIG_SENSORS_PC87360 is not set 678# CONFIG_SENSORS_PC87360 is not set
736# CONFIG_SENSORS_SIS5595 is not set
737# CONFIG_SENSORS_SMSC47M1 is not set 679# CONFIG_SENSORS_SMSC47M1 is not set
738# CONFIG_SENSORS_SMSC47B397 is not set 680# CONFIG_SENSORS_SMSC47B397 is not set
739# CONFIG_SENSORS_VIA686A is not set
740# CONFIG_SENSORS_W83781D is not set 681# CONFIG_SENSORS_W83781D is not set
741# CONFIG_SENSORS_W83792D is not set 682# CONFIG_SENSORS_W83792D is not set
742# CONFIG_SENSORS_W83L785TS is not set 683# CONFIG_SENSORS_W83L785TS is not set
@@ -776,14 +717,144 @@ CONFIG_HWMON=y
776# USB support 717# USB support
777# 718#
778CONFIG_USB_ARCH_HAS_HCD=y 719CONFIG_USB_ARCH_HAS_HCD=y
779CONFIG_USB_ARCH_HAS_OHCI=y 720# CONFIG_USB_ARCH_HAS_OHCI is not set
780# CONFIG_USB is not set 721CONFIG_USB=y
722CONFIG_USB_DEBUG=y
723
724#
725# Miscellaneous USB options
726#
727CONFIG_USB_DEVICEFS=y
728# CONFIG_USB_BANDWIDTH is not set
729CONFIG_USB_DYNAMIC_MINORS=y
730# CONFIG_USB_OTG is not set
731
732#
733# USB Host Controller Drivers
734#
735# CONFIG_USB_ISP116X_HCD is not set
736# CONFIG_USB_SL811_HCD is not set
737
738#
739# USB Device Class drivers
740#
741# CONFIG_USB_ACM is not set
742# CONFIG_USB_PRINTER is not set
781 743
782# 744#
783# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 745# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
784# 746#
785 747
786# 748#
749# may also be needed; see USB_STORAGE Help for more information
750#
751CONFIG_USB_STORAGE=y
752# CONFIG_USB_STORAGE_DEBUG is not set
753# CONFIG_USB_STORAGE_DATAFAB is not set
754# CONFIG_USB_STORAGE_FREECOM is not set
755# CONFIG_USB_STORAGE_DPCM is not set
756# CONFIG_USB_STORAGE_USBAT is not set
757# CONFIG_USB_STORAGE_SDDR09 is not set
758# CONFIG_USB_STORAGE_SDDR55 is not set
759# CONFIG_USB_STORAGE_JUMPSHOT is not set
760# CONFIG_USB_STORAGE_ALAUDA is not set
761# CONFIG_USB_LIBUSUAL is not set
762
763#
764# USB Input Devices
765#
766# CONFIG_USB_HID is not set
767
768#
769# USB HID Boot Protocol drivers
770#
771
772#
773# USB Imaging devices
774#
775# CONFIG_USB_MDC800 is not set
776# CONFIG_USB_MICROTEK is not set
777
778#
779# USB Multimedia devices
780#
781# CONFIG_USB_DABUSB is not set
782
783#
784# Video4Linux support is needed for USB Multimedia device support
785#
786
787#
788# USB Network Adapters
789#
790# CONFIG_USB_CATC is not set
791# CONFIG_USB_KAWETH is not set
792# CONFIG_USB_PEGASUS is not set
793CONFIG_USB_RTL8150=y
794# CONFIG_USB_USBNET is not set
795# CONFIG_USB_MON is not set
796
797#
798# USB port drivers
799#
800
801#
802# USB Serial Converter support
803#
804CONFIG_USB_SERIAL=y
805CONFIG_USB_SERIAL_CONSOLE=y
806# CONFIG_USB_SERIAL_GENERIC is not set
807# CONFIG_USB_SERIAL_AIRPRIME is not set
808# CONFIG_USB_SERIAL_ANYDATA is not set
809# CONFIG_USB_SERIAL_BELKIN is not set
810# CONFIG_USB_SERIAL_WHITEHEAT is not set
811# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
812# CONFIG_USB_SERIAL_CP2101 is not set
813# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
814# CONFIG_USB_SERIAL_EMPEG is not set
815# CONFIG_USB_SERIAL_FTDI_SIO is not set
816# CONFIG_USB_SERIAL_VISOR is not set
817# CONFIG_USB_SERIAL_IPAQ is not set
818# CONFIG_USB_SERIAL_IR is not set
819# CONFIG_USB_SERIAL_EDGEPORT is not set
820# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
821# CONFIG_USB_SERIAL_GARMIN is not set
822# CONFIG_USB_SERIAL_IPW is not set
823# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
824# CONFIG_USB_SERIAL_KEYSPAN is not set
825# CONFIG_USB_SERIAL_KLSI is not set
826# CONFIG_USB_SERIAL_KOBIL_SCT is not set
827# CONFIG_USB_SERIAL_MCT_U232 is not set
828CONFIG_USB_SERIAL_PL2303=y
829# CONFIG_USB_SERIAL_HP4X is not set
830# CONFIG_USB_SERIAL_SAFE is not set
831# CONFIG_USB_SERIAL_TI is not set
832# CONFIG_USB_SERIAL_CYBERJACK is not set
833# CONFIG_USB_SERIAL_XIRCOM is not set
834# CONFIG_USB_SERIAL_OMNINET is not set
835
836#
837# USB Miscellaneous drivers
838#
839# CONFIG_USB_EMI62 is not set
840# CONFIG_USB_EMI26 is not set
841# CONFIG_USB_AUERSWALD is not set
842# CONFIG_USB_RIO500 is not set
843# CONFIG_USB_LEGOTOWER is not set
844# CONFIG_USB_LCD is not set
845# CONFIG_USB_LED is not set
846# CONFIG_USB_CYTHERM is not set
847# CONFIG_USB_PHIDGETKIT is not set
848# CONFIG_USB_PHIDGETSERVO is not set
849# CONFIG_USB_IDMOUSE is not set
850# CONFIG_USB_LD is not set
851# CONFIG_USB_TEST is not set
852
853#
854# USB DSL modem support
855#
856
857#
787# USB Gadget Support 858# USB Gadget Support
788# 859#
789# CONFIG_USB_GADGET is not set 860# CONFIG_USB_GADGET is not set
@@ -797,21 +868,17 @@ CONFIG_USB_ARCH_HAS_OHCI=y
797# File systems 868# File systems
798# 869#
799CONFIG_EXT2_FS=y 870CONFIG_EXT2_FS=y
800CONFIG_EXT2_FS_XATTR=y 871# CONFIG_EXT2_FS_XATTR is not set
801CONFIG_EXT2_FS_POSIX_ACL=y
802# CONFIG_EXT2_FS_SECURITY is not set
803# CONFIG_EXT2_FS_XIP is not set 872# CONFIG_EXT2_FS_XIP is not set
804CONFIG_EXT3_FS=y 873CONFIG_EXT3_FS=y
805CONFIG_EXT3_FS_XATTR=y 874# CONFIG_EXT3_FS_XATTR is not set
806CONFIG_EXT3_FS_POSIX_ACL=y
807# CONFIG_EXT3_FS_SECURITY is not set
808CONFIG_JBD=y 875CONFIG_JBD=y
809# CONFIG_JBD_DEBUG is not set 876# CONFIG_JBD_DEBUG is not set
810CONFIG_FS_MBCACHE=y
811# CONFIG_REISERFS_FS is not set 877# CONFIG_REISERFS_FS is not set
812# CONFIG_JFS_FS is not set 878# CONFIG_JFS_FS is not set
813CONFIG_FS_POSIX_ACL=y 879# CONFIG_FS_POSIX_ACL is not set
814# CONFIG_XFS_FS is not set 880# CONFIG_XFS_FS is not set
881# CONFIG_OCFS2_FS is not set
815# CONFIG_MINIX_FS is not set 882# CONFIG_MINIX_FS is not set
816# CONFIG_ROMFS_FS is not set 883# CONFIG_ROMFS_FS is not set
817CONFIG_INOTIFY=y 884CONFIG_INOTIFY=y
@@ -830,8 +897,11 @@ CONFIG_DNOTIFY=y
830# 897#
831# DOS/FAT/NT Filesystems 898# DOS/FAT/NT Filesystems
832# 899#
900CONFIG_FAT_FS=y
833# CONFIG_MSDOS_FS is not set 901# CONFIG_MSDOS_FS is not set
834# CONFIG_VFAT_FS is not set 902CONFIG_VFAT_FS=y
903CONFIG_FAT_DEFAULT_CODEPAGE=437
904CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
835# CONFIG_NTFS_FS is not set 905# CONFIG_NTFS_FS is not set
836 906
837# 907#
@@ -843,6 +913,7 @@ CONFIG_TMPFS=y
843# CONFIG_HUGETLB_PAGE is not set 913# CONFIG_HUGETLB_PAGE is not set
844CONFIG_RAMFS=y 914CONFIG_RAMFS=y
845# CONFIG_RELAYFS_FS is not set 915# CONFIG_RELAYFS_FS is not set
916# CONFIG_CONFIGFS_FS is not set
846 917
847# 918#
848# Miscellaneous filesystems 919# Miscellaneous filesystems
@@ -911,12 +982,52 @@ CONFIG_MSDOS_PARTITION=y
911# CONFIG_SGI_PARTITION is not set 982# CONFIG_SGI_PARTITION is not set
912# CONFIG_ULTRIX_PARTITION is not set 983# CONFIG_ULTRIX_PARTITION is not set
913# CONFIG_SUN_PARTITION is not set 984# CONFIG_SUN_PARTITION is not set
985# CONFIG_KARMA_PARTITION is not set
914# CONFIG_EFI_PARTITION is not set 986# CONFIG_EFI_PARTITION is not set
915 987
916# 988#
917# Native Language Support 989# Native Language Support
918# 990#
919# CONFIG_NLS is not set 991CONFIG_NLS=y
992CONFIG_NLS_DEFAULT="iso8859-1"
993CONFIG_NLS_CODEPAGE_437=y
994# CONFIG_NLS_CODEPAGE_737 is not set
995# CONFIG_NLS_CODEPAGE_775 is not set
996# CONFIG_NLS_CODEPAGE_850 is not set
997# CONFIG_NLS_CODEPAGE_852 is not set
998# CONFIG_NLS_CODEPAGE_855 is not set
999# CONFIG_NLS_CODEPAGE_857 is not set
1000# CONFIG_NLS_CODEPAGE_860 is not set
1001# CONFIG_NLS_CODEPAGE_861 is not set
1002# CONFIG_NLS_CODEPAGE_862 is not set
1003# CONFIG_NLS_CODEPAGE_863 is not set
1004# CONFIG_NLS_CODEPAGE_864 is not set
1005# CONFIG_NLS_CODEPAGE_865 is not set
1006# CONFIG_NLS_CODEPAGE_866 is not set
1007# CONFIG_NLS_CODEPAGE_869 is not set
1008# CONFIG_NLS_CODEPAGE_936 is not set
1009# CONFIG_NLS_CODEPAGE_950 is not set
1010# CONFIG_NLS_CODEPAGE_932 is not set
1011# CONFIG_NLS_CODEPAGE_949 is not set
1012# CONFIG_NLS_CODEPAGE_874 is not set
1013# CONFIG_NLS_ISO8859_8 is not set
1014# CONFIG_NLS_CODEPAGE_1250 is not set
1015# CONFIG_NLS_CODEPAGE_1251 is not set
1016# CONFIG_NLS_ASCII is not set
1017CONFIG_NLS_ISO8859_1=y
1018# CONFIG_NLS_ISO8859_2 is not set
1019# CONFIG_NLS_ISO8859_3 is not set
1020# CONFIG_NLS_ISO8859_4 is not set
1021# CONFIG_NLS_ISO8859_5 is not set
1022# CONFIG_NLS_ISO8859_6 is not set
1023# CONFIG_NLS_ISO8859_7 is not set
1024# CONFIG_NLS_ISO8859_9 is not set
1025# CONFIG_NLS_ISO8859_13 is not set
1026# CONFIG_NLS_ISO8859_14 is not set
1027# CONFIG_NLS_ISO8859_15 is not set
1028# CONFIG_NLS_KOI8_R is not set
1029# CONFIG_NLS_KOI8_U is not set
1030# CONFIG_NLS_UTF8 is not set
920 1031
921# 1032#
922# Profiling support 1033# Profiling support
@@ -927,13 +1038,14 @@ CONFIG_MSDOS_PARTITION=y
927# Kernel hacking 1038# Kernel hacking
928# 1039#
929# CONFIG_PRINTK_TIME is not set 1040# CONFIG_PRINTK_TIME is not set
930CONFIG_DEBUG_KERNEL=y
931CONFIG_MAGIC_SYSRQ=y 1041CONFIG_MAGIC_SYSRQ=y
1042CONFIG_DEBUG_KERNEL=y
932CONFIG_LOG_BUF_SHIFT=14 1043CONFIG_LOG_BUF_SHIFT=14
933CONFIG_DETECT_SOFTLOCKUP=y 1044CONFIG_DETECT_SOFTLOCKUP=y
934# CONFIG_SCHEDSTATS is not set 1045# CONFIG_SCHEDSTATS is not set
935# CONFIG_DEBUG_SLAB is not set 1046CONFIG_DEBUG_SLAB=y
936# CONFIG_DEBUG_SPINLOCK is not set 1047CONFIG_DEBUG_MUTEXES=y
1048CONFIG_DEBUG_SPINLOCK=y
937# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 1049# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
938# CONFIG_DEBUG_KOBJECT is not set 1050# CONFIG_DEBUG_KOBJECT is not set
939CONFIG_DEBUG_BUGVERBOSE=y 1051CONFIG_DEBUG_BUGVERBOSE=y
@@ -941,9 +1053,10 @@ CONFIG_DEBUG_BUGVERBOSE=y
941# CONFIG_DEBUG_FS is not set 1053# CONFIG_DEBUG_FS is not set
942# CONFIG_DEBUG_VM is not set 1054# CONFIG_DEBUG_VM is not set
943CONFIG_FRAME_POINTER=y 1055CONFIG_FRAME_POINTER=y
1056CONFIG_FORCED_INLINING=y
944# CONFIG_RCU_TORTURE_TEST is not set 1057# CONFIG_RCU_TORTURE_TEST is not set
945CONFIG_DEBUG_USER=y 1058CONFIG_DEBUG_USER=y
946# CONFIG_DEBUG_WAITQ is not set 1059CONFIG_DEBUG_WAITQ=y
947CONFIG_DEBUG_ERRORS=y 1060CONFIG_DEBUG_ERRORS=y
948CONFIG_DEBUG_LL=y 1061CONFIG_DEBUG_LL=y
949# CONFIG_DEBUG_ICEDCC is not set 1062# CONFIG_DEBUG_ICEDCC is not set
@@ -969,6 +1082,6 @@ CONFIG_DEBUG_LL=y
969# CONFIG_CRC_CCITT is not set 1082# CONFIG_CRC_CCITT is not set
970# CONFIG_CRC16 is not set 1083# CONFIG_CRC16 is not set
971CONFIG_CRC32=y 1084CONFIG_CRC32=y
972# CONFIG_LIBCRC32C is not set 1085CONFIG_LIBCRC32C=y
973CONFIG_ZLIB_INFLATE=y 1086CONFIG_ZLIB_INFLATE=y
974CONFIG_ZLIB_DEFLATE=y 1087CONFIG_ZLIB_DEFLATE=y
diff --git a/arch/arm/configs/ixdp2401_defconfig b/arch/arm/configs/ixdp2401_defconfig
deleted file mode 100644
index 60d66e82c51f..000000000000
--- a/arch/arm/configs/ixdp2401_defconfig
+++ /dev/null
@@ -1,976 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14-git13
4# Thu Nov 10 15:14:50 2005
5#
6CONFIG_ARM=y
7CONFIG_MMU=y
8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y
11
12#
13# Code maturity level options
14#
15CONFIG_EXPERIMENTAL=y
16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN_ON_SMP=y
18CONFIG_INIT_ENV_ARG_LIMIT=32
19
20#
21# General setup
22#
23CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y
25CONFIG_SWAP=y
26CONFIG_SYSVIPC=y
27# CONFIG_POSIX_MQUEUE is not set
28CONFIG_BSD_PROCESS_ACCT=y
29# CONFIG_BSD_PROCESS_ACCT_V3 is not set
30CONFIG_SYSCTL=y
31# CONFIG_AUDIT is not set
32# CONFIG_HOTPLUG is not set
33CONFIG_KOBJECT_UEVENT=y
34# CONFIG_IKCONFIG is not set
35CONFIG_INITRAMFS_SOURCE=""
36CONFIG_EMBEDDED=y
37CONFIG_KALLSYMS=y
38# CONFIG_KALLSYMS_ALL is not set
39# CONFIG_KALLSYMS_EXTRA_PASS is not set
40CONFIG_PRINTK=y
41CONFIG_BUG=y
42CONFIG_BASE_FULL=y
43CONFIG_FUTEX=y
44CONFIG_EPOLL=y
45CONFIG_CC_OPTIMIZE_FOR_SIZE=y
46CONFIG_SHMEM=y
47CONFIG_CC_ALIGN_FUNCTIONS=0
48CONFIG_CC_ALIGN_LABELS=0
49CONFIG_CC_ALIGN_LOOPS=0
50CONFIG_CC_ALIGN_JUMPS=0
51# CONFIG_TINY_SHMEM is not set
52CONFIG_BASE_SMALL=0
53
54#
55# Loadable module support
56#
57CONFIG_MODULES=y
58CONFIG_MODULE_UNLOAD=y
59# CONFIG_MODULE_FORCE_UNLOAD is not set
60CONFIG_OBSOLETE_MODPARM=y
61# CONFIG_MODVERSIONS is not set
62# CONFIG_MODULE_SRCVERSION_ALL is not set
63CONFIG_KMOD=y
64
65#
66# Block layer
67#
68
69#
70# IO Schedulers
71#
72CONFIG_IOSCHED_NOOP=y
73CONFIG_IOSCHED_AS=y
74CONFIG_IOSCHED_DEADLINE=y
75CONFIG_IOSCHED_CFQ=y
76CONFIG_DEFAULT_AS=y
77# CONFIG_DEFAULT_DEADLINE is not set
78# CONFIG_DEFAULT_CFQ is not set
79# CONFIG_DEFAULT_NOOP is not set
80CONFIG_DEFAULT_IOSCHED="anticipatory"
81
82#
83# System Type
84#
85# CONFIG_ARCH_CLPS7500 is not set
86# CONFIG_ARCH_CLPS711X is not set
87# CONFIG_ARCH_CO285 is not set
88# CONFIG_ARCH_EBSA110 is not set
89# CONFIG_ARCH_FOOTBRIDGE is not set
90# CONFIG_ARCH_INTEGRATOR is not set
91# CONFIG_ARCH_IOP3XX is not set
92# CONFIG_ARCH_IXP4XX is not set
93CONFIG_ARCH_IXP2000=y
94# CONFIG_ARCH_L7200 is not set
95# CONFIG_ARCH_PXA is not set
96# CONFIG_ARCH_RPC is not set
97# CONFIG_ARCH_SA1100 is not set
98# CONFIG_ARCH_S3C2410 is not set
99# CONFIG_ARCH_SHARK is not set
100# CONFIG_ARCH_LH7A40X is not set
101# CONFIG_ARCH_OMAP is not set
102# CONFIG_ARCH_VERSATILE is not set
103# CONFIG_ARCH_REALVIEW is not set
104# CONFIG_ARCH_IMX is not set
105# CONFIG_ARCH_H720X is not set
106# CONFIG_ARCH_AAEC2000 is not set
107CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
108
109#
110# Intel IXP2400/2800 Implementation Options
111#
112
113#
114# IXP2400/2800 Platforms
115#
116# CONFIG_ARCH_ENP2611 is not set
117# CONFIG_ARCH_IXDP2400 is not set
118# CONFIG_ARCH_IXDP2800 is not set
119CONFIG_ARCH_IXDP2401=y
120# CONFIG_ARCH_IXDP2801 is not set
121CONFIG_ARCH_IXDP2X01=y
122# CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set
123
124#
125# Processor Type
126#
127CONFIG_CPU_32=y
128CONFIG_CPU_XSCALE=y
129CONFIG_CPU_32v5=y
130CONFIG_CPU_ABRT_EV5T=y
131CONFIG_CPU_CACHE_VIVT=y
132CONFIG_CPU_TLB_V4WBI=y
133
134#
135# Processor Features
136#
137# CONFIG_ARM_THUMB is not set
138CONFIG_CPU_BIG_ENDIAN=y
139CONFIG_XSCALE_PMU=y
140
141#
142# Bus support
143#
144CONFIG_ISA_DMA_API=y
145CONFIG_PCI=y
146CONFIG_PCI_LEGACY_PROC=y
147# CONFIG_PCI_DEBUG is not set
148
149#
150# PCCARD (PCMCIA/CardBus) support
151#
152# CONFIG_PCCARD is not set
153
154#
155# Kernel Features
156#
157# CONFIG_PREEMPT is not set
158# CONFIG_NO_IDLE_HZ is not set
159# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
160CONFIG_SELECT_MEMORY_MODEL=y
161CONFIG_FLATMEM_MANUAL=y
162# CONFIG_DISCONTIGMEM_MANUAL is not set
163# CONFIG_SPARSEMEM_MANUAL is not set
164CONFIG_FLATMEM=y
165CONFIG_FLAT_NODE_MEM_MAP=y
166# CONFIG_SPARSEMEM_STATIC is not set
167CONFIG_SPLIT_PTLOCK_CPUS=4096
168CONFIG_ALIGNMENT_TRAP=y
169
170#
171# Boot options
172#
173CONFIG_ZBOOT_ROM_TEXT=0x0
174CONFIG_ZBOOT_ROM_BSS=0x0
175CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M@0x0"
176# CONFIG_XIP_KERNEL is not set
177
178#
179# Floating point emulation
180#
181
182#
183# At least one emulation must be selected
184#
185CONFIG_FPE_NWFPE=y
186CONFIG_FPE_NWFPE_XP=y
187# CONFIG_FPE_FASTFPE is not set
188
189#
190# Userspace binary formats
191#
192CONFIG_BINFMT_ELF=y
193# CONFIG_BINFMT_AOUT is not set
194# CONFIG_BINFMT_MISC is not set
195# CONFIG_ARTHUR is not set
196
197#
198# Power management options
199#
200# CONFIG_PM is not set
201
202#
203# Networking
204#
205CONFIG_NET=y
206
207#
208# Networking options
209#
210CONFIG_PACKET=y
211CONFIG_PACKET_MMAP=y
212CONFIG_UNIX=y
213# CONFIG_NET_KEY is not set
214CONFIG_INET=y
215# CONFIG_IP_MULTICAST is not set
216# CONFIG_IP_ADVANCED_ROUTER is not set
217CONFIG_IP_FIB_HASH=y
218CONFIG_IP_PNP=y
219CONFIG_IP_PNP_DHCP=y
220CONFIG_IP_PNP_BOOTP=y
221# CONFIG_IP_PNP_RARP is not set
222# CONFIG_NET_IPIP is not set
223# CONFIG_NET_IPGRE is not set
224# CONFIG_ARPD is not set
225CONFIG_SYN_COOKIES=y
226# CONFIG_INET_AH is not set
227# CONFIG_INET_ESP is not set
228# CONFIG_INET_IPCOMP is not set
229# CONFIG_INET_TUNNEL is not set
230CONFIG_INET_DIAG=y
231CONFIG_INET_TCP_DIAG=y
232# CONFIG_TCP_CONG_ADVANCED is not set
233CONFIG_TCP_CONG_BIC=y
234# CONFIG_IPV6 is not set
235# CONFIG_NETFILTER is not set
236
237#
238# DCCP Configuration (EXPERIMENTAL)
239#
240# CONFIG_IP_DCCP is not set
241
242#
243# SCTP Configuration (EXPERIMENTAL)
244#
245# CONFIG_IP_SCTP is not set
246# CONFIG_ATM is not set
247# CONFIG_BRIDGE is not set
248# CONFIG_VLAN_8021Q is not set
249# CONFIG_DECNET is not set
250# CONFIG_LLC2 is not set
251# CONFIG_IPX is not set
252# CONFIG_ATALK is not set
253# CONFIG_X25 is not set
254# CONFIG_LAPB is not set
255# CONFIG_NET_DIVERT is not set
256# CONFIG_ECONET is not set
257# CONFIG_WAN_ROUTER is not set
258
259#
260# QoS and/or fair queueing
261#
262# CONFIG_NET_SCHED is not set
263# CONFIG_NET_CLS_ROUTE is not set
264
265#
266# Network testing
267#
268# CONFIG_NET_PKTGEN is not set
269# CONFIG_HAMRADIO is not set
270# CONFIG_IRDA is not set
271# CONFIG_BT is not set
272# CONFIG_IEEE80211 is not set
273
274#
275# Device Drivers
276#
277
278#
279# Generic Driver Options
280#
281CONFIG_STANDALONE=y
282# CONFIG_PREVENT_FIRMWARE_BUILD is not set
283# CONFIG_FW_LOADER is not set
284# CONFIG_DEBUG_DRIVER is not set
285
286#
287# Memory Technology Devices (MTD)
288#
289CONFIG_MTD=y
290# CONFIG_MTD_DEBUG is not set
291# CONFIG_MTD_CONCAT is not set
292CONFIG_MTD_PARTITIONS=y
293CONFIG_MTD_REDBOOT_PARTS=y
294CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
295CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
296CONFIG_MTD_REDBOOT_PARTS_READONLY=y
297# CONFIG_MTD_CMDLINE_PARTS is not set
298# CONFIG_MTD_AFS_PARTS is not set
299
300#
301# User Modules And Translation Layers
302#
303CONFIG_MTD_CHAR=y
304CONFIG_MTD_BLOCK=y
305# CONFIG_FTL is not set
306# CONFIG_NFTL is not set
307# CONFIG_INFTL is not set
308# CONFIG_RFD_FTL is not set
309
310#
311# RAM/ROM/Flash chip drivers
312#
313CONFIG_MTD_CFI=y
314# CONFIG_MTD_JEDECPROBE is not set
315CONFIG_MTD_GEN_PROBE=y
316# CONFIG_MTD_CFI_ADV_OPTIONS is not set
317CONFIG_MTD_MAP_BANK_WIDTH_1=y
318CONFIG_MTD_MAP_BANK_WIDTH_2=y
319CONFIG_MTD_MAP_BANK_WIDTH_4=y
320# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
321# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
322# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
323CONFIG_MTD_CFI_I1=y
324CONFIG_MTD_CFI_I2=y
325# CONFIG_MTD_CFI_I4 is not set
326# CONFIG_MTD_CFI_I8 is not set
327CONFIG_MTD_CFI_INTELEXT=y
328# CONFIG_MTD_CFI_AMDSTD is not set
329# CONFIG_MTD_CFI_STAA is not set
330CONFIG_MTD_CFI_UTIL=y
331# CONFIG_MTD_RAM is not set
332# CONFIG_MTD_ROM is not set
333# CONFIG_MTD_ABSENT is not set
334# CONFIG_MTD_XIP is not set
335
336#
337# Mapping drivers for chip access
338#
339CONFIG_MTD_COMPLEX_MAPPINGS=y
340# CONFIG_MTD_PHYSMAP is not set
341# CONFIG_MTD_ARM_INTEGRATOR is not set
342CONFIG_MTD_IXP2000=y
343# CONFIG_MTD_PCI is not set
344# CONFIG_MTD_PLATRAM is not set
345
346#
347# Self-contained MTD device drivers
348#
349# CONFIG_MTD_PMC551 is not set
350# CONFIG_MTD_SLRAM is not set
351# CONFIG_MTD_PHRAM is not set
352# CONFIG_MTD_MTDRAM is not set
353# CONFIG_MTD_BLKMTD is not set
354# CONFIG_MTD_BLOCK2MTD is not set
355
356#
357# Disk-On-Chip Device Drivers
358#
359# CONFIG_MTD_DOC2000 is not set
360# CONFIG_MTD_DOC2001 is not set
361# CONFIG_MTD_DOC2001PLUS is not set
362
363#
364# NAND Flash Device Drivers
365#
366# CONFIG_MTD_NAND is not set
367
368#
369# OneNAND Flash Device Drivers
370#
371# CONFIG_MTD_ONENAND is not set
372
373#
374# Parallel port support
375#
376# CONFIG_PARPORT is not set
377
378#
379# Plug and Play support
380#
381
382#
383# Block devices
384#
385# CONFIG_BLK_CPQ_DA is not set
386# CONFIG_BLK_CPQ_CISS_DA is not set
387# CONFIG_BLK_DEV_DAC960 is not set
388# CONFIG_BLK_DEV_UMEM is not set
389# CONFIG_BLK_DEV_COW_COMMON is not set
390CONFIG_BLK_DEV_LOOP=y
391# CONFIG_BLK_DEV_CRYPTOLOOP is not set
392# CONFIG_BLK_DEV_NBD is not set
393# CONFIG_BLK_DEV_SX8 is not set
394CONFIG_BLK_DEV_RAM=y
395CONFIG_BLK_DEV_RAM_COUNT=16
396CONFIG_BLK_DEV_RAM_SIZE=8192
397CONFIG_BLK_DEV_INITRD=y
398# CONFIG_CDROM_PKTCDVD is not set
399# CONFIG_ATA_OVER_ETH is not set
400
401#
402# SCSI device support
403#
404# CONFIG_RAID_ATTRS is not set
405# CONFIG_SCSI is not set
406
407#
408# Multi-device support (RAID and LVM)
409#
410# CONFIG_MD is not set
411
412#
413# Fusion MPT device support
414#
415# CONFIG_FUSION is not set
416
417#
418# IEEE 1394 (FireWire) support
419#
420# CONFIG_IEEE1394 is not set
421
422#
423# I2O device support
424#
425# CONFIG_I2O is not set
426
427#
428# Network device support
429#
430CONFIG_NETDEVICES=y
431CONFIG_DUMMY=y
432# CONFIG_BONDING is not set
433# CONFIG_EQUALIZER is not set
434# CONFIG_TUN is not set
435
436#
437# ARCnet devices
438#
439# CONFIG_ARCNET is not set
440
441#
442# PHY device support
443#
444# CONFIG_PHYLIB is not set
445
446#
447# Ethernet (10 or 100Mbit)
448#
449CONFIG_NET_ETHERNET=y
450CONFIG_MII=y
451# CONFIG_HAPPYMEAL is not set
452# CONFIG_SUNGEM is not set
453# CONFIG_CASSINI is not set
454# CONFIG_NET_VENDOR_3COM is not set
455# CONFIG_SMC91X is not set
456# CONFIG_DM9000 is not set
457
458#
459# Tulip family network device support
460#
461# CONFIG_NET_TULIP is not set
462# CONFIG_HP100 is not set
463CONFIG_NET_PCI=y
464# CONFIG_PCNET32 is not set
465# CONFIG_AMD8111_ETH is not set
466# CONFIG_ADAPTEC_STARFIRE is not set
467# CONFIG_B44 is not set
468# CONFIG_FORCEDETH is not set
469CONFIG_CS89x0=y
470# CONFIG_DGRS is not set
471CONFIG_EEPRO100=y
472# CONFIG_E100 is not set
473# CONFIG_FEALNX is not set
474# CONFIG_NATSEMI is not set
475# CONFIG_NE2K_PCI is not set
476# CONFIG_8139CP is not set
477# CONFIG_8139TOO is not set
478# CONFIG_SIS900 is not set
479# CONFIG_EPIC100 is not set
480# CONFIG_SUNDANCE is not set
481# CONFIG_TLAN is not set
482# CONFIG_VIA_RHINE is not set
483
484#
485# Ethernet (1000 Mbit)
486#
487# CONFIG_ACENIC is not set
488# CONFIG_DL2K is not set
489# CONFIG_E1000 is not set
490# CONFIG_NS83820 is not set
491# CONFIG_HAMACHI is not set
492# CONFIG_YELLOWFIN is not set
493# CONFIG_R8169 is not set
494# CONFIG_SIS190 is not set
495# CONFIG_SKGE is not set
496# CONFIG_SK98LIN is not set
497# CONFIG_VIA_VELOCITY is not set
498# CONFIG_TIGON3 is not set
499# CONFIG_BNX2 is not set
500
501#
502# Ethernet (10000 Mbit)
503#
504# CONFIG_CHELSIO_T1 is not set
505# CONFIG_IXGB is not set
506# CONFIG_S2IO is not set
507
508#
509# Token Ring devices
510#
511# CONFIG_TR is not set
512
513#
514# Wireless LAN (non-hamradio)
515#
516# CONFIG_NET_RADIO is not set
517
518#
519# Wan interfaces
520#
521CONFIG_WAN=y
522# CONFIG_DSCC4 is not set
523# CONFIG_LANMEDIA is not set
524# CONFIG_SYNCLINK_SYNCPPP is not set
525CONFIG_HDLC=y
526CONFIG_HDLC_RAW=y
527# CONFIG_HDLC_RAW_ETH is not set
528CONFIG_HDLC_CISCO=y
529CONFIG_HDLC_FR=y
530CONFIG_HDLC_PPP=y
531
532#
533# X.25/LAPB support is disabled
534#
535# CONFIG_PCI200SYN is not set
536# CONFIG_WANXL is not set
537# CONFIG_PC300 is not set
538# CONFIG_FARSYNC is not set
539CONFIG_DLCI=y
540CONFIG_DLCI_COUNT=24
541CONFIG_DLCI_MAX=8
542# CONFIG_FDDI is not set
543# CONFIG_HIPPI is not set
544# CONFIG_PPP is not set
545# CONFIG_SLIP is not set
546# CONFIG_SHAPER is not set
547# CONFIG_NETCONSOLE is not set
548# CONFIG_NETPOLL is not set
549# CONFIG_NET_POLL_CONTROLLER is not set
550
551#
552# ISDN subsystem
553#
554# CONFIG_ISDN is not set
555
556#
557# Input device support
558#
559CONFIG_INPUT=y
560
561#
562# Userland interfaces
563#
564CONFIG_INPUT_MOUSEDEV=y
565CONFIG_INPUT_MOUSEDEV_PSAUX=y
566CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
567CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
568# CONFIG_INPUT_JOYDEV is not set
569# CONFIG_INPUT_TSDEV is not set
570# CONFIG_INPUT_EVDEV is not set
571# CONFIG_INPUT_EVBUG is not set
572
573#
574# Input Device Drivers
575#
576# CONFIG_INPUT_KEYBOARD is not set
577# CONFIG_INPUT_MOUSE is not set
578# CONFIG_INPUT_JOYSTICK is not set
579# CONFIG_INPUT_TOUCHSCREEN is not set
580# CONFIG_INPUT_MISC is not set
581
582#
583# Hardware I/O ports
584#
585# CONFIG_SERIO is not set
586# CONFIG_GAMEPORT is not set
587
588#
589# Character devices
590#
591# CONFIG_VT is not set
592# CONFIG_SERIAL_NONSTANDARD is not set
593
594#
595# Serial drivers
596#
597CONFIG_SERIAL_8250=y
598CONFIG_SERIAL_8250_CONSOLE=y
599CONFIG_SERIAL_8250_NR_UARTS=3
600# CONFIG_SERIAL_8250_EXTENDED is not set
601
602#
603# Non-8250 serial port support
604#
605CONFIG_SERIAL_CORE=y
606CONFIG_SERIAL_CORE_CONSOLE=y
607# CONFIG_SERIAL_JSM is not set
608CONFIG_UNIX98_PTYS=y
609CONFIG_LEGACY_PTYS=y
610CONFIG_LEGACY_PTY_COUNT=256
611
612#
613# IPMI
614#
615# CONFIG_IPMI_HANDLER is not set
616
617#
618# Watchdog Cards
619#
620CONFIG_WATCHDOG=y
621# CONFIG_WATCHDOG_NOWAYOUT is not set
622
623#
624# Watchdog Device Drivers
625#
626# CONFIG_SOFT_WATCHDOG is not set
627CONFIG_IXP2000_WATCHDOG=y
628
629#
630# PCI-based Watchdog Cards
631#
632# CONFIG_PCIPCWATCHDOG is not set
633# CONFIG_WDTPCI is not set
634# CONFIG_NVRAM is not set
635# CONFIG_RTC is not set
636# CONFIG_DTLK is not set
637# CONFIG_R3964 is not set
638# CONFIG_APPLICOM is not set
639
640#
641# Ftape, the floppy tape device driver
642#
643# CONFIG_DRM is not set
644# CONFIG_RAW_DRIVER is not set
645
646#
647# TPM devices
648#
649# CONFIG_TCG_TPM is not set
650# CONFIG_TELCLOCK is not set
651
652#
653# I2C support
654#
655CONFIG_I2C=y
656CONFIG_I2C_CHARDEV=y
657
658#
659# I2C Algorithms
660#
661CONFIG_I2C_ALGOBIT=y
662# CONFIG_I2C_ALGOPCF is not set
663# CONFIG_I2C_ALGOPCA is not set
664
665#
666# I2C Hardware Bus support
667#
668# CONFIG_I2C_ALI1535 is not set
669# CONFIG_I2C_ALI1563 is not set
670# CONFIG_I2C_ALI15X3 is not set
671# CONFIG_I2C_AMD756 is not set
672# CONFIG_I2C_AMD8111 is not set
673# CONFIG_I2C_I801 is not set
674# CONFIG_I2C_I810 is not set
675# CONFIG_I2C_PIIX4 is not set
676CONFIG_I2C_IXP2000=y
677# CONFIG_I2C_NFORCE2 is not set
678# CONFIG_I2C_PARPORT_LIGHT is not set
679# CONFIG_I2C_PROSAVAGE is not set
680# CONFIG_I2C_SAVAGE4 is not set
681# CONFIG_SCx200_ACB is not set
682# CONFIG_I2C_SIS5595 is not set
683# CONFIG_I2C_SIS630 is not set
684# CONFIG_I2C_SIS96X is not set
685# CONFIG_I2C_STUB is not set
686# CONFIG_I2C_VIA is not set
687# CONFIG_I2C_VIAPRO is not set
688# CONFIG_I2C_VOODOO3 is not set
689# CONFIG_I2C_PCA_ISA is not set
690
691#
692# Miscellaneous I2C Chip support
693#
694# CONFIG_SENSORS_DS1337 is not set
695# CONFIG_SENSORS_DS1374 is not set
696CONFIG_SENSORS_EEPROM=y
697# CONFIG_SENSORS_PCF8574 is not set
698# CONFIG_SENSORS_PCA9539 is not set
699# CONFIG_SENSORS_PCF8591 is not set
700# CONFIG_SENSORS_RTC8564 is not set
701# CONFIG_SENSORS_MAX6875 is not set
702# CONFIG_RTC_X1205_I2C is not set
703# CONFIG_I2C_DEBUG_CORE is not set
704# CONFIG_I2C_DEBUG_ALGO is not set
705# CONFIG_I2C_DEBUG_BUS is not set
706# CONFIG_I2C_DEBUG_CHIP is not set
707
708#
709# Hardware Monitoring support
710#
711CONFIG_HWMON=y
712# CONFIG_HWMON_VID is not set
713# CONFIG_SENSORS_ADM1021 is not set
714# CONFIG_SENSORS_ADM1025 is not set
715# CONFIG_SENSORS_ADM1026 is not set
716# CONFIG_SENSORS_ADM1031 is not set
717# CONFIG_SENSORS_ADM9240 is not set
718# CONFIG_SENSORS_ASB100 is not set
719# CONFIG_SENSORS_ATXP1 is not set
720# CONFIG_SENSORS_DS1621 is not set
721# CONFIG_SENSORS_FSCHER is not set
722# CONFIG_SENSORS_FSCPOS is not set
723# CONFIG_SENSORS_GL518SM is not set
724# CONFIG_SENSORS_GL520SM is not set
725# CONFIG_SENSORS_IT87 is not set
726# CONFIG_SENSORS_LM63 is not set
727# CONFIG_SENSORS_LM75 is not set
728# CONFIG_SENSORS_LM77 is not set
729# CONFIG_SENSORS_LM78 is not set
730# CONFIG_SENSORS_LM80 is not set
731# CONFIG_SENSORS_LM83 is not set
732# CONFIG_SENSORS_LM85 is not set
733# CONFIG_SENSORS_LM87 is not set
734# CONFIG_SENSORS_LM90 is not set
735# CONFIG_SENSORS_LM92 is not set
736# CONFIG_SENSORS_MAX1619 is not set
737# CONFIG_SENSORS_PC87360 is not set
738# CONFIG_SENSORS_SIS5595 is not set
739# CONFIG_SENSORS_SMSC47M1 is not set
740# CONFIG_SENSORS_SMSC47B397 is not set
741# CONFIG_SENSORS_VIA686A is not set
742# CONFIG_SENSORS_W83781D is not set
743# CONFIG_SENSORS_W83792D is not set
744# CONFIG_SENSORS_W83L785TS is not set
745# CONFIG_SENSORS_W83627HF is not set
746# CONFIG_SENSORS_W83627EHF is not set
747# CONFIG_HWMON_DEBUG_CHIP is not set
748
749#
750# Misc devices
751#
752
753#
754# Multimedia Capabilities Port drivers
755#
756
757#
758# Multimedia devices
759#
760# CONFIG_VIDEO_DEV is not set
761
762#
763# Digital Video Broadcasting Devices
764#
765# CONFIG_DVB is not set
766
767#
768# Graphics support
769#
770# CONFIG_FB is not set
771
772#
773# Sound
774#
775# CONFIG_SOUND is not set
776
777#
778# USB support
779#
780CONFIG_USB_ARCH_HAS_HCD=y
781CONFIG_USB_ARCH_HAS_OHCI=y
782# CONFIG_USB is not set
783
784#
785# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
786#
787
788#
789# USB Gadget Support
790#
791# CONFIG_USB_GADGET is not set
792
793#
794# MMC/SD Card support
795#
796# CONFIG_MMC is not set
797
798#
799# File systems
800#
801CONFIG_EXT2_FS=y
802CONFIG_EXT2_FS_XATTR=y
803CONFIG_EXT2_FS_POSIX_ACL=y
804# CONFIG_EXT2_FS_SECURITY is not set
805# CONFIG_EXT2_FS_XIP is not set
806CONFIG_EXT3_FS=y
807CONFIG_EXT3_FS_XATTR=y
808CONFIG_EXT3_FS_POSIX_ACL=y
809# CONFIG_EXT3_FS_SECURITY is not set
810CONFIG_JBD=y
811# CONFIG_JBD_DEBUG is not set
812CONFIG_FS_MBCACHE=y
813# CONFIG_REISERFS_FS is not set
814# CONFIG_JFS_FS is not set
815CONFIG_FS_POSIX_ACL=y
816# CONFIG_XFS_FS is not set
817# CONFIG_MINIX_FS is not set
818# CONFIG_ROMFS_FS is not set
819CONFIG_INOTIFY=y
820# CONFIG_QUOTA is not set
821CONFIG_DNOTIFY=y
822# CONFIG_AUTOFS_FS is not set
823# CONFIG_AUTOFS4_FS is not set
824# CONFIG_FUSE_FS is not set
825
826#
827# CD-ROM/DVD Filesystems
828#
829# CONFIG_ISO9660_FS is not set
830# CONFIG_UDF_FS is not set
831
832#
833# DOS/FAT/NT Filesystems
834#
835# CONFIG_MSDOS_FS is not set
836# CONFIG_VFAT_FS is not set
837# CONFIG_NTFS_FS is not set
838
839#
840# Pseudo filesystems
841#
842CONFIG_PROC_FS=y
843CONFIG_SYSFS=y
844CONFIG_TMPFS=y
845# CONFIG_HUGETLB_PAGE is not set
846CONFIG_RAMFS=y
847# CONFIG_RELAYFS_FS is not set
848
849#
850# Miscellaneous filesystems
851#
852# CONFIG_ADFS_FS is not set
853# CONFIG_AFFS_FS is not set
854# CONFIG_HFS_FS is not set
855# CONFIG_HFSPLUS_FS is not set
856# CONFIG_BEFS_FS is not set
857# CONFIG_BFS_FS is not set
858# CONFIG_EFS_FS is not set
859# CONFIG_JFFS_FS is not set
860CONFIG_JFFS2_FS=y
861CONFIG_JFFS2_FS_DEBUG=0
862CONFIG_JFFS2_FS_WRITEBUFFER=y
863# CONFIG_JFFS2_SUMMARY is not set
864# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
865CONFIG_JFFS2_ZLIB=y
866CONFIG_JFFS2_RTIME=y
867# CONFIG_JFFS2_RUBIN is not set
868# CONFIG_CRAMFS is not set
869# CONFIG_VXFS_FS is not set
870# CONFIG_HPFS_FS is not set
871# CONFIG_QNX4FS_FS is not set
872# CONFIG_SYSV_FS is not set
873# CONFIG_UFS_FS is not set
874
875#
876# Network File Systems
877#
878CONFIG_NFS_FS=y
879CONFIG_NFS_V3=y
880# CONFIG_NFS_V3_ACL is not set
881# CONFIG_NFS_V4 is not set
882# CONFIG_NFS_DIRECTIO is not set
883# CONFIG_NFSD is not set
884CONFIG_ROOT_NFS=y
885CONFIG_LOCKD=y
886CONFIG_LOCKD_V4=y
887CONFIG_NFS_COMMON=y
888CONFIG_SUNRPC=y
889# CONFIG_RPCSEC_GSS_KRB5 is not set
890# CONFIG_RPCSEC_GSS_SPKM3 is not set
891# CONFIG_SMB_FS is not set
892# CONFIG_CIFS is not set
893# CONFIG_NCP_FS is not set
894# CONFIG_CODA_FS is not set
895# CONFIG_AFS_FS is not set
896# CONFIG_9P_FS is not set
897
898#
899# Partition Types
900#
901CONFIG_PARTITION_ADVANCED=y
902# CONFIG_ACORN_PARTITION is not set
903# CONFIG_OSF_PARTITION is not set
904# CONFIG_AMIGA_PARTITION is not set
905# CONFIG_ATARI_PARTITION is not set
906# CONFIG_MAC_PARTITION is not set
907CONFIG_MSDOS_PARTITION=y
908# CONFIG_BSD_DISKLABEL is not set
909# CONFIG_MINIX_SUBPARTITION is not set
910# CONFIG_SOLARIS_X86_PARTITION is not set
911# CONFIG_UNIXWARE_DISKLABEL is not set
912# CONFIG_LDM_PARTITION is not set
913# CONFIG_SGI_PARTITION is not set
914# CONFIG_ULTRIX_PARTITION is not set
915# CONFIG_SUN_PARTITION is not set
916# CONFIG_EFI_PARTITION is not set
917
918#
919# Native Language Support
920#
921# CONFIG_NLS is not set
922
923#
924# Profiling support
925#
926# CONFIG_PROFILING is not set
927
928#
929# Kernel hacking
930#
931# CONFIG_PRINTK_TIME is not set
932CONFIG_DEBUG_KERNEL=y
933CONFIG_MAGIC_SYSRQ=y
934CONFIG_LOG_BUF_SHIFT=14
935CONFIG_DETECT_SOFTLOCKUP=y
936# CONFIG_SCHEDSTATS is not set
937# CONFIG_DEBUG_SLAB is not set
938# CONFIG_DEBUG_SPINLOCK is not set
939# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
940# CONFIG_DEBUG_KOBJECT is not set
941CONFIG_DEBUG_BUGVERBOSE=y
942# CONFIG_DEBUG_INFO is not set
943# CONFIG_DEBUG_FS is not set
944# CONFIG_DEBUG_VM is not set
945CONFIG_FRAME_POINTER=y
946# CONFIG_RCU_TORTURE_TEST is not set
947CONFIG_DEBUG_USER=y
948# CONFIG_DEBUG_WAITQ is not set
949CONFIG_DEBUG_ERRORS=y
950CONFIG_DEBUG_LL=y
951# CONFIG_DEBUG_ICEDCC is not set
952
953#
954# Security options
955#
956# CONFIG_KEYS is not set
957# CONFIG_SECURITY is not set
958
959#
960# Cryptographic options
961#
962# CONFIG_CRYPTO is not set
963
964#
965# Hardware crypto devices
966#
967
968#
969# Library routines
970#
971# CONFIG_CRC_CCITT is not set
972# CONFIG_CRC16 is not set
973CONFIG_CRC32=y
974# CONFIG_LIBCRC32C is not set
975CONFIG_ZLIB_INFLATE=y
976CONFIG_ZLIB_DEFLATE=y
diff --git a/arch/arm/configs/ixdp2800_defconfig b/arch/arm/configs/ixdp2800_defconfig
deleted file mode 100644
index 4248123815e9..000000000000
--- a/arch/arm/configs/ixdp2800_defconfig
+++ /dev/null
@@ -1,975 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14-git13
4# Thu Nov 10 15:14:56 2005
5#
6CONFIG_ARM=y
7CONFIG_MMU=y
8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y
11
12#
13# Code maturity level options
14#
15CONFIG_EXPERIMENTAL=y
16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN_ON_SMP=y
18CONFIG_INIT_ENV_ARG_LIMIT=32
19
20#
21# General setup
22#
23CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y
25CONFIG_SWAP=y
26CONFIG_SYSVIPC=y
27# CONFIG_POSIX_MQUEUE is not set
28CONFIG_BSD_PROCESS_ACCT=y
29# CONFIG_BSD_PROCESS_ACCT_V3 is not set
30CONFIG_SYSCTL=y
31# CONFIG_AUDIT is not set
32# CONFIG_HOTPLUG is not set
33CONFIG_KOBJECT_UEVENT=y
34# CONFIG_IKCONFIG is not set
35CONFIG_INITRAMFS_SOURCE=""
36CONFIG_EMBEDDED=y
37CONFIG_KALLSYMS=y
38# CONFIG_KALLSYMS_ALL is not set
39# CONFIG_KALLSYMS_EXTRA_PASS is not set
40CONFIG_PRINTK=y
41CONFIG_BUG=y
42CONFIG_BASE_FULL=y
43CONFIG_FUTEX=y
44CONFIG_EPOLL=y
45CONFIG_CC_OPTIMIZE_FOR_SIZE=y
46CONFIG_SHMEM=y
47CONFIG_CC_ALIGN_FUNCTIONS=0
48CONFIG_CC_ALIGN_LABELS=0
49CONFIG_CC_ALIGN_LOOPS=0
50CONFIG_CC_ALIGN_JUMPS=0
51# CONFIG_TINY_SHMEM is not set
52CONFIG_BASE_SMALL=0
53
54#
55# Loadable module support
56#
57CONFIG_MODULES=y
58CONFIG_MODULE_UNLOAD=y
59# CONFIG_MODULE_FORCE_UNLOAD is not set
60CONFIG_OBSOLETE_MODPARM=y
61# CONFIG_MODVERSIONS is not set
62# CONFIG_MODULE_SRCVERSION_ALL is not set
63CONFIG_KMOD=y
64
65#
66# Block layer
67#
68
69#
70# IO Schedulers
71#
72CONFIG_IOSCHED_NOOP=y
73CONFIG_IOSCHED_AS=y
74CONFIG_IOSCHED_DEADLINE=y
75CONFIG_IOSCHED_CFQ=y
76CONFIG_DEFAULT_AS=y
77# CONFIG_DEFAULT_DEADLINE is not set
78# CONFIG_DEFAULT_CFQ is not set
79# CONFIG_DEFAULT_NOOP is not set
80CONFIG_DEFAULT_IOSCHED="anticipatory"
81
82#
83# System Type
84#
85# CONFIG_ARCH_CLPS7500 is not set
86# CONFIG_ARCH_CLPS711X is not set
87# CONFIG_ARCH_CO285 is not set
88# CONFIG_ARCH_EBSA110 is not set
89# CONFIG_ARCH_FOOTBRIDGE is not set
90# CONFIG_ARCH_INTEGRATOR is not set
91# CONFIG_ARCH_IOP3XX is not set
92# CONFIG_ARCH_IXP4XX is not set
93CONFIG_ARCH_IXP2000=y
94# CONFIG_ARCH_L7200 is not set
95# CONFIG_ARCH_PXA is not set
96# CONFIG_ARCH_RPC is not set
97# CONFIG_ARCH_SA1100 is not set
98# CONFIG_ARCH_S3C2410 is not set
99# CONFIG_ARCH_SHARK is not set
100# CONFIG_ARCH_LH7A40X is not set
101# CONFIG_ARCH_OMAP is not set
102# CONFIG_ARCH_VERSATILE is not set
103# CONFIG_ARCH_REALVIEW is not set
104# CONFIG_ARCH_IMX is not set
105# CONFIG_ARCH_H720X is not set
106# CONFIG_ARCH_AAEC2000 is not set
107CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
108
109#
110# Intel IXP2400/2800 Implementation Options
111#
112
113#
114# IXP2400/2800 Platforms
115#
116# CONFIG_ARCH_ENP2611 is not set
117# CONFIG_ARCH_IXDP2400 is not set
118CONFIG_ARCH_IXDP2800=y
119CONFIG_ARCH_IXDP2X00=y
120# CONFIG_ARCH_IXDP2401 is not set
121# CONFIG_ARCH_IXDP2801 is not set
122# CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set
123
124#
125# Processor Type
126#
127CONFIG_CPU_32=y
128CONFIG_CPU_XSCALE=y
129CONFIG_CPU_32v5=y
130CONFIG_CPU_ABRT_EV5T=y
131CONFIG_CPU_CACHE_VIVT=y
132CONFIG_CPU_TLB_V4WBI=y
133
134#
135# Processor Features
136#
137# CONFIG_ARM_THUMB is not set
138CONFIG_CPU_BIG_ENDIAN=y
139CONFIG_XSCALE_PMU=y
140
141#
142# Bus support
143#
144CONFIG_ISA_DMA_API=y
145CONFIG_PCI=y
146CONFIG_PCI_LEGACY_PROC=y
147# CONFIG_PCI_DEBUG is not set
148
149#
150# PCCARD (PCMCIA/CardBus) support
151#
152# CONFIG_PCCARD is not set
153
154#
155# Kernel Features
156#
157# CONFIG_PREEMPT is not set
158# CONFIG_NO_IDLE_HZ is not set
159# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
160CONFIG_SELECT_MEMORY_MODEL=y
161CONFIG_FLATMEM_MANUAL=y
162# CONFIG_DISCONTIGMEM_MANUAL is not set
163# CONFIG_SPARSEMEM_MANUAL is not set
164CONFIG_FLATMEM=y
165CONFIG_FLAT_NODE_MEM_MAP=y
166# CONFIG_SPARSEMEM_STATIC is not set
167CONFIG_SPLIT_PTLOCK_CPUS=4096
168CONFIG_ALIGNMENT_TRAP=y
169
170#
171# Boot options
172#
173CONFIG_ZBOOT_ROM_TEXT=0x0
174CONFIG_ZBOOT_ROM_BSS=0x0
175CONFIG_CMDLINE="console=ttyS0,9600 root=/dev/nfs ip=bootp mem=64M@0x0"
176# CONFIG_XIP_KERNEL is not set
177
178#
179# Floating point emulation
180#
181
182#
183# At least one emulation must be selected
184#
185CONFIG_FPE_NWFPE=y
186CONFIG_FPE_NWFPE_XP=y
187# CONFIG_FPE_FASTFPE is not set
188
189#
190# Userspace binary formats
191#
192CONFIG_BINFMT_ELF=y
193# CONFIG_BINFMT_AOUT is not set
194# CONFIG_BINFMT_MISC is not set
195# CONFIG_ARTHUR is not set
196
197#
198# Power management options
199#
200# CONFIG_PM is not set
201
202#
203# Networking
204#
205CONFIG_NET=y
206
207#
208# Networking options
209#
210CONFIG_PACKET=y
211CONFIG_PACKET_MMAP=y
212CONFIG_UNIX=y
213# CONFIG_NET_KEY is not set
214CONFIG_INET=y
215# CONFIG_IP_MULTICAST is not set
216# CONFIG_IP_ADVANCED_ROUTER is not set
217CONFIG_IP_FIB_HASH=y
218CONFIG_IP_PNP=y
219CONFIG_IP_PNP_DHCP=y
220CONFIG_IP_PNP_BOOTP=y
221# CONFIG_IP_PNP_RARP is not set
222# CONFIG_NET_IPIP is not set
223# CONFIG_NET_IPGRE is not set
224# CONFIG_ARPD is not set
225CONFIG_SYN_COOKIES=y
226# CONFIG_INET_AH is not set
227# CONFIG_INET_ESP is not set
228# CONFIG_INET_IPCOMP is not set
229# CONFIG_INET_TUNNEL is not set
230CONFIG_INET_DIAG=y
231CONFIG_INET_TCP_DIAG=y
232# CONFIG_TCP_CONG_ADVANCED is not set
233CONFIG_TCP_CONG_BIC=y
234# CONFIG_IPV6 is not set
235# CONFIG_NETFILTER is not set
236
237#
238# DCCP Configuration (EXPERIMENTAL)
239#
240# CONFIG_IP_DCCP is not set
241
242#
243# SCTP Configuration (EXPERIMENTAL)
244#
245# CONFIG_IP_SCTP is not set
246# CONFIG_ATM is not set
247# CONFIG_BRIDGE is not set
248# CONFIG_VLAN_8021Q is not set
249# CONFIG_DECNET is not set
250# CONFIG_LLC2 is not set
251# CONFIG_IPX is not set
252# CONFIG_ATALK is not set
253# CONFIG_X25 is not set
254# CONFIG_LAPB is not set
255# CONFIG_NET_DIVERT is not set
256# CONFIG_ECONET is not set
257# CONFIG_WAN_ROUTER is not set
258
259#
260# QoS and/or fair queueing
261#
262# CONFIG_NET_SCHED is not set
263# CONFIG_NET_CLS_ROUTE is not set
264
265#
266# Network testing
267#
268# CONFIG_NET_PKTGEN is not set
269# CONFIG_HAMRADIO is not set
270# CONFIG_IRDA is not set
271# CONFIG_BT is not set
272# CONFIG_IEEE80211 is not set
273
274#
275# Device Drivers
276#
277
278#
279# Generic Driver Options
280#
281CONFIG_STANDALONE=y
282# CONFIG_PREVENT_FIRMWARE_BUILD is not set
283# CONFIG_FW_LOADER is not set
284# CONFIG_DEBUG_DRIVER is not set
285
286#
287# Memory Technology Devices (MTD)
288#
289CONFIG_MTD=y
290# CONFIG_MTD_DEBUG is not set
291# CONFIG_MTD_CONCAT is not set
292CONFIG_MTD_PARTITIONS=y
293CONFIG_MTD_REDBOOT_PARTS=y
294CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
295CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
296CONFIG_MTD_REDBOOT_PARTS_READONLY=y
297# CONFIG_MTD_CMDLINE_PARTS is not set
298# CONFIG_MTD_AFS_PARTS is not set
299
300#
301# User Modules And Translation Layers
302#
303CONFIG_MTD_CHAR=y
304CONFIG_MTD_BLOCK=y
305# CONFIG_FTL is not set
306# CONFIG_NFTL is not set
307# CONFIG_INFTL is not set
308# CONFIG_RFD_FTL is not set
309
310#
311# RAM/ROM/Flash chip drivers
312#
313CONFIG_MTD_CFI=y
314# CONFIG_MTD_JEDECPROBE is not set
315CONFIG_MTD_GEN_PROBE=y
316# CONFIG_MTD_CFI_ADV_OPTIONS is not set
317CONFIG_MTD_MAP_BANK_WIDTH_1=y
318CONFIG_MTD_MAP_BANK_WIDTH_2=y
319CONFIG_MTD_MAP_BANK_WIDTH_4=y
320# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
321# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
322# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
323CONFIG_MTD_CFI_I1=y
324CONFIG_MTD_CFI_I2=y
325# CONFIG_MTD_CFI_I4 is not set
326# CONFIG_MTD_CFI_I8 is not set
327CONFIG_MTD_CFI_INTELEXT=y
328# CONFIG_MTD_CFI_AMDSTD is not set
329# CONFIG_MTD_CFI_STAA is not set
330CONFIG_MTD_CFI_UTIL=y
331# CONFIG_MTD_RAM is not set
332# CONFIG_MTD_ROM is not set
333# CONFIG_MTD_ABSENT is not set
334# CONFIG_MTD_XIP is not set
335
336#
337# Mapping drivers for chip access
338#
339CONFIG_MTD_COMPLEX_MAPPINGS=y
340# CONFIG_MTD_PHYSMAP is not set
341# CONFIG_MTD_ARM_INTEGRATOR is not set
342CONFIG_MTD_IXP2000=y
343# CONFIG_MTD_PCI is not set
344# CONFIG_MTD_PLATRAM is not set
345
346#
347# Self-contained MTD device drivers
348#
349# CONFIG_MTD_PMC551 is not set
350# CONFIG_MTD_SLRAM is not set
351# CONFIG_MTD_PHRAM is not set
352# CONFIG_MTD_MTDRAM is not set
353# CONFIG_MTD_BLKMTD is not set
354# CONFIG_MTD_BLOCK2MTD is not set
355
356#
357# Disk-On-Chip Device Drivers
358#
359# CONFIG_MTD_DOC2000 is not set
360# CONFIG_MTD_DOC2001 is not set
361# CONFIG_MTD_DOC2001PLUS is not set
362
363#
364# NAND Flash Device Drivers
365#
366# CONFIG_MTD_NAND is not set
367
368#
369# OneNAND Flash Device Drivers
370#
371# CONFIG_MTD_ONENAND is not set
372
373#
374# Parallel port support
375#
376# CONFIG_PARPORT is not set
377
378#
379# Plug and Play support
380#
381
382#
383# Block devices
384#
385# CONFIG_BLK_CPQ_DA is not set
386# CONFIG_BLK_CPQ_CISS_DA is not set
387# CONFIG_BLK_DEV_DAC960 is not set
388# CONFIG_BLK_DEV_UMEM is not set
389# CONFIG_BLK_DEV_COW_COMMON is not set
390CONFIG_BLK_DEV_LOOP=y
391# CONFIG_BLK_DEV_CRYPTOLOOP is not set
392# CONFIG_BLK_DEV_NBD is not set
393# CONFIG_BLK_DEV_SX8 is not set
394CONFIG_BLK_DEV_RAM=y
395CONFIG_BLK_DEV_RAM_COUNT=16
396CONFIG_BLK_DEV_RAM_SIZE=8192
397CONFIG_BLK_DEV_INITRD=y
398# CONFIG_CDROM_PKTCDVD is not set
399# CONFIG_ATA_OVER_ETH is not set
400
401#
402# SCSI device support
403#
404# CONFIG_RAID_ATTRS is not set
405# CONFIG_SCSI is not set
406
407#
408# Multi-device support (RAID and LVM)
409#
410# CONFIG_MD is not set
411
412#
413# Fusion MPT device support
414#
415# CONFIG_FUSION is not set
416
417#
418# IEEE 1394 (FireWire) support
419#
420# CONFIG_IEEE1394 is not set
421
422#
423# I2O device support
424#
425# CONFIG_I2O is not set
426
427#
428# Network device support
429#
430CONFIG_NETDEVICES=y
431CONFIG_DUMMY=y
432# CONFIG_BONDING is not set
433# CONFIG_EQUALIZER is not set
434# CONFIG_TUN is not set
435
436#
437# ARCnet devices
438#
439# CONFIG_ARCNET is not set
440
441#
442# PHY device support
443#
444# CONFIG_PHYLIB is not set
445
446#
447# Ethernet (10 or 100Mbit)
448#
449CONFIG_NET_ETHERNET=y
450CONFIG_MII=y
451# CONFIG_HAPPYMEAL is not set
452# CONFIG_SUNGEM is not set
453# CONFIG_CASSINI is not set
454# CONFIG_NET_VENDOR_3COM is not set
455# CONFIG_SMC91X is not set
456# CONFIG_DM9000 is not set
457
458#
459# Tulip family network device support
460#
461# CONFIG_NET_TULIP is not set
462# CONFIG_HP100 is not set
463CONFIG_NET_PCI=y
464# CONFIG_PCNET32 is not set
465# CONFIG_AMD8111_ETH is not set
466# CONFIG_ADAPTEC_STARFIRE is not set
467# CONFIG_B44 is not set
468# CONFIG_FORCEDETH is not set
469# CONFIG_DGRS is not set
470CONFIG_EEPRO100=y
471# CONFIG_E100 is not set
472# CONFIG_FEALNX is not set
473# CONFIG_NATSEMI is not set
474# CONFIG_NE2K_PCI is not set
475# CONFIG_8139CP is not set
476# CONFIG_8139TOO is not set
477# CONFIG_SIS900 is not set
478# CONFIG_EPIC100 is not set
479# CONFIG_SUNDANCE is not set
480# CONFIG_TLAN is not set
481# CONFIG_VIA_RHINE is not set
482
483#
484# Ethernet (1000 Mbit)
485#
486# CONFIG_ACENIC is not set
487# CONFIG_DL2K is not set
488# CONFIG_E1000 is not set
489# CONFIG_NS83820 is not set
490# CONFIG_HAMACHI is not set
491# CONFIG_YELLOWFIN is not set
492# CONFIG_R8169 is not set
493# CONFIG_SIS190 is not set
494# CONFIG_SKGE is not set
495# CONFIG_SK98LIN is not set
496# CONFIG_VIA_VELOCITY is not set
497# CONFIG_TIGON3 is not set
498# CONFIG_BNX2 is not set
499
500#
501# Ethernet (10000 Mbit)
502#
503# CONFIG_CHELSIO_T1 is not set
504# CONFIG_IXGB is not set
505# CONFIG_S2IO is not set
506
507#
508# Token Ring devices
509#
510# CONFIG_TR is not set
511
512#
513# Wireless LAN (non-hamradio)
514#
515# CONFIG_NET_RADIO is not set
516
517#
518# Wan interfaces
519#
520CONFIG_WAN=y
521# CONFIG_DSCC4 is not set
522# CONFIG_LANMEDIA is not set
523# CONFIG_SYNCLINK_SYNCPPP is not set
524CONFIG_HDLC=y
525CONFIG_HDLC_RAW=y
526# CONFIG_HDLC_RAW_ETH is not set
527CONFIG_HDLC_CISCO=y
528CONFIG_HDLC_FR=y
529CONFIG_HDLC_PPP=y
530
531#
532# X.25/LAPB support is disabled
533#
534# CONFIG_PCI200SYN is not set
535# CONFIG_WANXL is not set
536# CONFIG_PC300 is not set
537# CONFIG_FARSYNC is not set
538CONFIG_DLCI=y
539CONFIG_DLCI_COUNT=24
540CONFIG_DLCI_MAX=8
541# CONFIG_FDDI is not set
542# CONFIG_HIPPI is not set
543# CONFIG_PPP is not set
544# CONFIG_SLIP is not set
545# CONFIG_SHAPER is not set
546# CONFIG_NETCONSOLE is not set
547# CONFIG_NETPOLL is not set
548# CONFIG_NET_POLL_CONTROLLER is not set
549
550#
551# ISDN subsystem
552#
553# CONFIG_ISDN is not set
554
555#
556# Input device support
557#
558CONFIG_INPUT=y
559
560#
561# Userland interfaces
562#
563CONFIG_INPUT_MOUSEDEV=y
564CONFIG_INPUT_MOUSEDEV_PSAUX=y
565CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
566CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
567# CONFIG_INPUT_JOYDEV is not set
568# CONFIG_INPUT_TSDEV is not set
569# CONFIG_INPUT_EVDEV is not set
570# CONFIG_INPUT_EVBUG is not set
571
572#
573# Input Device Drivers
574#
575# CONFIG_INPUT_KEYBOARD is not set
576# CONFIG_INPUT_MOUSE is not set
577# CONFIG_INPUT_JOYSTICK is not set
578# CONFIG_INPUT_TOUCHSCREEN is not set
579# CONFIG_INPUT_MISC is not set
580
581#
582# Hardware I/O ports
583#
584# CONFIG_SERIO is not set
585# CONFIG_GAMEPORT is not set
586
587#
588# Character devices
589#
590# CONFIG_VT is not set
591# CONFIG_SERIAL_NONSTANDARD is not set
592
593#
594# Serial drivers
595#
596CONFIG_SERIAL_8250=y
597CONFIG_SERIAL_8250_CONSOLE=y
598CONFIG_SERIAL_8250_NR_UARTS=1
599# CONFIG_SERIAL_8250_EXTENDED is not set
600
601#
602# Non-8250 serial port support
603#
604CONFIG_SERIAL_CORE=y
605CONFIG_SERIAL_CORE_CONSOLE=y
606# CONFIG_SERIAL_JSM is not set
607CONFIG_UNIX98_PTYS=y
608CONFIG_LEGACY_PTYS=y
609CONFIG_LEGACY_PTY_COUNT=256
610
611#
612# IPMI
613#
614# CONFIG_IPMI_HANDLER is not set
615
616#
617# Watchdog Cards
618#
619CONFIG_WATCHDOG=y
620# CONFIG_WATCHDOG_NOWAYOUT is not set
621
622#
623# Watchdog Device Drivers
624#
625# CONFIG_SOFT_WATCHDOG is not set
626CONFIG_IXP2000_WATCHDOG=y
627
628#
629# PCI-based Watchdog Cards
630#
631# CONFIG_PCIPCWATCHDOG is not set
632# CONFIG_WDTPCI is not set
633# CONFIG_NVRAM is not set
634# CONFIG_RTC is not set
635# CONFIG_DTLK is not set
636# CONFIG_R3964 is not set
637# CONFIG_APPLICOM is not set
638
639#
640# Ftape, the floppy tape device driver
641#
642# CONFIG_DRM is not set
643# CONFIG_RAW_DRIVER is not set
644
645#
646# TPM devices
647#
648# CONFIG_TCG_TPM is not set
649# CONFIG_TELCLOCK is not set
650
651#
652# I2C support
653#
654CONFIG_I2C=y
655CONFIG_I2C_CHARDEV=y
656
657#
658# I2C Algorithms
659#
660CONFIG_I2C_ALGOBIT=y
661# CONFIG_I2C_ALGOPCF is not set
662# CONFIG_I2C_ALGOPCA is not set
663
664#
665# I2C Hardware Bus support
666#
667# CONFIG_I2C_ALI1535 is not set
668# CONFIG_I2C_ALI1563 is not set
669# CONFIG_I2C_ALI15X3 is not set
670# CONFIG_I2C_AMD756 is not set
671# CONFIG_I2C_AMD8111 is not set
672# CONFIG_I2C_I801 is not set
673# CONFIG_I2C_I810 is not set
674# CONFIG_I2C_PIIX4 is not set
675CONFIG_I2C_IXP2000=y
676# CONFIG_I2C_NFORCE2 is not set
677# CONFIG_I2C_PARPORT_LIGHT is not set
678# CONFIG_I2C_PROSAVAGE is not set
679# CONFIG_I2C_SAVAGE4 is not set
680# CONFIG_SCx200_ACB is not set
681# CONFIG_I2C_SIS5595 is not set
682# CONFIG_I2C_SIS630 is not set
683# CONFIG_I2C_SIS96X is not set
684# CONFIG_I2C_STUB is not set
685# CONFIG_I2C_VIA is not set
686# CONFIG_I2C_VIAPRO is not set
687# CONFIG_I2C_VOODOO3 is not set
688# CONFIG_I2C_PCA_ISA is not set
689
690#
691# Miscellaneous I2C Chip support
692#
693# CONFIG_SENSORS_DS1337 is not set
694# CONFIG_SENSORS_DS1374 is not set
695CONFIG_SENSORS_EEPROM=y
696# CONFIG_SENSORS_PCF8574 is not set
697# CONFIG_SENSORS_PCA9539 is not set
698# CONFIG_SENSORS_PCF8591 is not set
699# CONFIG_SENSORS_RTC8564 is not set
700# CONFIG_SENSORS_MAX6875 is not set
701# CONFIG_RTC_X1205_I2C is not set
702# CONFIG_I2C_DEBUG_CORE is not set
703# CONFIG_I2C_DEBUG_ALGO is not set
704# CONFIG_I2C_DEBUG_BUS is not set
705# CONFIG_I2C_DEBUG_CHIP is not set
706
707#
708# Hardware Monitoring support
709#
710CONFIG_HWMON=y
711# CONFIG_HWMON_VID is not set
712# CONFIG_SENSORS_ADM1021 is not set
713# CONFIG_SENSORS_ADM1025 is not set
714# CONFIG_SENSORS_ADM1026 is not set
715# CONFIG_SENSORS_ADM1031 is not set
716# CONFIG_SENSORS_ADM9240 is not set
717# CONFIG_SENSORS_ASB100 is not set
718# CONFIG_SENSORS_ATXP1 is not set
719# CONFIG_SENSORS_DS1621 is not set
720# CONFIG_SENSORS_FSCHER is not set
721# CONFIG_SENSORS_FSCPOS is not set
722# CONFIG_SENSORS_GL518SM is not set
723# CONFIG_SENSORS_GL520SM is not set
724# CONFIG_SENSORS_IT87 is not set
725# CONFIG_SENSORS_LM63 is not set
726# CONFIG_SENSORS_LM75 is not set
727# CONFIG_SENSORS_LM77 is not set
728# CONFIG_SENSORS_LM78 is not set
729# CONFIG_SENSORS_LM80 is not set
730# CONFIG_SENSORS_LM83 is not set
731# CONFIG_SENSORS_LM85 is not set
732# CONFIG_SENSORS_LM87 is not set
733# CONFIG_SENSORS_LM90 is not set
734# CONFIG_SENSORS_LM92 is not set
735# CONFIG_SENSORS_MAX1619 is not set
736# CONFIG_SENSORS_PC87360 is not set
737# CONFIG_SENSORS_SIS5595 is not set
738# CONFIG_SENSORS_SMSC47M1 is not set
739# CONFIG_SENSORS_SMSC47B397 is not set
740# CONFIG_SENSORS_VIA686A is not set
741# CONFIG_SENSORS_W83781D is not set
742# CONFIG_SENSORS_W83792D is not set
743# CONFIG_SENSORS_W83L785TS is not set
744# CONFIG_SENSORS_W83627HF is not set
745# CONFIG_SENSORS_W83627EHF is not set
746# CONFIG_HWMON_DEBUG_CHIP is not set
747
748#
749# Misc devices
750#
751
752#
753# Multimedia Capabilities Port drivers
754#
755
756#
757# Multimedia devices
758#
759# CONFIG_VIDEO_DEV is not set
760
761#
762# Digital Video Broadcasting Devices
763#
764# CONFIG_DVB is not set
765
766#
767# Graphics support
768#
769# CONFIG_FB is not set
770
771#
772# Sound
773#
774# CONFIG_SOUND is not set
775
776#
777# USB support
778#
779CONFIG_USB_ARCH_HAS_HCD=y
780CONFIG_USB_ARCH_HAS_OHCI=y
781# CONFIG_USB is not set
782
783#
784# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
785#
786
787#
788# USB Gadget Support
789#
790# CONFIG_USB_GADGET is not set
791
792#
793# MMC/SD Card support
794#
795# CONFIG_MMC is not set
796
797#
798# File systems
799#
800CONFIG_EXT2_FS=y
801CONFIG_EXT2_FS_XATTR=y
802CONFIG_EXT2_FS_POSIX_ACL=y
803# CONFIG_EXT2_FS_SECURITY is not set
804# CONFIG_EXT2_FS_XIP is not set
805CONFIG_EXT3_FS=y
806CONFIG_EXT3_FS_XATTR=y
807CONFIG_EXT3_FS_POSIX_ACL=y
808# CONFIG_EXT3_FS_SECURITY is not set
809CONFIG_JBD=y
810# CONFIG_JBD_DEBUG is not set
811CONFIG_FS_MBCACHE=y
812# CONFIG_REISERFS_FS is not set
813# CONFIG_JFS_FS is not set
814CONFIG_FS_POSIX_ACL=y
815# CONFIG_XFS_FS is not set
816# CONFIG_MINIX_FS is not set
817# CONFIG_ROMFS_FS is not set
818CONFIG_INOTIFY=y
819# CONFIG_QUOTA is not set
820CONFIG_DNOTIFY=y
821# CONFIG_AUTOFS_FS is not set
822# CONFIG_AUTOFS4_FS is not set
823# CONFIG_FUSE_FS is not set
824
825#
826# CD-ROM/DVD Filesystems
827#
828# CONFIG_ISO9660_FS is not set
829# CONFIG_UDF_FS is not set
830
831#
832# DOS/FAT/NT Filesystems
833#
834# CONFIG_MSDOS_FS is not set
835# CONFIG_VFAT_FS is not set
836# CONFIG_NTFS_FS is not set
837
838#
839# Pseudo filesystems
840#
841CONFIG_PROC_FS=y
842CONFIG_SYSFS=y
843CONFIG_TMPFS=y
844# CONFIG_HUGETLB_PAGE is not set
845CONFIG_RAMFS=y
846# CONFIG_RELAYFS_FS is not set
847
848#
849# Miscellaneous filesystems
850#
851# CONFIG_ADFS_FS is not set
852# CONFIG_AFFS_FS is not set
853# CONFIG_HFS_FS is not set
854# CONFIG_HFSPLUS_FS is not set
855# CONFIG_BEFS_FS is not set
856# CONFIG_BFS_FS is not set
857# CONFIG_EFS_FS is not set
858# CONFIG_JFFS_FS is not set
859CONFIG_JFFS2_FS=y
860CONFIG_JFFS2_FS_DEBUG=0
861CONFIG_JFFS2_FS_WRITEBUFFER=y
862# CONFIG_JFFS2_SUMMARY is not set
863# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
864CONFIG_JFFS2_ZLIB=y
865CONFIG_JFFS2_RTIME=y
866# CONFIG_JFFS2_RUBIN is not set
867# CONFIG_CRAMFS is not set
868# CONFIG_VXFS_FS is not set
869# CONFIG_HPFS_FS is not set
870# CONFIG_QNX4FS_FS is not set
871# CONFIG_SYSV_FS is not set
872# CONFIG_UFS_FS is not set
873
874#
875# Network File Systems
876#
877CONFIG_NFS_FS=y
878CONFIG_NFS_V3=y
879# CONFIG_NFS_V3_ACL is not set
880# CONFIG_NFS_V4 is not set
881# CONFIG_NFS_DIRECTIO is not set
882# CONFIG_NFSD is not set
883CONFIG_ROOT_NFS=y
884CONFIG_LOCKD=y
885CONFIG_LOCKD_V4=y
886CONFIG_NFS_COMMON=y
887CONFIG_SUNRPC=y
888# CONFIG_RPCSEC_GSS_KRB5 is not set
889# CONFIG_RPCSEC_GSS_SPKM3 is not set
890# CONFIG_SMB_FS is not set
891# CONFIG_CIFS is not set
892# CONFIG_NCP_FS is not set
893# CONFIG_CODA_FS is not set
894# CONFIG_AFS_FS is not set
895# CONFIG_9P_FS is not set
896
897#
898# Partition Types
899#
900CONFIG_PARTITION_ADVANCED=y
901# CONFIG_ACORN_PARTITION is not set
902# CONFIG_OSF_PARTITION is not set
903# CONFIG_AMIGA_PARTITION is not set
904# CONFIG_ATARI_PARTITION is not set
905# CONFIG_MAC_PARTITION is not set
906CONFIG_MSDOS_PARTITION=y
907# CONFIG_BSD_DISKLABEL is not set
908# CONFIG_MINIX_SUBPARTITION is not set
909# CONFIG_SOLARIS_X86_PARTITION is not set
910# CONFIG_UNIXWARE_DISKLABEL is not set
911# CONFIG_LDM_PARTITION is not set
912# CONFIG_SGI_PARTITION is not set
913# CONFIG_ULTRIX_PARTITION is not set
914# CONFIG_SUN_PARTITION is not set
915# CONFIG_EFI_PARTITION is not set
916
917#
918# Native Language Support
919#
920# CONFIG_NLS is not set
921
922#
923# Profiling support
924#
925# CONFIG_PROFILING is not set
926
927#
928# Kernel hacking
929#
930# CONFIG_PRINTK_TIME is not set
931CONFIG_DEBUG_KERNEL=y
932CONFIG_MAGIC_SYSRQ=y
933CONFIG_LOG_BUF_SHIFT=14
934CONFIG_DETECT_SOFTLOCKUP=y
935# CONFIG_SCHEDSTATS is not set
936# CONFIG_DEBUG_SLAB is not set
937# CONFIG_DEBUG_SPINLOCK is not set
938# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
939# CONFIG_DEBUG_KOBJECT is not set
940CONFIG_DEBUG_BUGVERBOSE=y
941# CONFIG_DEBUG_INFO is not set
942# CONFIG_DEBUG_FS is not set
943# CONFIG_DEBUG_VM is not set
944CONFIG_FRAME_POINTER=y
945# CONFIG_RCU_TORTURE_TEST is not set
946CONFIG_DEBUG_USER=y
947# CONFIG_DEBUG_WAITQ is not set
948CONFIG_DEBUG_ERRORS=y
949CONFIG_DEBUG_LL=y
950# CONFIG_DEBUG_ICEDCC is not set
951
952#
953# Security options
954#
955# CONFIG_KEYS is not set
956# CONFIG_SECURITY is not set
957
958#
959# Cryptographic options
960#
961# CONFIG_CRYPTO is not set
962
963#
964# Hardware crypto devices
965#
966
967#
968# Library routines
969#
970# CONFIG_CRC_CCITT is not set
971# CONFIG_CRC16 is not set
972CONFIG_CRC32=y
973# CONFIG_LIBCRC32C is not set
974CONFIG_ZLIB_INFLATE=y
975CONFIG_ZLIB_DEFLATE=y
diff --git a/arch/arm/configs/ixdp2801_defconfig b/arch/arm/configs/ixdp2801_defconfig
deleted file mode 100644
index f54f3dcc5b33..000000000000
--- a/arch/arm/configs/ixdp2801_defconfig
+++ /dev/null
@@ -1,976 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14-git13
4# Thu Nov 10 15:15:03 2005
5#
6CONFIG_ARM=y
7CONFIG_MMU=y
8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y
11
12#
13# Code maturity level options
14#
15CONFIG_EXPERIMENTAL=y
16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN_ON_SMP=y
18CONFIG_INIT_ENV_ARG_LIMIT=32
19
20#
21# General setup
22#
23CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y
25CONFIG_SWAP=y
26CONFIG_SYSVIPC=y
27# CONFIG_POSIX_MQUEUE is not set
28CONFIG_BSD_PROCESS_ACCT=y
29# CONFIG_BSD_PROCESS_ACCT_V3 is not set
30CONFIG_SYSCTL=y
31# CONFIG_AUDIT is not set
32# CONFIG_HOTPLUG is not set
33CONFIG_KOBJECT_UEVENT=y
34# CONFIG_IKCONFIG is not set
35CONFIG_INITRAMFS_SOURCE=""
36CONFIG_EMBEDDED=y
37CONFIG_KALLSYMS=y
38# CONFIG_KALLSYMS_ALL is not set
39# CONFIG_KALLSYMS_EXTRA_PASS is not set
40CONFIG_PRINTK=y
41CONFIG_BUG=y
42CONFIG_BASE_FULL=y
43CONFIG_FUTEX=y
44CONFIG_EPOLL=y
45CONFIG_CC_OPTIMIZE_FOR_SIZE=y
46CONFIG_SHMEM=y
47CONFIG_CC_ALIGN_FUNCTIONS=0
48CONFIG_CC_ALIGN_LABELS=0
49CONFIG_CC_ALIGN_LOOPS=0
50CONFIG_CC_ALIGN_JUMPS=0
51# CONFIG_TINY_SHMEM is not set
52CONFIG_BASE_SMALL=0
53
54#
55# Loadable module support
56#
57CONFIG_MODULES=y
58CONFIG_MODULE_UNLOAD=y
59# CONFIG_MODULE_FORCE_UNLOAD is not set
60CONFIG_OBSOLETE_MODPARM=y
61# CONFIG_MODVERSIONS is not set
62# CONFIG_MODULE_SRCVERSION_ALL is not set
63CONFIG_KMOD=y
64
65#
66# Block layer
67#
68
69#
70# IO Schedulers
71#
72CONFIG_IOSCHED_NOOP=y
73CONFIG_IOSCHED_AS=y
74CONFIG_IOSCHED_DEADLINE=y
75CONFIG_IOSCHED_CFQ=y
76CONFIG_DEFAULT_AS=y
77# CONFIG_DEFAULT_DEADLINE is not set
78# CONFIG_DEFAULT_CFQ is not set
79# CONFIG_DEFAULT_NOOP is not set
80CONFIG_DEFAULT_IOSCHED="anticipatory"
81
82#
83# System Type
84#
85# CONFIG_ARCH_CLPS7500 is not set
86# CONFIG_ARCH_CLPS711X is not set
87# CONFIG_ARCH_CO285 is not set
88# CONFIG_ARCH_EBSA110 is not set
89# CONFIG_ARCH_FOOTBRIDGE is not set
90# CONFIG_ARCH_INTEGRATOR is not set
91# CONFIG_ARCH_IOP3XX is not set
92# CONFIG_ARCH_IXP4XX is not set
93CONFIG_ARCH_IXP2000=y
94# CONFIG_ARCH_L7200 is not set
95# CONFIG_ARCH_PXA is not set
96# CONFIG_ARCH_RPC is not set
97# CONFIG_ARCH_SA1100 is not set
98# CONFIG_ARCH_S3C2410 is not set
99# CONFIG_ARCH_SHARK is not set
100# CONFIG_ARCH_LH7A40X is not set
101# CONFIG_ARCH_OMAP is not set
102# CONFIG_ARCH_VERSATILE is not set
103# CONFIG_ARCH_REALVIEW is not set
104# CONFIG_ARCH_IMX is not set
105# CONFIG_ARCH_H720X is not set
106# CONFIG_ARCH_AAEC2000 is not set
107CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
108
109#
110# Intel IXP2400/2800 Implementation Options
111#
112
113#
114# IXP2400/2800 Platforms
115#
116# CONFIG_ARCH_ENP2611 is not set
117# CONFIG_ARCH_IXDP2400 is not set
118# CONFIG_ARCH_IXDP2800 is not set
119# CONFIG_ARCH_IXDP2401 is not set
120CONFIG_ARCH_IXDP2801=y
121CONFIG_ARCH_IXDP2X01=y
122# CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set
123
124#
125# Processor Type
126#
127CONFIG_CPU_32=y
128CONFIG_CPU_XSCALE=y
129CONFIG_CPU_32v5=y
130CONFIG_CPU_ABRT_EV5T=y
131CONFIG_CPU_CACHE_VIVT=y
132CONFIG_CPU_TLB_V4WBI=y
133
134#
135# Processor Features
136#
137# CONFIG_ARM_THUMB is not set
138CONFIG_CPU_BIG_ENDIAN=y
139CONFIG_XSCALE_PMU=y
140
141#
142# Bus support
143#
144CONFIG_ISA_DMA_API=y
145CONFIG_PCI=y
146CONFIG_PCI_LEGACY_PROC=y
147# CONFIG_PCI_DEBUG is not set
148
149#
150# PCCARD (PCMCIA/CardBus) support
151#
152# CONFIG_PCCARD is not set
153
154#
155# Kernel Features
156#
157# CONFIG_PREEMPT is not set
158# CONFIG_NO_IDLE_HZ is not set
159# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
160CONFIG_SELECT_MEMORY_MODEL=y
161CONFIG_FLATMEM_MANUAL=y
162# CONFIG_DISCONTIGMEM_MANUAL is not set
163# CONFIG_SPARSEMEM_MANUAL is not set
164CONFIG_FLATMEM=y
165CONFIG_FLAT_NODE_MEM_MAP=y
166# CONFIG_SPARSEMEM_STATIC is not set
167CONFIG_SPLIT_PTLOCK_CPUS=4096
168CONFIG_ALIGNMENT_TRAP=y
169
170#
171# Boot options
172#
173CONFIG_ZBOOT_ROM_TEXT=0x0
174CONFIG_ZBOOT_ROM_BSS=0x0
175CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M@0x0"
176# CONFIG_XIP_KERNEL is not set
177
178#
179# Floating point emulation
180#
181
182#
183# At least one emulation must be selected
184#
185CONFIG_FPE_NWFPE=y
186CONFIG_FPE_NWFPE_XP=y
187# CONFIG_FPE_FASTFPE is not set
188
189#
190# Userspace binary formats
191#
192CONFIG_BINFMT_ELF=y
193# CONFIG_BINFMT_AOUT is not set
194# CONFIG_BINFMT_MISC is not set
195# CONFIG_ARTHUR is not set
196
197#
198# Power management options
199#
200# CONFIG_PM is not set
201
202#
203# Networking
204#
205CONFIG_NET=y
206
207#
208# Networking options
209#
210CONFIG_PACKET=y
211CONFIG_PACKET_MMAP=y
212CONFIG_UNIX=y
213# CONFIG_NET_KEY is not set
214CONFIG_INET=y
215# CONFIG_IP_MULTICAST is not set
216# CONFIG_IP_ADVANCED_ROUTER is not set
217CONFIG_IP_FIB_HASH=y
218CONFIG_IP_PNP=y
219CONFIG_IP_PNP_DHCP=y
220CONFIG_IP_PNP_BOOTP=y
221# CONFIG_IP_PNP_RARP is not set
222# CONFIG_NET_IPIP is not set
223# CONFIG_NET_IPGRE is not set
224# CONFIG_ARPD is not set
225CONFIG_SYN_COOKIES=y
226# CONFIG_INET_AH is not set
227# CONFIG_INET_ESP is not set
228# CONFIG_INET_IPCOMP is not set
229# CONFIG_INET_TUNNEL is not set
230CONFIG_INET_DIAG=y
231CONFIG_INET_TCP_DIAG=y
232# CONFIG_TCP_CONG_ADVANCED is not set
233CONFIG_TCP_CONG_BIC=y
234# CONFIG_IPV6 is not set
235# CONFIG_NETFILTER is not set
236
237#
238# DCCP Configuration (EXPERIMENTAL)
239#
240# CONFIG_IP_DCCP is not set
241
242#
243# SCTP Configuration (EXPERIMENTAL)
244#
245# CONFIG_IP_SCTP is not set
246# CONFIG_ATM is not set
247# CONFIG_BRIDGE is not set
248# CONFIG_VLAN_8021Q is not set
249# CONFIG_DECNET is not set
250# CONFIG_LLC2 is not set
251# CONFIG_IPX is not set
252# CONFIG_ATALK is not set
253# CONFIG_X25 is not set
254# CONFIG_LAPB is not set
255# CONFIG_NET_DIVERT is not set
256# CONFIG_ECONET is not set
257# CONFIG_WAN_ROUTER is not set
258
259#
260# QoS and/or fair queueing
261#
262# CONFIG_NET_SCHED is not set
263# CONFIG_NET_CLS_ROUTE is not set
264
265#
266# Network testing
267#
268# CONFIG_NET_PKTGEN is not set
269# CONFIG_HAMRADIO is not set
270# CONFIG_IRDA is not set
271# CONFIG_BT is not set
272# CONFIG_IEEE80211 is not set
273
274#
275# Device Drivers
276#
277
278#
279# Generic Driver Options
280#
281CONFIG_STANDALONE=y
282# CONFIG_PREVENT_FIRMWARE_BUILD is not set
283# CONFIG_FW_LOADER is not set
284# CONFIG_DEBUG_DRIVER is not set
285
286#
287# Memory Technology Devices (MTD)
288#
289CONFIG_MTD=y
290# CONFIG_MTD_DEBUG is not set
291# CONFIG_MTD_CONCAT is not set
292CONFIG_MTD_PARTITIONS=y
293CONFIG_MTD_REDBOOT_PARTS=y
294CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
295CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
296CONFIG_MTD_REDBOOT_PARTS_READONLY=y
297# CONFIG_MTD_CMDLINE_PARTS is not set
298# CONFIG_MTD_AFS_PARTS is not set
299
300#
301# User Modules And Translation Layers
302#
303CONFIG_MTD_CHAR=y
304CONFIG_MTD_BLOCK=y
305# CONFIG_FTL is not set
306# CONFIG_NFTL is not set
307# CONFIG_INFTL is not set
308# CONFIG_RFD_FTL is not set
309
310#
311# RAM/ROM/Flash chip drivers
312#
313CONFIG_MTD_CFI=y
314# CONFIG_MTD_JEDECPROBE is not set
315CONFIG_MTD_GEN_PROBE=y
316# CONFIG_MTD_CFI_ADV_OPTIONS is not set
317CONFIG_MTD_MAP_BANK_WIDTH_1=y
318CONFIG_MTD_MAP_BANK_WIDTH_2=y
319CONFIG_MTD_MAP_BANK_WIDTH_4=y
320# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
321# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
322# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
323CONFIG_MTD_CFI_I1=y
324CONFIG_MTD_CFI_I2=y
325# CONFIG_MTD_CFI_I4 is not set
326# CONFIG_MTD_CFI_I8 is not set
327CONFIG_MTD_CFI_INTELEXT=y
328# CONFIG_MTD_CFI_AMDSTD is not set
329# CONFIG_MTD_CFI_STAA is not set
330CONFIG_MTD_CFI_UTIL=y
331# CONFIG_MTD_RAM is not set
332# CONFIG_MTD_ROM is not set
333# CONFIG_MTD_ABSENT is not set
334# CONFIG_MTD_XIP is not set
335
336#
337# Mapping drivers for chip access
338#
339CONFIG_MTD_COMPLEX_MAPPINGS=y
340# CONFIG_MTD_PHYSMAP is not set
341# CONFIG_MTD_ARM_INTEGRATOR is not set
342CONFIG_MTD_IXP2000=y
343# CONFIG_MTD_PCI is not set
344# CONFIG_MTD_PLATRAM is not set
345
346#
347# Self-contained MTD device drivers
348#
349# CONFIG_MTD_PMC551 is not set
350# CONFIG_MTD_SLRAM is not set
351# CONFIG_MTD_PHRAM is not set
352# CONFIG_MTD_MTDRAM is not set
353# CONFIG_MTD_BLKMTD is not set
354# CONFIG_MTD_BLOCK2MTD is not set
355
356#
357# Disk-On-Chip Device Drivers
358#
359# CONFIG_MTD_DOC2000 is not set
360# CONFIG_MTD_DOC2001 is not set
361# CONFIG_MTD_DOC2001PLUS is not set
362
363#
364# NAND Flash Device Drivers
365#
366# CONFIG_MTD_NAND is not set
367
368#
369# OneNAND Flash Device Drivers
370#
371# CONFIG_MTD_ONENAND is not set
372
373#
374# Parallel port support
375#
376# CONFIG_PARPORT is not set
377
378#
379# Plug and Play support
380#
381
382#
383# Block devices
384#
385# CONFIG_BLK_CPQ_DA is not set
386# CONFIG_BLK_CPQ_CISS_DA is not set
387# CONFIG_BLK_DEV_DAC960 is not set
388# CONFIG_BLK_DEV_UMEM is not set
389# CONFIG_BLK_DEV_COW_COMMON is not set
390CONFIG_BLK_DEV_LOOP=y
391# CONFIG_BLK_DEV_CRYPTOLOOP is not set
392# CONFIG_BLK_DEV_NBD is not set
393# CONFIG_BLK_DEV_SX8 is not set
394CONFIG_BLK_DEV_RAM=y
395CONFIG_BLK_DEV_RAM_COUNT=16
396CONFIG_BLK_DEV_RAM_SIZE=8192
397CONFIG_BLK_DEV_INITRD=y
398# CONFIG_CDROM_PKTCDVD is not set
399# CONFIG_ATA_OVER_ETH is not set
400
401#
402# SCSI device support
403#
404# CONFIG_RAID_ATTRS is not set
405# CONFIG_SCSI is not set
406
407#
408# Multi-device support (RAID and LVM)
409#
410# CONFIG_MD is not set
411
412#
413# Fusion MPT device support
414#
415# CONFIG_FUSION is not set
416
417#
418# IEEE 1394 (FireWire) support
419#
420# CONFIG_IEEE1394 is not set
421
422#
423# I2O device support
424#
425# CONFIG_I2O is not set
426
427#
428# Network device support
429#
430CONFIG_NETDEVICES=y
431CONFIG_DUMMY=y
432# CONFIG_BONDING is not set
433# CONFIG_EQUALIZER is not set
434# CONFIG_TUN is not set
435
436#
437# ARCnet devices
438#
439# CONFIG_ARCNET is not set
440
441#
442# PHY device support
443#
444# CONFIG_PHYLIB is not set
445
446#
447# Ethernet (10 or 100Mbit)
448#
449CONFIG_NET_ETHERNET=y
450CONFIG_MII=y
451# CONFIG_HAPPYMEAL is not set
452# CONFIG_SUNGEM is not set
453# CONFIG_CASSINI is not set
454# CONFIG_NET_VENDOR_3COM is not set
455# CONFIG_SMC91X is not set
456# CONFIG_DM9000 is not set
457
458#
459# Tulip family network device support
460#
461# CONFIG_NET_TULIP is not set
462# CONFIG_HP100 is not set
463CONFIG_NET_PCI=y
464# CONFIG_PCNET32 is not set
465# CONFIG_AMD8111_ETH is not set
466# CONFIG_ADAPTEC_STARFIRE is not set
467# CONFIG_B44 is not set
468# CONFIG_FORCEDETH is not set
469CONFIG_CS89x0=y
470# CONFIG_DGRS is not set
471CONFIG_EEPRO100=y
472# CONFIG_E100 is not set
473# CONFIG_FEALNX is not set
474# CONFIG_NATSEMI is not set
475# CONFIG_NE2K_PCI is not set
476# CONFIG_8139CP is not set
477# CONFIG_8139TOO is not set
478# CONFIG_SIS900 is not set
479# CONFIG_EPIC100 is not set
480# CONFIG_SUNDANCE is not set
481# CONFIG_TLAN is not set
482# CONFIG_VIA_RHINE is not set
483
484#
485# Ethernet (1000 Mbit)
486#
487# CONFIG_ACENIC is not set
488# CONFIG_DL2K is not set
489# CONFIG_E1000 is not set
490# CONFIG_NS83820 is not set
491# CONFIG_HAMACHI is not set
492# CONFIG_YELLOWFIN is not set
493# CONFIG_R8169 is not set
494# CONFIG_SIS190 is not set
495# CONFIG_SKGE is not set
496# CONFIG_SK98LIN is not set
497# CONFIG_VIA_VELOCITY is not set
498# CONFIG_TIGON3 is not set
499# CONFIG_BNX2 is not set
500
501#
502# Ethernet (10000 Mbit)
503#
504# CONFIG_CHELSIO_T1 is not set
505# CONFIG_IXGB is not set
506# CONFIG_S2IO is not set
507
508#
509# Token Ring devices
510#
511# CONFIG_TR is not set
512
513#
514# Wireless LAN (non-hamradio)
515#
516# CONFIG_NET_RADIO is not set
517
518#
519# Wan interfaces
520#
521CONFIG_WAN=y
522# CONFIG_DSCC4 is not set
523# CONFIG_LANMEDIA is not set
524# CONFIG_SYNCLINK_SYNCPPP is not set
525CONFIG_HDLC=y
526CONFIG_HDLC_RAW=y
527# CONFIG_HDLC_RAW_ETH is not set
528CONFIG_HDLC_CISCO=y
529CONFIG_HDLC_FR=y
530CONFIG_HDLC_PPP=y
531
532#
533# X.25/LAPB support is disabled
534#
535# CONFIG_PCI200SYN is not set
536# CONFIG_WANXL is not set
537# CONFIG_PC300 is not set
538# CONFIG_FARSYNC is not set
539CONFIG_DLCI=y
540CONFIG_DLCI_COUNT=24
541CONFIG_DLCI_MAX=8
542# CONFIG_FDDI is not set
543# CONFIG_HIPPI is not set
544# CONFIG_PPP is not set
545# CONFIG_SLIP is not set
546# CONFIG_SHAPER is not set
547# CONFIG_NETCONSOLE is not set
548# CONFIG_NETPOLL is not set
549# CONFIG_NET_POLL_CONTROLLER is not set
550
551#
552# ISDN subsystem
553#
554# CONFIG_ISDN is not set
555
556#
557# Input device support
558#
559CONFIG_INPUT=y
560
561#
562# Userland interfaces
563#
564CONFIG_INPUT_MOUSEDEV=y
565CONFIG_INPUT_MOUSEDEV_PSAUX=y
566CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
567CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
568# CONFIG_INPUT_JOYDEV is not set
569# CONFIG_INPUT_TSDEV is not set
570# CONFIG_INPUT_EVDEV is not set
571# CONFIG_INPUT_EVBUG is not set
572
573#
574# Input Device Drivers
575#
576# CONFIG_INPUT_KEYBOARD is not set
577# CONFIG_INPUT_MOUSE is not set
578# CONFIG_INPUT_JOYSTICK is not set
579# CONFIG_INPUT_TOUCHSCREEN is not set
580# CONFIG_INPUT_MISC is not set
581
582#
583# Hardware I/O ports
584#
585# CONFIG_SERIO is not set
586# CONFIG_GAMEPORT is not set
587
588#
589# Character devices
590#
591# CONFIG_VT is not set
592# CONFIG_SERIAL_NONSTANDARD is not set
593
594#
595# Serial drivers
596#
597CONFIG_SERIAL_8250=y
598CONFIG_SERIAL_8250_CONSOLE=y
599CONFIG_SERIAL_8250_NR_UARTS=3
600# CONFIG_SERIAL_8250_EXTENDED is not set
601
602#
603# Non-8250 serial port support
604#
605CONFIG_SERIAL_CORE=y
606CONFIG_SERIAL_CORE_CONSOLE=y
607# CONFIG_SERIAL_JSM is not set
608CONFIG_UNIX98_PTYS=y
609CONFIG_LEGACY_PTYS=y
610CONFIG_LEGACY_PTY_COUNT=256
611
612#
613# IPMI
614#
615# CONFIG_IPMI_HANDLER is not set
616
617#
618# Watchdog Cards
619#
620CONFIG_WATCHDOG=y
621# CONFIG_WATCHDOG_NOWAYOUT is not set
622
623#
624# Watchdog Device Drivers
625#
626# CONFIG_SOFT_WATCHDOG is not set
627CONFIG_IXP2000_WATCHDOG=y
628
629#
630# PCI-based Watchdog Cards
631#
632# CONFIG_PCIPCWATCHDOG is not set
633# CONFIG_WDTPCI is not set
634# CONFIG_NVRAM is not set
635# CONFIG_RTC is not set
636# CONFIG_DTLK is not set
637# CONFIG_R3964 is not set
638# CONFIG_APPLICOM is not set
639
640#
641# Ftape, the floppy tape device driver
642#
643# CONFIG_DRM is not set
644# CONFIG_RAW_DRIVER is not set
645
646#
647# TPM devices
648#
649# CONFIG_TCG_TPM is not set
650# CONFIG_TELCLOCK is not set
651
652#
653# I2C support
654#
655CONFIG_I2C=y
656CONFIG_I2C_CHARDEV=y
657
658#
659# I2C Algorithms
660#
661CONFIG_I2C_ALGOBIT=y
662# CONFIG_I2C_ALGOPCF is not set
663# CONFIG_I2C_ALGOPCA is not set
664
665#
666# I2C Hardware Bus support
667#
668# CONFIG_I2C_ALI1535 is not set
669# CONFIG_I2C_ALI1563 is not set
670# CONFIG_I2C_ALI15X3 is not set
671# CONFIG_I2C_AMD756 is not set
672# CONFIG_I2C_AMD8111 is not set
673# CONFIG_I2C_I801 is not set
674# CONFIG_I2C_I810 is not set
675# CONFIG_I2C_PIIX4 is not set
676CONFIG_I2C_IXP2000=y
677# CONFIG_I2C_NFORCE2 is not set
678# CONFIG_I2C_PARPORT_LIGHT is not set
679# CONFIG_I2C_PROSAVAGE is not set
680# CONFIG_I2C_SAVAGE4 is not set
681# CONFIG_SCx200_ACB is not set
682# CONFIG_I2C_SIS5595 is not set
683# CONFIG_I2C_SIS630 is not set
684# CONFIG_I2C_SIS96X is not set
685# CONFIG_I2C_STUB is not set
686# CONFIG_I2C_VIA is not set
687# CONFIG_I2C_VIAPRO is not set
688# CONFIG_I2C_VOODOO3 is not set
689# CONFIG_I2C_PCA_ISA is not set
690
691#
692# Miscellaneous I2C Chip support
693#
694# CONFIG_SENSORS_DS1337 is not set
695# CONFIG_SENSORS_DS1374 is not set
696CONFIG_SENSORS_EEPROM=y
697# CONFIG_SENSORS_PCF8574 is not set
698# CONFIG_SENSORS_PCA9539 is not set
699# CONFIG_SENSORS_PCF8591 is not set
700# CONFIG_SENSORS_RTC8564 is not set
701# CONFIG_SENSORS_MAX6875 is not set
702# CONFIG_RTC_X1205_I2C is not set
703# CONFIG_I2C_DEBUG_CORE is not set
704# CONFIG_I2C_DEBUG_ALGO is not set
705# CONFIG_I2C_DEBUG_BUS is not set
706# CONFIG_I2C_DEBUG_CHIP is not set
707
708#
709# Hardware Monitoring support
710#
711CONFIG_HWMON=y
712# CONFIG_HWMON_VID is not set
713# CONFIG_SENSORS_ADM1021 is not set
714# CONFIG_SENSORS_ADM1025 is not set
715# CONFIG_SENSORS_ADM1026 is not set
716# CONFIG_SENSORS_ADM1031 is not set
717# CONFIG_SENSORS_ADM9240 is not set
718# CONFIG_SENSORS_ASB100 is not set
719# CONFIG_SENSORS_ATXP1 is not set
720# CONFIG_SENSORS_DS1621 is not set
721# CONFIG_SENSORS_FSCHER is not set
722# CONFIG_SENSORS_FSCPOS is not set
723# CONFIG_SENSORS_GL518SM is not set
724# CONFIG_SENSORS_GL520SM is not set
725# CONFIG_SENSORS_IT87 is not set
726# CONFIG_SENSORS_LM63 is not set
727# CONFIG_SENSORS_LM75 is not set
728# CONFIG_SENSORS_LM77 is not set
729# CONFIG_SENSORS_LM78 is not set
730# CONFIG_SENSORS_LM80 is not set
731# CONFIG_SENSORS_LM83 is not set
732# CONFIG_SENSORS_LM85 is not set
733# CONFIG_SENSORS_LM87 is not set
734# CONFIG_SENSORS_LM90 is not set
735# CONFIG_SENSORS_LM92 is not set
736# CONFIG_SENSORS_MAX1619 is not set
737# CONFIG_SENSORS_PC87360 is not set
738# CONFIG_SENSORS_SIS5595 is not set
739# CONFIG_SENSORS_SMSC47M1 is not set
740# CONFIG_SENSORS_SMSC47B397 is not set
741# CONFIG_SENSORS_VIA686A is not set
742# CONFIG_SENSORS_W83781D is not set
743# CONFIG_SENSORS_W83792D is not set
744# CONFIG_SENSORS_W83L785TS is not set
745# CONFIG_SENSORS_W83627HF is not set
746# CONFIG_SENSORS_W83627EHF is not set
747# CONFIG_HWMON_DEBUG_CHIP is not set
748
749#
750# Misc devices
751#
752
753#
754# Multimedia Capabilities Port drivers
755#
756
757#
758# Multimedia devices
759#
760# CONFIG_VIDEO_DEV is not set
761
762#
763# Digital Video Broadcasting Devices
764#
765# CONFIG_DVB is not set
766
767#
768# Graphics support
769#
770# CONFIG_FB is not set
771
772#
773# Sound
774#
775# CONFIG_SOUND is not set
776
777#
778# USB support
779#
780CONFIG_USB_ARCH_HAS_HCD=y
781CONFIG_USB_ARCH_HAS_OHCI=y
782# CONFIG_USB is not set
783
784#
785# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
786#
787
788#
789# USB Gadget Support
790#
791# CONFIG_USB_GADGET is not set
792
793#
794# MMC/SD Card support
795#
796# CONFIG_MMC is not set
797
798#
799# File systems
800#
801CONFIG_EXT2_FS=y
802CONFIG_EXT2_FS_XATTR=y
803CONFIG_EXT2_FS_POSIX_ACL=y
804# CONFIG_EXT2_FS_SECURITY is not set
805# CONFIG_EXT2_FS_XIP is not set
806CONFIG_EXT3_FS=y
807CONFIG_EXT3_FS_XATTR=y
808CONFIG_EXT3_FS_POSIX_ACL=y
809# CONFIG_EXT3_FS_SECURITY is not set
810CONFIG_JBD=y
811# CONFIG_JBD_DEBUG is not set
812CONFIG_FS_MBCACHE=y
813# CONFIG_REISERFS_FS is not set
814# CONFIG_JFS_FS is not set
815CONFIG_FS_POSIX_ACL=y
816# CONFIG_XFS_FS is not set
817# CONFIG_MINIX_FS is not set
818# CONFIG_ROMFS_FS is not set
819CONFIG_INOTIFY=y
820# CONFIG_QUOTA is not set
821CONFIG_DNOTIFY=y
822# CONFIG_AUTOFS_FS is not set
823# CONFIG_AUTOFS4_FS is not set
824# CONFIG_FUSE_FS is not set
825
826#
827# CD-ROM/DVD Filesystems
828#
829# CONFIG_ISO9660_FS is not set
830# CONFIG_UDF_FS is not set
831
832#
833# DOS/FAT/NT Filesystems
834#
835# CONFIG_MSDOS_FS is not set
836# CONFIG_VFAT_FS is not set
837# CONFIG_NTFS_FS is not set
838
839#
840# Pseudo filesystems
841#
842CONFIG_PROC_FS=y
843CONFIG_SYSFS=y
844CONFIG_TMPFS=y
845# CONFIG_HUGETLB_PAGE is not set
846CONFIG_RAMFS=y
847# CONFIG_RELAYFS_FS is not set
848
849#
850# Miscellaneous filesystems
851#
852# CONFIG_ADFS_FS is not set
853# CONFIG_AFFS_FS is not set
854# CONFIG_HFS_FS is not set
855# CONFIG_HFSPLUS_FS is not set
856# CONFIG_BEFS_FS is not set
857# CONFIG_BFS_FS is not set
858# CONFIG_EFS_FS is not set
859# CONFIG_JFFS_FS is not set
860CONFIG_JFFS2_FS=y
861CONFIG_JFFS2_FS_DEBUG=0
862CONFIG_JFFS2_FS_WRITEBUFFER=y
863# CONFIG_JFFS2_SUMMARY is not set
864# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
865CONFIG_JFFS2_ZLIB=y
866CONFIG_JFFS2_RTIME=y
867# CONFIG_JFFS2_RUBIN is not set
868# CONFIG_CRAMFS is not set
869# CONFIG_VXFS_FS is not set
870# CONFIG_HPFS_FS is not set
871# CONFIG_QNX4FS_FS is not set
872# CONFIG_SYSV_FS is not set
873# CONFIG_UFS_FS is not set
874
875#
876# Network File Systems
877#
878CONFIG_NFS_FS=y
879CONFIG_NFS_V3=y
880# CONFIG_NFS_V3_ACL is not set
881# CONFIG_NFS_V4 is not set
882# CONFIG_NFS_DIRECTIO is not set
883# CONFIG_NFSD is not set
884CONFIG_ROOT_NFS=y
885CONFIG_LOCKD=y
886CONFIG_LOCKD_V4=y
887CONFIG_NFS_COMMON=y
888CONFIG_SUNRPC=y
889# CONFIG_RPCSEC_GSS_KRB5 is not set
890# CONFIG_RPCSEC_GSS_SPKM3 is not set
891# CONFIG_SMB_FS is not set
892# CONFIG_CIFS is not set
893# CONFIG_NCP_FS is not set
894# CONFIG_CODA_FS is not set
895# CONFIG_AFS_FS is not set
896# CONFIG_9P_FS is not set
897
898#
899# Partition Types
900#
901CONFIG_PARTITION_ADVANCED=y
902# CONFIG_ACORN_PARTITION is not set
903# CONFIG_OSF_PARTITION is not set
904# CONFIG_AMIGA_PARTITION is not set
905# CONFIG_ATARI_PARTITION is not set
906# CONFIG_MAC_PARTITION is not set
907CONFIG_MSDOS_PARTITION=y
908# CONFIG_BSD_DISKLABEL is not set
909# CONFIG_MINIX_SUBPARTITION is not set
910# CONFIG_SOLARIS_X86_PARTITION is not set
911# CONFIG_UNIXWARE_DISKLABEL is not set
912# CONFIG_LDM_PARTITION is not set
913# CONFIG_SGI_PARTITION is not set
914# CONFIG_ULTRIX_PARTITION is not set
915# CONFIG_SUN_PARTITION is not set
916# CONFIG_EFI_PARTITION is not set
917
918#
919# Native Language Support
920#
921# CONFIG_NLS is not set
922
923#
924# Profiling support
925#
926# CONFIG_PROFILING is not set
927
928#
929# Kernel hacking
930#
931# CONFIG_PRINTK_TIME is not set
932CONFIG_DEBUG_KERNEL=y
933CONFIG_MAGIC_SYSRQ=y
934CONFIG_LOG_BUF_SHIFT=14
935CONFIG_DETECT_SOFTLOCKUP=y
936# CONFIG_SCHEDSTATS is not set
937# CONFIG_DEBUG_SLAB is not set
938# CONFIG_DEBUG_SPINLOCK is not set
939# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
940# CONFIG_DEBUG_KOBJECT is not set
941CONFIG_DEBUG_BUGVERBOSE=y
942# CONFIG_DEBUG_INFO is not set
943# CONFIG_DEBUG_FS is not set
944# CONFIG_DEBUG_VM is not set
945CONFIG_FRAME_POINTER=y
946# CONFIG_RCU_TORTURE_TEST is not set
947CONFIG_DEBUG_USER=y
948# CONFIG_DEBUG_WAITQ is not set
949CONFIG_DEBUG_ERRORS=y
950CONFIG_DEBUG_LL=y
951# CONFIG_DEBUG_ICEDCC is not set
952
953#
954# Security options
955#
956# CONFIG_KEYS is not set
957# CONFIG_SECURITY is not set
958
959#
960# Cryptographic options
961#
962# CONFIG_CRYPTO is not set
963
964#
965# Hardware crypto devices
966#
967
968#
969# Library routines
970#
971# CONFIG_CRC_CCITT is not set
972# CONFIG_CRC16 is not set
973CONFIG_CRC32=y
974# CONFIG_LIBCRC32C is not set
975CONFIG_ZLIB_INFLATE=y
976CONFIG_ZLIB_DEFLATE=y
diff --git a/arch/arm/configs/ixdp2400_defconfig b/arch/arm/configs/ixp2000_defconfig
index c67fc449a11f..7b02ca04c3ee 100644
--- a/arch/arm/configs/ixdp2400_defconfig
+++ b/arch/arm/configs/ixp2000_defconfig
@@ -1,11 +1,10 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14-git13 3# Linux kernel version: 2.6.16-rc2
4# Thu Nov 10 15:14:13 2005 4# Wed Feb 8 04:49:11 2006
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 8CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 9CONFIG_GENERIC_CALIBRATE_DELAY=y
11 10
@@ -29,27 +28,31 @@ CONFIG_BSD_PROCESS_ACCT=y
29# CONFIG_BSD_PROCESS_ACCT_V3 is not set 28# CONFIG_BSD_PROCESS_ACCT_V3 is not set
30CONFIG_SYSCTL=y 29CONFIG_SYSCTL=y
31# CONFIG_AUDIT is not set 30# CONFIG_AUDIT is not set
32# CONFIG_HOTPLUG is not set
33CONFIG_KOBJECT_UEVENT=y
34# CONFIG_IKCONFIG is not set 31# CONFIG_IKCONFIG is not set
35CONFIG_INITRAMFS_SOURCE="" 32CONFIG_INITRAMFS_SOURCE=""
33CONFIG_UID16=y
34CONFIG_CC_OPTIMIZE_FOR_SIZE=y
36CONFIG_EMBEDDED=y 35CONFIG_EMBEDDED=y
37CONFIG_KALLSYMS=y 36CONFIG_KALLSYMS=y
38# CONFIG_KALLSYMS_ALL is not set 37# CONFIG_KALLSYMS_ALL is not set
39# CONFIG_KALLSYMS_EXTRA_PASS is not set 38# CONFIG_KALLSYMS_EXTRA_PASS is not set
39# CONFIG_HOTPLUG is not set
40CONFIG_PRINTK=y 40CONFIG_PRINTK=y
41CONFIG_BUG=y 41CONFIG_BUG=y
42CONFIG_ELF_CORE=y
42CONFIG_BASE_FULL=y 43CONFIG_BASE_FULL=y
43CONFIG_FUTEX=y 44CONFIG_FUTEX=y
44CONFIG_EPOLL=y 45CONFIG_EPOLL=y
45CONFIG_CC_OPTIMIZE_FOR_SIZE=y
46CONFIG_SHMEM=y 46CONFIG_SHMEM=y
47CONFIG_CC_ALIGN_FUNCTIONS=0 47CONFIG_CC_ALIGN_FUNCTIONS=0
48CONFIG_CC_ALIGN_LABELS=0 48CONFIG_CC_ALIGN_LABELS=0
49CONFIG_CC_ALIGN_LOOPS=0 49CONFIG_CC_ALIGN_LOOPS=0
50CONFIG_CC_ALIGN_JUMPS=0 50CONFIG_CC_ALIGN_JUMPS=0
51CONFIG_SLAB=y
51# CONFIG_TINY_SHMEM is not set 52# CONFIG_TINY_SHMEM is not set
52CONFIG_BASE_SMALL=0 53CONFIG_BASE_SMALL=0
54# CONFIG_SLOB is not set
55CONFIG_OBSOLETE_INTERMODULE=y
53 56
54# 57#
55# Loadable module support 58# Loadable module support
@@ -104,6 +107,7 @@ CONFIG_ARCH_IXP2000=y
104# CONFIG_ARCH_IMX is not set 107# CONFIG_ARCH_IMX is not set
105# CONFIG_ARCH_H720X is not set 108# CONFIG_ARCH_H720X is not set
106# CONFIG_ARCH_AAEC2000 is not set 109# CONFIG_ARCH_AAEC2000 is not set
110# CONFIG_ARCH_AT91RM9200 is not set
107CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y 111CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
108 112
109# 113#
@@ -113,12 +117,13 @@ CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
113# 117#
114# IXP2400/2800 Platforms 118# IXP2400/2800 Platforms
115# 119#
116# CONFIG_ARCH_ENP2611 is not set 120CONFIG_ARCH_ENP2611=y
117CONFIG_ARCH_IXDP2400=y 121CONFIG_ARCH_IXDP2400=y
118# CONFIG_ARCH_IXDP2800 is not set 122CONFIG_ARCH_IXDP2800=y
119CONFIG_ARCH_IXDP2X00=y 123CONFIG_ARCH_IXDP2X00=y
120# CONFIG_ARCH_IXDP2401 is not set 124CONFIG_ARCH_IXDP2401=y
121# CONFIG_ARCH_IXDP2801 is not set 125CONFIG_ARCH_IXDP2801=y
126CONFIG_ARCH_IXDP2X01=y
122# CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set 127# CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set
123 128
124# 129#
@@ -141,7 +146,6 @@ CONFIG_XSCALE_PMU=y
141# 146#
142# Bus support 147# Bus support
143# 148#
144CONFIG_ISA_DMA_API=y
145CONFIG_PCI=y 149CONFIG_PCI=y
146CONFIG_PCI_LEGACY_PROC=y 150CONFIG_PCI_LEGACY_PROC=y
147# CONFIG_PCI_DEBUG is not set 151# CONFIG_PCI_DEBUG is not set
@@ -156,6 +160,7 @@ CONFIG_PCI_LEGACY_PROC=y
156# 160#
157# CONFIG_PREEMPT is not set 161# CONFIG_PREEMPT is not set
158# CONFIG_NO_IDLE_HZ is not set 162# CONFIG_NO_IDLE_HZ is not set
163# CONFIG_AEABI is not set
159# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 164# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
160CONFIG_SELECT_MEMORY_MODEL=y 165CONFIG_SELECT_MEMORY_MODEL=y
161CONFIG_FLATMEM_MANUAL=y 166CONFIG_FLATMEM_MANUAL=y
@@ -198,6 +203,7 @@ CONFIG_BINFMT_ELF=y
198# Power management options 203# Power management options
199# 204#
200# CONFIG_PM is not set 205# CONFIG_PM is not set
206# CONFIG_APM is not set
201 207
202# 208#
203# Networking 209# Networking
@@ -243,6 +249,11 @@ CONFIG_TCP_CONG_BIC=y
243# SCTP Configuration (EXPERIMENTAL) 249# SCTP Configuration (EXPERIMENTAL)
244# 250#
245# CONFIG_IP_SCTP is not set 251# CONFIG_IP_SCTP is not set
252
253#
254# TIPC Configuration (EXPERIMENTAL)
255#
256# CONFIG_TIPC is not set
246# CONFIG_ATM is not set 257# CONFIG_ATM is not set
247# CONFIG_BRIDGE is not set 258# CONFIG_BRIDGE is not set
248# CONFIG_VLAN_8021Q is not set 259# CONFIG_VLAN_8021Q is not set
@@ -260,7 +271,6 @@ CONFIG_TCP_CONG_BIC=y
260# QoS and/or fair queueing 271# QoS and/or fair queueing
261# 272#
262# CONFIG_NET_SCHED is not set 273# CONFIG_NET_SCHED is not set
263# CONFIG_NET_CLS_ROUTE is not set
264 274
265# 275#
266# Network testing 276# Network testing
@@ -284,6 +294,11 @@ CONFIG_STANDALONE=y
284# CONFIG_DEBUG_DRIVER is not set 294# CONFIG_DEBUG_DRIVER is not set
285 295
286# 296#
297# Connector - unified userspace <-> kernelspace linker
298#
299# CONFIG_CONNECTOR is not set
300
301#
287# Memory Technology Devices (MTD) 302# Memory Technology Devices (MTD)
288# 303#
289CONFIG_MTD=y 304CONFIG_MTD=y
@@ -331,6 +346,7 @@ CONFIG_MTD_CFI_UTIL=y
331# CONFIG_MTD_RAM is not set 346# CONFIG_MTD_RAM is not set
332# CONFIG_MTD_ROM is not set 347# CONFIG_MTD_ROM is not set
333# CONFIG_MTD_ABSENT is not set 348# CONFIG_MTD_ABSENT is not set
349# CONFIG_MTD_OBSOLETE_CHIPS is not set
334# CONFIG_MTD_XIP is not set 350# CONFIG_MTD_XIP is not set
335 351
336# 352#
@@ -466,6 +482,7 @@ CONFIG_NET_PCI=y
466# CONFIG_ADAPTEC_STARFIRE is not set 482# CONFIG_ADAPTEC_STARFIRE is not set
467# CONFIG_B44 is not set 483# CONFIG_B44 is not set
468# CONFIG_FORCEDETH is not set 484# CONFIG_FORCEDETH is not set
485CONFIG_CS89x0=y
469# CONFIG_DGRS is not set 486# CONFIG_DGRS is not set
470CONFIG_EEPRO100=y 487CONFIG_EEPRO100=y
471# CONFIG_E100 is not set 488# CONFIG_E100 is not set
@@ -486,12 +503,14 @@ CONFIG_EEPRO100=y
486# CONFIG_ACENIC is not set 503# CONFIG_ACENIC is not set
487# CONFIG_DL2K is not set 504# CONFIG_DL2K is not set
488# CONFIG_E1000 is not set 505# CONFIG_E1000 is not set
506CONFIG_ENP2611_MSF_NET=y
489# CONFIG_NS83820 is not set 507# CONFIG_NS83820 is not set
490# CONFIG_HAMACHI is not set 508# CONFIG_HAMACHI is not set
491# CONFIG_YELLOWFIN is not set 509# CONFIG_YELLOWFIN is not set
492# CONFIG_R8169 is not set 510# CONFIG_R8169 is not set
493# CONFIG_SIS190 is not set 511# CONFIG_SIS190 is not set
494# CONFIG_SKGE is not set 512# CONFIG_SKGE is not set
513# CONFIG_SKY2 is not set
495# CONFIG_SK98LIN is not set 514# CONFIG_SK98LIN is not set
496# CONFIG_VIA_VELOCITY is not set 515# CONFIG_VIA_VELOCITY is not set
497# CONFIG_TIGON3 is not set 516# CONFIG_TIGON3 is not set
@@ -595,7 +614,8 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
595# 614#
596CONFIG_SERIAL_8250=y 615CONFIG_SERIAL_8250=y
597CONFIG_SERIAL_8250_CONSOLE=y 616CONFIG_SERIAL_8250_CONSOLE=y
598CONFIG_SERIAL_8250_NR_UARTS=1 617CONFIG_SERIAL_8250_NR_UARTS=3
618CONFIG_SERIAL_8250_RUNTIME_UARTS=4
599# CONFIG_SERIAL_8250_EXTENDED is not set 619# CONFIG_SERIAL_8250_EXTENDED is not set
600 620
601# 621#
@@ -603,7 +623,6 @@ CONFIG_SERIAL_8250_NR_UARTS=1
603# 623#
604CONFIG_SERIAL_CORE=y 624CONFIG_SERIAL_CORE=y
605CONFIG_SERIAL_CORE_CONSOLE=y 625CONFIG_SERIAL_CORE_CONSOLE=y
606# CONFIG_SERIAL_JSM is not set
607CONFIG_UNIX98_PTYS=y 626CONFIG_UNIX98_PTYS=y
608CONFIG_LEGACY_PTYS=y 627CONFIG_LEGACY_PTYS=y
609CONFIG_LEGACY_PTY_COUNT=256 628CONFIG_LEGACY_PTY_COUNT=256
@@ -705,6 +724,12 @@ CONFIG_SENSORS_EEPROM=y
705# CONFIG_I2C_DEBUG_CHIP is not set 724# CONFIG_I2C_DEBUG_CHIP is not set
706 725
707# 726#
727# SPI support
728#
729# CONFIG_SPI is not set
730# CONFIG_SPI_MASTER is not set
731
732#
708# Hardware Monitoring support 733# Hardware Monitoring support
709# 734#
710CONFIG_HWMON=y 735CONFIG_HWMON=y
@@ -738,6 +763,7 @@ CONFIG_HWMON=y
738# CONFIG_SENSORS_SMSC47M1 is not set 763# CONFIG_SENSORS_SMSC47M1 is not set
739# CONFIG_SENSORS_SMSC47B397 is not set 764# CONFIG_SENSORS_SMSC47B397 is not set
740# CONFIG_SENSORS_VIA686A is not set 765# CONFIG_SENSORS_VIA686A is not set
766# CONFIG_SENSORS_VT8231 is not set
741# CONFIG_SENSORS_W83781D is not set 767# CONFIG_SENSORS_W83781D is not set
742# CONFIG_SENSORS_W83792D is not set 768# CONFIG_SENSORS_W83792D is not set
743# CONFIG_SENSORS_W83L785TS is not set 769# CONFIG_SENSORS_W83L785TS is not set
@@ -813,6 +839,7 @@ CONFIG_FS_MBCACHE=y
813# CONFIG_JFS_FS is not set 839# CONFIG_JFS_FS is not set
814CONFIG_FS_POSIX_ACL=y 840CONFIG_FS_POSIX_ACL=y
815# CONFIG_XFS_FS is not set 841# CONFIG_XFS_FS is not set
842# CONFIG_OCFS2_FS is not set
816# CONFIG_MINIX_FS is not set 843# CONFIG_MINIX_FS is not set
817# CONFIG_ROMFS_FS is not set 844# CONFIG_ROMFS_FS is not set
818CONFIG_INOTIFY=y 845CONFIG_INOTIFY=y
@@ -844,6 +871,7 @@ CONFIG_TMPFS=y
844# CONFIG_HUGETLB_PAGE is not set 871# CONFIG_HUGETLB_PAGE is not set
845CONFIG_RAMFS=y 872CONFIG_RAMFS=y
846# CONFIG_RELAYFS_FS is not set 873# CONFIG_RELAYFS_FS is not set
874# CONFIG_CONFIGFS_FS is not set
847 875
848# 876#
849# Miscellaneous filesystems 877# Miscellaneous filesystems
@@ -912,6 +940,7 @@ CONFIG_MSDOS_PARTITION=y
912# CONFIG_SGI_PARTITION is not set 940# CONFIG_SGI_PARTITION is not set
913# CONFIG_ULTRIX_PARTITION is not set 941# CONFIG_ULTRIX_PARTITION is not set
914# CONFIG_SUN_PARTITION is not set 942# CONFIG_SUN_PARTITION is not set
943# CONFIG_KARMA_PARTITION is not set
915# CONFIG_EFI_PARTITION is not set 944# CONFIG_EFI_PARTITION is not set
916 945
917# 946#
@@ -928,12 +957,13 @@ CONFIG_MSDOS_PARTITION=y
928# Kernel hacking 957# Kernel hacking
929# 958#
930# CONFIG_PRINTK_TIME is not set 959# CONFIG_PRINTK_TIME is not set
931CONFIG_DEBUG_KERNEL=y
932CONFIG_MAGIC_SYSRQ=y 960CONFIG_MAGIC_SYSRQ=y
961CONFIG_DEBUG_KERNEL=y
933CONFIG_LOG_BUF_SHIFT=14 962CONFIG_LOG_BUF_SHIFT=14
934CONFIG_DETECT_SOFTLOCKUP=y 963CONFIG_DETECT_SOFTLOCKUP=y
935# CONFIG_SCHEDSTATS is not set 964# CONFIG_SCHEDSTATS is not set
936# CONFIG_DEBUG_SLAB is not set 965# CONFIG_DEBUG_SLAB is not set
966CONFIG_DEBUG_MUTEXES=y
937# CONFIG_DEBUG_SPINLOCK is not set 967# CONFIG_DEBUG_SPINLOCK is not set
938# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 968# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
939# CONFIG_DEBUG_KOBJECT is not set 969# CONFIG_DEBUG_KOBJECT is not set
@@ -942,6 +972,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
942# CONFIG_DEBUG_FS is not set 972# CONFIG_DEBUG_FS is not set
943# CONFIG_DEBUG_VM is not set 973# CONFIG_DEBUG_VM is not set
944CONFIG_FRAME_POINTER=y 974CONFIG_FRAME_POINTER=y
975CONFIG_FORCED_INLINING=y
945# CONFIG_RCU_TORTURE_TEST is not set 976# CONFIG_RCU_TORTURE_TEST is not set
946CONFIG_DEBUG_USER=y 977CONFIG_DEBUG_USER=y
947# CONFIG_DEBUG_WAITQ is not set 978# CONFIG_DEBUG_WAITQ is not set
diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig
index 6695b07cf1ba..3cec29d56c8e 100644
--- a/arch/arm/configs/s3c2410_defconfig
+++ b/arch/arm/configs/s3c2410_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.16-rc2 3# Linux kernel version: 2.6.16
4# Mon Feb 6 11:17:23 2006 4# Mon Mar 20 20:36:02 2006
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -12,7 +12,6 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y
12# Code maturity level options 12# Code maturity level options
13# 13#
14CONFIG_EXPERIMENTAL=y 14CONFIG_EXPERIMENTAL=y
15CONFIG_CLEAN_COMPILE=y
16CONFIG_BROKEN_ON_SMP=y 15CONFIG_BROKEN_ON_SMP=y
17CONFIG_INIT_ENV_ARG_LIMIT=32 16CONFIG_INIT_ENV_ARG_LIMIT=32
18 17
@@ -87,6 +86,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
87# CONFIG_ARCH_CLPS711X is not set 86# CONFIG_ARCH_CLPS711X is not set
88# CONFIG_ARCH_CO285 is not set 87# CONFIG_ARCH_CO285 is not set
89# CONFIG_ARCH_EBSA110 is not set 88# CONFIG_ARCH_EBSA110 is not set
89# CONFIG_ARCH_EP93XX is not set
90# CONFIG_ARCH_FOOTBRIDGE is not set 90# CONFIG_ARCH_FOOTBRIDGE is not set
91# CONFIG_ARCH_INTEGRATOR is not set 91# CONFIG_ARCH_INTEGRATOR is not set
92# CONFIG_ARCH_IOP3XX is not set 92# CONFIG_ARCH_IOP3XX is not set
@@ -111,6 +111,7 @@ CONFIG_ARCH_S3C2410=y
111# S3C24XX Implementations 111# S3C24XX Implementations
112# 112#
113CONFIG_MACH_ANUBIS=y 113CONFIG_MACH_ANUBIS=y
114CONFIG_MACH_OSIRIS=y
114CONFIG_ARCH_BAST=y 115CONFIG_ARCH_BAST=y
115CONFIG_BAST_PC104_IRQ=y 116CONFIG_BAST_PC104_IRQ=y
116CONFIG_ARCH_H1940=y 117CONFIG_ARCH_H1940=y
@@ -175,6 +176,7 @@ CONFIG_ISA=y
175# 176#
176# CONFIG_PREEMPT is not set 177# CONFIG_PREEMPT is not set
177# CONFIG_NO_IDLE_HZ is not set 178# CONFIG_NO_IDLE_HZ is not set
179CONFIG_HZ=200
178# CONFIG_AEABI is not set 180# CONFIG_AEABI is not set
179# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 181# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
180CONFIG_SELECT_MEMORY_MODEL=y 182CONFIG_SELECT_MEMORY_MODEL=y
@@ -230,6 +232,7 @@ CONFIG_NET=y
230# 232#
231# Networking options 233# Networking options
232# 234#
235# CONFIG_NETDEBUG is not set
233# CONFIG_PACKET is not set 236# CONFIG_PACKET is not set
234CONFIG_UNIX=y 237CONFIG_UNIX=y
235# CONFIG_NET_KEY is not set 238# CONFIG_NET_KEY is not set
@@ -364,7 +367,6 @@ CONFIG_MTD_CFI_UTIL=y
364CONFIG_MTD_ROM=y 367CONFIG_MTD_ROM=y
365# CONFIG_MTD_ABSENT is not set 368# CONFIG_MTD_ABSENT is not set
366# CONFIG_MTD_OBSOLETE_CHIPS is not set 369# CONFIG_MTD_OBSOLETE_CHIPS is not set
367# CONFIG_MTD_XIP is not set
368 370
369# 371#
370# Mapping drivers for chip access 372# Mapping drivers for chip access
@@ -431,6 +433,7 @@ CONFIG_PARPORT_1284=y
431CONFIG_BLK_DEV_LOOP=y 433CONFIG_BLK_DEV_LOOP=y
432# CONFIG_BLK_DEV_CRYPTOLOOP is not set 434# CONFIG_BLK_DEV_CRYPTOLOOP is not set
433CONFIG_BLK_DEV_NBD=m 435CONFIG_BLK_DEV_NBD=m
436# CONFIG_BLK_DEV_UB is not set
434CONFIG_BLK_DEV_RAM=y 437CONFIG_BLK_DEV_RAM=y
435CONFIG_BLK_DEV_RAM_COUNT=16 438CONFIG_BLK_DEV_RAM_COUNT=16
436CONFIG_BLK_DEV_RAM_SIZE=4096 439CONFIG_BLK_DEV_RAM_SIZE=4096
@@ -623,7 +626,6 @@ CONFIG_SERIAL_NONSTANDARD=y
623# CONFIG_MOXA_SMARTIO is not set 626# CONFIG_MOXA_SMARTIO is not set
624# CONFIG_ISI is not set 627# CONFIG_ISI is not set
625# CONFIG_SYNCLINKMP is not set 628# CONFIG_SYNCLINKMP is not set
626# CONFIG_SYNCLINK_GT is not set
627# CONFIG_N_HDLC is not set 629# CONFIG_N_HDLC is not set
628# CONFIG_RISCOM8 is not set 630# CONFIG_RISCOM8 is not set
629# CONFIG_SPECIALIX is not set 631# CONFIG_SPECIALIX is not set
@@ -686,6 +688,11 @@ CONFIG_S3C2410_WATCHDOG=y
686# CONFIG_PCWATCHDOG is not set 688# CONFIG_PCWATCHDOG is not set
687# CONFIG_MIXCOMWD is not set 689# CONFIG_MIXCOMWD is not set
688# CONFIG_WDT is not set 690# CONFIG_WDT is not set
691
692#
693# USB-based Watchdog Cards
694#
695# CONFIG_USBPCWATCHDOG is not set
689# CONFIG_NVRAM is not set 696# CONFIG_NVRAM is not set
690# CONFIG_RTC is not set 697# CONFIG_RTC is not set
691CONFIG_S3C2410_RTC=y 698CONFIG_S3C2410_RTC=y
@@ -751,6 +758,11 @@ CONFIG_SENSORS_EEPROM=m
751# CONFIG_SPI_MASTER is not set 758# CONFIG_SPI_MASTER is not set
752 759
753# 760#
761# Dallas's 1-wire bus
762#
763# CONFIG_W1 is not set
764
765#
754# Hardware Monitoring support 766# Hardware Monitoring support
755# 767#
756CONFIG_HWMON=y 768CONFIG_HWMON=y
@@ -763,6 +775,7 @@ CONFIG_HWMON_VID=m
763# CONFIG_SENSORS_ASB100 is not set 775# CONFIG_SENSORS_ASB100 is not set
764# CONFIG_SENSORS_ATXP1 is not set 776# CONFIG_SENSORS_ATXP1 is not set
765# CONFIG_SENSORS_DS1621 is not set 777# CONFIG_SENSORS_DS1621 is not set
778# CONFIG_SENSORS_F71805F is not set
766# CONFIG_SENSORS_FSCHER is not set 779# CONFIG_SENSORS_FSCHER is not set
767# CONFIG_SENSORS_FSCPOS is not set 780# CONFIG_SENSORS_FSCPOS is not set
768# CONFIG_SENSORS_GL518SM is not set 781# CONFIG_SENSORS_GL518SM is not set
@@ -850,16 +863,138 @@ CONFIG_FONT_8x16=y
850# 863#
851CONFIG_USB_ARCH_HAS_HCD=y 864CONFIG_USB_ARCH_HAS_HCD=y
852CONFIG_USB_ARCH_HAS_OHCI=y 865CONFIG_USB_ARCH_HAS_OHCI=y
853# CONFIG_USB is not set 866CONFIG_USB=y
867# CONFIG_USB_DEBUG is not set
868
869#
870# Miscellaneous USB options
871#
872CONFIG_USB_DEVICEFS=y
873# CONFIG_USB_BANDWIDTH is not set
874# CONFIG_USB_DYNAMIC_MINORS is not set
875# CONFIG_USB_SUSPEND is not set
876# CONFIG_USB_OTG is not set
877
878#
879# USB Host Controller Drivers
880#
881# CONFIG_USB_ISP116X_HCD is not set
882CONFIG_USB_OHCI_HCD=y
883# CONFIG_USB_OHCI_BIG_ENDIAN is not set
884CONFIG_USB_OHCI_LITTLE_ENDIAN=y
885# CONFIG_USB_SL811_HCD is not set
886
887#
888# USB Device Class drivers
889#
890# CONFIG_USB_ACM is not set
891# CONFIG_USB_PRINTER is not set
854 892
855# 893#
856# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' 894# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
857# 895#
858 896
859# 897#
898# may also be needed; see USB_STORAGE Help for more information
899#
900# CONFIG_USB_STORAGE is not set
901# CONFIG_USB_LIBUSUAL is not set
902
903#
904# USB Input Devices
905#
906# CONFIG_USB_HID is not set
907
908#
909# USB HID Boot Protocol drivers
910#
911# CONFIG_USB_KBD is not set
912# CONFIG_USB_MOUSE is not set
913# CONFIG_USB_AIPTEK is not set
914# CONFIG_USB_WACOM is not set
915# CONFIG_USB_ACECAD is not set
916# CONFIG_USB_KBTAB is not set
917# CONFIG_USB_POWERMATE is not set
918# CONFIG_USB_MTOUCH is not set
919# CONFIG_USB_ITMTOUCH is not set
920# CONFIG_USB_EGALAX is not set
921# CONFIG_USB_YEALINK is not set
922# CONFIG_USB_XPAD is not set
923# CONFIG_USB_ATI_REMOTE is not set
924# CONFIG_USB_ATI_REMOTE2 is not set
925# CONFIG_USB_KEYSPAN_REMOTE is not set
926# CONFIG_USB_APPLETOUCH is not set
927
928#
929# USB Imaging devices
930#
931# CONFIG_USB_MDC800 is not set
932
933#
934# USB Multimedia devices
935#
936# CONFIG_USB_DABUSB is not set
937
938#
939# Video4Linux support is needed for USB Multimedia device support
940#
941
942#
943# USB Network Adapters
944#
945# CONFIG_USB_CATC is not set
946# CONFIG_USB_KAWETH is not set
947# CONFIG_USB_PEGASUS is not set
948# CONFIG_USB_RTL8150 is not set
949# CONFIG_USB_USBNET is not set
950CONFIG_USB_MON=y
951
952#
953# USB port drivers
954#
955# CONFIG_USB_USS720 is not set
956
957#
958# USB Serial Converter support
959#
960# CONFIG_USB_SERIAL is not set
961
962#
963# USB Miscellaneous drivers
964#
965# CONFIG_USB_EMI62 is not set
966# CONFIG_USB_EMI26 is not set
967# CONFIG_USB_AUERSWALD is not set
968# CONFIG_USB_RIO500 is not set
969# CONFIG_USB_LEGOTOWER is not set
970# CONFIG_USB_LCD is not set
971# CONFIG_USB_LED is not set
972# CONFIG_USB_CYTHERM is not set
973# CONFIG_USB_PHIDGETKIT is not set
974# CONFIG_USB_PHIDGETSERVO is not set
975# CONFIG_USB_IDMOUSE is not set
976# CONFIG_USB_LD is not set
977# CONFIG_USB_TEST is not set
978
979#
980# USB DSL modem support
981#
982
983#
860# USB Gadget Support 984# USB Gadget Support
861# 985#
862# CONFIG_USB_GADGET is not set 986# CONFIG_USB_GADGET is not set
987# CONFIG_USB_GADGET_NET2280 is not set
988# CONFIG_USB_GADGET_PXA2XX is not set
989# CONFIG_USB_GADGET_GOKU is not set
990# CONFIG_USB_GADGET_LH7A40X is not set
991# CONFIG_USB_GADGET_OMAP is not set
992# CONFIG_USB_GADGET_DUMMY_HCD is not set
993# CONFIG_USB_ZERO is not set
994# CONFIG_USB_ETH is not set
995# CONFIG_USB_GADGETFS is not set
996# CONFIG_USB_FILE_STORAGE is not set
997# CONFIG_USB_G_SERIAL is not set
863 998
864# 999#
865# MMC/SD Card support 1000# MMC/SD Card support
diff --git a/arch/arm/kernel/apm.c b/arch/arm/kernel/apm.c
index 766b6c05c6db..2bed290fec76 100644
--- a/arch/arm/kernel/apm.c
+++ b/arch/arm/kernel/apm.c
@@ -357,10 +357,8 @@ static int apm_open(struct inode * inode, struct file * filp)
357{ 357{
358 struct apm_user *as; 358 struct apm_user *as;
359 359
360 as = (struct apm_user *)kmalloc(sizeof(*as), GFP_KERNEL); 360 as = (struct apm_user *)kzalloc(sizeof(*as), GFP_KERNEL);
361 if (as) { 361 if (as) {
362 memset(as, 0, sizeof(*as));
363
364 /* 362 /*
365 * XXX - this is a tiny bit broken, when we consider BSD 363 * XXX - this is a tiny bit broken, when we consider BSD
366 * process accounting. If the device is opened by root, we 364 * process accounting. If the device is opened by root, we
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index c4923fac8dff..de606dfa8db9 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -540,12 +540,10 @@ static void __init pcibios_init_hw(struct hw_pci *hw)
540 int nr, busnr; 540 int nr, busnr;
541 541
542 for (nr = busnr = 0; nr < hw->nr_controllers; nr++) { 542 for (nr = busnr = 0; nr < hw->nr_controllers; nr++) {
543 sys = kmalloc(sizeof(struct pci_sys_data), GFP_KERNEL); 543 sys = kzalloc(sizeof(struct pci_sys_data), GFP_KERNEL);
544 if (!sys) 544 if (!sys)
545 panic("PCI: unable to allocate sys data!"); 545 panic("PCI: unable to allocate sys data!");
546 546
547 memset(sys, 0, sizeof(struct pci_sys_data));
548
549 sys->hw = hw; 547 sys->hw = hw;
550 sys->busnr = busnr; 548 sys->busnr = busnr;
551 sys->swizzle = hw->swizzle; 549 sys->swizzle = hw->swizzle;
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S
index caaa919ab47a..da280bae3d07 100644
--- a/arch/arm/kernel/debug.S
+++ b/arch/arm/kernel/debug.S
@@ -11,7 +11,6 @@
11 */ 11 */
12#include <linux/config.h> 12#include <linux/config.h>
13#include <linux/linkage.h> 13#include <linux/linkage.h>
14#include <asm/hardware.h>
15 14
16 .text 15 .text
17 16
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c
index 74ea29c3205e..00aa225e8d95 100644
--- a/arch/arm/kernel/ecard.c
+++ b/arch/arm/kernel/ecard.c
@@ -807,14 +807,12 @@ static struct expansion_card *__init ecard_alloc_card(int type, int slot)
807 unsigned long base; 807 unsigned long base;
808 int i; 808 int i;
809 809
810 ec = kmalloc(sizeof(ecard_t), GFP_KERNEL); 810 ec = kzalloc(sizeof(ecard_t), GFP_KERNEL);
811 if (!ec) { 811 if (!ec) {
812 ec = ERR_PTR(-ENOMEM); 812 ec = ERR_PTR(-ENOMEM);
813 goto nomem; 813 goto nomem;
814 } 814 }
815 815
816 memset(ec, 0, sizeof(ecard_t));
817
818 ec->slot_no = slot; 816 ec->slot_no = slot;
819 ec->type = type; 817 ec->type = type;
820 ec->irq = NO_IRQ; 818 ec->irq = NO_IRQ;
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index ec48d70c6d8b..355914ffb192 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -484,7 +484,6 @@ call_fpe:
484 movcss r7, r5, lsr #(TIF_USING_IWMMXT + 1) 484 movcss r7, r5, lsr #(TIF_USING_IWMMXT + 1)
485 bcs iwmmxt_task_enable 485 bcs iwmmxt_task_enable
486#endif 486#endif
487 enable_irq
488 add pc, pc, r8, lsr #6 487 add pc, pc, r8, lsr #6
489 mov r0, r0 488 mov r0, r0
490 489
@@ -511,6 +510,7 @@ call_fpe:
511 mov pc, lr @ CP#15 (Control) 510 mov pc, lr @ CP#15 (Control)
512 511
513do_fpe: 512do_fpe:
513 enable_irq
514 ldr r4, .LCfp 514 ldr r4, .LCfp
515 add r10, r10, #TI_FPSTATE @ r10 = workspace 515 add r10, r10, #TI_FPSTATE @ r10 = workspace
516 ldr pc, [r4] @ Call FP module USR entry point 516 ldr pc, [r4] @ Call FP module USR entry point
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 1aca1775b28f..84277fe818a1 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -28,10 +28,9 @@
28#define PROCINFO_INITFUNC 12 28#define PROCINFO_INITFUNC 12
29 29
30#define MACHINFO_TYPE 0 30#define MACHINFO_TYPE 0
31#define MACHINFO_PHYSRAM 4 31#define MACHINFO_PHYSIO 4
32#define MACHINFO_PHYSIO 8 32#define MACHINFO_PGOFFIO 8
33#define MACHINFO_PGOFFIO 12 33#define MACHINFO_NAME 12
34#define MACHINFO_NAME 16
35 34
36#define KERNEL_RAM_ADDR (PAGE_OFFSET + TEXT_OFFSET) 35#define KERNEL_RAM_ADDR (PAGE_OFFSET + TEXT_OFFSET)
37 36
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 1d50d2b98f55..2d5896b36181 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -305,14 +305,19 @@ report_bad_irq(unsigned int irq, struct pt_regs *regs, struct irqdesc *desc, int
305 static int count = 100; 305 static int count = 100;
306 struct irqaction *action; 306 struct irqaction *action;
307 307
308 if (!count || noirqdebug) 308 if (noirqdebug)
309 return; 309 return;
310 310
311 count--;
312
313 if (ret != IRQ_HANDLED && ret != IRQ_NONE) { 311 if (ret != IRQ_HANDLED && ret != IRQ_NONE) {
312 if (!count)
313 return;
314 count--;
314 printk("irq%u: bogus retval mask %x\n", irq, ret); 315 printk("irq%u: bogus retval mask %x\n", irq, ret);
315 } else { 316 } else {
317 desc->irqs_unhandled++;
318 if (desc->irqs_unhandled <= 99900)
319 return;
320 desc->irqs_unhandled = 0;
316 printk("irq%u: nobody cared\n", irq); 321 printk("irq%u: nobody cared\n", irq);
317 } 322 }
318 show_regs(regs); 323 show_regs(regs);
diff --git a/arch/arm/lib/delay.S b/arch/arm/lib/delay.S
index b3fb475b4120..9183b06c0e2f 100644
--- a/arch/arm/lib/delay.S
+++ b/arch/arm/lib/delay.S
@@ -9,28 +9,32 @@
9 */ 9 */
10#include <linux/linkage.h> 10#include <linux/linkage.h>
11#include <asm/assembler.h> 11#include <asm/assembler.h>
12#include <asm/param.h>
12 .text 13 .text
13 14
14.LC0: .word loops_per_jiffy 15.LC0: .word loops_per_jiffy
16.LC1: .word (2199023*HZ)>>11
15 17
16/* 18/*
17 * 0 <= r0 <= 2000 19 * r0 <= 2000
20 * lpj <= 0x01ffffff (max. 3355 bogomips)
21 * HZ <= 1000
18 */ 22 */
23
19ENTRY(__udelay) 24ENTRY(__udelay)
20 mov r2, #0x6800 25 ldr r2, .LC1
21 orr r2, r2, #0x00db
22 mul r0, r2, r0 26 mul r0, r2, r0
23ENTRY(__const_udelay) @ 0 <= r0 <= 0x01ffffff 27ENTRY(__const_udelay) @ 0 <= r0 <= 0x7fffff06
24 ldr r2, .LC0 28 ldr r2, .LC0
25 ldr r2, [r2] @ max = 0x0fffffff 29 ldr r2, [r2] @ max = 0x01ffffff
26 mov r0, r0, lsr #11 @ max = 0x00003fff 30 mov r0, r0, lsr #14 @ max = 0x0001ffff
27 mov r2, r2, lsr #11 @ max = 0x0003ffff 31 mov r2, r2, lsr #10 @ max = 0x00007fff
28 mul r0, r2, r0 @ max = 2^32-1 32 mul r0, r2, r0 @ max = 2^32-1
29 movs r0, r0, lsr #6 33 movs r0, r0, lsr #6
30 RETINSTR(moveq,pc,lr) 34 RETINSTR(moveq,pc,lr)
31 35
32/* 36/*
33 * loops = (r0 * 0x10c6 * 100 * loops_per_jiffy) / 2^32 37 * loops = r0 * HZ * loops_per_jiffy / 1000000
34 * 38 *
35 * Oh, if only we had a cycle counter... 39 * Oh, if only we had a cycle counter...
36 */ 40 */
diff --git a/arch/arm/lib/io-acorn.S b/arch/arm/lib/io-acorn.S
index b153523631c3..1b197ea7aab3 100644
--- a/arch/arm/lib/io-acorn.S
+++ b/arch/arm/lib/io-acorn.S
@@ -12,7 +12,6 @@
12 */ 12 */
13#include <linux/linkage.h> 13#include <linux/linkage.h>
14#include <asm/assembler.h> 14#include <asm/assembler.h>
15#include <asm/hardware.h>
16 15
17 .text 16 .text
18 .align 17 .align
diff --git a/arch/arm/mach-at91rm9200/clock.c b/arch/arm/mach-at91rm9200/clock.c
index ec8195a2a3cc..8b95467c6d61 100644
--- a/arch/arm/mach-at91rm9200/clock.c
+++ b/arch/arm/mach-at91rm9200/clock.c
@@ -201,6 +201,54 @@ static struct clk ohci_clk = {
201 .pmc_mask = 1 << AT91_ID_UHP, 201 .pmc_mask = 1 << AT91_ID_UHP,
202 .mode = pmc_periph_mode, 202 .mode = pmc_periph_mode,
203}; 203};
204static struct clk ether_clk = {
205 .name = "ether_clk",
206 .parent = &mck,
207 .pmc_mask = 1 << AT91_ID_EMAC,
208 .mode = pmc_periph_mode,
209};
210static struct clk mmc_clk = {
211 .name = "mci_clk",
212 .parent = &mck,
213 .pmc_mask = 1 << AT91_ID_MCI,
214 .mode = pmc_periph_mode,
215};
216static struct clk twi_clk = {
217 .name = "twi_clk",
218 .parent = &mck,
219 .pmc_mask = 1 << AT91_ID_TWI,
220 .mode = pmc_periph_mode,
221};
222static struct clk usart0_clk = {
223 .name = "usart0_clk",
224 .parent = &mck,
225 .pmc_mask = 1 << AT91_ID_US0,
226 .mode = pmc_periph_mode,
227};
228static struct clk usart1_clk = {
229 .name = "usart1_clk",
230 .parent = &mck,
231 .pmc_mask = 1 << AT91_ID_US1,
232 .mode = pmc_periph_mode,
233};
234static struct clk usart2_clk = {
235 .name = "usart2_clk",
236 .parent = &mck,
237 .pmc_mask = 1 << AT91_ID_US2,
238 .mode = pmc_periph_mode,
239};
240static struct clk usart3_clk = {
241 .name = "usart3_clk",
242 .parent = &mck,
243 .pmc_mask = 1 << AT91_ID_US3,
244 .mode = pmc_periph_mode,
245};
246static struct clk spi_clk = {
247 .name = "spi0_clk",
248 .parent = &mck,
249 .pmc_mask = 1 << AT91_ID_SPI,
250 .mode = pmc_periph_mode,
251};
204 252
205static struct clk *const clock_list[] = { 253static struct clk *const clock_list[] = {
206 /* four primary clocks -- MUST BE FIRST! */ 254 /* four primary clocks -- MUST BE FIRST! */
@@ -223,15 +271,18 @@ static struct clk *const clock_list[] = {
223 271
224 /* MCK and peripherals */ 272 /* MCK and peripherals */
225 &mck, 273 &mck,
226 // usart0..usart3 274 &usart0_clk,
227 // mmc 275 &usart1_clk,
276 &usart2_clk,
277 &usart3_clk,
278 &mmc_clk,
228 &udc_clk, 279 &udc_clk,
229 // i2c 280 &twi_clk,
230 // spi 281 &spi_clk,
231 // ssc0..ssc2 282 // ssc0..ssc2
232 // tc0..tc5 283 // tc0..tc5
233 &ohci_clk, 284 &ohci_clk,
234 // ether 285 &ether_clk,
235}; 286};
236 287
237 288
@@ -360,7 +411,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
360 u32 pckr; 411 u32 pckr;
361 412
362 pckr = at91_sys_read(AT91_PMC_PCKR(clk->id)); 413 pckr = at91_sys_read(AT91_PMC_PCKR(clk->id));
363 pckr &= 0x03; 414 pckr &= AT91_PMC_CSS_PLLB; /* clock selection */
364 pckr |= prescale << 2; 415 pckr |= prescale << 2;
365 at91_sys_write(AT91_PMC_PCKR(clk->id), pckr); 416 at91_sys_write(AT91_PMC_PCKR(clk->id), pckr);
366 clk->rate_hz = actual; 417 clk->rate_hz = actual;
@@ -440,7 +491,7 @@ static int at91_clk_show(struct seq_file *s, void *unused)
440 else 491 else
441 state = ""; 492 state = "";
442 493
443 seq_printf(s, "%-10s users=%d %-3s %9ld Hz %s\n", 494 seq_printf(s, "%-10s users=%2d %-3s %9ld Hz %s\n",
444 clk->name, clk->users, state, clk_get_rate(clk), 495 clk->name, clk->users, state, clk_get_rate(clk),
445 clk->parent ? clk->parent->name : ""); 496 clk->parent ? clk->parent->name : "");
446 } 497 }
@@ -483,11 +534,18 @@ static u32 __init at91_pll_rate(struct clk *pll, u32 freq, u32 reg)
483 freq *= mul + 1; 534 freq *= mul + 1;
484 } else 535 } else
485 freq = 0; 536 freq = 0;
486 if (pll == &pllb && (reg & (1 << 28))) 537
487 freq /= 2;
488 return freq; 538 return freq;
489} 539}
490 540
541static u32 __init at91_usb_rate(struct clk *pll, u32 freq, u32 reg)
542{
543 if (pll == &pllb && (reg & AT91_PMC_USB96M))
544 return freq / 2;
545 else
546 return freq;
547}
548
491static unsigned __init at91_pll_calc(unsigned main_freq, unsigned out_freq) 549static unsigned __init at91_pll_calc(unsigned main_freq, unsigned out_freq)
492{ 550{
493 unsigned i, div = 0, mul = 0, diff = 1 << 30; 551 unsigned i, div = 0, mul = 0, diff = 1 << 30;
@@ -550,8 +608,8 @@ int __init at91_clock_init(unsigned long main_clock)
550 if (!main_clock) { 608 if (!main_clock) {
551 do { 609 do {
552 tmp = at91_sys_read(AT91_CKGR_MCFR); 610 tmp = at91_sys_read(AT91_CKGR_MCFR);
553 } while (!(tmp & 0x10000)); 611 } while (!(tmp & AT91_PMC_MAINRDY));
554 main_clock = (tmp & 0xffff) * (AT91_SLOW_CLOCK / 16); 612 main_clock = (tmp & AT91_PMC_MAINF) * (AT91_SLOW_CLOCK / 16);
555 } 613 }
556 main_clk.rate_hz = main_clock; 614 main_clk.rate_hz = main_clock;
557 615
@@ -566,13 +624,16 @@ int __init at91_clock_init(unsigned long main_clock)
566 * 624 *
567 * REVISIT: assumes MCK doesn't derive from PLLB! 625 * REVISIT: assumes MCK doesn't derive from PLLB!
568 */ 626 */
569 at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | 0x10000000; 627 at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | AT91_PMC_USB96M;
570 pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init); 628 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)); 629 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); 630 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_UHP | AT91_PMC_UDP);
573 at91_sys_write(AT91_CKGR_PLLBR, 0); 631 at91_sys_write(AT91_CKGR_PLLBR, 0);
574 at91_sys_write(AT91_PMC_SCER, AT91_PMC_MCKUDP); 632 at91_sys_write(AT91_PMC_SCER, AT91_PMC_MCKUDP);
575 633
634 udpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init);
635 uhpck.rate_hz = at91_usb_rate(&pllb, pllb.rate_hz, at91_pllb_usb_init);
636
576 /* 637 /*
577 * MCK and CPU derive from one of those primary clocks. 638 * MCK and CPU derive from one of those primary clocks.
578 * For now, assume this parentage won't change. 639 * For now, assume this parentage won't change.
diff --git a/arch/arm/mach-at91rm9200/gpio.c b/arch/arm/mach-at91rm9200/gpio.c
index 0e396feec468..5ab46274e1a3 100644
--- a/arch/arm/mach-at91rm9200/gpio.c
+++ b/arch/arm/mach-at91rm9200/gpio.c
@@ -261,7 +261,7 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs
261 void __iomem *pio; 261 void __iomem *pio;
262 u32 isr; 262 u32 isr;
263 263
264 pio = (void __force __iomem *) desc->chipdata; 264 pio = desc->base;
265 265
266 /* temporarily mask (level sensitive) parent IRQ */ 266 /* temporarily mask (level sensitive) parent IRQ */
267 desc->chip->ack(irq); 267 desc->chip->ack(irq);
@@ -312,7 +312,7 @@ void __init at91_gpio_irq_setup(unsigned banks)
312 __raw_writel(~0, controller + PIO_IDR); 312 __raw_writel(~0, controller + PIO_IDR);
313 313
314 set_irq_data(id, (void *) pin); 314 set_irq_data(id, (void *) pin);
315 set_irq_chipdata(id, (void __force *) controller); 315 set_irq_chipdata(id, controller);
316 316
317 for (i = 0; i < 32; i++, pin++) { 317 for (i = 0; i < 32; i++, pin++) {
318 set_irq_chip(pin, &gpio_irqchip); 318 set_irq_chip(pin, &gpio_irqchip);
diff --git a/arch/arm/mach-at91rm9200/time.c b/arch/arm/mach-at91rm9200/time.c
index 1b6dd2deeb22..7ffcf443b99f 100644
--- a/arch/arm/mach-at91rm9200/time.c
+++ b/arch/arm/mach-at91rm9200/time.c
@@ -71,11 +71,11 @@ static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id, struct pt_r
71 if (at91_sys_read(AT91_ST_SR) & AT91_ST_PITS) { /* This is a shared interrupt */ 71 if (at91_sys_read(AT91_ST_SR) & AT91_ST_PITS) { /* This is a shared interrupt */
72 write_seqlock(&xtime_lock); 72 write_seqlock(&xtime_lock);
73 73
74 do { 74 while (((read_CRTR() - at91_sys_read(AT91_ST_RTAR)) & AT91_ST_ALMV) >= LATCH) {
75 timer_tick(regs); 75 timer_tick(regs);
76 rtar = (at91_sys_read(AT91_ST_RTAR) + LATCH) & AT91_ST_ALMV; 76 rtar = (at91_sys_read(AT91_ST_RTAR) + LATCH) & AT91_ST_ALMV;
77 at91_sys_write(AT91_ST_RTAR, rtar); 77 at91_sys_write(AT91_ST_RTAR, rtar);
78 } while (((read_CRTR() - at91_sys_read(AT91_ST_RTAR)) & AT91_ST_ALMV) >= LATCH); 78 }
79 79
80 write_sequnlock(&xtime_lock); 80 write_sequnlock(&xtime_lock);
81 81
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig
new file mode 100644
index 000000000000..cec5a21ca4e3
--- /dev/null
+++ b/arch/arm/mach-ep93xx/Kconfig
@@ -0,0 +1,21 @@
1if ARCH_EP93XX
2
3menu "Cirrus EP93xx Implementation Options"
4
5comment "EP93xx Platforms"
6
7config MACH_GESBC9312
8 bool "Support Glomation GESBC-9312-sx"
9 help
10 Say 'Y' here if you want your kernel to support the Glomation
11 GESBC-9312-sx board.
12
13config MACH_TS72XX
14 bool "Support Technologic Systems TS-72xx SBC"
15 help
16 Say 'Y' here if you want your kernel to support the
17 Technologic Systems TS-72xx board.
18
19endmenu
20
21endif
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile
new file mode 100644
index 000000000000..5393af989e94
--- /dev/null
+++ b/arch/arm/mach-ep93xx/Makefile
@@ -0,0 +1,10 @@
1#
2# Makefile for the linux kernel.
3#
4obj-y := core.o
5obj-m :=
6obj-n :=
7obj- :=
8
9obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o
10obj-$(CONFIG_MACH_TS72XX) += ts72xx.o
diff --git a/arch/arm/mach-ep93xx/Makefile.boot b/arch/arm/mach-ep93xx/Makefile.boot
new file mode 100644
index 000000000000..d5561ad15bad
--- /dev/null
+++ b/arch/arm/mach-ep93xx/Makefile.boot
@@ -0,0 +1,2 @@
1 zreladdr-y := 0x00008000
2params_phys-y := 0x00000100
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
new file mode 100644
index 000000000000..865427bfad7e
--- /dev/null
+++ b/arch/arm/mach-ep93xx/core.c
@@ -0,0 +1,374 @@
1/*
2 * arch/arm/mach-ep93xx/core.c
3 * Core routines for Cirrus EP93xx chips.
4 *
5 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
6 *
7 * Thanks go to Michael Burian and Ray Lehtiniemi for their key
8 * role in the ep93xx linux community.
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 (at
13 * your option) any later version.
14 */
15
16#include <linux/config.h>
17#include <linux/kernel.h>
18#include <linux/init.h>
19#include <linux/spinlock.h>
20#include <linux/sched.h>
21#include <linux/interrupt.h>
22#include <linux/serial.h>
23#include <linux/tty.h>
24#include <linux/bitops.h>
25#include <linux/serial.h>
26#include <linux/serial_8250.h>
27#include <linux/serial_core.h>
28#include <linux/device.h>
29#include <linux/mm.h>
30#include <linux/time.h>
31#include <linux/timex.h>
32#include <linux/delay.h>
33#include <linux/amba/bus.h>
34
35#include <asm/types.h>
36#include <asm/setup.h>
37#include <asm/memory.h>
38#include <asm/hardware.h>
39#include <asm/irq.h>
40#include <asm/system.h>
41#include <asm/tlbflush.h>
42#include <asm/pgtable.h>
43#include <asm/io.h>
44
45#include <asm/mach/map.h>
46#include <asm/mach/time.h>
47#include <asm/mach/irq.h>
48#include <asm/arch/gpio.h>
49
50#include <asm/hardware/vic.h>
51
52
53/*************************************************************************
54 * Static I/O mappings that are needed for all EP93xx platforms
55 *************************************************************************/
56static struct map_desc ep93xx_io_desc[] __initdata = {
57 {
58 .virtual = EP93XX_AHB_VIRT_BASE,
59 .pfn = __phys_to_pfn(EP93XX_AHB_PHYS_BASE),
60 .length = EP93XX_AHB_SIZE,
61 .type = MT_DEVICE,
62 }, {
63 .virtual = EP93XX_APB_VIRT_BASE,
64 .pfn = __phys_to_pfn(EP93XX_APB_PHYS_BASE),
65 .length = EP93XX_APB_SIZE,
66 .type = MT_DEVICE,
67 },
68};
69
70void __init ep93xx_map_io(void)
71{
72 iotable_init(ep93xx_io_desc, ARRAY_SIZE(ep93xx_io_desc));
73}
74
75
76/*************************************************************************
77 * Timer handling for EP93xx
78 *************************************************************************
79 * The ep93xx has four internal timers. Timers 1, 2 (both 16 bit) and
80 * 3 (32 bit) count down at 508 kHz, are self-reloading, and can generate
81 * an interrupt on underflow. Timer 4 (40 bit) counts down at 983.04 kHz,
82 * is free-running, and can't generate interrupts.
83 *
84 * The 508 kHz timers are ideal for use for the timer interrupt, as the
85 * most common values of HZ divide 508 kHz nicely. We pick one of the 16
86 * bit timers (timer 1) since we don't need more than 16 bits of reload
87 * value as long as HZ >= 8.
88 *
89 * The higher clock rate of timer 4 makes it a better choice than the
90 * other timers for use in gettimeoffset(), while the fact that it can't
91 * generate interrupts means we don't have to worry about not being able
92 * to use this timer for something else. We also use timer 4 for keeping
93 * track of lost jiffies.
94 */
95static unsigned int last_jiffy_time;
96
97#define TIMER4_TICKS_PER_JIFFY ((CLOCK_TICK_RATE + (HZ/2)) / HZ)
98
99static int ep93xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
100{
101 write_seqlock(&xtime_lock);
102
103 __raw_writel(1, EP93XX_TIMER1_CLEAR);
104 while (__raw_readl(EP93XX_TIMER4_VALUE_LOW) - last_jiffy_time
105 >= TIMER4_TICKS_PER_JIFFY) {
106 last_jiffy_time += TIMER4_TICKS_PER_JIFFY;
107 timer_tick(regs);
108 }
109
110 write_sequnlock(&xtime_lock);
111
112 return IRQ_HANDLED;
113}
114
115static struct irqaction ep93xx_timer_irq = {
116 .name = "ep93xx timer",
117 .flags = SA_INTERRUPT | SA_TIMER,
118 .handler = ep93xx_timer_interrupt,
119};
120
121static void __init ep93xx_timer_init(void)
122{
123 /* Enable periodic HZ timer. */
124 __raw_writel(0x48, EP93XX_TIMER1_CONTROL);
125 __raw_writel((508000 / HZ) - 1, EP93XX_TIMER1_LOAD);
126 __raw_writel(0xc8, EP93XX_TIMER1_CONTROL);
127
128 /* Enable lost jiffy timer. */
129 __raw_writel(0x100, EP93XX_TIMER4_VALUE_HIGH);
130
131 setup_irq(IRQ_EP93XX_TIMER1, &ep93xx_timer_irq);
132}
133
134static unsigned long ep93xx_gettimeoffset(void)
135{
136 int offset;
137
138 offset = __raw_readl(EP93XX_TIMER4_VALUE_LOW) - last_jiffy_time;
139
140 /* Calculate (1000000 / 983040) * offset. */
141 return offset + (53 * offset / 3072);
142}
143
144struct sys_timer ep93xx_timer = {
145 .init = ep93xx_timer_init,
146 .offset = ep93xx_gettimeoffset,
147};
148
149
150/*************************************************************************
151 * GPIO handling for EP93xx
152 *************************************************************************/
153static unsigned char gpio_int_enable[2];
154static unsigned char gpio_int_type1[2];
155static unsigned char gpio_int_type2[2];
156
157static void update_gpio_ab_int_params(int port)
158{
159 if (port == 0) {
160 __raw_writeb(0, EP93XX_GPIO_A_INT_ENABLE);
161 __raw_writeb(gpio_int_type2[0], EP93XX_GPIO_A_INT_TYPE2);
162 __raw_writeb(gpio_int_type1[0], EP93XX_GPIO_A_INT_TYPE1);
163 __raw_writeb(gpio_int_enable[0], EP93XX_GPIO_A_INT_ENABLE);
164 } else if (port == 1) {
165 __raw_writeb(0, EP93XX_GPIO_B_INT_ENABLE);
166 __raw_writeb(gpio_int_type2[1], EP93XX_GPIO_B_INT_TYPE2);
167 __raw_writeb(gpio_int_type1[1], EP93XX_GPIO_B_INT_TYPE1);
168 __raw_writeb(gpio_int_enable[1], EP93XX_GPIO_B_INT_ENABLE);
169 }
170}
171
172
173static unsigned char data_register_offset[8] = {
174 0x00, 0x04, 0x08, 0x0c, 0x20, 0x30, 0x38, 0x40,
175};
176
177static unsigned char data_direction_register_offset[8] = {
178 0x10, 0x14, 0x18, 0x1c, 0x24, 0x34, 0x3c, 0x44,
179};
180
181void gpio_line_config(int line, int direction)
182{
183 unsigned int data_direction_register;
184 unsigned long flags;
185 unsigned char v;
186
187 data_direction_register =
188 EP93XX_GPIO_REG(data_direction_register_offset[line >> 3]);
189
190 local_irq_save(flags);
191 if (direction == GPIO_OUT) {
192 if (line >= 0 && line < 16) {
193 gpio_int_enable[line >> 3] &= ~(1 << (line & 7));
194 update_gpio_ab_int_params(line >> 3);
195 }
196
197 v = __raw_readb(data_direction_register);
198 v |= 1 << (line & 7);
199 __raw_writeb(v, data_direction_register);
200 } else if (direction == GPIO_IN) {
201 v = __raw_readb(data_direction_register);
202 v &= ~(1 << (line & 7));
203 __raw_writeb(v, data_direction_register);
204 }
205 local_irq_restore(flags);
206}
207EXPORT_SYMBOL(gpio_line_config);
208
209int gpio_line_get(int line)
210{
211 unsigned int data_register;
212
213 data_register = EP93XX_GPIO_REG(data_register_offset[line >> 3]);
214
215 return !!(__raw_readb(data_register) & (1 << (line & 7)));
216}
217EXPORT_SYMBOL(gpio_line_get);
218
219void gpio_line_set(int line, int value)
220{
221 unsigned int data_register;
222 unsigned long flags;
223 unsigned char v;
224
225 data_register = EP93XX_GPIO_REG(data_register_offset[line >> 3]);
226
227 local_irq_save(flags);
228 if (value == EP93XX_GPIO_HIGH) {
229 v = __raw_readb(data_register);
230 v |= 1 << (line & 7);
231 __raw_writeb(v, data_register);
232 } else if (value == EP93XX_GPIO_LOW) {
233 v = __raw_readb(data_register);
234 v &= ~(1 << (line & 7));
235 __raw_writeb(v, data_register);
236 }
237 local_irq_restore(flags);
238}
239EXPORT_SYMBOL(gpio_line_set);
240
241
242/*************************************************************************
243 * EP93xx IRQ handling
244 *************************************************************************/
245static void ep93xx_gpio_ab_irq_handler(unsigned int irq,
246 struct irqdesc *desc, struct pt_regs *regs)
247{
248 unsigned char status;
249 int i;
250
251 status = __raw_readb(EP93XX_GPIO_A_INT_STATUS);
252 for (i = 0; i < 8; i++) {
253 if (status & (1 << i)) {
254 desc = irq_desc + IRQ_EP93XX_GPIO(0) + i;
255 desc_handle_irq(IRQ_EP93XX_GPIO(0) + i, desc, regs);
256 }
257 }
258
259 status = __raw_readb(EP93XX_GPIO_B_INT_STATUS);
260 for (i = 0; i < 8; i++) {
261 if (status & (1 << i)) {
262 desc = irq_desc + IRQ_EP93XX_GPIO(8) + i;
263 desc_handle_irq(IRQ_EP93XX_GPIO(8) + i, desc, regs);
264 }
265 }
266}
267
268static void ep93xx_gpio_ab_irq_mask_ack(unsigned int irq)
269{
270 int line = irq - IRQ_EP93XX_GPIO(0);
271 int port = line >> 3;
272
273 gpio_int_enable[port] &= ~(1 << (line & 7));
274 update_gpio_ab_int_params(port);
275
276 if (line >> 3) {
277 __raw_writel(1 << (line & 7), EP93XX_GPIO_B_INT_ACK);
278 } else {
279 __raw_writel(1 << (line & 7), EP93XX_GPIO_A_INT_ACK);
280 }
281}
282
283static void ep93xx_gpio_ab_irq_mask(unsigned int irq)
284{
285 int line = irq - IRQ_EP93XX_GPIO(0);
286 int port = line >> 3;
287
288 gpio_int_enable[port] &= ~(1 << (line & 7));
289 update_gpio_ab_int_params(port);
290}
291
292static void ep93xx_gpio_ab_irq_unmask(unsigned int irq)
293{
294 int line = irq - IRQ_EP93XX_GPIO(0);
295 int port = line >> 3;
296
297 gpio_int_enable[port] |= 1 << (line & 7);
298 update_gpio_ab_int_params(port);
299}
300
301
302/*
303 * gpio_int_type1 controls whether the interrupt is level (0) or
304 * edge (1) triggered, while gpio_int_type2 controls whether it
305 * triggers on low/falling (0) or high/rising (1).
306 */
307static int ep93xx_gpio_ab_irq_type(unsigned int irq, unsigned int type)
308{
309 int port;
310 int line;
311
312 line = irq - IRQ_EP93XX_GPIO(0);
313 gpio_line_config(line, GPIO_IN);
314
315 port = line >> 3;
316 line &= 7;
317
318 if (type & IRQT_RISING) {
319 gpio_int_type1[port] |= 1 << line;
320 gpio_int_type2[port] |= 1 << line;
321 } else if (type & IRQT_FALLING) {
322 gpio_int_type1[port] |= 1 << line;
323 gpio_int_type2[port] &= ~(1 << line);
324 } else if (type & IRQT_HIGH) {
325 gpio_int_type1[port] &= ~(1 << line);
326 gpio_int_type2[port] |= 1 << line;
327 } else if (type & IRQT_LOW) {
328 gpio_int_type1[port] &= ~(1 << line);
329 gpio_int_type2[port] &= ~(1 << line);
330 }
331 update_gpio_ab_int_params(port);
332
333 return 0;
334}
335
336static struct irqchip ep93xx_gpio_ab_irq_chip = {
337 .ack = ep93xx_gpio_ab_irq_mask_ack,
338 .mask = ep93xx_gpio_ab_irq_mask,
339 .unmask = ep93xx_gpio_ab_irq_unmask,
340 .set_type = ep93xx_gpio_ab_irq_type,
341};
342
343
344void __init ep93xx_init_irq(void)
345{
346 int irq;
347
348 vic_init((void *)EP93XX_VIC1_BASE, 0, EP93XX_VIC1_VALID_IRQ_MASK);
349 vic_init((void *)EP93XX_VIC2_BASE, 32, EP93XX_VIC2_VALID_IRQ_MASK);
350
351 for (irq = IRQ_EP93XX_GPIO(0) ; irq <= IRQ_EP93XX_GPIO(15); irq++) {
352 set_irq_chip(irq, &ep93xx_gpio_ab_irq_chip);
353 set_irq_handler(irq, do_level_IRQ);
354 set_irq_flags(irq, IRQF_VALID);
355 }
356 set_irq_chained_handler(IRQ_EP93XX_GPIO_AB, ep93xx_gpio_ab_irq_handler);
357}
358
359
360/*************************************************************************
361 * EP93xx peripheral handling
362 *************************************************************************/
363void __init ep93xx_init_devices(void)
364{
365 unsigned int v;
366
367 /*
368 * Disallow access to MaverickCrunch initially.
369 */
370 v = __raw_readl(EP93XX_SYSCON_DEVICE_CONFIG);
371 v &= ~EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE;
372 __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
373 __raw_writel(v, EP93XX_SYSCON_DEVICE_CONFIG);
374}
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c
new file mode 100644
index 000000000000..d18fcb1a2f1b
--- /dev/null
+++ b/arch/arm/mach-ep93xx/gesbc9312.c
@@ -0,0 +1,40 @@
1/*
2 * arch/arm/mach-ep93xx/gesbc9312.c
3 * Glomation GESBC-9312-sx support.
4 *
5 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
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 (at
10 * your option) any later version.
11 */
12
13#include <linux/config.h>
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/mm.h>
17#include <linux/sched.h>
18#include <linux/interrupt.h>
19#include <linux/mtd/physmap.h>
20#include <asm/io.h>
21#include <asm/hardware.h>
22#include <asm/mach-types.h>
23#include <asm/mach/arch.h>
24
25static void __init gesbc9312_init_machine(void)
26{
27 ep93xx_init_devices();
28 physmap_configure(0x60000000, 0x00800000, 4, NULL);
29}
30
31MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
32 /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
33 .phys_io = EP93XX_APB_PHYS_BASE,
34 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
35 .boot_params = 0x00000100,
36 .map_io = ep93xx_map_io,
37 .init_irq = ep93xx_init_irq,
38 .timer = &ep93xx_timer,
39 .init_machine = gesbc9312_init_machine,
40MACHINE_END
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
new file mode 100644
index 000000000000..777e75daa8a5
--- /dev/null
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -0,0 +1,118 @@
1/*
2 * arch/arm/mach-ep93xx/ts72xx.c
3 * Technologic Systems TS72xx SBC support.
4 *
5 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
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 (at
10 * your option) any later version.
11 */
12
13#include <linux/config.h>
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/mm.h>
17#include <linux/sched.h>
18#include <linux/interrupt.h>
19#include <linux/mtd/physmap.h>
20#include <asm/io.h>
21#include <asm/hardware.h>
22#include <asm/mach-types.h>
23#include <asm/mach/arch.h>
24#include <asm/mach/map.h>
25
26static struct map_desc ts72xx_io_desc[] __initdata = {
27 {
28 .virtual = TS72XX_MODEL_VIRT_BASE,
29 .pfn = __phys_to_pfn(TS72XX_MODEL_PHYS_BASE),
30 .length = TS72XX_MODEL_SIZE,
31 .type = MT_DEVICE,
32 }, {
33 .virtual = TS72XX_OPTIONS_VIRT_BASE,
34 .pfn = __phys_to_pfn(TS72XX_OPTIONS_PHYS_BASE),
35 .length = TS72XX_OPTIONS_SIZE,
36 .type = MT_DEVICE,
37 }, {
38 .virtual = TS72XX_OPTIONS2_VIRT_BASE,
39 .pfn = __phys_to_pfn(TS72XX_OPTIONS2_PHYS_BASE),
40 .length = TS72XX_OPTIONS2_SIZE,
41 .type = MT_DEVICE,
42 }
43};
44
45static struct map_desc ts72xx_nand_io_desc[] __initdata = {
46 {
47 .virtual = TS72XX_NAND_DATA_VIRT_BASE,
48 .pfn = __phys_to_pfn(TS72XX_NAND1_DATA_PHYS_BASE),
49 .length = TS72XX_NAND_DATA_SIZE,
50 .type = MT_DEVICE,
51 }, {
52 .virtual = TS72XX_NAND_CONTROL_VIRT_BASE,
53 .pfn = __phys_to_pfn(TS72XX_NAND1_CONTROL_PHYS_BASE),
54 .length = TS72XX_NAND_CONTROL_SIZE,
55 .type = MT_DEVICE,
56 }, {
57 .virtual = TS72XX_NAND_BUSY_VIRT_BASE,
58 .pfn = __phys_to_pfn(TS72XX_NAND1_BUSY_PHYS_BASE),
59 .length = TS72XX_NAND_BUSY_SIZE,
60 .type = MT_DEVICE,
61 }
62};
63
64static struct map_desc ts72xx_alternate_nand_io_desc[] __initdata = {
65 {
66 .virtual = TS72XX_NAND_DATA_VIRT_BASE,
67 .pfn = __phys_to_pfn(TS72XX_NAND2_DATA_PHYS_BASE),
68 .length = TS72XX_NAND_DATA_SIZE,
69 .type = MT_DEVICE,
70 }, {
71 .virtual = TS72XX_NAND_CONTROL_VIRT_BASE,
72 .pfn = __phys_to_pfn(TS72XX_NAND2_CONTROL_PHYS_BASE),
73 .length = TS72XX_NAND_CONTROL_SIZE,
74 .type = MT_DEVICE,
75 }, {
76 .virtual = TS72XX_NAND_BUSY_VIRT_BASE,
77 .pfn = __phys_to_pfn(TS72XX_NAND2_BUSY_PHYS_BASE),
78 .length = TS72XX_NAND_BUSY_SIZE,
79 .type = MT_DEVICE,
80 }
81};
82
83static void __init ts72xx_map_io(void)
84{
85 ep93xx_map_io();
86 iotable_init(ts72xx_io_desc, ARRAY_SIZE(ts72xx_io_desc));
87
88 /*
89 * The TS-7200 has NOR flash, the other models have NAND flash.
90 */
91 if (!board_is_ts7200()) {
92 if (is_ts9420_installed()) {
93 iotable_init(ts72xx_alternate_nand_io_desc,
94 ARRAY_SIZE(ts72xx_alternate_nand_io_desc));
95 } else {
96 iotable_init(ts72xx_nand_io_desc,
97 ARRAY_SIZE(ts72xx_nand_io_desc));
98 }
99 }
100}
101
102static void __init ts72xx_init_machine(void)
103{
104 ep93xx_init_devices();
105 if (board_is_ts7200())
106 physmap_configure(TS72XX_NOR_PHYS_BASE, 0x01000000, 1, NULL);
107}
108
109MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
110 /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
111 .phys_io = EP93XX_APB_PHYS_BASE,
112 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
113 .boot_params = 0x00000100,
114 .map_io = ts72xx_map_io,
115 .init_irq = ep93xx_init_irq,
116 .timer = &ep93xx_timer,
117 .init_machine = ts72xx_init_machine,
118MACHINE_END
diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c
index e79884eea1f7..5dace2597838 100644
--- a/arch/arm/mach-footbridge/dc21285.c
+++ b/arch/arm/mach-footbridge/dc21285.c
@@ -255,14 +255,12 @@ int __init dc21285_setup(int nr, struct pci_sys_data *sys)
255 if (nr || !footbridge_cfn_mode()) 255 if (nr || !footbridge_cfn_mode())
256 return 0; 256 return 0;
257 257
258 res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL); 258 res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL);
259 if (!res) { 259 if (!res) {
260 printk("out of memory for root bus resources"); 260 printk("out of memory for root bus resources");
261 return 0; 261 return 0;
262 } 262 }
263 263
264 memset(res, 0, sizeof(struct resource) * 2);
265
266 res[0].flags = IORESOURCE_MEM; 264 res[0].flags = IORESOURCE_MEM;
267 res[0].name = "Footbridge non-prefetch"; 265 res[0].name = "Footbridge non-prefetch";
268 res[1].flags = IORESOURCE_MEM | IORESOURCE_PREFETCH; 266 res[1].flags = IORESOURCE_MEM | IORESOURCE_PREFETCH;
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c
index a85d471c5bfa..92d79fb39311 100644
--- a/arch/arm/mach-integrator/impd1.c
+++ b/arch/arm/mach-integrator/impd1.c
@@ -355,12 +355,11 @@ static int impd1_probe(struct lm_device *dev)
355 if (!request_mem_region(dev->resource.start, SZ_4K, "LM registers")) 355 if (!request_mem_region(dev->resource.start, SZ_4K, "LM registers"))
356 return -EBUSY; 356 return -EBUSY;
357 357
358 impd1 = kmalloc(sizeof(struct impd1_module), GFP_KERNEL); 358 impd1 = kzalloc(sizeof(struct impd1_module), GFP_KERNEL);
359 if (!impd1) { 359 if (!impd1) {
360 ret = -ENOMEM; 360 ret = -ENOMEM;
361 goto release_lm; 361 goto release_lm;
362 } 362 }
363 memset(impd1, 0, sizeof(struct impd1_module));
364 363
365 impd1->base = ioremap(dev->resource.start, SZ_4K); 364 impd1->base = ioremap(dev->resource.start, SZ_4K);
366 if (!impd1->base) { 365 if (!impd1->base) {
@@ -389,12 +388,10 @@ static int impd1_probe(struct lm_device *dev)
389 388
390 pc_base = dev->resource.start + idev->offset; 389 pc_base = dev->resource.start + idev->offset;
391 390
392 d = kmalloc(sizeof(struct amba_device), GFP_KERNEL); 391 d = kzalloc(sizeof(struct amba_device), GFP_KERNEL);
393 if (!d) 392 if (!d)
394 continue; 393 continue;
395 394
396 memset(d, 0, sizeof(struct amba_device));
397
398 snprintf(d->dev.bus_id, sizeof(d->dev.bus_id), 395 snprintf(d->dev.bus_id, sizeof(d->dev.bus_id),
399 "lm%x:%5.5lx", dev->id, idev->offset >> 12); 396 "lm%x:%5.5lx", dev->id, idev->offset >> 12);
400 397
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index d8d3c2a5a97e..6d65c96ebfd2 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -319,12 +319,10 @@ static void __init ap_init(void)
319 if ((sc_dec & (16 << i)) == 0) 319 if ((sc_dec & (16 << i)) == 0)
320 continue; 320 continue;
321 321
322 lmdev = kmalloc(sizeof(struct lm_device), GFP_KERNEL); 322 lmdev = kzalloc(sizeof(struct lm_device), GFP_KERNEL);
323 if (!lmdev) 323 if (!lmdev)
324 continue; 324 continue;
325 325
326 memset(lmdev, 0, sizeof(struct lm_device));
327
328 lmdev->resource.start = 0xc0000000 + 0x10000000 * i; 326 lmdev->resource.start = 0xc0000000 + 0x10000000 * i;
329 lmdev->resource.end = lmdev->resource.start + 0x0fffffff; 327 lmdev->resource.end = lmdev->resource.start + 0x0fffffff;
330 lmdev->resource.flags = IORESOURCE_MEM; 328 lmdev->resource.flags = IORESOURCE_MEM;
diff --git a/arch/arm/mach-iop3xx/iq31244-pci.c b/arch/arm/mach-iop3xx/iq31244-pci.c
index c6a973ba8fc6..f3c6413fa5bd 100644
--- a/arch/arm/mach-iop3xx/iq31244-pci.c
+++ b/arch/arm/mach-iop3xx/iq31244-pci.c
@@ -74,12 +74,10 @@ static int iq31244_setup(int nr, struct pci_sys_data *sys)
74 if(nr != 0) 74 if(nr != 0)
75 return 0; 75 return 0;
76 76
77 res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL); 77 res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL);
78 if (!res) 78 if (!res)
79 panic("PCI: unable to alloc resources"); 79 panic("PCI: unable to alloc resources");
80 80
81 memset(res, 0, sizeof(struct resource) * 2);
82
83 res[0].start = IOP321_PCI_LOWER_IO_VA; 81 res[0].start = IOP321_PCI_LOWER_IO_VA;
84 res[0].end = IOP321_PCI_UPPER_IO_VA; 82 res[0].end = IOP321_PCI_UPPER_IO_VA;
85 res[0].name = "IQ31244 PCI I/O Space"; 83 res[0].name = "IQ31244 PCI I/O Space";
diff --git a/arch/arm/mach-iop3xx/iq80321-pci.c b/arch/arm/mach-iop3xx/iq80321-pci.c
index 802f6d091b75..d9758d3f6e7f 100644
--- a/arch/arm/mach-iop3xx/iq80321-pci.c
+++ b/arch/arm/mach-iop3xx/iq80321-pci.c
@@ -68,12 +68,10 @@ static int iq80321_setup(int nr, struct pci_sys_data *sys)
68 if(nr != 0) 68 if(nr != 0)
69 return 0; 69 return 0;
70 70
71 res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL); 71 res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL);
72 if (!res) 72 if (!res)
73 panic("PCI: unable to alloc resources"); 73 panic("PCI: unable to alloc resources");
74 74
75 memset(res, 0, sizeof(struct resource) * 2);
76
77 res[0].start = IOP321_PCI_LOWER_IO_VA; 75 res[0].start = IOP321_PCI_LOWER_IO_VA;
78 res[0].end = IOP321_PCI_UPPER_IO_VA; 76 res[0].end = IOP321_PCI_UPPER_IO_VA;
79 res[0].name = "IQ80321 PCI I/O Space"; 77 res[0].name = "IQ80321 PCI I/O Space";
diff --git a/arch/arm/mach-iop3xx/iq80331-pci.c b/arch/arm/mach-iop3xx/iq80331-pci.c
index 654e450a1311..40d861002492 100644
--- a/arch/arm/mach-iop3xx/iq80331-pci.c
+++ b/arch/arm/mach-iop3xx/iq80331-pci.c
@@ -64,12 +64,10 @@ static int iq80331_setup(int nr, struct pci_sys_data *sys)
64 if(nr != 0) 64 if(nr != 0)
65 return 0; 65 return 0;
66 66
67 res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL); 67 res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL);
68 if (!res) 68 if (!res)
69 panic("PCI: unable to alloc resources"); 69 panic("PCI: unable to alloc resources");
70 70
71 memset(res, 0, sizeof(struct resource) * 2);
72
73 res[0].start = IOP331_PCI_LOWER_IO_VA; 71 res[0].start = IOP331_PCI_LOWER_IO_VA;
74 res[0].end = IOP331_PCI_UPPER_IO_VA; 72 res[0].end = IOP331_PCI_UPPER_IO_VA;
75 res[0].name = "IQ80331 PCI I/O Space"; 73 res[0].name = "IQ80331 PCI I/O Space";
diff --git a/arch/arm/mach-iop3xx/iq80332-pci.c b/arch/arm/mach-iop3xx/iq80332-pci.c
index 65951ffe4631..afc0676318e4 100644
--- a/arch/arm/mach-iop3xx/iq80332-pci.c
+++ b/arch/arm/mach-iop3xx/iq80332-pci.c
@@ -70,12 +70,10 @@ static int iq80332_setup(int nr, struct pci_sys_data *sys)
70 if(nr != 0) 70 if(nr != 0)
71 return 0; 71 return 0;
72 72
73 res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL); 73 res = kzalloc(sizeof(struct resource) * 2, GFP_KERNEL);
74 if (!res) 74 if (!res)
75 panic("PCI: unable to alloc resources"); 75 panic("PCI: unable to alloc resources");
76 76
77 memset(res, 0, sizeof(struct resource) * 2);
78
79 res[0].start = IOP331_PCI_LOWER_IO_VA; 77 res[0].start = IOP331_PCI_LOWER_IO_VA;
80 res[0].end = IOP331_PCI_UPPER_IO_VA; 78 res[0].end = IOP331_PCI_UPPER_IO_VA;
81 res[0].name = "IQ80332 PCI I/O Space"; 79 res[0].name = "IQ80332 PCI I/O Space";
diff --git a/arch/arm/mach-ixp2000/Kconfig b/arch/arm/mach-ixp2000/Kconfig
index ecb58d83478e..86f53f8ccbf5 100644
--- a/arch/arm/mach-ixp2000/Kconfig
+++ b/arch/arm/mach-ixp2000/Kconfig
@@ -43,12 +43,17 @@ config ARCH_IXDP2401
43 this platform, see <file:Documentation/arm/IXP2000>. 43 this platform, see <file:Documentation/arm/IXP2000>.
44 44
45config ARCH_IXDP2801 45config ARCH_IXDP2801
46 bool "Support Intel IXDP2801" 46 bool "Support Intel IXDP2801 and IXDP28x5"
47 help 47 help
48 Say 'Y' here if you want your kernel to support the Intel 48 Say 'Y' here if you want your kernel to support the Intel
49 IXDP2801 reference platform. For more information on 49 IXDP2801/2805/2855 reference platforms. For more information on
50 this platform, see <file:Documentation/arm/IXP2000>. 50 this platform, see <file:Documentation/arm/IXP2000>.
51 51
52config MACH_IXDP28X5
53 bool
54 depends on ARCH_IXDP2801
55 default y
56
52config ARCH_IXDP2X01 57config ARCH_IXDP2X01
53 bool 58 bool
54 depends on ARCH_IXDP2401 || ARCH_IXDP2801 59 depends on ARCH_IXDP2401 || ARCH_IXDP2801
diff --git a/arch/arm/mach-ixp2000/Makefile b/arch/arm/mach-ixp2000/Makefile
index 9621aeb61f46..1e6139d42a92 100644
--- a/arch/arm/mach-ixp2000/Makefile
+++ b/arch/arm/mach-ixp2000/Makefile
@@ -1,7 +1,7 @@
1# 1#
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4obj-y := core.o pci.o uengine.o 4obj-y := core.o pci.o
5obj-m := 5obj-m :=
6obj-n := 6obj-n :=
7obj- := 7obj- :=
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c
index cfd5bef3190b..6e8d504aca55 100644
--- a/arch/arm/mach-ixp2000/core.c
+++ b/arch/arm/mach-ixp2000/core.c
@@ -288,8 +288,6 @@ void gpio_line_config(int line, int direction)
288 288
289 local_irq_save(flags); 289 local_irq_save(flags);
290 if (direction == GPIO_OUT) { 290 if (direction == GPIO_OUT) {
291 irq_desc[line + IRQ_IXP2000_GPIO0].valid = 0;
292
293 /* if it's an output, it ain't an interrupt anymore */ 291 /* if it's an output, it ain't an interrupt anymore */
294 GPIO_IRQ_falling_edge &= ~(1 << line); 292 GPIO_IRQ_falling_edge &= ~(1 << line);
295 GPIO_IRQ_rising_edge &= ~(1 << line); 293 GPIO_IRQ_rising_edge &= ~(1 << line);
@@ -351,11 +349,6 @@ static int ixp2000_GPIO_irq_type(unsigned int irq, unsigned int type)
351 GPIO_IRQ_level_high &= ~(1 << line); 349 GPIO_IRQ_level_high &= ~(1 << line);
352 update_gpio_int_csrs(); 350 update_gpio_int_csrs();
353 351
354 /*
355 * Finally, mark the corresponding IRQ as valid.
356 */
357 irq_desc[irq].valid = 1;
358
359 return 0; 352 return 0;
360} 353}
361 354
@@ -506,14 +499,10 @@ void __init ixp2000_init_irq(void)
506 } 499 }
507 set_irq_chained_handler(IRQ_IXP2000_ERRSUM, ixp2000_err_irq_handler); 500 set_irq_chained_handler(IRQ_IXP2000_ERRSUM, ixp2000_err_irq_handler);
508 501
509 /*
510 * GPIO IRQs are invalid until someone sets the interrupt mode
511 * by calling set_irq_type().
512 */
513 for (irq = IRQ_IXP2000_GPIO0; irq <= IRQ_IXP2000_GPIO7; irq++) { 502 for (irq = IRQ_IXP2000_GPIO0; irq <= IRQ_IXP2000_GPIO7; irq++) {
514 set_irq_chip(irq, &ixp2000_GPIO_irq_chip); 503 set_irq_chip(irq, &ixp2000_GPIO_irq_chip);
515 set_irq_handler(irq, do_level_IRQ); 504 set_irq_handler(irq, do_level_IRQ);
516 set_irq_flags(irq, 0); 505 set_irq_flags(irq, IRQF_VALID);
517 } 506 }
518 set_irq_chained_handler(IRQ_IXP2000_GPIO, ixp2000_GPIO_irq_handler); 507 set_irq_chained_handler(IRQ_IXP2000_GPIO, ixp2000_GPIO_irq_handler);
519 508
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c
index 150519fb38ec..f9d4968c1d66 100644
--- a/arch/arm/mach-ixp2000/ixdp2x01.c
+++ b/arch/arm/mach-ixp2000/ixdp2x01.c
@@ -284,7 +284,7 @@ static int ixdp2x01_pci_setup(int nr, struct pci_sys_data *sys)
284{ 284{
285 sys->mem_offset = 0xe0000000; 285 sys->mem_offset = 0xe0000000;
286 286
287 if (machine_is_ixdp2801()) 287 if (machine_is_ixdp2801() || machine_is_ixdp28x5())
288 sys->mem_offset -= ((*IXP2000_PCI_ADDR_EXT & 0xE000) << 16); 288 sys->mem_offset -= ((*IXP2000_PCI_ADDR_EXT & 0xE000) << 16);
289 289
290 return ixp2000_pci_setup(nr, sys); 290 return ixp2000_pci_setup(nr, sys);
@@ -300,7 +300,8 @@ struct hw_pci ixdp2x01_pci __initdata = {
300 300
301int __init ixdp2x01_pci_init(void) 301int __init ixdp2x01_pci_init(void)
302{ 302{
303 if (machine_is_ixdp2401() || machine_is_ixdp2801()) 303 if (machine_is_ixdp2401() || machine_is_ixdp2801() ||\
304 machine_is_ixdp28x5())
304 pci_common_init(&ixdp2x01_pci); 305 pci_common_init(&ixdp2x01_pci);
305 306
306 return 0; 307 return 0;
@@ -400,6 +401,21 @@ MACHINE_START(IXDP2801, "Intel IXDP2801 Development Platform")
400 .timer = &ixdp2x01_timer, 401 .timer = &ixdp2x01_timer,
401 .init_machine = ixdp2x01_init_machine, 402 .init_machine = ixdp2x01_init_machine,
402MACHINE_END 403MACHINE_END
404
405/*
406 * IXDP28x5 is basically an IXDP2801 with a different CPU but Intel
407 * changed the machine ID in the bootloader
408 */
409MACHINE_START(IXDP28X5, "Intel IXDP2805/2855 Development Platform")
410 /* Maintainer: MontaVista Software, Inc. */
411 .phys_io = IXP2000_UART_PHYS_BASE,
412 .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc,
413 .boot_params = 0x00000100,
414 .map_io = ixdp2x01_map_io,
415 .init_irq = ixdp2x01_init_irq,
416 .timer = &ixdp2x01_timer,
417 .init_machine = ixdp2x01_init_machine,
418MACHINE_END
403#endif 419#endif
404 420
405 421
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index 6e3462ed5306..2d40fe1145f0 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -463,7 +463,7 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys)
463 if (nr >= 1) 463 if (nr >= 1)
464 return 0; 464 return 0;
465 465
466 res = kmalloc(sizeof(*res) * 2, GFP_KERNEL); 466 res = kzalloc(sizeof(*res) * 2, GFP_KERNEL);
467 if (res == NULL) { 467 if (res == NULL) {
468 /* 468 /*
469 * If we're out of memory this early, something is wrong, 469 * If we're out of memory this early, something is wrong,
@@ -471,7 +471,6 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys)
471 */ 471 */
472 panic("PCI: unable to allocate resources?\n"); 472 panic("PCI: unable to allocate resources?\n");
473 } 473 }
474 memset(res, 0, sizeof(*res) * 2);
475 474
476 local_write_config(PCI_COMMAND, 2, PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); 475 local_write_config(PCI_COMMAND, 2, PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
477 476
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index fbadf3021b9e..a0888e160e3b 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -91,7 +91,7 @@ static void ixp4xx_config_irq(unsigned irq, enum ixp4xx_irq_type type);
91/* 91/*
92 * IRQ -> GPIO mapping table 92 * IRQ -> GPIO mapping table
93 */ 93 */
94static int irq2gpio[32] = { 94static char irq2gpio[32] = {
95 -1, -1, -1, -1, -1, -1, 0, 1, 95 -1, -1, -1, -1, -1, -1, 0, 1,
96 -1, -1, -1, -1, -1, -1, -1, -1, 96 -1, -1, -1, -1, -1, -1, -1, -1,
97 -1, -1, -1, 2, 3, 4, 5, 6, 97 -1, -1, -1, 2, 3, 4, 5, 6,
@@ -153,6 +153,9 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type)
153 /* Set the new style */ 153 /* Set the new style */
154 *int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE)); 154 *int_reg |= (int_style << (line * IXP4XX_GPIO_STYLE_SIZE));
155 155
156 /* Configure the line as an input */
157 gpio_line_config(line, IXP4XX_GPIO_IN);
158
156 return 0; 159 return 0;
157} 160}
158 161
diff --git a/arch/arm/mach-lh7a40x/common.h b/arch/arm/mach-lh7a40x/common.h
index 578a52461fdb..ea8de7e3ab1b 100644
--- a/arch/arm/mach-lh7a40x/common.h
+++ b/arch/arm/mach-lh7a40x/common.h
@@ -12,5 +12,6 @@ extern struct sys_timer lh7a40x_timer;
12 12
13extern void lh7a400_init_irq (void); 13extern void lh7a400_init_irq (void);
14extern void lh7a404_init_irq (void); 14extern void lh7a404_init_irq (void);
15extern void lh7a40x_init_board_irq (void);
15 16
16#define IRQ_DISPATCH(irq) desc_handle_irq((irq),(irq_desc + irq), regs) 17#define IRQ_DISPATCH(irq) desc_handle_irq((irq),(irq_desc + irq), regs)
diff --git a/arch/arm/mach-lh7a40x/irq-kev7a400.c b/arch/arm/mach-lh7a40x/irq-kev7a400.c
index 691bb09232a5..8535764d89ca 100644
--- a/arch/arm/mach-lh7a40x/irq-kev7a400.c
+++ b/arch/arm/mach-lh7a40x/irq-kev7a400.c
@@ -16,6 +16,7 @@
16#include <asm/mach/hardware.h> 16#include <asm/mach/hardware.h>
17#include <asm/mach/irqs.h> 17#include <asm/mach/irqs.h>
18 18
19#include "common.h"
19 20
20 /* KEV7a400 CPLD IRQ handling */ 21 /* KEV7a400 CPLD IRQ handling */
21 22
diff --git a/arch/arm/mach-lh7a40x/irq-lh7a400.c b/arch/arm/mach-lh7a40x/irq-lh7a400.c
index f334d81c2cd8..f9fdefef6d6f 100644
--- a/arch/arm/mach-lh7a40x/irq-lh7a400.c
+++ b/arch/arm/mach-lh7a40x/irq-lh7a400.c
@@ -16,9 +16,9 @@
16#include <asm/hardware.h> 16#include <asm/hardware.h>
17#include <asm/irq.h> 17#include <asm/irq.h>
18#include <asm/mach/irq.h> 18#include <asm/mach/irq.h>
19#include <asm/arch/irq.h>
20#include <asm/arch/irqs.h> 19#include <asm/arch/irqs.h>
21 20
21#include "common.h"
22 22
23 /* CPU IRQ handling */ 23 /* CPU IRQ handling */
24 24
diff --git a/arch/arm/mach-lh7a40x/irq-lh7a404.c b/arch/arm/mach-lh7a40x/irq-lh7a404.c
index 122fadabc97d..e902e3d87da4 100644
--- a/arch/arm/mach-lh7a40x/irq-lh7a404.c
+++ b/arch/arm/mach-lh7a40x/irq-lh7a404.c
@@ -16,9 +16,10 @@
16#include <asm/hardware.h> 16#include <asm/hardware.h>
17#include <asm/irq.h> 17#include <asm/irq.h>
18#include <asm/mach/irq.h> 18#include <asm/mach/irq.h>
19#include <asm/arch/irq.h>
20#include <asm/arch/irqs.h> 19#include <asm/arch/irqs.h>
21 20
21#include "common.h"
22
22#define USE_PRIORITIES 23#define USE_PRIORITIES
23 24
24/* See Documentation/arm/Sharp-LH/VectoredInterruptController for more 25/* See Documentation/arm/Sharp-LH/VectoredInterruptController for more
diff --git a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c
index 6262d449120c..dcb4e17b9419 100644
--- a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c
+++ b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c
@@ -19,6 +19,7 @@
19#include <asm/mach/irq.h> 19#include <asm/mach/irq.h>
20#include <asm/arch/irqs.h> 20#include <asm/arch/irqs.h>
21 21
22#include "common.h"
22 23
23static void lh7a40x_ack_cpld_irq (u32 irq) 24static void lh7a40x_ack_cpld_irq (u32 irq)
24{ 25{
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index 32526a0a6f86..382644401a4d 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5# Common support (must be linked before board specific support) 5# Common support (must be linked before board specific support)
6obj-y += generic.o irq.o dma.o time.o 6obj-y += clock.o generic.o irq.o dma.o time.o
7obj-$(CONFIG_PXA25x) += pxa25x.o 7obj-$(CONFIG_PXA25x) += pxa25x.o
8obj-$(CONFIG_PXA27x) += pxa27x.o 8obj-$(CONFIG_PXA27x) += pxa27x.o
9 9
diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c
new file mode 100644
index 000000000000..8f7c90a0593b
--- /dev/null
+++ b/arch/arm/mach-pxa/clock.c
@@ -0,0 +1,124 @@
1/*
2 * linux/arch/arm/mach-sa1100/clock.c
3 */
4#include <linux/module.h>
5#include <linux/kernel.h>
6#include <linux/list.h>
7#include <linux/errno.h>
8#include <linux/err.h>
9#include <linux/string.h>
10#include <linux/clk.h>
11#include <linux/spinlock.h>
12
13#include <asm/arch/pxa-regs.h>
14#include <asm/hardware.h>
15#include <asm/semaphore.h>
16
17struct clk {
18 struct list_head node;
19 unsigned long rate;
20 struct module *owner;
21 const char *name;
22 unsigned int enabled;
23 void (*enable)(void);
24 void (*disable)(void);
25};
26
27static LIST_HEAD(clocks);
28static DECLARE_MUTEX(clocks_sem);
29static DEFINE_SPINLOCK(clocks_lock);
30
31struct clk *clk_get(struct device *dev, const char *id)
32{
33 struct clk *p, *clk = ERR_PTR(-ENOENT);
34
35 down(&clocks_sem);
36 list_for_each_entry(p, &clocks, node) {
37 if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
38 clk = p;
39 break;
40 }
41 }
42 up(&clocks_sem);
43
44 return clk;
45}
46EXPORT_SYMBOL(clk_get);
47
48void clk_put(struct clk *clk)
49{
50 module_put(clk->owner);
51}
52EXPORT_SYMBOL(clk_put);
53
54int clk_enable(struct clk *clk)
55{
56 unsigned long flags;
57
58 spin_lock_irqsave(&clocks_lock, flags);
59 if (clk->enabled++ == 0)
60 clk->enable();
61 spin_unlock_irqrestore(&clocks_lock, flags);
62 return 0;
63}
64EXPORT_SYMBOL(clk_enable);
65
66void clk_disable(struct clk *clk)
67{
68 unsigned long flags;
69
70 WARN_ON(clk->enabled == 0);
71
72 spin_lock_irqsave(&clocks_lock, flags);
73 if (--clk->enabled == 0)
74 clk->disable();
75 spin_unlock_irqrestore(&clocks_lock, flags);
76}
77EXPORT_SYMBOL(clk_disable);
78
79unsigned long clk_get_rate(struct clk *clk)
80{
81 return clk->rate;
82}
83EXPORT_SYMBOL(clk_get_rate);
84
85
86static void clk_gpio27_enable(void)
87{
88 pxa_gpio_mode(GPIO11_3_6MHz_MD);
89}
90
91static void clk_gpio27_disable(void)
92{
93}
94
95static struct clk clk_gpio27 = {
96 .name = "GPIO27_CLK",
97 .rate = 3686400,
98 .enable = clk_gpio27_enable,
99 .disable = clk_gpio27_disable,
100};
101
102int clk_register(struct clk *clk)
103{
104 down(&clocks_sem);
105 list_add(&clk->node, &clocks);
106 up(&clocks_sem);
107 return 0;
108}
109EXPORT_SYMBOL(clk_register);
110
111void clk_unregister(struct clk *clk)
112{
113 down(&clocks_sem);
114 list_del(&clk->node);
115 up(&clocks_sem);
116}
117EXPORT_SYMBOL(clk_unregister);
118
119static int __init clk_init(void)
120{
121 clk_register(&clk_gpio27);
122 return 0;
123}
124arch_initcall(clk_init);
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index 7ffd2de8f2f3..68923b1d2b62 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -32,7 +32,6 @@
32#include <asm/mach/irq.h> 32#include <asm/mach/irq.h>
33 33
34#include <asm/arch/pxa-regs.h> 34#include <asm/arch/pxa-regs.h>
35#include <asm/arch/irq.h>
36#include <asm/arch/irda.h> 35#include <asm/arch/irda.h>
37#include <asm/arch/mmc.h> 36#include <asm/arch/mmc.h>
38#include <asm/arch/udc.h> 37#include <asm/arch/udc.h>
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 911e6ff5a9bd..b45560a8f6c4 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -29,7 +29,6 @@
29#include <asm/mach/irq.h> 29#include <asm/mach/irq.h>
30 30
31#include <asm/arch/pxa-regs.h> 31#include <asm/arch/pxa-regs.h>
32#include <asm/arch/irq.h>
33#include <asm/arch/mmc.h> 32#include <asm/arch/mmc.h>
34#include <asm/arch/udc.h> 33#include <asm/arch/udc.h>
35#include <asm/arch/irda.h> 34#include <asm/arch/irda.h>
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index c094d99ebf56..30ec317bbb97 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -33,7 +33,6 @@
33#include <asm/mach/irq.h> 33#include <asm/mach/irq.h>
34 34
35#include <asm/arch/pxa-regs.h> 35#include <asm/arch/pxa-regs.h>
36#include <asm/arch/irq.h>
37#include <asm/arch/irda.h> 36#include <asm/arch/irda.h>
38#include <asm/arch/mmc.h> 37#include <asm/arch/mmc.h>
39#include <asm/arch/ohci.h> 38#include <asm/arch/ohci.h>
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index d168286ed470..66ec71756d0f 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -34,7 +34,6 @@
34#include <asm/mach/irq.h> 34#include <asm/mach/irq.h>
35 35
36#include <asm/arch/pxa-regs.h> 36#include <asm/arch/pxa-regs.h>
37#include <asm/arch/irq.h>
38#include <asm/arch/tosa.h> 37#include <asm/arch/tosa.h>
39 38
40#include <asm/hardware/scoop.h> 39#include <asm/hardware/scoop.h>
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index 0b9d7ca49ec1..ed07c4149d82 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -9,6 +9,13 @@ config MACH_ANUBIS
9 Say Y gere if you are using the Simtec Electronics ANUBIS 9 Say Y gere if you are using the Simtec Electronics ANUBIS
10 development system 10 development system
11 11
12config MACH_OSIRIS
13 bool "Simtec IM2440D20 (OSIRIS) module"
14 select CPU_S3C2440
15 help
16 Say Y here if you are using the Simtec IM2440D20 module, also
17 known as the Osiris.
18
12config ARCH_BAST 19config ARCH_BAST
13 bool "Simtec Electronics BAST (EB2410ITX)" 20 bool "Simtec Electronics BAST (EB2410ITX)"
14 select CPU_S3C2410 21 select CPU_S3C2410
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile
index 1217bf00309c..1b3b476e5637 100644
--- a/arch/arm/mach-s3c2410/Makefile
+++ b/arch/arm/mach-s3c2410/Makefile
@@ -38,6 +38,7 @@ obj-$(CONFIG_BAST_PC104_IRQ) += bast-irq.o
38# machine specific support 38# machine specific support
39 39
40obj-$(CONFIG_MACH_ANUBIS) += mach-anubis.o 40obj-$(CONFIG_MACH_ANUBIS) += mach-anubis.o
41obj-$(CONFIG_MACH_OSIRIS) += mach-osiris.o
41obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o 42obj-$(CONFIG_ARCH_BAST) += mach-bast.o usb-simtec.o
42obj-$(CONFIG_ARCH_H1940) += mach-h1940.o 43obj-$(CONFIG_ARCH_H1940) += mach-h1940.o
43obj-$(CONFIG_MACH_N30) += mach-n30.o 44obj-$(CONFIG_MACH_N30) += mach-n30.o
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c
index 08489efdaf06..fec02c92f95f 100644
--- a/arch/arm/mach-s3c2410/clock.c
+++ b/arch/arm/mach-s3c2410/clock.c
@@ -38,12 +38,14 @@
38#include <linux/ioport.h> 38#include <linux/ioport.h>
39#include <linux/clk.h> 39#include <linux/clk.h>
40#include <linux/mutex.h> 40#include <linux/mutex.h>
41#include <linux/delay.h>
41 42
42#include <asm/hardware.h> 43#include <asm/hardware.h>
43#include <asm/irq.h> 44#include <asm/irq.h>
44#include <asm/io.h> 45#include <asm/io.h>
45 46
46#include <asm/arch/regs-clock.h> 47#include <asm/arch/regs-clock.h>
48#include <asm/arch/regs-gpio.h>
47 49
48#include "clock.h" 50#include "clock.h"
49#include "cpu.h" 51#include "cpu.h"
@@ -51,7 +53,8 @@
51/* clock information */ 53/* clock information */
52 54
53static LIST_HEAD(clocks); 55static LIST_HEAD(clocks);
54static DEFINE_MUTEX(clocks_mutex); 56
57DEFINE_MUTEX(clocks_mutex);
55 58
56/* old functions */ 59/* old functions */
57 60
@@ -178,12 +181,24 @@ unsigned long clk_get_rate(struct clk *clk)
178 181
179long clk_round_rate(struct clk *clk, unsigned long rate) 182long clk_round_rate(struct clk *clk, unsigned long rate)
180{ 183{
184 if (!IS_ERR(clk) && clk->round_rate)
185 return (clk->round_rate)(clk, rate);
186
181 return rate; 187 return rate;
182} 188}
183 189
184int clk_set_rate(struct clk *clk, unsigned long rate) 190int clk_set_rate(struct clk *clk, unsigned long rate)
185{ 191{
186 return -EINVAL; 192 int ret;
193
194 if (IS_ERR(clk))
195 return -EINVAL;
196
197 mutex_lock(&clocks_mutex);
198 ret = (clk->set_rate)(clk, rate);
199 mutex_unlock(&clocks_mutex);
200
201 return ret;
187} 202}
188 203
189struct clk *clk_get_parent(struct clk *clk) 204struct clk *clk_get_parent(struct clk *clk)
@@ -191,6 +206,23 @@ struct clk *clk_get_parent(struct clk *clk)
191 return clk->parent; 206 return clk->parent;
192} 207}
193 208
209int clk_set_parent(struct clk *clk, struct clk *parent)
210{
211 int ret = 0;
212
213 if (IS_ERR(clk))
214 return -EINVAL;
215
216 mutex_lock(&clocks_mutex);
217
218 if (clk->set_parent)
219 ret = (clk->set_parent)(clk, parent);
220
221 mutex_unlock(&clocks_mutex);
222
223 return ret;
224}
225
194EXPORT_SYMBOL(clk_get); 226EXPORT_SYMBOL(clk_get);
195EXPORT_SYMBOL(clk_put); 227EXPORT_SYMBOL(clk_put);
196EXPORT_SYMBOL(clk_enable); 228EXPORT_SYMBOL(clk_enable);
@@ -199,6 +231,29 @@ EXPORT_SYMBOL(clk_get_rate);
199EXPORT_SYMBOL(clk_round_rate); 231EXPORT_SYMBOL(clk_round_rate);
200EXPORT_SYMBOL(clk_set_rate); 232EXPORT_SYMBOL(clk_set_rate);
201EXPORT_SYMBOL(clk_get_parent); 233EXPORT_SYMBOL(clk_get_parent);
234EXPORT_SYMBOL(clk_set_parent);
235
236/* base clock enable */
237
238static int s3c24xx_upll_enable(struct clk *clk, int enable)
239{
240 unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW);
241 unsigned long orig = clkslow;
242
243 if (enable)
244 clkslow &= ~S3C2410_CLKSLOW_UCLK_OFF;
245 else
246 clkslow |= S3C2410_CLKSLOW_UCLK_OFF;
247
248 __raw_writel(clkslow, S3C2410_CLKSLOW);
249
250 /* if we started the UPLL, then allow to settle */
251
252 if (enable && !(orig & S3C2410_CLKSLOW_UCLK_OFF))
253 udelay(200);
254
255 return 0;
256}
202 257
203/* base clocks */ 258/* base clocks */
204 259
@@ -210,6 +265,14 @@ static struct clk clk_xtal = {
210 .ctrlbit = 0, 265 .ctrlbit = 0,
211}; 266};
212 267
268static struct clk clk_upll = {
269 .name = "upll",
270 .id = -1,
271 .parent = NULL,
272 .enable = s3c24xx_upll_enable,
273 .ctrlbit = 0,
274};
275
213static struct clk clk_f = { 276static struct clk clk_f = {
214 .name = "fclk", 277 .name = "fclk",
215 .id = -1, 278 .id = -1,
@@ -234,26 +297,124 @@ static struct clk clk_p = {
234 .ctrlbit = 0, 297 .ctrlbit = 0,
235}; 298};
236 299
300struct clk clk_usb_bus = {
301 .name = "usb-bus",
302 .id = -1,
303 .rate = 0,
304 .parent = &clk_upll,
305};
306
237/* clocks that could be registered by external code */ 307/* clocks that could be registered by external code */
238 308
309static int s3c24xx_dclk_enable(struct clk *clk, int enable)
310{
311 unsigned long dclkcon = __raw_readl(S3C2410_DCLKCON);
312
313 if (enable)
314 dclkcon |= clk->ctrlbit;
315 else
316 dclkcon &= ~clk->ctrlbit;
317
318 __raw_writel(dclkcon, S3C2410_DCLKCON);
319
320 return 0;
321}
322
323static int s3c24xx_dclk_setparent(struct clk *clk, struct clk *parent)
324{
325 unsigned long dclkcon;
326 unsigned int uclk;
327
328 if (parent == &clk_upll)
329 uclk = 1;
330 else if (parent == &clk_p)
331 uclk = 0;
332 else
333 return -EINVAL;
334
335 clk->parent = parent;
336
337 dclkcon = __raw_readl(S3C2410_DCLKCON);
338
339 if (clk->ctrlbit == S3C2410_DCLKCON_DCLK0EN) {
340 if (uclk)
341 dclkcon |= S3C2410_DCLKCON_DCLK0_UCLK;
342 else
343 dclkcon &= ~S3C2410_DCLKCON_DCLK0_UCLK;
344 } else {
345 if (uclk)
346 dclkcon |= S3C2410_DCLKCON_DCLK1_UCLK;
347 else
348 dclkcon &= ~S3C2410_DCLKCON_DCLK1_UCLK;
349 }
350
351 __raw_writel(dclkcon, S3C2410_DCLKCON);
352
353 return 0;
354}
355
356
357static int s3c24xx_clkout_setparent(struct clk *clk, struct clk *parent)
358{
359 unsigned long mask;
360 unsigned long source;
361
362 /* calculate the MISCCR setting for the clock */
363
364 if (parent == &clk_xtal)
365 source = S3C2410_MISCCR_CLK0_MPLL;
366 else if (parent == &clk_upll)
367 source = S3C2410_MISCCR_CLK0_UPLL;
368 else if (parent == &clk_f)
369 source = S3C2410_MISCCR_CLK0_FCLK;
370 else if (parent == &clk_p)
371 source = S3C2410_MISCCR_CLK0_PCLK;
372 else if (clk == &s3c24xx_clkout0 && parent == &s3c24xx_dclk0)
373 source = S3C2410_MISCCR_CLK0_DCLK0;
374 else if (clk == &s3c24xx_clkout1 && parent == &s3c24xx_dclk1)
375 source = S3C2410_MISCCR_CLK0_DCLK0;
376 else
377 return -EINVAL;
378
379 if (clk == &s3c24xx_dclk0)
380 mask = S3C2410_MISCCR_CLK0_MASK;
381 else {
382 source <<= 4;
383 mask = S3C2410_MISCCR_CLK1_MASK;
384 }
385
386 s3c2410_modify_misccr(mask, source);
387 return 0;
388}
389
390/* external clock definitions */
391
239struct clk s3c24xx_dclk0 = { 392struct clk s3c24xx_dclk0 = {
240 .name = "dclk0", 393 .name = "dclk0",
241 .id = -1, 394 .id = -1,
395 .ctrlbit = S3C2410_DCLKCON_DCLK0EN,
396 .enable = s3c24xx_dclk_enable,
397 .set_parent = s3c24xx_dclk_setparent,
242}; 398};
243 399
244struct clk s3c24xx_dclk1 = { 400struct clk s3c24xx_dclk1 = {
245 .name = "dclk1", 401 .name = "dclk1",
246 .id = -1, 402 .id = -1,
403 .ctrlbit = S3C2410_DCLKCON_DCLK0EN,
404 .enable = s3c24xx_dclk_enable,
405 .set_parent = s3c24xx_dclk_setparent,
247}; 406};
248 407
249struct clk s3c24xx_clkout0 = { 408struct clk s3c24xx_clkout0 = {
250 .name = "clkout0", 409 .name = "clkout0",
251 .id = -1, 410 .id = -1,
411 .set_parent = s3c24xx_clkout_setparent,
252}; 412};
253 413
254struct clk s3c24xx_clkout1 = { 414struct clk s3c24xx_clkout1 = {
255 .name = "clkout1", 415 .name = "clkout1",
256 .id = -1, 416 .id = -1,
417 .set_parent = s3c24xx_clkout_setparent,
257}; 418};
258 419
259struct clk s3c24xx_uclk = { 420struct clk s3c24xx_uclk = {
@@ -262,7 +423,7 @@ struct clk s3c24xx_uclk = {
262}; 423};
263 424
264 425
265/* clock definitions */ 426/* standard clock definitions */
266 427
267static struct clk init_clocks[] = { 428static struct clk init_clocks[] = {
268 { 429 {
@@ -374,7 +535,7 @@ int s3c24xx_register_clock(struct clk *clk)
374 535
375 /* if this is a standard clock, set the usage state */ 536 /* if this is a standard clock, set the usage state */
376 537
377 if (clk->ctrlbit) { 538 if (clk->ctrlbit && clk->enable == s3c24xx_clkcon_enable) {
378 unsigned long clkcon = __raw_readl(S3C2410_CLKCON); 539 unsigned long clkcon = __raw_readl(S3C2410_CLKCON);
379 540
380 clk->usage = (clkcon & clk->ctrlbit) ? 1 : 0; 541 clk->usage = (clkcon & clk->ctrlbit) ? 1 : 0;
@@ -396,6 +557,7 @@ int __init s3c24xx_setup_clocks(unsigned long xtal,
396 unsigned long hclk, 557 unsigned long hclk,
397 unsigned long pclk) 558 unsigned long pclk)
398{ 559{
560 unsigned long upllcon = __raw_readl(S3C2410_UPLLCON);
399 unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW); 561 unsigned long clkslow = __raw_readl(S3C2410_CLKSLOW);
400 struct clk *clkp = init_clocks; 562 struct clk *clkp = init_clocks;
401 int ptr; 563 int ptr;
@@ -406,6 +568,7 @@ int __init s3c24xx_setup_clocks(unsigned long xtal,
406 /* initialise the main system clocks */ 568 /* initialise the main system clocks */
407 569
408 clk_xtal.rate = xtal; 570 clk_xtal.rate = xtal;
571 clk_upll.rate = s3c2410_get_pll(upllcon, xtal);
409 572
410 clk_h.rate = hclk; 573 clk_h.rate = hclk;
411 clk_p.rate = pclk; 574 clk_p.rate = pclk;
@@ -439,6 +602,9 @@ int __init s3c24xx_setup_clocks(unsigned long xtal,
439 if (s3c24xx_register_clock(&clk_xtal) < 0) 602 if (s3c24xx_register_clock(&clk_xtal) < 0)
440 printk(KERN_ERR "failed to register master xtal\n"); 603 printk(KERN_ERR "failed to register master xtal\n");
441 604
605 if (s3c24xx_register_clock(&clk_upll) < 0)
606 printk(KERN_ERR "failed to register upll clock\n");
607
442 if (s3c24xx_register_clock(&clk_f) < 0) 608 if (s3c24xx_register_clock(&clk_f) < 0)
443 printk(KERN_ERR "failed to register cpu fclk\n"); 609 printk(KERN_ERR "failed to register cpu fclk\n");
444 610
@@ -448,6 +614,10 @@ int __init s3c24xx_setup_clocks(unsigned long xtal,
448 if (s3c24xx_register_clock(&clk_p) < 0) 614 if (s3c24xx_register_clock(&clk_p) < 0)
449 printk(KERN_ERR "failed to register cpu pclk\n"); 615 printk(KERN_ERR "failed to register cpu pclk\n");
450 616
617
618 if (s3c24xx_register_clock(&clk_usb_bus) < 0)
619 printk(KERN_ERR "failed to register usb bus clock\n");
620
451 /* register clocks from clock array */ 621 /* register clocks from clock array */
452 622
453 for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) { 623 for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) {
diff --git a/arch/arm/mach-s3c2410/clock.h b/arch/arm/mach-s3c2410/clock.h
index eb5c95d1e7f2..01bb458bf8eb 100644
--- a/arch/arm/mach-s3c2410/clock.h
+++ b/arch/arm/mach-s3c2410/clock.h
@@ -19,7 +19,11 @@ struct clk {
19 int usage; 19 int usage;
20 unsigned long rate; 20 unsigned long rate;
21 unsigned long ctrlbit; 21 unsigned long ctrlbit;
22
22 int (*enable)(struct clk *, int enable); 23 int (*enable)(struct clk *, int enable);
24 int (*set_rate)(struct clk *c, unsigned long rate);
25 unsigned long (*round_rate)(struct clk *c, unsigned long rate);
26 int (*set_parent)(struct clk *c, struct clk *parent);
23}; 27};
24 28
25/* other clocks which may be registered by board support */ 29/* other clocks which may be registered by board support */
@@ -30,11 +34,15 @@ extern struct clk s3c24xx_clkout0;
30extern struct clk s3c24xx_clkout1; 34extern struct clk s3c24xx_clkout1;
31extern struct clk s3c24xx_uclk; 35extern struct clk s3c24xx_uclk;
32 36
37extern struct clk clk_usb_bus;
38
33/* exports for arch/arm/mach-s3c2410 39/* exports for arch/arm/mach-s3c2410
34 * 40 *
35 * Please DO NOT use these outside of arch/arm/mach-s3c2410 41 * Please DO NOT use these outside of arch/arm/mach-s3c2410
36*/ 42*/
37 43
44extern struct mutex clocks_mutex;
45
38extern int s3c24xx_clkcon_enable(struct clk *clk, int enable); 46extern int s3c24xx_clkcon_enable(struct clk *clk, int enable);
39extern int s3c24xx_register_clock(struct clk *clk); 47extern int s3c24xx_register_clock(struct clk *clk);
40 48
diff --git a/arch/arm/mach-s3c2410/mach-osiris.c b/arch/arm/mach-s3c2410/mach-osiris.c
new file mode 100644
index 000000000000..ae0787557751
--- /dev/null
+++ b/arch/arm/mach-s3c2410/mach-osiris.c
@@ -0,0 +1,294 @@
1/* linux/arch/arm/mach-s3c2410/mach-osiris.c
2 *
3 * Copyright (c) 2005 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
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
12#include <linux/kernel.h>
13#include <linux/types.h>
14#include <linux/interrupt.h>
15#include <linux/list.h>
16#include <linux/timer.h>
17#include <linux/init.h>
18#include <linux/device.h>
19
20#include <asm/mach/arch.h>
21#include <asm/mach/map.h>
22#include <asm/mach/irq.h>
23
24#include <asm/arch/osiris-map.h>
25#include <asm/arch/osiris-cpld.h>
26
27#include <asm/hardware.h>
28#include <asm/io.h>
29#include <asm/irq.h>
30#include <asm/mach-types.h>
31
32#include <asm/arch/regs-serial.h>
33#include <asm/arch/regs-gpio.h>
34#include <asm/arch/regs-mem.h>
35#include <asm/arch/regs-lcd.h>
36#include <asm/arch/nand.h>
37
38#include <linux/mtd/mtd.h>
39#include <linux/mtd/nand.h>
40#include <linux/mtd/nand_ecc.h>
41#include <linux/mtd/partitions.h>
42
43#include "clock.h"
44#include "devs.h"
45#include "cpu.h"
46
47/* onboard perihpheral map */
48
49static struct map_desc osiris_iodesc[] __initdata = {
50 /* ISA IO areas (may be over-written later) */
51
52 {
53 .virtual = (u32)S3C24XX_VA_ISA_BYTE,
54 .pfn = __phys_to_pfn(S3C2410_CS5),
55 .length = SZ_16M,
56 .type = MT_DEVICE,
57 }, {
58 .virtual = (u32)S3C24XX_VA_ISA_WORD,
59 .pfn = __phys_to_pfn(S3C2410_CS5),
60 .length = SZ_16M,
61 .type = MT_DEVICE,
62 },
63
64 /* CPLD control registers */
65
66 {
67 .virtual = (u32)OSIRIS_VA_CTRL1,
68 .pfn = __phys_to_pfn(OSIRIS_PA_CTRL1),
69 .length = SZ_16K,
70 .type = MT_DEVICE
71 }, {
72 .virtual = (u32)OSIRIS_VA_CTRL2,
73 .pfn = __phys_to_pfn(OSIRIS_PA_CTRL2),
74 .length = SZ_16K,
75 .type = MT_DEVICE
76 },
77};
78
79#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
80#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
81#define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
82
83static struct s3c24xx_uart_clksrc osiris_serial_clocks[] = {
84 [0] = {
85 .name = "uclk",
86 .divisor = 1,
87 .min_baud = 0,
88 .max_baud = 0,
89 },
90 [1] = {
91 .name = "pclk",
92 .divisor = 1,
93 .min_baud = 0,
94 .max_baud = 0.
95 }
96};
97
98
99static struct s3c2410_uartcfg osiris_uartcfgs[] = {
100 [0] = {
101 .hwport = 0,
102 .flags = 0,
103 .ucon = UCON,
104 .ulcon = ULCON,
105 .ufcon = UFCON,
106 .clocks = osiris_serial_clocks,
107 .clocks_size = ARRAY_SIZE(osiris_serial_clocks)
108 },
109 [1] = {
110 .hwport = 2,
111 .flags = 0,
112 .ucon = UCON,
113 .ulcon = ULCON,
114 .ufcon = UFCON,
115 .clocks = osiris_serial_clocks,
116 .clocks_size = ARRAY_SIZE(osiris_serial_clocks)
117 },
118};
119
120/* NAND Flash on Osiris board */
121
122static int external_map[] = { 2 };
123static int chip0_map[] = { 0 };
124static int chip1_map[] = { 1 };
125
126static struct mtd_partition osiris_default_nand_part[] = {
127 [0] = {
128 .name = "Boot Agent",
129 .size = SZ_16K,
130 .offset = 0
131 },
132 [1] = {
133 .name = "/boot",
134 .size = SZ_4M - SZ_16K,
135 .offset = SZ_16K,
136 },
137 [2] = {
138 .name = "user1",
139 .offset = SZ_4M,
140 .size = SZ_32M - SZ_4M,
141 },
142 [3] = {
143 .name = "user2",
144 .offset = SZ_32M,
145 .size = MTDPART_SIZ_FULL,
146 }
147};
148
149/* the Osiris has 3 selectable slots for nand-flash, the two
150 * on-board chip areas, as well as the external slot.
151 *
152 * Note, there is no current hot-plug support for the External
153 * socket.
154*/
155
156static struct s3c2410_nand_set osiris_nand_sets[] = {
157 [1] = {
158 .name = "External",
159 .nr_chips = 1,
160 .nr_map = external_map,
161 .nr_partitions = ARRAY_SIZE(osiris_default_nand_part),
162 .partitions = osiris_default_nand_part
163 },
164 [0] = {
165 .name = "chip0",
166 .nr_chips = 1,
167 .nr_map = chip0_map,
168 .nr_partitions = ARRAY_SIZE(osiris_default_nand_part),
169 .partitions = osiris_default_nand_part
170 },
171 [2] = {
172 .name = "chip1",
173 .nr_chips = 1,
174 .nr_map = chip1_map,
175 .nr_partitions = ARRAY_SIZE(osiris_default_nand_part),
176 .partitions = osiris_default_nand_part
177 },
178};
179
180static void osiris_nand_select(struct s3c2410_nand_set *set, int slot)
181{
182 unsigned int tmp;
183
184 slot = set->nr_map[slot] & 3;
185
186 pr_debug("osiris_nand: selecting slot %d (set %p,%p)\n",
187 slot, set, set->nr_map);
188
189 tmp = __raw_readb(OSIRIS_VA_CTRL1);
190 tmp &= ~OSIRIS_CTRL1_NANDSEL;
191 tmp |= slot;
192
193 pr_debug("osiris_nand: ctrl1 now %02x\n", tmp);
194
195 __raw_writeb(tmp, OSIRIS_VA_CTRL1);
196}
197
198static struct s3c2410_platform_nand osiris_nand_info = {
199 .tacls = 25,
200 .twrph0 = 60,
201 .twrph1 = 60,
202 .nr_sets = ARRAY_SIZE(osiris_nand_sets),
203 .sets = osiris_nand_sets,
204 .select_chip = osiris_nand_select,
205};
206
207/* PCMCIA control and configuration */
208
209static struct resource osiris_pcmcia_resource[] = {
210 [0] = {
211 .start = 0x0f000000,
212 .end = 0x0f100000,
213 .flags = IORESOURCE_MEM,
214 },
215 [1] = {
216 .start = 0x0c000000,
217 .end = 0x0c100000,
218 .flags = IORESOURCE_MEM,
219 }
220};
221
222static struct platform_device osiris_pcmcia = {
223 .name = "osiris-pcmcia",
224 .id = -1,
225 .num_resources = ARRAY_SIZE(osiris_pcmcia_resource),
226 .resource = osiris_pcmcia_resource,
227};
228
229/* Standard Osiris devices */
230
231static struct platform_device *osiris_devices[] __initdata = {
232 &s3c_device_i2c,
233 &s3c_device_nand,
234 &osiris_pcmcia,
235};
236
237static struct clk *osiris_clocks[] = {
238 &s3c24xx_dclk0,
239 &s3c24xx_dclk1,
240 &s3c24xx_clkout0,
241 &s3c24xx_clkout1,
242 &s3c24xx_uclk,
243};
244
245static struct s3c24xx_board osiris_board __initdata = {
246 .devices = osiris_devices,
247 .devices_count = ARRAY_SIZE(osiris_devices),
248 .clocks = osiris_clocks,
249 .clocks_count = ARRAY_SIZE(osiris_clocks)
250};
251
252static void __init osiris_map_io(void)
253{
254 unsigned long flags;
255
256 /* initialise the clocks */
257
258 s3c24xx_dclk0.parent = NULL;
259 s3c24xx_dclk0.rate = 12*1000*1000;
260
261 s3c24xx_dclk1.parent = NULL;
262 s3c24xx_dclk1.rate = 24*1000*1000;
263
264 s3c24xx_clkout0.parent = &s3c24xx_dclk0;
265 s3c24xx_clkout1.parent = &s3c24xx_dclk1;
266
267 s3c24xx_uclk.parent = &s3c24xx_clkout1;
268
269 s3c_device_nand.dev.platform_data = &osiris_nand_info;
270
271 s3c24xx_init_io(osiris_iodesc, ARRAY_SIZE(osiris_iodesc));
272 s3c24xx_init_clocks(0);
273 s3c24xx_init_uarts(osiris_uartcfgs, ARRAY_SIZE(osiris_uartcfgs));
274 s3c24xx_set_board(&osiris_board);
275
276 /* fix bus configuration (nBE settings wrong on ABLE pre v2.20) */
277
278 local_irq_save(flags);
279 __raw_writel(__raw_readl(S3C2410_BWSCON) | S3C2410_BWSCON_ST1 | S3C2410_BWSCON_ST2 | S3C2410_BWSCON_ST3 | S3C2410_BWSCON_ST4 | S3C2410_BWSCON_ST5, S3C2410_BWSCON);
280 local_irq_restore(flags);
281
282 /* write-protect line to the NAND */
283 s3c2410_gpio_setpin(S3C2410_GPA0, 1);
284}
285
286MACHINE_START(OSIRIS, "Simtec-OSIRIS")
287 /* Maintainer: Ben Dooks <ben@simtec.co.uk> */
288 .phys_io = S3C2410_PA_UART,
289 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
290 .boot_params = S3C2410_SDRAM_PA + 0x100,
291 .map_io = osiris_map_io,
292 .init_irq = s3c24xx_init_irq,
293 .timer = &s3c24xx_timer,
294MACHINE_END
diff --git a/arch/arm/mach-s3c2410/s3c2440-clock.c b/arch/arm/mach-s3c2410/s3c2440-clock.c
index b557a2be8a01..57a15974d4b5 100644
--- a/arch/arm/mach-s3c2410/s3c2440-clock.c
+++ b/arch/arm/mach-s3c2410/s3c2440-clock.c
@@ -31,6 +31,7 @@
31#include <linux/sysdev.h> 31#include <linux/sysdev.h>
32#include <linux/interrupt.h> 32#include <linux/interrupt.h>
33#include <linux/ioport.h> 33#include <linux/ioport.h>
34#include <linux/mutex.h>
34#include <linux/clk.h> 35#include <linux/clk.h>
35 36
36#include <asm/hardware.h> 37#include <asm/hardware.h>
@@ -45,10 +46,47 @@
45 46
46/* S3C2440 extended clock support */ 47/* S3C2440 extended clock support */
47 48
48static struct clk s3c2440_clk_upll = { 49static unsigned long s3c2440_camif_upll_round(struct clk *clk,
49 .name = "upll", 50 unsigned long rate)
50 .id = -1, 51{
51}; 52 unsigned long parent_rate = clk_get_rate(clk->parent);
53 int div;
54
55 if (rate > parent_rate)
56 return parent_rate;
57
58 /* note, we remove the +/- 1 calculations for the divisor */
59
60 div = (parent_rate / rate) / 2;
61
62 if (div < 1)
63 div = 1;
64 else if (div > 16)
65 div = 16;
66
67 return parent_rate / (div * 2);
68}
69
70static int s3c2440_camif_upll_setrate(struct clk *clk, unsigned long rate)
71{
72 unsigned long parent_rate = clk_get_rate(clk->parent);
73 unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
74
75 rate = s3c2440_camif_upll_round(clk, rate);
76
77 camdivn &= ~(S3C2440_CAMDIVN_CAMCLK_SEL | S3C2440_CAMDIVN_CAMCLK_MASK);
78
79 if (rate != parent_rate) {
80 camdivn |= S3C2440_CAMDIVN_CAMCLK_SEL;
81 camdivn |= (((parent_rate / rate) / 2) - 1);
82 }
83
84 __raw_writel(camdivn, S3C2440_CAMDIVN);
85
86 return 0;
87}
88
89/* Extra S3C2440 clocks */
52 90
53static struct clk s3c2440_clk_cam = { 91static struct clk s3c2440_clk_cam = {
54 .name = "camif", 92 .name = "camif",
@@ -57,6 +95,13 @@ static struct clk s3c2440_clk_cam = {
57 .ctrlbit = S3C2440_CLKCON_CAMERA, 95 .ctrlbit = S3C2440_CLKCON_CAMERA,
58}; 96};
59 97
98static struct clk s3c2440_clk_cam_upll = {
99 .name = "camif-upll",
100 .id = -1,
101 .set_rate = s3c2440_camif_upll_setrate,
102 .round_rate = s3c2440_camif_upll_round,
103};
104
60static struct clk s3c2440_clk_ac97 = { 105static struct clk s3c2440_clk_ac97 = {
61 .name = "ac97", 106 .name = "ac97",
62 .id = -1, 107 .id = -1,
@@ -66,38 +111,46 @@ static struct clk s3c2440_clk_ac97 = {
66 111
67static int s3c2440_clk_add(struct sys_device *sysdev) 112static int s3c2440_clk_add(struct sys_device *sysdev)
68{ 113{
69 unsigned long upllcon = __raw_readl(S3C2410_UPLLCON);
70 unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN); 114 unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
115 unsigned long clkdivn;
71 struct clk *clk_h; 116 struct clk *clk_h;
72 struct clk *clk_p; 117 struct clk *clk_p;
73 struct clk *clk_xtal; 118 struct clk *clk_upll;
74
75 clk_xtal = clk_get(NULL, "xtal");
76 if (IS_ERR(clk_xtal)) {
77 printk(KERN_ERR "S3C2440: Failed to get clk_xtal\n");
78 return -EINVAL;
79 }
80
81 s3c2440_clk_upll.rate = s3c2410_get_pll(upllcon, clk_xtal->rate);
82 119
83 printk("S3C2440: Clock Support, UPLL %ld.%03ld MHz, DVS %s\n", 120 printk("S3C2440: Clock Support, DVS %s\n",
84 print_mhz(s3c2440_clk_upll.rate),
85 (camdivn & S3C2440_CAMDIVN_DVSEN) ? "on" : "off"); 121 (camdivn & S3C2440_CAMDIVN_DVSEN) ? "on" : "off");
86 122
87 clk_p = clk_get(NULL, "pclk"); 123 clk_p = clk_get(NULL, "pclk");
88 clk_h = clk_get(NULL, "hclk"); 124 clk_h = clk_get(NULL, "hclk");
125 clk_upll = clk_get(NULL, "upll");
89 126
90 if (IS_ERR(clk_p) || IS_ERR(clk_h)) { 127 if (IS_ERR(clk_p) || IS_ERR(clk_h) || IS_ERR(clk_upll)) {
91 printk(KERN_ERR "S3C2440: Failed to get parent clocks\n"); 128 printk(KERN_ERR "S3C2440: Failed to get parent clocks\n");
92 return -EINVAL; 129 return -EINVAL;
93 } 130 }
94 131
132 /* check rate of UPLL, and if it is near 96MHz, then change
133 * to using half the UPLL rate for the system */
134
135 if (clk_get_rate(clk_upll) > (94 * MHZ)) {
136 clk_usb_bus.rate = clk_get_rate(clk_upll) / 2;
137
138 mutex_lock(&clocks_mutex);
139
140 clkdivn = __raw_readl(S3C2410_CLKDIVN);
141 clkdivn |= S3C2440_CLKDIVN_UCLK;
142 __raw_writel(camdivn, S3C2410_CLKDIVN);
143
144 mutex_unlock(&clocks_mutex);
145 }
146
95 s3c2440_clk_cam.parent = clk_h; 147 s3c2440_clk_cam.parent = clk_h;
96 s3c2440_clk_ac97.parent = clk_p; 148 s3c2440_clk_ac97.parent = clk_p;
149 s3c2440_clk_cam_upll.parent = clk_upll;
97 150
98 s3c24xx_register_clock(&s3c2440_clk_ac97); 151 s3c24xx_register_clock(&s3c2440_clk_ac97);
99 s3c24xx_register_clock(&s3c2440_clk_cam); 152 s3c24xx_register_clock(&s3c2440_clk_cam);
100 s3c24xx_register_clock(&s3c2440_clk_upll); 153 s3c24xx_register_clock(&s3c2440_clk_cam_upll);
101 154
102 clk_disable(&s3c2440_clk_ac97); 155 clk_disable(&s3c2440_clk_ac97);
103 clk_disable(&s3c2440_clk_cam); 156 clk_disable(&s3c2440_clk_cam);
diff --git a/arch/arm/mach-s3c2410/time.c b/arch/arm/mach-s3c2410/time.c
index 10a2976aefdd..9d7b799ea4a4 100644
--- a/arch/arm/mach-s3c2410/time.c
+++ b/arch/arm/mach-s3c2410/time.c
@@ -142,6 +142,12 @@ static struct irqaction s3c2410_timer_irq = {
142 .handler = s3c2410_timer_interrupt, 142 .handler = s3c2410_timer_interrupt,
143}; 143};
144 144
145#define use_tclk1_12() ( \
146 machine_is_bast() || \
147 machine_is_vr1000() || \
148 machine_is_anubis() || \
149 machine_is_osiris() )
150
145/* 151/*
146 * Set up timer interrupt, and return the current time in seconds. 152 * Set up timer interrupt, and return the current time in seconds.
147 * 153 *
@@ -165,7 +171,7 @@ static void s3c2410_timer_setup (void)
165 171
166 /* configure the system for whichever machine is in use */ 172 /* configure the system for whichever machine is in use */
167 173
168 if (machine_is_bast() || machine_is_vr1000() || machine_is_anubis()) { 174 if (use_tclk1_12()) {
169 /* timer is at 12MHz, scaler is 1 */ 175 /* timer is at 12MHz, scaler is 1 */
170 timer_usec_ticks = timer_mask_usec_ticks(1, 12000000); 176 timer_usec_ticks = timer_mask_usec_ticks(1, 12000000);
171 tcnt = 12000000 / HZ; 177 tcnt = 12000000 / HZ;
diff --git a/arch/arm/mach-sa1100/Makefile b/arch/arm/mach-sa1100/Makefile
index e4a4a3e8aa8f..e27f15042a22 100644
--- a/arch/arm/mach-sa1100/Makefile
+++ b/arch/arm/mach-sa1100/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5# Common support 5# Common support
6obj-y := generic.o irq.o dma.o time.o 6obj-y := clock.o generic.o irq.o dma.o time.o #nmi-oopser.o
7obj-m := 7obj-m :=
8obj-n := 8obj-n :=
9obj- := 9obj- :=
diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c
new file mode 100644
index 000000000000..b1e8fd766c1a
--- /dev/null
+++ b/arch/arm/mach-sa1100/clock.c
@@ -0,0 +1,132 @@
1/*
2 * linux/arch/arm/mach-sa1100/clock.c
3 */
4#include <linux/module.h>
5#include <linux/kernel.h>
6#include <linux/list.h>
7#include <linux/errno.h>
8#include <linux/err.h>
9#include <linux/string.h>
10#include <linux/clk.h>
11#include <linux/spinlock.h>
12
13#include <asm/hardware.h>
14#include <asm/semaphore.h>
15
16struct clk {
17 struct list_head node;
18 unsigned long rate;
19 struct module *owner;
20 const char *name;
21 unsigned int enabled;
22 void (*enable)(void);
23 void (*disable)(void);
24};
25
26static LIST_HEAD(clocks);
27static DECLARE_MUTEX(clocks_sem);
28static DEFINE_SPINLOCK(clocks_lock);
29
30struct clk *clk_get(struct device *dev, const char *id)
31{
32 struct clk *p, *clk = ERR_PTR(-ENOENT);
33
34 down(&clocks_sem);
35 list_for_each_entry(p, &clocks, node) {
36 if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
37 clk = p;
38 break;
39 }
40 }
41 up(&clocks_sem);
42
43 return clk;
44}
45EXPORT_SYMBOL(clk_get);
46
47void clk_put(struct clk *clk)
48{
49 module_put(clk->owner);
50}
51EXPORT_SYMBOL(clk_put);
52
53int clk_enable(struct clk *clk)
54{
55 unsigned long flags;
56
57 spin_lock_irqsave(&clocks_lock, flags);
58 if (clk->enabled++ == 0)
59 clk->enable();
60 spin_unlock_irqrestore(&clocks_lock, flags);
61 return 0;
62}
63EXPORT_SYMBOL(clk_enable);
64
65void clk_disable(struct clk *clk)
66{
67 unsigned long flags;
68
69 WARN_ON(clk->enabled == 0);
70
71 spin_lock_irqsave(&clocks_lock, flags);
72 if (--clk->enabled == 0)
73 clk->disable();
74 spin_unlock_irqrestore(&clocks_lock, flags);
75}
76EXPORT_SYMBOL(clk_disable);
77
78unsigned long clk_get_rate(struct clk *clk)
79{
80 return clk->rate;
81}
82EXPORT_SYMBOL(clk_get_rate);
83
84
85static void clk_gpio27_enable(void)
86{
87 /*
88 * First, set up the 3.6864MHz clock on GPIO 27 for the SA-1111:
89 * (SA-1110 Developer's Manual, section 9.1.2.1)
90 */
91 GAFR |= GPIO_32_768kHz;
92 GPDR |= GPIO_32_768kHz;
93 TUCR = TUCR_3_6864MHz;
94}
95
96static void clk_gpio27_disable(void)
97{
98 TUCR = 0;
99 GPDR &= ~GPIO_32_768kHz;
100 GAFR &= ~GPIO_32_768kHz;
101}
102
103static struct clk clk_gpio27 = {
104 .name = "GPIO27_CLK",
105 .rate = 3686400,
106 .enable = clk_gpio27_enable,
107 .disable = clk_gpio27_disable,
108};
109
110int clk_register(struct clk *clk)
111{
112 down(&clocks_sem);
113 list_add(&clk->node, &clocks);
114 up(&clocks_sem);
115 return 0;
116}
117EXPORT_SYMBOL(clk_register);
118
119void clk_unregister(struct clk *clk)
120{
121 down(&clocks_sem);
122 list_del(&clk->node);
123 up(&clocks_sem);
124}
125EXPORT_SYMBOL(clk_unregister);
126
127static int __init clk_init(void)
128{
129 clk_register(&clk_gpio27);
130 return 0;
131}
132arch_initcall(clk_init);
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 9ebbe808b41d..799697d32dec 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -112,7 +112,7 @@ void __init versatile_init_irq(void)
112{ 112{
113 unsigned int i; 113 unsigned int i;
114 114
115 vic_init(VA_VIC_BASE, ~(1 << 31)); 115 vic_init(VA_VIC_BASE, IRQ_VIC_START, ~(1 << 31));
116 116
117 set_irq_handler(IRQ_VICSOURCE31, sic_handle_irq); 117 set_irq_handler(IRQ_VICSOURCE31, sic_handle_irq);
118 enable_irq(IRQ_VICSOURCE31); 118 enable_irq(IRQ_VICSOURCE31);
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 3b79d0e23455..eaaec90db972 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -62,7 +62,7 @@ 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 || ARCH_AT91RM9200 65 depends on ARCH_EP93XX || ARCH_INTEGRATOR || ARCH_S3C2410 || ARCH_IMX || ARCH_AAEC2000 || ARCH_AT91RM9200
66 default y if ARCH_S3C2410 || ARCH_AT91RM9200 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
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index b0321e943b76..88279124317a 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -19,7 +19,6 @@
19#include <linux/initrd.h> 19#include <linux/initrd.h>
20 20
21#include <asm/mach-types.h> 21#include <asm/mach-types.h>
22#include <asm/hardware.h>
23#include <asm/setup.h> 22#include <asm/setup.h>
24#include <asm/tlb.h> 23#include <asm/tlb.h>
25 24
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index da9b35974118..25e0ca3e598c 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -26,7 +26,6 @@
26#include <linux/vmalloc.h> 26#include <linux/vmalloc.h>
27 27
28#include <asm/cacheflush.h> 28#include <asm/cacheflush.h>
29#include <asm/hardware.h>
30#include <asm/io.h> 29#include <asm/io.h>
31#include <asm/tlbflush.h> 30#include <asm/tlbflush.h>
32 31
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S
index 82ec954e45b6..3aa80094012c 100644
--- a/arch/arm/mm/proc-arm1020.S
+++ b/arch/arm/mm/proc-arm1020.S
@@ -32,7 +32,6 @@
32#include <asm/pgtable.h> 32#include <asm/pgtable.h>
33#include <asm/procinfo.h> 33#include <asm/procinfo.h>
34#include <asm/ptrace.h> 34#include <asm/ptrace.h>
35#include <asm/hardware.h>
36 35
37/* 36/*
38 * This is the maximum size of an area which will be invalidated 37 * This is the maximum size of an area which will be invalidated
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S
index 7375fe930f72..767d158f211a 100644
--- a/arch/arm/mm/proc-arm1020e.S
+++ b/arch/arm/mm/proc-arm1020e.S
@@ -32,7 +32,6 @@
32#include <asm/pgtable.h> 32#include <asm/pgtable.h>
33#include <asm/procinfo.h> 33#include <asm/procinfo.h>
34#include <asm/ptrace.h> 34#include <asm/ptrace.h>
35#include <asm/hardware.h>
36 35
37/* 36/*
38 * This is the maximum size of an area which will be invalidated 37 * This is the maximum size of an area which will be invalidated
diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S
index a13e0184d343..471286fdf78f 100644
--- a/arch/arm/mm/proc-arm720.S
+++ b/arch/arm/mm/proc-arm720.S
@@ -37,7 +37,6 @@
37#include <asm/pgtable.h> 37#include <asm/pgtable.h>
38#include <asm/procinfo.h> 38#include <asm/procinfo.h>
39#include <asm/ptrace.h> 39#include <asm/ptrace.h>
40#include <asm/hardware.h>
41 40
42/* 41/*
43 * Function: arm720_proc_init (void) 42 * Function: arm720_proc_init (void)
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S
index d16513899999..950d3b664c1e 100644
--- a/arch/arm/mm/proc-arm920.S
+++ b/arch/arm/mm/proc-arm920.S
@@ -30,7 +30,6 @@
30#include <asm/assembler.h> 30#include <asm/assembler.h>
31#include <asm/pgtable.h> 31#include <asm/pgtable.h>
32#include <asm/procinfo.h> 32#include <asm/procinfo.h>
33#include <asm/hardware.h>
34#include <asm/page.h> 33#include <asm/page.h>
35#include <asm/ptrace.h> 34#include <asm/ptrace.h>
36#include "proc-macros.S" 35#include "proc-macros.S"
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S
index 23b8ed97f4e3..410b032faa3b 100644
--- a/arch/arm/mm/proc-arm922.S
+++ b/arch/arm/mm/proc-arm922.S
@@ -31,7 +31,6 @@
31#include <asm/assembler.h> 31#include <asm/assembler.h>
32#include <asm/pgtable.h> 32#include <asm/pgtable.h>
33#include <asm/procinfo.h> 33#include <asm/procinfo.h>
34#include <asm/hardware.h>
35#include <asm/page.h> 34#include <asm/page.h>
36#include <asm/ptrace.h> 35#include <asm/ptrace.h>
37#include "proc-macros.S" 36#include "proc-macros.S"
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S
index ee95c52db513..6dd2be7cd050 100644
--- a/arch/arm/mm/proc-arm925.S
+++ b/arch/arm/mm/proc-arm925.S
@@ -53,7 +53,6 @@
53#include <asm/assembler.h> 53#include <asm/assembler.h>
54#include <asm/pgtable.h> 54#include <asm/pgtable.h>
55#include <asm/procinfo.h> 55#include <asm/procinfo.h>
56#include <asm/hardware.h>
57#include <asm/page.h> 56#include <asm/page.h>
58#include <asm/ptrace.h> 57#include <asm/ptrace.h>
59#include "proc-macros.S" 58#include "proc-macros.S"
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S
index 7d042dc20c47..022e86842041 100644
--- a/arch/arm/mm/proc-arm926.S
+++ b/arch/arm/mm/proc-arm926.S
@@ -30,7 +30,6 @@
30#include <asm/assembler.h> 30#include <asm/assembler.h>
31#include <asm/pgtable.h> 31#include <asm/pgtable.h>
32#include <asm/procinfo.h> 32#include <asm/procinfo.h>
33#include <asm/hardware.h>
34#include <asm/page.h> 33#include <asm/page.h>
35#include <asm/ptrace.h> 34#include <asm/ptrace.h>
36#include "proc-macros.S" 35#include "proc-macros.S"
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S
index 2d3823ec3153..b50f87a0ee76 100644
--- a/arch/arm/mm/proc-xscale.S
+++ b/arch/arm/mm/proc-xscale.S
@@ -24,7 +24,6 @@
24#include <linux/init.h> 24#include <linux/init.h>
25#include <asm/assembler.h> 25#include <asm/assembler.h>
26#include <asm/procinfo.h> 26#include <asm/procinfo.h>
27#include <asm/hardware.h>
28#include <asm/pgtable.h> 27#include <asm/pgtable.h>
29#include <asm/page.h> 28#include <asm/page.h>
30#include <asm/ptrace.h> 29#include <asm/ptrace.h>
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c
index 6f8bc1f0e6a1..6f833358cd06 100644
--- a/arch/arm/oprofile/common.c
+++ b/arch/arm/oprofile/common.c
@@ -10,17 +10,18 @@
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/oprofile.h> 11#include <linux/oprofile.h>
12#include <linux/errno.h> 12#include <linux/errno.h>
13#include <linux/slab.h>
13#include <linux/sysdev.h> 14#include <linux/sysdev.h>
14#include <asm/semaphore.h> 15#include <linux/mutex.h>
15 16
16#include "op_counter.h" 17#include "op_counter.h"
17#include "op_arm_model.h" 18#include "op_arm_model.h"
18 19
19static struct op_arm_model_spec *op_arm_model; 20static struct op_arm_model_spec *op_arm_model;
20static int op_arm_enabled; 21static int op_arm_enabled;
21static struct semaphore op_arm_sem; 22static DEFINE_MUTEX(op_arm_mutex);
22 23
23struct op_counter_config counter_config[OP_MAX_COUNTER]; 24struct op_counter_config *counter_config;
24 25
25static int op_arm_create_files(struct super_block *sb, struct dentry *root) 26static int op_arm_create_files(struct super_block *sb, struct dentry *root)
26{ 27{
@@ -28,7 +29,7 @@ static int op_arm_create_files(struct super_block *sb, struct dentry *root)
28 29
29 for (i = 0; i < op_arm_model->num_counters; i++) { 30 for (i = 0; i < op_arm_model->num_counters; i++) {
30 struct dentry *dir; 31 struct dentry *dir;
31 char buf[2]; 32 char buf[4];
32 33
33 snprintf(buf, sizeof buf, "%d", i); 34 snprintf(buf, sizeof buf, "%d", i);
34 dir = oprofilefs_mkdir(sb, root, buf); 35 dir = oprofilefs_mkdir(sb, root, buf);
@@ -57,40 +58,40 @@ static int op_arm_start(void)
57{ 58{
58 int ret = -EBUSY; 59 int ret = -EBUSY;
59 60
60 down(&op_arm_sem); 61 mutex_lock(&op_arm_mutex);
61 if (!op_arm_enabled) { 62 if (!op_arm_enabled) {
62 ret = op_arm_model->start(); 63 ret = op_arm_model->start();
63 op_arm_enabled = !ret; 64 op_arm_enabled = !ret;
64 } 65 }
65 up(&op_arm_sem); 66 mutex_unlock(&op_arm_mutex);
66 return ret; 67 return ret;
67} 68}
68 69
69static void op_arm_stop(void) 70static void op_arm_stop(void)
70{ 71{
71 down(&op_arm_sem); 72 mutex_lock(&op_arm_mutex);
72 if (op_arm_enabled) 73 if (op_arm_enabled)
73 op_arm_model->stop(); 74 op_arm_model->stop();
74 op_arm_enabled = 0; 75 op_arm_enabled = 0;
75 up(&op_arm_sem); 76 mutex_unlock(&op_arm_mutex);
76} 77}
77 78
78#ifdef CONFIG_PM 79#ifdef CONFIG_PM
79static int op_arm_suspend(struct sys_device *dev, pm_message_t state) 80static int op_arm_suspend(struct sys_device *dev, pm_message_t state)
80{ 81{
81 down(&op_arm_sem); 82 mutex_lock(&op_arm_mutex);
82 if (op_arm_enabled) 83 if (op_arm_enabled)
83 op_arm_model->stop(); 84 op_arm_model->stop();
84 up(&op_arm_sem); 85 mutex_unlock(&op_arm_mutex);
85 return 0; 86 return 0;
86} 87}
87 88
88static int op_arm_resume(struct sys_device *dev) 89static int op_arm_resume(struct sys_device *dev)
89{ 90{
90 down(&op_arm_sem); 91 mutex_lock(&op_arm_mutex);
91 if (op_arm_enabled && op_arm_model->start()) 92 if (op_arm_enabled && op_arm_model->start())
92 op_arm_enabled = 0; 93 op_arm_enabled = 0;
93 up(&op_arm_sem); 94 mutex_unlock(&op_arm_mutex);
94 return 0; 95 return 0;
95} 96}
96 97
@@ -135,12 +136,15 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
135#endif 136#endif
136 137
137 if (spec) { 138 if (spec) {
138 init_MUTEX(&op_arm_sem);
139
140 ret = spec->init(); 139 ret = spec->init();
141 if (ret < 0) 140 if (ret < 0)
142 return ret; 141 return ret;
143 142
143 counter_config = kcalloc(spec->num_counters, sizeof(struct op_counter_config),
144 GFP_KERNEL);
145 if (!counter_config)
146 return -ENOMEM;
147
144 op_arm_model = spec; 148 op_arm_model = spec;
145 init_driverfs(); 149 init_driverfs();
146 ops->create_files = op_arm_create_files; 150 ops->create_files = op_arm_create_files;
@@ -162,5 +166,5 @@ void oprofile_arch_exit(void)
162 exit_driverfs(); 166 exit_driverfs();
163 op_arm_model = NULL; 167 op_arm_model = NULL;
164 } 168 }
169 kfree(counter_config);
165} 170}
166
diff --git a/arch/arm/oprofile/op_counter.h b/arch/arm/oprofile/op_counter.h
index 153c1d467f24..8c5351d751cf 100644
--- a/arch/arm/oprofile/op_counter.h
+++ b/arch/arm/oprofile/op_counter.h
@@ -24,6 +24,6 @@ struct op_counter_config {
24 unsigned long user; 24 unsigned long user;
25}; 25};
26 26
27extern struct op_counter_config counter_config[]; 27extern struct op_counter_config *counter_config;
28 28
29#endif /* OP_COUNTER_H */ 29#endif /* OP_COUNTER_H */
diff --git a/arch/arm/vfp/entry.S b/arch/arm/vfp/entry.S
index 6f17187ab32a..9ab1abfbe7ad 100644
--- a/arch/arm/vfp/entry.S
+++ b/arch/arm/vfp/entry.S
@@ -22,6 +22,7 @@
22 22
23 .globl do_vfp 23 .globl do_vfp
24do_vfp: 24do_vfp:
25 enable_irq
25 ldr r4, .LCvfp 26 ldr r4, .LCvfp
26 add r10, r10, #TI_VFPSTATE @ r10 = workspace 27 add r10, r10, #TI_VFPSTATE @ r10 = workspace
27 ldr pc, [r4] @ call VFP entry point 28 ldr pc, [r4] @ call VFP entry point
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 00e72b12fb92..b90468aea077 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -58,8 +58,8 @@ obj-$(CONFIG_STNIC) += stnic.o 8390.o
58obj-$(CONFIG_FEALNX) += fealnx.o 58obj-$(CONFIG_FEALNX) += fealnx.o
59obj-$(CONFIG_TIGON3) += tg3.o 59obj-$(CONFIG_TIGON3) += tg3.o
60obj-$(CONFIG_BNX2) += bnx2.o 60obj-$(CONFIG_BNX2) += bnx2.o
61spidernet-y += spider_net.o spider_net_ethtool.o sungem_phy.o 61spidernet-y += spider_net.o spider_net_ethtool.o
62obj-$(CONFIG_SPIDER_NET) += spidernet.o 62obj-$(CONFIG_SPIDER_NET) += spidernet.o sungem_phy.o
63obj-$(CONFIG_TC35815) += tc35815.o 63obj-$(CONFIG_TC35815) += tc35815.o
64obj-$(CONFIG_SKGE) += skge.o 64obj-$(CONFIG_SKGE) += skge.o
65obj-$(CONFIG_SKY2) += sky2.o 65obj-$(CONFIG_SKY2) += sky2.o
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
index cd0b1dccfb61..1363083b4d83 100644
--- a/drivers/net/au1000_eth.c
+++ b/drivers/net/au1000_eth.c
@@ -90,8 +90,6 @@ static void au1000_tx_timeout(struct net_device *);
90static int au1000_set_config(struct net_device *dev, struct ifmap *map); 90static int au1000_set_config(struct net_device *dev, struct ifmap *map);
91static void set_rx_mode(struct net_device *); 91static void set_rx_mode(struct net_device *);
92static struct net_device_stats *au1000_get_stats(struct net_device *); 92static struct net_device_stats *au1000_get_stats(struct net_device *);
93static inline void update_tx_stats(struct net_device *, u32, u32);
94static inline void update_rx_stats(struct net_device *, u32);
95static void au1000_timer(unsigned long); 93static void au1000_timer(unsigned long);
96static int au1000_ioctl(struct net_device *, struct ifreq *, int); 94static int au1000_ioctl(struct net_device *, struct ifreq *, int);
97static int mdio_read(struct net_device *, int, int); 95static int mdio_read(struct net_device *, int, int);
@@ -1825,16 +1823,11 @@ static void __exit au1000_cleanup_module(void)
1825 } 1823 }
1826} 1824}
1827 1825
1828 1826static void update_tx_stats(struct net_device *dev, u32 status)
1829static inline void
1830update_tx_stats(struct net_device *dev, u32 status, u32 pkt_len)
1831{ 1827{
1832 struct au1000_private *aup = (struct au1000_private *) dev->priv; 1828 struct au1000_private *aup = (struct au1000_private *) dev->priv;
1833 struct net_device_stats *ps = &aup->stats; 1829 struct net_device_stats *ps = &aup->stats;
1834 1830
1835 ps->tx_packets++;
1836 ps->tx_bytes += pkt_len;
1837
1838 if (status & TX_FRAME_ABORTED) { 1831 if (status & TX_FRAME_ABORTED) {
1839 if (dev->if_port == IF_PORT_100BASEFX) { 1832 if (dev->if_port == IF_PORT_100BASEFX) {
1840 if (status & (TX_JAB_TIMEOUT | TX_UNDERRUN)) { 1833 if (status & (TX_JAB_TIMEOUT | TX_UNDERRUN)) {
@@ -1867,7 +1860,7 @@ static void au1000_tx_ack(struct net_device *dev)
1867 ptxd = aup->tx_dma_ring[aup->tx_tail]; 1860 ptxd = aup->tx_dma_ring[aup->tx_tail];
1868 1861
1869 while (ptxd->buff_stat & TX_T_DONE) { 1862 while (ptxd->buff_stat & TX_T_DONE) {
1870 update_tx_stats(dev, ptxd->status, ptxd->len & 0x3ff); 1863 update_tx_stats(dev, ptxd->status);
1871 ptxd->buff_stat &= ~TX_T_DONE; 1864 ptxd->buff_stat &= ~TX_T_DONE;
1872 ptxd->len = 0; 1865 ptxd->len = 0;
1873 au_sync(); 1866 au_sync();
@@ -1889,6 +1882,7 @@ static void au1000_tx_ack(struct net_device *dev)
1889static int au1000_tx(struct sk_buff *skb, struct net_device *dev) 1882static int au1000_tx(struct sk_buff *skb, struct net_device *dev)
1890{ 1883{
1891 struct au1000_private *aup = (struct au1000_private *) dev->priv; 1884 struct au1000_private *aup = (struct au1000_private *) dev->priv;
1885 struct net_device_stats *ps = &aup->stats;
1892 volatile tx_dma_t *ptxd; 1886 volatile tx_dma_t *ptxd;
1893 u32 buff_stat; 1887 u32 buff_stat;
1894 db_dest_t *pDB; 1888 db_dest_t *pDB;
@@ -1908,7 +1902,7 @@ static int au1000_tx(struct sk_buff *skb, struct net_device *dev)
1908 return 1; 1902 return 1;
1909 } 1903 }
1910 else if (buff_stat & TX_T_DONE) { 1904 else if (buff_stat & TX_T_DONE) {
1911 update_tx_stats(dev, ptxd->status, ptxd->len & 0x3ff); 1905 update_tx_stats(dev, ptxd->status);
1912 ptxd->len = 0; 1906 ptxd->len = 0;
1913 } 1907 }
1914 1908
@@ -1928,6 +1922,9 @@ static int au1000_tx(struct sk_buff *skb, struct net_device *dev)
1928 else 1922 else
1929 ptxd->len = skb->len; 1923 ptxd->len = skb->len;
1930 1924
1925 ps->tx_packets++;
1926 ps->tx_bytes += ptxd->len;
1927
1931 ptxd->buff_stat = pDB->dma_addr | TX_DMA_ENABLE; 1928 ptxd->buff_stat = pDB->dma_addr | TX_DMA_ENABLE;
1932 au_sync(); 1929 au_sync();
1933 dev_kfree_skb(skb); 1930 dev_kfree_skb(skb);
@@ -1936,7 +1933,6 @@ static int au1000_tx(struct sk_buff *skb, struct net_device *dev)
1936 return 0; 1933 return 0;
1937} 1934}
1938 1935
1939
1940static inline void update_rx_stats(struct net_device *dev, u32 status) 1936static inline void update_rx_stats(struct net_device *dev, u32 status)
1941{ 1937{
1942 struct au1000_private *aup = (struct au1000_private *) dev->priv; 1938 struct au1000_private *aup = (struct au1000_private *) dev->priv;
diff --git a/drivers/net/depca.c b/drivers/net/depca.c
index 03804cc38be0..0941d40f046f 100644
--- a/drivers/net/depca.c
+++ b/drivers/net/depca.c
@@ -1412,7 +1412,7 @@ static int __init depca_mca_probe(struct device *device)
1412 irq = 11; 1412 irq = 11;
1413 break; 1413 break;
1414 default: 1414 default:
1415 printk("%s: mca_probe IRQ error. You should never get here (%d).\n", dev->name, where); 1415 printk("%s: mca_probe IRQ error. You should never get here (%d).\n", mdev->name, where);
1416 return -EINVAL; 1416 return -EINVAL;
1417 } 1417 }
1418 1418
diff --git a/drivers/net/ixp2000/enp2611.c b/drivers/net/ixp2000/enp2611.c
index d82651a97bae..6f7dce8eba51 100644
--- a/drivers/net/ixp2000/enp2611.c
+++ b/drivers/net/ixp2000/enp2611.c
@@ -16,7 +16,7 @@
16#include <linux/etherdevice.h> 16#include <linux/etherdevice.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/moduleparam.h> 18#include <linux/moduleparam.h>
19#include <asm/arch/uengine.h> 19#include <asm/hardware/uengine.h>
20#include <asm/mach-types.h> 20#include <asm/mach-types.h>
21#include <asm/io.h> 21#include <asm/io.h>
22#include "ixpdev.h" 22#include "ixpdev.h"
diff --git a/drivers/net/ixp2000/ixpdev.c b/drivers/net/ixp2000/ixpdev.c
index 09f03f493bea..77f104a005f3 100644
--- a/drivers/net/ixp2000/ixpdev.c
+++ b/drivers/net/ixp2000/ixpdev.c
@@ -16,7 +16,7 @@
16#include <linux/etherdevice.h> 16#include <linux/etherdevice.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/moduleparam.h> 18#include <linux/moduleparam.h>
19#include <asm/arch/uengine.h> 19#include <asm/hardware/uengine.h>
20#include <asm/mach-types.h> 20#include <asm/mach-types.h>
21#include <asm/io.h> 21#include <asm/io.h>
22#include "ixp2400_rx.ucode" 22#include "ixp2400_rx.ucode"
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
index a1cb07cdb60f..253440a98022 100644
--- a/drivers/net/sis900.c
+++ b/drivers/net/sis900.c
@@ -128,6 +128,7 @@ static const struct mii_chip_info {
128 { "SiS 900 Internal MII PHY", 0x001d, 0x8000, LAN }, 128 { "SiS 900 Internal MII PHY", 0x001d, 0x8000, LAN },
129 { "SiS 7014 Physical Layer Solution", 0x0016, 0xf830, LAN }, 129 { "SiS 7014 Physical Layer Solution", 0x0016, 0xf830, LAN },
130 { "Altimata AC101LF PHY", 0x0022, 0x5520, LAN }, 130 { "Altimata AC101LF PHY", 0x0022, 0x5520, LAN },
131 { "ADM 7001 LAN PHY", 0x002e, 0xcc60, LAN },
131 { "AMD 79C901 10BASE-T PHY", 0x0000, 0x6B70, LAN }, 132 { "AMD 79C901 10BASE-T PHY", 0x0000, 0x6B70, LAN },
132 { "AMD 79C901 HomePNA PHY", 0x0000, 0x6B90, HOME}, 133 { "AMD 79C901 HomePNA PHY", 0x0000, 0x6B90, HOME},
133 { "ICS LAN PHY", 0x0015, 0xF440, LAN }, 134 { "ICS LAN PHY", 0x0015, 0xF440, LAN },
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index f08fe6c884b2..36db93811ac7 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2478,17 +2478,34 @@ static const struct sky2_stat {
2478 { "rx_unicast", GM_RXF_UC_OK }, 2478 { "rx_unicast", GM_RXF_UC_OK },
2479 { "tx_mac_pause", GM_TXF_MPAUSE }, 2479 { "tx_mac_pause", GM_TXF_MPAUSE },
2480 { "rx_mac_pause", GM_RXF_MPAUSE }, 2480 { "rx_mac_pause", GM_RXF_MPAUSE },
2481 { "collisions", GM_TXF_SNG_COL }, 2481 { "collisions", GM_TXF_COL },
2482 { "late_collision",GM_TXF_LAT_COL }, 2482 { "late_collision",GM_TXF_LAT_COL },
2483 { "aborted", GM_TXF_ABO_COL }, 2483 { "aborted", GM_TXF_ABO_COL },
2484 { "single_collisions", GM_TXF_SNG_COL },
2484 { "multi_collisions", GM_TXF_MUL_COL }, 2485 { "multi_collisions", GM_TXF_MUL_COL },
2485 { "fifo_underrun", GM_TXE_FIFO_UR }, 2486
2486 { "fifo_overflow", GM_RXE_FIFO_OV }, 2487 { "rx_short", GM_RXE_SHT },
2487 { "rx_toolong", GM_RXF_LNG_ERR },
2488 { "rx_jabber", GM_RXF_JAB_PKT },
2489 { "rx_runt", GM_RXE_FRAG }, 2488 { "rx_runt", GM_RXE_FRAG },
2489 { "rx_64_byte_packets", GM_RXF_64B },
2490 { "rx_65_to_127_byte_packets", GM_RXF_127B },
2491 { "rx_128_to_255_byte_packets", GM_RXF_255B },
2492 { "rx_256_to_511_byte_packets", GM_RXF_511B },
2493 { "rx_512_to_1023_byte_packets", GM_RXF_1023B },
2494 { "rx_1024_to_1518_byte_packets", GM_RXF_1518B },
2495 { "rx_1518_to_max_byte_packets", GM_RXF_MAX_SZ },
2490 { "rx_too_long", GM_RXF_LNG_ERR }, 2496 { "rx_too_long", GM_RXF_LNG_ERR },
2497 { "rx_fifo_overflow", GM_RXE_FIFO_OV },
2498 { "rx_jabber", GM_RXF_JAB_PKT },
2491 { "rx_fcs_error", GM_RXF_FCS_ERR }, 2499 { "rx_fcs_error", GM_RXF_FCS_ERR },
2500
2501 { "tx_64_byte_packets", GM_TXF_64B },
2502 { "tx_65_to_127_byte_packets", GM_TXF_127B },
2503 { "tx_128_to_255_byte_packets", GM_TXF_255B },
2504 { "tx_256_to_511_byte_packets", GM_TXF_511B },
2505 { "tx_512_to_1023_byte_packets", GM_TXF_1023B },
2506 { "tx_1024_to_1518_byte_packets", GM_TXF_1518B },
2507 { "tx_1519_to_max_byte_packets", GM_TXF_MAX_SZ },
2508 { "tx_fifo_underrun", GM_TXE_FIFO_UR },
2492}; 2509};
2493 2510
2494static u32 sky2_get_rx_csum(struct net_device *dev) 2511static u32 sky2_get_rx_csum(struct net_device *dev)
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
index d63cd5a1b71c..2838f661b393 100644
--- a/drivers/net/sky2.h
+++ b/drivers/net/sky2.h
@@ -1373,23 +1373,23 @@ enum {
1373 GM_SMI_CTRL = 0x0080, /* 16 bit r/w SMI Control Register */ 1373 GM_SMI_CTRL = 0x0080, /* 16 bit r/w SMI Control Register */
1374 GM_SMI_DATA = 0x0084, /* 16 bit r/w SMI Data Register */ 1374 GM_SMI_DATA = 0x0084, /* 16 bit r/w SMI Data Register */
1375 GM_PHY_ADDR = 0x0088, /* 16 bit r/w GPHY Address Register */ 1375 GM_PHY_ADDR = 0x0088, /* 16 bit r/w GPHY Address Register */
1376/* MIB Counters */
1377 GM_MIB_CNT_BASE = 0x0100, /* Base Address of MIB Counters */
1378 GM_MIB_CNT_SIZE = 256,
1376}; 1379};
1377 1380
1378/* MIB Counters */
1379#define GM_MIB_CNT_BASE 0x0100 /* Base Address of MIB Counters */
1380#define GM_MIB_CNT_SIZE 44 /* Number of MIB Counters */
1381 1381
1382/* 1382/*
1383 * MIB Counters base address definitions (low word) - 1383 * MIB Counters base address definitions (low word) -
1384 * use offset 4 for access to high word (32 bit r/o) 1384 * use offset 4 for access to high word (32 bit r/o)
1385 */ 1385 */
1386enum { 1386enum {
1387 GM_RXF_UC_OK = GM_MIB_CNT_BASE + 0, /* Unicast Frames Received OK */ 1387 GM_RXF_UC_OK = GM_MIB_CNT_BASE + 0, /* Unicast Frames Received OK */
1388 GM_RXF_BC_OK = GM_MIB_CNT_BASE + 8, /* Broadcast Frames Received OK */ 1388 GM_RXF_BC_OK = GM_MIB_CNT_BASE + 8, /* Broadcast Frames Received OK */
1389 GM_RXF_MPAUSE = GM_MIB_CNT_BASE + 16, /* Pause MAC Ctrl Frames Received */ 1389 GM_RXF_MPAUSE = GM_MIB_CNT_BASE + 16, /* Pause MAC Ctrl Frames Received */
1390 GM_RXF_MC_OK = GM_MIB_CNT_BASE + 24, /* Multicast Frames Received OK */ 1390 GM_RXF_MC_OK = GM_MIB_CNT_BASE + 24, /* Multicast Frames Received OK */
1391 GM_RXF_FCS_ERR = GM_MIB_CNT_BASE + 32, /* Rx Frame Check Seq. Error */ 1391 GM_RXF_FCS_ERR = GM_MIB_CNT_BASE + 32, /* Rx Frame Check Seq. Error */
1392 /* GM_MIB_CNT_BASE + 40: reserved */ 1392
1393 GM_RXO_OK_LO = GM_MIB_CNT_BASE + 48, /* Octets Received OK Low */ 1393 GM_RXO_OK_LO = GM_MIB_CNT_BASE + 48, /* Octets Received OK Low */
1394 GM_RXO_OK_HI = GM_MIB_CNT_BASE + 56, /* Octets Received OK High */ 1394 GM_RXO_OK_HI = GM_MIB_CNT_BASE + 56, /* Octets Received OK High */
1395 GM_RXO_ERR_LO = GM_MIB_CNT_BASE + 64, /* Octets Received Invalid Low */ 1395 GM_RXO_ERR_LO = GM_MIB_CNT_BASE + 64, /* Octets Received Invalid Low */
@@ -1397,37 +1397,36 @@ enum {
1397 GM_RXF_SHT = GM_MIB_CNT_BASE + 80, /* Frames <64 Byte Received OK */ 1397 GM_RXF_SHT = GM_MIB_CNT_BASE + 80, /* Frames <64 Byte Received OK */
1398 GM_RXE_FRAG = GM_MIB_CNT_BASE + 88, /* Frames <64 Byte Received with FCS Err */ 1398 GM_RXE_FRAG = GM_MIB_CNT_BASE + 88, /* Frames <64 Byte Received with FCS Err */
1399 GM_RXF_64B = GM_MIB_CNT_BASE + 96, /* 64 Byte Rx Frame */ 1399 GM_RXF_64B = GM_MIB_CNT_BASE + 96, /* 64 Byte Rx Frame */
1400 GM_RXF_127B = GM_MIB_CNT_BASE + 104, /* 65-127 Byte Rx Frame */ 1400 GM_RXF_127B = GM_MIB_CNT_BASE + 104,/* 65-127 Byte Rx Frame */
1401 GM_RXF_255B = GM_MIB_CNT_BASE + 112, /* 128-255 Byte Rx Frame */ 1401 GM_RXF_255B = GM_MIB_CNT_BASE + 112,/* 128-255 Byte Rx Frame */
1402 GM_RXF_511B = GM_MIB_CNT_BASE + 120, /* 256-511 Byte Rx Frame */ 1402 GM_RXF_511B = GM_MIB_CNT_BASE + 120,/* 256-511 Byte Rx Frame */
1403 GM_RXF_1023B = GM_MIB_CNT_BASE + 128, /* 512-1023 Byte Rx Frame */ 1403 GM_RXF_1023B = GM_MIB_CNT_BASE + 128,/* 512-1023 Byte Rx Frame */
1404 GM_RXF_1518B = GM_MIB_CNT_BASE + 136, /* 1024-1518 Byte Rx Frame */ 1404 GM_RXF_1518B = GM_MIB_CNT_BASE + 136,/* 1024-1518 Byte Rx Frame */
1405 GM_RXF_MAX_SZ = GM_MIB_CNT_BASE + 144, /* 1519-MaxSize Byte Rx Frame */ 1405 GM_RXF_MAX_SZ = GM_MIB_CNT_BASE + 144,/* 1519-MaxSize Byte Rx Frame */
1406 GM_RXF_LNG_ERR = GM_MIB_CNT_BASE + 152, /* Rx Frame too Long Error */ 1406 GM_RXF_LNG_ERR = GM_MIB_CNT_BASE + 152,/* Rx Frame too Long Error */
1407 GM_RXF_JAB_PKT = GM_MIB_CNT_BASE + 160, /* Rx Jabber Packet Frame */ 1407 GM_RXF_JAB_PKT = GM_MIB_CNT_BASE + 160,/* Rx Jabber Packet Frame */
1408 /* GM_MIB_CNT_BASE + 168: reserved */ 1408
1409 GM_RXE_FIFO_OV = GM_MIB_CNT_BASE + 176, /* Rx FIFO overflow Event */ 1409 GM_RXE_FIFO_OV = GM_MIB_CNT_BASE + 176,/* Rx FIFO overflow Event */
1410 /* GM_MIB_CNT_BASE + 184: reserved */ 1410 GM_TXF_UC_OK = GM_MIB_CNT_BASE + 192,/* Unicast Frames Xmitted OK */
1411 GM_TXF_UC_OK = GM_MIB_CNT_BASE + 192, /* Unicast Frames Xmitted OK */ 1411 GM_TXF_BC_OK = GM_MIB_CNT_BASE + 200,/* Broadcast Frames Xmitted OK */
1412 GM_TXF_BC_OK = GM_MIB_CNT_BASE + 200, /* Broadcast Frames Xmitted OK */ 1412 GM_TXF_MPAUSE = GM_MIB_CNT_BASE + 208,/* Pause MAC Ctrl Frames Xmitted */
1413 GM_TXF_MPAUSE = GM_MIB_CNT_BASE + 208, /* Pause MAC Ctrl Frames Xmitted */ 1413 GM_TXF_MC_OK = GM_MIB_CNT_BASE + 216,/* Multicast Frames Xmitted OK */
1414 GM_TXF_MC_OK = GM_MIB_CNT_BASE + 216, /* Multicast Frames Xmitted OK */ 1414 GM_TXO_OK_LO = GM_MIB_CNT_BASE + 224,/* Octets Transmitted OK Low */
1415 GM_TXO_OK_LO = GM_MIB_CNT_BASE + 224, /* Octets Transmitted OK Low */ 1415 GM_TXO_OK_HI = GM_MIB_CNT_BASE + 232,/* Octets Transmitted OK High */
1416 GM_TXO_OK_HI = GM_MIB_CNT_BASE + 232, /* Octets Transmitted OK High */ 1416 GM_TXF_64B = GM_MIB_CNT_BASE + 240,/* 64 Byte Tx Frame */
1417 GM_TXF_64B = GM_MIB_CNT_BASE + 240, /* 64 Byte Tx Frame */ 1417 GM_TXF_127B = GM_MIB_CNT_BASE + 248,/* 65-127 Byte Tx Frame */
1418 GM_TXF_127B = GM_MIB_CNT_BASE + 248, /* 65-127 Byte Tx Frame */ 1418 GM_TXF_255B = GM_MIB_CNT_BASE + 256,/* 128-255 Byte Tx Frame */
1419 GM_TXF_255B = GM_MIB_CNT_BASE + 256, /* 128-255 Byte Tx Frame */ 1419 GM_TXF_511B = GM_MIB_CNT_BASE + 264,/* 256-511 Byte Tx Frame */
1420 GM_TXF_511B = GM_MIB_CNT_BASE + 264, /* 256-511 Byte Tx Frame */ 1420 GM_TXF_1023B = GM_MIB_CNT_BASE + 272,/* 512-1023 Byte Tx Frame */
1421 GM_TXF_1023B = GM_MIB_CNT_BASE + 272, /* 512-1023 Byte Tx Frame */ 1421 GM_TXF_1518B = GM_MIB_CNT_BASE + 280,/* 1024-1518 Byte Tx Frame */
1422 GM_TXF_1518B = GM_MIB_CNT_BASE + 280, /* 1024-1518 Byte Tx Frame */ 1422 GM_TXF_MAX_SZ = GM_MIB_CNT_BASE + 288,/* 1519-MaxSize Byte Tx Frame */
1423 GM_TXF_MAX_SZ = GM_MIB_CNT_BASE + 288, /* 1519-MaxSize Byte Tx Frame */ 1423
1424 1424 GM_TXF_COL = GM_MIB_CNT_BASE + 304,/* Tx Collision */
1425 GM_TXF_COL = GM_MIB_CNT_BASE + 304, /* Tx Collision */ 1425 GM_TXF_LAT_COL = GM_MIB_CNT_BASE + 312,/* Tx Late Collision */
1426 GM_TXF_LAT_COL = GM_MIB_CNT_BASE + 312, /* Tx Late Collision */ 1426 GM_TXF_ABO_COL = GM_MIB_CNT_BASE + 320,/* Tx aborted due to Exces. Col. */
1427 GM_TXF_ABO_COL = GM_MIB_CNT_BASE + 320, /* Tx aborted due to Exces. Col. */ 1427 GM_TXF_MUL_COL = GM_MIB_CNT_BASE + 328,/* Tx Multiple Collision */
1428 GM_TXF_MUL_COL = GM_MIB_CNT_BASE + 328, /* Tx Multiple Collision */ 1428 GM_TXF_SNG_COL = GM_MIB_CNT_BASE + 336,/* Tx Single Collision */
1429 GM_TXF_SNG_COL = GM_MIB_CNT_BASE + 336, /* Tx Single Collision */ 1429 GM_TXE_FIFO_UR = GM_MIB_CNT_BASE + 344,/* Tx FIFO Underrun Event */
1430 GM_TXE_FIFO_UR = GM_MIB_CNT_BASE + 344, /* Tx FIFO Underrun Event */
1431}; 1430};
1432 1431
1433/* GMAC Bit Definitions */ 1432/* GMAC Bit Definitions */
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index 6299e186c73f..e3dd144d326b 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -1327,11 +1327,11 @@ static void de_clean_rings (struct de_private *de)
1327 struct sk_buff *skb = de->tx_skb[i].skb; 1327 struct sk_buff *skb = de->tx_skb[i].skb;
1328 if ((skb) && (skb != DE_DUMMY_SKB)) { 1328 if ((skb) && (skb != DE_DUMMY_SKB)) {
1329 if (skb != DE_SETUP_SKB) { 1329 if (skb != DE_SETUP_SKB) {
1330 dev_kfree_skb(skb);
1331 de->net_stats.tx_dropped++; 1330 de->net_stats.tx_dropped++;
1332 pci_unmap_single(de->pdev, 1331 pci_unmap_single(de->pdev,
1333 de->tx_skb[i].mapping, 1332 de->tx_skb[i].mapping,
1334 skb->len, PCI_DMA_TODEVICE); 1333 skb->len, PCI_DMA_TODEVICE);
1334 dev_kfree_skb(skb);
1335 } else { 1335 } else {
1336 pci_unmap_single(de->pdev, 1336 pci_unmap_single(de->pdev,
1337 de->tx_skb[i].mapping, 1337 de->tx_skb[i].mapping,
diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c
index 10845253c9e0..d121644646b9 100644
--- a/drivers/parport/parport_serial.c
+++ b/drivers/parport/parport_serial.c
@@ -31,14 +31,8 @@ enum parport_pc_pci_cards {
31 netmos_9xx5_combo, 31 netmos_9xx5_combo,
32 netmos_9855, 32 netmos_9855,
33 avlab_1s1p, 33 avlab_1s1p,
34 avlab_1s1p_650,
35 avlab_1s1p_850,
36 avlab_1s2p, 34 avlab_1s2p,
37 avlab_1s2p_650,
38 avlab_1s2p_850,
39 avlab_2s1p, 35 avlab_2s1p,
40 avlab_2s1p_650,
41 avlab_2s1p_850,
42 siig_1s1p_10x, 36 siig_1s1p_10x,
43 siig_2s1p_10x, 37 siig_2s1p_10x,
44 siig_2p1s_20x, 38 siig_2p1s_20x,
@@ -85,14 +79,8 @@ static struct parport_pc_pci cards[] __devinitdata = {
85 /* netmos_9xx5_combo */ { 1, { { 2, -1 }, }, netmos_parallel_init }, 79 /* netmos_9xx5_combo */ { 1, { { 2, -1 }, }, netmos_parallel_init },
86 /* netmos_9855 */ { 1, { { 0, -1 }, }, netmos_parallel_init }, 80 /* netmos_9855 */ { 1, { { 0, -1 }, }, netmos_parallel_init },
87 /* avlab_1s1p */ { 1, { { 1, 2}, } }, 81 /* avlab_1s1p */ { 1, { { 1, 2}, } },
88 /* avlab_1s1p_650 */ { 1, { { 1, 2}, } },
89 /* avlab_1s1p_850 */ { 1, { { 1, 2}, } },
90 /* avlab_1s2p */ { 2, { { 1, 2}, { 3, 4 },} }, 82 /* avlab_1s2p */ { 2, { { 1, 2}, { 3, 4 },} },
91 /* avlab_1s2p_650 */ { 2, { { 1, 2}, { 3, 4 },} },
92 /* avlab_1s2p_850 */ { 2, { { 1, 2}, { 3, 4 },} },
93 /* avlab_2s1p */ { 1, { { 2, 3}, } }, 83 /* avlab_2s1p */ { 1, { { 2, 3}, } },
94 /* avlab_2s1p_650 */ { 1, { { 2, 3}, } },
95 /* avlab_2s1p_850 */ { 1, { { 2, 3}, } },
96 /* siig_1s1p_10x */ { 1, { { 3, 4 }, } }, 84 /* siig_1s1p_10x */ { 1, { { 3, 4 }, } },
97 /* siig_2s1p_10x */ { 1, { { 4, 5 }, } }, 85 /* siig_2s1p_10x */ { 1, { { 4, 5 }, } },
98 /* siig_2p1s_20x */ { 2, { { 1, 2 }, { 3, 4 }, } }, 86 /* siig_2p1s_20x */ { 2, { { 1, 2 }, { 3, 4 }, } },
@@ -119,15 +107,24 @@ static struct pci_device_id parport_serial_pci_tbl[] = {
119 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9855, 107 { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9855,
120 PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9855 }, 108 PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9855 },
121 /* PCI_VENDOR_ID_AVLAB/Intek21 has another bunch of cards ...*/ 109 /* PCI_VENDOR_ID_AVLAB/Intek21 has another bunch of cards ...*/
122 { 0x14db, 0x2110, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p}, 110 { PCI_VENDOR_ID_AFAVLAB, 0x2110,
123 { 0x14db, 0x2111, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p_650}, 111 PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p },
124 { 0x14db, 0x2112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p_850}, 112 { PCI_VENDOR_ID_AFAVLAB, 0x2111,
125 { 0x14db, 0x2140, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p}, 113 PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p },
126 { 0x14db, 0x2141, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p_650}, 114 { PCI_VENDOR_ID_AFAVLAB, 0x2112,
127 { 0x14db, 0x2142, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p_850}, 115 PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p },
128 { 0x14db, 0x2160, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p}, 116 { PCI_VENDOR_ID_AFAVLAB, 0x2140,
129 { 0x14db, 0x2161, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p_650}, 117 PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p },
130 { 0x14db, 0x2162, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p_850}, 118 { PCI_VENDOR_ID_AFAVLAB, 0x2141,
119 PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p },
120 { PCI_VENDOR_ID_AFAVLAB, 0x2142,
121 PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p },
122 { PCI_VENDOR_ID_AFAVLAB, 0x2160,
123 PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p },
124 { PCI_VENDOR_ID_AFAVLAB, 0x2161,
125 PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p },
126 { PCI_VENDOR_ID_AFAVLAB, 0x2162,
127 PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p },
131 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_550, 128 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_550,
132 PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_1s1p_10x }, 129 PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_1s1p_10x },
133 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_650, 130 { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_650,
@@ -201,54 +198,18 @@ static struct pciserial_board pci_parport_serial_boards[] __devinitdata = {
201 .base_baud = 115200, 198 .base_baud = 115200,
202 .uart_offset = 8, 199 .uart_offset = 8,
203 }, 200 },
204 [avlab_1s1p_650] = { /* nt */
205 .flags = FL_BASE0 | FL_BASE_BARS,
206 .num_ports = 1,
207 .base_baud = 115200,
208 .uart_offset = 8,
209 },
210 [avlab_1s1p_850] = { /* nt */
211 .flags = FL_BASE0 | FL_BASE_BARS,
212 .num_ports = 1,
213 .base_baud = 115200,
214 .uart_offset = 8,
215 },
216 [avlab_1s2p] = { /* n/t */ 201 [avlab_1s2p] = { /* n/t */
217 .flags = FL_BASE0 | FL_BASE_BARS, 202 .flags = FL_BASE0 | FL_BASE_BARS,
218 .num_ports = 1, 203 .num_ports = 1,
219 .base_baud = 115200, 204 .base_baud = 115200,
220 .uart_offset = 8, 205 .uart_offset = 8,
221 }, 206 },
222 [avlab_1s2p_650] = { /* nt */
223 .flags = FL_BASE0 | FL_BASE_BARS,
224 .num_ports = 1,
225 .base_baud = 115200,
226 .uart_offset = 8,
227 },
228 [avlab_1s2p_850] = { /* nt */
229 .flags = FL_BASE0 | FL_BASE_BARS,
230 .num_ports = 1,
231 .base_baud = 115200,
232 .uart_offset = 8,
233 },
234 [avlab_2s1p] = { /* n/t */ 207 [avlab_2s1p] = { /* n/t */
235 .flags = FL_BASE0 | FL_BASE_BARS, 208 .flags = FL_BASE0 | FL_BASE_BARS,
236 .num_ports = 2, 209 .num_ports = 2,
237 .base_baud = 115200, 210 .base_baud = 115200,
238 .uart_offset = 8, 211 .uart_offset = 8,
239 }, 212 },
240 [avlab_2s1p_650] = { /* nt */
241 .flags = FL_BASE0 | FL_BASE_BARS,
242 .num_ports = 2,
243 .base_baud = 115200,
244 .uart_offset = 8,
245 },
246 [avlab_2s1p_850] = { /* nt */
247 .flags = FL_BASE0 | FL_BASE_BARS,
248 .num_ports = 2,
249 .base_baud = 115200,
250 .uart_offset = 8,
251 },
252 [siig_1s1p_10x] = { 213 [siig_1s1p_10x] = {
253 .flags = FL_BASE2, 214 .flags = FL_BASE2,
254 .num_ports = 1, 215 .num_ports = 1,
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index dba7f7f02e79..021cd5d08c61 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -1364,7 +1364,7 @@ qeth_wait_for_buffer(struct qeth_channel *channel)
1364static void 1364static void
1365qeth_clear_cmd_buffers(struct qeth_channel *channel) 1365qeth_clear_cmd_buffers(struct qeth_channel *channel)
1366{ 1366{
1367 int cnt = 0; 1367 int cnt;
1368 1368
1369 for (cnt=0; cnt < QETH_CMD_BUFFER_NO; cnt++) 1369 for (cnt=0; cnt < QETH_CMD_BUFFER_NO; cnt++)
1370 qeth_release_buffer(channel,&channel->iob[cnt]); 1370 qeth_release_buffer(channel,&channel->iob[cnt]);
@@ -2814,11 +2814,11 @@ qeth_handle_send_error(struct qeth_card *card,
2814 QETH_DBF_TEXT_(trace,1,"%s",CARD_BUS_ID(card)); 2814 QETH_DBF_TEXT_(trace,1,"%s",CARD_BUS_ID(card));
2815 return QETH_SEND_ERROR_LINK_FAILURE; 2815 return QETH_SEND_ERROR_LINK_FAILURE;
2816 case 3: 2816 case 3:
2817 default:
2817 QETH_DBF_TEXT(trace, 1, "SIGAcc3"); 2818 QETH_DBF_TEXT(trace, 1, "SIGAcc3");
2818 QETH_DBF_TEXT_(trace,1,"%s",CARD_BUS_ID(card)); 2819 QETH_DBF_TEXT_(trace,1,"%s",CARD_BUS_ID(card));
2819 return QETH_SEND_ERROR_KICK_IT; 2820 return QETH_SEND_ERROR_KICK_IT;
2820 } 2821 }
2821 return QETH_SEND_ERROR_LINK_FAILURE;
2822} 2822}
2823 2823
2824void 2824void
@@ -3865,6 +3865,7 @@ qeth_get_cast_type(struct qeth_card *card, struct sk_buff *skb)
3865 if ((hdr_mac == QETH_TR_MAC_NC) || 3865 if ((hdr_mac == QETH_TR_MAC_NC) ||
3866 (hdr_mac == QETH_TR_MAC_C)) 3866 (hdr_mac == QETH_TR_MAC_C))
3867 return RTN_MULTICAST; 3867 return RTN_MULTICAST;
3868 break;
3868 /* eth or so multicast? */ 3869 /* eth or so multicast? */
3869 default: 3870 default:
3870 if ((hdr_mac == QETH_ETH_MAC_V4) || 3871 if ((hdr_mac == QETH_ETH_MAC_V4) ||
@@ -4419,6 +4420,7 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
4419 int elements_needed = 0; 4420 int elements_needed = 0;
4420 enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO; 4421 enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO;
4421 struct qeth_eddp_context *ctx = NULL; 4422 struct qeth_eddp_context *ctx = NULL;
4423 int tx_bytes = skb->len;
4422 int rc; 4424 int rc;
4423 4425
4424 QETH_DBF_TEXT(trace, 6, "sendpkt"); 4426 QETH_DBF_TEXT(trace, 6, "sendpkt");
@@ -4499,7 +4501,7 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
4499 elements_needed, ctx); 4501 elements_needed, ctx);
4500 if (!rc){ 4502 if (!rc){
4501 card->stats.tx_packets++; 4503 card->stats.tx_packets++;
4502 card->stats.tx_bytes += skb->len; 4504 card->stats.tx_bytes += tx_bytes;
4503#ifdef CONFIG_QETH_PERF_STATS 4505#ifdef CONFIG_QETH_PERF_STATS
4504 if (skb_shinfo(skb)->tso_size && 4506 if (skb_shinfo(skb)->tso_size &&
4505 !(large_send == QETH_LARGE_SEND_NO)) { 4507 !(large_send == QETH_LARGE_SEND_NO)) {
@@ -4585,38 +4587,11 @@ qeth_mdio_read(struct net_device *dev, int phy_id, int regnum)
4585 case MII_NCONFIG: /* network interface config */ 4587 case MII_NCONFIG: /* network interface config */
4586 break; 4588 break;
4587 default: 4589 default:
4588 rc = 0;
4589 break; 4590 break;
4590 } 4591 }
4591 return rc; 4592 return rc;
4592} 4593}
4593 4594
4594static void
4595qeth_mdio_write(struct net_device *dev, int phy_id, int regnum, int value)
4596{
4597 switch(regnum){
4598 case MII_BMCR: /* Basic mode control register */
4599 case MII_BMSR: /* Basic mode status register */
4600 case MII_PHYSID1: /* PHYS ID 1 */
4601 case MII_PHYSID2: /* PHYS ID 2 */
4602 case MII_ADVERTISE: /* Advertisement control reg */
4603 case MII_LPA: /* Link partner ability reg */
4604 case MII_EXPANSION: /* Expansion register */
4605 case MII_DCOUNTER: /* disconnect counter */
4606 case MII_FCSCOUNTER: /* false carrier counter */
4607 case MII_NWAYTEST: /* N-way auto-neg test register */
4608 case MII_RERRCOUNTER: /* rx error counter */
4609 case MII_SREVISION: /* silicon revision */
4610 case MII_RESV1: /* reserved 1 */
4611 case MII_LBRERROR: /* loopback, rx, bypass error */
4612 case MII_PHYADDR: /* physical address */
4613 case MII_RESV2: /* reserved 2 */
4614 case MII_TPISTATUS: /* TPI status for 10mbps */
4615 case MII_NCONFIG: /* network interface config */
4616 default:
4617 break;
4618 }
4619}
4620 4595
4621static inline const char * 4596static inline const char *
4622qeth_arp_get_error_cause(int *rc) 4597qeth_arp_get_error_cause(int *rc)
@@ -5236,21 +5211,6 @@ qeth_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
5236 mii_data->val_out = qeth_mdio_read(dev,mii_data->phy_id, 5211 mii_data->val_out = qeth_mdio_read(dev,mii_data->phy_id,
5237 mii_data->reg_num); 5212 mii_data->reg_num);
5238 break; 5213 break;
5239 case SIOCSMIIREG:
5240 rc = -EOPNOTSUPP;
5241 break;
5242 /* TODO: remove return if qeth_mdio_write does something */
5243 if (!capable(CAP_NET_ADMIN)){
5244 rc = -EPERM;
5245 break;
5246 }
5247 mii_data = if_mii(rq);
5248 if (mii_data->phy_id != 0)
5249 rc = -EINVAL;
5250 else
5251 qeth_mdio_write(dev, mii_data->phy_id, mii_data->reg_num,
5252 mii_data->val_in);
5253 break;
5254 default: 5214 default:
5255 rc = -EOPNOTSUPP; 5215 rc = -EOPNOTSUPP;
5256 } 5216 }
@@ -6900,7 +6860,7 @@ qeth_send_setassparms(struct qeth_card *card, struct qeth_cmd_buffer *iob,
6900 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); 6860 cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
6901 if (len <= sizeof(__u32)) 6861 if (len <= sizeof(__u32))
6902 cmd->data.setassparms.data.flags_32bit = (__u32) data; 6862 cmd->data.setassparms.data.flags_32bit = (__u32) data;
6903 else if (len > sizeof(__u32)) 6863 else /* (len > sizeof(__u32)) */
6904 memcpy(&cmd->data.setassparms.data, (void *) data, len); 6864 memcpy(&cmd->data.setassparms.data, (void *) data, len);
6905 6865
6906 rc = qeth_send_ipa_cmd(card, iob, reply_cb, reply_param); 6866 rc = qeth_send_ipa_cmd(card, iob, reply_cb, reply_param);
@@ -7379,11 +7339,6 @@ qeth_setrouting_v6(struct qeth_card *card)
7379 qeth_correct_routing_type(card, &card->options.route6.type, 7339 qeth_correct_routing_type(card, &card->options.route6.type,
7380 QETH_PROT_IPV6); 7340 QETH_PROT_IPV6);
7381 7341
7382 if ((card->options.route6.type == NO_ROUTER) ||
7383 ((card->info.type == QETH_CARD_TYPE_OSAE) &&
7384 (card->options.route6.type == MULTICAST_ROUTER) &&
7385 !qeth_is_supported6(card,IPA_OSA_MC_ROUTER)))
7386 return 0;
7387 rc = qeth_send_setrouting(card, card->options.route6.type, 7342 rc = qeth_send_setrouting(card, card->options.route6.type,
7388 QETH_PROT_IPV6); 7343 QETH_PROT_IPV6);
7389 if (rc) { 7344 if (rc) {
diff --git a/drivers/s390/net/qeth_proc.c b/drivers/s390/net/qeth_proc.c
index 3c6339df879d..360d782c7ada 100644
--- a/drivers/s390/net/qeth_proc.c
+++ b/drivers/s390/net/qeth_proc.c
@@ -74,7 +74,7 @@ qeth_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset)
74static inline const char * 74static inline const char *
75qeth_get_router_str(struct qeth_card *card, int ipv) 75qeth_get_router_str(struct qeth_card *card, int ipv)
76{ 76{
77 int routing_type = 0; 77 enum qeth_routing_types routing_type = NO_ROUTER;
78 78
79 if (ipv == 4) { 79 if (ipv == 4) {
80 routing_type = card->options.route4.type; 80 routing_type = card->options.route4.type;
@@ -86,26 +86,26 @@ qeth_get_router_str(struct qeth_card *card, int ipv)
86#endif /* CONFIG_QETH_IPV6 */ 86#endif /* CONFIG_QETH_IPV6 */
87 } 87 }
88 88
89 if (routing_type == PRIMARY_ROUTER) 89 switch (routing_type){
90 case PRIMARY_ROUTER:
90 return "pri"; 91 return "pri";
91 else if (routing_type == SECONDARY_ROUTER) 92 case SECONDARY_ROUTER:
92 return "sec"; 93 return "sec";
93 else if (routing_type == MULTICAST_ROUTER) { 94 case MULTICAST_ROUTER:
94 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO) 95 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO)
95 return "mc+"; 96 return "mc+";
96 return "mc"; 97 return "mc";
97 } else if (routing_type == PRIMARY_CONNECTOR) { 98 case PRIMARY_CONNECTOR:
98 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO) 99 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO)
99 return "p+c"; 100 return "p+c";
100 return "p.c"; 101 return "p.c";
101 } else if (routing_type == SECONDARY_CONNECTOR) { 102 case SECONDARY_CONNECTOR:
102 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO) 103 if (card->info.broadcast_capable == QETH_BROADCAST_WITHOUT_ECHO)
103 return "s+c"; 104 return "s+c";
104 return "s.c"; 105 return "s.c";
105 } else if (routing_type == NO_ROUTER) 106 default: /* NO_ROUTER */
106 return "no"; 107 return "no";
107 else 108 }
108 return "unk";
109} 109}
110 110
111static int 111static int
@@ -192,27 +192,27 @@ qeth_perf_procfile_seq_show(struct seq_file *s, void *it)
192 CARD_DDEV_ID(card), 192 CARD_DDEV_ID(card),
193 QETH_CARD_IFNAME(card) 193 QETH_CARD_IFNAME(card)
194 ); 194 );
195 seq_printf(s, " Skb's/buffers received : %li/%i\n" 195 seq_printf(s, " Skb's/buffers received : %lu/%u\n"
196 " Skb's/buffers sent : %li/%i\n\n", 196 " Skb's/buffers sent : %lu/%u\n\n",
197 card->stats.rx_packets, card->perf_stats.bufs_rec, 197 card->stats.rx_packets, card->perf_stats.bufs_rec,
198 card->stats.tx_packets, card->perf_stats.bufs_sent 198 card->stats.tx_packets, card->perf_stats.bufs_sent
199 ); 199 );
200 seq_printf(s, " Skb's/buffers sent without packing : %li/%i\n" 200 seq_printf(s, " Skb's/buffers sent without packing : %lu/%u\n"
201 " Skb's/buffers sent with packing : %i/%i\n\n", 201 " Skb's/buffers sent with packing : %u/%u\n\n",
202 card->stats.tx_packets - card->perf_stats.skbs_sent_pack, 202 card->stats.tx_packets - card->perf_stats.skbs_sent_pack,
203 card->perf_stats.bufs_sent - card->perf_stats.bufs_sent_pack, 203 card->perf_stats.bufs_sent - card->perf_stats.bufs_sent_pack,
204 card->perf_stats.skbs_sent_pack, 204 card->perf_stats.skbs_sent_pack,
205 card->perf_stats.bufs_sent_pack 205 card->perf_stats.bufs_sent_pack
206 ); 206 );
207 seq_printf(s, " Skbs sent in SG mode : %i\n" 207 seq_printf(s, " Skbs sent in SG mode : %u\n"
208 " Skb fragments sent in SG mode : %i\n\n", 208 " Skb fragments sent in SG mode : %u\n\n",
209 card->perf_stats.sg_skbs_sent, 209 card->perf_stats.sg_skbs_sent,
210 card->perf_stats.sg_frags_sent); 210 card->perf_stats.sg_frags_sent);
211 seq_printf(s, " large_send tx (in Kbytes) : %i\n" 211 seq_printf(s, " large_send tx (in Kbytes) : %u\n"
212 " large_send count : %i\n\n", 212 " large_send count : %u\n\n",
213 card->perf_stats.large_send_bytes >> 10, 213 card->perf_stats.large_send_bytes >> 10,
214 card->perf_stats.large_send_cnt); 214 card->perf_stats.large_send_cnt);
215 seq_printf(s, " Packing state changes no pkg.->packing : %i/%i\n" 215 seq_printf(s, " Packing state changes no pkg.->packing : %u/%u\n"
216 " Watermarks L/H : %i/%i\n" 216 " Watermarks L/H : %i/%i\n"
217 " Current buffer usage (outbound q's) : " 217 " Current buffer usage (outbound q's) : "
218 "%i/%i/%i/%i\n\n", 218 "%i/%i/%i/%i\n\n",
@@ -229,16 +229,16 @@ qeth_perf_procfile_seq_show(struct seq_file *s, void *it)
229 atomic_read(&card->qdio.out_qs[3]->used_buffers) 229 atomic_read(&card->qdio.out_qs[3]->used_buffers)
230 : 0 230 : 0
231 ); 231 );
232 seq_printf(s, " Inbound handler time (in us) : %i\n" 232 seq_printf(s, " Inbound handler time (in us) : %u\n"
233 " Inbound handler count : %i\n" 233 " Inbound handler count : %u\n"
234 " Inbound do_QDIO time (in us) : %i\n" 234 " Inbound do_QDIO time (in us) : %u\n"
235 " Inbound do_QDIO count : %i\n\n" 235 " Inbound do_QDIO count : %u\n\n"
236 " Outbound handler time (in us) : %i\n" 236 " Outbound handler time (in us) : %u\n"
237 " Outbound handler count : %i\n\n" 237 " Outbound handler count : %u\n\n"
238 " Outbound time (in us, incl QDIO) : %i\n" 238 " Outbound time (in us, incl QDIO) : %u\n"
239 " Outbound count : %i\n" 239 " Outbound count : %u\n"
240 " Outbound do_QDIO time (in us) : %i\n" 240 " Outbound do_QDIO time (in us) : %u\n"
241 " Outbound do_QDIO count : %i\n\n", 241 " Outbound do_QDIO count : %u\n\n",
242 card->perf_stats.inbound_time, 242 card->perf_stats.inbound_time,
243 card->perf_stats.inbound_cnt, 243 card->perf_stats.inbound_cnt,
244 card->perf_stats.inbound_do_qdio_time, 244 card->perf_stats.inbound_do_qdio_time,
diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c
index c1831f572585..f2a076a2b2f1 100644
--- a/drivers/s390/net/qeth_sys.c
+++ b/drivers/s390/net/qeth_sys.c
@@ -115,7 +115,7 @@ qeth_dev_portno_store(struct device *dev, struct device_attribute *attr, const c
115 return -EPERM; 115 return -EPERM;
116 116
117 portno = simple_strtoul(buf, &tmp, 16); 117 portno = simple_strtoul(buf, &tmp, 16);
118 if ((portno < 0) || (portno > MAX_PORTNO)){ 118 if (portno > MAX_PORTNO){
119 PRINT_WARN("portno 0x%X is out of range\n", portno); 119 PRINT_WARN("portno 0x%X is out of range\n", portno);
120 return -EINVAL; 120 return -EINVAL;
121 } 121 }
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 5c94a5d4efc0..4035920ce3d8 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -595,10 +595,10 @@ config SCSI_SATA_VIA
595 If unsure, say N. 595 If unsure, say N.
596 596
597config SCSI_SATA_VITESSE 597config SCSI_SATA_VITESSE
598 tristate "VITESSE VSC-7174 SATA support" 598 tristate "VITESSE VSC-7174 / INTEL 31244 SATA support"
599 depends on SCSI_SATA && PCI 599 depends on SCSI_SATA && PCI
600 help 600 help
601 This option enables support for Vitesse VSC7174 Serial ATA. 601 This option enables support for Vitesse VSC7174 and Intel 31244 Serial ATA.
602 602
603 If unsure, say N. 603 If unsure, say N.
604 604
diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile
index 15dc2e00e1b2..e513c3158ad9 100644
--- a/drivers/scsi/Makefile
+++ b/drivers/scsi/Makefile
@@ -117,7 +117,6 @@ obj-$(CONFIG_SCSI_PPA) += ppa.o
117obj-$(CONFIG_SCSI_IMM) += imm.o 117obj-$(CONFIG_SCSI_IMM) += imm.o
118obj-$(CONFIG_JAZZ_ESP) += NCR53C9x.o jazz_esp.o 118obj-$(CONFIG_JAZZ_ESP) += NCR53C9x.o jazz_esp.o
119obj-$(CONFIG_SUN3X_ESP) += NCR53C9x.o sun3x_esp.o 119obj-$(CONFIG_SUN3X_ESP) += NCR53C9x.o sun3x_esp.o
120obj-$(CONFIG_SCSI_DEBUG) += scsi_debug.o
121obj-$(CONFIG_SCSI_FCAL) += fcal.o 120obj-$(CONFIG_SCSI_FCAL) += fcal.o
122obj-$(CONFIG_SCSI_LASI700) += 53c700.o lasi700.o 121obj-$(CONFIG_SCSI_LASI700) += 53c700.o lasi700.o
123obj-$(CONFIG_SCSI_NSP32) += nsp32.o 122obj-$(CONFIG_SCSI_NSP32) += nsp32.o
@@ -148,6 +147,9 @@ obj-$(CONFIG_BLK_DEV_SR) += sr_mod.o
148obj-$(CONFIG_CHR_DEV_SG) += sg.o 147obj-$(CONFIG_CHR_DEV_SG) += sg.o
149obj-$(CONFIG_CHR_DEV_SCH) += ch.o 148obj-$(CONFIG_CHR_DEV_SCH) += ch.o
150 149
150# This goes last, so that "real" scsi devices probe earlier
151obj-$(CONFIG_SCSI_DEBUG) += scsi_debug.o
152
151scsi_mod-y += scsi.o hosts.o scsi_ioctl.o constants.o \ 153scsi_mod-y += scsi.o hosts.o scsi_ioctl.o constants.o \
152 scsicam.o scsi_error.o scsi_lib.o \ 154 scsicam.o scsi_error.o scsi_lib.o \
153 scsi_scan.o scsi_sysfs.o \ 155 scsi_scan.o scsi_sysfs.o \
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index a1ddbba2cbdf..ffba65656a83 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -513,6 +513,138 @@ static void ahci_fill_cmd_slot(struct ahci_port_priv *pp, u32 opts)
513 pp->cmd_slot[0].tbl_addr_hi = cpu_to_le32((pp->cmd_tbl_dma >> 16) >> 16); 513 pp->cmd_slot[0].tbl_addr_hi = cpu_to_le32((pp->cmd_tbl_dma >> 16) >> 16);
514} 514}
515 515
516static int ahci_poll_register(void __iomem *reg, u32 mask, u32 val,
517 unsigned long interval_msec,
518 unsigned long timeout_msec)
519{
520 unsigned long timeout;
521 u32 tmp;
522
523 timeout = jiffies + (timeout_msec * HZ) / 1000;
524 do {
525 tmp = readl(reg);
526 if ((tmp & mask) == val)
527 return 0;
528 msleep(interval_msec);
529 } while (time_before(jiffies, timeout));
530
531 return -1;
532}
533
534static int ahci_softreset(struct ata_port *ap, int verbose, unsigned int *class)
535{
536 struct ahci_host_priv *hpriv = ap->host_set->private_data;
537 struct ahci_port_priv *pp = ap->private_data;
538 void __iomem *mmio = ap->host_set->mmio_base;
539 void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no);
540 const u32 cmd_fis_len = 5; /* five dwords */
541 const char *reason = NULL;
542 struct ata_taskfile tf;
543 u8 *fis;
544 int rc;
545
546 DPRINTK("ENTER\n");
547
548 /* prepare for SRST (AHCI-1.1 10.4.1) */
549 rc = ahci_stop_engine(ap);
550 if (rc) {
551 reason = "failed to stop engine";
552 goto fail_restart;
553 }
554
555 /* check BUSY/DRQ, perform Command List Override if necessary */
556 ahci_tf_read(ap, &tf);
557 if (tf.command & (ATA_BUSY | ATA_DRQ)) {
558 u32 tmp;
559
560 if (!(hpriv->cap & HOST_CAP_CLO)) {
561 rc = -EIO;
562 reason = "port busy but no CLO";
563 goto fail_restart;
564 }
565
566 tmp = readl(port_mmio + PORT_CMD);
567 tmp |= PORT_CMD_CLO;
568 writel(tmp, port_mmio + PORT_CMD);
569 readl(port_mmio + PORT_CMD); /* flush */
570
571 if (ahci_poll_register(port_mmio + PORT_CMD, PORT_CMD_CLO, 0x0,
572 1, 500)) {
573 rc = -EIO;
574 reason = "CLO failed";
575 goto fail_restart;
576 }
577 }
578
579 /* restart engine */
580 ahci_start_engine(ap);
581
582 ata_tf_init(ap, &tf, 0);
583 fis = pp->cmd_tbl;
584
585 /* issue the first D2H Register FIS */
586 ahci_fill_cmd_slot(pp, cmd_fis_len | AHCI_CMD_RESET | AHCI_CMD_CLR_BUSY);
587
588 tf.ctl |= ATA_SRST;
589 ata_tf_to_fis(&tf, fis, 0);
590 fis[1] &= ~(1 << 7); /* turn off Command FIS bit */
591
592 writel(1, port_mmio + PORT_CMD_ISSUE);
593 readl(port_mmio + PORT_CMD_ISSUE); /* flush */
594
595 if (ahci_poll_register(port_mmio + PORT_CMD_ISSUE, 0x1, 0x0, 1, 500)) {
596 rc = -EIO;
597 reason = "1st FIS failed";
598 goto fail;
599 }
600
601 /* spec says at least 5us, but be generous and sleep for 1ms */
602 msleep(1);
603
604 /* issue the second D2H Register FIS */
605 ahci_fill_cmd_slot(pp, cmd_fis_len);
606
607 tf.ctl &= ~ATA_SRST;
608 ata_tf_to_fis(&tf, fis, 0);
609 fis[1] &= ~(1 << 7); /* turn off Command FIS bit */
610
611 writel(1, port_mmio + PORT_CMD_ISSUE);
612 readl(port_mmio + PORT_CMD_ISSUE); /* flush */
613
614 /* spec mandates ">= 2ms" before checking status.
615 * We wait 150ms, because that was the magic delay used for
616 * ATAPI devices in Hale Landis's ATADRVR, for the period of time
617 * between when the ATA command register is written, and then
618 * status is checked. Because waiting for "a while" before
619 * checking status is fine, post SRST, we perform this magic
620 * delay here as well.
621 */
622 msleep(150);
623
624 *class = ATA_DEV_NONE;
625 if (sata_dev_present(ap)) {
626 if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) {
627 rc = -EIO;
628 reason = "device not ready";
629 goto fail;
630 }
631 *class = ahci_dev_classify(ap);
632 }
633
634 DPRINTK("EXIT, class=%u\n", *class);
635 return 0;
636
637 fail_restart:
638 ahci_start_engine(ap);
639 fail:
640 if (verbose)
641 printk(KERN_ERR "ata%u: softreset failed (%s)\n",
642 ap->id, reason);
643 else
644 DPRINTK("EXIT, rc=%d reason=\"%s\"\n", rc, reason);
645 return rc;
646}
647
516static int ahci_hardreset(struct ata_port *ap, int verbose, unsigned int *class) 648static int ahci_hardreset(struct ata_port *ap, int verbose, unsigned int *class)
517{ 649{
518 int rc; 650 int rc;
@@ -553,7 +685,8 @@ static void ahci_postreset(struct ata_port *ap, unsigned int *class)
553 685
554static int ahci_probe_reset(struct ata_port *ap, unsigned int *classes) 686static int ahci_probe_reset(struct ata_port *ap, unsigned int *classes)
555{ 687{
556 return ata_drive_probe_reset(ap, NULL, NULL, ahci_hardreset, 688 return ata_drive_probe_reset(ap, ata_std_probeinit,
689 ahci_softreset, ahci_hardreset,
557 ahci_postreset, classes); 690 ahci_postreset, classes);
558} 691}
559 692
diff --git a/drivers/scsi/libata-bmdma.c b/drivers/scsi/libata-bmdma.c
index a93336adcd23..96b4d2160df8 100644
--- a/drivers/scsi/libata-bmdma.c
+++ b/drivers/scsi/libata-bmdma.c
@@ -214,6 +214,8 @@ static void ata_exec_command_pio(struct ata_port *ap, const struct ata_taskfile
214 * Issues MMIO write to ATA command register, with proper 214 * Issues MMIO write to ATA command register, with proper
215 * synchronization with interrupt handler / other threads. 215 * synchronization with interrupt handler / other threads.
216 * 216 *
217 * FIXME: missing write posting for 400nS delay enforcement
218 *
217 * LOCKING: 219 * LOCKING:
218 * spin_lock_irqsave(host_set lock) 220 * spin_lock_irqsave(host_set lock)
219 */ 221 */
@@ -648,6 +650,7 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info,
648 goto err_out_regions; 650 goto err_out_regions;
649 } 651 }
650 652
653 /* FIXME: If we get no DMA mask we should fall back to PIO */
651 rc = pci_set_dma_mask(pdev, ATA_DMA_MASK); 654 rc = pci_set_dma_mask(pdev, ATA_DMA_MASK);
652 if (rc) 655 if (rc)
653 goto err_out_regions; 656 goto err_out_regions;
@@ -699,5 +702,41 @@ err_out:
699 return rc; 702 return rc;
700} 703}
701 704
705/**
706 * ata_pci_clear_simplex - attempt to kick device out of simplex
707 * @pdev: PCI device
708 *
709 * Some PCI ATA devices report simplex mode but in fact can be told to
710 * enter non simplex mode. This implements the neccessary logic to
711 * perform the task on such devices. Calling it on other devices will
712 * have -undefined- behaviour.
713 */
714
715int ata_pci_clear_simplex(struct pci_dev *pdev)
716{
717 unsigned long bmdma = pci_resource_start(pdev, 4);
718 u8 simplex;
719
720 if (bmdma == 0)
721 return -ENOENT;
722
723 simplex = inb(bmdma + 0x02);
724 outb(simplex & 0x60, bmdma + 0x02);
725 simplex = inb(bmdma + 0x02);
726 if (simplex & 0x80)
727 return -EOPNOTSUPP;
728 return 0;
729}
730
731unsigned long ata_pci_default_filter(const struct ata_port *ap, struct ata_device *adev, unsigned long xfer_mask)
732{
733 /* Filter out DMA modes if the device has been configured by
734 the BIOS as PIO only */
735
736 if (ap->ioaddr.bmdma_addr == 0)
737 xfer_mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA);
738 return xfer_mask;
739}
740
702#endif /* CONFIG_PCI */ 741#endif /* CONFIG_PCI */
703 742
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 64dce00e9c46..0314abd97f2d 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -962,6 +962,8 @@ ata_exec_internal(struct ata_port *ap, struct ata_device *dev,
962 spin_unlock_irqrestore(&ap->host_set->lock, flags); 962 spin_unlock_irqrestore(&ap->host_set->lock, flags);
963 963
964 if (!wait_for_completion_timeout(&wait, ATA_TMOUT_INTERNAL)) { 964 if (!wait_for_completion_timeout(&wait, ATA_TMOUT_INTERNAL)) {
965 ata_port_flush_task(ap);
966
965 spin_lock_irqsave(&ap->host_set->lock, flags); 967 spin_lock_irqsave(&ap->host_set->lock, flags);
966 968
967 /* We're racing with irq here. If we lose, the 969 /* We're racing with irq here. If we lose, the
@@ -1219,13 +1221,6 @@ static int ata_dev_configure(struct ata_port *ap, struct ata_device *dev,
1219 * common ATA, ATAPI feature tests 1221 * common ATA, ATAPI feature tests
1220 */ 1222 */
1221 1223
1222 /* we require DMA support (bits 8 of word 49) */
1223 if (!ata_id_has_dma(id)) {
1224 printk(KERN_DEBUG "ata%u: no dma\n", ap->id);
1225 rc = -EINVAL;
1226 goto err_out_nosup;
1227 }
1228
1229 /* find max transfer mode; for printk only */ 1224 /* find max transfer mode; for printk only */
1230 xfer_mask = ata_id_xfermask(id); 1225 xfer_mask = ata_id_xfermask(id);
1231 1226
@@ -1737,7 +1732,7 @@ static int ata_host_set_pio(struct ata_port *ap)
1737 continue; 1732 continue;
1738 1733
1739 if (!dev->pio_mode) { 1734 if (!dev->pio_mode) {
1740 printk(KERN_WARNING "ata%u: no PIO support\n", ap->id); 1735 printk(KERN_WARNING "ata%u: no PIO support for device %d.\n", ap->id, i);
1741 return -1; 1736 return -1;
1742 } 1737 }
1743 1738
@@ -1999,9 +1994,19 @@ static unsigned int ata_bus_softreset(struct ata_port *ap,
1999 * status is checked. Because waiting for "a while" before 1994 * status is checked. Because waiting for "a while" before
2000 * checking status is fine, post SRST, we perform this magic 1995 * checking status is fine, post SRST, we perform this magic
2001 * delay here as well. 1996 * delay here as well.
1997 *
1998 * Old drivers/ide uses the 2mS rule and then waits for ready
2002 */ 1999 */
2003 msleep(150); 2000 msleep(150);
2004 2001
2002
2003 /* Before we perform post reset processing we want to see if
2004 the bus shows 0xFF because the odd clown forgets the D7 pulldown
2005 resistor */
2006
2007 if (ata_check_status(ap) == 0xFF)
2008 return 1; /* Positive is failure for some reason */
2009
2005 ata_bus_post_reset(ap, devmask); 2010 ata_bus_post_reset(ap, devmask);
2006 2011
2007 return 0; 2012 return 0;
@@ -2551,48 +2556,72 @@ int ata_dev_revalidate(struct ata_port *ap, struct ata_device *dev,
2551} 2556}
2552 2557
2553static const char * const ata_dma_blacklist [] = { 2558static const char * const ata_dma_blacklist [] = {
2554 "WDC AC11000H", 2559 "WDC AC11000H", NULL,
2555 "WDC AC22100H", 2560 "WDC AC22100H", NULL,
2556 "WDC AC32500H", 2561 "WDC AC32500H", NULL,
2557 "WDC AC33100H", 2562 "WDC AC33100H", NULL,
2558 "WDC AC31600H", 2563 "WDC AC31600H", NULL,
2559 "WDC AC32100H", 2564 "WDC AC32100H", "24.09P07",
2560 "WDC AC23200L", 2565 "WDC AC23200L", "21.10N21",
2561 "Compaq CRD-8241B", 2566 "Compaq CRD-8241B", NULL,
2562 "CRD-8400B", 2567 "CRD-8400B", NULL,
2563 "CRD-8480B", 2568 "CRD-8480B", NULL,
2564 "CRD-8482B", 2569 "CRD-8482B", NULL,
2565 "CRD-84", 2570 "CRD-84", NULL,
2566 "SanDisk SDP3B", 2571 "SanDisk SDP3B", NULL,
2567 "SanDisk SDP3B-64", 2572 "SanDisk SDP3B-64", NULL,
2568 "SANYO CD-ROM CRD", 2573 "SANYO CD-ROM CRD", NULL,
2569 "HITACHI CDR-8", 2574 "HITACHI CDR-8", NULL,
2570 "HITACHI CDR-8335", 2575 "HITACHI CDR-8335", NULL,
2571 "HITACHI CDR-8435", 2576 "HITACHI CDR-8435", NULL,
2572 "Toshiba CD-ROM XM-6202B", 2577 "Toshiba CD-ROM XM-6202B", NULL,
2573 "TOSHIBA CD-ROM XM-1702BC", 2578 "TOSHIBA CD-ROM XM-1702BC", NULL,
2574 "CD-532E-A", 2579 "CD-532E-A", NULL,
2575 "E-IDE CD-ROM CR-840", 2580 "E-IDE CD-ROM CR-840", NULL,
2576 "CD-ROM Drive/F5A", 2581 "CD-ROM Drive/F5A", NULL,
2577 "WPI CDD-820", 2582 "WPI CDD-820", NULL,
2578 "SAMSUNG CD-ROM SC-148C", 2583 "SAMSUNG CD-ROM SC-148C", NULL,
2579 "SAMSUNG CD-ROM SC", 2584 "SAMSUNG CD-ROM SC", NULL,
2580 "SanDisk SDP3B-64", 2585 "SanDisk SDP3B-64", NULL,
2581 "ATAPI CD-ROM DRIVE 40X MAXIMUM", 2586 "ATAPI CD-ROM DRIVE 40X MAXIMUM",NULL,
2582 "_NEC DV5800A", 2587 "_NEC DV5800A", NULL,
2588 "SAMSUNG CD-ROM SN-124", "N001"
2583}; 2589};
2590
2591static int ata_strim(char *s, size_t len)
2592{
2593 len = strnlen(s, len);
2594
2595 /* ATAPI specifies that empty space is blank-filled; remove blanks */
2596 while ((len > 0) && (s[len - 1] == ' ')) {
2597 len--;
2598 s[len] = 0;
2599 }
2600 return len;
2601}
2584 2602
2585static int ata_dma_blacklisted(const struct ata_device *dev) 2603static int ata_dma_blacklisted(const struct ata_device *dev)
2586{ 2604{
2587 unsigned char model_num[41]; 2605 unsigned char model_num[40];
2606 unsigned char model_rev[16];
2607 unsigned int nlen, rlen;
2588 int i; 2608 int i;
2589 2609
2590 ata_id_c_string(dev->id, model_num, ATA_ID_PROD_OFS, sizeof(model_num)); 2610 ata_id_string(dev->id, model_num, ATA_ID_PROD_OFS,
2591 2611 sizeof(model_num));
2592 for (i = 0; i < ARRAY_SIZE(ata_dma_blacklist); i++) 2612 ata_id_string(dev->id, model_rev, ATA_ID_FW_REV_OFS,
2593 if (!strcmp(ata_dma_blacklist[i], model_num)) 2613 sizeof(model_rev));
2594 return 1; 2614 nlen = ata_strim(model_num, sizeof(model_num));
2615 rlen = ata_strim(model_rev, sizeof(model_rev));
2595 2616
2617 for (i = 0; i < ARRAY_SIZE(ata_dma_blacklist); i += 2) {
2618 if (!strncmp(ata_dma_blacklist[i], model_num, nlen)) {
2619 if (ata_dma_blacklist[i+1] == NULL)
2620 return 1;
2621 if (!strncmp(ata_dma_blacklist[i], model_rev, rlen))
2622 return 1;
2623 }
2624 }
2596 return 0; 2625 return 0;
2597} 2626}
2598 2627
@@ -2863,6 +2892,8 @@ void ata_qc_prep(struct ata_queued_cmd *qc)
2863 ata_fill_sg(qc); 2892 ata_fill_sg(qc);
2864} 2893}
2865 2894
2895void ata_noop_qc_prep(struct ata_queued_cmd *qc) { }
2896
2866/** 2897/**
2867 * ata_sg_init_one - Associate command with memory buffer 2898 * ata_sg_init_one - Associate command with memory buffer
2868 * @qc: Command to be associated 2899 * @qc: Command to be associated
@@ -3907,7 +3938,6 @@ static inline int ata_should_dma_map(struct ata_queued_cmd *qc)
3907 3938
3908 case ATA_PROT_ATAPI: 3939 case ATA_PROT_ATAPI:
3909 case ATA_PROT_PIO: 3940 case ATA_PROT_PIO:
3910 case ATA_PROT_PIO_MULT:
3911 if (ap->flags & ATA_FLAG_PIO_DMA) 3941 if (ap->flags & ATA_FLAG_PIO_DMA)
3912 return 1; 3942 return 1;
3913 3943
@@ -4199,14 +4229,17 @@ void ata_bmdma_setup(struct ata_queued_cmd *qc)
4199 4229
4200void ata_bmdma_irq_clear(struct ata_port *ap) 4230void ata_bmdma_irq_clear(struct ata_port *ap)
4201{ 4231{
4202 if (ap->flags & ATA_FLAG_MMIO) { 4232 if (!ap->ioaddr.bmdma_addr)
4203 void __iomem *mmio = ((void __iomem *) ap->ioaddr.bmdma_addr) + ATA_DMA_STATUS; 4233 return;
4204 writeb(readb(mmio), mmio);
4205 } else {
4206 unsigned long addr = ap->ioaddr.bmdma_addr + ATA_DMA_STATUS;
4207 outb(inb(addr), addr);
4208 }
4209 4234
4235 if (ap->flags & ATA_FLAG_MMIO) {
4236 void __iomem *mmio =
4237 ((void __iomem *) ap->ioaddr.bmdma_addr) + ATA_DMA_STATUS;
4238 writeb(readb(mmio), mmio);
4239 } else {
4240 unsigned long addr = ap->ioaddr.bmdma_addr + ATA_DMA_STATUS;
4241 outb(inb(addr), addr);
4242 }
4210} 4243}
4211 4244
4212 4245
@@ -4337,9 +4370,9 @@ idle_irq:
4337 4370
4338#ifdef ATA_IRQ_TRAP 4371#ifdef ATA_IRQ_TRAP
4339 if ((ap->stats.idle_irq % 1000) == 0) { 4372 if ((ap->stats.idle_irq % 1000) == 0) {
4340 handled = 1;
4341 ata_irq_ack(ap, 0); /* debug trap */ 4373 ata_irq_ack(ap, 0); /* debug trap */
4342 printk(KERN_WARNING "ata%d: irq trap\n", ap->id); 4374 printk(KERN_WARNING "ata%d: irq trap\n", ap->id);
4375 return 1;
4343 } 4376 }
4344#endif 4377#endif
4345 return 0; /* irq not handled */ 4378 return 0; /* irq not handled */
@@ -5064,6 +5097,7 @@ EXPORT_SYMBOL_GPL(ata_port_stop);
5064EXPORT_SYMBOL_GPL(ata_host_stop); 5097EXPORT_SYMBOL_GPL(ata_host_stop);
5065EXPORT_SYMBOL_GPL(ata_interrupt); 5098EXPORT_SYMBOL_GPL(ata_interrupt);
5066EXPORT_SYMBOL_GPL(ata_qc_prep); 5099EXPORT_SYMBOL_GPL(ata_qc_prep);
5100EXPORT_SYMBOL_GPL(ata_noop_qc_prep);
5067EXPORT_SYMBOL_GPL(ata_bmdma_setup); 5101EXPORT_SYMBOL_GPL(ata_bmdma_setup);
5068EXPORT_SYMBOL_GPL(ata_bmdma_start); 5102EXPORT_SYMBOL_GPL(ata_bmdma_start);
5069EXPORT_SYMBOL_GPL(ata_bmdma_irq_clear); 5103EXPORT_SYMBOL_GPL(ata_bmdma_irq_clear);
@@ -5109,6 +5143,8 @@ EXPORT_SYMBOL_GPL(ata_pci_init_one);
5109EXPORT_SYMBOL_GPL(ata_pci_remove_one); 5143EXPORT_SYMBOL_GPL(ata_pci_remove_one);
5110EXPORT_SYMBOL_GPL(ata_pci_device_suspend); 5144EXPORT_SYMBOL_GPL(ata_pci_device_suspend);
5111EXPORT_SYMBOL_GPL(ata_pci_device_resume); 5145EXPORT_SYMBOL_GPL(ata_pci_device_resume);
5146EXPORT_SYMBOL_GPL(ata_pci_default_filter);
5147EXPORT_SYMBOL_GPL(ata_pci_clear_simplex);
5112#endif /* CONFIG_PCI */ 5148#endif /* CONFIG_PCI */
5113 5149
5114EXPORT_SYMBOL_GPL(ata_device_suspend); 5150EXPORT_SYMBOL_GPL(ata_device_suspend);
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index bd9f2176f79a..a1259b242b8e 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -521,13 +521,11 @@ void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk, u8 *asc,
521 printk(KERN_WARNING "ata%u: no sense translation for status: 0x%02x\n", 521 printk(KERN_WARNING "ata%u: no sense translation for status: 0x%02x\n",
522 id, drv_stat); 522 id, drv_stat);
523 523
524 /* For our last chance pick, use medium read error because 524 /* We need a sensible error return here, which is tricky, and one
525 * it's much more common than an ATA drive telling you a write 525 that won't cause people to do things like return a disk wrongly */
526 * has failed. 526 *sk = ABORTED_COMMAND;
527 */ 527 *asc = 0x00;
528 *sk = MEDIUM_ERROR; 528 *ascq = 0x00;
529 *asc = 0x11; /* "unrecovered read error" */
530 *ascq = 0x04; /* "auto-reallocation failed" */
531 529
532 translate_done: 530 translate_done:
533 printk(KERN_ERR "ata%u: translated ATA stat/err 0x%02x/%02x to " 531 printk(KERN_ERR "ata%u: translated ATA stat/err 0x%02x/%02x to "
@@ -672,6 +670,41 @@ void ata_gen_fixed_sense(struct ata_queued_cmd *qc)
672 } 670 }
673} 671}
674 672
673static void ata_scsi_sdev_config(struct scsi_device *sdev)
674{
675 sdev->use_10_for_rw = 1;
676 sdev->use_10_for_ms = 1;
677}
678
679static void ata_scsi_dev_config(struct scsi_device *sdev,
680 struct ata_device *dev)
681{
682 unsigned int max_sectors;
683
684 /* TODO: 2048 is an arbitrary number, not the
685 * hardware maximum. This should be increased to
686 * 65534 when Jens Axboe's patch for dynamically
687 * determining max_sectors is merged.
688 */
689 max_sectors = ATA_MAX_SECTORS;
690 if (dev->flags & ATA_DFLAG_LBA48)
691 max_sectors = 2048;
692 if (dev->max_sectors)
693 max_sectors = dev->max_sectors;
694
695 blk_queue_max_sectors(sdev->request_queue, max_sectors);
696
697 /*
698 * SATA DMA transfers must be multiples of 4 byte, so
699 * we need to pad ATAPI transfers using an extra sg.
700 * Decrement max hw segments accordingly.
701 */
702 if (dev->class == ATA_DEV_ATAPI) {
703 request_queue_t *q = sdev->request_queue;
704 blk_queue_max_hw_segments(q, q->max_hw_segments - 1);
705 }
706}
707
675/** 708/**
676 * ata_scsi_slave_config - Set SCSI device attributes 709 * ata_scsi_slave_config - Set SCSI device attributes
677 * @sdev: SCSI device to examine 710 * @sdev: SCSI device to examine
@@ -686,41 +719,18 @@ void ata_gen_fixed_sense(struct ata_queued_cmd *qc)
686 719
687int ata_scsi_slave_config(struct scsi_device *sdev) 720int ata_scsi_slave_config(struct scsi_device *sdev)
688{ 721{
689 sdev->use_10_for_rw = 1; 722 ata_scsi_sdev_config(sdev);
690 sdev->use_10_for_ms = 1;
691 723
692 blk_queue_max_phys_segments(sdev->request_queue, LIBATA_MAX_PRD); 724 blk_queue_max_phys_segments(sdev->request_queue, LIBATA_MAX_PRD);
693 725
694 if (sdev->id < ATA_MAX_DEVICES) { 726 if (sdev->id < ATA_MAX_DEVICES) {
695 struct ata_port *ap; 727 struct ata_port *ap;
696 struct ata_device *dev; 728 struct ata_device *dev;
697 unsigned int max_sectors;
698 729
699 ap = (struct ata_port *) &sdev->host->hostdata[0]; 730 ap = (struct ata_port *) &sdev->host->hostdata[0];
700 dev = &ap->device[sdev->id]; 731 dev = &ap->device[sdev->id];
701 732
702 /* TODO: 2048 is an arbitrary number, not the 733 ata_scsi_dev_config(sdev, dev);
703 * hardware maximum. This should be increased to
704 * 65534 when Jens Axboe's patch for dynamically
705 * determining max_sectors is merged.
706 */
707 max_sectors = ATA_MAX_SECTORS;
708 if (dev->flags & ATA_DFLAG_LBA48)
709 max_sectors = 2048;
710 if (dev->max_sectors)
711 max_sectors = dev->max_sectors;
712
713 blk_queue_max_sectors(sdev->request_queue, max_sectors);
714
715 /*
716 * SATA DMA transfers must be multiples of 4 byte, so
717 * we need to pad ATAPI transfers using an extra sg.
718 * Decrement max hw segments accordingly.
719 */
720 if (dev->class == ATA_DEV_ATAPI) {
721 request_queue_t *q = sdev->request_queue;
722 blk_queue_max_hw_segments(q, q->max_hw_segments - 1);
723 }
724 } 734 }
725 735
726 return 0; /* scsi layer doesn't check return value, sigh */ 736 return 0; /* scsi layer doesn't check return value, sigh */
@@ -1552,7 +1562,7 @@ void ata_scsi_rbuf_fill(struct ata_scsi_args *args,
1552 * @buflen: Response buffer length. 1562 * @buflen: Response buffer length.
1553 * 1563 *
1554 * Returns standard device identification data associated 1564 * Returns standard device identification data associated
1555 * with non-EVPD INQUIRY command output. 1565 * with non-VPD INQUIRY command output.
1556 * 1566 *
1557 * LOCKING: 1567 * LOCKING:
1558 * spin_lock_irqsave(host_set lock) 1568 * spin_lock_irqsave(host_set lock)
@@ -1603,12 +1613,12 @@ unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf,
1603} 1613}
1604 1614
1605/** 1615/**
1606 * ata_scsiop_inq_00 - Simulate INQUIRY EVPD page 0, list of pages 1616 * ata_scsiop_inq_00 - Simulate INQUIRY VPD page 0, list of pages
1607 * @args: device IDENTIFY data / SCSI command of interest. 1617 * @args: device IDENTIFY data / SCSI command of interest.
1608 * @rbuf: Response buffer, to which simulated SCSI cmd output is sent. 1618 * @rbuf: Response buffer, to which simulated SCSI cmd output is sent.
1609 * @buflen: Response buffer length. 1619 * @buflen: Response buffer length.
1610 * 1620 *
1611 * Returns list of inquiry EVPD pages available. 1621 * Returns list of inquiry VPD pages available.
1612 * 1622 *
1613 * LOCKING: 1623 * LOCKING:
1614 * spin_lock_irqsave(host_set lock) 1624 * spin_lock_irqsave(host_set lock)
@@ -1622,7 +1632,7 @@ unsigned int ata_scsiop_inq_00(struct ata_scsi_args *args, u8 *rbuf,
1622 0x80, /* page 0x80, unit serial no page */ 1632 0x80, /* page 0x80, unit serial no page */
1623 0x83 /* page 0x83, device ident page */ 1633 0x83 /* page 0x83, device ident page */
1624 }; 1634 };
1625 rbuf[3] = sizeof(pages); /* number of supported EVPD pages */ 1635 rbuf[3] = sizeof(pages); /* number of supported VPD pages */
1626 1636
1627 if (buflen > 6) 1637 if (buflen > 6)
1628 memcpy(rbuf + 4, pages, sizeof(pages)); 1638 memcpy(rbuf + 4, pages, sizeof(pages));
@@ -1631,7 +1641,7 @@ unsigned int ata_scsiop_inq_00(struct ata_scsi_args *args, u8 *rbuf,
1631} 1641}
1632 1642
1633/** 1643/**
1634 * ata_scsiop_inq_80 - Simulate INQUIRY EVPD page 80, device serial number 1644 * ata_scsiop_inq_80 - Simulate INQUIRY VPD page 80, device serial number
1635 * @args: device IDENTIFY data / SCSI command of interest. 1645 * @args: device IDENTIFY data / SCSI command of interest.
1636 * @rbuf: Response buffer, to which simulated SCSI cmd output is sent. 1646 * @rbuf: Response buffer, to which simulated SCSI cmd output is sent.
1637 * @buflen: Response buffer length. 1647 * @buflen: Response buffer length.
@@ -1660,16 +1670,16 @@ unsigned int ata_scsiop_inq_80(struct ata_scsi_args *args, u8 *rbuf,
1660 return 0; 1670 return 0;
1661} 1671}
1662 1672
1663static const char * const inq_83_str = "Linux ATA-SCSI simulator";
1664
1665/** 1673/**
1666 * ata_scsiop_inq_83 - Simulate INQUIRY EVPD page 83, device identity 1674 * ata_scsiop_inq_83 - Simulate INQUIRY VPD page 83, device identity
1667 * @args: device IDENTIFY data / SCSI command of interest. 1675 * @args: device IDENTIFY data / SCSI command of interest.
1668 * @rbuf: Response buffer, to which simulated SCSI cmd output is sent. 1676 * @rbuf: Response buffer, to which simulated SCSI cmd output is sent.
1669 * @buflen: Response buffer length. 1677 * @buflen: Response buffer length.
1670 * 1678 *
1671 * Returns device identification. Currently hardcoded to 1679 * Yields two logical unit device identification designators:
1672 * return "Linux ATA-SCSI simulator". 1680 * - vendor specific ASCII containing the ATA serial number
1681 * - SAT defined "t10 vendor id based" containing ASCII vendor
1682 * name ("ATA "), model and serial numbers.
1673 * 1683 *
1674 * LOCKING: 1684 * LOCKING:
1675 * spin_lock_irqsave(host_set lock) 1685 * spin_lock_irqsave(host_set lock)
@@ -1678,16 +1688,39 @@ static const char * const inq_83_str = "Linux ATA-SCSI simulator";
1678unsigned int ata_scsiop_inq_83(struct ata_scsi_args *args, u8 *rbuf, 1688unsigned int ata_scsiop_inq_83(struct ata_scsi_args *args, u8 *rbuf,
1679 unsigned int buflen) 1689 unsigned int buflen)
1680{ 1690{
1681 rbuf[1] = 0x83; /* this page code */ 1691 int num;
1682 rbuf[3] = 4 + strlen(inq_83_str); /* page len */ 1692 const int sat_model_serial_desc_len = 68;
1693 const int ata_model_byte_len = 40;
1683 1694
1684 /* our one and only identification descriptor (vendor-specific) */ 1695 rbuf[1] = 0x83; /* this page code */
1685 if (buflen > (strlen(inq_83_str) + 4 + 4 - 1)) { 1696 num = 4;
1686 rbuf[4 + 0] = 2; /* code set: ASCII */ 1697
1687 rbuf[4 + 3] = strlen(inq_83_str); 1698 if (buflen > (ATA_SERNO_LEN + num + 3)) {
1688 memcpy(rbuf + 4 + 4, inq_83_str, strlen(inq_83_str)); 1699 /* piv=0, assoc=lu, code_set=ACSII, designator=vendor */
1700 rbuf[num + 0] = 2;
1701 rbuf[num + 3] = ATA_SERNO_LEN;
1702 num += 4;
1703 ata_id_string(args->id, (unsigned char *) rbuf + num,
1704 ATA_ID_SERNO_OFS, ATA_SERNO_LEN);
1705 num += ATA_SERNO_LEN;
1689 } 1706 }
1690 1707 if (buflen > (sat_model_serial_desc_len + num + 3)) {
1708 /* SAT defined lu model and serial numbers descriptor */
1709 /* piv=0, assoc=lu, code_set=ACSII, designator=t10 vendor id */
1710 rbuf[num + 0] = 2;
1711 rbuf[num + 1] = 1;
1712 rbuf[num + 3] = sat_model_serial_desc_len;
1713 num += 4;
1714 memcpy(rbuf + num, "ATA ", 8);
1715 num += 8;
1716 ata_id_string(args->id, (unsigned char *) rbuf + num,
1717 ATA_ID_PROD_OFS, ata_model_byte_len);
1718 num += ata_model_byte_len;
1719 ata_id_string(args->id, (unsigned char *) rbuf + num,
1720 ATA_ID_SERNO_OFS, ATA_SERNO_LEN);
1721 num += ATA_SERNO_LEN;
1722 }
1723 rbuf[3] = num - 4; /* page len (assume less than 256 bytes) */
1691 return 0; 1724 return 0;
1692} 1725}
1693 1726
@@ -2366,9 +2399,6 @@ ata_scsi_map_proto(u8 byte1)
2366 2399
2367 case 4: /* PIO Data-in */ 2400 case 4: /* PIO Data-in */
2368 case 5: /* PIO Data-out */ 2401 case 5: /* PIO Data-out */
2369 if (byte1 & 0xe0) {
2370 return ATA_PROT_PIO_MULT;
2371 }
2372 return ATA_PROT_PIO; 2402 return ATA_PROT_PIO;
2373 2403
2374 case 10: /* Device Reset */ 2404 case 10: /* Device Reset */
@@ -2407,6 +2437,10 @@ ata_scsi_pass_thru(struct ata_queued_cmd *qc, const u8 *scsicmd)
2407 if ((tf->protocol = ata_scsi_map_proto(scsicmd[1])) == ATA_PROT_UNKNOWN) 2437 if ((tf->protocol = ata_scsi_map_proto(scsicmd[1])) == ATA_PROT_UNKNOWN)
2408 goto invalid_fld; 2438 goto invalid_fld;
2409 2439
2440 if (scsicmd[1] & 0xe0)
2441 /* PIO multi not supported yet */
2442 goto invalid_fld;
2443
2410 /* 2444 /*
2411 * 12 and 16 byte CDBs use different offsets to 2445 * 12 and 16 byte CDBs use different offsets to
2412 * provide the various register values. 2446 * provide the various register values.
diff --git a/drivers/scsi/pdc_adma.c b/drivers/scsi/pdc_adma.c
index b3dc5f85ae0b..3c85c4b66e19 100644
--- a/drivers/scsi/pdc_adma.c
+++ b/drivers/scsi/pdc_adma.c
@@ -321,7 +321,7 @@ static int adma_fill_sg(struct ata_queued_cmd *qc)
321 = (pFLAGS & pEND) ? 0 : cpu_to_le32(pp->pkt_dma + i + 4); 321 = (pFLAGS & pEND) ? 0 : cpu_to_le32(pp->pkt_dma + i + 4);
322 i += 4; 322 i += 4;
323 323
324 VPRINTK("PRD[%u] = (0x%lX, 0x%X)\n", nelem, 324 VPRINTK("PRD[%u] = (0x%lX, 0x%X)\n", i/4,
325 (unsigned long)addr, len); 325 (unsigned long)addr, len);
326 } 326 }
327 return i; 327 return i;
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c
index 874c5be0843c..275ed9bd898c 100644
--- a/drivers/scsi/sata_mv.c
+++ b/drivers/scsi/sata_mv.c
@@ -1262,6 +1262,7 @@ static u8 mv_get_crpb_status(struct ata_port *ap)
1262 void __iomem *port_mmio = mv_ap_base(ap); 1262 void __iomem *port_mmio = mv_ap_base(ap);
1263 struct mv_port_priv *pp = ap->private_data; 1263 struct mv_port_priv *pp = ap->private_data;
1264 u32 out_ptr; 1264 u32 out_ptr;
1265 u8 ata_status;
1265 1266
1266 out_ptr = readl(port_mmio + EDMA_RSP_Q_OUT_PTR_OFS); 1267 out_ptr = readl(port_mmio + EDMA_RSP_Q_OUT_PTR_OFS);
1267 1268
@@ -1269,6 +1270,8 @@ static u8 mv_get_crpb_status(struct ata_port *ap)
1269 WARN_ON(((out_ptr >> EDMA_RSP_Q_PTR_SHIFT) & MV_MAX_Q_DEPTH_MASK) != 1270 WARN_ON(((out_ptr >> EDMA_RSP_Q_PTR_SHIFT) & MV_MAX_Q_DEPTH_MASK) !=
1270 pp->rsp_consumer); 1271 pp->rsp_consumer);
1271 1272
1273 ata_status = pp->crpb[pp->rsp_consumer].flags >> CRPB_FLAG_STATUS_SHIFT;
1274
1272 /* increment our consumer index... */ 1275 /* increment our consumer index... */
1273 pp->rsp_consumer = mv_inc_q_index(&pp->rsp_consumer); 1276 pp->rsp_consumer = mv_inc_q_index(&pp->rsp_consumer);
1274 1277
@@ -1283,7 +1286,7 @@ static u8 mv_get_crpb_status(struct ata_port *ap)
1283 writelfl(out_ptr, port_mmio + EDMA_RSP_Q_OUT_PTR_OFS); 1286 writelfl(out_ptr, port_mmio + EDMA_RSP_Q_OUT_PTR_OFS);
1284 1287
1285 /* Return ATA status register for completed CRPB */ 1288 /* Return ATA status register for completed CRPB */
1286 return (pp->crpb[pp->rsp_consumer].flags >> CRPB_FLAG_STATUS_SHIFT); 1289 return ata_status;
1287} 1290}
1288 1291
1289/** 1292/**
diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c
index 051e47d975ca..724f0ed6a52d 100644
--- a/drivers/scsi/sata_svw.c
+++ b/drivers/scsi/sata_svw.c
@@ -56,33 +56,35 @@
56#define DRV_NAME "sata_svw" 56#define DRV_NAME "sata_svw"
57#define DRV_VERSION "1.07" 57#define DRV_VERSION "1.07"
58 58
59/* Taskfile registers offsets */ 59enum {
60#define K2_SATA_TF_CMD_OFFSET 0x00 60 /* Taskfile registers offsets */
61#define K2_SATA_TF_DATA_OFFSET 0x00 61 K2_SATA_TF_CMD_OFFSET = 0x00,
62#define K2_SATA_TF_ERROR_OFFSET 0x04 62 K2_SATA_TF_DATA_OFFSET = 0x00,
63#define K2_SATA_TF_NSECT_OFFSET 0x08 63 K2_SATA_TF_ERROR_OFFSET = 0x04,
64#define K2_SATA_TF_LBAL_OFFSET 0x0c 64 K2_SATA_TF_NSECT_OFFSET = 0x08,
65#define K2_SATA_TF_LBAM_OFFSET 0x10 65 K2_SATA_TF_LBAL_OFFSET = 0x0c,
66#define K2_SATA_TF_LBAH_OFFSET 0x14 66 K2_SATA_TF_LBAM_OFFSET = 0x10,
67#define K2_SATA_TF_DEVICE_OFFSET 0x18 67 K2_SATA_TF_LBAH_OFFSET = 0x14,
68#define K2_SATA_TF_CMDSTAT_OFFSET 0x1c 68 K2_SATA_TF_DEVICE_OFFSET = 0x18,
69#define K2_SATA_TF_CTL_OFFSET 0x20 69 K2_SATA_TF_CMDSTAT_OFFSET = 0x1c,
70 70 K2_SATA_TF_CTL_OFFSET = 0x20,
71/* DMA base */ 71
72#define K2_SATA_DMA_CMD_OFFSET 0x30 72 /* DMA base */
73 73 K2_SATA_DMA_CMD_OFFSET = 0x30,
74/* SCRs base */ 74
75#define K2_SATA_SCR_STATUS_OFFSET 0x40 75 /* SCRs base */
76#define K2_SATA_SCR_ERROR_OFFSET 0x44 76 K2_SATA_SCR_STATUS_OFFSET = 0x40,
77#define K2_SATA_SCR_CONTROL_OFFSET 0x48 77 K2_SATA_SCR_ERROR_OFFSET = 0x44,
78 78 K2_SATA_SCR_CONTROL_OFFSET = 0x48,
79/* Others */ 79
80#define K2_SATA_SICR1_OFFSET 0x80 80 /* Others */
81#define K2_SATA_SICR2_OFFSET 0x84 81 K2_SATA_SICR1_OFFSET = 0x80,
82#define K2_SATA_SIM_OFFSET 0x88 82 K2_SATA_SICR2_OFFSET = 0x84,
83 83 K2_SATA_SIM_OFFSET = 0x88,
84/* Port stride */ 84
85#define K2_SATA_PORT_OFFSET 0x100 85 /* Port stride */
86 K2_SATA_PORT_OFFSET = 0x100,
87};
86 88
87static u8 k2_stat_check_status(struct ata_port *ap); 89static u8 k2_stat_check_status(struct ata_port *ap);
88 90
diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c
index ee75b9b38ae8..9701a806539d 100644
--- a/drivers/scsi/sata_vsc.c
+++ b/drivers/scsi/sata_vsc.c
@@ -47,52 +47,58 @@
47#include <linux/libata.h> 47#include <linux/libata.h>
48 48
49#define DRV_NAME "sata_vsc" 49#define DRV_NAME "sata_vsc"
50#define DRV_VERSION "1.1" 50#define DRV_VERSION "1.2"
51 51
52/* Interrupt register offsets (from chip base address) */ 52enum {
53#define VSC_SATA_INT_STAT_OFFSET 0x00 53 /* Interrupt register offsets (from chip base address) */
54#define VSC_SATA_INT_MASK_OFFSET 0x04 54 VSC_SATA_INT_STAT_OFFSET = 0x00,
55 55 VSC_SATA_INT_MASK_OFFSET = 0x04,
56/* Taskfile registers offsets */ 56
57#define VSC_SATA_TF_CMD_OFFSET 0x00 57 /* Taskfile registers offsets */
58#define VSC_SATA_TF_DATA_OFFSET 0x00 58 VSC_SATA_TF_CMD_OFFSET = 0x00,
59#define VSC_SATA_TF_ERROR_OFFSET 0x04 59 VSC_SATA_TF_DATA_OFFSET = 0x00,
60#define VSC_SATA_TF_FEATURE_OFFSET 0x06 60 VSC_SATA_TF_ERROR_OFFSET = 0x04,
61#define VSC_SATA_TF_NSECT_OFFSET 0x08 61 VSC_SATA_TF_FEATURE_OFFSET = 0x06,
62#define VSC_SATA_TF_LBAL_OFFSET 0x0c 62 VSC_SATA_TF_NSECT_OFFSET = 0x08,
63#define VSC_SATA_TF_LBAM_OFFSET 0x10 63 VSC_SATA_TF_LBAL_OFFSET = 0x0c,
64#define VSC_SATA_TF_LBAH_OFFSET 0x14 64 VSC_SATA_TF_LBAM_OFFSET = 0x10,
65#define VSC_SATA_TF_DEVICE_OFFSET 0x18 65 VSC_SATA_TF_LBAH_OFFSET = 0x14,
66#define VSC_SATA_TF_STATUS_OFFSET 0x1c 66 VSC_SATA_TF_DEVICE_OFFSET = 0x18,
67#define VSC_SATA_TF_COMMAND_OFFSET 0x1d 67 VSC_SATA_TF_STATUS_OFFSET = 0x1c,
68#define VSC_SATA_TF_ALTSTATUS_OFFSET 0x28 68 VSC_SATA_TF_COMMAND_OFFSET = 0x1d,
69#define VSC_SATA_TF_CTL_OFFSET 0x29 69 VSC_SATA_TF_ALTSTATUS_OFFSET = 0x28,
70 70 VSC_SATA_TF_CTL_OFFSET = 0x29,
71/* DMA base */ 71
72#define VSC_SATA_UP_DESCRIPTOR_OFFSET 0x64 72 /* DMA base */
73#define VSC_SATA_UP_DATA_BUFFER_OFFSET 0x6C 73 VSC_SATA_UP_DESCRIPTOR_OFFSET = 0x64,
74#define VSC_SATA_DMA_CMD_OFFSET 0x70 74 VSC_SATA_UP_DATA_BUFFER_OFFSET = 0x6C,
75 75 VSC_SATA_DMA_CMD_OFFSET = 0x70,
76/* SCRs base */ 76
77#define VSC_SATA_SCR_STATUS_OFFSET 0x100 77 /* SCRs base */
78#define VSC_SATA_SCR_ERROR_OFFSET 0x104 78 VSC_SATA_SCR_STATUS_OFFSET = 0x100,
79#define VSC_SATA_SCR_CONTROL_OFFSET 0x108 79 VSC_SATA_SCR_ERROR_OFFSET = 0x104,
80 80 VSC_SATA_SCR_CONTROL_OFFSET = 0x108,
81/* Port stride */ 81
82#define VSC_SATA_PORT_OFFSET 0x200 82 /* Port stride */
83 83 VSC_SATA_PORT_OFFSET = 0x200,
84/* Error interrupt status bit offsets */ 84
85#define VSC_SATA_INT_ERROR_E_OFFSET 2 85 /* Error interrupt status bit offsets */
86#define VSC_SATA_INT_ERROR_P_OFFSET 4 86 VSC_SATA_INT_ERROR_CRC = 0x40,
87#define VSC_SATA_INT_ERROR_T_OFFSET 5 87 VSC_SATA_INT_ERROR_T = 0x20,
88#define VSC_SATA_INT_ERROR_M_OFFSET 1 88 VSC_SATA_INT_ERROR_P = 0x10,
89 VSC_SATA_INT_ERROR_R = 0x8,
90 VSC_SATA_INT_ERROR_E = 0x4,
91 VSC_SATA_INT_ERROR_M = 0x2,
92 VSC_SATA_INT_PHY_CHANGE = 0x1,
93 VSC_SATA_INT_ERROR = (VSC_SATA_INT_ERROR_CRC | VSC_SATA_INT_ERROR_T | \
94 VSC_SATA_INT_ERROR_P | VSC_SATA_INT_ERROR_R | \
95 VSC_SATA_INT_ERROR_E | VSC_SATA_INT_ERROR_M | \
96 VSC_SATA_INT_PHY_CHANGE),
97};
98
99
89#define is_vsc_sata_int_err(port_idx, int_status) \ 100#define is_vsc_sata_int_err(port_idx, int_status) \
90 (int_status & ((1 << (VSC_SATA_INT_ERROR_E_OFFSET + (8 * port_idx))) | \ 101 (int_status & (VSC_SATA_INT_ERROR << (8 * port_idx)))
91 (1 << (VSC_SATA_INT_ERROR_P_OFFSET + (8 * port_idx))) | \
92 (1 << (VSC_SATA_INT_ERROR_T_OFFSET + (8 * port_idx))) | \
93 (1 << (VSC_SATA_INT_ERROR_M_OFFSET + (8 * port_idx))) \
94 )\
95 )
96 102
97 103
98static u32 vsc_sata_scr_read (struct ata_port *ap, unsigned int sc_reg) 104static u32 vsc_sata_scr_read (struct ata_port *ap, unsigned int sc_reg)
@@ -215,14 +221,6 @@ static irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance,
215 221
216 ap = host_set->ports[i]; 222 ap = host_set->ports[i];
217 223
218 if (is_vsc_sata_int_err(i, int_status)) {
219 u32 err_status;
220 printk(KERN_DEBUG "%s: ignoring interrupt(s)\n", __FUNCTION__);
221 err_status = ap ? vsc_sata_scr_read(ap, SCR_ERROR) : 0;
222 vsc_sata_scr_write(ap, SCR_ERROR, err_status);
223 handled++;
224 }
225
226 if (ap && !(ap->flags & 224 if (ap && !(ap->flags &
227 (ATA_FLAG_PORT_DISABLED|ATA_FLAG_NOINTR))) { 225 (ATA_FLAG_PORT_DISABLED|ATA_FLAG_NOINTR))) {
228 struct ata_queued_cmd *qc; 226 struct ata_queued_cmd *qc;
@@ -230,12 +228,26 @@ static irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance,
230 qc = ata_qc_from_tag(ap, ap->active_tag); 228 qc = ata_qc_from_tag(ap, ap->active_tag);
231 if (qc && (!(qc->tf.ctl & ATA_NIEN))) { 229 if (qc && (!(qc->tf.ctl & ATA_NIEN))) {
232 handled += ata_host_intr(ap, qc); 230 handled += ata_host_intr(ap, qc);
233 } else { 231 } else if (is_vsc_sata_int_err(i, int_status)) {
234 printk(KERN_DEBUG "%s: ignoring interrupt(s)\n", __FUNCTION__); 232 /*
233 * On some chips (i.e. Intel 31244), an error
234 * interrupt will sneak in at initialization
235 * time (phy state changes). Clearing the SCR
236 * error register is not required, but it prevents
237 * the phy state change interrupts from recurring
238 * later.
239 */
240 u32 err_status;
241 err_status = vsc_sata_scr_read(ap, SCR_ERROR);
242 printk(KERN_DEBUG "%s: clearing interrupt, "
243 "status %x; sata err status %x\n",
244 __FUNCTION__,
245 int_status, err_status);
246 vsc_sata_scr_write(ap, SCR_ERROR, err_status);
247 /* Clear interrupt status */
235 ata_chk_status(ap); 248 ata_chk_status(ap);
236 handled++; 249 handled++;
237 } 250 }
238
239 } 251 }
240 } 252 }
241 } 253 }
diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c
index 8c5c276c5577..7572665a8855 100644
--- a/drivers/serial/21285.c
+++ b/drivers/serial/21285.c
@@ -375,23 +375,18 @@ static void serial21285_setup_ports(void)
375} 375}
376 376
377#ifdef CONFIG_SERIAL_21285_CONSOLE 377#ifdef CONFIG_SERIAL_21285_CONSOLE
378static void serial21285_console_putchar(struct uart_port *port, int ch)
379{
380 while (*CSR_UARTFLG & 0x20)
381 barrier();
382 *CSR_UARTDR = ch;
383}
378 384
379static void 385static void
380serial21285_console_write(struct console *co, const char *s, 386serial21285_console_write(struct console *co, const char *s,
381 unsigned int count) 387 unsigned int count)
382{ 388{
383 int i; 389 uart_console_write(&serial21285_port, s, count, serial21285_console_putchar);
384
385 for (i = 0; i < count; i++) {
386 while (*CSR_UARTFLG & 0x20)
387 barrier();
388 *CSR_UARTDR = s[i];
389 if (s[i] == '\n') {
390 while (*CSR_UARTFLG & 0x20)
391 barrier();
392 *CSR_UARTDR = '\r';
393 }
394 }
395} 390}
396 391
397static void __init 392static void __init
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 7aca22c9976d..5996d3cd0ed8 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2182,6 +2182,14 @@ static inline void wait_for_xmitr(struct uart_8250_port *up, int bits)
2182 } 2182 }
2183} 2183}
2184 2184
2185static void serial8250_console_putchar(struct uart_port *port, int ch)
2186{
2187 struct uart_8250_port *up = (struct uart_8250_port *)port;
2188
2189 wait_for_xmitr(up, UART_LSR_THRE);
2190 serial_out(up, UART_TX, ch);
2191}
2192
2185/* 2193/*
2186 * Print a string to the serial port trying not to disturb 2194 * Print a string to the serial port trying not to disturb
2187 * any possible real use of the port... 2195 * any possible real use of the port...
@@ -2193,7 +2201,6 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
2193{ 2201{
2194 struct uart_8250_port *up = &serial8250_ports[co->index]; 2202 struct uart_8250_port *up = &serial8250_ports[co->index];
2195 unsigned int ier; 2203 unsigned int ier;
2196 int i;
2197 2204
2198 touch_nmi_watchdog(); 2205 touch_nmi_watchdog();
2199 2206
@@ -2207,22 +2214,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
2207 else 2214 else
2208 serial_out(up, UART_IER, 0); 2215 serial_out(up, UART_IER, 0);
2209 2216
2210 /* 2217 uart_console_write(&up->port, s, count, serial8250_console_putchar);
2211 * Now, do each character
2212 */
2213 for (i = 0; i < count; i++, s++) {
2214 wait_for_xmitr(up, UART_LSR_THRE);
2215
2216 /*
2217 * Send the character out.
2218 * If a LF, also do CR...
2219 */
2220 serial_out(up, UART_TX, *s);
2221 if (*s == 10) {
2222 wait_for_xmitr(up, UART_LSR_THRE);
2223 serial_out(up, UART_TX, 13);
2224 }
2225 }
2226 2218
2227 /* 2219 /*
2228 * Finally, wait for transmitter to become empty 2220 * Finally, wait for transmitter to become empty
diff --git a/drivers/serial/8250_early.c b/drivers/serial/8250_early.c
index 59ba5d993b4b..7e511199b4c5 100644
--- a/drivers/serial/8250_early.c
+++ b/drivers/serial/8250_early.c
@@ -74,7 +74,7 @@ static void __init wait_for_xmitr(struct uart_port *port)
74 } 74 }
75} 75}
76 76
77static void __init putc(struct uart_port *port, unsigned char c) 77static void __init putc(struct uart_port *port, int c)
78{ 78{
79 wait_for_xmitr(port); 79 wait_for_xmitr(port);
80 serial_out(port, UART_TX, c); 80 serial_out(port, UART_TX, c);
@@ -89,12 +89,7 @@ static void __init early_uart_write(struct console *console, const char *s, unsi
89 ier = serial_in(port, UART_IER); 89 ier = serial_in(port, UART_IER);
90 serial_out(port, UART_IER, 0); 90 serial_out(port, UART_IER, 0);
91 91
92 while (*s && count-- > 0) { 92 uart_console_write(port, s, count, putc);
93 putc(port, *s);
94 if (*s == '\n')
95 putc(port, '\r');
96 s++;
97 }
98 93
99 /* Wait for transmitter to become empty and restore the IER */ 94 /* Wait for transmitter to become empty and restore the IER */
100 wait_for_xmitr(port); 95 wait_for_xmitr(port);
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c
index 321a3b3a5728..e04d5e82d9ae 100644
--- a/drivers/serial/amba-pl010.c
+++ b/drivers/serial/amba-pl010.c
@@ -591,12 +591,18 @@ static struct uart_amba_port amba_ports[UART_NR] = {
591 591
592#ifdef CONFIG_SERIAL_AMBA_PL010_CONSOLE 592#ifdef CONFIG_SERIAL_AMBA_PL010_CONSOLE
593 593
594static void pl010_console_putchar(struct uart_port *port, int ch)
595{
596 while (!UART_TX_READY(UART_GET_FR(port)))
597 barrier();
598 UART_PUT_CHAR(port, ch);
599}
600
594static void 601static void
595pl010_console_write(struct console *co, const char *s, unsigned int count) 602pl010_console_write(struct console *co, const char *s, unsigned int count)
596{ 603{
597 struct uart_port *port = &amba_ports[co->index].port; 604 struct uart_port *port = &amba_ports[co->index].port;
598 unsigned int status, old_cr; 605 unsigned int status, old_cr;
599 int i;
600 606
601 /* 607 /*
602 * First save the CR then disable the interrupts 608 * First save the CR then disable the interrupts
@@ -604,21 +610,7 @@ pl010_console_write(struct console *co, const char *s, unsigned int count)
604 old_cr = UART_GET_CR(port); 610 old_cr = UART_GET_CR(port);
605 UART_PUT_CR(port, UART01x_CR_UARTEN); 611 UART_PUT_CR(port, UART01x_CR_UARTEN);
606 612
607 /* 613 uart_console_write(port, s, count, pl010_console_putchar);
608 * Now, do each character
609 */
610 for (i = 0; i < count; i++) {
611 do {
612 status = UART_GET_FR(port);
613 } while (!UART_TX_READY(status));
614 UART_PUT_CHAR(port, s[i]);
615 if (s[i] == '\n') {
616 do {
617 status = UART_GET_FR(port);
618 } while (!UART_TX_READY(status));
619 UART_PUT_CHAR(port, '\r');
620 }
621 }
622 614
623 /* 615 /*
624 * Finally, wait for transmitter to become empty 616 * Finally, wait for transmitter to become empty
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
index 034a029e356e..3d966cfc9a38 100644
--- a/drivers/serial/amba-pl011.c
+++ b/drivers/serial/amba-pl011.c
@@ -587,14 +587,12 @@ static struct uart_amba_port *amba_ports[UART_NR];
587 587
588#ifdef CONFIG_SERIAL_AMBA_PL011_CONSOLE 588#ifdef CONFIG_SERIAL_AMBA_PL011_CONSOLE
589 589
590static inline void 590static void pl011_console_putchar(struct uart_port *port, int ch)
591pl011_console_write_char(struct uart_amba_port *uap, char ch)
592{ 591{
593 unsigned int status; 592 struct uart_amba_port *uap = (struct uart_amba_port *)port;
594 593
595 do { 594 while (readw(uap->port.membase + UART01x_FR) & UART01x_FR_TXFF)
596 status = readw(uap->port.membase + UART01x_FR); 595 barrier();
597 } while (status & UART01x_FR_TXFF);
598 writew(ch, uap->port.membase + UART01x_DR); 596 writew(ch, uap->port.membase + UART01x_DR);
599} 597}
600 598
@@ -603,7 +601,6 @@ pl011_console_write(struct console *co, const char *s, unsigned int count)
603{ 601{
604 struct uart_amba_port *uap = amba_ports[co->index]; 602 struct uart_amba_port *uap = amba_ports[co->index];
605 unsigned int status, old_cr, new_cr; 603 unsigned int status, old_cr, new_cr;
606 int i;
607 604
608 clk_enable(uap->clk); 605 clk_enable(uap->clk);
609 606
@@ -615,14 +612,7 @@ pl011_console_write(struct console *co, const char *s, unsigned int count)
615 new_cr |= UART01x_CR_UARTEN | UART011_CR_TXE; 612 new_cr |= UART01x_CR_UARTEN | UART011_CR_TXE;
616 writew(new_cr, uap->port.membase + UART011_CR); 613 writew(new_cr, uap->port.membase + UART011_CR);
617 614
618 /* 615 uart_console_write(&uap->port, s, count, pl011_console_putchar);
619 * Now, do each character
620 */
621 for (i = 0; i < count; i++) {
622 pl011_console_write_char(uap, s[i]);
623 if (s[i] == '\n')
624 pl011_console_write_char(uap, '\r');
625 }
626 616
627 /* 617 /*
628 * Finally, wait for transmitter to become empty 618 * Finally, wait for transmitter to become empty
diff --git a/drivers/serial/at91_serial.c b/drivers/serial/at91_serial.c
index 2113feb75c39..6547fe0cef96 100644
--- a/drivers/serial/at91_serial.c
+++ b/drivers/serial/at91_serial.c
@@ -711,6 +711,12 @@ void __init at91_register_uart(int idx, int port)
711} 711}
712 712
713#ifdef CONFIG_SERIAL_AT91_CONSOLE 713#ifdef CONFIG_SERIAL_AT91_CONSOLE
714static void at91_console_putchar(struct uart_port *port, int ch)
715{
716 while (!(UART_GET_CSR(port) & AT91_US_TXRDY))
717 barrier();
718 UART_PUT_CHAR(port, ch);
719}
714 720
715/* 721/*
716 * Interrupts are disabled on entering 722 * Interrupts are disabled on entering
@@ -718,7 +724,7 @@ void __init at91_register_uart(int idx, int port)
718static void at91_console_write(struct console *co, const char *s, u_int count) 724static void at91_console_write(struct console *co, const char *s, u_int count)
719{ 725{
720 struct uart_port *port = at91_ports + co->index; 726 struct uart_port *port = at91_ports + co->index;
721 unsigned int status, i, imr; 727 unsigned int status, imr;
722 728
723 /* 729 /*
724 * First, save IMR and then disable interrupts 730 * First, save IMR and then disable interrupts
@@ -726,21 +732,7 @@ static void at91_console_write(struct console *co, const char *s, u_int count)
726 imr = UART_GET_IMR(port); /* get interrupt mask */ 732 imr = UART_GET_IMR(port); /* get interrupt mask */
727 UART_PUT_IDR(port, AT91_US_RXRDY | AT91_US_TXRDY); 733 UART_PUT_IDR(port, AT91_US_RXRDY | AT91_US_TXRDY);
728 734
729 /* 735 uart_console_write(port, s, count, at91_console_putchar);
730 * Now, do each character
731 */
732 for (i = 0; i < count; i++) {
733 do {
734 status = UART_GET_CSR(port);
735 } while (!(status & AT91_US_TXRDY));
736 UART_PUT_CHAR(port, s[i]);
737 if (s[i] == '\n') {
738 do {
739 status = UART_GET_CSR(port);
740 } while (!(status & AT91_US_TXRDY));
741 UART_PUT_CHAR(port, '\r');
742 }
743 }
744 736
745 /* 737 /*
746 * Finally, wait for transmitter to become empty 738 * Finally, wait for transmitter to become empty
diff --git a/drivers/serial/au1x00_uart.c b/drivers/serial/au1x00_uart.c
index 344022fe53ef..29f94bbb79be 100644
--- a/drivers/serial/au1x00_uart.c
+++ b/drivers/serial/au1x00_uart.c
@@ -1121,6 +1121,14 @@ static inline void wait_for_xmitr(struct uart_8250_port *up)
1121 } 1121 }
1122} 1122}
1123 1123
1124static void au1x00_console_putchar(struct uart_port *port, int ch)
1125{
1126 struct uart_8250_port *up = (struct uart_8250_port *)port;
1127
1128 wait_for_xmitr(up);
1129 serial_out(up, UART_TX, ch);
1130}
1131
1124/* 1132/*
1125 * Print a string to the serial port trying not to disturb 1133 * Print a string to the serial port trying not to disturb
1126 * any possible real use of the port... 1134 * any possible real use of the port...
@@ -1132,7 +1140,6 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
1132{ 1140{
1133 struct uart_8250_port *up = &serial8250_ports[co->index]; 1141 struct uart_8250_port *up = &serial8250_ports[co->index];
1134 unsigned int ier; 1142 unsigned int ier;
1135 int i;
1136 1143
1137 /* 1144 /*
1138 * First save the UER then disable the interrupts 1145 * First save the UER then disable the interrupts
@@ -1140,22 +1147,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
1140 ier = serial_in(up, UART_IER); 1147 ier = serial_in(up, UART_IER);
1141 serial_out(up, UART_IER, 0); 1148 serial_out(up, UART_IER, 0);
1142 1149
1143 /* 1150 uart_console_write(&up->port, s, count, au1x00_console_putchar);
1144 * Now, do each character
1145 */
1146 for (i = 0; i < count; i++, s++) {
1147 wait_for_xmitr(up);
1148
1149 /*
1150 * Send the character out.
1151 * If a LF, also do CR...
1152 */
1153 serial_out(up, UART_TX, *s);
1154 if (*s == 10) {
1155 wait_for_xmitr(up);
1156 serial_out(up, UART_TX, 13);
1157 }
1158 }
1159 1151
1160 /* 1152 /*
1161 * Finally, wait for transmitter to become empty 1153 * Finally, wait for transmitter to become empty
diff --git a/drivers/serial/clps711x.c b/drivers/serial/clps711x.c
index ce7b2e4ecd17..2691112c84ad 100644
--- a/drivers/serial/clps711x.c
+++ b/drivers/serial/clps711x.c
@@ -424,6 +424,13 @@ static struct uart_port clps711x_ports[UART_NR] = {
424}; 424};
425 425
426#ifdef CONFIG_SERIAL_CLPS711X_CONSOLE 426#ifdef CONFIG_SERIAL_CLPS711X_CONSOLE
427static void clps711xuart_console_putchar(struct uart_port *port, int ch)
428{
429 while (clps_readl(SYSFLG(port)) & SYSFLG_UTXFF)
430 barrier();
431 clps_writel(ch, UARTDR(port));
432}
433
427/* 434/*
428 * Print a string to the serial port trying not to disturb 435 * Print a string to the serial port trying not to disturb
429 * any possible real use of the port... 436 * any possible real use of the port...
@@ -438,7 +445,6 @@ clps711xuart_console_write(struct console *co, const char *s,
438{ 445{
439 struct uart_port *port = clps711x_ports + co->index; 446 struct uart_port *port = clps711x_ports + co->index;
440 unsigned int status, syscon; 447 unsigned int status, syscon;
441 int i;
442 448
443 /* 449 /*
444 * Ensure that the port is enabled. 450 * Ensure that the port is enabled.
@@ -446,21 +452,7 @@ clps711xuart_console_write(struct console *co, const char *s,
446 syscon = clps_readl(SYSCON(port)); 452 syscon = clps_readl(SYSCON(port));
447 clps_writel(syscon | SYSCON_UARTEN, SYSCON(port)); 453 clps_writel(syscon | SYSCON_UARTEN, SYSCON(port));
448 454
449 /* 455 uart_console_write(port, s, count, clps711xuart_console_putchar);
450 * Now, do each character
451 */
452 for (i = 0; i < count; i++) {
453 do {
454 status = clps_readl(SYSFLG(port));
455 } while (status & SYSFLG_UTXFF);
456 clps_writel(s[i], UARTDR(port));
457 if (s[i] == '\n') {
458 do {
459 status = clps_readl(SYSFLG(port));
460 } while (status & SYSFLG_UTXFF);
461 clps_writel('\r', UARTDR(port));
462 }
463 }
464 456
465 /* 457 /*
466 * Finally, wait for transmitter to become empty 458 * Finally, wait for transmitter to become empty
diff --git a/drivers/serial/dz.c b/drivers/serial/dz.c
index ba5541de673b..bf71bad5c34f 100644
--- a/drivers/serial/dz.c
+++ b/drivers/serial/dz.c
@@ -674,11 +674,12 @@ static void dz_reset(struct dz_port *dport)
674} 674}
675 675
676#ifdef CONFIG_SERIAL_DZ_CONSOLE 676#ifdef CONFIG_SERIAL_DZ_CONSOLE
677static void dz_console_put_char(struct dz_port *dport, unsigned char ch) 677static void dz_console_putchar(struct uart_port *port, int ch)
678{ 678{
679 struct dz_port *dport = (struct dz_port *)uport;
679 unsigned long flags; 680 unsigned long flags;
680 int loops = 2500; 681 int loops = 2500;
681 unsigned short tmp = ch; 682 unsigned short tmp = (unsigned char)ch;
682 /* this code sends stuff out to serial device - spinning its 683 /* this code sends stuff out to serial device - spinning its
683 wheels and waiting. */ 684 wheels and waiting. */
684 685
@@ -694,6 +695,7 @@ static void dz_console_put_char(struct dz_port *dport, unsigned char ch)
694 695
695 spin_unlock_irqrestore(&dport->port.lock, flags); 696 spin_unlock_irqrestore(&dport->port.lock, flags);
696} 697}
698
697/* 699/*
698 * ------------------------------------------------------------------- 700 * -------------------------------------------------------------------
699 * dz_console_print () 701 * dz_console_print ()
@@ -710,11 +712,7 @@ static void dz_console_print(struct console *cons,
710#ifdef DEBUG_DZ 712#ifdef DEBUG_DZ
711 prom_printf((char *) str); 713 prom_printf((char *) str);
712#endif 714#endif
713 while (count--) { 715 uart_console_write(&dport->port, str, count, dz_console_putchar);
714 if (*str == '\n')
715 dz_console_put_char(dport, '\r');
716 dz_console_put_char(dport, *str++);
717 }
718} 716}
719 717
720static int __init dz_console_setup(struct console *co, char *options) 718static int __init dz_console_setup(struct console *co, char *options)
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index 4d53fb5ca87b..c3b7a6673e9c 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -743,6 +743,13 @@ static void __init imx_init_ports(void)
743} 743}
744 744
745#ifdef CONFIG_SERIAL_IMX_CONSOLE 745#ifdef CONFIG_SERIAL_IMX_CONSOLE
746static void imx_console_putchar(struct uart_port *port, int ch)
747{
748 struct imx_port *sport = (struct imx_port *)port;
749 while ((UTS((u32)sport->port.membase) & UTS_TXFULL))
750 barrier();
751 URTX0((u32)sport->port.membase) = ch;
752}
746 753
747/* 754/*
748 * Interrupts are disabled on entering 755 * Interrupts are disabled on entering
@@ -751,7 +758,7 @@ static void
751imx_console_write(struct console *co, const char *s, unsigned int count) 758imx_console_write(struct console *co, const char *s, unsigned int count)
752{ 759{
753 struct imx_port *sport = &imx_ports[co->index]; 760 struct imx_port *sport = &imx_ports[co->index];
754 unsigned int old_ucr1, old_ucr2, i; 761 unsigned int old_ucr1, old_ucr2;
755 762
756 /* 763 /*
757 * First, save UCR1/2 and then disable interrupts 764 * First, save UCR1/2 and then disable interrupts
@@ -764,22 +771,7 @@ imx_console_write(struct console *co, const char *s, unsigned int count)
764 & ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN); 771 & ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN);
765 UCR2((u32)sport->port.membase) = old_ucr2 | UCR2_TXEN; 772 UCR2((u32)sport->port.membase) = old_ucr2 | UCR2_TXEN;
766 773
767 /* 774 uart_console_write(&sport->port, s, count, imx_console_putchar);
768 * Now, do each character
769 */
770 for (i = 0; i < count; i++) {
771
772 while ((UTS((u32)sport->port.membase) & UTS_TXFULL))
773 barrier();
774
775 URTX0((u32)sport->port.membase) = s[i];
776
777 if (s[i] == '\n') {
778 while ((UTS((u32)sport->port.membase) & UTS_TXFULL))
779 barrier();
780 URTX0((u32)sport->port.membase) = '\r';
781 }
782 }
783 775
784 /* 776 /*
785 * Finally, wait for transmitter to become empty 777 * Finally, wait for transmitter to become empty
diff --git a/drivers/serial/ip22zilog.c b/drivers/serial/ip22zilog.c
index 193722d680cf..651772474ac1 100644
--- a/drivers/serial/ip22zilog.c
+++ b/drivers/serial/ip22zilog.c
@@ -967,8 +967,9 @@ static struct zilog_layout * __init get_zs(int chip)
967#define ZS_PUT_CHAR_MAX_DELAY 2000 /* 10 ms */ 967#define ZS_PUT_CHAR_MAX_DELAY 2000 /* 10 ms */
968 968
969#ifdef CONFIG_SERIAL_IP22_ZILOG_CONSOLE 969#ifdef CONFIG_SERIAL_IP22_ZILOG_CONSOLE
970static void ip22zilog_put_char(struct zilog_channel *channel, unsigned char ch) 970static void ip22zilog_put_char(struct uart_port *port, int ch)
971{ 971{
972 struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(port);
972 int loops = ZS_PUT_CHAR_MAX_DELAY; 973 int loops = ZS_PUT_CHAR_MAX_DELAY;
973 974
974 /* This is a timed polling loop so do not switch the explicit 975 /* This is a timed polling loop so do not switch the explicit
@@ -992,16 +993,10 @@ static void
992ip22zilog_console_write(struct console *con, const char *s, unsigned int count) 993ip22zilog_console_write(struct console *con, const char *s, unsigned int count)
993{ 994{
994 struct uart_ip22zilog_port *up = &ip22zilog_port_table[con->index]; 995 struct uart_ip22zilog_port *up = &ip22zilog_port_table[con->index];
995 struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(&up->port);
996 unsigned long flags; 996 unsigned long flags;
997 int i;
998 997
999 spin_lock_irqsave(&up->port.lock, flags); 998 spin_lock_irqsave(&up->port.lock, flags);
1000 for (i = 0; i < count; i++, s++) { 999 uart_console_write(&up->port, s, count, ip22zilog_put_char);
1001 ip22zilog_put_char(channel, *s);
1002 if (*s == 10)
1003 ip22zilog_put_char(channel, 13);
1004 }
1005 udelay(2); 1000 udelay(2);
1006 spin_unlock_irqrestore(&up->port.lock, flags); 1001 spin_unlock_irqrestore(&up->port.lock, flags);
1007} 1002}
diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c
index 242a04104393..876bc5e027bb 100644
--- a/drivers/serial/m32r_sio.c
+++ b/drivers/serial/m32r_sio.c
@@ -1039,6 +1039,14 @@ static inline void wait_for_xmitr(struct uart_sio_port *up)
1039 } 1039 }
1040} 1040}
1041 1041
1042static void m32r_sio_console_putchar(struct uart_port *port, int ch)
1043{
1044 struct uart_sio_port *up = (struct uart_sio_port *)port;
1045
1046 wait_for_xmitr(up);
1047 sio_out(up, SIOTXB, ch);
1048}
1049
1042/* 1050/*
1043 * Print a string to the serial port trying not to disturb 1051 * Print a string to the serial port trying not to disturb
1044 * any possible real use of the port... 1052 * any possible real use of the port...
@@ -1058,23 +1066,7 @@ static void m32r_sio_console_write(struct console *co, const char *s,
1058 ier = sio_in(up, SIOTRCR); 1066 ier = sio_in(up, SIOTRCR);
1059 sio_out(up, SIOTRCR, 0); 1067 sio_out(up, SIOTRCR, 0);
1060 1068
1061 /* 1069 uart_console_write(&up->port, s, count, m32r_sio_console_putchar);
1062 * Now, do each character
1063 */
1064 for (i = 0; i < count; i++, s++) {
1065 wait_for_xmitr(up);
1066
1067 /*
1068 * Send the character out.
1069 * If a LF, also do CR...
1070 */
1071 sio_out(up, SIOTXB, *s);
1072
1073 if (*s == 10) {
1074 wait_for_xmitr(up);
1075 sio_out(up, SIOTXB, 13);
1076 }
1077 }
1078 1070
1079 /* 1071 /*
1080 * Finally, wait for transmitter to become empty 1072 * Finally, wait for transmitter to become empty
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 61dd17d7bace..928e6cf12dca 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -603,15 +603,14 @@ mpc52xx_console_write(struct console *co, const char *s, unsigned int count)
603 udelay(1); 603 udelay(1);
604 604
605 /* Write all the chars */ 605 /* Write all the chars */
606 for ( i=0 ; i<count ; i++ ) { 606 for (i = 0; i < count; i++, s++) {
607
608 /* Send the char */
609 out_8(&psc->mpc52xx_psc_buffer_8, *s);
610
611 /* Line return handling */ 607 /* Line return handling */
612 if ( *s++ == '\n' ) 608 if (*s == '\n')
613 out_8(&psc->mpc52xx_psc_buffer_8, '\r'); 609 out_8(&psc->mpc52xx_psc_buffer_8, '\r');
614 610
611 /* Send the char */
612 out_8(&psc->mpc52xx_psc_buffer_8, *s);
613
615 /* Wait the TX buffer to be empty */ 614 /* Wait the TX buffer to be empty */
616 j = 20000; /* Maximum wait */ 615 j = 20000; /* Maximum wait */
617 while (!(in_be16(&psc->mpc52xx_psc_status) & 616 while (!(in_be16(&psc->mpc52xx_psc_status) &
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c
index 9b7ed58cb53b..513ff8597707 100644
--- a/drivers/serial/pmac_zilog.c
+++ b/drivers/serial/pmac_zilog.c
@@ -1916,6 +1916,16 @@ static void __exit exit_pmz(void)
1916 1916
1917#ifdef CONFIG_SERIAL_PMACZILOG_CONSOLE 1917#ifdef CONFIG_SERIAL_PMACZILOG_CONSOLE
1918 1918
1919static void pmz_console_putchar(struct uart_port *port, int ch)
1920{
1921 struct uart_pmac_port *uap = (struct uart_pmac_port *)port;
1922
1923 /* Wait for the transmit buffer to empty. */
1924 while ((read_zsreg(uap, R0) & Tx_BUF_EMP) == 0)
1925 udelay(5);
1926 write_zsdata(uap, ch);
1927}
1928
1919/* 1929/*
1920 * Print a string to the serial port trying not to disturb 1930 * Print a string to the serial port trying not to disturb
1921 * any possible real use of the port... 1931 * any possible real use of the port...
@@ -1924,7 +1934,6 @@ static void pmz_console_write(struct console *con, const char *s, unsigned int c
1924{ 1934{
1925 struct uart_pmac_port *uap = &pmz_ports[con->index]; 1935 struct uart_pmac_port *uap = &pmz_ports[con->index];
1926 unsigned long flags; 1936 unsigned long flags;
1927 int i;
1928 1937
1929 if (ZS_IS_ASLEEP(uap)) 1938 if (ZS_IS_ASLEEP(uap))
1930 return; 1939 return;
@@ -1934,17 +1943,7 @@ static void pmz_console_write(struct console *con, const char *s, unsigned int c
1934 write_zsreg(uap, R1, uap->curregs[1] & ~TxINT_ENAB); 1943 write_zsreg(uap, R1, uap->curregs[1] & ~TxINT_ENAB);
1935 write_zsreg(uap, R5, uap->curregs[5] | TxENABLE | RTS | DTR); 1944 write_zsreg(uap, R5, uap->curregs[5] | TxENABLE | RTS | DTR);
1936 1945
1937 for (i = 0; i < count; i++) { 1946 uart_console_write(&uap->port, s, count, pmz_console_putchar);
1938 /* Wait for the transmit buffer to empty. */
1939 while ((read_zsreg(uap, R0) & Tx_BUF_EMP) == 0)
1940 udelay(5);
1941 write_zsdata(uap, s[i]);
1942 if (s[i] == 10) {
1943 while ((read_zsreg(uap, R0) & Tx_BUF_EMP) == 0)
1944 udelay(5);
1945 write_zsdata(uap, R13);
1946 }
1947 }
1948 1947
1949 /* Restore the values in the registers. */ 1948 /* Restore the values in the registers. */
1950 write_zsreg(uap, R1, uap->curregs[1]); 1949 write_zsreg(uap, R1, uap->curregs[1]);
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index 10535f00301f..77d4568ccc3a 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -619,6 +619,14 @@ static inline void wait_for_xmitr(struct uart_pxa_port *up)
619 } 619 }
620} 620}
621 621
622static void serial_pxa_console_putchar(struct uart_port *port, int ch)
623{
624 struct uart_pxa_port *up = (struct uart_pxa_port *)port;
625
626 wait_for_xmitr(up);
627 serial_out(up, UART_TX, ch);
628}
629
622/* 630/*
623 * Print a string to the serial port trying not to disturb 631 * Print a string to the serial port trying not to disturb
624 * any possible real use of the port... 632 * any possible real use of the port...
@@ -630,7 +638,6 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count)
630{ 638{
631 struct uart_pxa_port *up = &serial_pxa_ports[co->index]; 639 struct uart_pxa_port *up = &serial_pxa_ports[co->index];
632 unsigned int ier; 640 unsigned int ier;
633 int i;
634 641
635 /* 642 /*
636 * First save the IER then disable the interrupts 643 * First save the IER then disable the interrupts
@@ -638,22 +645,7 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count)
638 ier = serial_in(up, UART_IER); 645 ier = serial_in(up, UART_IER);
639 serial_out(up, UART_IER, UART_IER_UUE); 646 serial_out(up, UART_IER, UART_IER_UUE);
640 647
641 /* 648 uart_console_write(&up->port, s, count, serial_pxa_console_putchar);
642 * Now, do each character
643 */
644 for (i = 0; i < count; i++, s++) {
645 wait_for_xmitr(up);
646
647 /*
648 * Send the character out.
649 * If a LF, also do CR...
650 */
651 serial_out(up, UART_TX, *s);
652 if (*s == 10) {
653 wait_for_xmitr(up);
654 serial_out(up, UART_TX, 13);
655 }
656 }
657 649
658 /* 650 /*
659 * Finally, wait for transmitter to become empty 651 * Finally, wait for transmitter to become empty
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index 00d7c0ad8cbf..f5aac92fb798 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -1586,25 +1586,19 @@ s3c24xx_serial_console_txrdy(struct uart_port *port, unsigned int ufcon)
1586} 1586}
1587 1587
1588static void 1588static void
1589s3c24xx_serial_console_write(struct console *co, const char *s, 1589s3c24xx_serial_console_putchar(struct uart_port *port, int ch)
1590 unsigned int count)
1591{ 1590{
1592 int i;
1593 unsigned int ufcon = rd_regl(cons_uart, S3C2410_UFCON); 1591 unsigned int ufcon = rd_regl(cons_uart, S3C2410_UFCON);
1592 while (!s3c24xx_serial_console_txrdy(port, ufcon))
1593 barrier();
1594 wr_regb(cons_uart, S3C2410_UTXH, ch);
1595}
1594 1596
1595 for (i = 0; i < count; i++) { 1597static void
1596 while (!s3c24xx_serial_console_txrdy(cons_uart, ufcon)) 1598s3c24xx_serial_console_write(struct console *co, const char *s,
1597 barrier(); 1599 unsigned int count)
1598 1600{
1599 wr_regb(cons_uart, S3C2410_UTXH, s[i]); 1601 uart_console_write(cons_uart, s, count, s3c24xx_serial_console_putchar);
1600
1601 if (s[i] == '\n') {
1602 while (!s3c24xx_serial_console_txrdy(cons_uart, ufcon))
1603 barrier();
1604
1605 wr_regb(cons_uart, S3C2410_UTXH, '\r');
1606 }
1607 }
1608} 1602}
1609 1603
1610static void __init 1604static void __init
diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c
index 2c00b8625852..c2d9068b491d 100644
--- a/drivers/serial/sa1100.c
+++ b/drivers/serial/sa1100.c
@@ -689,6 +689,14 @@ void __init sa1100_register_uart(int idx, int port)
689 689
690 690
691#ifdef CONFIG_SERIAL_SA1100_CONSOLE 691#ifdef CONFIG_SERIAL_SA1100_CONSOLE
692static void sa1100_console_putchar(struct uart_port *port, int ch)
693{
694 struct sa1100_port *sport = (struct sa1100_port *)port;
695
696 while (!(UART_GET_UTSR1(sport) & UTSR1_TNF))
697 barrier();
698 UART_PUT_CHAR(sport, ch);
699}
692 700
693/* 701/*
694 * Interrupts are disabled on entering 702 * Interrupts are disabled on entering
@@ -697,7 +705,7 @@ static void
697sa1100_console_write(struct console *co, const char *s, unsigned int count) 705sa1100_console_write(struct console *co, const char *s, unsigned int count)
698{ 706{
699 struct sa1100_port *sport = &sa1100_ports[co->index]; 707 struct sa1100_port *sport = &sa1100_ports[co->index];
700 unsigned int old_utcr3, status, i; 708 unsigned int old_utcr3, status;
701 709
702 /* 710 /*
703 * First, save UTCR3 and then disable interrupts 711 * First, save UTCR3 and then disable interrupts
@@ -706,21 +714,7 @@ sa1100_console_write(struct console *co, const char *s, unsigned int count)
706 UART_PUT_UTCR3(sport, (old_utcr3 & ~(UTCR3_RIE | UTCR3_TIE)) | 714 UART_PUT_UTCR3(sport, (old_utcr3 & ~(UTCR3_RIE | UTCR3_TIE)) |
707 UTCR3_TXE); 715 UTCR3_TXE);
708 716
709 /* 717 uart_console_write(&sport->port, s, count, sa1100_console_putchar);
710 * Now, do each character
711 */
712 for (i = 0; i < count; i++) {
713 do {
714 status = UART_GET_UTSR1(sport);
715 } while (!(status & UTSR1_TNF));
716 UART_PUT_CHAR(sport, s[i]);
717 if (s[i] == '\n') {
718 do {
719 status = UART_GET_UTSR1(sport);
720 } while (!(status & UTSR1_TNF));
721 UART_PUT_CHAR(sport, '\r');
722 }
723 }
724 718
725 /* 719 /*
726 * Finally, wait for transmitter to become empty 720 * Finally, wait for transmitter to become empty
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index cc1faa31d124..fcd7744c4253 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1755,6 +1755,27 @@ static int uart_read_proc(char *page, char **start, off_t off,
1755 1755
1756#ifdef CONFIG_SERIAL_CORE_CONSOLE 1756#ifdef CONFIG_SERIAL_CORE_CONSOLE
1757/* 1757/*
1758 * uart_console_write - write a console message to a serial port
1759 * @port: the port to write the message
1760 * @s: array of characters
1761 * @count: number of characters in string to write
1762 * @write: function to write character to port
1763 */
1764void uart_console_write(struct uart_port *port, const char *s,
1765 unsigned int count,
1766 void (*putchar)(struct uart_port *, int))
1767{
1768 unsigned int i;
1769
1770 for (i = 0; i < count; i++, s++) {
1771 if (*s == '\n')
1772 putchar(port, '\r');
1773 putchar(port, *s);
1774 }
1775}
1776EXPORT_SYMBOL_GPL(uart_console_write);
1777
1778/*
1758 * Check whether an invalid uart number has been specified, and 1779 * Check whether an invalid uart number has been specified, and
1759 * if so, search for the first available port that does have 1780 * if so, search for the first available port that does have
1760 * console support. 1781 * console support.
diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c
index 04186eaae227..aa521b8e0d4e 100644
--- a/drivers/serial/serial_lh7a40x.c
+++ b/drivers/serial/serial_lh7a40x.c
@@ -543,6 +543,12 @@ static struct uart_port_lh7a40x lh7a40x_ports[DEV_NR] = {
543#else 543#else
544# define LH7A40X_CONSOLE &lh7a40x_console 544# define LH7A40X_CONSOLE &lh7a40x_console
545 545
546static void lh7a40xuart_console_putchar(struct uart_port *port, int ch)
547{
548 while (UR(port, UART_R_STATUS) & nTxRdy)
549 ;
550 UR(port, UART_R_DATA) = ch;
551}
546 552
547static void lh7a40xuart_console_write (struct console* co, 553static void lh7a40xuart_console_write (struct console* co,
548 const char* s, 554 const char* s,
@@ -556,16 +562,7 @@ static void lh7a40xuart_console_write (struct console* co,
556 UR (port, UART_R_INTEN) = 0; /* Disable all interrupts */ 562 UR (port, UART_R_INTEN) = 0; /* Disable all interrupts */
557 BIT_SET (port, UART_R_CON, UARTEN | SIRDIS); /* Enable UART */ 563 BIT_SET (port, UART_R_CON, UARTEN | SIRDIS); /* Enable UART */
558 564
559 for (; count-- > 0; ++s) { 565 uart_console_write(port, s, count, lh7a40xuart_console_putchar);
560 while (UR (port, UART_R_STATUS) & nTxRdy)
561 ;
562 UR (port, UART_R_DATA) = *s;
563 if (*s == '\n') {
564 while ((UR (port, UART_R_STATUS) & TxBusy))
565 ;
566 UR (port, UART_R_DATA) = '\r';
567 }
568 }
569 566
570 /* Wait until all characters are sent */ 567 /* Wait until all characters are sent */
571 while (UR (port, UART_R_STATUS) & TxBusy) 568 while (UR (port, UART_R_STATUS) & TxBusy)
diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c
index 141173efd463..b848b7d94412 100644
--- a/drivers/serial/serial_txx9.c
+++ b/drivers/serial/serial_txx9.c
@@ -863,6 +863,14 @@ static inline void wait_for_xmitr(struct uart_txx9_port *up)
863 } 863 }
864} 864}
865 865
866static void serial_txx9_console_putchar(struct uart_port *port, int ch)
867{
868 struct uart_txx9_port *up = (struct uart_txx9_port *)port;
869
870 wait_for_xmitr(up);
871 sio_out(up, TXX9_SITFIFO, ch);
872}
873
866/* 874/*
867 * Print a string to the serial port trying not to disturb 875 * Print a string to the serial port trying not to disturb
868 * any possible real use of the port... 876 * any possible real use of the port...
@@ -874,7 +882,6 @@ serial_txx9_console_write(struct console *co, const char *s, unsigned int count)
874{ 882{
875 struct uart_txx9_port *up = &serial_txx9_ports[co->index]; 883 struct uart_txx9_port *up = &serial_txx9_ports[co->index];
876 unsigned int ier, flcr; 884 unsigned int ier, flcr;
877 int i;
878 885
879 /* 886 /*
880 * First save the UER then disable the interrupts 887 * First save the UER then disable the interrupts
@@ -888,22 +895,7 @@ serial_txx9_console_write(struct console *co, const char *s, unsigned int count)
888 if (!(up->port.flags & UPF_CONS_FLOW) && (flcr & TXX9_SIFLCR_TES)) 895 if (!(up->port.flags & UPF_CONS_FLOW) && (flcr & TXX9_SIFLCR_TES))
889 sio_out(up, TXX9_SIFLCR, flcr & ~TXX9_SIFLCR_TES); 896 sio_out(up, TXX9_SIFLCR, flcr & ~TXX9_SIFLCR_TES);
890 897
891 /* 898 uart_console_write(&up->port, s, count, serial_txx9_console_putchar);
892 * Now, do each character
893 */
894 for (i = 0; i < count; i++, s++) {
895 wait_for_xmitr(up);
896
897 /*
898 * Send the character out.
899 * If a LF, also do CR...
900 */
901 sio_out(up, TXX9_SITFIFO, *s);
902 if (*s == 10) {
903 wait_for_xmitr(up);
904 sio_out(up, TXX9_SITFIFO, 13);
905 }
906 }
907 899
908 /* 900 /*
909 * Finally, wait for transmitter to become empty 901 * Finally, wait for transmitter to become empty
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
index a2fb0c2fb121..bfbe9dc90cca 100644
--- a/drivers/serial/sunsab.c
+++ b/drivers/serial/sunsab.c
@@ -861,8 +861,9 @@ static int num_channels;
861 861
862#ifdef CONFIG_SERIAL_SUNSAB_CONSOLE 862#ifdef CONFIG_SERIAL_SUNSAB_CONSOLE
863 863
864static __inline__ void sunsab_console_putchar(struct uart_sunsab_port *up, char c) 864static void sunsab_console_putchar(struct uart_port *port, int c)
865{ 865{
866 struct uart_sunsab_port *up = (struct uart_sunsab_port *)port;
866 unsigned long flags; 867 unsigned long flags;
867 868
868 spin_lock_irqsave(&up->port.lock, flags); 869 spin_lock_irqsave(&up->port.lock, flags);
@@ -876,13 +877,8 @@ static __inline__ void sunsab_console_putchar(struct uart_sunsab_port *up, char
876static void sunsab_console_write(struct console *con, const char *s, unsigned n) 877static void sunsab_console_write(struct console *con, const char *s, unsigned n)
877{ 878{
878 struct uart_sunsab_port *up = &sunsab_ports[con->index]; 879 struct uart_sunsab_port *up = &sunsab_ports[con->index];
879 int i;
880 880
881 for (i = 0; i < n; i++) { 881 uart_console_write(&up->port, s, n, sunsab_console_putchar);
882 if (*s == '\n')
883 sunsab_console_putchar(up, '\r');
884 sunsab_console_putchar(up, *s++);
885 }
886 sunsab_tec_wait(up); 882 sunsab_tec_wait(up);
887} 883}
888 884
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index 46c44b83f57c..7fc3d3b41d18 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -1377,6 +1377,14 @@ static __inline__ void wait_for_xmitr(struct uart_sunsu_port *up)
1377 } 1377 }
1378} 1378}
1379 1379
1380static void sunsu_console_putchar(struct uart_port *port, int ch)
1381{
1382 struct uart_sunsu_port *up = (struct uart_sunsu_port *)port;
1383
1384 wait_for_xmitr(up);
1385 serial_out(up, UART_TX, ch);
1386}
1387
1380/* 1388/*
1381 * Print a string to the serial port trying not to disturb 1389 * Print a string to the serial port trying not to disturb
1382 * any possible real use of the port... 1390 * any possible real use of the port...
@@ -1386,7 +1394,6 @@ static void sunsu_console_write(struct console *co, const char *s,
1386{ 1394{
1387 struct uart_sunsu_port *up = &sunsu_ports[co->index]; 1395 struct uart_sunsu_port *up = &sunsu_ports[co->index];
1388 unsigned int ier; 1396 unsigned int ier;
1389 int i;
1390 1397
1391 /* 1398 /*
1392 * First save the UER then disable the interrupts 1399 * First save the UER then disable the interrupts
@@ -1394,22 +1401,7 @@ static void sunsu_console_write(struct console *co, const char *s,
1394 ier = serial_in(up, UART_IER); 1401 ier = serial_in(up, UART_IER);
1395 serial_out(up, UART_IER, 0); 1402 serial_out(up, UART_IER, 0);
1396 1403
1397 /* 1404 uart_console_write(&up->port, s, count, sunsu_console_putchar);
1398 * Now, do each character
1399 */
1400 for (i = 0; i < count; i++, s++) {
1401 wait_for_xmitr(up);
1402
1403 /*
1404 * Send the character out.
1405 * If a LF, also do CR...
1406 */
1407 serial_out(up, UART_TX, *s);
1408 if (*s == 10) {
1409 wait_for_xmitr(up);
1410 serial_out(up, UART_TX, 13);
1411 }
1412 }
1413 1405
1414 /* 1406 /*
1415 * Finally, wait for transmitter to become empty 1407 * Finally, wait for transmitter to become empty
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c
index 10b35c6f287d..cd49ebbf4a45 100644
--- a/drivers/serial/sunzilog.c
+++ b/drivers/serial/sunzilog.c
@@ -1252,8 +1252,9 @@ static struct zilog_layout __iomem * __init get_zs(int chip, int node)
1252 1252
1253#define ZS_PUT_CHAR_MAX_DELAY 2000 /* 10 ms */ 1253#define ZS_PUT_CHAR_MAX_DELAY 2000 /* 10 ms */
1254 1254
1255static void sunzilog_put_char(struct zilog_channel __iomem *channel, unsigned char ch) 1255static void sunzilog_putchar(struct uart_port *port, int ch)
1256{ 1256{
1257 struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(port);
1257 int loops = ZS_PUT_CHAR_MAX_DELAY; 1258 int loops = ZS_PUT_CHAR_MAX_DELAY;
1258 1259
1259 /* This is a timed polling loop so do not switch the explicit 1260 /* This is a timed polling loop so do not switch the explicit
@@ -1284,7 +1285,7 @@ static int sunzilog_serio_write(struct serio *serio, unsigned char ch)
1284 1285
1285 spin_lock_irqsave(&sunzilog_serio_lock, flags); 1286 spin_lock_irqsave(&sunzilog_serio_lock, flags);
1286 1287
1287 sunzilog_put_char(ZILOG_CHANNEL_FROM_PORT(&up->port), ch); 1288 sunzilog_putchar(&up->port, ch);
1288 1289
1289 spin_unlock_irqrestore(&sunzilog_serio_lock, flags); 1290 spin_unlock_irqrestore(&sunzilog_serio_lock, flags);
1290 1291
@@ -1325,16 +1326,10 @@ static void
1325sunzilog_console_write(struct console *con, const char *s, unsigned int count) 1326sunzilog_console_write(struct console *con, const char *s, unsigned int count)
1326{ 1327{
1327 struct uart_sunzilog_port *up = &sunzilog_port_table[con->index]; 1328 struct uart_sunzilog_port *up = &sunzilog_port_table[con->index];
1328 struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(&up->port);
1329 unsigned long flags; 1329 unsigned long flags;
1330 int i;
1331 1330
1332 spin_lock_irqsave(&up->port.lock, flags); 1331 spin_lock_irqsave(&up->port.lock, flags);
1333 for (i = 0; i < count; i++, s++) { 1332 uart_console_write(&up->port, s, count, sunzilog_putchar);
1334 sunzilog_put_char(channel, *s);
1335 if (*s == 10)
1336 sunzilog_put_char(channel, 13);
1337 }
1338 udelay(2); 1333 udelay(2);
1339 spin_unlock_irqrestore(&up->port.lock, flags); 1334 spin_unlock_irqrestore(&up->port.lock, flags);
1340} 1335}
diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c
index bd6294132c18..df5e8713fa31 100644
--- a/drivers/serial/vr41xx_siu.c
+++ b/drivers/serial/vr41xx_siu.c
@@ -821,25 +821,23 @@ static void wait_for_xmitr(struct uart_port *port)
821 } 821 }
822} 822}
823 823
824static void siu_console_putchar(struct uart_port *port, int ch)
825{
826 wait_for_xmitr(port);
827 siu_write(port, UART_TX, ch);
828}
829
824static void siu_console_write(struct console *con, const char *s, unsigned count) 830static void siu_console_write(struct console *con, const char *s, unsigned count)
825{ 831{
826 struct uart_port *port; 832 struct uart_port *port;
827 uint8_t ier; 833 uint8_t ier;
828 unsigned i;
829 834
830 port = &siu_uart_ports[con->index]; 835 port = &siu_uart_ports[con->index];
831 836
832 ier = siu_read(port, UART_IER); 837 ier = siu_read(port, UART_IER);
833 siu_write(port, UART_IER, 0); 838 siu_write(port, UART_IER, 0);
834 839
835 for (i = 0; i < count && *s != '\0'; i++, s++) { 840 uart_console_write(port, s, count, siu_console_putchar);
836 wait_for_xmitr(port);
837 siu_write(port, UART_TX, *s);
838 if (*s == '\n') {
839 wait_for_xmitr(port);
840 siu_write(port, UART_TX, '\r');
841 }
842 }
843 841
844 wait_for_xmitr(port); 842 wait_for_xmitr(port);
845 siu_write(port, UART_IER, ier); 843 siu_write(port, UART_IER, ier);
diff --git a/include/asm-arm/arch-aaec2000/param.h b/include/asm-arm/arch-aaec2000/param.h
deleted file mode 100644
index 139936c2faf2..000000000000
--- a/include/asm-arm/arch-aaec2000/param.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-aaec2000/param.h
3 *
4 * Copyright (c) 2005 Nicolas Bellido Y Ortega
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
11#ifndef __ASM_ARCH_PARAM_H
12#define __ASM_ARCH_PARAM_H
13
14#endif /* __ASM_ARCH_PARAM_H */
15
diff --git a/include/asm-arm/arch-at91rm9200/param.h b/include/asm-arm/arch-at91rm9200/param.h
deleted file mode 100644
index 9480f8446852..000000000000
--- a/include/asm-arm/arch-at91rm9200/param.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * include/asm-arm/arch-at91rm9200/param.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_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-cl7500/debug-macro.S b/include/asm-arm/arch-cl7500/debug-macro.S
index a5d489d7955a..9a2b67d24098 100644
--- a/include/asm-arm/arch-cl7500/debug-macro.S
+++ b/include/asm-arm/arch-cl7500/debug-macro.S
@@ -17,15 +17,5 @@
17 orr \rx, \rx, #0x00000be0 17 orr \rx, \rx, #0x00000be0
18 .endm 18 .endm
19 19
20 .macro senduart,rd,rx 20#define UART_SHIFT 2
21 strb \rd, [\rx] 21#include <asm/hardware/debug-8250.S>
22 .endm
23
24 .macro busyuart,rd,rx
25 .endm
26
27 .macro waituart,rd,rx
281001: ldrb \rd, [\rx, #0x14]
29 tst \rd, #0x20
30 beq 1001b
31 .endm
diff --git a/include/asm-arm/arch-cl7500/param.h b/include/asm-arm/arch-cl7500/param.h
deleted file mode 100644
index 974bf69fbb1a..000000000000
--- a/include/asm-arm/arch-cl7500/param.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-cl7500/param.h
3 *
4 * Copyright (C) 1999 Nexus Electronics Ltd
5 */
diff --git a/include/asm-arm/arch-clps711x/param.h b/include/asm-arm/arch-clps711x/param.h
deleted file mode 100644
index 86f6bd29623d..000000000000
--- a/include/asm-arm/arch-clps711x/param.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-clps711x/param.h
3 *
4 * Copyright (C) 2000 Deep Blue Solutions Ltd.
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 */
diff --git a/include/asm-arm/arch-ebsa110/debug-macro.S b/include/asm-arm/arch-ebsa110/debug-macro.S
index dcd03a40c502..f61cadabe0ec 100644
--- a/include/asm-arm/arch-ebsa110/debug-macro.S
+++ b/include/asm-arm/arch-ebsa110/debug-macro.S
@@ -16,19 +16,6 @@
16 orr \rx, \rx, #0x00000be0 16 orr \rx, \rx, #0x00000be0
17 .endm 17 .endm
18 18
19 .macro senduart,rd,rx 19#define UART_SHIFT 2
20 strb \rd, [\rx] 20#define FLOW_CONTROL
21 .endm 21#include <asm/hardware/debug-8250.h>
22
23 .macro busyuart,rd,rx
241002: ldrb \rd, [\rx, #0x14]
25 and \rd, \rd, #0x60
26 teq \rd, #0x60
27 bne 1002b
28 .endm
29
30 .macro waituart,rd,rx
311001: ldrb \rd, [\rx, #0x18]
32 tst \rd, #0x10
33 beq 1001b
34 .endm
diff --git a/include/asm-arm/arch-ebsa110/param.h b/include/asm-arm/arch-ebsa110/param.h
deleted file mode 100644
index be19b08d1c75..000000000000
--- a/include/asm-arm/arch-ebsa110/param.h
+++ /dev/null
@@ -1,4 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa110/param.h
3 */
4#define HZ 200
diff --git a/include/asm-arm/arch-ebsa285/debug-macro.S b/include/asm-arm/arch-ebsa285/debug-macro.S
index 97d15fc629af..b48cec4a0c45 100644
--- a/include/asm-arm/arch-ebsa285/debug-macro.S
+++ b/include/asm-arm/arch-ebsa285/debug-macro.S
@@ -23,22 +23,10 @@
23 orr \rx, \rx, #0x000003f8 23 orr \rx, \rx, #0x000003f8
24 .endm 24 .endm
25 25
26 .macro senduart,rd,rx 26#define UART_SHIFT 0
27 strb \rd, [\rx] 27#define FLOW_CONTROL
28 .endm 28#include <asm/hardware/debug-8250.S>
29 29
30 .macro busyuart,rd,rx
311002: ldrb \rd, [\rx, #0x5]
32 and \rd, \rd, #0x60
33 teq \rd, #0x60
34 bne 1002b
35 .endm
36
37 .macro waituart,rd,rx
381001: ldrb \rd, [\rx, #0x6]
39 tst \rd, #0x10
40 beq 1001b
41 .endm
42#else 30#else
43 /* For EBSA285 debugging */ 31 /* For EBSA285 debugging */
44 .equ dc21285_high, ARMCSR_BASE & 0xff000000 32 .equ dc21285_high, ARMCSR_BASE & 0xff000000
diff --git a/include/asm-arm/arch-ebsa285/param.h b/include/asm-arm/arch-ebsa285/param.h
deleted file mode 100644
index 3827103b27a0..000000000000
--- a/include/asm-arm/arch-ebsa285/param.h
+++ /dev/null
@@ -1,3 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ebsa285/param.h
3 */
diff --git a/include/asm-arm/arch-ep93xx/debug-macro.S b/include/asm-arm/arch-ep93xx/debug-macro.S
new file mode 100644
index 000000000000..397565a0c671
--- /dev/null
+++ b/include/asm-arm/arch-ep93xx/debug-macro.S
@@ -0,0 +1,22 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/debug-macro.S
3 * Debugging macro include header
4 *
5 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
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 (at
10 * your option) any later version.
11 */
12#include <asm/arch/ep93xx-regs.h>
13
14 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0
16 tst \rx, #1 @ MMU enabled?
17 ldreq \rx, =EP93XX_APB_PHYS_BASE @ Physical base
18 ldrne \rx, =EP93XX_APB_VIRT_BASE @ virtual base
19 orr \rx, \rx, #0x000c0000
20 .endm
21
22#include <asm/hardware/debug-pl01x.S>
diff --git a/include/asm-arm/arch-ep93xx/dma.h b/include/asm-arm/arch-ep93xx/dma.h
new file mode 100644
index 000000000000..898b3ab7fd46
--- /dev/null
+++ b/include/asm-arm/arch-ep93xx/dma.h
@@ -0,0 +1,3 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/dma.h
3 */
diff --git a/include/asm-arm/arch-ep93xx/entry-macro.S b/include/asm-arm/arch-ep93xx/entry-macro.S
new file mode 100644
index 000000000000..84140a28dfcf
--- /dev/null
+++ b/include/asm-arm/arch-ep93xx/entry-macro.S
@@ -0,0 +1,53 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/entry-macro.S
3 * IRQ demultiplexing for EP93xx
4 *
5 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
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 (at
10 * your option) any later version.
11 */
12#include <asm/arch/ep93xx-regs.h>
13
14 .macro disable_fiq
15 .endm
16
17 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
18 ldr \base, =(EP93XX_AHB_VIRT_BASE)
19 orr \base, \base, #0x000b0000
20 mov \irqnr, #0
21 ldr \irqstat, [\base] @ lower 32 interrupts
22 cmp \irqstat, #0
23 bne 1001f
24
25 eor \base, \base, #0x00070000
26 ldr \irqstat, [\base] @ upper 32 interrupts
27 cmp \irqstat, #0
28 beq 1002f
29 mov \irqnr, #0x20
30
311001:
32 movs \tmp, \irqstat, lsl #16
33 movne \irqstat, \tmp
34 addeq \irqnr, \irqnr, #16
35
36 movs \tmp, \irqstat, lsl #8
37 movne \irqstat, \tmp
38 addeq \irqnr, \irqnr, #8
39
40 movs \tmp, \irqstat, lsl #4
41 movne \irqstat, \tmp
42 addeq \irqnr, \irqnr, #4
43
44 movs \tmp, \irqstat, lsl #2
45 movne \irqstat, \tmp
46 addeq \irqnr, \irqnr, #2
47
48 movs \tmp, \irqstat, lsl #1
49 addeq \irqnr, \irqnr, #1
50 orrs \base, \base, #1
51
521002:
53 .endm
diff --git a/include/asm-arm/arch-ep93xx/ep93xx-regs.h b/include/asm-arm/arch-ep93xx/ep93xx-regs.h
new file mode 100644
index 000000000000..71cea0b5841b
--- /dev/null
+++ b/include/asm-arm/arch-ep93xx/ep93xx-regs.h
@@ -0,0 +1,125 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/ep93xx-regs.h
3 */
4
5#ifndef __ASM_ARCH_EP93XX_REGS_H
6#define __ASM_ARCH_EP93XX_REGS_H
7
8/*
9 * EP93xx linux memory map:
10 *
11 * virt phys size
12 * fe800000 5M per-platform mappings
13 * fed00000 80800000 2M APB
14 * fef00000 80000000 1M AHB
15 */
16
17#define EP93XX_AHB_PHYS_BASE 0x80000000
18#define EP93XX_AHB_VIRT_BASE 0xfef00000
19#define EP93XX_AHB_SIZE 0x00100000
20
21#define EP93XX_APB_PHYS_BASE 0x80800000
22#define EP93XX_APB_VIRT_BASE 0xfed00000
23#define EP93XX_APB_SIZE 0x00200000
24
25
26/* AHB peripherals */
27#define EP93XX_DMA_BASE (EP93XX_AHB_VIRT_BASE + 0x00000000)
28
29#define EP93XX_ETHERNET_BASE (EP93XX_AHB_VIRT_BASE + 0x00010000)
30
31#define EP93XX_USB_BASE (EP93XX_AHB_VIRT_BASE + 0x00020000)
32#define EP93XX_USB_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00020000)
33
34#define EP93XX_RASTER_BASE (EP93XX_AHB_VIRT_BASE + 0x00030000)
35
36#define EP93XX_GRAPHICS_ACCEL_BASE (EP93XX_AHB_VIRT_BASE + 0x00040000)
37
38#define EP93XX_SDRAM_CONTROLLER_BASE (EP93XX_AHB_VIRT_BASE + 0x00060000)
39
40#define EP93XX_PCMCIA_CONTROLLER_BASE (EP93XX_AHB_VIRT_BASE + 0x00080000)
41
42#define EP93XX_BOOT_ROM_BASE (EP93XX_AHB_VIRT_BASE + 0x00090000)
43
44#define EP93XX_IDE_BASE (EP93XX_AHB_VIRT_BASE + 0x000a0000)
45
46#define EP93XX_VIC1_BASE (EP93XX_AHB_VIRT_BASE + 0x000b0000)
47
48#define EP93XX_VIC2_BASE (EP93XX_AHB_VIRT_BASE + 0x000c0000)
49
50
51/* APB peripherals */
52#define EP93XX_TIMER_BASE (EP93XX_APB_VIRT_BASE + 0x00010000)
53#define EP93XX_TIMER_REG(x) (EP93XX_TIMER_BASE + (x))
54#define EP93XX_TIMER1_LOAD EP93XX_TIMER_REG(0x00)
55#define EP93XX_TIMER1_VALUE EP93XX_TIMER_REG(0x04)
56#define EP93XX_TIMER1_CONTROL EP93XX_TIMER_REG(0x08)
57#define EP93XX_TIMER1_CLEAR EP93XX_TIMER_REG(0x0c)
58#define EP93XX_TIMER2_LOAD EP93XX_TIMER_REG(0x20)
59#define EP93XX_TIMER2_VALUE EP93XX_TIMER_REG(0x24)
60#define EP93XX_TIMER2_CONTROL EP93XX_TIMER_REG(0x28)
61#define EP93XX_TIMER2_CLEAR EP93XX_TIMER_REG(0x2c)
62#define EP93XX_TIMER4_VALUE_LOW EP93XX_TIMER_REG(0x60)
63#define EP93XX_TIMER4_VALUE_HIGH EP93XX_TIMER_REG(0x64)
64#define EP93XX_TIMER3_LOAD EP93XX_TIMER_REG(0x80)
65#define EP93XX_TIMER3_VALUE EP93XX_TIMER_REG(0x84)
66#define EP93XX_TIMER3_CONTROL EP93XX_TIMER_REG(0x88)
67#define EP93XX_TIMER3_CLEAR EP93XX_TIMER_REG(0x8c)
68
69#define EP93XX_I2S_BASE (EP93XX_APB_VIRT_BASE + 0x00020000)
70
71#define EP93XX_SECURITY_BASE (EP93XX_APB_VIRT_BASE + 0x00030000)
72
73#define EP93XX_GPIO_BASE (EP93XX_APB_VIRT_BASE + 0x00040000)
74#define EP93XX_GPIO_REG(x) (EP93XX_GPIO_BASE + (x))
75#define EP93XX_GPIO_A_INT_TYPE1 EP93XX_GPIO_REG(0x90)
76#define EP93XX_GPIO_A_INT_TYPE2 EP93XX_GPIO_REG(0x94)
77#define EP93XX_GPIO_A_INT_ACK EP93XX_GPIO_REG(0x98)
78#define EP93XX_GPIO_A_INT_ENABLE EP93XX_GPIO_REG(0x9c)
79#define EP93XX_GPIO_A_INT_STATUS EP93XX_GPIO_REG(0xa0)
80#define EP93XX_GPIO_B_INT_TYPE1 EP93XX_GPIO_REG(0xac)
81#define EP93XX_GPIO_B_INT_TYPE2 EP93XX_GPIO_REG(0xb0)
82#define EP93XX_GPIO_B_INT_ACK EP93XX_GPIO_REG(0xb4)
83#define EP93XX_GPIO_B_INT_ENABLE EP93XX_GPIO_REG(0xb8)
84#define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc)
85
86#define EP93XX_AAC_BASE (EP93XX_APB_VIRT_BASE + 0x00080000)
87
88#define EP93XX_SPI_BASE (EP93XX_APB_VIRT_BASE + 0x000a0000)
89
90#define EP93XX_IRDA_BASE (EP93XX_APB_VIRT_BASE + 0x000b0000)
91
92#define EP93XX_UART1_BASE (EP93XX_APB_VIRT_BASE + 0x000c0000)
93#define EP93XX_UART1_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000c0000)
94
95#define EP93XX_UART2_BASE (EP93XX_APB_VIRT_BASE + 0x000d0000)
96#define EP93XX_UART2_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000d0000)
97
98#define EP93XX_UART3_BASE (EP93XX_APB_VIRT_BASE + 0x000e0000)
99#define EP93XX_UART3_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000e0000)
100
101#define EP93XX_KEY_MATRIX_BASE (EP93XX_APB_VIRT_BASE + 0x000f0000)
102
103#define EP93XX_ADC_BASE (EP93XX_APB_VIRT_BASE + 0x00100000)
104#define EP93XX_TOUCHSCREEN_BASE (EP93XX_APB_VIRT_BASE + 0x00100000)
105
106#define EP93XX_PWM_BASE (EP93XX_APB_VIRT_BASE + 0x00110000)
107
108#define EP93XX_RTC_BASE (EP93XX_APB_VIRT_BASE + 0x00120000)
109
110#define EP93XX_SYSCON_BASE (EP93XX_APB_VIRT_BASE + 0x00130000)
111#define EP93XX_SYSCON_REG(x) (EP93XX_SYSCON_BASE + (x))
112#define EP93XX_SYSCON_POWER_STATE EP93XX_SYSCON_REG(0x00)
113#define EP93XX_SYSCON_CLOCK_CONTROL EP93XX_SYSCON_REG(0x04)
114#define EP93XX_SYSCON_CLOCK_UARTBAUD 0x20000000
115#define EP93XX_SYSCON_CLOCK_USH_EN 0x10000000
116#define EP93XX_SYSCON_HALT EP93XX_SYSCON_REG(0x08)
117#define EP93XX_SYSCON_STANDBY EP93XX_SYSCON_REG(0x0c)
118#define EP93XX_SYSCON_DEVICE_CONFIG EP93XX_SYSCON_REG(0x80)
119#define EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE 0x00800000
120#define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0)
121
122#define EP93XX_WATCHDOG_BASE (EP93XX_APB_VIRT_BASE + 0x00140000)
123
124
125#endif
diff --git a/include/asm-arm/arch-ep93xx/gesbc9312.h b/include/asm-arm/arch-ep93xx/gesbc9312.h
new file mode 100644
index 000000000000..4d0b3023bff7
--- /dev/null
+++ b/include/asm-arm/arch-ep93xx/gesbc9312.h
@@ -0,0 +1,3 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/gesbc9312.h
3 */
diff --git a/include/asm-arm/arch-ep93xx/gpio.h b/include/asm-arm/arch-ep93xx/gpio.h
new file mode 100644
index 000000000000..1ee14a14cba0
--- /dev/null
+++ b/include/asm-arm/arch-ep93xx/gpio.h
@@ -0,0 +1,107 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/gpio.h
3 */
4
5#ifndef __ASM_ARCH_GPIO_H
6#define __ASM_ARCH_GPIO_H
7
8#define GPIO_IN 0
9#define GPIO_OUT 1
10
11#define EP93XX_GPIO_LOW 0
12#define EP93XX_GPIO_HIGH 1
13
14extern void gpio_line_config(int line, int direction);
15extern int gpio_line_get(int line);
16extern void gpio_line_set(int line, int value);
17
18/* GPIO port A. */
19#define EP93XX_GPIO_LINE_A(x) ((x) + 0)
20#define EP93XX_GPIO_LINE_EGPIO0 EP93XX_GPIO_LINE_A(0)
21#define EP93XX_GPIO_LINE_EGPIO1 EP93XX_GPIO_LINE_A(1)
22#define EP93XX_GPIO_LINE_EGPIO2 EP93XX_GPIO_LINE_A(2)
23#define EP93XX_GPIO_LINE_EGPIO3 EP93XX_GPIO_LINE_A(3)
24#define EP93XX_GPIO_LINE_EGPIO4 EP93XX_GPIO_LINE_A(4)
25#define EP93XX_GPIO_LINE_EGPIO5 EP93XX_GPIO_LINE_A(5)
26#define EP93XX_GPIO_LINE_EGPIO6 EP93XX_GPIO_LINE_A(6)
27#define EP93XX_GPIO_LINE_EGPIO7 EP93XX_GPIO_LINE_A(7)
28
29/* GPIO port B. */
30#define EP93XX_GPIO_LINE_B(x) ((x) + 8)
31#define EP93XX_GPIO_LINE_EGPIO8 EP93XX_GPIO_LINE_B(0)
32#define EP93XX_GPIO_LINE_EGPIO9 EP93XX_GPIO_LINE_B(1)
33#define EP93XX_GPIO_LINE_EGPIO10 EP93XX_GPIO_LINE_B(2)
34#define EP93XX_GPIO_LINE_EGPIO11 EP93XX_GPIO_LINE_B(3)
35#define EP93XX_GPIO_LINE_EGPIO12 EP93XX_GPIO_LINE_B(4)
36#define EP93XX_GPIO_LINE_EGPIO13 EP93XX_GPIO_LINE_B(5)
37#define EP93XX_GPIO_LINE_EGPIO14 EP93XX_GPIO_LINE_B(6)
38#define EP93XX_GPIO_LINE_EGPIO15 EP93XX_GPIO_LINE_B(7)
39
40/* GPIO port C. */
41#define EP93XX_GPIO_LINE_C(x) ((x) + 16)
42#define EP93XX_GPIO_LINE_ROW0 EP93XX_GPIO_LINE_C(0)
43#define EP93XX_GPIO_LINE_ROW1 EP93XX_GPIO_LINE_C(1)
44#define EP93XX_GPIO_LINE_ROW2 EP93XX_GPIO_LINE_C(2)
45#define EP93XX_GPIO_LINE_ROW3 EP93XX_GPIO_LINE_C(3)
46#define EP93XX_GPIO_LINE_ROW4 EP93XX_GPIO_LINE_C(4)
47#define EP93XX_GPIO_LINE_ROW5 EP93XX_GPIO_LINE_C(5)
48#define EP93XX_GPIO_LINE_ROW6 EP93XX_GPIO_LINE_C(6)
49#define EP93XX_GPIO_LINE_ROW7 EP93XX_GPIO_LINE_C(7)
50
51/* GPIO port D. */
52#define EP93XX_GPIO_LINE_D(x) ((x) + 24)
53#define EP93XX_GPIO_LINE_COL0 EP93XX_GPIO_LINE_D(0)
54#define EP93XX_GPIO_LINE_COL1 EP93XX_GPIO_LINE_D(1)
55#define EP93XX_GPIO_LINE_COL2 EP93XX_GPIO_LINE_D(2)
56#define EP93XX_GPIO_LINE_COL3 EP93XX_GPIO_LINE_D(3)
57#define EP93XX_GPIO_LINE_COL4 EP93XX_GPIO_LINE_D(4)
58#define EP93XX_GPIO_LINE_COL5 EP93XX_GPIO_LINE_D(5)
59#define EP93XX_GPIO_LINE_COL6 EP93XX_GPIO_LINE_D(6)
60#define EP93XX_GPIO_LINE_COL7 EP93XX_GPIO_LINE_D(7)
61
62/* GPIO port E. */
63#define EP93XX_GPIO_LINE_E(x) ((x) + 32)
64#define EP93XX_GPIO_LINE_GRLED EP93XX_GPIO_LINE_E(0)
65#define EP93XX_GPIO_LINE_RDLED EP93XX_GPIO_LINE_E(1)
66#define EP93XX_GPIO_LINE_DIORn EP93XX_GPIO_LINE_E(2)
67#define EP93XX_GPIO_LINE_IDECS1n EP93XX_GPIO_LINE_E(3)
68#define EP93XX_GPIO_LINE_IDECS2n EP93XX_GPIO_LINE_E(4)
69#define EP93XX_GPIO_LINE_IDEDA0 EP93XX_GPIO_LINE_E(5)
70#define EP93XX_GPIO_LINE_IDEDA1 EP93XX_GPIO_LINE_E(6)
71#define EP93XX_GPIO_LINE_IDEDA2 EP93XX_GPIO_LINE_E(7)
72
73/* GPIO port F. */
74#define EP93XX_GPIO_LINE_F(x) ((x) + 40)
75#define EP93XX_GPIO_LINE_WP EP93XX_GPIO_LINE_F(0)
76#define EP93XX_GPIO_LINE_MCCD1 EP93XX_GPIO_LINE_F(1)
77#define EP93XX_GPIO_LINE_MCCD2 EP93XX_GPIO_LINE_F(2)
78#define EP93XX_GPIO_LINE_MCBVD1 EP93XX_GPIO_LINE_F(3)
79#define EP93XX_GPIO_LINE_MCBVD2 EP93XX_GPIO_LINE_F(4)
80#define EP93XX_GPIO_LINE_VS1 EP93XX_GPIO_LINE_F(5)
81#define EP93XX_GPIO_LINE_READY EP93XX_GPIO_LINE_F(6)
82#define EP93XX_GPIO_LINE_VS2 EP93XX_GPIO_LINE_F(7)
83
84/* GPIO port G. */
85#define EP93XX_GPIO_LINE_G(x) ((x) + 48)
86#define EP93XX_GPIO_LINE_EECLK EP93XX_GPIO_LINE_G(0)
87#define EP93XX_GPIO_LINE_EEDAT EP93XX_GPIO_LINE_G(1)
88#define EP93XX_GPIO_LINE_SLA0 EP93XX_GPIO_LINE_G(2)
89#define EP93XX_GPIO_LINE_SLA1 EP93XX_GPIO_LINE_G(3)
90#define EP93XX_GPIO_LINE_DD12 EP93XX_GPIO_LINE_G(4)
91#define EP93XX_GPIO_LINE_DD13 EP93XX_GPIO_LINE_G(5)
92#define EP93XX_GPIO_LINE_DD14 EP93XX_GPIO_LINE_G(6)
93#define EP93XX_GPIO_LINE_DD15 EP93XX_GPIO_LINE_G(7)
94
95/* GPIO port H. */
96#define EP93XX_GPIO_LINE_H(x) ((x) + 56)
97#define EP93XX_GPIO_LINE_DD0 EP93XX_GPIO_LINE_H(0)
98#define EP93XX_GPIO_LINE_DD1 EP93XX_GPIO_LINE_H(1)
99#define EP93XX_GPIO_LINE_DD2 EP93XX_GPIO_LINE_H(2)
100#define EP93XX_GPIO_LINE_DD3 EP93XX_GPIO_LINE_H(3)
101#define EP93XX_GPIO_LINE_DD4 EP93XX_GPIO_LINE_H(4)
102#define EP93XX_GPIO_LINE_DD5 EP93XX_GPIO_LINE_H(5)
103#define EP93XX_GPIO_LINE_DD6 EP93XX_GPIO_LINE_H(6)
104#define EP93XX_GPIO_LINE_DD7 EP93XX_GPIO_LINE_H(7)
105
106
107#endif
diff --git a/include/asm-arm/arch-ep93xx/hardware.h b/include/asm-arm/arch-ep93xx/hardware.h
new file mode 100644
index 000000000000..9b69f454065d
--- /dev/null
+++ b/include/asm-arm/arch-ep93xx/hardware.h
@@ -0,0 +1,12 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/hardware.h
3 */
4
5#include "ep93xx-regs.h"
6
7#define pcibios_assign_all_busses() 0
8
9#include "platform.h"
10
11#include "gesbc9312.h"
12#include "ts72xx.h"
diff --git a/include/asm-arm/arch-ep93xx/io.h b/include/asm-arm/arch-ep93xx/io.h
new file mode 100644
index 000000000000..7b4d25e29060
--- /dev/null
+++ b/include/asm-arm/arch-ep93xx/io.h
@@ -0,0 +1,8 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/io.h
3 */
4
5#define IO_SPACE_LIMIT 0xffffffff
6
7#define __io(p) ((void __iomem *)(p))
8#define __mem_pci(p) (p)
diff --git a/include/asm-arm/arch-ep93xx/irqs.h b/include/asm-arm/arch-ep93xx/irqs.h
new file mode 100644
index 000000000000..9a42f5de9e57
--- /dev/null
+++ b/include/asm-arm/arch-ep93xx/irqs.h
@@ -0,0 +1,80 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/irqs.h
3 */
4
5#ifndef __ASM_ARCH_IRQS_H
6#define __ASM_ARCH_IRQS_H
7
8#define IRQ_EP93XX_COMMRX 2
9#define IRQ_EP93XX_COMMTX 3
10#define IRQ_EP93XX_TIMER1 4
11#define IRQ_EP93XX_TIMER2 5
12#define IRQ_EP93XX_AACINTR 6
13#define IRQ_EP93XX_DMAM2P0 7
14#define IRQ_EP93XX_DMAM2P1 8
15#define IRQ_EP93XX_DMAM2P2 9
16#define IRQ_EP93XX_DMAM2P3 10
17#define IRQ_EP93XX_DMAM2P4 11
18#define IRQ_EP93XX_DMAM2P5 12
19#define IRQ_EP93XX_DMAM2P6 13
20#define IRQ_EP93XX_DMAM2P7 14
21#define IRQ_EP93XX_DMAM2P8 15
22#define IRQ_EP93XX_DMAM2P9 16
23#define IRQ_EP93XX_DMAM2M0 17
24#define IRQ_EP93XX_DMAM2M1 18
25#define IRQ_EP93XX_GPIO0MUX 20
26#define IRQ_EP93XX_GPIO1MUX 21
27#define IRQ_EP93XX_GPIO2MUX 22
28#define IRQ_EP93XX_GPIO3MUX 22
29#define IRQ_EP93XX_UART1RX 23
30#define IRQ_EP93XX_UART1TX 24
31#define IRQ_EP93XX_UART2RX 25
32#define IRQ_EP93XX_UART2TX 26
33#define IRQ_EP93XX_UART3RX 27
34#define IRQ_EP93XX_UART3TX 28
35#define IRQ_EP93XX_KEY 29
36#define IRQ_EP93XX_TOUCH 30
37#define EP93XX_VIC1_VALID_IRQ_MASK 0x7ffffffc
38
39#define IRQ_EP93XX_EXT0 32
40#define IRQ_EP93XX_EXT1 33
41#define IRQ_EP93XX_EXT2 34
42#define IRQ_EP93XX_64HZ 35
43#define IRQ_EP93XX_WATCHDOG 36
44#define IRQ_EP93XX_RTC 37
45#define IRQ_EP93XX_IRDA 38
46#define IRQ_EP93XX_ETHERNET 39
47#define IRQ_EP93XX_EXT3 40
48#define IRQ_EP93XX_PROG 41
49#define IRQ_EP93XX_1HZ 42
50#define IRQ_EP93XX_VSYNC 43
51#define IRQ_EP93XX_VIDEO_FIFO 44
52#define IRQ_EP93XX_SSP1RX 45
53#define IRQ_EP93XX_SSP1TX 46
54#define IRQ_EP93XX_GPIO4MUX 47
55#define IRQ_EP93XX_GPIO5MUX 48
56#define IRQ_EP93XX_GPIO6MUX 49
57#define IRQ_EP93XX_GPIO7MUX 50
58#define IRQ_EP93XX_TIMER3 51
59#define IRQ_EP93XX_UART1 52
60#define IRQ_EP93XX_SSP 53
61#define IRQ_EP93XX_UART2 54
62#define IRQ_EP93XX_UART3 55
63#define IRQ_EP93XX_USB 56
64#define IRQ_EP93XX_ETHERNET_PME 57
65#define IRQ_EP93XX_DSP 58
66#define IRQ_EP93XX_GPIO_AB 59
67#define IRQ_EP93XX_SAI 60
68#define EP93XX_VIC2_VALID_IRQ_MASK 0x1fffffff
69
70#define IRQ_EP93XX_GPIO(x) (64 + (x))
71
72#define NR_EP93XX_IRQS IRQ_EP93XX_GPIO(16)
73
74#define EP93XX_BOARD_IRQ(x) (NR_EP93XX_IRQS + (x))
75#define EP93XX_BOARD_IRQS 32
76
77#define NR_IRQS (NR_EP93XX_IRQS + EP93XX_BOARD_IRQS)
78
79
80#endif
diff --git a/include/asm-arm/arch-ep93xx/memory.h b/include/asm-arm/arch-ep93xx/memory.h
new file mode 100644
index 000000000000..4b1a5c7c8363
--- /dev/null
+++ b/include/asm-arm/arch-ep93xx/memory.h
@@ -0,0 +1,14 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/memory.h
3 */
4
5#ifndef __ASM_ARCH_MEMORY_H
6#define __ASM_ARCH_MEMORY_H
7
8#define PHYS_OFFSET UL(0x00000000)
9
10#define __bus_to_virt(x) __phys_to_virt(x)
11#define __virt_to_bus(x) __virt_to_phys(x)
12
13
14#endif
diff --git a/include/asm-arm/arch-ep93xx/platform.h b/include/asm-arm/arch-ep93xx/platform.h
new file mode 100644
index 000000000000..df9cbb6ef660
--- /dev/null
+++ b/include/asm-arm/arch-ep93xx/platform.h
@@ -0,0 +1,14 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/platform.h
3 */
4
5#ifndef __ASSEMBLY__
6
7void ep93xx_map_io(void);
8void ep93xx_init_irq(void);
9void ep93xx_init_time(unsigned long);
10void ep93xx_init_devices(void);
11extern struct sys_timer ep93xx_timer;
12
13
14#endif
diff --git a/include/asm-arm/arch-ep93xx/system.h b/include/asm-arm/arch-ep93xx/system.h
new file mode 100644
index 000000000000..79b718586746
--- /dev/null
+++ b/include/asm-arm/arch-ep93xx/system.h
@@ -0,0 +1,26 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/system.h
3 */
4
5#include <asm/hardware.h>
6
7static inline void arch_idle(void)
8{
9 cpu_do_idle();
10}
11
12static inline void arch_reset(char mode)
13{
14 u32 devicecfg;
15
16 local_irq_disable();
17
18 devicecfg = __raw_readl(EP93XX_SYSCON_DEVICE_CONFIG);
19 __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
20 __raw_writel(devicecfg | 0x80000000, EP93XX_SYSCON_DEVICE_CONFIG);
21 __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK);
22 __raw_writel(devicecfg & ~0x80000000, EP93XX_SYSCON_DEVICE_CONFIG);
23
24 while (1)
25 ;
26}
diff --git a/include/asm-arm/arch-ep93xx/timex.h b/include/asm-arm/arch-ep93xx/timex.h
new file mode 100644
index 000000000000..4140bddc97e2
--- /dev/null
+++ b/include/asm-arm/arch-ep93xx/timex.h
@@ -0,0 +1,5 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/timex.h
3 */
4
5#define CLOCK_TICK_RATE 983040
diff --git a/include/asm-arm/arch-ep93xx/ts72xx.h b/include/asm-arm/arch-ep93xx/ts72xx.h
new file mode 100644
index 000000000000..412215e77f44
--- /dev/null
+++ b/include/asm-arm/arch-ep93xx/ts72xx.h
@@ -0,0 +1,90 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/ts72xx.h
3 */
4
5/*
6 * TS72xx memory map:
7 *
8 * virt phys size
9 * febff000 22000000 4K model number register
10 * febfe000 22400000 4K options register
11 * febfd000 22800000 4K options register #2
12 * febfc000 [67]0000000 4K NAND data register
13 * febfb000 [67]0400000 4K NAND control register
14 * febfa000 [67]0800000 4K NAND busy register
15 */
16
17#define TS72XX_MODEL_PHYS_BASE 0x22000000
18#define TS72XX_MODEL_VIRT_BASE 0xfebff000
19#define TS72XX_MODEL_SIZE 0x00001000
20
21#define TS72XX_MODEL_TS7200 0x00
22#define TS72XX_MODEL_TS7250 0x01
23#define TS72XX_MODEL_TS7260 0x02
24
25
26#define TS72XX_OPTIONS_PHYS_BASE 0x22400000
27#define TS72XX_OPTIONS_VIRT_BASE 0xfebfe000
28#define TS72XX_OPTIONS_SIZE 0x00001000
29
30#define TS72XX_OPTIONS_COM2_RS485 0x02
31#define TS72XX_OPTIONS_MAX197 0x01
32
33
34#define TS72XX_OPTIONS2_PHYS_BASE 0x22800000
35#define TS72XX_OPTIONS2_VIRT_BASE 0xfebfd000
36#define TS72XX_OPTIONS2_SIZE 0x00001000
37
38#define TS72XX_OPTIONS2_TS9420 0x04
39#define TS72XX_OPTIONS2_TS9420_BOOT 0x02
40
41
42#define TS72XX_NOR_PHYS_BASE 0x60000000
43#define TS72XX_NOR2_PHYS_BASE 0x62000000
44
45#define TS72XX_NAND1_DATA_PHYS_BASE 0x60000000
46#define TS72XX_NAND2_DATA_PHYS_BASE 0x70000000
47#define TS72XX_NAND_DATA_VIRT_BASE 0xfebfc000
48#define TS72XX_NAND_DATA_SIZE 0x00001000
49
50#define TS72XX_NAND1_CONTROL_PHYS_BASE 0x60400000
51#define TS72XX_NAND2_CONTROL_PHYS_BASE 0x70400000
52#define TS72XX_NAND_CONTROL_VIRT_BASE 0xfebfb000
53#define TS72XX_NAND_CONTROL_SIZE 0x00001000
54
55#define TS72XX_NAND1_BUSY_PHYS_BASE 0x60800000
56#define TS72XX_NAND2_BUSY_PHYS_BASE 0x70800000
57#define TS72XX_NAND_BUSY_VIRT_BASE 0xfebfa000
58#define TS72XX_NAND_BUSY_SIZE 0x00001000
59
60
61#ifndef __ASSEMBLY__
62#include <asm/io.h>
63
64static inline int board_is_ts7200(void)
65{
66 return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7200;
67}
68
69static inline int board_is_ts7250(void)
70{
71 return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7250;
72}
73
74static inline int board_is_ts7260(void)
75{
76 return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7260;
77}
78
79static inline int is_max197_installed(void)
80{
81 return !!(__raw_readb(TS72XX_OPTIONS_VIRT_BASE) &
82 TS72XX_OPTIONS_MAX197);
83}
84
85static inline int is_ts9420_installed(void)
86{
87 return !!(__raw_readb(TS72XX_OPTIONS2_VIRT_BASE) &
88 TS72XX_OPTIONS2_TS9420);
89}
90#endif
diff --git a/include/asm-arm/arch-ep93xx/uncompress.h b/include/asm-arm/arch-ep93xx/uncompress.h
new file mode 100644
index 000000000000..4410d217077e
--- /dev/null
+++ b/include/asm-arm/arch-ep93xx/uncompress.h
@@ -0,0 +1,53 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/uncompress.h
3 *
4 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
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 (at
9 * your option) any later version.
10 */
11
12#include <asm/arch/ep93xx-regs.h>
13
14static unsigned char __raw_readb(unsigned int ptr)
15{
16 return *((volatile unsigned char *)ptr);
17}
18
19static void __raw_writeb(unsigned char value, unsigned int ptr)
20{
21 *((volatile unsigned char *)ptr) = value;
22}
23
24
25#define PHYS_UART1_DATA 0x808c0000
26#define PHYS_UART1_FLAG 0x808c0018
27#define UART1_FLAG_TXFF 0x20
28
29static __inline__ void putc(char c)
30{
31 int i;
32
33 for (i = 0; i < 1000; i++) {
34 /* Transmit fifo not full? */
35 if (!(__raw_readb(PHYS_UART1_FLAG) & UART1_FLAG_TXFF))
36 break;
37 }
38
39 __raw_writeb(c, PHYS_UART1_DATA);
40}
41
42static void putstr(const char *s)
43{
44 while (*s) {
45 putc(*s);
46 if (*s == '\n')
47 putc('\r');
48 s++;
49 }
50}
51
52#define arch_decomp_setup()
53#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-ep93xx/vmalloc.h b/include/asm-arm/arch-ep93xx/vmalloc.h
new file mode 100644
index 000000000000..205ea6b1cf5e
--- /dev/null
+++ b/include/asm-arm/arch-ep93xx/vmalloc.h
@@ -0,0 +1,5 @@
1/*
2 * linux/include/asm-arm/arch-ep93xx/vmalloc.h
3 */
4
5#define VMALLOC_END 0xfe800000
diff --git a/include/asm-arm/arch-h720x/irq.h b/include/asm-arm/arch-h720x/irq.h
deleted file mode 100644
index b3821e957aa4..000000000000
--- a/include/asm-arm/arch-h720x/irq.h
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * include/asm-arm/arch-h720x/irq.h
3 *
4 * Copyright (C) 2000-2002 Jungjun Kim
5 * (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
6 * (C) 2003 Thomas Gleixner <tglx@linutronix.de>
7 */
8
9#ifndef __ASM_ARCH_IRQ_H
10#define __ASM_ARCH_IRQ_H
11
12extern void __init h720x_init_irq (void);
13
14#endif /* __ASM_ARCH_IRQ_H */
diff --git a/include/asm-arm/arch-h720x/param.h b/include/asm-arm/arch-h720x/param.h
deleted file mode 100644
index 2b80235f9847..000000000000
--- a/include/asm-arm/arch-h720x/param.h
+++ /dev/null
@@ -1,10 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-h720x/param.h
3 *
4 * Copyright (C) 2000 Jungjun Kim
5 */
6
7#ifndef __ASM_ARCH_PARAM_H
8#define __ASM_ARCH_PARAM_H
9
10#endif
diff --git a/include/asm-arm/arch-imx/irq.h b/include/asm-arm/arch-imx/irq.h
deleted file mode 100644
index 545e065d2325..000000000000
--- a/include/asm-arm/arch-imx/irq.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-imxads/irq.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#define fixup_irq(i) (i)
diff --git a/include/asm-arm/arch-imx/param.h b/include/asm-arm/arch-imx/param.h
deleted file mode 100644
index 7c724f03333e..000000000000
--- a/include/asm-arm/arch-imx/param.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-imx/param.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 */
diff --git a/include/asm-arm/arch-integrator/debug-macro.S b/include/asm-arm/arch-integrator/debug-macro.S
index 031d30941791..85b327c352df 100644
--- a/include/asm-arm/arch-integrator/debug-macro.S
+++ b/include/asm-arm/arch-integrator/debug-macro.S
@@ -11,8 +11,6 @@
11 * 11 *
12*/ 12*/
13 13
14#include <linux/amba/serial.h>
15
16 .macro addruart,rx 14 .macro addruart,rx
17 mrc p15, 0, \rx, c1, c0 15 mrc p15, 0, \rx, c1, c0
18 tst \rx, #1 @ MMU enabled? 16 tst \rx, #1 @ MMU enabled?
@@ -21,18 +19,4 @@
21 addne \rx, \rx, #0x16000000 >> 4 19 addne \rx, \rx, #0x16000000 >> 4
22 .endm 20 .endm
23 21
24 .macro senduart,rd,rx 22#include <asm/hardware/debug-pl01x.S>
25 strb \rd, [\rx, #UART01x_DR]
26 .endm
27
28 .macro waituart,rd,rx
291001: ldr \rd, [\rx, #0x18] @ UARTFLG
30 tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full
31 bne 1001b
32 .endm
33
34 .macro busyuart,rd,rx
351001: ldr \rd, [\rx, #0x18] @ UARTFLG
36 tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy
37 bne 1001b
38 .endm
diff --git a/include/asm-arm/arch-integrator/param.h b/include/asm-arm/arch-integrator/param.h
deleted file mode 100644
index afa582ff3717..000000000000
--- a/include/asm-arm/arch-integrator/param.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-integrator/param.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 */
diff --git a/include/asm-arm/arch-iop3xx/debug-macro.S b/include/asm-arm/arch-iop3xx/debug-macro.S
index cc15f80ebd9a..ce007e531994 100644
--- a/include/asm-arm/arch-iop3xx/debug-macro.S
+++ b/include/asm-arm/arch-iop3xx/debug-macro.S
@@ -28,21 +28,8 @@
28#endif 28#endif
29 .endm 29 .endm
30 30
31 .macro senduart,rd,rx
32 strb \rd, [\rx]
33 .endm
34
35 .macro busyuart,rd,rx
361002: ldrb \rd, [\rx, #0x5]
37 and \rd, \rd, #0x60
38 teq \rd, #0x60
39 bne 1002b
40 .endm
41
42 .macro waituart,rd,rx
43#if !defined(CONFIG_ARCH_IQ80321) || !defined(CONFIG_ARCH_IQ31244) || !defined(CONFIG_ARCH_IQ80331) 31#if !defined(CONFIG_ARCH_IQ80321) || !defined(CONFIG_ARCH_IQ31244) || !defined(CONFIG_ARCH_IQ80331)
441001: ldrb \rd, [\rx, #0x6] 32#define FLOW_CONTROL
45 tst \rd, #0x10
46 beq 1001b
47#endif 33#endif
48 .endm 34#define UART_SHIFT 0
35#include <asm/hardware/debug-8250.S>
diff --git a/include/asm-arm/arch-iop3xx/param.h b/include/asm-arm/arch-iop3xx/param.h
deleted file mode 100644
index acf404e87358..000000000000
--- a/include/asm-arm/arch-iop3xx/param.h
+++ /dev/null
@@ -1,3 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-iop3xx/param.h
3 */
diff --git a/include/asm-arm/arch-ixp2000/debug-macro.S b/include/asm-arm/arch-ixp2000/debug-macro.S
index 5631e0889861..bc8b39654793 100644
--- a/include/asm-arm/arch-ixp2000/debug-macro.S
+++ b/include/asm-arm/arch-ixp2000/debug-macro.S
@@ -23,18 +23,5 @@
23#endif 23#endif
24 .endm 24 .endm
25 25
26 .macro senduart,rd,rx 26#define UART_SHIFT 2
27 strb \rd, [\rx] 27#include <asm/hardware/debug-8250.S>
28 .endm
29
30 .macro busyuart,rd,rx
311002: ldrb \rd, [\rx, #0x14]
32 tst \rd, #0x20
33 beq 1002b
34 .endm
35
36 .macro waituart,rd,rx
37 nop
38 nop
39 nop
40 .endm
diff --git a/include/asm-arm/arch-ixp2000/irq.h b/include/asm-arm/arch-ixp2000/irq.h
deleted file mode 100644
index ba00b23f9828..000000000000
--- a/include/asm-arm/arch-ixp2000/irq.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp2000/irq.h
3 *
4 * Copyright (C) 2002 Intel Corp.
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
11#define fixup_irq(irq) (irq)
12
13
diff --git a/include/asm-arm/arch-ixp2000/ixdp2x00.h b/include/asm-arm/arch-ixp2000/ixdp2x00.h
index 229381c64283..546e2e8e27b8 100644
--- a/include/asm-arm/arch-ixp2000/ixdp2x00.h
+++ b/include/asm-arm/arch-ixp2000/ixdp2x00.h
@@ -72,12 +72,11 @@
72 72
73#ifndef __ASSEMBLY__ 73#ifndef __ASSEMBLY__
74/* 74/*
75 * Master NPU will always have flash and be PCI master. 75 * The master NPU is always PCI master.
76 * Slave NPU may or may not have flash but will never be PCI master.
77 */ 76 */
78static inline unsigned int ixdp2x00_master_npu(void) 77static inline unsigned int ixdp2x00_master_npu(void)
79{ 78{
80 return ((ixp2000_has_flash()) && (ixp2000_is_pcimaster())); 79 return !!ixp2000_is_pcimaster();
81} 80}
82 81
83/* 82/*
diff --git a/include/asm-arm/arch-ixp2000/ixp2000-regs.h b/include/asm-arm/arch-ixp2000/ixp2000-regs.h
index 2b57f91b4ebd..ccae4bec92c5 100644
--- a/include/asm-arm/arch-ixp2000/ixp2000-regs.h
+++ b/include/asm-arm/arch-ixp2000/ixp2000-regs.h
@@ -353,8 +353,8 @@
353 * Masks and shifts for various fields in the WTC and RTC registers. 353 * Masks and shifts for various fields in the WTC and RTC registers.
354 */ 354 */
355#define SLOWPORT_WRTC_MASK_HD 0x0003 355#define SLOWPORT_WRTC_MASK_HD 0x0003
356#define SLOWPORT_WRTC_MASK_SU 0x003c 356#define SLOWPORT_WRTC_MASK_PW 0x003c
357#define SLOWPORT_WRTC_MASK_PW 0x03c0 357#define SLOWPORT_WRTC_MASK_SU 0x03c0
358 358
359#define SLOWPORT_WRTC_SHIFT_HD 0x00 359#define SLOWPORT_WRTC_SHIFT_HD 0x00
360#define SLOWPORT_WRTC_SHIFT_SU 0x02 360#define SLOWPORT_WRTC_SHIFT_SU 0x02
diff --git a/include/asm-arm/arch-ixp2000/param.h b/include/asm-arm/arch-ixp2000/param.h
deleted file mode 100644
index 2646d9e5919d..000000000000
--- a/include/asm-arm/arch-ixp2000/param.h
+++ /dev/null
@@ -1,3 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp2000/param.h
3 */
diff --git a/include/asm-arm/arch-ixp2000/system.h b/include/asm-arm/arch-ixp2000/system.h
index ddbbb34b5f95..3cc9a04f68cb 100644
--- a/include/asm-arm/arch-ixp2000/system.h
+++ b/include/asm-arm/arch-ixp2000/system.h
@@ -37,7 +37,7 @@ static inline void arch_reset(char mode)
37 * to cause a complete reset of the CPU and all external devices 37 * to cause a complete reset of the CPU and all external devices
38 * and move the flash bank register back to 0. 38 * and move the flash bank register back to 0.
39 */ 39 */
40 if (machine_is_ixdp2801()) { 40 if (machine_is_ixdp2801() || machine_is_ixdp28x5()) {
41 unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG; 41 unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG;
42 42
43 reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF); 43 reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF);
diff --git a/include/asm-arm/arch-ixp4xx/debug-macro.S b/include/asm-arm/arch-ixp4xx/debug-macro.S
index 2e23651e217f..37bc8ef23e67 100644
--- a/include/asm-arm/arch-ixp4xx/debug-macro.S
+++ b/include/asm-arm/arch-ixp4xx/debug-macro.S
@@ -20,16 +20,5 @@
20 @ byte writes used - Big Endian. 20 @ byte writes used - Big Endian.
21 .endm 21 .endm
22 22
23 .macro senduart,rd,rx 23#define UART_SHIFT 2
24 strb \rd, [\rx] 24#include <asm/hardware/debug-8250.S>
25 .endm
26
27 .macro waituart,rd,rx
281002: ldrb \rd, [\rx, #0x14]
29 and \rd, \rd, #0x60 @ check THRE and TEMT bits
30 teq \rd, #0x60
31 bne 1002b
32 .endm
33
34 .macro busyuart,rd,rx
35 .endm
diff --git a/include/asm-arm/arch-ixp4xx/irq.h b/include/asm-arm/arch-ixp4xx/irq.h
deleted file mode 100644
index 87da70695f0a..000000000000
--- a/include/asm-arm/arch-ixp4xx/irq.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * irq.h
3 *
4 * Copyright (C) 2002 Intel 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 version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11
12#define fixup_irq(irq) (irq)
13
diff --git a/include/asm-arm/arch-ixp4xx/param.h b/include/asm-arm/arch-ixp4xx/param.h
deleted file mode 100644
index 8a757125e5e7..000000000000
--- a/include/asm-arm/arch-ixp4xx/param.h
+++ /dev/null
@@ -1,3 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-ixp4xx/param.h
3 */
diff --git a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4xx/platform.h
index daf9790645ca..13aee17b0475 100644
--- a/include/asm-arm/arch-ixp4xx/platform.h
+++ b/include/asm-arm/arch-ixp4xx/platform.h
@@ -38,6 +38,33 @@ extern unsigned long ixp4xx_exp_bus_size;
38#define IXP4XX_EXP_BUS_BASE(region)\ 38#define IXP4XX_EXP_BUS_BASE(region)\
39 (IXP4XX_EXP_BUS_BASE_PHYS + ((region) * ixp4xx_exp_bus_size)) 39 (IXP4XX_EXP_BUS_BASE_PHYS + ((region) * ixp4xx_exp_bus_size))
40 40
41#define IXP4XX_EXP_BUS_END(region)\
42 (IXP4XX_EXP_BUS_BASE(region) + ixp4xx_exp_bus_size - 1)
43
44/* Those macros can be used to adjust timing and configure
45 * other features for each region.
46 */
47
48#define IXP4XX_EXP_BUS_RECOVERY_T(x) (((x) & 0x0f) << 16)
49#define IXP4XX_EXP_BUS_HOLD_T(x) (((x) & 0x03) << 20)
50#define IXP4XX_EXP_BUS_STROBE_T(x) (((x) & 0x0f) << 22)
51#define IXP4XX_EXP_BUS_SETUP_T(x) (((x) & 0x03) << 26)
52#define IXP4XX_EXP_BUS_ADDR_T(x) (((x) & 0x03) << 28)
53#define IXP4XX_EXP_BUS_SIZE(x) (((x) & 0x0f) << 10)
54#define IXP4XX_EXP_BUS_CYCLES(x) (((x) & 0x03) << 14)
55
56#define IXP4XX_EXP_BUS_CS_EN (1L << 31)
57#define IXP4XX_EXP_BUS_BYTE_RD16 (1L << 6)
58#define IXP4XX_EXP_BUS_HRDY_POL (1L << 5)
59#define IXP4XX_EXP_BUS_MUX_EN (1L << 4)
60#define IXP4XX_EXP_BUS_SPLT_EN (1L << 3)
61#define IXP4XX_EXP_BUS_WR_EN (1L << 1)
62#define IXP4XX_EXP_BUS_BYTE_EN (1L << 0)
63
64#define IXP4XX_EXP_BUS_CYCLES_INTEL 0x00
65#define IXP4XX_EXP_BUS_CYCLES_MOTOROLA 0x01
66#define IXP4XX_EXP_BUS_CYCLES_HPI 0x02
67
41#define IXP4XX_FLASH_WRITABLE (0x2) 68#define IXP4XX_FLASH_WRITABLE (0x2)
42#define IXP4XX_FLASH_DEFAULT (0xbcd23c40) 69#define IXP4XX_FLASH_DEFAULT (0xbcd23c40)
43#define IXP4XX_FLASH_WRITE (0xbcd23c42) 70#define IXP4XX_FLASH_WRITE (0xbcd23c42)
diff --git a/include/asm-arm/arch-l7200/param.h b/include/asm-arm/arch-l7200/param.h
deleted file mode 100644
index 9962a12ab158..000000000000
--- a/include/asm-arm/arch-l7200/param.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-l7200/param.h
3 *
4 * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net)
5 * Steve Hill (sjhill@cotw.com)
6 *
7 * This file contains the hardware definitions for the
8 * LinkUp Systems L7200 SOC development board.
9 *
10 * Changelog:
11 * 04-21-2000 RS Created L7200 version
12 * 04-25-2000 SJH Cleaned up file
13 * 05-03-2000 SJH Change comments and rate
14 */
15
16/*
17 * See 'time.h' for how the RTC HZ rate is set
18 */
19#define HZ 128
diff --git a/include/asm-arm/arch-lh7a40x/irq.h b/include/asm-arm/arch-lh7a40x/irq.h
deleted file mode 100644
index 0f5f0b10f6ca..000000000000
--- a/include/asm-arm/arch-lh7a40x/irq.h
+++ /dev/null
@@ -1,11 +0,0 @@
1/* include/asm-arm/arch-lh7a40x/irq.h
2 *
3 * Copyright (C) 2004 Logic Product Development
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 */
10
11void __init lh7a40x_init_board_irq (void);
diff --git a/include/asm-arm/arch-lh7a40x/param.h b/include/asm-arm/arch-lh7a40x/param.h
deleted file mode 100644
index acad0bc5deba..000000000000
--- a/include/asm-arm/arch-lh7a40x/param.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/* include/asm-arm/arch-lh7a40x/param.h
2 *
3 * Copyright (C) 2004 Coastal Environmental Systems
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
8 *
9 */
diff --git a/include/asm-arm/arch-omap/param.h b/include/asm-arm/arch-omap/param.h
deleted file mode 100644
index face9ad41e97..000000000000
--- a/include/asm-arm/arch-omap/param.h
+++ /dev/null
@@ -1,8 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/param.h
3 *
4 */
5
6#ifdef CONFIG_OMAP_32K_TIMER_HZ
7#define HZ CONFIG_OMAP_32K_TIMER_HZ
8#endif
diff --git a/include/asm-arm/arch-pxa/debug-macro.S b/include/asm-arm/arch-pxa/debug-macro.S
index b6ec68879176..9012cbc0ad8b 100644
--- a/include/asm-arm/arch-pxa/debug-macro.S
+++ b/include/asm-arm/arch-pxa/debug-macro.S
@@ -21,18 +21,5 @@
21 orr \rx, \rx, #0x00100000 21 orr \rx, \rx, #0x00100000
22 .endm 22 .endm
23 23
24 .macro senduart,rd,rx 24#define UART_SHIFT 2
25 str \rd, [\rx, #0] 25#include <asm/hardware/debug-8250.S>
26 .endm
27
28 .macro busyuart,rd,rx
291002: ldr \rd, [\rx, #0x14]
30 tst \rd, #(1 << 6)
31 beq 1002b
32 .endm
33
34 .macro waituart,rd,rx
351001: ldr \rd, [\rx, #0x14]
36 tst \rd, #(1 << 5)
37 beq 1001b
38 .endm
diff --git a/include/asm-arm/arch-pxa/irq.h b/include/asm-arm/arch-pxa/irq.h
deleted file mode 100644
index 48c60f5eff6a..000000000000
--- a/include/asm-arm/arch-pxa/irq.h
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/irq.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
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#define fixup_irq(x) (x)
14
diff --git a/include/asm-arm/arch-pxa/param.h b/include/asm-arm/arch-pxa/param.h
deleted file mode 100644
index 3197d82d7573..000000000000
--- a/include/asm-arm/arch-pxa/param.h
+++ /dev/null
@@ -1,3 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-pxa/param.h
3 */
diff --git a/include/asm-arm/arch-realview/debug-macro.S b/include/asm-arm/arch-realview/debug-macro.S
index 017ad996848d..f17efc65518a 100644
--- a/include/asm-arm/arch-realview/debug-macro.S
+++ b/include/asm-arm/arch-realview/debug-macro.S
@@ -11,8 +11,6 @@
11 * 11 *
12*/ 12*/
13 13
14#include <linux/amba/serial.h>
15
16 .macro addruart,rx 14 .macro addruart,rx
17 mrc p15, 0, \rx, c1, c0 15 mrc p15, 0, \rx, c1, c0
18 tst \rx, #1 @ MMU enabled? 16 tst \rx, #1 @ MMU enabled?
@@ -21,18 +19,4 @@
21 orr \rx, \rx, #0x00009000 19 orr \rx, \rx, #0x00009000
22 .endm 20 .endm
23 21
24 .macro senduart,rd,rx 22#include <asm/hardware/debug-pl01x.S>
25 strb \rd, [\rx, #UART01x_DR]
26 .endm
27
28 .macro waituart,rd,rx
291001: ldr \rd, [\rx, #0x18] @ UARTFLG
30 tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full
31 bne 1001b
32 .endm
33
34 .macro busyuart,rd,rx
351001: ldr \rd, [\rx, #0x18] @ UARTFLG
36 tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy
37 bne 1001b
38 .endm
diff --git a/include/asm-arm/arch-realview/param.h b/include/asm-arm/arch-realview/param.h
deleted file mode 100644
index 89b1235d32bd..000000000000
--- a/include/asm-arm/arch-realview/param.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-realview/param.h
3 *
4 * Copyright (C) 2002 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 */
diff --git a/include/asm-arm/arch-rpc/debug-macro.S b/include/asm-arm/arch-rpc/debug-macro.S
index 456d3d754c3d..c634c8d8f4a1 100644
--- a/include/asm-arm/arch-rpc/debug-macro.S
+++ b/include/asm-arm/arch-rpc/debug-macro.S
@@ -20,19 +20,6 @@
20 orr \rx, \rx, #0x00000fe0 20 orr \rx, \rx, #0x00000fe0
21 .endm 21 .endm
22 22
23 .macro senduart,rd,rx 23#define UART_SHIFT 2
24 strb \rd, [\rx] 24#define FLOW_CONTROL
25 .endm 25#include <asm/hardware/debug-8250.S>
26
27 .macro busyuart,rd,rx
281001: ldrb \rd, [\rx, #0x14]
29 and \rd, \rd, #0x60
30 teq \rd, #0x60
31 bne 1001b
32 .endm
33
34 .macro waituart,rd,rx
351001: ldrb \rd, [\rx, #0x18]
36 tst \rd, #0x10
37 beq 1001b
38 .endm
diff --git a/include/asm-arm/arch-rpc/param.h b/include/asm-arm/arch-rpc/param.h
deleted file mode 100644
index 721dcd658858..000000000000
--- a/include/asm-arm/arch-rpc/param.h
+++ /dev/null
@@ -1,3 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-rpc/param.h
3 */
diff --git a/include/asm-arm/arch-s3c2410/osiris-cpld.h b/include/asm-arm/arch-s3c2410/osiris-cpld.h
new file mode 100644
index 000000000000..e9d1ae1f354f
--- /dev/null
+++ b/include/asm-arm/arch-s3c2410/osiris-cpld.h
@@ -0,0 +1,25 @@
1/* linux/include/asm-arm/arch-s3c2410/osiris-cpld.h
2 *
3 * (c) 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * OSIRIS - CPLD control constants
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 version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_OSIRISCPLD_H
15#define __ASM_ARCH_OSIRISCPLD_H
16
17/* CTRL1 - NAND WP control */
18
19#define OSIRIS_CTRL1_NANDSEL (0x3)
20#define OSIRIS_CTRL1_BOOT_INT (1<<3)
21#define OSIRIS_CTRL1_PCMCIA (1<<4)
22#define OSIRIS_CTRL1_PCMCIA_nWAIT (1<<6)
23#define OSIRIS_CTRL1_PCMCIA_nIOIS16 (1<<7)
24
25#endif /* __ASM_ARCH_OSIRISCPLD_H */
diff --git a/include/asm-arm/arch-s3c2410/osiris-map.h b/include/asm-arm/arch-s3c2410/osiris-map.h
new file mode 100644
index 000000000000..7c4b0cd2d14d
--- /dev/null
+++ b/include/asm-arm/arch-s3c2410/osiris-map.h
@@ -0,0 +1,41 @@
1/* linux/include/asm-arm/arch-s3c2410/osiris-map.h
2 *
3 * (c) 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * OSIRIS - Memory map definitions
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 version 2 as
11 * published by the Free Software Foundation.
12 *
13 * Changelog:
14*/
15
16/* needs arch/map.h including with this */
17
18#ifndef __ASM_ARCH_OSIRISMAP_H
19#define __ASM_ARCH_OSIRISMAP_H
20
21/* start peripherals off after the S3C2410 */
22
23#define OSIRIS_IOADDR(x) (S3C2410_ADDR((x) + 0x05000000))
24
25#define OSIRIS_PA_CPLD (S3C2410_CS1 | (3<<25))
26
27/* we put the CPLD registers next, to get them out of the way */
28
29#define OSIRIS_VA_CTRL1 OSIRIS_IOADDR(0x00000000) /* 0x01300000 */
30#define OSIRIS_PA_CTRL1 (OSIRIS_PA_CPLD)
31
32#define OSIRIS_VA_CTRL2 OSIRIS_IOADDR(0x00100000) /* 0x01400000 */
33#define OSIRIS_PA_CTRL2 (OSIRIS_PA_CPLD + (1<<24))
34
35#define OSIRIS_VA_CTRL3 OSIRIS_IOADDR(0x00200000) /* 0x01500000 */
36#define OSIRIS_PA_CTRL3 (OSIRIS_PA_CPLD + (2<<24))
37
38#define OSIRIS_VA_CTRL4 OSIRIS_IOADDR(0x00300000) /* 0x01600000 */
39#define OSIRIS_PA_CTRL4 (OSIRIS_PA_CPLD + (3<<24))
40
41#endif /* __ASM_ARCH_OSIRISMAP_H */
diff --git a/include/asm-arm/arch-s3c2410/param.h b/include/asm-arm/arch-s3c2410/param.h
deleted file mode 100644
index 483d3f149883..000000000000
--- a/include/asm-arm/arch-s3c2410/param.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/* linux/include/asm-arm/arch-s3c2410/param.h
2 *
3 * (c) 2003 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - Machine parameters
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 * Changelog:
13 * 02-Sep-2003 BJD Created file
14 * 12-Mar-2004 BJD Added include protection
15*/
16
17#ifndef __ASM_ARCH_PARAM_H
18#define __ASM_ARCH_PARAM_H
19
20/* we cannot get our timer down to 100Hz with the setup as is, but we can
21 * manage 200 clock ticks per second... if this is a problem, we can always
22 * add a software pre-scaler to the evil timer systems.
23*/
24
25#define HZ 200
26
27#endif /* __ASM_ARCH_PARAM_H */
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h
index 9697f93afe74..d2574084697f 100644
--- a/include/asm-arm/arch-s3c2410/regs-gpio.h
+++ b/include/asm-arm/arch-s3c2410/regs-gpio.h
@@ -979,6 +979,7 @@
979#define S3C2410_MISCCR_CLK0_HCLK (3<<4) 979#define S3C2410_MISCCR_CLK0_HCLK (3<<4)
980#define S3C2410_MISCCR_CLK0_PCLK (4<<4) 980#define S3C2410_MISCCR_CLK0_PCLK (4<<4)
981#define S3C2410_MISCCR_CLK0_DCLK0 (5<<4) 981#define S3C2410_MISCCR_CLK0_DCLK0 (5<<4)
982#define S3C2410_MISCCR_CLK0_MASK (7<<4)
982 983
983#define S3C2410_MISCCR_CLK1_MPLL (0<<8) 984#define S3C2410_MISCCR_CLK1_MPLL (0<<8)
984#define S3C2410_MISCCR_CLK1_UPLL (1<<8) 985#define S3C2410_MISCCR_CLK1_UPLL (1<<8)
@@ -986,6 +987,7 @@
986#define S3C2410_MISCCR_CLK1_HCLK (3<<8) 987#define S3C2410_MISCCR_CLK1_HCLK (3<<8)
987#define S3C2410_MISCCR_CLK1_PCLK (4<<8) 988#define S3C2410_MISCCR_CLK1_PCLK (4<<8)
988#define S3C2410_MISCCR_CLK1_DCLK1 (5<<8) 989#define S3C2410_MISCCR_CLK1_DCLK1 (5<<8)
990#define S3C2410_MISCCR_CLK1_MASK (7<<8)
989 991
990#define S3C2410_MISCCR_USBSUSPND0 (1<<12) 992#define S3C2410_MISCCR_USBSUSPND0 (1<<12)
991#define S3C2410_MISCCR_USBSUSPND1 (1<<13) 993#define S3C2410_MISCCR_USBSUSPND1 (1<<13)
diff --git a/include/asm-arm/arch-sa1100/debug-macro.S b/include/asm-arm/arch-sa1100/debug-macro.S
index 755fa3453862..267c317a7408 100644
--- a/include/asm-arm/arch-sa1100/debug-macro.S
+++ b/include/asm-arm/arch-sa1100/debug-macro.S
@@ -10,6 +10,7 @@
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 * 11 *
12*/ 12*/
13#include <asm/hardware.h>
13 14
14 .macro addruart,rx 15 .macro addruart,rx
15 mrc p15, 0, \rx, c1, c0 16 mrc p15, 0, \rx, c1, c0
diff --git a/include/asm-arm/arch-sa1100/param.h b/include/asm-arm/arch-sa1100/param.h
deleted file mode 100644
index 867488909ecd..000000000000
--- a/include/asm-arm/arch-sa1100/param.h
+++ /dev/null
@@ -1,3 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-sa1100/param.h
3 */
diff --git a/include/asm-arm/arch-shark/param.h b/include/asm-arm/arch-shark/param.h
deleted file mode 100644
index 997eeb71de00..000000000000
--- a/include/asm-arm/arch-shark/param.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-shark/param.h
3 *
4 * by Alexander Schulz
5 */
diff --git a/include/asm-arm/arch-versatile/debug-macro.S b/include/asm-arm/arch-versatile/debug-macro.S
index ef6167116dbb..fe106d184e62 100644
--- a/include/asm-arm/arch-versatile/debug-macro.S
+++ b/include/asm-arm/arch-versatile/debug-macro.S
@@ -11,8 +11,6 @@
11 * 11 *
12*/ 12*/
13 13
14#include <linux/amba/serial.h>
15
16 .macro addruart,rx 14 .macro addruart,rx
17 mrc p15, 0, \rx, c1, c0 15 mrc p15, 0, \rx, c1, c0
18 tst \rx, #1 @ MMU enabled? 16 tst \rx, #1 @ MMU enabled?
@@ -22,18 +20,4 @@
22 orr \rx, \rx, #0x00001000 20 orr \rx, \rx, #0x00001000
23 .endm 21 .endm
24 22
25 .macro senduart,rd,rx 23#include <asm/hardware/debug-pl01x.S>
26 strb \rd, [\rx, #UART01x_DR]
27 .endm
28
29 .macro waituart,rd,rx
301001: ldr \rd, [\rx, #0x18] @ UARTFLG
31 tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full
32 bne 1001b
33 .endm
34
35 .macro busyuart,rd,rx
361001: ldr \rd, [\rx, #0x18] @ UARTFLG
37 tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy
38 bne 1001b
39 .endm
diff --git a/include/asm-arm/arch-versatile/param.h b/include/asm-arm/arch-versatile/param.h
deleted file mode 100644
index 34b897335f87..000000000000
--- a/include/asm-arm/arch-versatile/param.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-versatile/param.h
3 *
4 * Copyright (C) 2002 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 */
diff --git a/include/asm-arm/delay.h b/include/asm-arm/delay.h
index 1704360e9699..b2deda181549 100644
--- a/include/asm-arm/delay.h
+++ b/include/asm-arm/delay.h
@@ -6,6 +6,8 @@
6#ifndef __ASM_ARM_DELAY_H 6#ifndef __ASM_ARM_DELAY_H
7#define __ASM_ARM_DELAY_H 7#define __ASM_ARM_DELAY_H
8 8
9#include <asm/param.h> /* HZ */
10
9extern void __delay(int loops); 11extern void __delay(int loops);
10 12
11/* 13/*
@@ -13,7 +15,7 @@ extern void __delay(int loops);
13 * it, it means that you're calling udelay() with an out of range value. 15 * it, it means that you're calling udelay() with an out of range value.
14 * 16 *
15 * With currently imposed limits, this means that we support a max delay 17 * With currently imposed limits, this means that we support a max delay
16 * of 2000us and 671 bogomips 18 * of 2000us. Further limits: HZ<=1000 and bogomips<=3355
17 */ 19 */
18extern void __bad_udelay(void); 20extern void __bad_udelay(void);
19 21
@@ -32,10 +34,10 @@ extern void __const_udelay(unsigned long);
32 34
33#define MAX_UDELAY_MS 2 35#define MAX_UDELAY_MS 2
34 36
35#define udelay(n) \ 37#define udelay(n) \
36 (__builtin_constant_p(n) ? \ 38 (__builtin_constant_p(n) ? \
37 ((n) > (MAX_UDELAY_MS * 1000) ? __bad_udelay() : \ 39 ((n) > (MAX_UDELAY_MS * 1000) ? __bad_udelay() : \
38 __const_udelay((n) * 0x68dbul)) : \ 40 __const_udelay((n) * ((2199023U*HZ)>>11))) : \
39 __udelay(n)) 41 __udelay(n))
40 42
41#endif /* defined(_ARM_DELAY_H) */ 43#endif /* defined(_ARM_DELAY_H) */
diff --git a/include/asm-arm/hardware/debug-8250.S b/include/asm-arm/hardware/debug-8250.S
new file mode 100644
index 000000000000..4594fea91ec1
--- /dev/null
+++ b/include/asm-arm/hardware/debug-8250.S
@@ -0,0 +1,29 @@
1/*
2 * linux/include/asm-arm/hardware/debug-8250.h
3 *
4 * Copyright (C) 1994-1999 Russell King
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#include <linux/serial_reg.h>
11
12 .macro senduart,rd,rx
13 strb \rd, [\rx, #UART_TX << UART_SHIFT]
14 .endm
15
16 .macro busyuart,rd,rx
171002: ldrb \rd, [\rx, #UART_LSR << UART_SHIFT]
18 and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE
19 teq \rd, #UART_LSR_TEMT | UART_LSR_THRE
20 bne 1002b
21 .endm
22
23 .macro waituart,rd,rx
24#ifdef FLOW_CONTROL
251001: ldrb \rd, [\rx, #UART_MSR << UART_SHIFT]
26 tst \rd, #UART_MSR_CTS
27 beq 1001b
28#endif
29 .endm
diff --git a/include/asm-arm/hardware/debug-pl01x.S b/include/asm-arm/hardware/debug-pl01x.S
new file mode 100644
index 000000000000..db0d0f7de5e9
--- /dev/null
+++ b/include/asm-arm/hardware/debug-pl01x.S
@@ -0,0 +1,29 @@
1/* linux/include/asm-arm/arch-integrator/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#include <linux/amba/serial.h>
14
15 .macro senduart,rd,rx
16 strb \rd, [\rx, #UART01x_DR]
17 .endm
18
19 .macro waituart,rd,rx
201001: ldr \rd, [\rx, #UART01x_FR]
21 tst \rd, #UART01x_FR_TXFF
22 bne 1001b
23 .endm
24
25 .macro busyuart,rd,rx
261001: ldr \rd, [\rx, #UART01x_FR]
27 tst \rd, #UART01x_FR_BUSY
28 bne 1001b
29 .endm
diff --git a/include/asm-arm/arch-ixp2000/uengine.h b/include/asm-arm/hardware/uengine.h
index b442d65c6593..b442d65c6593 100644
--- a/include/asm-arm/arch-ixp2000/uengine.h
+++ b/include/asm-arm/hardware/uengine.h
diff --git a/include/asm-arm/hardware/vic.h b/include/asm-arm/hardware/vic.h
index 81825eb54c9e..ed9ca3736a0b 100644
--- a/include/asm-arm/hardware/vic.h
+++ b/include/asm-arm/hardware/vic.h
@@ -39,7 +39,7 @@
39#define VIC_VECT_CNTL_ENABLE (1 << 5) 39#define VIC_VECT_CNTL_ENABLE (1 << 5)
40 40
41#ifndef __ASSEMBLY__ 41#ifndef __ASSEMBLY__
42void vic_init(void __iomem *base, u32 vic_sources); 42void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources);
43#endif 43#endif
44 44
45#endif 45#endif
diff --git a/include/asm-arm/mach/arch.h b/include/asm-arm/mach/arch.h
index 2cd57b4d64d9..fd2f9bf4dcc6 100644
--- a/include/asm-arm/mach/arch.h
+++ b/include/asm-arm/mach/arch.h
@@ -10,19 +10,16 @@
10 10
11#ifndef __ASSEMBLY__ 11#ifndef __ASSEMBLY__
12 12
13#include <linux/compiler.h>
14
15struct tag; 13struct tag;
16struct meminfo; 14struct meminfo;
17struct sys_timer; 15struct sys_timer;
18 16
19struct machine_desc { 17struct machine_desc {
20 /* 18 /*
21 * Note! The first five elements are used 19 * Note! The first four elements are used
22 * by assembler code in head-armv.S 20 * by assembler code in head-armv.S
23 */ 21 */
24 unsigned int nr; /* architecture number */ 22 unsigned int nr; /* architecture number */
25 unsigned int __deprecated phys_ram; /* start of physical ram */
26 unsigned int phys_io; /* start of physical io */ 23 unsigned int phys_io; /* start of physical io */
27 unsigned int io_pg_offst; /* byte offset for io 24 unsigned int io_pg_offst; /* byte offset for io
28 * page tabe entry */ 25 * page tabe entry */
diff --git a/include/asm-arm/mach/irq.h b/include/asm-arm/mach/irq.h
index 0ce6ca588d8c..d4d420ecf3a8 100644
--- a/include/asm-arm/mach/irq.h
+++ b/include/asm-arm/mach/irq.h
@@ -61,7 +61,7 @@ struct irqdesc {
61 struct irqchip *chip; 61 struct irqchip *chip;
62 struct irqaction *action; 62 struct irqaction *action;
63 struct list_head pend; 63 struct list_head pend;
64 void *chipdata; 64 void __iomem *base;
65 void *data; 65 void *data;
66 unsigned int disable_depth; 66 unsigned int disable_depth;
67 67
@@ -74,6 +74,7 @@ struct irqdesc {
74 unsigned int noautoenable : 1; /* don't automatically enable IRQ */ 74 unsigned int noautoenable : 1; /* don't automatically enable IRQ */
75 unsigned int unused :25; 75 unsigned int unused :25;
76 76
77 unsigned int irqs_unhandled;
77 struct proc_dir_entry *procdir; 78 struct proc_dir_entry *procdir;
78 79
79#ifdef CONFIG_SMP 80#ifdef CONFIG_SMP
@@ -113,8 +114,8 @@ void __set_irq_handler(unsigned int irq, irq_handler_t, int);
113#define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0) 114#define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0)
114#define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1) 115#define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1)
115#define set_irq_data(irq,d) do { irq_desc[irq].data = d; } while (0) 116#define set_irq_data(irq,d) do { irq_desc[irq].data = d; } while (0)
116#define set_irq_chipdata(irq,d) do { irq_desc[irq].chipdata = d; } while (0) 117#define set_irq_chipdata(irq,d) do { irq_desc[irq].base = d; } while (0)
117#define get_irq_chipdata(irq) (irq_desc[irq].chipdata) 118#define get_irq_chipdata(irq) (irq_desc[irq].base)
118 119
119void set_irq_chip(unsigned int irq, struct irqchip *); 120void set_irq_chip(unsigned int irq, struct irqchip *);
120void set_irq_flags(unsigned int irq, unsigned int flags); 121void set_irq_flags(unsigned int irq, unsigned int flags);
diff --git a/include/asm-arm/param.h b/include/asm-arm/param.h
index 94223d4d7e88..15806468ba72 100644
--- a/include/asm-arm/param.h
+++ b/include/asm-arm/param.h
@@ -11,12 +11,7 @@
11#define __ASM_PARAM_H 11#define __ASM_PARAM_H
12 12
13#ifdef __KERNEL__ 13#ifdef __KERNEL__
14# include <asm/arch/param.h> /* for kernel version of HZ */ 14# define HZ CONFIG_HZ /* Internal kernel timer frequency */
15
16# ifndef HZ
17# define HZ 100 /* Internal kernel timer frequency */
18# endif
19
20# define USER_HZ 100 /* User interfaces are in "ticks" */ 15# define USER_HZ 100 /* User interfaces are in "ticks" */
21# define CLOCKS_PER_SEC (USER_HZ) /* like times() */ 16# define CLOCKS_PER_SEC (USER_HZ) /* like times() */
22#else 17#else
diff --git a/include/linux/ata.h b/include/linux/ata.h
index b02a16c435e7..312a2c0c64e6 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -146,6 +146,8 @@ enum {
146 ATA_CMD_STANDBYNOW1 = 0xE0, 146 ATA_CMD_STANDBYNOW1 = 0xE0,
147 ATA_CMD_IDLEIMMEDIATE = 0xE1, 147 ATA_CMD_IDLEIMMEDIATE = 0xE1,
148 ATA_CMD_INIT_DEV_PARAMS = 0x91, 148 ATA_CMD_INIT_DEV_PARAMS = 0x91,
149 ATA_CMD_READ_NATIVE_MAX = 0xF8,
150 ATA_CMD_READ_NATIVE_MAX_EXT = 0x27,
149 151
150 /* SETFEATURES stuff */ 152 /* SETFEATURES stuff */
151 SETFEATURES_XFER = 0x03, 153 SETFEATURES_XFER = 0x03,
@@ -204,7 +206,6 @@ enum ata_tf_protocols {
204 ATA_PROT_UNKNOWN, /* unknown/invalid */ 206 ATA_PROT_UNKNOWN, /* unknown/invalid */
205 ATA_PROT_NODATA, /* no data */ 207 ATA_PROT_NODATA, /* no data */
206 ATA_PROT_PIO, /* PIO single sector */ 208 ATA_PROT_PIO, /* PIO single sector */
207 ATA_PROT_PIO_MULT, /* PIO multiple sector */
208 ATA_PROT_DMA, /* DMA */ 209 ATA_PROT_DMA, /* DMA */
209 ATA_PROT_ATAPI, /* packet command, PIO data xfer*/ 210 ATA_PROT_ATAPI, /* packet command, PIO data xfer*/
210 ATA_PROT_ATAPI_NODATA, /* packet command, no data */ 211 ATA_PROT_ATAPI_NODATA, /* packet command, no data */
@@ -247,18 +248,22 @@ struct ata_taskfile {
247}; 248};
248 249
249#define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0) 250#define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0)
251#define ata_id_is_cfa(id) ((id)[0] == 0x848A)
250#define ata_id_is_sata(id) ((id)[93] == 0) 252#define ata_id_is_sata(id) ((id)[93] == 0)
251#define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6)) 253#define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6))
252#define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5)) 254#define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5))
255#define ata_id_hpa_enabled(id) ((id)[85] & (1 << 10))
253#define ata_id_has_fua(id) ((id)[84] & (1 << 6)) 256#define ata_id_has_fua(id) ((id)[84] & (1 << 6))
254#define ata_id_has_flush(id) ((id)[83] & (1 << 12)) 257#define ata_id_has_flush(id) ((id)[83] & (1 << 12))
255#define ata_id_has_flush_ext(id) ((id)[83] & (1 << 13)) 258#define ata_id_has_flush_ext(id) ((id)[83] & (1 << 13))
256#define ata_id_has_lba48(id) ((id)[83] & (1 << 10)) 259#define ata_id_has_lba48(id) ((id)[83] & (1 << 10))
260#define ata_id_has_hpa(id) ((id)[82] & (1 << 10))
257#define ata_id_has_wcache(id) ((id)[82] & (1 << 5)) 261#define ata_id_has_wcache(id) ((id)[82] & (1 << 5))
258#define ata_id_has_pm(id) ((id)[82] & (1 << 3)) 262#define ata_id_has_pm(id) ((id)[82] & (1 << 3))
259#define ata_id_has_lba(id) ((id)[49] & (1 << 9)) 263#define ata_id_has_lba(id) ((id)[49] & (1 << 9))
260#define ata_id_has_dma(id) ((id)[49] & (1 << 8)) 264#define ata_id_has_dma(id) ((id)[49] & (1 << 8))
261#define ata_id_removeable(id) ((id)[0] & (1 << 7)) 265#define ata_id_removeable(id) ((id)[0] & (1 << 7))
266#define ata_id_has_dword_io(id) ((id)[50] & (1 << 0))
262#define ata_id_u32(id,n) \ 267#define ata_id_u32(id,n) \
263 (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) 268 (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)]))
264#define ata_id_u64(id,n) \ 269#define ata_id_u64(id,n) \
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 204c37a55f06..7a54244d30aa 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -502,6 +502,7 @@ extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_i
502extern void ata_pci_remove_one (struct pci_dev *pdev); 502extern void ata_pci_remove_one (struct pci_dev *pdev);
503extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state); 503extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state);
504extern int ata_pci_device_resume(struct pci_dev *pdev); 504extern int ata_pci_device_resume(struct pci_dev *pdev);
505extern int ata_pci_clear_simplex(struct pci_dev *pdev);
505#endif /* CONFIG_PCI */ 506#endif /* CONFIG_PCI */
506extern int ata_device_add(const struct ata_probe_ent *ent); 507extern int ata_device_add(const struct ata_probe_ent *ent);
507extern void ata_host_set_remove(struct ata_host_set *host_set); 508extern void ata_host_set_remove(struct ata_host_set *host_set);
@@ -542,6 +543,7 @@ extern void ata_port_stop (struct ata_port *ap);
542extern void ata_host_stop (struct ata_host_set *host_set); 543extern void ata_host_stop (struct ata_host_set *host_set);
543extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); 544extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs);
544extern void ata_qc_prep(struct ata_queued_cmd *qc); 545extern void ata_qc_prep(struct ata_queued_cmd *qc);
546extern void ata_noop_qc_prep(struct ata_queued_cmd *qc);
545extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); 547extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc);
546extern void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf, 548extern void ata_sg_init_one(struct ata_queued_cmd *qc, void *buf,
547 unsigned int buflen); 549 unsigned int buflen);
@@ -608,7 +610,7 @@ extern void ata_pci_host_stop (struct ata_host_set *host_set);
608extern struct ata_probe_ent * 610extern struct ata_probe_ent *
609ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); 611ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask);
610extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); 612extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits);
611 613extern unsigned long ata_pci_default_filter(const struct ata_port *, struct ata_device *, unsigned long);
612#endif /* CONFIG_PCI */ 614#endif /* CONFIG_PCI */
613 615
614 616
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index 46a0f974f87c..1350e47b0234 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -4,6 +4,62 @@
4#define XT_FUNCTION_MAXNAMELEN 30 4#define XT_FUNCTION_MAXNAMELEN 30
5#define XT_TABLE_MAXNAMELEN 32 5#define XT_TABLE_MAXNAMELEN 32
6 6
7struct xt_entry_match
8{
9 union {
10 struct {
11 u_int16_t match_size;
12
13 /* Used by userspace */
14 char name[XT_FUNCTION_MAXNAMELEN-1];
15
16 u_int8_t revision;
17 } user;
18 struct {
19 u_int16_t match_size;
20
21 /* Used inside the kernel */
22 struct xt_match *match;
23 } kernel;
24
25 /* Total length */
26 u_int16_t match_size;
27 } u;
28
29 unsigned char data[0];
30};
31
32struct xt_entry_target
33{
34 union {
35 struct {
36 u_int16_t target_size;
37
38 /* Used by userspace */
39 char name[XT_FUNCTION_MAXNAMELEN-1];
40
41 u_int8_t revision;
42 } user;
43 struct {
44 u_int16_t target_size;
45
46 /* Used inside the kernel */
47 struct xt_target *target;
48 } kernel;
49
50 /* Total length */
51 u_int16_t target_size;
52 } u;
53
54 unsigned char data[0];
55};
56
57struct xt_standard_target
58{
59 struct xt_entry_target target;
60 int verdict;
61};
62
7/* The argument to IPT_SO_GET_REVISION_*. Returns highest revision 63/* The argument to IPT_SO_GET_REVISION_*. Returns highest revision
8 * kernel supports, if >= revision. */ 64 * kernel supports, if >= revision. */
9struct xt_get_revision 65struct xt_get_revision
@@ -220,10 +276,10 @@ struct xt_table_info
220 char *entries[NR_CPUS]; 276 char *entries[NR_CPUS];
221}; 277};
222 278
223extern int xt_register_target(int af, struct xt_target *target); 279extern int xt_register_target(struct xt_target *target);
224extern void xt_unregister_target(int af, struct xt_target *target); 280extern void xt_unregister_target(struct xt_target *target);
225extern int xt_register_match(int af, struct xt_match *target); 281extern int xt_register_match(struct xt_match *target);
226extern void xt_unregister_match(int af, struct xt_match *target); 282extern void xt_unregister_match(struct xt_match *target);
227 283
228extern int xt_check_match(const struct xt_match *match, unsigned short family, 284extern int xt_check_match(const struct xt_match *match, unsigned short family,
229 unsigned int size, const char *table, unsigned int hook, 285 unsigned int size, const char *table, unsigned int hook,
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h
index fd21796e5131..62cc27daca4e 100644
--- a/include/linux/netfilter_arp/arp_tables.h
+++ b/include/linux/netfilter_arp/arp_tables.h
@@ -65,35 +65,8 @@ struct arpt_arp {
65 u_int16_t invflags; 65 u_int16_t invflags;
66}; 66};
67 67
68struct arpt_entry_target 68#define arpt_entry_target xt_entry_target
69{ 69#define arpt_standard_target xt_standard_target
70 union {
71 struct {
72 u_int16_t target_size;
73
74 /* Used by userspace */
75 char name[ARPT_FUNCTION_MAXNAMELEN-1];
76 u_int8_t revision;
77 } user;
78 struct {
79 u_int16_t target_size;
80
81 /* Used inside the kernel */
82 struct arpt_target *target;
83 } kernel;
84
85 /* Total length */
86 u_int16_t target_size;
87 } u;
88
89 unsigned char data[0];
90};
91
92struct arpt_standard_target
93{
94 struct arpt_entry_target target;
95 int verdict;
96};
97 70
98/* Values for "flag" field in struct arpt_ip (general arp structure). 71/* Values for "flag" field in struct arpt_ip (general arp structure).
99 * No flags defined yet. 72 * No flags defined yet.
@@ -263,8 +236,10 @@ static __inline__ struct arpt_entry_target *arpt_get_target(struct arpt_entry *e
263 */ 236 */
264#ifdef __KERNEL__ 237#ifdef __KERNEL__
265 238
266#define arpt_register_target(tgt) xt_register_target(NF_ARP, tgt) 239#define arpt_register_target(tgt) \
267#define arpt_unregister_target(tgt) xt_unregister_target(NF_ARP, tgt) 240({ (tgt)->family = NF_ARP; \
241 xt_register_target(tgt); })
242#define arpt_unregister_target(tgt) xt_unregister_target(tgt)
268 243
269extern int arpt_register_table(struct arpt_table *table, 244extern int arpt_register_table(struct arpt_table *table,
270 const struct arpt_replace *repl); 245 const struct arpt_replace *repl);
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
index 76ba24b68515..d5b8c0d6a12b 100644
--- a/include/linux/netfilter_ipv4/ip_tables.h
+++ b/include/linux/netfilter_ipv4/ip_tables.h
@@ -52,61 +52,9 @@ struct ipt_ip {
52 u_int8_t invflags; 52 u_int8_t invflags;
53}; 53};
54 54
55struct ipt_entry_match 55#define ipt_entry_match xt_entry_match
56{ 56#define ipt_entry_target xt_entry_target
57 union { 57#define ipt_standard_target xt_standard_target
58 struct {
59 u_int16_t match_size;
60
61 /* Used by userspace */
62 char name[IPT_FUNCTION_MAXNAMELEN-1];
63
64 u_int8_t revision;
65 } user;
66 struct {
67 u_int16_t match_size;
68
69 /* Used inside the kernel */
70 struct ipt_match *match;
71 } kernel;
72
73 /* Total length */
74 u_int16_t match_size;
75 } u;
76
77 unsigned char data[0];
78};
79
80struct ipt_entry_target
81{
82 union {
83 struct {
84 u_int16_t target_size;
85
86 /* Used by userspace */
87 char name[IPT_FUNCTION_MAXNAMELEN-1];
88
89 u_int8_t revision;
90 } user;
91 struct {
92 u_int16_t target_size;
93
94 /* Used inside the kernel */
95 struct ipt_target *target;
96 } kernel;
97
98 /* Total length */
99 u_int16_t target_size;
100 } u;
101
102 unsigned char data[0];
103};
104
105struct ipt_standard_target
106{
107 struct ipt_entry_target target;
108 int verdict;
109};
110 58
111#define ipt_counters xt_counters 59#define ipt_counters xt_counters
112 60
@@ -321,11 +269,15 @@ ipt_get_target(struct ipt_entry *e)
321#include <linux/init.h> 269#include <linux/init.h>
322extern void ipt_init(void) __init; 270extern void ipt_init(void) __init;
323 271
324#define ipt_register_target(tgt) xt_register_target(AF_INET, tgt) 272#define ipt_register_target(tgt) \
325#define ipt_unregister_target(tgt) xt_unregister_target(AF_INET, tgt) 273({ (tgt)->family = AF_INET; \
274 xt_register_target(tgt); })
275#define ipt_unregister_target(tgt) xt_unregister_target(tgt)
326 276
327#define ipt_register_match(mtch) xt_register_match(AF_INET, mtch) 277#define ipt_register_match(mtch) \
328#define ipt_unregister_match(mtch) xt_unregister_match(AF_INET, mtch) 278({ (mtch)->family = AF_INET; \
279 xt_register_match(mtch); })
280#define ipt_unregister_match(mtch) xt_unregister_match(mtch)
329 281
330//#define ipt_register_table(tbl, repl) xt_register_table(AF_INET, tbl, repl) 282//#define ipt_register_table(tbl, repl) xt_register_table(AF_INET, tbl, repl)
331//#define ipt_unregister_table(tbl) xt_unregister_table(AF_INET, tbl) 283//#define ipt_unregister_table(tbl) xt_unregister_table(AF_INET, tbl)
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h
index f249b574f0fa..d0d5d1ee4be3 100644
--- a/include/linux/netfilter_ipv6/ip6_tables.h
+++ b/include/linux/netfilter_ipv6/ip6_tables.h
@@ -56,60 +56,9 @@ struct ip6t_ip6 {
56 u_int8_t invflags; 56 u_int8_t invflags;
57}; 57};
58 58
59/* FIXME: If alignment in kernel different from userspace? --RR */ 59#define ip6t_entry_match xt_entry_match
60struct ip6t_entry_match 60#define ip6t_entry_target xt_entry_target
61{ 61#define ip6t_standard_target xt_standard_target
62 union {
63 struct {
64 u_int16_t match_size;
65
66 /* Used by userspace */
67 char name[IP6T_FUNCTION_MAXNAMELEN-1];
68 u_int8_t revision;
69 } user;
70 struct {
71 u_int16_t match_size;
72
73 /* Used inside the kernel */
74 struct ip6t_match *match;
75 } kernel;
76
77 /* Total length */
78 u_int16_t match_size;
79 } u;
80
81 unsigned char data[0];
82};
83
84struct ip6t_entry_target
85{
86 union {
87 struct {
88 u_int16_t target_size;
89
90 /* Used by userspace */
91 char name[IP6T_FUNCTION_MAXNAMELEN-1];
92 u_int8_t revision;
93 } user;
94 struct {
95 u_int16_t target_size;
96
97 /* Used inside the kernel */
98 struct ip6t_target *target;
99 } kernel;
100
101 /* Total length */
102 u_int16_t target_size;
103 } u;
104
105 unsigned char data[0];
106};
107
108struct ip6t_standard_target
109{
110 struct ip6t_entry_target target;
111 int verdict;
112};
113 62
114#define ip6t_counters xt_counters 63#define ip6t_counters xt_counters
115 64
@@ -334,11 +283,15 @@ ip6t_get_target(struct ip6t_entry *e)
334#include <linux/init.h> 283#include <linux/init.h>
335extern void ip6t_init(void) __init; 284extern void ip6t_init(void) __init;
336 285
337#define ip6t_register_target(tgt) xt_register_target(AF_INET6, tgt) 286#define ip6t_register_target(tgt) \
338#define ip6t_unregister_target(tgt) xt_unregister_target(AF_INET6, tgt) 287({ (tgt)->family = AF_INET6; \
288 xt_register_target(tgt); })
289#define ip6t_unregister_target(tgt) xt_unregister_target(tgt)
339 290
340#define ip6t_register_match(match) xt_register_match(AF_INET6, match) 291#define ip6t_register_match(match) \
341#define ip6t_unregister_match(match) xt_unregister_match(AF_INET6, match) 292({ (match)->family = AF_INET6; \
293 xt_register_match(match); })
294#define ip6t_unregister_match(match) xt_unregister_match(match)
342 295
343extern int ip6t_register_table(struct ip6t_table *table, 296extern int ip6t_register_table(struct ip6t_table *table,
344 const struct ip6t_replace *repl); 297 const struct ip6t_replace *repl);
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 57abcea1cb5d..c32e60e79dea 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -369,6 +369,9 @@ void uart_parse_options(char *options, int *baud, int *parity, int *bits,
369int uart_set_options(struct uart_port *port, struct console *co, int baud, 369int uart_set_options(struct uart_port *port, struct console *co, int baud,
370 int parity, int bits, int flow); 370 int parity, int bits, int flow);
371struct tty_driver *uart_console_device(struct console *co, int *index); 371struct tty_driver *uart_console_device(struct console *co, int *index);
372void uart_console_write(struct uart_port *port, const char *s,
373 unsigned int count,
374 void (*putchar)(struct uart_port *, int));
372 375
373/* 376/*
374 * Port/driver registration/removal 377 * Port/driver registration/removal
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index 2743c156caa0..b6f0905a4ee2 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -195,6 +195,10 @@ static inline void nf_ct_put(struct nf_conn *ct)
195 nf_conntrack_put(&ct->ct_general); 195 nf_conntrack_put(&ct->ct_general);
196} 196}
197 197
198/* Protocol module loading */
199extern int nf_ct_l3proto_try_module_get(unsigned short l3proto);
200extern void nf_ct_l3proto_module_put(unsigned short l3proto);
201
198extern struct nf_conntrack_tuple_hash * 202extern struct nf_conntrack_tuple_hash *
199__nf_conntrack_find(const struct nf_conntrack_tuple *tuple, 203__nf_conntrack_find(const struct nf_conntrack_tuple *tuple,
200 const struct nf_conn *ignored_conntrack); 204 const struct nf_conn *ignored_conntrack);
diff --git a/include/net/tc_act/tc_ipt.h b/include/net/tc_act/tc_ipt.h
index 02eccebd55ae..cb37ad08427f 100644
--- a/include/net/tc_act/tc_ipt.h
+++ b/include/net/tc_act/tc_ipt.h
@@ -3,14 +3,14 @@
3 3
4#include <net/act_api.h> 4#include <net/act_api.h>
5 5
6struct ipt_entry_target; 6struct xt_entry_target;
7 7
8struct tcf_ipt 8struct tcf_ipt
9{ 9{
10 tca_gen(ipt); 10 tca_gen(ipt);
11 u32 hook; 11 u32 hook;
12 char *tname; 12 char *tname;
13 struct ipt_entry_target *t; 13 struct xt_entry_target *t;
14}; 14};
15 15
16#endif 16#endif
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 8ee4d016740d..f75ff1d96551 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1249,11 +1249,7 @@ int ip_push_pending_frames(struct sock *sk)
1249 iph->tos = inet->tos; 1249 iph->tos = inet->tos;
1250 iph->tot_len = htons(skb->len); 1250 iph->tot_len = htons(skb->len);
1251 iph->frag_off = df; 1251 iph->frag_off = df;
1252 if (!df) { 1252 ip_select_ident(iph, &rt->u.dst, sk);
1253 __ip_select_ident(iph, &rt->u.dst, 0);
1254 } else {
1255 iph->id = htons(inet->id++);
1256 }
1257 iph->ttl = ttl; 1253 iph->ttl = ttl;
1258 iph->protocol = sk->sk_protocol; 1254 iph->protocol = sk->sk_protocol;
1259 iph->saddr = rt->rt_src; 1255 iph->saddr = rt->rt_src;
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index f7efb3f27bf5..ff0c594a4198 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -1146,12 +1146,14 @@ void arpt_unregister_table(struct arpt_table *table)
1146static struct arpt_target arpt_standard_target = { 1146static struct arpt_target arpt_standard_target = {
1147 .name = ARPT_STANDARD_TARGET, 1147 .name = ARPT_STANDARD_TARGET,
1148 .targetsize = sizeof(int), 1148 .targetsize = sizeof(int),
1149 .family = NF_ARP,
1149}; 1150};
1150 1151
1151static struct arpt_target arpt_error_target = { 1152static struct arpt_target arpt_error_target = {
1152 .name = ARPT_ERROR_TARGET, 1153 .name = ARPT_ERROR_TARGET,
1153 .target = arpt_error, 1154 .target = arpt_error,
1154 .targetsize = ARPT_FUNCTION_MAXNAMELEN, 1155 .targetsize = ARPT_FUNCTION_MAXNAMELEN,
1156 .family = NF_ARP,
1155}; 1157};
1156 1158
1157static struct nf_sockopt_ops arpt_sockopts = { 1159static struct nf_sockopt_ops arpt_sockopts = {
@@ -1171,8 +1173,8 @@ static int __init init(void)
1171 xt_proto_init(NF_ARP); 1173 xt_proto_init(NF_ARP);
1172 1174
1173 /* Noone else will be downing sem now, so we won't sleep */ 1175 /* Noone else will be downing sem now, so we won't sleep */
1174 xt_register_target(NF_ARP, &arpt_standard_target); 1176 xt_register_target(&arpt_standard_target);
1175 xt_register_target(NF_ARP, &arpt_error_target); 1177 xt_register_target(&arpt_error_target);
1176 1178
1177 /* Register setsockopt */ 1179 /* Register setsockopt */
1178 ret = nf_register_sockopt(&arpt_sockopts); 1180 ret = nf_register_sockopt(&arpt_sockopts);
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
index 84c66dbfedaf..9e34034729a6 100644
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -77,8 +77,8 @@ unsigned int ip_ct_log_invalid;
77static LIST_HEAD(unconfirmed); 77static LIST_HEAD(unconfirmed);
78static int ip_conntrack_vmalloc; 78static int ip_conntrack_vmalloc;
79 79
80static unsigned int ip_conntrack_next_id = 1; 80static unsigned int ip_conntrack_next_id;
81static unsigned int ip_conntrack_expect_next_id = 1; 81static unsigned int ip_conntrack_expect_next_id;
82#ifdef CONFIG_IP_NF_CONNTRACK_EVENTS 82#ifdef CONFIG_IP_NF_CONNTRACK_EVENTS
83struct notifier_block *ip_conntrack_chain; 83struct notifier_block *ip_conntrack_chain;
84struct notifier_block *ip_conntrack_expect_chain; 84struct notifier_block *ip_conntrack_expect_chain;
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323.c b/net/ipv4/netfilter/ip_conntrack_helper_h323.c
index 20da6730b860..daeb1395faa4 100644
--- a/net/ipv4/netfilter/ip_conntrack_helper_h323.c
+++ b/net/ipv4/netfilter/ip_conntrack_helper_h323.c
@@ -639,8 +639,8 @@ void ip_conntrack_h245_expect(struct ip_conntrack *new,
639} 639}
640 640
641/****************************************************************************/ 641/****************************************************************************/
642static int get_h225_addr(unsigned char *data, TransportAddress * addr, 642int get_h225_addr(unsigned char *data, TransportAddress * addr,
643 u_int32_t * ip, u_int16_t * port) 643 u_int32_t * ip, u_int16_t * port)
644{ 644{
645 unsigned char *p; 645 unsigned char *p;
646 646
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c
index 5ce2e3fc2c7f..9b6e19bae90f 100644
--- a/net/ipv4/netfilter/ip_conntrack_netlink.c
+++ b/net/ipv4/netfilter/ip_conntrack_netlink.c
@@ -4,7 +4,7 @@
4 * (C) 2001 by Jay Schulist <jschlst@samba.org> 4 * (C) 2001 by Jay Schulist <jschlst@samba.org>
5 * (C) 2002-2005 by Harald Welte <laforge@gnumonks.org> 5 * (C) 2002-2005 by Harald Welte <laforge@gnumonks.org>
6 * (C) 2003 by Patrick Mchardy <kaber@trash.net> 6 * (C) 2003 by Patrick Mchardy <kaber@trash.net>
7 * (C) 2005 by Pablo Neira Ayuso <pablo@eurodev.net> 7 * (C) 2005-2006 by Pablo Neira Ayuso <pablo@eurodev.net>
8 * 8 *
9 * I've reworked this stuff to use attributes instead of conntrack 9 * I've reworked this stuff to use attributes instead of conntrack
10 * structures. 5.44 am. I need more tea. --pablo 05/07/11. 10 * structures. 5.44 am. I need more tea. --pablo 05/07/11.
@@ -53,20 +53,18 @@ static char __initdata version[] = "0.90";
53 53
54static inline int 54static inline int
55ctnetlink_dump_tuples_proto(struct sk_buff *skb, 55ctnetlink_dump_tuples_proto(struct sk_buff *skb,
56 const struct ip_conntrack_tuple *tuple) 56 const struct ip_conntrack_tuple *tuple,
57 struct ip_conntrack_protocol *proto)
57{ 58{
58 struct ip_conntrack_protocol *proto;
59 int ret = 0; 59 int ret = 0;
60 struct nfattr *nest_parms = NFA_NEST(skb, CTA_TUPLE_PROTO);
60 61
61 NFA_PUT(skb, CTA_PROTO_NUM, sizeof(u_int8_t), &tuple->dst.protonum); 62 NFA_PUT(skb, CTA_PROTO_NUM, sizeof(u_int8_t), &tuple->dst.protonum);
62 63
63 /* If no protocol helper is found, this function will return the
64 * generic protocol helper, so proto won't *ever* be NULL */
65 proto = ip_conntrack_proto_find_get(tuple->dst.protonum);
66 if (likely(proto->tuple_to_nfattr)) 64 if (likely(proto->tuple_to_nfattr))
67 ret = proto->tuple_to_nfattr(skb, tuple); 65 ret = proto->tuple_to_nfattr(skb, tuple);
68 66
69 ip_conntrack_proto_put(proto); 67 NFA_NEST_END(skb, nest_parms);
70 68
71 return ret; 69 return ret;
72 70
@@ -75,28 +73,41 @@ nfattr_failure:
75} 73}
76 74
77static inline int 75static inline int
78ctnetlink_dump_tuples(struct sk_buff *skb, 76ctnetlink_dump_tuples_ip(struct sk_buff *skb,
79 const struct ip_conntrack_tuple *tuple) 77 const struct ip_conntrack_tuple *tuple)
80{ 78{
81 struct nfattr *nest_parms; 79 struct nfattr *nest_parms = NFA_NEST(skb, CTA_TUPLE_IP);
82 int ret;
83 80
84 nest_parms = NFA_NEST(skb, CTA_TUPLE_IP);
85 NFA_PUT(skb, CTA_IP_V4_SRC, sizeof(u_int32_t), &tuple->src.ip); 81 NFA_PUT(skb, CTA_IP_V4_SRC, sizeof(u_int32_t), &tuple->src.ip);
86 NFA_PUT(skb, CTA_IP_V4_DST, sizeof(u_int32_t), &tuple->dst.ip); 82 NFA_PUT(skb, CTA_IP_V4_DST, sizeof(u_int32_t), &tuple->dst.ip);
87 NFA_NEST_END(skb, nest_parms);
88 83
89 nest_parms = NFA_NEST(skb, CTA_TUPLE_PROTO);
90 ret = ctnetlink_dump_tuples_proto(skb, tuple);
91 NFA_NEST_END(skb, nest_parms); 84 NFA_NEST_END(skb, nest_parms);
92 85
93 return ret; 86 return 0;
94 87
95nfattr_failure: 88nfattr_failure:
96 return -1; 89 return -1;
97} 90}
98 91
99static inline int 92static inline int
93ctnetlink_dump_tuples(struct sk_buff *skb,
94 const struct ip_conntrack_tuple *tuple)
95{
96 int ret;
97 struct ip_conntrack_protocol *proto;
98
99 ret = ctnetlink_dump_tuples_ip(skb, tuple);
100 if (unlikely(ret < 0))
101 return ret;
102
103 proto = ip_conntrack_proto_find_get(tuple->dst.protonum);
104 ret = ctnetlink_dump_tuples_proto(skb, tuple, proto);
105 ip_conntrack_proto_put(proto);
106
107 return ret;
108}
109
110static inline int
100ctnetlink_dump_status(struct sk_buff *skb, const struct ip_conntrack *ct) 111ctnetlink_dump_status(struct sk_buff *skb, const struct ip_conntrack *ct)
101{ 112{
102 u_int32_t status = htonl((u_int32_t) ct->status); 113 u_int32_t status = htonl((u_int32_t) ct->status);
@@ -1135,6 +1146,33 @@ nfattr_failure:
1135} 1146}
1136 1147
1137static inline int 1148static inline int
1149ctnetlink_exp_dump_mask(struct sk_buff *skb,
1150 const struct ip_conntrack_tuple *tuple,
1151 const struct ip_conntrack_tuple *mask)
1152{
1153 int ret;
1154 struct ip_conntrack_protocol *proto;
1155 struct nfattr *nest_parms = NFA_NEST(skb, CTA_EXPECT_MASK);
1156
1157 ret = ctnetlink_dump_tuples_ip(skb, mask);
1158 if (unlikely(ret < 0))
1159 goto nfattr_failure;
1160
1161 proto = ip_conntrack_proto_find_get(tuple->dst.protonum);
1162 ret = ctnetlink_dump_tuples_proto(skb, mask, proto);
1163 ip_conntrack_proto_put(proto);
1164 if (unlikely(ret < 0))
1165 goto nfattr_failure;
1166
1167 NFA_NEST_END(skb, nest_parms);
1168
1169 return 0;
1170
1171nfattr_failure:
1172 return -1;
1173}
1174
1175static inline int
1138ctnetlink_exp_dump_expect(struct sk_buff *skb, 1176ctnetlink_exp_dump_expect(struct sk_buff *skb,
1139 const struct ip_conntrack_expect *exp) 1177 const struct ip_conntrack_expect *exp)
1140{ 1178{
@@ -1144,7 +1182,7 @@ ctnetlink_exp_dump_expect(struct sk_buff *skb,
1144 1182
1145 if (ctnetlink_exp_dump_tuple(skb, &exp->tuple, CTA_EXPECT_TUPLE) < 0) 1183 if (ctnetlink_exp_dump_tuple(skb, &exp->tuple, CTA_EXPECT_TUPLE) < 0)
1146 goto nfattr_failure; 1184 goto nfattr_failure;
1147 if (ctnetlink_exp_dump_tuple(skb, &exp->mask, CTA_EXPECT_MASK) < 0) 1185 if (ctnetlink_exp_dump_mask(skb, &exp->tuple, &exp->mask) < 0)
1148 goto nfattr_failure; 1186 goto nfattr_failure;
1149 if (ctnetlink_exp_dump_tuple(skb, 1187 if (ctnetlink_exp_dump_tuple(skb,
1150 &master->tuplehash[IP_CT_DIR_ORIGINAL].tuple, 1188 &master->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 39705f9bc154..a7b194c4d79d 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -1335,12 +1335,14 @@ icmp_checkentry(const char *tablename,
1335static struct ipt_target ipt_standard_target = { 1335static struct ipt_target ipt_standard_target = {
1336 .name = IPT_STANDARD_TARGET, 1336 .name = IPT_STANDARD_TARGET,
1337 .targetsize = sizeof(int), 1337 .targetsize = sizeof(int),
1338 .family = AF_INET,
1338}; 1339};
1339 1340
1340static struct ipt_target ipt_error_target = { 1341static struct ipt_target ipt_error_target = {
1341 .name = IPT_ERROR_TARGET, 1342 .name = IPT_ERROR_TARGET,
1342 .target = ipt_error, 1343 .target = ipt_error,
1343 .targetsize = IPT_FUNCTION_MAXNAMELEN, 1344 .targetsize = IPT_FUNCTION_MAXNAMELEN,
1345 .family = AF_INET,
1344}; 1346};
1345 1347
1346static struct nf_sockopt_ops ipt_sockopts = { 1348static struct nf_sockopt_ops ipt_sockopts = {
@@ -1358,6 +1360,7 @@ static struct ipt_match icmp_matchstruct = {
1358 .match = icmp_match, 1360 .match = icmp_match,
1359 .matchsize = sizeof(struct ipt_icmp), 1361 .matchsize = sizeof(struct ipt_icmp),
1360 .proto = IPPROTO_ICMP, 1362 .proto = IPPROTO_ICMP,
1363 .family = AF_INET,
1361 .checkentry = icmp_checkentry, 1364 .checkentry = icmp_checkentry,
1362}; 1365};
1363 1366
@@ -1368,9 +1371,9 @@ static int __init init(void)
1368 xt_proto_init(AF_INET); 1371 xt_proto_init(AF_INET);
1369 1372
1370 /* Noone else will be downing sem now, so we won't sleep */ 1373 /* Noone else will be downing sem now, so we won't sleep */
1371 xt_register_target(AF_INET, &ipt_standard_target); 1374 xt_register_target(&ipt_standard_target);
1372 xt_register_target(AF_INET, &ipt_error_target); 1375 xt_register_target(&ipt_error_target);
1373 xt_register_match(AF_INET, &icmp_matchstruct); 1376 xt_register_match(&icmp_matchstruct);
1374 1377
1375 /* Register setsockopt */ 1378 /* Register setsockopt */
1376 ret = nf_register_sockopt(&ipt_sockopts); 1379 ret = nf_register_sockopt(&ipt_sockopts);
@@ -1387,9 +1390,9 @@ static void __exit fini(void)
1387{ 1390{
1388 nf_unregister_sockopt(&ipt_sockopts); 1391 nf_unregister_sockopt(&ipt_sockopts);
1389 1392
1390 xt_unregister_match(AF_INET, &icmp_matchstruct); 1393 xt_unregister_match(&icmp_matchstruct);
1391 xt_unregister_target(AF_INET, &ipt_error_target); 1394 xt_unregister_target(&ipt_error_target);
1392 xt_unregister_target(AF_INET, &ipt_standard_target); 1395 xt_unregister_target(&ipt_standard_target);
1393 1396
1394 xt_proto_fini(AF_INET); 1397 xt_proto_fini(AF_INET);
1395} 1398}
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
index cb9c661f3f33..c8abc9d859b9 100644
--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
@@ -568,6 +568,7 @@ static int init_or_cleanup(int init)
568 return ret; 568 return ret;
569} 569}
570 570
571MODULE_ALIAS("nf_conntrack-" __stringify(AF_INET));
571MODULE_LICENSE("GPL"); 572MODULE_LICENSE("GPL");
572 573
573static int __init init(void) 574static int __init init(void)
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index 602feec47738..4c20eeb3d568 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -907,7 +907,7 @@ int ipv6_getsockopt(struct sock *sk, int level, int optname,
907 err = do_ipv6_getsockopt(sk, level, optname, optval, optlen); 907 err = do_ipv6_getsockopt(sk, level, optname, optval, optlen);
908#ifdef CONFIG_NETFILTER 908#ifdef CONFIG_NETFILTER
909 /* we need to exclude all possible EINVALs except default case */ 909 /* we need to exclude all possible EINVALs except default case */
910 if (err == -ENOPROTOOPT && optname != IPV6_ADDRFORM && 910 if (err == -EINVAL && optname != IPV6_ADDRFORM &&
911 optname != MCAST_MSFILTER) { 911 optname != MCAST_MSFILTER) {
912 int len; 912 int len;
913 913
@@ -944,7 +944,7 @@ int compat_ipv6_getsockopt(struct sock *sk, int level, int optname,
944 err = do_ipv6_getsockopt(sk, level, optname, optval, optlen); 944 err = do_ipv6_getsockopt(sk, level, optname, optval, optlen);
945#ifdef CONFIG_NETFILTER 945#ifdef CONFIG_NETFILTER
946 /* we need to exclude all possible EINVALs except default case */ 946 /* we need to exclude all possible EINVALs except default case */
947 if (err == -ENOPROTOOPT && optname != IPV6_ADDRFORM && 947 if (err == -EINVAL && optname != IPV6_ADDRFORM &&
948 optname != MCAST_MSFILTER) { 948 optname != MCAST_MSFILTER) {
949 int len; 949 int len;
950 950
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index 5a2063bda676..db3c9ae98e95 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -1377,12 +1377,14 @@ icmp6_checkentry(const char *tablename,
1377static struct ip6t_target ip6t_standard_target = { 1377static struct ip6t_target ip6t_standard_target = {
1378 .name = IP6T_STANDARD_TARGET, 1378 .name = IP6T_STANDARD_TARGET,
1379 .targetsize = sizeof(int), 1379 .targetsize = sizeof(int),
1380 .family = AF_INET6,
1380}; 1381};
1381 1382
1382static struct ip6t_target ip6t_error_target = { 1383static struct ip6t_target ip6t_error_target = {
1383 .name = IP6T_ERROR_TARGET, 1384 .name = IP6T_ERROR_TARGET,
1384 .target = ip6t_error, 1385 .target = ip6t_error,
1385 .targetsize = IP6T_FUNCTION_MAXNAMELEN, 1386 .targetsize = IP6T_FUNCTION_MAXNAMELEN,
1387 .family = AF_INET6,
1386}; 1388};
1387 1389
1388static struct nf_sockopt_ops ip6t_sockopts = { 1390static struct nf_sockopt_ops ip6t_sockopts = {
@@ -1401,6 +1403,7 @@ static struct ip6t_match icmp6_matchstruct = {
1401 .matchsize = sizeof(struct ip6t_icmp), 1403 .matchsize = sizeof(struct ip6t_icmp),
1402 .checkentry = icmp6_checkentry, 1404 .checkentry = icmp6_checkentry,
1403 .proto = IPPROTO_ICMPV6, 1405 .proto = IPPROTO_ICMPV6,
1406 .family = AF_INET6,
1404}; 1407};
1405 1408
1406static int __init init(void) 1409static int __init init(void)
@@ -1410,9 +1413,9 @@ static int __init init(void)
1410 xt_proto_init(AF_INET6); 1413 xt_proto_init(AF_INET6);
1411 1414
1412 /* Noone else will be downing sem now, so we won't sleep */ 1415 /* Noone else will be downing sem now, so we won't sleep */
1413 xt_register_target(AF_INET6, &ip6t_standard_target); 1416 xt_register_target(&ip6t_standard_target);
1414 xt_register_target(AF_INET6, &ip6t_error_target); 1417 xt_register_target(&ip6t_error_target);
1415 xt_register_match(AF_INET6, &icmp6_matchstruct); 1418 xt_register_match(&icmp6_matchstruct);
1416 1419
1417 /* Register setsockopt */ 1420 /* Register setsockopt */
1418 ret = nf_register_sockopt(&ip6t_sockopts); 1421 ret = nf_register_sockopt(&ip6t_sockopts);
@@ -1429,9 +1432,9 @@ static int __init init(void)
1429static void __exit fini(void) 1432static void __exit fini(void)
1430{ 1433{
1431 nf_unregister_sockopt(&ip6t_sockopts); 1434 nf_unregister_sockopt(&ip6t_sockopts);
1432 xt_unregister_match(AF_INET6, &icmp6_matchstruct); 1435 xt_unregister_match(&icmp6_matchstruct);
1433 xt_unregister_target(AF_INET6, &ip6t_error_target); 1436 xt_unregister_target(&ip6t_error_target);
1434 xt_unregister_target(AF_INET6, &ip6t_standard_target); 1437 xt_unregister_target(&ip6t_standard_target);
1435 xt_proto_fini(AF_INET6); 1438 xt_proto_fini(AF_INET6);
1436} 1439}
1437 1440
diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
index ac35f9526368..c16f62934bd9 100644
--- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
+++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
@@ -584,6 +584,7 @@ static int init_or_cleanup(int init)
584 return ret; 584 return ret;
585} 585}
586 586
587MODULE_ALIAS("nf_conntrack-" __stringify(AF_INET6));
587MODULE_LICENSE("GPL"); 588MODULE_LICENSE("GPL");
588MODULE_AUTHOR("Yasuyuki KOZAKAI @USAGI <yasuyuki.kozakai@toshiba.co.jp>"); 589MODULE_AUTHOR("Yasuyuki KOZAKAI @USAGI <yasuyuki.kozakai@toshiba.co.jp>");
589 590
diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
index 174027809148..332acb37b385 100644
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -11,7 +11,7 @@ config NETFILTER_NETLINK_QUEUE
11 tristate "Netfilter NFQUEUE over NFNETLINK interface" 11 tristate "Netfilter NFQUEUE over NFNETLINK interface"
12 depends on NETFILTER_NETLINK 12 depends on NETFILTER_NETLINK
13 help 13 help
14 If this option isenabled, the kernel will include support 14 If this option is enabled, the kernel will include support
15 for queueing packets via NFNETLINK. 15 for queueing packets via NFNETLINK.
16 16
17config NETFILTER_NETLINK_LOG 17config NETFILTER_NETLINK_LOG
@@ -66,7 +66,7 @@ config NF_CONNTRACK_EVENTS
66 help 66 help
67 If this option is enabled, the connection tracking code will 67 If this option is enabled, the connection tracking code will
68 provide a notifier chain that can be used by other kernel code 68 provide a notifier chain that can be used by other kernel code
69 to get notified aboutchanges in the connection tracking state. 69 to get notified about changes in the connection tracking state.
70 70
71 If unsure, say `N'. 71 If unsure, say `N'.
72 72
@@ -153,7 +153,7 @@ config NETFILTER_XT_TARGET_NFQUEUE
153 tristate '"NFQUEUE" target Support' 153 tristate '"NFQUEUE" target Support'
154 depends on NETFILTER_XTABLES 154 depends on NETFILTER_XTABLES
155 help 155 help
156 This Target replaced the old obsolete QUEUE target. 156 This target replaced the old obsolete QUEUE target.
157 157
158 As opposed to QUEUE, it supports 65535 different queues, 158 As opposed to QUEUE, it supports 65535 different queues,
159 not just one. 159 not just one.
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index f6498234e264..0ae281d9bfc3 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -23,6 +23,8 @@
23 * 26 Jan 2006: Harald Welte <laforge@netfilter.org> 23 * 26 Jan 2006: Harald Welte <laforge@netfilter.org>
24 * - restructure nf_conn (introduce nf_conn_help) 24 * - restructure nf_conn (introduce nf_conn_help)
25 * - redesign 'features' how they were originally intended 25 * - redesign 'features' how they were originally intended
26 * 26 Feb 2006: Pablo Neira Ayuso <pablo@eurodev.net>
27 * - add support for L3 protocol module load on demand.
26 * 28 *
27 * Derived from net/ipv4/netfilter/ip_conntrack_core.c 29 * Derived from net/ipv4/netfilter/ip_conntrack_core.c
28 */ 30 */
@@ -85,8 +87,8 @@ unsigned int nf_ct_log_invalid;
85static LIST_HEAD(unconfirmed); 87static LIST_HEAD(unconfirmed);
86static int nf_conntrack_vmalloc; 88static int nf_conntrack_vmalloc;
87 89
88static unsigned int nf_conntrack_next_id = 1; 90static unsigned int nf_conntrack_next_id;
89static unsigned int nf_conntrack_expect_next_id = 1; 91static unsigned int nf_conntrack_expect_next_id;
90#ifdef CONFIG_NF_CONNTRACK_EVENTS 92#ifdef CONFIG_NF_CONNTRACK_EVENTS
91struct notifier_block *nf_conntrack_chain; 93struct notifier_block *nf_conntrack_chain;
92struct notifier_block *nf_conntrack_expect_chain; 94struct notifier_block *nf_conntrack_expect_chain;
@@ -241,6 +243,35 @@ void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p)
241 module_put(p->me); 243 module_put(p->me);
242} 244}
243 245
246int
247nf_ct_l3proto_try_module_get(unsigned short l3proto)
248{
249 int ret;
250 struct nf_conntrack_l3proto *p;
251
252retry: p = nf_ct_l3proto_find_get(l3proto);
253 if (p == &nf_conntrack_generic_l3proto) {
254 ret = request_module("nf_conntrack-%d", l3proto);
255 if (!ret)
256 goto retry;
257
258 return -EPROTOTYPE;
259 }
260
261 return 0;
262}
263
264void nf_ct_l3proto_module_put(unsigned short l3proto)
265{
266 struct nf_conntrack_l3proto *p;
267
268 preempt_disable();
269 p = __nf_ct_l3proto_find(l3proto);
270 preempt_enable();
271
272 module_put(p->me);
273}
274
244static int nf_conntrack_hash_rnd_initted; 275static int nf_conntrack_hash_rnd_initted;
245static unsigned int nf_conntrack_hash_rnd; 276static unsigned int nf_conntrack_hash_rnd;
246 277
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 5eadf009bb15..0e0e9d7b34c8 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -4,7 +4,7 @@
4 * (C) 2001 by Jay Schulist <jschlst@samba.org> 4 * (C) 2001 by Jay Schulist <jschlst@samba.org>
5 * (C) 2002-2006 by Harald Welte <laforge@gnumonks.org> 5 * (C) 2002-2006 by Harald Welte <laforge@gnumonks.org>
6 * (C) 2003 by Patrick Mchardy <kaber@trash.net> 6 * (C) 2003 by Patrick Mchardy <kaber@trash.net>
7 * (C) 2005 by Pablo Neira Ayuso <pablo@eurodev.net> 7 * (C) 2005-2006 by Pablo Neira Ayuso <pablo@eurodev.net>
8 * 8 *
9 * I've reworked this stuff to use attributes instead of conntrack 9 * I've reworked this stuff to use attributes instead of conntrack
10 * structures. 5.44 am. I need more tea. --pablo 05/07/11. 10 * structures. 5.44 am. I need more tea. --pablo 05/07/11.
@@ -55,20 +55,18 @@ static char __initdata version[] = "0.93";
55 55
56static inline int 56static inline int
57ctnetlink_dump_tuples_proto(struct sk_buff *skb, 57ctnetlink_dump_tuples_proto(struct sk_buff *skb,
58 const struct nf_conntrack_tuple *tuple) 58 const struct nf_conntrack_tuple *tuple,
59 struct nf_conntrack_protocol *proto)
59{ 60{
60 struct nf_conntrack_protocol *proto;
61 int ret = 0; 61 int ret = 0;
62 struct nfattr *nest_parms = NFA_NEST(skb, CTA_TUPLE_PROTO);
62 63
63 NFA_PUT(skb, CTA_PROTO_NUM, sizeof(u_int8_t), &tuple->dst.protonum); 64 NFA_PUT(skb, CTA_PROTO_NUM, sizeof(u_int8_t), &tuple->dst.protonum);
64 65
65 /* If no protocol helper is found, this function will return the
66 * generic protocol helper, so proto won't *ever* be NULL */
67 proto = nf_ct_proto_find_get(tuple->src.l3num, tuple->dst.protonum);
68 if (likely(proto->tuple_to_nfattr)) 66 if (likely(proto->tuple_to_nfattr))
69 ret = proto->tuple_to_nfattr(skb, tuple); 67 ret = proto->tuple_to_nfattr(skb, tuple);
70 68
71 nf_ct_proto_put(proto); 69 NFA_NEST_END(skb, nest_parms);
72 70
73 return ret; 71 return ret;
74 72
@@ -77,33 +75,44 @@ nfattr_failure:
77} 75}
78 76
79static inline int 77static inline int
80ctnetlink_dump_tuples(struct sk_buff *skb, 78ctnetlink_dump_tuples_ip(struct sk_buff *skb,
81 const struct nf_conntrack_tuple *tuple) 79 const struct nf_conntrack_tuple *tuple,
80 struct nf_conntrack_l3proto *l3proto)
82{ 81{
83 struct nfattr *nest_parms;
84 struct nf_conntrack_l3proto *l3proto;
85 int ret = 0; 82 int ret = 0;
86 83 struct nfattr *nest_parms = NFA_NEST(skb, CTA_TUPLE_IP);
87 l3proto = nf_ct_l3proto_find_get(tuple->src.l3num); 84
88
89 nest_parms = NFA_NEST(skb, CTA_TUPLE_IP);
90 if (likely(l3proto->tuple_to_nfattr)) 85 if (likely(l3proto->tuple_to_nfattr))
91 ret = l3proto->tuple_to_nfattr(skb, tuple); 86 ret = l3proto->tuple_to_nfattr(skb, tuple);
87
92 NFA_NEST_END(skb, nest_parms); 88 NFA_NEST_END(skb, nest_parms);
93 89
90 return ret;
91
92nfattr_failure:
93 return -1;
94}
95
96static inline int
97ctnetlink_dump_tuples(struct sk_buff *skb,
98 const struct nf_conntrack_tuple *tuple)
99{
100 int ret;
101 struct nf_conntrack_l3proto *l3proto;
102 struct nf_conntrack_protocol *proto;
103
104 l3proto = nf_ct_l3proto_find_get(tuple->src.l3num);
105 ret = ctnetlink_dump_tuples_ip(skb, tuple, l3proto);
94 nf_ct_l3proto_put(l3proto); 106 nf_ct_l3proto_put(l3proto);
95 107
96 if (unlikely(ret < 0)) 108 if (unlikely(ret < 0))
97 return ret; 109 return ret;
98 110
99 nest_parms = NFA_NEST(skb, CTA_TUPLE_PROTO); 111 proto = nf_ct_proto_find_get(tuple->src.l3num, tuple->dst.protonum);
100 ret = ctnetlink_dump_tuples_proto(skb, tuple); 112 ret = ctnetlink_dump_tuples_proto(skb, tuple, proto);
101 NFA_NEST_END(skb, nest_parms); 113 nf_ct_proto_put(proto);
102 114
103 return ret; 115 return ret;
104
105nfattr_failure:
106 return -1;
107} 116}
108 117
109static inline int 118static inline int
@@ -1153,6 +1162,37 @@ nfattr_failure:
1153} 1162}
1154 1163
1155static inline int 1164static inline int
1165ctnetlink_exp_dump_mask(struct sk_buff *skb,
1166 const struct nf_conntrack_tuple *tuple,
1167 const struct nf_conntrack_tuple *mask)
1168{
1169 int ret;
1170 struct nf_conntrack_l3proto *l3proto;
1171 struct nf_conntrack_protocol *proto;
1172 struct nfattr *nest_parms = NFA_NEST(skb, CTA_EXPECT_MASK);
1173
1174 l3proto = nf_ct_l3proto_find_get(tuple->src.l3num);
1175 ret = ctnetlink_dump_tuples_ip(skb, mask, l3proto);
1176 nf_ct_l3proto_put(l3proto);
1177
1178 if (unlikely(ret < 0))
1179 goto nfattr_failure;
1180
1181 proto = nf_ct_proto_find_get(tuple->src.l3num, tuple->dst.protonum);
1182 ret = ctnetlink_dump_tuples_proto(skb, mask, proto);
1183 nf_ct_proto_put(proto);
1184 if (unlikely(ret < 0))
1185 goto nfattr_failure;
1186
1187 NFA_NEST_END(skb, nest_parms);
1188
1189 return 0;
1190
1191nfattr_failure:
1192 return -1;
1193}
1194
1195static inline int
1156ctnetlink_exp_dump_expect(struct sk_buff *skb, 1196ctnetlink_exp_dump_expect(struct sk_buff *skb,
1157 const struct nf_conntrack_expect *exp) 1197 const struct nf_conntrack_expect *exp)
1158{ 1198{
@@ -1162,7 +1202,7 @@ ctnetlink_exp_dump_expect(struct sk_buff *skb,
1162 1202
1163 if (ctnetlink_exp_dump_tuple(skb, &exp->tuple, CTA_EXPECT_TUPLE) < 0) 1203 if (ctnetlink_exp_dump_tuple(skb, &exp->tuple, CTA_EXPECT_TUPLE) < 0)
1164 goto nfattr_failure; 1204 goto nfattr_failure;
1165 if (ctnetlink_exp_dump_tuple(skb, &exp->mask, CTA_EXPECT_MASK) < 0) 1205 if (ctnetlink_exp_dump_mask(skb, &exp->tuple, &exp->mask) < 0)
1166 goto nfattr_failure; 1206 goto nfattr_failure;
1167 if (ctnetlink_exp_dump_tuple(skb, 1207 if (ctnetlink_exp_dump_tuple(skb,
1168 &master->tuplehash[IP_CT_DIR_ORIGINAL].tuple, 1208 &master->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index 290d5a0c559b..75577e175b35 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -834,6 +834,8 @@ EXPORT_SYMBOL_GPL(__nf_ct_event_cache_init);
834EXPORT_PER_CPU_SYMBOL_GPL(nf_conntrack_ecache); 834EXPORT_PER_CPU_SYMBOL_GPL(nf_conntrack_ecache);
835EXPORT_SYMBOL_GPL(nf_ct_deliver_cached_events); 835EXPORT_SYMBOL_GPL(nf_ct_deliver_cached_events);
836#endif 836#endif
837EXPORT_SYMBOL(nf_ct_l3proto_try_module_get);
838EXPORT_SYMBOL(nf_ct_l3proto_module_put);
837EXPORT_SYMBOL(nf_conntrack_l3proto_register); 839EXPORT_SYMBOL(nf_conntrack_l3proto_register);
838EXPORT_SYMBOL(nf_conntrack_l3proto_unregister); 840EXPORT_SYMBOL(nf_conntrack_l3proto_unregister);
839EXPORT_SYMBOL(nf_conntrack_protocol_register); 841EXPORT_SYMBOL(nf_conntrack_protocol_register);
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index 2cf5fb8322c4..b5701662182e 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -354,16 +354,17 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
354 QDEBUG("entered\n"); 354 QDEBUG("entered\n");
355 355
356 /* all macros expand to constant values at compile time */ 356 /* all macros expand to constant values at compile time */
357 size = NLMSG_SPACE(sizeof(struct nfqnl_msg_packet_hdr)) 357 size = NLMSG_SPACE(sizeof(struct nfgenmsg)) +
358 + NLMSG_SPACE(sizeof(u_int32_t)) /* ifindex */ 358 + NFA_SPACE(sizeof(struct nfqnl_msg_packet_hdr))
359 + NLMSG_SPACE(sizeof(u_int32_t)) /* ifindex */ 359 + NFA_SPACE(sizeof(u_int32_t)) /* ifindex */
360 + NFA_SPACE(sizeof(u_int32_t)) /* ifindex */
360#ifdef CONFIG_BRIDGE_NETFILTER 361#ifdef CONFIG_BRIDGE_NETFILTER
361 + NLMSG_SPACE(sizeof(u_int32_t)) /* ifindex */ 362 + NFA_SPACE(sizeof(u_int32_t)) /* ifindex */
362 + NLMSG_SPACE(sizeof(u_int32_t)) /* ifindex */ 363 + NFA_SPACE(sizeof(u_int32_t)) /* ifindex */
363#endif 364#endif
364 + NLMSG_SPACE(sizeof(u_int32_t)) /* mark */ 365 + NFA_SPACE(sizeof(u_int32_t)) /* mark */
365 + NLMSG_SPACE(sizeof(struct nfqnl_msg_packet_hw)) 366 + NFA_SPACE(sizeof(struct nfqnl_msg_packet_hw))
366 + NLMSG_SPACE(sizeof(struct nfqnl_msg_packet_timestamp)); 367 + NFA_SPACE(sizeof(struct nfqnl_msg_packet_timestamp));
367 368
368 outdev = entinf->outdev; 369 outdev = entinf->outdev;
369 370
@@ -388,7 +389,7 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
388 else 389 else
389 data_len = queue->copy_range; 390 data_len = queue->copy_range;
390 391
391 size += NLMSG_SPACE(data_len); 392 size += NFA_SPACE(data_len);
392 break; 393 break;
393 394
394 default: 395 default:
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index 750b92829766..0a29a24d9a72 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -60,9 +60,9 @@ static const char *xt_prefix[NPROTO] = {
60 60
61/* Registration hooks for targets. */ 61/* Registration hooks for targets. */
62int 62int
63xt_register_target(int af, struct xt_target *target) 63xt_register_target(struct xt_target *target)
64{ 64{
65 int ret; 65 int ret, af = target->family;
66 66
67 ret = down_interruptible(&xt[af].mutex); 67 ret = down_interruptible(&xt[af].mutex);
68 if (ret != 0) 68 if (ret != 0)
@@ -74,8 +74,10 @@ xt_register_target(int af, struct xt_target *target)
74EXPORT_SYMBOL(xt_register_target); 74EXPORT_SYMBOL(xt_register_target);
75 75
76void 76void
77xt_unregister_target(int af, struct xt_target *target) 77xt_unregister_target(struct xt_target *target)
78{ 78{
79 int af = target->family;
80
79 down(&xt[af].mutex); 81 down(&xt[af].mutex);
80 LIST_DELETE(&xt[af].target, target); 82 LIST_DELETE(&xt[af].target, target);
81 up(&xt[af].mutex); 83 up(&xt[af].mutex);
@@ -83,9 +85,9 @@ xt_unregister_target(int af, struct xt_target *target)
83EXPORT_SYMBOL(xt_unregister_target); 85EXPORT_SYMBOL(xt_unregister_target);
84 86
85int 87int
86xt_register_match(int af, struct xt_match *match) 88xt_register_match(struct xt_match *match)
87{ 89{
88 int ret; 90 int ret, af = match->family;
89 91
90 ret = down_interruptible(&xt[af].mutex); 92 ret = down_interruptible(&xt[af].mutex);
91 if (ret != 0) 93 if (ret != 0)
@@ -99,8 +101,10 @@ xt_register_match(int af, struct xt_match *match)
99EXPORT_SYMBOL(xt_register_match); 101EXPORT_SYMBOL(xt_register_match);
100 102
101void 103void
102xt_unregister_match(int af, struct xt_match *match) 104xt_unregister_match(struct xt_match *match)
103{ 105{
106 int af = match->family;
107
104 down(&xt[af].mutex); 108 down(&xt[af].mutex);
105 LIST_DELETE(&xt[af].match, match); 109 LIST_DELETE(&xt[af].match, match);
106 up(&xt[af].mutex); 110 up(&xt[af].mutex);
diff --git a/net/netfilter/xt_CLASSIFY.c b/net/netfilter/xt_CLASSIFY.c
index 3224ed87d4c7..3cd2ac90a25b 100644
--- a/net/netfilter/xt_CLASSIFY.c
+++ b/net/netfilter/xt_CLASSIFY.c
@@ -47,6 +47,7 @@ static struct xt_target classify_reg = {
47 .table = "mangle", 47 .table = "mangle",
48 .hooks = (1 << NF_IP_LOCAL_OUT) | (1 << NF_IP_FORWARD) | 48 .hooks = (1 << NF_IP_LOCAL_OUT) | (1 << NF_IP_FORWARD) |
49 (1 << NF_IP_POST_ROUTING), 49 (1 << NF_IP_POST_ROUTING),
50 .family = AF_INET,
50 .me = THIS_MODULE, 51 .me = THIS_MODULE,
51}; 52};
52static struct xt_target classify6_reg = { 53static struct xt_target classify6_reg = {
@@ -56,6 +57,7 @@ static struct xt_target classify6_reg = {
56 .table = "mangle", 57 .table = "mangle",
57 .hooks = (1 << NF_IP_LOCAL_OUT) | (1 << NF_IP_FORWARD) | 58 .hooks = (1 << NF_IP_LOCAL_OUT) | (1 << NF_IP_FORWARD) |
58 (1 << NF_IP_POST_ROUTING), 59 (1 << NF_IP_POST_ROUTING),
60 .family = AF_INET6,
59 .me = THIS_MODULE, 61 .me = THIS_MODULE,
60}; 62};
61 63
@@ -64,21 +66,21 @@ static int __init init(void)
64{ 66{
65 int ret; 67 int ret;
66 68
67 ret = xt_register_target(AF_INET, &classify_reg); 69 ret = xt_register_target(&classify_reg);
68 if (ret) 70 if (ret)
69 return ret; 71 return ret;
70 72
71 ret = xt_register_target(AF_INET6, &classify6_reg); 73 ret = xt_register_target(&classify6_reg);
72 if (ret) 74 if (ret)
73 xt_unregister_target(AF_INET, &classify_reg); 75 xt_unregister_target(&classify_reg);
74 76
75 return ret; 77 return ret;
76} 78}
77 79
78static void __exit fini(void) 80static void __exit fini(void)
79{ 81{
80 xt_unregister_target(AF_INET, &classify_reg); 82 xt_unregister_target(&classify_reg);
81 xt_unregister_target(AF_INET6, &classify6_reg); 83 xt_unregister_target(&classify6_reg);
82} 84}
83 85
84module_init(init); 86module_init(init);
diff --git a/net/netfilter/xt_CONNMARK.c b/net/netfilter/xt_CONNMARK.c
index df2486a3efd5..35448b8e6883 100644
--- a/net/netfilter/xt_CONNMARK.c
+++ b/net/netfilter/xt_CONNMARK.c
@@ -102,6 +102,7 @@ static struct xt_target connmark_reg = {
102 .target = target, 102 .target = target,
103 .targetsize = sizeof(struct xt_connmark_target_info), 103 .targetsize = sizeof(struct xt_connmark_target_info),
104 .checkentry = checkentry, 104 .checkentry = checkentry,
105 .family = AF_INET,
105 .me = THIS_MODULE 106 .me = THIS_MODULE
106}; 107};
107 108
@@ -110,6 +111,7 @@ static struct xt_target connmark6_reg = {
110 .target = target, 111 .target = target,
111 .targetsize = sizeof(struct xt_connmark_target_info), 112 .targetsize = sizeof(struct xt_connmark_target_info),
112 .checkentry = checkentry, 113 .checkentry = checkentry,
114 .family = AF_INET6,
113 .me = THIS_MODULE 115 .me = THIS_MODULE
114}; 116};
115 117
@@ -119,21 +121,21 @@ static int __init init(void)
119 121
120 need_conntrack(); 122 need_conntrack();
121 123
122 ret = xt_register_target(AF_INET, &connmark_reg); 124 ret = xt_register_target(&connmark_reg);
123 if (ret) 125 if (ret)
124 return ret; 126 return ret;
125 127
126 ret = xt_register_target(AF_INET6, &connmark6_reg); 128 ret = xt_register_target(&connmark6_reg);
127 if (ret) 129 if (ret)
128 xt_unregister_target(AF_INET, &connmark_reg); 130 xt_unregister_target(&connmark_reg);
129 131
130 return ret; 132 return ret;
131} 133}
132 134
133static void __exit fini(void) 135static void __exit fini(void)
134{ 136{
135 xt_unregister_target(AF_INET, &connmark_reg); 137 xt_unregister_target(&connmark_reg);
136 xt_unregister_target(AF_INET6, &connmark6_reg); 138 xt_unregister_target(&connmark6_reg);
137} 139}
138 140
139module_init(init); 141module_init(init);
diff --git a/net/netfilter/xt_MARK.c b/net/netfilter/xt_MARK.c
index dcb5266efae0..73bdd5c80e17 100644
--- a/net/netfilter/xt_MARK.c
+++ b/net/netfilter/xt_MARK.c
@@ -119,6 +119,7 @@ static struct xt_target ipt_mark_reg_v0 = {
119 .table = "mangle", 119 .table = "mangle",
120 .checkentry = checkentry_v0, 120 .checkentry = checkentry_v0,
121 .me = THIS_MODULE, 121 .me = THIS_MODULE,
122 .family = AF_INET,
122 .revision = 0, 123 .revision = 0,
123}; 124};
124 125
@@ -129,6 +130,7 @@ static struct xt_target ipt_mark_reg_v1 = {
129 .table = "mangle", 130 .table = "mangle",
130 .checkentry = checkentry_v1, 131 .checkentry = checkentry_v1,
131 .me = THIS_MODULE, 132 .me = THIS_MODULE,
133 .family = AF_INET,
132 .revision = 1, 134 .revision = 1,
133}; 135};
134 136
@@ -139,6 +141,7 @@ static struct xt_target ip6t_mark_reg_v0 = {
139 .table = "mangle", 141 .table = "mangle",
140 .checkentry = checkentry_v0, 142 .checkentry = checkentry_v0,
141 .me = THIS_MODULE, 143 .me = THIS_MODULE,
144 .family = AF_INET6,
142 .revision = 0, 145 .revision = 0,
143}; 146};
144 147
@@ -146,18 +149,18 @@ static int __init init(void)
146{ 149{
147 int err; 150 int err;
148 151
149 err = xt_register_target(AF_INET, &ipt_mark_reg_v0); 152 err = xt_register_target(&ipt_mark_reg_v0);
150 if (err) 153 if (err)
151 return err; 154 return err;
152 155
153 err = xt_register_target(AF_INET, &ipt_mark_reg_v1); 156 err = xt_register_target(&ipt_mark_reg_v1);
154 if (err) 157 if (err)
155 xt_unregister_target(AF_INET, &ipt_mark_reg_v0); 158 xt_unregister_target(&ipt_mark_reg_v0);
156 159
157 err = xt_register_target(AF_INET6, &ip6t_mark_reg_v0); 160 err = xt_register_target(&ip6t_mark_reg_v0);
158 if (err) { 161 if (err) {
159 xt_unregister_target(AF_INET, &ipt_mark_reg_v0); 162 xt_unregister_target(&ipt_mark_reg_v0);
160 xt_unregister_target(AF_INET, &ipt_mark_reg_v1); 163 xt_unregister_target(&ipt_mark_reg_v1);
161 } 164 }
162 165
163 return err; 166 return err;
@@ -165,9 +168,9 @@ static int __init init(void)
165 168
166static void __exit fini(void) 169static void __exit fini(void)
167{ 170{
168 xt_unregister_target(AF_INET, &ipt_mark_reg_v0); 171 xt_unregister_target(&ipt_mark_reg_v0);
169 xt_unregister_target(AF_INET, &ipt_mark_reg_v1); 172 xt_unregister_target(&ipt_mark_reg_v1);
170 xt_unregister_target(AF_INET6, &ip6t_mark_reg_v0); 173 xt_unregister_target(&ip6t_mark_reg_v0);
171} 174}
172 175
173module_init(init); 176module_init(init);
diff --git a/net/netfilter/xt_NFQUEUE.c b/net/netfilter/xt_NFQUEUE.c
index 39a963edf16b..2873e1c60f68 100644
--- a/net/netfilter/xt_NFQUEUE.c
+++ b/net/netfilter/xt_NFQUEUE.c
@@ -41,6 +41,7 @@ static struct xt_target ipt_NFQ_reg = {
41 .name = "NFQUEUE", 41 .name = "NFQUEUE",
42 .target = target, 42 .target = target,
43 .targetsize = sizeof(struct xt_NFQ_info), 43 .targetsize = sizeof(struct xt_NFQ_info),
44 .family = AF_INET,
44 .me = THIS_MODULE, 45 .me = THIS_MODULE,
45}; 46};
46 47
@@ -48,6 +49,7 @@ static struct xt_target ip6t_NFQ_reg = {
48 .name = "NFQUEUE", 49 .name = "NFQUEUE",
49 .target = target, 50 .target = target,
50 .targetsize = sizeof(struct xt_NFQ_info), 51 .targetsize = sizeof(struct xt_NFQ_info),
52 .family = AF_INET6,
51 .me = THIS_MODULE, 53 .me = THIS_MODULE,
52}; 54};
53 55
@@ -55,36 +57,37 @@ static struct xt_target arpt_NFQ_reg = {
55 .name = "NFQUEUE", 57 .name = "NFQUEUE",
56 .target = target, 58 .target = target,
57 .targetsize = sizeof(struct xt_NFQ_info), 59 .targetsize = sizeof(struct xt_NFQ_info),
60 .family = NF_ARP,
58 .me = THIS_MODULE, 61 .me = THIS_MODULE,
59}; 62};
60 63
61static int __init init(void) 64static int __init init(void)
62{ 65{
63 int ret; 66 int ret;
64 ret = xt_register_target(AF_INET, &ipt_NFQ_reg); 67 ret = xt_register_target(&ipt_NFQ_reg);
65 if (ret) 68 if (ret)
66 return ret; 69 return ret;
67 ret = xt_register_target(AF_INET6, &ip6t_NFQ_reg); 70 ret = xt_register_target(&ip6t_NFQ_reg);
68 if (ret) 71 if (ret)
69 goto out_ip; 72 goto out_ip;
70 ret = xt_register_target(NF_ARP, &arpt_NFQ_reg); 73 ret = xt_register_target(&arpt_NFQ_reg);
71 if (ret) 74 if (ret)
72 goto out_ip6; 75 goto out_ip6;
73 76
74 return ret; 77 return ret;
75out_ip6: 78out_ip6:
76 xt_unregister_target(AF_INET6, &ip6t_NFQ_reg); 79 xt_unregister_target(&ip6t_NFQ_reg);
77out_ip: 80out_ip:
78 xt_unregister_target(AF_INET, &ipt_NFQ_reg); 81 xt_unregister_target(&ipt_NFQ_reg);
79 82
80 return ret; 83 return ret;
81} 84}
82 85
83static void __exit fini(void) 86static void __exit fini(void)
84{ 87{
85 xt_unregister_target(NF_ARP, &arpt_NFQ_reg); 88 xt_unregister_target(&arpt_NFQ_reg);
86 xt_unregister_target(AF_INET6, &ip6t_NFQ_reg); 89 xt_unregister_target(&ip6t_NFQ_reg);
87 xt_unregister_target(AF_INET, &ipt_NFQ_reg); 90 xt_unregister_target(&ipt_NFQ_reg);
88} 91}
89 92
90module_init(init); 93module_init(init);
diff --git a/net/netfilter/xt_NOTRACK.c b/net/netfilter/xt_NOTRACK.c
index b8634e3f6169..cf2ebd76fd6f 100644
--- a/net/netfilter/xt_NOTRACK.c
+++ b/net/netfilter/xt_NOTRACK.c
@@ -39,6 +39,7 @@ static struct xt_target notrack_reg = {
39 .target = target, 39 .target = target,
40 .targetsize = 0, 40 .targetsize = 0,
41 .table = "raw", 41 .table = "raw",
42 .family = AF_INET,
42 .me = THIS_MODULE, 43 .me = THIS_MODULE,
43}; 44};
44 45
@@ -47,6 +48,7 @@ static struct xt_target notrack6_reg = {
47 .target = target, 48 .target = target,
48 .targetsize = 0, 49 .targetsize = 0,
49 .table = "raw", 50 .table = "raw",
51 .family = AF_INET6,
50 .me = THIS_MODULE, 52 .me = THIS_MODULE,
51}; 53};
52 54
@@ -54,21 +56,21 @@ static int __init init(void)
54{ 56{
55 int ret; 57 int ret;
56 58
57 ret = xt_register_target(AF_INET, &notrack_reg); 59 ret = xt_register_target(&notrack_reg);
58 if (ret) 60 if (ret)
59 return ret; 61 return ret;
60 62
61 ret = xt_register_target(AF_INET6, &notrack6_reg); 63 ret = xt_register_target(&notrack6_reg);
62 if (ret) 64 if (ret)
63 xt_unregister_target(AF_INET, &notrack_reg); 65 xt_unregister_target(&notrack_reg);
64 66
65 return ret; 67 return ret;
66} 68}
67 69
68static void __exit fini(void) 70static void __exit fini(void)
69{ 71{
70 xt_unregister_target(AF_INET6, &notrack6_reg); 72 xt_unregister_target(&notrack6_reg);
71 xt_unregister_target(AF_INET, &notrack_reg); 73 xt_unregister_target(&notrack_reg);
72} 74}
73 75
74module_init(init); 76module_init(init);
diff --git a/net/netfilter/xt_comment.c b/net/netfilter/xt_comment.c
index 03d9d741231c..2637724b498d 100644
--- a/net/netfilter/xt_comment.c
+++ b/net/netfilter/xt_comment.c
@@ -33,6 +33,7 @@ static struct xt_match comment_match = {
33 .name = "comment", 33 .name = "comment",
34 .match = match, 34 .match = match,
35 .matchsize = sizeof(struct xt_comment_info), 35 .matchsize = sizeof(struct xt_comment_info),
36 .family = AF_INET,
36 .me = THIS_MODULE 37 .me = THIS_MODULE
37}; 38};
38 39
@@ -40,6 +41,7 @@ static struct xt_match comment6_match = {
40 .name = "comment", 41 .name = "comment",
41 .match = match, 42 .match = match,
42 .matchsize = sizeof(struct xt_comment_info), 43 .matchsize = sizeof(struct xt_comment_info),
44 .family = AF_INET6,
43 .me = THIS_MODULE 45 .me = THIS_MODULE
44}; 46};
45 47
@@ -47,21 +49,21 @@ static int __init init(void)
47{ 49{
48 int ret; 50 int ret;
49 51
50 ret = xt_register_match(AF_INET, &comment_match); 52 ret = xt_register_match(&comment_match);
51 if (ret) 53 if (ret)
52 return ret; 54 return ret;
53 55
54 ret = xt_register_match(AF_INET6, &comment6_match); 56 ret = xt_register_match(&comment6_match);
55 if (ret) 57 if (ret)
56 xt_unregister_match(AF_INET, &comment_match); 58 xt_unregister_match(&comment_match);
57 59
58 return ret; 60 return ret;
59} 61}
60 62
61static void __exit fini(void) 63static void __exit fini(void)
62{ 64{
63 xt_unregister_match(AF_INET, &comment_match); 65 xt_unregister_match(&comment_match);
64 xt_unregister_match(AF_INET6, &comment6_match); 66 xt_unregister_match(&comment6_match);
65} 67}
66 68
67module_init(init); 69module_init(init);
diff --git a/net/netfilter/xt_connbytes.c b/net/netfilter/xt_connbytes.c
index f34ecb9485c7..4985f5ec58ca 100644
--- a/net/netfilter/xt_connbytes.c
+++ b/net/netfilter/xt_connbytes.c
@@ -148,6 +148,7 @@ static struct xt_match connbytes_match = {
148 .match = match, 148 .match = match,
149 .checkentry = check, 149 .checkentry = check,
150 .matchsize = sizeof(struct xt_connbytes_info), 150 .matchsize = sizeof(struct xt_connbytes_info),
151 .family = AF_INET,
151 .me = THIS_MODULE 152 .me = THIS_MODULE
152}; 153};
153static struct xt_match connbytes6_match = { 154static struct xt_match connbytes6_match = {
@@ -155,26 +156,27 @@ static struct xt_match connbytes6_match = {
155 .match = match, 156 .match = match,
156 .checkentry = check, 157 .checkentry = check,
157 .matchsize = sizeof(struct xt_connbytes_info), 158 .matchsize = sizeof(struct xt_connbytes_info),
159 .family = AF_INET6,
158 .me = THIS_MODULE 160 .me = THIS_MODULE
159}; 161};
160 162
161static int __init init(void) 163static int __init init(void)
162{ 164{
163 int ret; 165 int ret;
164 ret = xt_register_match(AF_INET, &connbytes_match); 166 ret = xt_register_match(&connbytes_match);
165 if (ret) 167 if (ret)
166 return ret; 168 return ret;
167 169
168 ret = xt_register_match(AF_INET6, &connbytes6_match); 170 ret = xt_register_match(&connbytes6_match);
169 if (ret) 171 if (ret)
170 xt_unregister_match(AF_INET, &connbytes_match); 172 xt_unregister_match(&connbytes_match);
171 return ret; 173 return ret;
172} 174}
173 175
174static void __exit fini(void) 176static void __exit fini(void)
175{ 177{
176 xt_unregister_match(AF_INET, &connbytes_match); 178 xt_unregister_match(&connbytes_match);
177 xt_unregister_match(AF_INET6, &connbytes6_match); 179 xt_unregister_match(&connbytes6_match);
178} 180}
179 181
180module_init(init); 182module_init(init);
diff --git a/net/netfilter/xt_connmark.c b/net/netfilter/xt_connmark.c
index 51822471e919..7b16f1ee16b4 100644
--- a/net/netfilter/xt_connmark.c
+++ b/net/netfilter/xt_connmark.c
@@ -64,14 +64,31 @@ checkentry(const char *tablename,
64 printk(KERN_WARNING "connmark: only support 32bit mark\n"); 64 printk(KERN_WARNING "connmark: only support 32bit mark\n");
65 return 0; 65 return 0;
66 } 66 }
67#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
68 if (nf_ct_l3proto_try_module_get(match->family) < 0) {
69 printk(KERN_WARNING "can't load nf_conntrack support for "
70 "proto=%d\n", match->family);
71 return 0;
72 }
73#endif
67 return 1; 74 return 1;
68} 75}
69 76
77static void
78destroy(const struct xt_match *match, void *matchinfo, unsigned int matchsize)
79{
80#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
81 nf_ct_l3proto_module_put(match->family);
82#endif
83}
84
70static struct xt_match connmark_match = { 85static struct xt_match connmark_match = {
71 .name = "connmark", 86 .name = "connmark",
72 .match = match, 87 .match = match,
73 .matchsize = sizeof(struct xt_connmark_info), 88 .matchsize = sizeof(struct xt_connmark_info),
74 .checkentry = checkentry, 89 .checkentry = checkentry,
90 .destroy = destroy,
91 .family = AF_INET,
75 .me = THIS_MODULE 92 .me = THIS_MODULE
76}; 93};
77 94
@@ -80,6 +97,8 @@ static struct xt_match connmark6_match = {
80 .match = match, 97 .match = match,
81 .matchsize = sizeof(struct xt_connmark_info), 98 .matchsize = sizeof(struct xt_connmark_info),
82 .checkentry = checkentry, 99 .checkentry = checkentry,
100 .destroy = destroy,
101 .family = AF_INET6,
83 .me = THIS_MODULE 102 .me = THIS_MODULE
84}; 103};
85 104
@@ -89,20 +108,20 @@ static int __init init(void)
89 108
90 need_conntrack(); 109 need_conntrack();
91 110
92 ret = xt_register_match(AF_INET, &connmark_match); 111 ret = xt_register_match(&connmark_match);
93 if (ret) 112 if (ret)
94 return ret; 113 return ret;
95 114
96 ret = xt_register_match(AF_INET6, &connmark6_match); 115 ret = xt_register_match(&connmark6_match);
97 if (ret) 116 if (ret)
98 xt_unregister_match(AF_INET, &connmark_match); 117 xt_unregister_match(&connmark_match);
99 return ret; 118 return ret;
100} 119}
101 120
102static void __exit fini(void) 121static void __exit fini(void)
103{ 122{
104 xt_unregister_match(AF_INET6, &connmark6_match); 123 xt_unregister_match(&connmark6_match);
105 xt_unregister_match(AF_INET, &connmark_match); 124 xt_unregister_match(&connmark_match);
106} 125}
107 126
108module_init(init); 127module_init(init);
diff --git a/net/netfilter/xt_conntrack.c b/net/netfilter/xt_conntrack.c
index 39fc29496e00..65a84809fd30 100644
--- a/net/netfilter/xt_conntrack.c
+++ b/net/netfilter/xt_conntrack.c
@@ -203,10 +203,39 @@ match(const struct sk_buff *skb,
203 203
204#endif /* CONFIG_NF_IP_CONNTRACK */ 204#endif /* CONFIG_NF_IP_CONNTRACK */
205 205
206static int
207checkentry(const char *tablename,
208 const void *ip,
209 const struct xt_match *match,
210 void *matchinfo,
211 unsigned int matchsize,
212 unsigned int hook_mask)
213{
214#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
215 if (nf_ct_l3proto_try_module_get(match->family) < 0) {
216 printk(KERN_WARNING "can't load nf_conntrack support for "
217 "proto=%d\n", match->family);
218 return 0;
219 }
220#endif
221 return 1;
222}
223
224static void
225destroy(const struct xt_match *match, void *matchinfo, unsigned int matchsize)
226{
227#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
228 nf_ct_l3proto_module_put(match->family);
229#endif
230}
231
206static struct xt_match conntrack_match = { 232static struct xt_match conntrack_match = {
207 .name = "conntrack", 233 .name = "conntrack",
208 .match = match, 234 .match = match,
235 .checkentry = checkentry,
236 .destroy = destroy,
209 .matchsize = sizeof(struct xt_conntrack_info), 237 .matchsize = sizeof(struct xt_conntrack_info),
238 .family = AF_INET,
210 .me = THIS_MODULE, 239 .me = THIS_MODULE,
211}; 240};
212 241
@@ -214,14 +243,14 @@ static int __init init(void)
214{ 243{
215 int ret; 244 int ret;
216 need_conntrack(); 245 need_conntrack();
217 ret = xt_register_match(AF_INET, &conntrack_match); 246 ret = xt_register_match(&conntrack_match);
218 247
219 return ret; 248 return ret;
220} 249}
221 250
222static void __exit fini(void) 251static void __exit fini(void)
223{ 252{
224 xt_unregister_match(AF_INET, &conntrack_match); 253 xt_unregister_match(&conntrack_match);
225} 254}
226 255
227module_init(init); 256module_init(init);
diff --git a/net/netfilter/xt_dccp.c b/net/netfilter/xt_dccp.c
index db6b70cdc770..2f331decd151 100644
--- a/net/netfilter/xt_dccp.c
+++ b/net/netfilter/xt_dccp.c
@@ -149,6 +149,7 @@ static struct xt_match dccp_match =
149 .matchsize = sizeof(struct xt_dccp_info), 149 .matchsize = sizeof(struct xt_dccp_info),
150 .proto = IPPROTO_DCCP, 150 .proto = IPPROTO_DCCP,
151 .checkentry = checkentry, 151 .checkentry = checkentry,
152 .family = AF_INET,
152 .me = THIS_MODULE, 153 .me = THIS_MODULE,
153}; 154};
154static struct xt_match dccp6_match = 155static struct xt_match dccp6_match =
@@ -158,6 +159,7 @@ static struct xt_match dccp6_match =
158 .matchsize = sizeof(struct xt_dccp_info), 159 .matchsize = sizeof(struct xt_dccp_info),
159 .proto = IPPROTO_DCCP, 160 .proto = IPPROTO_DCCP,
160 .checkentry = checkentry, 161 .checkentry = checkentry,
162 .family = AF_INET6,
161 .me = THIS_MODULE, 163 .me = THIS_MODULE,
162}; 164};
163 165
@@ -172,17 +174,17 @@ static int __init init(void)
172 dccp_optbuf = kmalloc(256 * 4, GFP_KERNEL); 174 dccp_optbuf = kmalloc(256 * 4, GFP_KERNEL);
173 if (!dccp_optbuf) 175 if (!dccp_optbuf)
174 return -ENOMEM; 176 return -ENOMEM;
175 ret = xt_register_match(AF_INET, &dccp_match); 177 ret = xt_register_match(&dccp_match);
176 if (ret) 178 if (ret)
177 goto out_kfree; 179 goto out_kfree;
178 ret = xt_register_match(AF_INET6, &dccp6_match); 180 ret = xt_register_match(&dccp6_match);
179 if (ret) 181 if (ret)
180 goto out_unreg; 182 goto out_unreg;
181 183
182 return ret; 184 return ret;
183 185
184out_unreg: 186out_unreg:
185 xt_unregister_match(AF_INET, &dccp_match); 187 xt_unregister_match(&dccp_match);
186out_kfree: 188out_kfree:
187 kfree(dccp_optbuf); 189 kfree(dccp_optbuf);
188 190
@@ -191,8 +193,8 @@ out_kfree:
191 193
192static void __exit fini(void) 194static void __exit fini(void)
193{ 195{
194 xt_unregister_match(AF_INET6, &dccp6_match); 196 xt_unregister_match(&dccp6_match);
195 xt_unregister_match(AF_INET, &dccp_match); 197 xt_unregister_match(&dccp_match);
196 kfree(dccp_optbuf); 198 kfree(dccp_optbuf);
197} 199}
198 200
diff --git a/net/netfilter/xt_helper.c b/net/netfilter/xt_helper.c
index ef8e54d40c92..101f0005e987 100644
--- a/net/netfilter/xt_helper.c
+++ b/net/netfilter/xt_helper.c
@@ -144,15 +144,32 @@ static int check(const char *tablename,
144{ 144{
145 struct xt_helper_info *info = matchinfo; 145 struct xt_helper_info *info = matchinfo;
146 146
147#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
148 if (nf_ct_l3proto_try_module_get(match->family) < 0) {
149 printk(KERN_WARNING "can't load nf_conntrack support for "
150 "proto=%d\n", match->family);
151 return 0;
152 }
153#endif
147 info->name[29] = '\0'; 154 info->name[29] = '\0';
148 return 1; 155 return 1;
149} 156}
150 157
158static void
159destroy(const struct xt_match *match, void *matchinfo, unsigned int matchsize)
160{
161#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
162 nf_ct_l3proto_module_put(match->family);
163#endif
164}
165
151static struct xt_match helper_match = { 166static struct xt_match helper_match = {
152 .name = "helper", 167 .name = "helper",
153 .match = match, 168 .match = match,
154 .matchsize = sizeof(struct xt_helper_info), 169 .matchsize = sizeof(struct xt_helper_info),
155 .checkentry = check, 170 .checkentry = check,
171 .destroy = destroy,
172 .family = AF_INET,
156 .me = THIS_MODULE, 173 .me = THIS_MODULE,
157}; 174};
158static struct xt_match helper6_match = { 175static struct xt_match helper6_match = {
@@ -160,6 +177,8 @@ static struct xt_match helper6_match = {
160 .match = match, 177 .match = match,
161 .matchsize = sizeof(struct xt_helper_info), 178 .matchsize = sizeof(struct xt_helper_info),
162 .checkentry = check, 179 .checkentry = check,
180 .destroy = destroy,
181 .family = AF_INET6,
163 .me = THIS_MODULE, 182 .me = THIS_MODULE,
164}; 183};
165 184
@@ -168,21 +187,21 @@ static int __init init(void)
168 int ret; 187 int ret;
169 need_conntrack(); 188 need_conntrack();
170 189
171 ret = xt_register_match(AF_INET, &helper_match); 190 ret = xt_register_match(&helper_match);
172 if (ret < 0) 191 if (ret < 0)
173 return ret; 192 return ret;
174 193
175 ret = xt_register_match(AF_INET6, &helper6_match); 194 ret = xt_register_match(&helper6_match);
176 if (ret < 0) 195 if (ret < 0)
177 xt_unregister_match(AF_INET, &helper_match); 196 xt_unregister_match(&helper_match);
178 197
179 return ret; 198 return ret;
180} 199}
181 200
182static void __exit fini(void) 201static void __exit fini(void)
183{ 202{
184 xt_unregister_match(AF_INET, &helper_match); 203 xt_unregister_match(&helper_match);
185 xt_unregister_match(AF_INET6, &helper6_match); 204 xt_unregister_match(&helper6_match);
186} 205}
187 206
188module_init(init); 207module_init(init);
diff --git a/net/netfilter/xt_length.c b/net/netfilter/xt_length.c
index b9e60f041a64..38560caef757 100644
--- a/net/netfilter/xt_length.c
+++ b/net/netfilter/xt_length.c
@@ -56,6 +56,7 @@ static struct xt_match length_match = {
56 .name = "length", 56 .name = "length",
57 .match = match, 57 .match = match,
58 .matchsize = sizeof(struct xt_length_info), 58 .matchsize = sizeof(struct xt_length_info),
59 .family = AF_INET,
59 .me = THIS_MODULE, 60 .me = THIS_MODULE,
60}; 61};
61 62
@@ -63,26 +64,27 @@ static struct xt_match length6_match = {
63 .name = "length", 64 .name = "length",
64 .match = match6, 65 .match = match6,
65 .matchsize = sizeof(struct xt_length_info), 66 .matchsize = sizeof(struct xt_length_info),
67 .family = AF_INET6,
66 .me = THIS_MODULE, 68 .me = THIS_MODULE,
67}; 69};
68 70
69static int __init init(void) 71static int __init init(void)
70{ 72{
71 int ret; 73 int ret;
72 ret = xt_register_match(AF_INET, &length_match); 74 ret = xt_register_match(&length_match);
73 if (ret) 75 if (ret)
74 return ret; 76 return ret;
75 ret = xt_register_match(AF_INET6, &length6_match); 77 ret = xt_register_match(&length6_match);
76 if (ret) 78 if (ret)
77 xt_unregister_match(AF_INET, &length_match); 79 xt_unregister_match(&length_match);
78 80
79 return ret; 81 return ret;
80} 82}
81 83
82static void __exit fini(void) 84static void __exit fini(void)
83{ 85{
84 xt_unregister_match(AF_INET, &length_match); 86 xt_unregister_match(&length_match);
85 xt_unregister_match(AF_INET6, &length6_match); 87 xt_unregister_match(&length6_match);
86} 88}
87 89
88module_init(init); 90module_init(init);
diff --git a/net/netfilter/xt_limit.c b/net/netfilter/xt_limit.c
index 3049e6f8889e..e91c1a444e77 100644
--- a/net/netfilter/xt_limit.c
+++ b/net/netfilter/xt_limit.c
@@ -141,6 +141,7 @@ static struct xt_match ipt_limit_reg = {
141 .match = ipt_limit_match, 141 .match = ipt_limit_match,
142 .matchsize = sizeof(struct xt_rateinfo), 142 .matchsize = sizeof(struct xt_rateinfo),
143 .checkentry = ipt_limit_checkentry, 143 .checkentry = ipt_limit_checkentry,
144 .family = AF_INET,
144 .me = THIS_MODULE, 145 .me = THIS_MODULE,
145}; 146};
146static struct xt_match limit6_reg = { 147static struct xt_match limit6_reg = {
@@ -148,6 +149,7 @@ static struct xt_match limit6_reg = {
148 .match = ipt_limit_match, 149 .match = ipt_limit_match,
149 .matchsize = sizeof(struct xt_rateinfo), 150 .matchsize = sizeof(struct xt_rateinfo),
150 .checkentry = ipt_limit_checkentry, 151 .checkentry = ipt_limit_checkentry,
152 .family = AF_INET6,
151 .me = THIS_MODULE, 153 .me = THIS_MODULE,
152}; 154};
153 155
@@ -155,21 +157,21 @@ static int __init init(void)
155{ 157{
156 int ret; 158 int ret;
157 159
158 ret = xt_register_match(AF_INET, &ipt_limit_reg); 160 ret = xt_register_match(&ipt_limit_reg);
159 if (ret) 161 if (ret)
160 return ret; 162 return ret;
161 163
162 ret = xt_register_match(AF_INET6, &limit6_reg); 164 ret = xt_register_match(&limit6_reg);
163 if (ret) 165 if (ret)
164 xt_unregister_match(AF_INET, &ipt_limit_reg); 166 xt_unregister_match(&ipt_limit_reg);
165 167
166 return ret; 168 return ret;
167} 169}
168 170
169static void __exit fini(void) 171static void __exit fini(void)
170{ 172{
171 xt_unregister_match(AF_INET, &ipt_limit_reg); 173 xt_unregister_match(&ipt_limit_reg);
172 xt_unregister_match(AF_INET6, &limit6_reg); 174 xt_unregister_match(&limit6_reg);
173} 175}
174 176
175module_init(init); 177module_init(init);
diff --git a/net/netfilter/xt_mac.c b/net/netfilter/xt_mac.c
index b4559a46dce8..f4defa28a6ec 100644
--- a/net/netfilter/xt_mac.c
+++ b/net/netfilter/xt_mac.c
@@ -49,6 +49,7 @@ static struct xt_match mac_match = {
49 .matchsize = sizeof(struct xt_mac_info), 49 .matchsize = sizeof(struct xt_mac_info),
50 .hooks = (1 << NF_IP_PRE_ROUTING) | (1 << NF_IP_LOCAL_IN) | 50 .hooks = (1 << NF_IP_PRE_ROUTING) | (1 << NF_IP_LOCAL_IN) |
51 (1 << NF_IP_FORWARD), 51 (1 << NF_IP_FORWARD),
52 .family = AF_INET,
52 .me = THIS_MODULE, 53 .me = THIS_MODULE,
53}; 54};
54static struct xt_match mac6_match = { 55static struct xt_match mac6_match = {
@@ -57,27 +58,28 @@ static struct xt_match mac6_match = {
57 .matchsize = sizeof(struct xt_mac_info), 58 .matchsize = sizeof(struct xt_mac_info),
58 .hooks = (1 << NF_IP_PRE_ROUTING) | (1 << NF_IP_LOCAL_IN) | 59 .hooks = (1 << NF_IP_PRE_ROUTING) | (1 << NF_IP_LOCAL_IN) |
59 (1 << NF_IP_FORWARD), 60 (1 << NF_IP_FORWARD),
61 .family = AF_INET6,
60 .me = THIS_MODULE, 62 .me = THIS_MODULE,
61}; 63};
62 64
63static int __init init(void) 65static int __init init(void)
64{ 66{
65 int ret; 67 int ret;
66 ret = xt_register_match(AF_INET, &mac_match); 68 ret = xt_register_match(&mac_match);
67 if (ret) 69 if (ret)
68 return ret; 70 return ret;
69 71
70 ret = xt_register_match(AF_INET6, &mac6_match); 72 ret = xt_register_match(&mac6_match);
71 if (ret) 73 if (ret)
72 xt_unregister_match(AF_INET, &mac_match); 74 xt_unregister_match(&mac_match);
73 75
74 return ret; 76 return ret;
75} 77}
76 78
77static void __exit fini(void) 79static void __exit fini(void)
78{ 80{
79 xt_unregister_match(AF_INET, &mac_match); 81 xt_unregister_match(&mac_match);
80 xt_unregister_match(AF_INET6, &mac6_match); 82 xt_unregister_match(&mac6_match);
81} 83}
82 84
83module_init(init); 85module_init(init);
diff --git a/net/netfilter/xt_mark.c b/net/netfilter/xt_mark.c
index c1a8f0f587f0..ce0badfeef9a 100644
--- a/net/netfilter/xt_mark.c
+++ b/net/netfilter/xt_mark.c
@@ -56,6 +56,7 @@ static struct xt_match mark_match = {
56 .match = match, 56 .match = match,
57 .matchsize = sizeof(struct xt_mark_info), 57 .matchsize = sizeof(struct xt_mark_info),
58 .checkentry = checkentry, 58 .checkentry = checkentry,
59 .family = AF_INET,
59 .me = THIS_MODULE, 60 .me = THIS_MODULE,
60}; 61};
61 62
@@ -64,27 +65,28 @@ static struct xt_match mark6_match = {
64 .match = match, 65 .match = match,
65 .matchsize = sizeof(struct xt_mark_info), 66 .matchsize = sizeof(struct xt_mark_info),
66 .checkentry = checkentry, 67 .checkentry = checkentry,
68 .family = AF_INET6,
67 .me = THIS_MODULE, 69 .me = THIS_MODULE,
68}; 70};
69 71
70static int __init init(void) 72static int __init init(void)
71{ 73{
72 int ret; 74 int ret;
73 ret = xt_register_match(AF_INET, &mark_match); 75 ret = xt_register_match(&mark_match);
74 if (ret) 76 if (ret)
75 return ret; 77 return ret;
76 78
77 ret = xt_register_match(AF_INET6, &mark6_match); 79 ret = xt_register_match(&mark6_match);
78 if (ret) 80 if (ret)
79 xt_unregister_match(AF_INET, &mark_match); 81 xt_unregister_match(&mark_match);
80 82
81 return ret; 83 return ret;
82} 84}
83 85
84static void __exit fini(void) 86static void __exit fini(void)
85{ 87{
86 xt_unregister_match(AF_INET, &mark_match); 88 xt_unregister_match(&mark_match);
87 xt_unregister_match(AF_INET6, &mark6_match); 89 xt_unregister_match(&mark6_match);
88} 90}
89 91
90module_init(init); 92module_init(init);
diff --git a/net/netfilter/xt_physdev.c b/net/netfilter/xt_physdev.c
index f788e8e76254..089f4f7e8636 100644
--- a/net/netfilter/xt_physdev.c
+++ b/net/netfilter/xt_physdev.c
@@ -121,6 +121,7 @@ static struct xt_match physdev_match = {
121 .match = match, 121 .match = match,
122 .matchsize = sizeof(struct xt_physdev_info), 122 .matchsize = sizeof(struct xt_physdev_info),
123 .checkentry = checkentry, 123 .checkentry = checkentry,
124 .family = AF_INET,
124 .me = THIS_MODULE, 125 .me = THIS_MODULE,
125}; 126};
126 127
@@ -129,6 +130,7 @@ static struct xt_match physdev6_match = {
129 .match = match, 130 .match = match,
130 .matchsize = sizeof(struct xt_physdev_info), 131 .matchsize = sizeof(struct xt_physdev_info),
131 .checkentry = checkentry, 132 .checkentry = checkentry,
133 .family = AF_INET6,
132 .me = THIS_MODULE, 134 .me = THIS_MODULE,
133}; 135};
134 136
@@ -136,21 +138,21 @@ static int __init init(void)
136{ 138{
137 int ret; 139 int ret;
138 140
139 ret = xt_register_match(AF_INET, &physdev_match); 141 ret = xt_register_match(&physdev_match);
140 if (ret < 0) 142 if (ret < 0)
141 return ret; 143 return ret;
142 144
143 ret = xt_register_match(AF_INET6, &physdev6_match); 145 ret = xt_register_match(&physdev6_match);
144 if (ret < 0) 146 if (ret < 0)
145 xt_unregister_match(AF_INET, &physdev_match); 147 xt_unregister_match(&physdev_match);
146 148
147 return ret; 149 return ret;
148} 150}
149 151
150static void __exit fini(void) 152static void __exit fini(void)
151{ 153{
152 xt_unregister_match(AF_INET, &physdev_match); 154 xt_unregister_match(&physdev_match);
153 xt_unregister_match(AF_INET6, &physdev6_match); 155 xt_unregister_match(&physdev6_match);
154} 156}
155 157
156module_init(init); 158module_init(init);
diff --git a/net/netfilter/xt_pkttype.c b/net/netfilter/xt_pkttype.c
index f38638dfd139..8b8bca988ac6 100644
--- a/net/netfilter/xt_pkttype.c
+++ b/net/netfilter/xt_pkttype.c
@@ -37,6 +37,7 @@ static struct xt_match pkttype_match = {
37 .name = "pkttype", 37 .name = "pkttype",
38 .match = match, 38 .match = match,
39 .matchsize = sizeof(struct xt_pkttype_info), 39 .matchsize = sizeof(struct xt_pkttype_info),
40 .family = AF_INET,
40 .me = THIS_MODULE, 41 .me = THIS_MODULE,
41}; 42};
42 43
@@ -44,27 +45,28 @@ static struct xt_match pkttype6_match = {
44 .name = "pkttype", 45 .name = "pkttype",
45 .match = match, 46 .match = match,
46 .matchsize = sizeof(struct xt_pkttype_info), 47 .matchsize = sizeof(struct xt_pkttype_info),
48 .family = AF_INET6,
47 .me = THIS_MODULE, 49 .me = THIS_MODULE,
48}; 50};
49 51
50static int __init init(void) 52static int __init init(void)
51{ 53{
52 int ret; 54 int ret;
53 ret = xt_register_match(AF_INET, &pkttype_match); 55 ret = xt_register_match(&pkttype_match);
54 if (ret) 56 if (ret)
55 return ret; 57 return ret;
56 58
57 ret = xt_register_match(AF_INET6, &pkttype6_match); 59 ret = xt_register_match(&pkttype6_match);
58 if (ret) 60 if (ret)
59 xt_unregister_match(AF_INET, &pkttype_match); 61 xt_unregister_match(&pkttype_match);
60 62
61 return ret; 63 return ret;
62} 64}
63 65
64static void __exit fini(void) 66static void __exit fini(void)
65{ 67{
66 xt_unregister_match(AF_INET, &pkttype_match); 68 xt_unregister_match(&pkttype_match);
67 xt_unregister_match(AF_INET6, &pkttype6_match); 69 xt_unregister_match(&pkttype6_match);
68} 70}
69 71
70module_init(init); 72module_init(init);
diff --git a/net/netfilter/xt_policy.c b/net/netfilter/xt_policy.c
index 1ec22082f04d..1099cb005fcc 100644
--- a/net/netfilter/xt_policy.c
+++ b/net/netfilter/xt_policy.c
@@ -27,9 +27,9 @@ xt_addr_cmp(const union xt_policy_addr *a1, const union xt_policy_addr *m,
27{ 27{
28 switch (family) { 28 switch (family) {
29 case AF_INET: 29 case AF_INET:
30 return (a1->a4.s_addr ^ a2->a4.s_addr) & m->a4.s_addr; 30 return !((a1->a4.s_addr ^ a2->a4.s_addr) & m->a4.s_addr);
31 case AF_INET6: 31 case AF_INET6:
32 return ipv6_masked_addr_cmp(&a1->a6, &m->a6, &a2->a6); 32 return !ipv6_masked_addr_cmp(&a1->a6, &m->a6, &a2->a6);
33 } 33 }
34 return 0; 34 return 0;
35} 35}
@@ -44,7 +44,7 @@ match_xfrm_state(struct xfrm_state *x, const struct xt_policy_elem *e,
44#define MATCH(x,y) (!e->match.x || ((e->x == (y)) ^ e->invert.x)) 44#define MATCH(x,y) (!e->match.x || ((e->x == (y)) ^ e->invert.x))
45 45
46 return MATCH_ADDR(saddr, smask, (union xt_policy_addr *)&x->props.saddr) && 46 return MATCH_ADDR(saddr, smask, (union xt_policy_addr *)&x->props.saddr) &&
47 MATCH_ADDR(daddr, dmask, (union xt_policy_addr *)&x->id.daddr.a4) && 47 MATCH_ADDR(daddr, dmask, (union xt_policy_addr *)&x->id.daddr) &&
48 MATCH(proto, x->id.proto) && 48 MATCH(proto, x->id.proto) &&
49 MATCH(mode, x->props.mode) && 49 MATCH(mode, x->props.mode) &&
50 MATCH(spi, x->id.spi) && 50 MATCH(spi, x->id.spi) &&
@@ -172,6 +172,7 @@ static struct xt_match policy_match = {
172 .match = match, 172 .match = match,
173 .matchsize = sizeof(struct xt_policy_info), 173 .matchsize = sizeof(struct xt_policy_info),
174 .checkentry = checkentry, 174 .checkentry = checkentry,
175 .family = AF_INET,
175 .me = THIS_MODULE, 176 .me = THIS_MODULE,
176}; 177};
177 178
@@ -181,6 +182,7 @@ static struct xt_match policy6_match = {
181 .match = match, 182 .match = match,
182 .matchsize = sizeof(struct xt_policy_info), 183 .matchsize = sizeof(struct xt_policy_info),
183 .checkentry = checkentry, 184 .checkentry = checkentry,
185 .family = AF_INET6,
184 .me = THIS_MODULE, 186 .me = THIS_MODULE,
185}; 187};
186 188
@@ -188,19 +190,19 @@ static int __init init(void)
188{ 190{
189 int ret; 191 int ret;
190 192
191 ret = xt_register_match(AF_INET, &policy_match); 193 ret = xt_register_match(&policy_match);
192 if (ret) 194 if (ret)
193 return ret; 195 return ret;
194 ret = xt_register_match(AF_INET6, &policy6_match); 196 ret = xt_register_match(&policy6_match);
195 if (ret) 197 if (ret)
196 xt_unregister_match(AF_INET, &policy_match); 198 xt_unregister_match(&policy_match);
197 return ret; 199 return ret;
198} 200}
199 201
200static void __exit fini(void) 202static void __exit fini(void)
201{ 203{
202 xt_unregister_match(AF_INET6, &policy6_match); 204 xt_unregister_match(&policy6_match);
203 xt_unregister_match(AF_INET, &policy_match); 205 xt_unregister_match(&policy_match);
204} 206}
205 207
206module_init(init); 208module_init(init);
diff --git a/net/netfilter/xt_realm.c b/net/netfilter/xt_realm.c
index 57815a07db67..5e31a4a835bf 100644
--- a/net/netfilter/xt_realm.c
+++ b/net/netfilter/xt_realm.c
@@ -45,17 +45,18 @@ static struct xt_match realm_match = {
45 .matchsize = sizeof(struct xt_realm_info), 45 .matchsize = sizeof(struct xt_realm_info),
46 .hooks = (1 << NF_IP_POST_ROUTING) | (1 << NF_IP_FORWARD) | 46 .hooks = (1 << NF_IP_POST_ROUTING) | (1 << NF_IP_FORWARD) |
47 (1 << NF_IP_LOCAL_OUT) | (1 << NF_IP_LOCAL_IN), 47 (1 << NF_IP_LOCAL_OUT) | (1 << NF_IP_LOCAL_IN),
48 .family = AF_INET,
48 .me = THIS_MODULE 49 .me = THIS_MODULE
49}; 50};
50 51
51static int __init init(void) 52static int __init init(void)
52{ 53{
53 return xt_register_match(AF_INET, &realm_match); 54 return xt_register_match(&realm_match);
54} 55}
55 56
56static void __exit fini(void) 57static void __exit fini(void)
57{ 58{
58 xt_unregister_match(AF_INET, &realm_match); 59 xt_unregister_match(&realm_match);
59} 60}
60 61
61module_init(init); 62module_init(init);
diff --git a/net/netfilter/xt_sctp.c b/net/netfilter/xt_sctp.c
index f5d698ba03ca..c6eb24a2fe13 100644
--- a/net/netfilter/xt_sctp.c
+++ b/net/netfilter/xt_sctp.c
@@ -186,6 +186,7 @@ static struct xt_match sctp_match = {
186 .matchsize = sizeof(struct xt_sctp_info), 186 .matchsize = sizeof(struct xt_sctp_info),
187 .proto = IPPROTO_SCTP, 187 .proto = IPPROTO_SCTP,
188 .checkentry = checkentry, 188 .checkentry = checkentry,
189 .family = AF_INET,
189 .me = THIS_MODULE 190 .me = THIS_MODULE
190}; 191};
191 192
@@ -195,27 +196,28 @@ static struct xt_match sctp6_match = {
195 .matchsize = sizeof(struct xt_sctp_info), 196 .matchsize = sizeof(struct xt_sctp_info),
196 .proto = IPPROTO_SCTP, 197 .proto = IPPROTO_SCTP,
197 .checkentry = checkentry, 198 .checkentry = checkentry,
199 .family = AF_INET6,
198 .me = THIS_MODULE 200 .me = THIS_MODULE
199}; 201};
200 202
201static int __init init(void) 203static int __init init(void)
202{ 204{
203 int ret; 205 int ret;
204 ret = xt_register_match(AF_INET, &sctp_match); 206 ret = xt_register_match(&sctp_match);
205 if (ret) 207 if (ret)
206 return ret; 208 return ret;
207 209
208 ret = xt_register_match(AF_INET6, &sctp6_match); 210 ret = xt_register_match(&sctp6_match);
209 if (ret) 211 if (ret)
210 xt_unregister_match(AF_INET, &sctp_match); 212 xt_unregister_match(&sctp_match);
211 213
212 return ret; 214 return ret;
213} 215}
214 216
215static void __exit fini(void) 217static void __exit fini(void)
216{ 218{
217 xt_unregister_match(AF_INET6, &sctp6_match); 219 xt_unregister_match(&sctp6_match);
218 xt_unregister_match(AF_INET, &sctp_match); 220 xt_unregister_match(&sctp_match);
219} 221}
220 222
221module_init(init); 223module_init(init);
diff --git a/net/netfilter/xt_state.c b/net/netfilter/xt_state.c
index b8ec00cd51fc..e6c0be9d94d2 100644
--- a/net/netfilter/xt_state.c
+++ b/net/netfilter/xt_state.c
@@ -44,17 +44,48 @@ match(const struct sk_buff *skb,
44 return (sinfo->statemask & statebit); 44 return (sinfo->statemask & statebit);
45} 45}
46 46
47static int check(const char *tablename,
48 const void *inf,
49 const struct xt_match *match,
50 void *matchinfo,
51 unsigned int matchsize,
52 unsigned int hook_mask)
53{
54#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
55 if (nf_ct_l3proto_try_module_get(match->family) < 0) {
56 printk(KERN_WARNING "can't load nf_conntrack support for "
57 "proto=%d\n", match->family);
58 return 0;
59 }
60#endif
61 return 1;
62}
63
64static void
65destroy(const struct xt_match *match, void *matchinfo, unsigned int matchsize)
66{
67#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
68 nf_ct_l3proto_module_put(match->family);
69#endif
70}
71
47static struct xt_match state_match = { 72static struct xt_match state_match = {
48 .name = "state", 73 .name = "state",
49 .match = match, 74 .match = match,
75 .checkentry = check,
76 .destroy = destroy,
50 .matchsize = sizeof(struct xt_state_info), 77 .matchsize = sizeof(struct xt_state_info),
78 .family = AF_INET,
51 .me = THIS_MODULE, 79 .me = THIS_MODULE,
52}; 80};
53 81
54static struct xt_match state6_match = { 82static struct xt_match state6_match = {
55 .name = "state", 83 .name = "state",
56 .match = match, 84 .match = match,
85 .checkentry = check,
86 .destroy = destroy,
57 .matchsize = sizeof(struct xt_state_info), 87 .matchsize = sizeof(struct xt_state_info),
88 .family = AF_INET6,
58 .me = THIS_MODULE, 89 .me = THIS_MODULE,
59}; 90};
60 91
@@ -64,21 +95,21 @@ static int __init init(void)
64 95
65 need_conntrack(); 96 need_conntrack();
66 97
67 ret = xt_register_match(AF_INET, &state_match); 98 ret = xt_register_match(&state_match);
68 if (ret < 0) 99 if (ret < 0)
69 return ret; 100 return ret;
70 101
71 ret = xt_register_match(AF_INET6, &state6_match); 102 ret = xt_register_match(&state6_match);
72 if (ret < 0) 103 if (ret < 0)
73 xt_unregister_match(AF_INET,&state_match); 104 xt_unregister_match(&state_match);
74 105
75 return ret; 106 return ret;
76} 107}
77 108
78static void __exit fini(void) 109static void __exit fini(void)
79{ 110{
80 xt_unregister_match(AF_INET, &state_match); 111 xt_unregister_match(&state_match);
81 xt_unregister_match(AF_INET6, &state6_match); 112 xt_unregister_match(&state6_match);
82} 113}
83 114
84module_init(init); 115module_init(init);
diff --git a/net/netfilter/xt_string.c b/net/netfilter/xt_string.c
index fccbad6a7f40..703d80fccacf 100644
--- a/net/netfilter/xt_string.c
+++ b/net/netfilter/xt_string.c
@@ -78,6 +78,7 @@ static struct xt_match string_match = {
78 .matchsize = sizeof(struct xt_string_info), 78 .matchsize = sizeof(struct xt_string_info),
79 .checkentry = checkentry, 79 .checkentry = checkentry,
80 .destroy = destroy, 80 .destroy = destroy,
81 .family = AF_INET,
81 .me = THIS_MODULE 82 .me = THIS_MODULE
82}; 83};
83static struct xt_match string6_match = { 84static struct xt_match string6_match = {
@@ -86,6 +87,7 @@ static struct xt_match string6_match = {
86 .matchsize = sizeof(struct xt_string_info), 87 .matchsize = sizeof(struct xt_string_info),
87 .checkentry = checkentry, 88 .checkentry = checkentry,
88 .destroy = destroy, 89 .destroy = destroy,
90 .family = AF_INET6,
89 .me = THIS_MODULE 91 .me = THIS_MODULE
90}; 92};
91 93
@@ -93,20 +95,20 @@ static int __init init(void)
93{ 95{
94 int ret; 96 int ret;
95 97
96 ret = xt_register_match(AF_INET, &string_match); 98 ret = xt_register_match(&string_match);
97 if (ret) 99 if (ret)
98 return ret; 100 return ret;
99 ret = xt_register_match(AF_INET6, &string6_match); 101 ret = xt_register_match(&string6_match);
100 if (ret) 102 if (ret)
101 xt_unregister_match(AF_INET, &string_match); 103 xt_unregister_match(&string_match);
102 104
103 return ret; 105 return ret;
104} 106}
105 107
106static void __exit fini(void) 108static void __exit fini(void)
107{ 109{
108 xt_unregister_match(AF_INET, &string_match); 110 xt_unregister_match(&string_match);
109 xt_unregister_match(AF_INET6, &string6_match); 111 xt_unregister_match(&string6_match);
110} 112}
111 113
112module_init(init); 114module_init(init);
diff --git a/net/netfilter/xt_tcpmss.c b/net/netfilter/xt_tcpmss.c
index 4925fc98f4ae..70a8858ae3f1 100644
--- a/net/netfilter/xt_tcpmss.c
+++ b/net/netfilter/xt_tcpmss.c
@@ -98,6 +98,7 @@ static struct xt_match tcpmss_match = {
98 .match = match, 98 .match = match,
99 .matchsize = sizeof(struct xt_tcpmss_match_info), 99 .matchsize = sizeof(struct xt_tcpmss_match_info),
100 .proto = IPPROTO_TCP, 100 .proto = IPPROTO_TCP,
101 .family = AF_INET,
101 .me = THIS_MODULE, 102 .me = THIS_MODULE,
102}; 103};
103 104
@@ -106,6 +107,7 @@ static struct xt_match tcpmss6_match = {
106 .match = match, 107 .match = match,
107 .matchsize = sizeof(struct xt_tcpmss_match_info), 108 .matchsize = sizeof(struct xt_tcpmss_match_info),
108 .proto = IPPROTO_TCP, 109 .proto = IPPROTO_TCP,
110 .family = AF_INET6,
109 .me = THIS_MODULE, 111 .me = THIS_MODULE,
110}; 112};
111 113
@@ -113,21 +115,21 @@ static struct xt_match tcpmss6_match = {
113static int __init init(void) 115static int __init init(void)
114{ 116{
115 int ret; 117 int ret;
116 ret = xt_register_match(AF_INET, &tcpmss_match); 118 ret = xt_register_match(&tcpmss_match);
117 if (ret) 119 if (ret)
118 return ret; 120 return ret;
119 121
120 ret = xt_register_match(AF_INET6, &tcpmss6_match); 122 ret = xt_register_match(&tcpmss6_match);
121 if (ret) 123 if (ret)
122 xt_unregister_match(AF_INET, &tcpmss_match); 124 xt_unregister_match(&tcpmss_match);
123 125
124 return ret; 126 return ret;
125} 127}
126 128
127static void __exit fini(void) 129static void __exit fini(void)
128{ 130{
129 xt_unregister_match(AF_INET6, &tcpmss6_match); 131 xt_unregister_match(&tcpmss6_match);
130 xt_unregister_match(AF_INET, &tcpmss_match); 132 xt_unregister_match(&tcpmss_match);
131} 133}
132 134
133module_init(init); 135module_init(init);
diff --git a/net/netfilter/xt_tcpudp.c b/net/netfilter/xt_tcpudp.c
index b5cd0dd4e41f..14a990eb666a 100644
--- a/net/netfilter/xt_tcpudp.c
+++ b/net/netfilter/xt_tcpudp.c
@@ -204,6 +204,7 @@ static struct xt_match tcp_matchstruct = {
204 .match = tcp_match, 204 .match = tcp_match,
205 .matchsize = sizeof(struct xt_tcp), 205 .matchsize = sizeof(struct xt_tcp),
206 .proto = IPPROTO_TCP, 206 .proto = IPPROTO_TCP,
207 .family = AF_INET,
207 .checkentry = tcp_checkentry, 208 .checkentry = tcp_checkentry,
208 .me = THIS_MODULE, 209 .me = THIS_MODULE,
209}; 210};
@@ -213,6 +214,7 @@ static struct xt_match tcp6_matchstruct = {
213 .match = tcp_match, 214 .match = tcp_match,
214 .matchsize = sizeof(struct xt_tcp), 215 .matchsize = sizeof(struct xt_tcp),
215 .proto = IPPROTO_TCP, 216 .proto = IPPROTO_TCP,
217 .family = AF_INET6,
216 .checkentry = tcp_checkentry, 218 .checkentry = tcp_checkentry,
217 .me = THIS_MODULE, 219 .me = THIS_MODULE,
218}; 220};
@@ -222,6 +224,7 @@ static struct xt_match udp_matchstruct = {
222 .match = udp_match, 224 .match = udp_match,
223 .matchsize = sizeof(struct xt_udp), 225 .matchsize = sizeof(struct xt_udp),
224 .proto = IPPROTO_UDP, 226 .proto = IPPROTO_UDP,
227 .family = AF_INET,
225 .checkentry = udp_checkentry, 228 .checkentry = udp_checkentry,
226 .me = THIS_MODULE, 229 .me = THIS_MODULE,
227}; 230};
@@ -230,6 +233,7 @@ static struct xt_match udp6_matchstruct = {
230 .match = udp_match, 233 .match = udp_match,
231 .matchsize = sizeof(struct xt_udp), 234 .matchsize = sizeof(struct xt_udp),
232 .proto = IPPROTO_UDP, 235 .proto = IPPROTO_UDP,
236 .family = AF_INET6,
233 .checkentry = udp_checkentry, 237 .checkentry = udp_checkentry,
234 .me = THIS_MODULE, 238 .me = THIS_MODULE,
235}; 239};
@@ -237,39 +241,39 @@ static struct xt_match udp6_matchstruct = {
237static int __init init(void) 241static int __init init(void)
238{ 242{
239 int ret; 243 int ret;
240 ret = xt_register_match(AF_INET, &tcp_matchstruct); 244 ret = xt_register_match(&tcp_matchstruct);
241 if (ret) 245 if (ret)
242 return ret; 246 return ret;
243 247
244 ret = xt_register_match(AF_INET6, &tcp6_matchstruct); 248 ret = xt_register_match(&tcp6_matchstruct);
245 if (ret) 249 if (ret)
246 goto out_unreg_tcp; 250 goto out_unreg_tcp;
247 251
248 ret = xt_register_match(AF_INET, &udp_matchstruct); 252 ret = xt_register_match(&udp_matchstruct);
249 if (ret) 253 if (ret)
250 goto out_unreg_tcp6; 254 goto out_unreg_tcp6;
251 255
252 ret = xt_register_match(AF_INET6, &udp6_matchstruct); 256 ret = xt_register_match(&udp6_matchstruct);
253 if (ret) 257 if (ret)
254 goto out_unreg_udp; 258 goto out_unreg_udp;
255 259
256 return ret; 260 return ret;
257 261
258out_unreg_udp: 262out_unreg_udp:
259 xt_unregister_match(AF_INET, &tcp_matchstruct); 263 xt_unregister_match(&tcp_matchstruct);
260out_unreg_tcp6: 264out_unreg_tcp6:
261 xt_unregister_match(AF_INET6, &tcp6_matchstruct); 265 xt_unregister_match(&tcp6_matchstruct);
262out_unreg_tcp: 266out_unreg_tcp:
263 xt_unregister_match(AF_INET, &tcp_matchstruct); 267 xt_unregister_match(&tcp_matchstruct);
264 return ret; 268 return ret;
265} 269}
266 270
267static void __exit fini(void) 271static void __exit fini(void)
268{ 272{
269 xt_unregister_match(AF_INET6, &udp6_matchstruct); 273 xt_unregister_match(&udp6_matchstruct);
270 xt_unregister_match(AF_INET, &udp_matchstruct); 274 xt_unregister_match(&udp_matchstruct);
271 xt_unregister_match(AF_INET6, &tcp6_matchstruct); 275 xt_unregister_match(&tcp6_matchstruct);
272 xt_unregister_match(AF_INET, &tcp_matchstruct); 276 xt_unregister_match(&tcp_matchstruct);
273} 277}
274 278
275module_init(init); 279module_init(init);