aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig38
-rw-r--r--arch/arm/Makefile8
-rw-r--r--arch/arm/boot/compressed/head-shark.S42
-rw-r--r--arch/arm/boot/install.sh4
-rw-r--r--arch/arm/common/dmabounce.c18
-rw-r--r--arch/arm/common/sa1111.c13
-rw-r--r--arch/arm/configs/bast_defconfig1
-rw-r--r--arch/arm/configs/enp2611_defconfig49
-rw-r--r--arch/arm/configs/ixdp2400_defconfig49
-rw-r--r--arch/arm/configs/ixdp2401_defconfig49
-rw-r--r--arch/arm/configs/ixdp2800_defconfig49
-rw-r--r--arch/arm/configs/ixdp2801_defconfig49
-rw-r--r--arch/arm/configs/omap_h2_1610_defconfig117
-rw-r--r--arch/arm/configs/omnimeter_defconfig803
-rw-r--r--arch/arm/configs/s3c2410_defconfig28
-rw-r--r--arch/arm/configs/shark_defconfig85
-rw-r--r--arch/arm/kernel/armksyms.c9
-rw-r--r--arch/arm/kernel/bios32.c17
-rw-r--r--arch/arm/kernel/head.S20
-rw-r--r--arch/arm/kernel/irq.c14
-rw-r--r--arch/arm/kernel/process.c9
-rw-r--r--arch/arm/kernel/setup.c32
-rw-r--r--arch/arm/kernel/signal.c31
-rw-r--r--arch/arm/kernel/signal.h12
-rw-r--r--arch/arm/kernel/smp.c137
-rw-r--r--arch/arm/kernel/time.c107
-rw-r--r--arch/arm/kernel/traps.c33
-rw-r--r--arch/arm/lib/Makefile2
-rw-r--r--arch/arm/lib/bitops.h31
-rw-r--r--arch/arm/lib/io-shark.c70
-rw-r--r--arch/arm/lib/longlong.h183
-rw-r--r--arch/arm/lib/udivdi3.c222
-rw-r--r--arch/arm/mach-aaec2000/Makefile.boot1
-rw-r--r--arch/arm/mach-aaec2000/aaed2000.c10
-rw-r--r--arch/arm/mach-aaec2000/core.c4
-rw-r--r--arch/arm/mach-clps711x/Kconfig2
-rw-r--r--arch/arm/mach-clps711x/autcpu12.c12
-rw-r--r--arch/arm/mach-clps711x/cdb89712.c12
-rw-r--r--arch/arm/mach-clps711x/ceiva.c12
-rw-r--r--arch/arm/mach-clps711x/clep7312.c14
-rw-r--r--arch/arm/mach-clps711x/edb7211-arch.c14
-rw-r--r--arch/arm/mach-clps711x/fortunet.c14
-rw-r--r--arch/arm/mach-clps711x/p720t.c14
-rw-r--r--arch/arm/mach-clps711x/time.c4
-rw-r--r--arch/arm/mach-clps7500/core.c20
-rw-r--r--arch/arm/mach-ebsa110/core.c22
-rw-r--r--arch/arm/mach-epxa10db/arch.c10
-rw-r--r--arch/arm/mach-epxa10db/time.c4
-rw-r--r--arch/arm/mach-footbridge/cats-hw.c16
-rw-r--r--arch/arm/mach-footbridge/co285.c12
-rw-r--r--arch/arm/mach-footbridge/dc21285-timer.c2
-rw-r--r--arch/arm/mach-footbridge/ebsa285.c15
-rw-r--r--arch/arm/mach-footbridge/isa-timer.c2
-rw-r--r--arch/arm/mach-footbridge/netwinder-hw.c21
-rw-r--r--arch/arm/mach-footbridge/personal.c12
-rw-r--r--arch/arm/mach-h720x/cpu-h7201.c4
-rw-r--r--arch/arm/mach-h720x/cpu-h7202.c4
-rw-r--r--arch/arm/mach-h720x/h7201-eval.c14
-rw-r--r--arch/arm/mach-h720x/h7202-eval.c16
-rw-r--r--arch/arm/mach-imx/mx1ads.c14
-rw-r--r--arch/arm/mach-imx/time.c4
-rw-r--r--arch/arm/mach-integrator/core.c45
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c14
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c14
-rw-r--r--arch/arm/mach-integrator/platsmp.c18
-rw-r--r--arch/arm/mach-iop3xx/iop321-setup.c28
-rw-r--r--arch/arm/mach-iop3xx/iop321-time.c2
-rw-r--r--arch/arm/mach-iop3xx/iop331-setup.c30
-rw-r--r--arch/arm/mach-iop3xx/iop331-time.c2
-rw-r--r--arch/arm/mach-ixp2000/Kconfig8
-rw-r--r--arch/arm/mach-ixp2000/core.c149
-rw-r--r--arch/arm/mach-ixp2000/enp2611.c32
-rw-r--r--arch/arm/mach-ixp2000/ixdp2400.c14
-rw-r--r--arch/arm/mach-ixp2000/ixdp2800.c20
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x00.c4
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x01.c29
-rw-r--r--arch/arm/mach-ixp2000/pci.c13
-rw-r--r--arch/arm/mach-ixp4xx/common-pci.c4
-rw-r--r--arch/arm/mach-ixp4xx/common.c12
-rw-r--r--arch/arm/mach-ixp4xx/coyote-setup.c57
-rw-r--r--arch/arm/mach-ixp4xx/gtwx5715-setup.c19
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-setup.c67
-rw-r--r--arch/arm/mach-l7200/core.c10
-rw-r--r--arch/arm/mach-lh7a40x/arch-kev7a400.c12
-rw-r--r--arch/arm/mach-lh7a40x/arch-lpd7a40x.c28
-rw-r--r--arch/arm/mach-lh7a40x/time.c4
-rw-r--r--arch/arm/mach-omap/Kconfig221
-rw-r--r--arch/arm/mach-omap/Makefile40
-rw-r--r--arch/arm/mach-omap/common.c549
-rw-r--r--arch/arm/mach-omap/common.h36
-rw-r--r--arch/arm/mach-omap1/Kconfig144
-rw-r--r--arch/arm/mach-omap1/Makefile30
-rw-r--r--arch/arm/mach-omap1/Makefile.boot (renamed from arch/arm/mach-omap/Makefile.boot)1
-rw-r--r--arch/arm/mach-omap1/board-generic.c (renamed from arch/arm/mach-omap/board-generic.c)21
-rw-r--r--arch/arm/mach-omap1/board-h2.c (renamed from arch/arm/mach-omap/board-h2.c)21
-rw-r--r--arch/arm/mach-omap1/board-h3.c (renamed from arch/arm/mach-omap/board-h3.c)21
-rw-r--r--arch/arm/mach-omap1/board-innovator.c (renamed from arch/arm/mach-omap/board-innovator.c)21
-rw-r--r--arch/arm/mach-omap1/board-netstar.c (renamed from arch/arm/mach-omap/board-netstar.c)21
-rw-r--r--arch/arm/mach-omap1/board-osk.c (renamed from arch/arm/mach-omap/board-osk.c)21
-rw-r--r--arch/arm/mach-omap1/board-perseus2.c (renamed from arch/arm/mach-omap/board-perseus2.c)21
-rw-r--r--arch/arm/mach-omap1/board-voiceblue.c (renamed from arch/arm/mach-omap/board-voiceblue.c)23
-rw-r--r--arch/arm/mach-omap1/fpga.c (renamed from arch/arm/mach-omap/fpga.c)0
-rw-r--r--arch/arm/mach-omap1/id.c188
-rw-r--r--arch/arm/mach-omap1/io.c115
-rw-r--r--arch/arm/mach-omap1/irq.c (renamed from arch/arm/mach-omap/irq.c)17
-rw-r--r--arch/arm/mach-omap1/leds-h2p2-debug.c (renamed from arch/arm/mach-omap/leds-h2p2-debug.c)1
-rw-r--r--arch/arm/mach-omap1/leds-innovator.c (renamed from arch/arm/mach-omap/leds-innovator.c)0
-rw-r--r--arch/arm/mach-omap1/leds-osk.c (renamed from arch/arm/mach-omap/leds-osk.c)4
-rw-r--r--arch/arm/mach-omap1/leds.c (renamed from arch/arm/mach-omap/leds.c)0
-rw-r--r--arch/arm/mach-omap1/leds.h (renamed from arch/arm/mach-omap/leds.h)0
-rw-r--r--arch/arm/mach-omap1/serial.c200
-rw-r--r--arch/arm/mach-omap1/time.c (renamed from arch/arm/mach-omap/time.c)86
-rw-r--r--arch/arm/mach-pxa/Makefile4
-rw-r--r--arch/arm/mach-pxa/corgi.c42
-rw-r--r--arch/arm/mach-pxa/idp.c12
-rw-r--r--arch/arm/mach-pxa/lubbock.c12
-rw-r--r--arch/arm/mach-pxa/mainstone.c12
-rw-r--r--arch/arm/mach-pxa/poodle.c14
-rw-r--r--arch/arm/mach-pxa/pxa27x.c9
-rw-r--r--arch/arm/mach-pxa/standby.S32
-rw-r--r--arch/arm/mach-pxa/time.c4
-rw-r--r--arch/arm/mach-rpc/riscpc.c23
-rw-r--r--arch/arm/mach-s3c2410/Kconfig5
-rw-r--r--arch/arm/mach-s3c2410/Makefile3
-rw-r--r--arch/arm/mach-s3c2410/clock.c57
-rw-r--r--arch/arm/mach-s3c2410/devs.c4
-rw-r--r--arch/arm/mach-s3c2410/dma.c2
-rw-r--r--arch/arm/mach-s3c2410/irq.c267
-rw-r--r--arch/arm/mach-s3c2410/irq.h99
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c155
-rw-r--r--arch/arm/mach-s3c2410/mach-h1940.c12
-rw-r--r--arch/arm/mach-s3c2410/mach-n30.c9
-rw-r--r--arch/arm/mach-s3c2410/mach-nexcoder.c8
-rw-r--r--arch/arm/mach-s3c2410/mach-otom.c8
-rw-r--r--arch/arm/mach-s3c2410/mach-rx3715.c14
-rw-r--r--arch/arm/mach-s3c2410/mach-smdk2410.c12
-rw-r--r--arch/arm/mach-s3c2410/mach-smdk2440.c8
-rw-r--r--arch/arm/mach-s3c2410/mach-vr1000.c93
-rw-r--r--arch/arm/mach-s3c2410/pm-simtec.c65
-rw-r--r--arch/arm/mach-s3c2410/s3c2440-clock.c116
-rw-r--r--arch/arm/mach-s3c2410/s3c2440-irq.c207
-rw-r--r--arch/arm/mach-s3c2410/time.c4
-rw-r--r--arch/arm/mach-sa1100/assabet.c12
-rw-r--r--arch/arm/mach-sa1100/badge4.c10
-rw-r--r--arch/arm/mach-sa1100/cerf.c10
-rw-r--r--arch/arm/mach-sa1100/collie.c8
-rw-r--r--arch/arm/mach-sa1100/cpu-sa1110.c3
-rw-r--r--arch/arm/mach-sa1100/h3600.c32
-rw-r--r--arch/arm/mach-sa1100/hackkit.c10
-rw-r--r--arch/arm/mach-sa1100/jornada720.c11
-rw-r--r--arch/arm/mach-sa1100/lart.c10
-rw-r--r--arch/arm/mach-sa1100/pleb.c8
-rw-r--r--arch/arm/mach-sa1100/shannon.c10
-rw-r--r--arch/arm/mach-sa1100/simpad.c12
-rw-r--r--arch/arm/mach-sa1100/time.c4
-rw-r--r--arch/arm/mach-shark/core.c20
-rw-r--r--arch/arm/mach-versatile/core.c65
-rw-r--r--arch/arm/mach-versatile/versatile_ab.c14
-rw-r--r--arch/arm/mach-versatile/versatile_pb.c14
-rw-r--r--arch/arm/mm/Kconfig2
-rw-r--r--arch/arm/mm/blockops.c3
-rw-r--r--arch/arm/mm/fault.c81
-rw-r--r--arch/arm/mm/init.c92
-rw-r--r--arch/arm/mm/mm-armv.c96
-rw-r--r--arch/arm/mm/proc-arm1020.S4
-rw-r--r--arch/arm/mm/proc-arm1020e.S4
-rw-r--r--arch/arm/mm/proc-v6.S8
-rw-r--r--arch/arm/mm/proc-xscale.S136
-rw-r--r--arch/arm/nwfpe/double_cpdo.c24
-rw-r--r--arch/arm/nwfpe/extended_cpdo.c24
-rw-r--r--arch/arm/nwfpe/fpa11.c30
-rw-r--r--arch/arm/nwfpe/fpa11.h15
-rw-r--r--arch/arm/nwfpe/fpa11_cpdo.c28
-rw-r--r--arch/arm/nwfpe/fpa11_cpdt.c22
-rw-r--r--arch/arm/nwfpe/fpa11_cprt.c28
-rw-r--r--arch/arm/nwfpe/fpmodule.c16
-rw-r--r--arch/arm/nwfpe/fpmodule.inl14
-rw-r--r--arch/arm/nwfpe/single_cpdo.c24
-rw-r--r--arch/arm/nwfpe/softfloat-macros22
-rw-r--r--arch/arm/nwfpe/softfloat.c346
-rw-r--r--arch/arm/nwfpe/softfloat.h68
-rw-r--r--arch/arm/oprofile/Makefile2
-rw-r--r--arch/arm/oprofile/backtrace.c144
-rw-r--r--arch/arm/oprofile/init.c2
-rw-r--r--arch/arm/oprofile/op_arm_model.h2
-rw-r--r--arch/arm/plat-omap/Kconfig112
-rw-r--r--arch/arm/plat-omap/Makefile17
-rw-r--r--arch/arm/plat-omap/clock.c (renamed from arch/arm/mach-omap/clock.c)371
-rw-r--r--arch/arm/plat-omap/clock.h (renamed from arch/arm/mach-omap/clock.h)12
-rw-r--r--arch/arm/plat-omap/common.c135
-rw-r--r--arch/arm/plat-omap/cpu-omap.c128
-rw-r--r--arch/arm/plat-omap/dma.c (renamed from arch/arm/mach-omap/dma.c)46
-rw-r--r--arch/arm/plat-omap/gpio.c (renamed from arch/arm/mach-omap/gpio.c)2
-rw-r--r--arch/arm/plat-omap/mcbsp.c (renamed from arch/arm/mach-omap/mcbsp.c)99
-rw-r--r--arch/arm/plat-omap/mux.c (renamed from arch/arm/mach-omap/mux.c)19
-rw-r--r--arch/arm/plat-omap/ocpi.c (renamed from arch/arm/mach-omap/ocpi.c)3
-rw-r--r--arch/arm/plat-omap/pm.c (renamed from arch/arm/mach-omap/pm.c)18
-rw-r--r--arch/arm/plat-omap/sleep.S (renamed from arch/arm/mach-omap/sleep.S)2
-rw-r--r--arch/arm/plat-omap/usb.c (renamed from arch/arm/mach-omap/usb.c)13
-rw-r--r--arch/arm/tools/mach-types69
-rw-r--r--arch/arm/vfp/vfp.h15
-rw-r--r--arch/arm/vfp/vfpdouble.c5
-rw-r--r--arch/arm/vfp/vfpmodule.c2
-rw-r--r--arch/arm/vfp/vfpsingle.c14
204 files changed, 4809 insertions, 4148 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index ee8a9ad7bbd9..7bc4a583f4e1 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -157,7 +157,7 @@ config ARCH_RPC
157config ARCH_SA1100 157config ARCH_SA1100
158 bool "SA1100-based" 158 bool "SA1100-based"
159 select ISA 159 select ISA
160 select DISCONTIGMEM 160 select ARCH_DISCONTIGMEM_ENABLE
161 161
162config ARCH_S3C2410 162config ARCH_S3C2410
163 bool "Samsung S3C2410" 163 bool "Samsung S3C2410"
@@ -223,7 +223,9 @@ source "arch/arm/mach-pxa/Kconfig"
223 223
224source "arch/arm/mach-sa1100/Kconfig" 224source "arch/arm/mach-sa1100/Kconfig"
225 225
226source "arch/arm/mach-omap/Kconfig" 226source "arch/arm/plat-omap/Kconfig"
227
228source "arch/arm/mach-omap1/Kconfig"
227 229
228source "arch/arm/mach-s3c2410/Kconfig" 230source "arch/arm/mach-s3c2410/Kconfig"
229 231
@@ -346,7 +348,27 @@ config PREEMPT
346 Say Y here if you are building a kernel for a desktop, embedded 348 Say Y here if you are building a kernel for a desktop, embedded
347 or real-time system. Say N if you are unsure. 349 or real-time system. Say N if you are unsure.
348 350
349config DISCONTIGMEM 351config NO_IDLE_HZ
352 bool "Dynamic tick timer"
353 help
354 Select this option if you want to disable continuous timer ticks
355 and have them programmed to occur as required. This option saves
356 power as the system can remain in idle state for longer.
357
358 By default dynamic tick is disabled during the boot, and can be
359 manually enabled with:
360
361 echo 1 > /sys/devices/system/timer/timer0/dyn_tick
362
363 Alternatively, if you want dynamic tick automatically enabled
364 during boot, pass "dyntick=enable" via the kernel command string.
365
366 Please note that dynamic tick may affect the accuracy of
367 timekeeping on some platforms depending on the implementation.
368 Currently at least OMAP platform is known to have accurate
369 timekeeping with dynamic tick.
370
371config ARCH_DISCONTIGMEM_ENABLE
350 bool 372 bool
351 default (ARCH_LH7A40X && !LH7A40X_CONTIGMEM) 373 default (ARCH_LH7A40X && !LH7A40X_CONTIGMEM)
352 help 374 help
@@ -355,6 +377,8 @@ config DISCONTIGMEM
355 or have huge holes in the physical address space for other reasons. 377 or have huge holes in the physical address space for other reasons.
356 See <file:Documentation/vm/numa> for more. 378 See <file:Documentation/vm/numa> for more.
357 379
380source "mm/Kconfig"
381
358config LEDS 382config LEDS
359 bool "Timer and CPU usage LEDs" 383 bool "Timer and CPU usage LEDs"
360 depends on ARCH_CDB89712 || ARCH_CO285 || ARCH_EBSA110 || \ 384 depends on ARCH_CDB89712 || ARCH_CO285 || ARCH_EBSA110 || \
@@ -492,7 +516,7 @@ config XIP_PHYS_ADDR
492 516
493endmenu 517endmenu
494 518
495if (ARCH_SA1100 || ARCH_INTEGRATOR) 519if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP1)
496 520
497menu "CPU Frequency scaling" 521menu "CPU Frequency scaling"
498 522
@@ -676,6 +700,8 @@ config APM
676 700
677endmenu 701endmenu
678 702
703source "net/Kconfig"
704
679menu "Device Drivers" 705menu "Device Drivers"
680 706
681source "drivers/base/Kconfig" 707source "drivers/base/Kconfig"
@@ -708,7 +734,7 @@ source "drivers/ieee1394/Kconfig"
708 734
709source "drivers/message/i2o/Kconfig" 735source "drivers/message/i2o/Kconfig"
710 736
711source "net/Kconfig" 737source "drivers/net/Kconfig"
712 738
713source "drivers/isdn/Kconfig" 739source "drivers/isdn/Kconfig"
714 740
@@ -720,6 +746,8 @@ source "drivers/char/Kconfig"
720 746
721source "drivers/i2c/Kconfig" 747source "drivers/i2c/Kconfig"
722 748
749source "drivers/hwmon/Kconfig"
750
723#source "drivers/l3/Kconfig" 751#source "drivers/l3/Kconfig"
724 752
725source "drivers/misc/Kconfig" 753source "drivers/misc/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 8330495e2448..67f1453ade05 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -56,7 +56,7 @@ tune-$(CONFIG_CPU_XSCALE) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110)
56tune-$(CONFIG_CPU_V6) :=-mtune=strongarm 56tune-$(CONFIG_CPU_V6) :=-mtune=strongarm
57 57
58# Need -Uarm for gcc < 3.x 58# Need -Uarm for gcc < 3.x
59CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) 59CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,)
60CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 60CFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
61AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float 61AFLAGS +=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float
62 62
@@ -91,7 +91,8 @@ textaddr-$(CONFIG_ARCH_FORTUNET) := 0xc0008000
91 machine-$(CONFIG_ARCH_IOP3XX) := iop3xx 91 machine-$(CONFIG_ARCH_IOP3XX) := iop3xx
92 machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx 92 machine-$(CONFIG_ARCH_IXP4XX) := ixp4xx
93 machine-$(CONFIG_ARCH_IXP2000) := ixp2000 93 machine-$(CONFIG_ARCH_IXP2000) := ixp2000
94 machine-$(CONFIG_ARCH_OMAP) := omap 94 machine-$(CONFIG_ARCH_OMAP1) := omap1
95 incdir-$(CONFIG_ARCH_OMAP) := omap
95 machine-$(CONFIG_ARCH_S3C2410) := s3c2410 96 machine-$(CONFIG_ARCH_S3C2410) := s3c2410
96 machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x 97 machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x
97 machine-$(CONFIG_ARCH_VERSATILE) := versatile 98 machine-$(CONFIG_ARCH_VERSATILE) := versatile
@@ -142,6 +143,9 @@ core-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/
142core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ) 143core-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ)
143core-$(CONFIG_VFP) += arch/arm/vfp/ 144core-$(CONFIG_VFP) += arch/arm/vfp/
144 145
146# If we have a common platform directory, then include it in the build.
147core-$(CONFIG_ARCH_OMAP) += arch/arm/plat-omap/
148
145drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ 149drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/
146drivers-$(CONFIG_ARCH_CLPS7500) += drivers/acorn/char/ 150drivers-$(CONFIG_ARCH_CLPS7500) += drivers/acorn/char/
147drivers-$(CONFIG_ARCH_L7200) += drivers/acorn/char/ 151drivers-$(CONFIG_ARCH_L7200) += drivers/acorn/char/
diff --git a/arch/arm/boot/compressed/head-shark.S b/arch/arm/boot/compressed/head-shark.S
index 848f60e5429b..089c560e07f1 100644
--- a/arch/arm/boot/compressed/head-shark.S
+++ b/arch/arm/boot/compressed/head-shark.S
@@ -63,8 +63,8 @@ __beginning: mov r4, r0 @ save the entry to the firmware
63 63
64 mov pc, r2 64 mov pc, r2
65 65
66__copy_target: .long 0x08508000 66__copy_target: .long 0x08507FFC
67__copy_end: .long 0x08608000 67__copy_end: .long 0x08607FFC
68 68
69 .word _start 69 .word _start
70 .word __bss_start 70 .word __bss_start
@@ -73,9 +73,10 @@ __copy_end: .long 0x08608000
73__temp_stack: .space 128 73__temp_stack: .space 128
74 74
75__mmu_off: 75__mmu_off:
76 adr r0, __ofw_data 76 adr r0, __ofw_data @ read the 1. entry of the memory map
77 ldr r0, [r0, #4] 77 ldr r0, [r0, #4]
78 orr r0, r0, #0x00600000 78 orr r0, r0, #0x00600000
79 sub r0, r0, #4
79 80
80 ldr r1, __copy_end 81 ldr r1, __copy_end
81 ldr r3, __copy_target 82 ldr r3, __copy_target
@@ -89,20 +90,43 @@ __mmu_off:
89 * from 0x08500000 to 0x08508000 if we have only 8MB 90 * from 0x08500000 to 0x08508000 if we have only 8MB
90 */ 91 */
91 92
93/* As we get more 2.6-kernels it gets more and more
94 * uncomfortable to be bound to kernel images of 1MB only.
95 * So we add a loop here, to be able to copy some more.
96 * Alexander Schulz 2005-07-17
97 */
98
99 mov r4, #3 @ How many megabytes to copy
100
101
102__MoveCode: sub r4, r4, #1
92 103
93__Copy: ldr r2, [r0], #-4 104__Copy: ldr r2, [r0], #-4
94 str r2, [r1], #-4 105 str r2, [r1], #-4
95 teq r1, r3 106 teq r1, r3
96 bne __Copy 107 bne __Copy
108
109 /* The firmware maps us in blocks of 1 MB, the next block is
110 _below_ the last one. So our decrementing source pointer
111 ist right here, but the destination pointer must be increased
112 by 2 MB */
113 add r1, r1, #0x00200000
114 add r3, r3, #0x00100000
115
116 teq r4, #0
117 bne __MoveCode
118
119
97 /* and jump to it */ 120 /* and jump to it */
98 adr r2, __go_on 121 adr r2, __go_on @ where we want to jump
99 adr r0, __ofw_data 122 adr r0, __ofw_data @ read the 1. entry of the memory map
100 ldr r0, [r0, #4] 123 ldr r0, [r0, #4]
101 sub r2, r2, r0 124 sub r2, r2, r0 @ we are mapped add 0e50 now, sub that (-0e00)
102 sub r2, r2, #0x00500000 125 sub r2, r2, #0x00500000 @ -0050
103 ldr r0, __copy_target 126 ldr r0, __copy_target @ and add 0850 8000 instead
127 add r0, r0, #4
104 add r2, r2, r0 128 add r2, r2, r0
105 mov pc, r2 129 mov pc, r2 @ and jump there
106 130
107__go_on: 131__go_on:
108 adr sp, __temp_stack 132 adr sp, __temp_stack
diff --git a/arch/arm/boot/install.sh b/arch/arm/boot/install.sh
index 935bb27369e9..9f9bed207345 100644
--- a/arch/arm/boot/install.sh
+++ b/arch/arm/boot/install.sh
@@ -21,8 +21,8 @@
21# 21#
22 22
23# User may have a custom install script 23# User may have a custom install script
24if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi 24if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
25if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi 25if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi
26 26
27if [ "$(basename $2)" = "zImage" ]; then 27if [ "$(basename $2)" = "zImage" ]; then
28# Compressed install 28# Compressed install
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c
index 9d63a01214eb..cbf2165476b0 100644
--- a/arch/arm/common/dmabounce.c
+++ b/arch/arm/common/dmabounce.c
@@ -93,15 +93,12 @@ static void print_alloc_stats(struct dmabounce_device_info *device_info)
93static inline struct dmabounce_device_info * 93static inline struct dmabounce_device_info *
94find_dmabounce_dev(struct device *dev) 94find_dmabounce_dev(struct device *dev)
95{ 95{
96 struct list_head *entry; 96 struct dmabounce_device_info *d;
97
98 list_for_each(entry, &dmabounce_devs) {
99 struct dmabounce_device_info *d =
100 list_entry(entry, struct dmabounce_device_info, node);
101 97
98 list_for_each_entry(d, &dmabounce_devs, node)
102 if (d->dev == dev) 99 if (d->dev == dev)
103 return d; 100 return d;
104 } 101
105 return NULL; 102 return NULL;
106} 103}
107 104
@@ -172,15 +169,11 @@ alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr,
172static inline struct safe_buffer * 169static inline struct safe_buffer *
173find_safe_buffer(struct dmabounce_device_info *device_info, dma_addr_t safe_dma_addr) 170find_safe_buffer(struct dmabounce_device_info *device_info, dma_addr_t safe_dma_addr)
174{ 171{
175 struct list_head *entry; 172 struct safe_buffer *b;
176
177 list_for_each(entry, &device_info->safe_buffers) {
178 struct safe_buffer *b =
179 list_entry(entry, struct safe_buffer, node);
180 173
174 list_for_each_entry(b, &device_info->safe_buffers, node)
181 if (b->safe_dma_addr == safe_dma_addr) 175 if (b->safe_dma_addr == safe_dma_addr)
182 return b; 176 return b;
183 }
184 177
185 return NULL; 178 return NULL;
186} 179}
@@ -301,7 +294,6 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
301 __func__, buf->ptr, (void *) virt_to_dma(dev, buf->ptr), 294 __func__, buf->ptr, (void *) virt_to_dma(dev, buf->ptr),
302 buf->safe, (void *) buf->safe_dma_addr); 295 buf->safe, (void *) buf->safe_dma_addr);
303 296
304
305 DO_STATS ( device_info->bounce_count++ ); 297 DO_STATS ( device_info->bounce_count++ );
306 298
307 if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL) { 299 if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL) {
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 21fce3414ed1..38c2eb667eb9 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -721,16 +721,17 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
721 return ret; 721 return ret;
722} 722}
723 723
724static int sa1111_remove_one(struct device *dev, void *data)
725{
726 device_unregister(dev);
727 return 0;
728}
729
724static void __sa1111_remove(struct sa1111 *sachip) 730static void __sa1111_remove(struct sa1111 *sachip)
725{ 731{
726 struct list_head *l, *n;
727 void __iomem *irqbase = sachip->base + SA1111_INTC; 732 void __iomem *irqbase = sachip->base + SA1111_INTC;
728 733
729 list_for_each_safe(l, n, &sachip->dev->children) { 734 device_for_each_child(sachip->dev, NULL, sa1111_remove_one);
730 struct device *d = list_to_dev(l);
731
732 device_unregister(d);
733 }
734 735
735 /* disable all IRQs */ 736 /* disable all IRQs */
736 sa1111_writel(0, irqbase + SA1111_INTEN0); 737 sa1111_writel(0, irqbase + SA1111_INTEN0);
diff --git a/arch/arm/configs/bast_defconfig b/arch/arm/configs/bast_defconfig
index 2d985e9611cd..35e3a99bcbb6 100644
--- a/arch/arm/configs/bast_defconfig
+++ b/arch/arm/configs/bast_defconfig
@@ -561,7 +561,6 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
561# 561#
562CONFIG_SERIAL_S3C2410=y 562CONFIG_SERIAL_S3C2410=y
563CONFIG_SERIAL_S3C2410_CONSOLE=y 563CONFIG_SERIAL_S3C2410_CONSOLE=y
564CONFIG_SERIAL_BAST_SIO=y
565CONFIG_SERIAL_CORE=y 564CONFIG_SERIAL_CORE=y
566CONFIG_SERIAL_CORE_CONSOLE=y 565CONFIG_SERIAL_CORE_CONSOLE=y
567CONFIG_UNIX98_PTYS=y 566CONFIG_UNIX98_PTYS=y
diff --git a/arch/arm/configs/enp2611_defconfig b/arch/arm/configs/enp2611_defconfig
index 06fae4b62774..f67ca01b4982 100644
--- a/arch/arm/configs/enp2611_defconfig
+++ b/arch/arm/configs/enp2611_defconfig
@@ -1,14 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc1-bk2 3# Linux kernel version: 2.6.13-rc2
4# Sun Mar 27 22:08:24 2005 4# Thu Jul 7 16:41:21 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_UID16=y 8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_GENERIC_IOMAP=y
12 11
13# 12#
14# Code maturity level options 13# Code maturity level options
@@ -16,6 +15,7 @@ CONFIG_GENERIC_IOMAP=y
16CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
17CONFIG_CLEAN_COMPILE=y 16CONFIG_CLEAN_COMPILE=y
18CONFIG_BROKEN_ON_SMP=y 17CONFIG_BROKEN_ON_SMP=y
18CONFIG_INIT_ENV_ARG_LIMIT=32
19 19
20# 20#
21# General setup 21# General setup
@@ -35,6 +35,8 @@ CONFIG_EMBEDDED=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -82,6 +84,7 @@ CONFIG_ARCH_IXP2000=y
82# CONFIG_ARCH_VERSATILE is not set 84# CONFIG_ARCH_VERSATILE is not set
83# CONFIG_ARCH_IMX is not set 85# CONFIG_ARCH_IMX is not set
84# CONFIG_ARCH_H720X is not set 86# CONFIG_ARCH_H720X is not set
87# CONFIG_ARCH_AAEC2000 is not set
85CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y 88CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
86 89
87# 90#
@@ -96,6 +99,7 @@ CONFIG_ARCH_ENP2611=y
96# CONFIG_ARCH_IXDP2800 is not set 99# CONFIG_ARCH_IXDP2800 is not set
97# CONFIG_ARCH_IXDP2401 is not set 100# CONFIG_ARCH_IXDP2401 is not set
98# CONFIG_ARCH_IXDP2801 is not set 101# CONFIG_ARCH_IXDP2801 is not set
102# CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set
99 103
100# 104#
101# Processor Type 105# Processor Type
@@ -106,7 +110,6 @@ CONFIG_CPU_32v5=y
106CONFIG_CPU_ABRT_EV5T=y 110CONFIG_CPU_ABRT_EV5T=y
107CONFIG_CPU_CACHE_VIVT=y 111CONFIG_CPU_CACHE_VIVT=y
108CONFIG_CPU_TLB_V4WBI=y 112CONFIG_CPU_TLB_V4WBI=y
109CONFIG_CPU_MINICACHE=y
110 113
111# 114#
112# Processor Features 115# Processor Features
@@ -118,9 +121,11 @@ CONFIG_XSCALE_PMU=y
118# 121#
119# Bus support 122# Bus support
120# 123#
124CONFIG_ISA_DMA_API=y
121CONFIG_PCI=y 125CONFIG_PCI=y
122CONFIG_PCI_LEGACY_PROC=y 126CONFIG_PCI_LEGACY_PROC=y
123CONFIG_PCI_NAMES=y 127CONFIG_PCI_NAMES=y
128# CONFIG_PCI_DEBUG is not set
124 129
125# 130#
126# PCCARD (PCMCIA/CardBus) support 131# PCCARD (PCMCIA/CardBus) support
@@ -130,7 +135,16 @@ CONFIG_PCI_NAMES=y
130# 135#
131# Kernel Features 136# Kernel Features
132# 137#
138# CONFIG_SMP is not set
133# CONFIG_PREEMPT is not set 139# CONFIG_PREEMPT is not set
140# CONFIG_NO_IDLE_HZ is not set
141# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
142CONFIG_SELECT_MEMORY_MODEL=y
143CONFIG_FLATMEM_MANUAL=y
144# CONFIG_DISCONTIGMEM_MANUAL is not set
145# CONFIG_SPARSEMEM_MANUAL is not set
146CONFIG_FLATMEM=y
147CONFIG_FLAT_NODE_MEM_MAP=y
134CONFIG_ALIGNMENT_TRAP=y 148CONFIG_ALIGNMENT_TRAP=y
135 149
136# 150#
@@ -269,7 +283,6 @@ CONFIG_MTD_IXP2000=y
269# 283#
270# Block devices 284# Block devices
271# 285#
272# CONFIG_BLK_DEV_FD is not set
273# CONFIG_BLK_CPQ_DA is not set 286# CONFIG_BLK_CPQ_DA is not set
274# CONFIG_BLK_CPQ_CISS_DA is not set 287# CONFIG_BLK_CPQ_CISS_DA is not set
275# CONFIG_BLK_DEV_DAC960 is not set 288# CONFIG_BLK_DEV_DAC960 is not set
@@ -308,6 +321,7 @@ CONFIG_IOSCHED_CFQ=y
308# 321#
309# Fusion MPT device support 322# Fusion MPT device support
310# 323#
324# CONFIG_FUSION is not set
311 325
312# 326#
313# IEEE 1394 (FireWire) support 327# IEEE 1394 (FireWire) support
@@ -329,12 +343,12 @@ CONFIG_NET=y
329# 343#
330CONFIG_PACKET=y 344CONFIG_PACKET=y
331CONFIG_PACKET_MMAP=y 345CONFIG_PACKET_MMAP=y
332# CONFIG_NETLINK_DEV is not set
333CONFIG_UNIX=y 346CONFIG_UNIX=y
334# CONFIG_NET_KEY is not set 347# CONFIG_NET_KEY is not set
335CONFIG_INET=y 348CONFIG_INET=y
336# CONFIG_IP_MULTICAST is not set 349# CONFIG_IP_MULTICAST is not set
337# CONFIG_IP_ADVANCED_ROUTER is not set 350# CONFIG_IP_ADVANCED_ROUTER is not set
351CONFIG_IP_FIB_HASH=y
338CONFIG_IP_PNP=y 352CONFIG_IP_PNP=y
339CONFIG_IP_PNP_DHCP=y 353CONFIG_IP_PNP_DHCP=y
340CONFIG_IP_PNP_BOOTP=y 354CONFIG_IP_PNP_BOOTP=y
@@ -349,6 +363,8 @@ CONFIG_SYN_COOKIES=y
349# CONFIG_INET_TUNNEL is not set 363# CONFIG_INET_TUNNEL is not set
350# CONFIG_IP_TCPDIAG is not set 364# CONFIG_IP_TCPDIAG is not set
351# CONFIG_IP_TCPDIAG_IPV6 is not set 365# CONFIG_IP_TCPDIAG_IPV6 is not set
366# CONFIG_TCP_CONG_ADVANCED is not set
367CONFIG_TCP_CONG_BIC=y
352# CONFIG_IPV6 is not set 368# CONFIG_IPV6 is not set
353# CONFIG_NETFILTER is not set 369# CONFIG_NETFILTER is not set
354 370
@@ -404,6 +420,7 @@ CONFIG_MII=y
404# CONFIG_SUNGEM is not set 420# CONFIG_SUNGEM is not set
405# CONFIG_NET_VENDOR_3COM is not set 421# CONFIG_NET_VENDOR_3COM is not set
406# CONFIG_SMC91X is not set 422# CONFIG_SMC91X is not set
423# CONFIG_DM9000 is not set
407 424
408# 425#
409# Tulip family network device support 426# Tulip family network device support
@@ -440,9 +457,11 @@ CONFIG_EEPRO100=y
440# CONFIG_HAMACHI is not set 457# CONFIG_HAMACHI is not set
441# CONFIG_YELLOWFIN is not set 458# CONFIG_YELLOWFIN is not set
442# CONFIG_R8169 is not set 459# CONFIG_R8169 is not set
460# CONFIG_SKGE is not set
443# CONFIG_SK98LIN is not set 461# CONFIG_SK98LIN is not set
444# CONFIG_VIA_VELOCITY is not set 462# CONFIG_VIA_VELOCITY is not set
445# CONFIG_TIGON3 is not set 463# CONFIG_TIGON3 is not set
464# CONFIG_BNX2 is not set
446 465
447# 466#
448# Ethernet (10000 Mbit) 467# Ethernet (10000 Mbit)
@@ -464,6 +483,7 @@ CONFIG_EEPRO100=y
464# Wan interfaces 483# Wan interfaces
465# 484#
466CONFIG_WAN=y 485CONFIG_WAN=y
486# CONFIG_DSCC4 is not set
467# CONFIG_LANMEDIA is not set 487# CONFIG_LANMEDIA is not set
468# CONFIG_SYNCLINK_SYNCPPP is not set 488# CONFIG_SYNCLINK_SYNCPPP is not set
469CONFIG_HDLC=y 489CONFIG_HDLC=y
@@ -526,7 +546,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
526# 546#
527# CONFIG_SERIO is not set 547# CONFIG_SERIO is not set
528# CONFIG_GAMEPORT is not set 548# CONFIG_GAMEPORT is not set
529CONFIG_SOUND_GAMEPORT=y
530 549
531# 550#
532# Character devices 551# Character devices
@@ -547,6 +566,7 @@ CONFIG_SERIAL_8250_NR_UARTS=2
547# 566#
548CONFIG_SERIAL_CORE=y 567CONFIG_SERIAL_CORE=y
549CONFIG_SERIAL_CORE_CONSOLE=y 568CONFIG_SERIAL_CORE_CONSOLE=y
569# CONFIG_SERIAL_JSM is not set
550CONFIG_UNIX98_PTYS=y 570CONFIG_UNIX98_PTYS=y
551CONFIG_LEGACY_PTYS=y 571CONFIG_LEGACY_PTYS=y
552CONFIG_LEGACY_PTY_COUNT=256 572CONFIG_LEGACY_PTY_COUNT=256
@@ -613,17 +633,18 @@ CONFIG_I2C_ALGOBIT=y
613# CONFIG_I2C_AMD8111 is not set 633# CONFIG_I2C_AMD8111 is not set
614# CONFIG_I2C_I801 is not set 634# CONFIG_I2C_I801 is not set
615# CONFIG_I2C_I810 is not set 635# CONFIG_I2C_I810 is not set
636# CONFIG_I2C_PIIX4 is not set
616# CONFIG_I2C_ISA is not set 637# CONFIG_I2C_ISA is not set
617# CONFIG_I2C_IXP2000 is not set 638# CONFIG_I2C_IXP2000 is not set
618# CONFIG_I2C_NFORCE2 is not set 639# CONFIG_I2C_NFORCE2 is not set
619# CONFIG_I2C_PARPORT_LIGHT is not set 640# CONFIG_I2C_PARPORT_LIGHT is not set
620# CONFIG_I2C_PIIX4 is not set
621# CONFIG_I2C_PROSAVAGE is not set 641# CONFIG_I2C_PROSAVAGE is not set
622# CONFIG_I2C_SAVAGE4 is not set 642# CONFIG_I2C_SAVAGE4 is not set
623# CONFIG_SCx200_ACB is not set 643# CONFIG_SCx200_ACB is not set
624# CONFIG_I2C_SIS5595 is not set 644# CONFIG_I2C_SIS5595 is not set
625# CONFIG_I2C_SIS630 is not set 645# CONFIG_I2C_SIS630 is not set
626# CONFIG_I2C_SIS96X is not set 646# CONFIG_I2C_SIS96X is not set
647# CONFIG_I2C_STUB is not set
627# CONFIG_I2C_VIA is not set 648# CONFIG_I2C_VIA is not set
628# CONFIG_I2C_VIAPRO is not set 649# CONFIG_I2C_VIAPRO is not set
629# CONFIG_I2C_VOODOO3 is not set 650# CONFIG_I2C_VOODOO3 is not set
@@ -637,7 +658,9 @@ CONFIG_I2C_SENSOR=y
637# CONFIG_SENSORS_ADM1025 is not set 658# CONFIG_SENSORS_ADM1025 is not set
638# CONFIG_SENSORS_ADM1026 is not set 659# CONFIG_SENSORS_ADM1026 is not set
639# CONFIG_SENSORS_ADM1031 is not set 660# CONFIG_SENSORS_ADM1031 is not set
661# CONFIG_SENSORS_ADM9240 is not set
640# CONFIG_SENSORS_ASB100 is not set 662# CONFIG_SENSORS_ASB100 is not set
663# CONFIG_SENSORS_ATXP1 is not set
641# CONFIG_SENSORS_DS1621 is not set 664# CONFIG_SENSORS_DS1621 is not set
642# CONFIG_SENSORS_FSCHER is not set 665# CONFIG_SENSORS_FSCHER is not set
643# CONFIG_SENSORS_FSCPOS is not set 666# CONFIG_SENSORS_FSCPOS is not set
@@ -653,6 +676,7 @@ CONFIG_I2C_SENSOR=y
653# CONFIG_SENSORS_LM85 is not set 676# CONFIG_SENSORS_LM85 is not set
654# CONFIG_SENSORS_LM87 is not set 677# CONFIG_SENSORS_LM87 is not set
655# CONFIG_SENSORS_LM90 is not set 678# CONFIG_SENSORS_LM90 is not set
679# CONFIG_SENSORS_LM92 is not set
656# CONFIG_SENSORS_MAX1619 is not set 680# CONFIG_SENSORS_MAX1619 is not set
657# CONFIG_SENSORS_PC87360 is not set 681# CONFIG_SENSORS_PC87360 is not set
658# CONFIG_SENSORS_SMSC47B397 is not set 682# CONFIG_SENSORS_SMSC47B397 is not set
@@ -662,14 +686,19 @@ CONFIG_I2C_SENSOR=y
662# CONFIG_SENSORS_W83781D is not set 686# CONFIG_SENSORS_W83781D is not set
663# CONFIG_SENSORS_W83L785TS is not set 687# CONFIG_SENSORS_W83L785TS is not set
664# CONFIG_SENSORS_W83627HF is not set 688# CONFIG_SENSORS_W83627HF is not set
689# CONFIG_SENSORS_W83627EHF is not set
665 690
666# 691#
667# Other I2C Chip support 692# Other I2C Chip support
668# 693#
694# CONFIG_SENSORS_DS1337 is not set
695# CONFIG_SENSORS_DS1374 is not set
669CONFIG_SENSORS_EEPROM=y 696CONFIG_SENSORS_EEPROM=y
670# CONFIG_SENSORS_PCF8574 is not set 697# CONFIG_SENSORS_PCF8574 is not set
698# CONFIG_SENSORS_PCA9539 is not set
671# CONFIG_SENSORS_PCF8591 is not set 699# CONFIG_SENSORS_PCF8591 is not set
672# CONFIG_SENSORS_RTC8564 is not set 700# CONFIG_SENSORS_RTC8564 is not set
701# CONFIG_SENSORS_MAX6875 is not set
673# CONFIG_I2C_DEBUG_CORE is not set 702# CONFIG_I2C_DEBUG_CORE is not set
674# CONFIG_I2C_DEBUG_ALGO is not set 703# CONFIG_I2C_DEBUG_ALGO is not set
675# CONFIG_I2C_DEBUG_BUS is not set 704# CONFIG_I2C_DEBUG_BUS is not set
@@ -723,6 +752,7 @@ CONFIG_EXT2_FS=y
723CONFIG_EXT2_FS_XATTR=y 752CONFIG_EXT2_FS_XATTR=y
724CONFIG_EXT2_FS_POSIX_ACL=y 753CONFIG_EXT2_FS_POSIX_ACL=y
725# CONFIG_EXT2_FS_SECURITY is not set 754# CONFIG_EXT2_FS_SECURITY is not set
755# CONFIG_EXT2_FS_XIP is not set
726CONFIG_EXT3_FS=y 756CONFIG_EXT3_FS=y
727CONFIG_EXT3_FS_XATTR=y 757CONFIG_EXT3_FS_XATTR=y
728CONFIG_EXT3_FS_POSIX_ACL=y 758CONFIG_EXT3_FS_POSIX_ACL=y
@@ -763,7 +793,6 @@ CONFIG_DNOTIFY=y
763# 793#
764CONFIG_PROC_FS=y 794CONFIG_PROC_FS=y
765CONFIG_SYSFS=y 795CONFIG_SYSFS=y
766# CONFIG_DEVFS_FS is not set
767# CONFIG_DEVPTS_FS_XATTR is not set 796# CONFIG_DEVPTS_FS_XATTR is not set
768CONFIG_TMPFS=y 797CONFIG_TMPFS=y
769# CONFIG_TMPFS_XATTR is not set 798# CONFIG_TMPFS_XATTR is not set
@@ -801,12 +830,14 @@ CONFIG_JFFS2_RTIME=y
801# 830#
802CONFIG_NFS_FS=y 831CONFIG_NFS_FS=y
803CONFIG_NFS_V3=y 832CONFIG_NFS_V3=y
833# CONFIG_NFS_V3_ACL is not set
804# CONFIG_NFS_V4 is not set 834# CONFIG_NFS_V4 is not set
805# CONFIG_NFS_DIRECTIO is not set 835# CONFIG_NFS_DIRECTIO is not set
806# CONFIG_NFSD is not set 836# CONFIG_NFSD is not set
807CONFIG_ROOT_NFS=y 837CONFIG_ROOT_NFS=y
808CONFIG_LOCKD=y 838CONFIG_LOCKD=y
809CONFIG_LOCKD_V4=y 839CONFIG_LOCKD_V4=y
840CONFIG_NFS_COMMON=y
810CONFIG_SUNRPC=y 841CONFIG_SUNRPC=y
811# CONFIG_RPCSEC_GSS_KRB5 is not set 842# CONFIG_RPCSEC_GSS_KRB5 is not set
812# CONFIG_RPCSEC_GSS_SPKM3 is not set 843# CONFIG_RPCSEC_GSS_SPKM3 is not set
diff --git a/arch/arm/configs/ixdp2400_defconfig b/arch/arm/configs/ixdp2400_defconfig
index 810a450a55d2..5c6c928215d0 100644
--- a/arch/arm/configs/ixdp2400_defconfig
+++ b/arch/arm/configs/ixdp2400_defconfig
@@ -1,14 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc1-bk2 3# Linux kernel version: 2.6.13-rc2
4# Sun Mar 27 21:13:38 2005 4# Thu Jul 7 16:49:01 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_UID16=y 8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_GENERIC_IOMAP=y
12 11
13# 12#
14# Code maturity level options 13# Code maturity level options
@@ -16,6 +15,7 @@ CONFIG_GENERIC_IOMAP=y
16CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
17CONFIG_CLEAN_COMPILE=y 16CONFIG_CLEAN_COMPILE=y
18CONFIG_BROKEN_ON_SMP=y 17CONFIG_BROKEN_ON_SMP=y
18CONFIG_INIT_ENV_ARG_LIMIT=32
19 19
20# 20#
21# General setup 21# General setup
@@ -35,6 +35,8 @@ CONFIG_EMBEDDED=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -82,6 +84,7 @@ CONFIG_ARCH_IXP2000=y
82# CONFIG_ARCH_VERSATILE is not set 84# CONFIG_ARCH_VERSATILE is not set
83# CONFIG_ARCH_IMX is not set 85# CONFIG_ARCH_IMX is not set
84# CONFIG_ARCH_H720X is not set 86# CONFIG_ARCH_H720X is not set
87# CONFIG_ARCH_AAEC2000 is not set
85CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y 88CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
86 89
87# 90#
@@ -97,6 +100,7 @@ CONFIG_ARCH_IXDP2400=y
97CONFIG_ARCH_IXDP2X00=y 100CONFIG_ARCH_IXDP2X00=y
98# CONFIG_ARCH_IXDP2401 is not set 101# CONFIG_ARCH_IXDP2401 is not set
99# CONFIG_ARCH_IXDP2801 is not set 102# CONFIG_ARCH_IXDP2801 is not set
103# CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set
100 104
101# 105#
102# Processor Type 106# Processor Type
@@ -107,7 +111,6 @@ CONFIG_CPU_32v5=y
107CONFIG_CPU_ABRT_EV5T=y 111CONFIG_CPU_ABRT_EV5T=y
108CONFIG_CPU_CACHE_VIVT=y 112CONFIG_CPU_CACHE_VIVT=y
109CONFIG_CPU_TLB_V4WBI=y 113CONFIG_CPU_TLB_V4WBI=y
110CONFIG_CPU_MINICACHE=y
111 114
112# 115#
113# Processor Features 116# Processor Features
@@ -119,9 +122,11 @@ CONFIG_XSCALE_PMU=y
119# 122#
120# Bus support 123# Bus support
121# 124#
125CONFIG_ISA_DMA_API=y
122CONFIG_PCI=y 126CONFIG_PCI=y
123CONFIG_PCI_LEGACY_PROC=y 127CONFIG_PCI_LEGACY_PROC=y
124CONFIG_PCI_NAMES=y 128CONFIG_PCI_NAMES=y
129# CONFIG_PCI_DEBUG is not set
125 130
126# 131#
127# PCCARD (PCMCIA/CardBus) support 132# PCCARD (PCMCIA/CardBus) support
@@ -131,7 +136,16 @@ CONFIG_PCI_NAMES=y
131# 136#
132# Kernel Features 137# Kernel Features
133# 138#
139# CONFIG_SMP is not set
134# CONFIG_PREEMPT is not set 140# CONFIG_PREEMPT is not set
141# CONFIG_NO_IDLE_HZ is not set
142# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
143CONFIG_SELECT_MEMORY_MODEL=y
144CONFIG_FLATMEM_MANUAL=y
145# CONFIG_DISCONTIGMEM_MANUAL is not set
146# CONFIG_SPARSEMEM_MANUAL is not set
147CONFIG_FLATMEM=y
148CONFIG_FLAT_NODE_MEM_MAP=y
135CONFIG_ALIGNMENT_TRAP=y 149CONFIG_ALIGNMENT_TRAP=y
136 150
137# 151#
@@ -270,7 +284,6 @@ CONFIG_MTD_IXP2000=y
270# 284#
271# Block devices 285# Block devices
272# 286#
273# CONFIG_BLK_DEV_FD is not set
274# CONFIG_BLK_CPQ_DA is not set 287# CONFIG_BLK_CPQ_DA is not set
275# CONFIG_BLK_CPQ_CISS_DA is not set 288# CONFIG_BLK_CPQ_CISS_DA is not set
276# CONFIG_BLK_DEV_DAC960 is not set 289# CONFIG_BLK_DEV_DAC960 is not set
@@ -309,6 +322,7 @@ CONFIG_IOSCHED_CFQ=y
309# 322#
310# Fusion MPT device support 323# Fusion MPT device support
311# 324#
325# CONFIG_FUSION is not set
312 326
313# 327#
314# IEEE 1394 (FireWire) support 328# IEEE 1394 (FireWire) support
@@ -330,12 +344,12 @@ CONFIG_NET=y
330# 344#
331CONFIG_PACKET=y 345CONFIG_PACKET=y
332CONFIG_PACKET_MMAP=y 346CONFIG_PACKET_MMAP=y
333# CONFIG_NETLINK_DEV is not set
334CONFIG_UNIX=y 347CONFIG_UNIX=y
335# CONFIG_NET_KEY is not set 348# CONFIG_NET_KEY is not set
336CONFIG_INET=y 349CONFIG_INET=y
337# CONFIG_IP_MULTICAST is not set 350# CONFIG_IP_MULTICAST is not set
338# CONFIG_IP_ADVANCED_ROUTER is not set 351# CONFIG_IP_ADVANCED_ROUTER is not set
352CONFIG_IP_FIB_HASH=y
339CONFIG_IP_PNP=y 353CONFIG_IP_PNP=y
340CONFIG_IP_PNP_DHCP=y 354CONFIG_IP_PNP_DHCP=y
341CONFIG_IP_PNP_BOOTP=y 355CONFIG_IP_PNP_BOOTP=y
@@ -350,6 +364,8 @@ CONFIG_SYN_COOKIES=y
350# CONFIG_INET_TUNNEL is not set 364# CONFIG_INET_TUNNEL is not set
351# CONFIG_IP_TCPDIAG is not set 365# CONFIG_IP_TCPDIAG is not set
352# CONFIG_IP_TCPDIAG_IPV6 is not set 366# CONFIG_IP_TCPDIAG_IPV6 is not set
367# CONFIG_TCP_CONG_ADVANCED is not set
368CONFIG_TCP_CONG_BIC=y
353# CONFIG_IPV6 is not set 369# CONFIG_IPV6 is not set
354# CONFIG_NETFILTER is not set 370# CONFIG_NETFILTER is not set
355 371
@@ -405,6 +421,7 @@ CONFIG_MII=y
405# CONFIG_SUNGEM is not set 421# CONFIG_SUNGEM is not set
406# CONFIG_NET_VENDOR_3COM is not set 422# CONFIG_NET_VENDOR_3COM is not set
407# CONFIG_SMC91X is not set 423# CONFIG_SMC91X is not set
424# CONFIG_DM9000 is not set
408 425
409# 426#
410# Tulip family network device support 427# Tulip family network device support
@@ -441,9 +458,11 @@ CONFIG_EEPRO100=y
441# CONFIG_HAMACHI is not set 458# CONFIG_HAMACHI is not set
442# CONFIG_YELLOWFIN is not set 459# CONFIG_YELLOWFIN is not set
443# CONFIG_R8169 is not set 460# CONFIG_R8169 is not set
461# CONFIG_SKGE is not set
444# CONFIG_SK98LIN is not set 462# CONFIG_SK98LIN is not set
445# CONFIG_VIA_VELOCITY is not set 463# CONFIG_VIA_VELOCITY is not set
446# CONFIG_TIGON3 is not set 464# CONFIG_TIGON3 is not set
465# CONFIG_BNX2 is not set
447 466
448# 467#
449# Ethernet (10000 Mbit) 468# Ethernet (10000 Mbit)
@@ -465,6 +484,7 @@ CONFIG_EEPRO100=y
465# Wan interfaces 484# Wan interfaces
466# 485#
467CONFIG_WAN=y 486CONFIG_WAN=y
487# CONFIG_DSCC4 is not set
468# CONFIG_LANMEDIA is not set 488# CONFIG_LANMEDIA is not set
469# CONFIG_SYNCLINK_SYNCPPP is not set 489# CONFIG_SYNCLINK_SYNCPPP is not set
470CONFIG_HDLC=y 490CONFIG_HDLC=y
@@ -527,7 +547,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
527# 547#
528# CONFIG_SERIO is not set 548# CONFIG_SERIO is not set
529# CONFIG_GAMEPORT is not set 549# CONFIG_GAMEPORT is not set
530CONFIG_SOUND_GAMEPORT=y
531 550
532# 551#
533# Character devices 552# Character devices
@@ -548,6 +567,7 @@ CONFIG_SERIAL_8250_NR_UARTS=2
548# 567#
549CONFIG_SERIAL_CORE=y 568CONFIG_SERIAL_CORE=y
550CONFIG_SERIAL_CORE_CONSOLE=y 569CONFIG_SERIAL_CORE_CONSOLE=y
570# CONFIG_SERIAL_JSM is not set
551CONFIG_UNIX98_PTYS=y 571CONFIG_UNIX98_PTYS=y
552CONFIG_LEGACY_PTYS=y 572CONFIG_LEGACY_PTYS=y
553CONFIG_LEGACY_PTY_COUNT=256 573CONFIG_LEGACY_PTY_COUNT=256
@@ -614,17 +634,18 @@ CONFIG_I2C_ALGOBIT=y
614# CONFIG_I2C_AMD8111 is not set 634# CONFIG_I2C_AMD8111 is not set
615# CONFIG_I2C_I801 is not set 635# CONFIG_I2C_I801 is not set
616# CONFIG_I2C_I810 is not set 636# CONFIG_I2C_I810 is not set
637# CONFIG_I2C_PIIX4 is not set
617# CONFIG_I2C_ISA is not set 638# CONFIG_I2C_ISA is not set
618# CONFIG_I2C_IXP2000 is not set 639# CONFIG_I2C_IXP2000 is not set
619# CONFIG_I2C_NFORCE2 is not set 640# CONFIG_I2C_NFORCE2 is not set
620# CONFIG_I2C_PARPORT_LIGHT is not set 641# CONFIG_I2C_PARPORT_LIGHT is not set
621# CONFIG_I2C_PIIX4 is not set
622# CONFIG_I2C_PROSAVAGE is not set 642# CONFIG_I2C_PROSAVAGE is not set
623# CONFIG_I2C_SAVAGE4 is not set 643# CONFIG_I2C_SAVAGE4 is not set
624# CONFIG_SCx200_ACB is not set 644# CONFIG_SCx200_ACB is not set
625# CONFIG_I2C_SIS5595 is not set 645# CONFIG_I2C_SIS5595 is not set
626# CONFIG_I2C_SIS630 is not set 646# CONFIG_I2C_SIS630 is not set
627# CONFIG_I2C_SIS96X is not set 647# CONFIG_I2C_SIS96X is not set
648# CONFIG_I2C_STUB is not set
628# CONFIG_I2C_VIA is not set 649# CONFIG_I2C_VIA is not set
629# CONFIG_I2C_VIAPRO is not set 650# CONFIG_I2C_VIAPRO is not set
630# CONFIG_I2C_VOODOO3 is not set 651# CONFIG_I2C_VOODOO3 is not set
@@ -638,7 +659,9 @@ CONFIG_I2C_SENSOR=y
638# CONFIG_SENSORS_ADM1025 is not set 659# CONFIG_SENSORS_ADM1025 is not set
639# CONFIG_SENSORS_ADM1026 is not set 660# CONFIG_SENSORS_ADM1026 is not set
640# CONFIG_SENSORS_ADM1031 is not set 661# CONFIG_SENSORS_ADM1031 is not set
662# CONFIG_SENSORS_ADM9240 is not set
641# CONFIG_SENSORS_ASB100 is not set 663# CONFIG_SENSORS_ASB100 is not set
664# CONFIG_SENSORS_ATXP1 is not set
642# CONFIG_SENSORS_DS1621 is not set 665# CONFIG_SENSORS_DS1621 is not set
643# CONFIG_SENSORS_FSCHER is not set 666# CONFIG_SENSORS_FSCHER is not set
644# CONFIG_SENSORS_FSCPOS is not set 667# CONFIG_SENSORS_FSCPOS is not set
@@ -654,6 +677,7 @@ CONFIG_I2C_SENSOR=y
654# CONFIG_SENSORS_LM85 is not set 677# CONFIG_SENSORS_LM85 is not set
655# CONFIG_SENSORS_LM87 is not set 678# CONFIG_SENSORS_LM87 is not set
656# CONFIG_SENSORS_LM90 is not set 679# CONFIG_SENSORS_LM90 is not set
680# CONFIG_SENSORS_LM92 is not set
657# CONFIG_SENSORS_MAX1619 is not set 681# CONFIG_SENSORS_MAX1619 is not set
658# CONFIG_SENSORS_PC87360 is not set 682# CONFIG_SENSORS_PC87360 is not set
659# CONFIG_SENSORS_SMSC47B397 is not set 683# CONFIG_SENSORS_SMSC47B397 is not set
@@ -663,14 +687,19 @@ CONFIG_I2C_SENSOR=y
663# CONFIG_SENSORS_W83781D is not set 687# CONFIG_SENSORS_W83781D is not set
664# CONFIG_SENSORS_W83L785TS is not set 688# CONFIG_SENSORS_W83L785TS is not set
665# CONFIG_SENSORS_W83627HF is not set 689# CONFIG_SENSORS_W83627HF is not set
690# CONFIG_SENSORS_W83627EHF is not set
666 691
667# 692#
668# Other I2C Chip support 693# Other I2C Chip support
669# 694#
695# CONFIG_SENSORS_DS1337 is not set
696# CONFIG_SENSORS_DS1374 is not set
670CONFIG_SENSORS_EEPROM=y 697CONFIG_SENSORS_EEPROM=y
671# CONFIG_SENSORS_PCF8574 is not set 698# CONFIG_SENSORS_PCF8574 is not set
699# CONFIG_SENSORS_PCA9539 is not set
672# CONFIG_SENSORS_PCF8591 is not set 700# CONFIG_SENSORS_PCF8591 is not set
673# CONFIG_SENSORS_RTC8564 is not set 701# CONFIG_SENSORS_RTC8564 is not set
702# CONFIG_SENSORS_MAX6875 is not set
674# CONFIG_I2C_DEBUG_CORE is not set 703# CONFIG_I2C_DEBUG_CORE is not set
675# CONFIG_I2C_DEBUG_ALGO is not set 704# CONFIG_I2C_DEBUG_ALGO is not set
676# CONFIG_I2C_DEBUG_BUS is not set 705# CONFIG_I2C_DEBUG_BUS is not set
@@ -724,6 +753,7 @@ CONFIG_EXT2_FS=y
724CONFIG_EXT2_FS_XATTR=y 753CONFIG_EXT2_FS_XATTR=y
725CONFIG_EXT2_FS_POSIX_ACL=y 754CONFIG_EXT2_FS_POSIX_ACL=y
726# CONFIG_EXT2_FS_SECURITY is not set 755# CONFIG_EXT2_FS_SECURITY is not set
756# CONFIG_EXT2_FS_XIP is not set
727CONFIG_EXT3_FS=y 757CONFIG_EXT3_FS=y
728CONFIG_EXT3_FS_XATTR=y 758CONFIG_EXT3_FS_XATTR=y
729CONFIG_EXT3_FS_POSIX_ACL=y 759CONFIG_EXT3_FS_POSIX_ACL=y
@@ -764,7 +794,6 @@ CONFIG_DNOTIFY=y
764# 794#
765CONFIG_PROC_FS=y 795CONFIG_PROC_FS=y
766CONFIG_SYSFS=y 796CONFIG_SYSFS=y
767# CONFIG_DEVFS_FS is not set
768# CONFIG_DEVPTS_FS_XATTR is not set 797# CONFIG_DEVPTS_FS_XATTR is not set
769CONFIG_TMPFS=y 798CONFIG_TMPFS=y
770# CONFIG_TMPFS_XATTR is not set 799# CONFIG_TMPFS_XATTR is not set
@@ -802,12 +831,14 @@ CONFIG_JFFS2_RTIME=y
802# 831#
803CONFIG_NFS_FS=y 832CONFIG_NFS_FS=y
804CONFIG_NFS_V3=y 833CONFIG_NFS_V3=y
834# CONFIG_NFS_V3_ACL is not set
805# CONFIG_NFS_V4 is not set 835# CONFIG_NFS_V4 is not set
806# CONFIG_NFS_DIRECTIO is not set 836# CONFIG_NFS_DIRECTIO is not set
807# CONFIG_NFSD is not set 837# CONFIG_NFSD is not set
808CONFIG_ROOT_NFS=y 838CONFIG_ROOT_NFS=y
809CONFIG_LOCKD=y 839CONFIG_LOCKD=y
810CONFIG_LOCKD_V4=y 840CONFIG_LOCKD_V4=y
841CONFIG_NFS_COMMON=y
811CONFIG_SUNRPC=y 842CONFIG_SUNRPC=y
812# CONFIG_RPCSEC_GSS_KRB5 is not set 843# CONFIG_RPCSEC_GSS_KRB5 is not set
813# CONFIG_RPCSEC_GSS_SPKM3 is not set 844# CONFIG_RPCSEC_GSS_SPKM3 is not set
diff --git a/arch/arm/configs/ixdp2401_defconfig b/arch/arm/configs/ixdp2401_defconfig
index 72e1b940e975..6dc40f6be0ef 100644
--- a/arch/arm/configs/ixdp2401_defconfig
+++ b/arch/arm/configs/ixdp2401_defconfig
@@ -1,14 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc1-bk2 3# Linux kernel version: 2.6.13-rc2
4# Sun Mar 27 21:53:55 2005 4# Thu Jul 7 16:49:08 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_UID16=y 8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_GENERIC_IOMAP=y
12 11
13# 12#
14# Code maturity level options 13# Code maturity level options
@@ -16,6 +15,7 @@ CONFIG_GENERIC_IOMAP=y
16CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
17CONFIG_CLEAN_COMPILE=y 16CONFIG_CLEAN_COMPILE=y
18CONFIG_BROKEN_ON_SMP=y 17CONFIG_BROKEN_ON_SMP=y
18CONFIG_INIT_ENV_ARG_LIMIT=32
19 19
20# 20#
21# General setup 21# General setup
@@ -35,6 +35,8 @@ CONFIG_EMBEDDED=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -82,6 +84,7 @@ CONFIG_ARCH_IXP2000=y
82# CONFIG_ARCH_VERSATILE is not set 84# CONFIG_ARCH_VERSATILE is not set
83# CONFIG_ARCH_IMX is not set 85# CONFIG_ARCH_IMX is not set
84# CONFIG_ARCH_H720X is not set 86# CONFIG_ARCH_H720X is not set
87# CONFIG_ARCH_AAEC2000 is not set
85CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y 88CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
86 89
87# 90#
@@ -97,6 +100,7 @@ CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
97CONFIG_ARCH_IXDP2401=y 100CONFIG_ARCH_IXDP2401=y
98# CONFIG_ARCH_IXDP2801 is not set 101# CONFIG_ARCH_IXDP2801 is not set
99CONFIG_ARCH_IXDP2X01=y 102CONFIG_ARCH_IXDP2X01=y
103# CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set
100 104
101# 105#
102# Processor Type 106# Processor Type
@@ -107,7 +111,6 @@ CONFIG_CPU_32v5=y
107CONFIG_CPU_ABRT_EV5T=y 111CONFIG_CPU_ABRT_EV5T=y
108CONFIG_CPU_CACHE_VIVT=y 112CONFIG_CPU_CACHE_VIVT=y
109CONFIG_CPU_TLB_V4WBI=y 113CONFIG_CPU_TLB_V4WBI=y
110CONFIG_CPU_MINICACHE=y
111 114
112# 115#
113# Processor Features 116# Processor Features
@@ -119,9 +122,11 @@ CONFIG_XSCALE_PMU=y
119# 122#
120# Bus support 123# Bus support
121# 124#
125CONFIG_ISA_DMA_API=y
122CONFIG_PCI=y 126CONFIG_PCI=y
123CONFIG_PCI_LEGACY_PROC=y 127CONFIG_PCI_LEGACY_PROC=y
124CONFIG_PCI_NAMES=y 128CONFIG_PCI_NAMES=y
129# CONFIG_PCI_DEBUG is not set
125 130
126# 131#
127# PCCARD (PCMCIA/CardBus) support 132# PCCARD (PCMCIA/CardBus) support
@@ -131,7 +136,16 @@ CONFIG_PCI_NAMES=y
131# 136#
132# Kernel Features 137# Kernel Features
133# 138#
139# CONFIG_SMP is not set
134# CONFIG_PREEMPT is not set 140# CONFIG_PREEMPT is not set
141# CONFIG_NO_IDLE_HZ is not set
142# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
143CONFIG_SELECT_MEMORY_MODEL=y
144CONFIG_FLATMEM_MANUAL=y
145# CONFIG_DISCONTIGMEM_MANUAL is not set
146# CONFIG_SPARSEMEM_MANUAL is not set
147CONFIG_FLATMEM=y
148CONFIG_FLAT_NODE_MEM_MAP=y
135CONFIG_ALIGNMENT_TRAP=y 149CONFIG_ALIGNMENT_TRAP=y
136 150
137# 151#
@@ -270,7 +284,6 @@ CONFIG_MTD_IXP2000=y
270# 284#
271# Block devices 285# Block devices
272# 286#
273# CONFIG_BLK_DEV_FD is not set
274# CONFIG_BLK_CPQ_DA is not set 287# CONFIG_BLK_CPQ_DA is not set
275# CONFIG_BLK_CPQ_CISS_DA is not set 288# CONFIG_BLK_CPQ_CISS_DA is not set
276# CONFIG_BLK_DEV_DAC960 is not set 289# CONFIG_BLK_DEV_DAC960 is not set
@@ -309,6 +322,7 @@ CONFIG_IOSCHED_CFQ=y
309# 322#
310# Fusion MPT device support 323# Fusion MPT device support
311# 324#
325# CONFIG_FUSION is not set
312 326
313# 327#
314# IEEE 1394 (FireWire) support 328# IEEE 1394 (FireWire) support
@@ -330,12 +344,12 @@ CONFIG_NET=y
330# 344#
331CONFIG_PACKET=y 345CONFIG_PACKET=y
332CONFIG_PACKET_MMAP=y 346CONFIG_PACKET_MMAP=y
333# CONFIG_NETLINK_DEV is not set
334CONFIG_UNIX=y 347CONFIG_UNIX=y
335# CONFIG_NET_KEY is not set 348# CONFIG_NET_KEY is not set
336CONFIG_INET=y 349CONFIG_INET=y
337# CONFIG_IP_MULTICAST is not set 350# CONFIG_IP_MULTICAST is not set
338# CONFIG_IP_ADVANCED_ROUTER is not set 351# CONFIG_IP_ADVANCED_ROUTER is not set
352CONFIG_IP_FIB_HASH=y
339CONFIG_IP_PNP=y 353CONFIG_IP_PNP=y
340CONFIG_IP_PNP_DHCP=y 354CONFIG_IP_PNP_DHCP=y
341CONFIG_IP_PNP_BOOTP=y 355CONFIG_IP_PNP_BOOTP=y
@@ -350,6 +364,8 @@ CONFIG_SYN_COOKIES=y
350# CONFIG_INET_TUNNEL is not set 364# CONFIG_INET_TUNNEL is not set
351CONFIG_IP_TCPDIAG=y 365CONFIG_IP_TCPDIAG=y
352# CONFIG_IP_TCPDIAG_IPV6 is not set 366# CONFIG_IP_TCPDIAG_IPV6 is not set
367# CONFIG_TCP_CONG_ADVANCED is not set
368CONFIG_TCP_CONG_BIC=y
353# CONFIG_IPV6 is not set 369# CONFIG_IPV6 is not set
354# CONFIG_NETFILTER is not set 370# CONFIG_NETFILTER is not set
355 371
@@ -405,6 +421,7 @@ CONFIG_MII=y
405# CONFIG_SUNGEM is not set 421# CONFIG_SUNGEM is not set
406# CONFIG_NET_VENDOR_3COM is not set 422# CONFIG_NET_VENDOR_3COM is not set
407# CONFIG_SMC91X is not set 423# CONFIG_SMC91X is not set
424# CONFIG_DM9000 is not set
408 425
409# 426#
410# Tulip family network device support 427# Tulip family network device support
@@ -442,9 +459,11 @@ CONFIG_EEPRO100=y
442# CONFIG_HAMACHI is not set 459# CONFIG_HAMACHI is not set
443# CONFIG_YELLOWFIN is not set 460# CONFIG_YELLOWFIN is not set
444# CONFIG_R8169 is not set 461# CONFIG_R8169 is not set
462# CONFIG_SKGE is not set
445# CONFIG_SK98LIN is not set 463# CONFIG_SK98LIN is not set
446# CONFIG_VIA_VELOCITY is not set 464# CONFIG_VIA_VELOCITY is not set
447# CONFIG_TIGON3 is not set 465# CONFIG_TIGON3 is not set
466# CONFIG_BNX2 is not set
448 467
449# 468#
450# Ethernet (10000 Mbit) 469# Ethernet (10000 Mbit)
@@ -466,6 +485,7 @@ CONFIG_EEPRO100=y
466# Wan interfaces 485# Wan interfaces
467# 486#
468CONFIG_WAN=y 487CONFIG_WAN=y
488# CONFIG_DSCC4 is not set
469# CONFIG_LANMEDIA is not set 489# CONFIG_LANMEDIA is not set
470# CONFIG_SYNCLINK_SYNCPPP is not set 490# CONFIG_SYNCLINK_SYNCPPP is not set
471CONFIG_HDLC=y 491CONFIG_HDLC=y
@@ -528,7 +548,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
528# 548#
529# CONFIG_SERIO is not set 549# CONFIG_SERIO is not set
530# CONFIG_GAMEPORT is not set 550# CONFIG_GAMEPORT is not set
531CONFIG_SOUND_GAMEPORT=y
532 551
533# 552#
534# Character devices 553# Character devices
@@ -549,6 +568,7 @@ CONFIG_SERIAL_8250_NR_UARTS=2
549# 568#
550CONFIG_SERIAL_CORE=y 569CONFIG_SERIAL_CORE=y
551CONFIG_SERIAL_CORE_CONSOLE=y 570CONFIG_SERIAL_CORE_CONSOLE=y
571# CONFIG_SERIAL_JSM is not set
552CONFIG_UNIX98_PTYS=y 572CONFIG_UNIX98_PTYS=y
553CONFIG_LEGACY_PTYS=y 573CONFIG_LEGACY_PTYS=y
554CONFIG_LEGACY_PTY_COUNT=256 574CONFIG_LEGACY_PTY_COUNT=256
@@ -615,17 +635,18 @@ CONFIG_I2C_ALGOBIT=y
615# CONFIG_I2C_AMD8111 is not set 635# CONFIG_I2C_AMD8111 is not set
616# CONFIG_I2C_I801 is not set 636# CONFIG_I2C_I801 is not set
617# CONFIG_I2C_I810 is not set 637# CONFIG_I2C_I810 is not set
638# CONFIG_I2C_PIIX4 is not set
618# CONFIG_I2C_ISA is not set 639# CONFIG_I2C_ISA is not set
619# CONFIG_I2C_IXP2000 is not set 640# CONFIG_I2C_IXP2000 is not set
620# CONFIG_I2C_NFORCE2 is not set 641# CONFIG_I2C_NFORCE2 is not set
621# CONFIG_I2C_PARPORT_LIGHT is not set 642# CONFIG_I2C_PARPORT_LIGHT is not set
622# CONFIG_I2C_PIIX4 is not set
623# CONFIG_I2C_PROSAVAGE is not set 643# CONFIG_I2C_PROSAVAGE is not set
624# CONFIG_I2C_SAVAGE4 is not set 644# CONFIG_I2C_SAVAGE4 is not set
625# CONFIG_SCx200_ACB is not set 645# CONFIG_SCx200_ACB is not set
626# CONFIG_I2C_SIS5595 is not set 646# CONFIG_I2C_SIS5595 is not set
627# CONFIG_I2C_SIS630 is not set 647# CONFIG_I2C_SIS630 is not set
628# CONFIG_I2C_SIS96X is not set 648# CONFIG_I2C_SIS96X is not set
649# CONFIG_I2C_STUB is not set
629# CONFIG_I2C_VIA is not set 650# CONFIG_I2C_VIA is not set
630# CONFIG_I2C_VIAPRO is not set 651# CONFIG_I2C_VIAPRO is not set
631# CONFIG_I2C_VOODOO3 is not set 652# CONFIG_I2C_VOODOO3 is not set
@@ -639,7 +660,9 @@ CONFIG_I2C_SENSOR=y
639# CONFIG_SENSORS_ADM1025 is not set 660# CONFIG_SENSORS_ADM1025 is not set
640# CONFIG_SENSORS_ADM1026 is not set 661# CONFIG_SENSORS_ADM1026 is not set
641# CONFIG_SENSORS_ADM1031 is not set 662# CONFIG_SENSORS_ADM1031 is not set
663# CONFIG_SENSORS_ADM9240 is not set
642# CONFIG_SENSORS_ASB100 is not set 664# CONFIG_SENSORS_ASB100 is not set
665# CONFIG_SENSORS_ATXP1 is not set
643# CONFIG_SENSORS_DS1621 is not set 666# CONFIG_SENSORS_DS1621 is not set
644# CONFIG_SENSORS_FSCHER is not set 667# CONFIG_SENSORS_FSCHER is not set
645# CONFIG_SENSORS_FSCPOS is not set 668# CONFIG_SENSORS_FSCPOS is not set
@@ -655,6 +678,7 @@ CONFIG_I2C_SENSOR=y
655# CONFIG_SENSORS_LM85 is not set 678# CONFIG_SENSORS_LM85 is not set
656# CONFIG_SENSORS_LM87 is not set 679# CONFIG_SENSORS_LM87 is not set
657# CONFIG_SENSORS_LM90 is not set 680# CONFIG_SENSORS_LM90 is not set
681# CONFIG_SENSORS_LM92 is not set
658# CONFIG_SENSORS_MAX1619 is not set 682# CONFIG_SENSORS_MAX1619 is not set
659# CONFIG_SENSORS_PC87360 is not set 683# CONFIG_SENSORS_PC87360 is not set
660# CONFIG_SENSORS_SMSC47B397 is not set 684# CONFIG_SENSORS_SMSC47B397 is not set
@@ -664,14 +688,19 @@ CONFIG_I2C_SENSOR=y
664# CONFIG_SENSORS_W83781D is not set 688# CONFIG_SENSORS_W83781D is not set
665# CONFIG_SENSORS_W83L785TS is not set 689# CONFIG_SENSORS_W83L785TS is not set
666# CONFIG_SENSORS_W83627HF is not set 690# CONFIG_SENSORS_W83627HF is not set
691# CONFIG_SENSORS_W83627EHF is not set
667 692
668# 693#
669# Other I2C Chip support 694# Other I2C Chip support
670# 695#
696# CONFIG_SENSORS_DS1337 is not set
697# CONFIG_SENSORS_DS1374 is not set
671CONFIG_SENSORS_EEPROM=y 698CONFIG_SENSORS_EEPROM=y
672# CONFIG_SENSORS_PCF8574 is not set 699# CONFIG_SENSORS_PCF8574 is not set
700# CONFIG_SENSORS_PCA9539 is not set
673# CONFIG_SENSORS_PCF8591 is not set 701# CONFIG_SENSORS_PCF8591 is not set
674# CONFIG_SENSORS_RTC8564 is not set 702# CONFIG_SENSORS_RTC8564 is not set
703# CONFIG_SENSORS_MAX6875 is not set
675# CONFIG_I2C_DEBUG_CORE is not set 704# CONFIG_I2C_DEBUG_CORE is not set
676# CONFIG_I2C_DEBUG_ALGO is not set 705# CONFIG_I2C_DEBUG_ALGO is not set
677# CONFIG_I2C_DEBUG_BUS is not set 706# CONFIG_I2C_DEBUG_BUS is not set
@@ -725,6 +754,7 @@ CONFIG_EXT2_FS=y
725CONFIG_EXT2_FS_XATTR=y 754CONFIG_EXT2_FS_XATTR=y
726CONFIG_EXT2_FS_POSIX_ACL=y 755CONFIG_EXT2_FS_POSIX_ACL=y
727# CONFIG_EXT2_FS_SECURITY is not set 756# CONFIG_EXT2_FS_SECURITY is not set
757# CONFIG_EXT2_FS_XIP is not set
728CONFIG_EXT3_FS=y 758CONFIG_EXT3_FS=y
729CONFIG_EXT3_FS_XATTR=y 759CONFIG_EXT3_FS_XATTR=y
730CONFIG_EXT3_FS_POSIX_ACL=y 760CONFIG_EXT3_FS_POSIX_ACL=y
@@ -765,7 +795,6 @@ CONFIG_DNOTIFY=y
765# 795#
766CONFIG_PROC_FS=y 796CONFIG_PROC_FS=y
767CONFIG_SYSFS=y 797CONFIG_SYSFS=y
768# CONFIG_DEVFS_FS is not set
769# CONFIG_DEVPTS_FS_XATTR is not set 798# CONFIG_DEVPTS_FS_XATTR is not set
770CONFIG_TMPFS=y 799CONFIG_TMPFS=y
771# CONFIG_TMPFS_XATTR is not set 800# CONFIG_TMPFS_XATTR is not set
@@ -803,12 +832,14 @@ CONFIG_JFFS2_RTIME=y
803# 832#
804CONFIG_NFS_FS=y 833CONFIG_NFS_FS=y
805CONFIG_NFS_V3=y 834CONFIG_NFS_V3=y
835# CONFIG_NFS_V3_ACL is not set
806# CONFIG_NFS_V4 is not set 836# CONFIG_NFS_V4 is not set
807# CONFIG_NFS_DIRECTIO is not set 837# CONFIG_NFS_DIRECTIO is not set
808# CONFIG_NFSD is not set 838# CONFIG_NFSD is not set
809CONFIG_ROOT_NFS=y 839CONFIG_ROOT_NFS=y
810CONFIG_LOCKD=y 840CONFIG_LOCKD=y
811CONFIG_LOCKD_V4=y 841CONFIG_LOCKD_V4=y
842CONFIG_NFS_COMMON=y
812CONFIG_SUNRPC=y 843CONFIG_SUNRPC=y
813# CONFIG_RPCSEC_GSS_KRB5 is not set 844# CONFIG_RPCSEC_GSS_KRB5 is not set
814# CONFIG_RPCSEC_GSS_SPKM3 is not set 845# CONFIG_RPCSEC_GSS_SPKM3 is not set
diff --git a/arch/arm/configs/ixdp2800_defconfig b/arch/arm/configs/ixdp2800_defconfig
index 1592e45f0278..d2bb0b7153fe 100644
--- a/arch/arm/configs/ixdp2800_defconfig
+++ b/arch/arm/configs/ixdp2800_defconfig
@@ -1,14 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc1-bk2 3# Linux kernel version: 2.6.13-rc2
4# Sun Mar 27 22:15:23 2005 4# Thu Jul 7 16:49:20 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_UID16=y 8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_GENERIC_IOMAP=y
12 11
13# 12#
14# Code maturity level options 13# Code maturity level options
@@ -16,6 +15,7 @@ CONFIG_GENERIC_IOMAP=y
16CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
17CONFIG_CLEAN_COMPILE=y 16CONFIG_CLEAN_COMPILE=y
18CONFIG_BROKEN_ON_SMP=y 17CONFIG_BROKEN_ON_SMP=y
18CONFIG_INIT_ENV_ARG_LIMIT=32
19 19
20# 20#
21# General setup 21# General setup
@@ -35,6 +35,8 @@ CONFIG_EMBEDDED=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -82,6 +84,7 @@ CONFIG_ARCH_IXP2000=y
82# CONFIG_ARCH_VERSATILE is not set 84# CONFIG_ARCH_VERSATILE is not set
83# CONFIG_ARCH_IMX is not set 85# CONFIG_ARCH_IMX is not set
84# CONFIG_ARCH_H720X is not set 86# CONFIG_ARCH_H720X is not set
87# CONFIG_ARCH_AAEC2000 is not set
85CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y 88CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
86 89
87# 90#
@@ -97,6 +100,7 @@ CONFIG_ARCH_IXDP2800=y
97CONFIG_ARCH_IXDP2X00=y 100CONFIG_ARCH_IXDP2X00=y
98# CONFIG_ARCH_IXDP2401 is not set 101# CONFIG_ARCH_IXDP2401 is not set
99# CONFIG_ARCH_IXDP2801 is not set 102# CONFIG_ARCH_IXDP2801 is not set
103# CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set
100 104
101# 105#
102# Processor Type 106# Processor Type
@@ -107,7 +111,6 @@ CONFIG_CPU_32v5=y
107CONFIG_CPU_ABRT_EV5T=y 111CONFIG_CPU_ABRT_EV5T=y
108CONFIG_CPU_CACHE_VIVT=y 112CONFIG_CPU_CACHE_VIVT=y
109CONFIG_CPU_TLB_V4WBI=y 113CONFIG_CPU_TLB_V4WBI=y
110CONFIG_CPU_MINICACHE=y
111 114
112# 115#
113# Processor Features 116# Processor Features
@@ -119,9 +122,11 @@ CONFIG_XSCALE_PMU=y
119# 122#
120# Bus support 123# Bus support
121# 124#
125CONFIG_ISA_DMA_API=y
122CONFIG_PCI=y 126CONFIG_PCI=y
123CONFIG_PCI_LEGACY_PROC=y 127CONFIG_PCI_LEGACY_PROC=y
124CONFIG_PCI_NAMES=y 128CONFIG_PCI_NAMES=y
129# CONFIG_PCI_DEBUG is not set
125 130
126# 131#
127# PCCARD (PCMCIA/CardBus) support 132# PCCARD (PCMCIA/CardBus) support
@@ -131,7 +136,16 @@ CONFIG_PCI_NAMES=y
131# 136#
132# Kernel Features 137# Kernel Features
133# 138#
139# CONFIG_SMP is not set
134# CONFIG_PREEMPT is not set 140# CONFIG_PREEMPT is not set
141# CONFIG_NO_IDLE_HZ is not set
142# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
143CONFIG_SELECT_MEMORY_MODEL=y
144CONFIG_FLATMEM_MANUAL=y
145# CONFIG_DISCONTIGMEM_MANUAL is not set
146# CONFIG_SPARSEMEM_MANUAL is not set
147CONFIG_FLATMEM=y
148CONFIG_FLAT_NODE_MEM_MAP=y
135CONFIG_ALIGNMENT_TRAP=y 149CONFIG_ALIGNMENT_TRAP=y
136 150
137# 151#
@@ -270,7 +284,6 @@ CONFIG_MTD_IXP2000=y
270# 284#
271# Block devices 285# Block devices
272# 286#
273# CONFIG_BLK_DEV_FD is not set
274# CONFIG_BLK_CPQ_DA is not set 287# CONFIG_BLK_CPQ_DA is not set
275# CONFIG_BLK_CPQ_CISS_DA is not set 288# CONFIG_BLK_CPQ_CISS_DA is not set
276# CONFIG_BLK_DEV_DAC960 is not set 289# CONFIG_BLK_DEV_DAC960 is not set
@@ -309,6 +322,7 @@ CONFIG_IOSCHED_CFQ=y
309# 322#
310# Fusion MPT device support 323# Fusion MPT device support
311# 324#
325# CONFIG_FUSION is not set
312 326
313# 327#
314# IEEE 1394 (FireWire) support 328# IEEE 1394 (FireWire) support
@@ -330,12 +344,12 @@ CONFIG_NET=y
330# 344#
331CONFIG_PACKET=y 345CONFIG_PACKET=y
332CONFIG_PACKET_MMAP=y 346CONFIG_PACKET_MMAP=y
333# CONFIG_NETLINK_DEV is not set
334CONFIG_UNIX=y 347CONFIG_UNIX=y
335# CONFIG_NET_KEY is not set 348# CONFIG_NET_KEY is not set
336CONFIG_INET=y 349CONFIG_INET=y
337# CONFIG_IP_MULTICAST is not set 350# CONFIG_IP_MULTICAST is not set
338# CONFIG_IP_ADVANCED_ROUTER is not set 351# CONFIG_IP_ADVANCED_ROUTER is not set
352CONFIG_IP_FIB_HASH=y
339CONFIG_IP_PNP=y 353CONFIG_IP_PNP=y
340CONFIG_IP_PNP_DHCP=y 354CONFIG_IP_PNP_DHCP=y
341CONFIG_IP_PNP_BOOTP=y 355CONFIG_IP_PNP_BOOTP=y
@@ -350,6 +364,8 @@ CONFIG_SYN_COOKIES=y
350# CONFIG_INET_TUNNEL is not set 364# CONFIG_INET_TUNNEL is not set
351# CONFIG_IP_TCPDIAG is not set 365# CONFIG_IP_TCPDIAG is not set
352# CONFIG_IP_TCPDIAG_IPV6 is not set 366# CONFIG_IP_TCPDIAG_IPV6 is not set
367# CONFIG_TCP_CONG_ADVANCED is not set
368CONFIG_TCP_CONG_BIC=y
353# CONFIG_IPV6 is not set 369# CONFIG_IPV6 is not set
354# CONFIG_NETFILTER is not set 370# CONFIG_NETFILTER is not set
355 371
@@ -405,6 +421,7 @@ CONFIG_MII=y
405# CONFIG_SUNGEM is not set 421# CONFIG_SUNGEM is not set
406# CONFIG_NET_VENDOR_3COM is not set 422# CONFIG_NET_VENDOR_3COM is not set
407# CONFIG_SMC91X is not set 423# CONFIG_SMC91X is not set
424# CONFIG_DM9000 is not set
408 425
409# 426#
410# Tulip family network device support 427# Tulip family network device support
@@ -441,9 +458,11 @@ CONFIG_EEPRO100=y
441# CONFIG_HAMACHI is not set 458# CONFIG_HAMACHI is not set
442# CONFIG_YELLOWFIN is not set 459# CONFIG_YELLOWFIN is not set
443# CONFIG_R8169 is not set 460# CONFIG_R8169 is not set
461# CONFIG_SKGE is not set
444# CONFIG_SK98LIN is not set 462# CONFIG_SK98LIN is not set
445# CONFIG_VIA_VELOCITY is not set 463# CONFIG_VIA_VELOCITY is not set
446# CONFIG_TIGON3 is not set 464# CONFIG_TIGON3 is not set
465# CONFIG_BNX2 is not set
447 466
448# 467#
449# Ethernet (10000 Mbit) 468# Ethernet (10000 Mbit)
@@ -465,6 +484,7 @@ CONFIG_EEPRO100=y
465# Wan interfaces 484# Wan interfaces
466# 485#
467CONFIG_WAN=y 486CONFIG_WAN=y
487# CONFIG_DSCC4 is not set
468# CONFIG_LANMEDIA is not set 488# CONFIG_LANMEDIA is not set
469# CONFIG_SYNCLINK_SYNCPPP is not set 489# CONFIG_SYNCLINK_SYNCPPP is not set
470CONFIG_HDLC=y 490CONFIG_HDLC=y
@@ -527,7 +547,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
527# 547#
528# CONFIG_SERIO is not set 548# CONFIG_SERIO is not set
529# CONFIG_GAMEPORT is not set 549# CONFIG_GAMEPORT is not set
530CONFIG_SOUND_GAMEPORT=y
531 550
532# 551#
533# Character devices 552# Character devices
@@ -548,6 +567,7 @@ CONFIG_SERIAL_8250_NR_UARTS=2
548# 567#
549CONFIG_SERIAL_CORE=y 568CONFIG_SERIAL_CORE=y
550CONFIG_SERIAL_CORE_CONSOLE=y 569CONFIG_SERIAL_CORE_CONSOLE=y
570# CONFIG_SERIAL_JSM is not set
551CONFIG_UNIX98_PTYS=y 571CONFIG_UNIX98_PTYS=y
552CONFIG_LEGACY_PTYS=y 572CONFIG_LEGACY_PTYS=y
553CONFIG_LEGACY_PTY_COUNT=256 573CONFIG_LEGACY_PTY_COUNT=256
@@ -614,17 +634,18 @@ CONFIG_I2C_ALGOBIT=y
614# CONFIG_I2C_AMD8111 is not set 634# CONFIG_I2C_AMD8111 is not set
615# CONFIG_I2C_I801 is not set 635# CONFIG_I2C_I801 is not set
616# CONFIG_I2C_I810 is not set 636# CONFIG_I2C_I810 is not set
637# CONFIG_I2C_PIIX4 is not set
617# CONFIG_I2C_ISA is not set 638# CONFIG_I2C_ISA is not set
618# CONFIG_I2C_IXP2000 is not set 639# CONFIG_I2C_IXP2000 is not set
619# CONFIG_I2C_NFORCE2 is not set 640# CONFIG_I2C_NFORCE2 is not set
620# CONFIG_I2C_PARPORT_LIGHT is not set 641# CONFIG_I2C_PARPORT_LIGHT is not set
621# CONFIG_I2C_PIIX4 is not set
622# CONFIG_I2C_PROSAVAGE is not set 642# CONFIG_I2C_PROSAVAGE is not set
623# CONFIG_I2C_SAVAGE4 is not set 643# CONFIG_I2C_SAVAGE4 is not set
624# CONFIG_SCx200_ACB is not set 644# CONFIG_SCx200_ACB is not set
625# CONFIG_I2C_SIS5595 is not set 645# CONFIG_I2C_SIS5595 is not set
626# CONFIG_I2C_SIS630 is not set 646# CONFIG_I2C_SIS630 is not set
627# CONFIG_I2C_SIS96X is not set 647# CONFIG_I2C_SIS96X is not set
648# CONFIG_I2C_STUB is not set
628# CONFIG_I2C_VIA is not set 649# CONFIG_I2C_VIA is not set
629# CONFIG_I2C_VIAPRO is not set 650# CONFIG_I2C_VIAPRO is not set
630# CONFIG_I2C_VOODOO3 is not set 651# CONFIG_I2C_VOODOO3 is not set
@@ -638,7 +659,9 @@ CONFIG_I2C_SENSOR=y
638# CONFIG_SENSORS_ADM1025 is not set 659# CONFIG_SENSORS_ADM1025 is not set
639# CONFIG_SENSORS_ADM1026 is not set 660# CONFIG_SENSORS_ADM1026 is not set
640# CONFIG_SENSORS_ADM1031 is not set 661# CONFIG_SENSORS_ADM1031 is not set
662# CONFIG_SENSORS_ADM9240 is not set
641# CONFIG_SENSORS_ASB100 is not set 663# CONFIG_SENSORS_ASB100 is not set
664# CONFIG_SENSORS_ATXP1 is not set
642# CONFIG_SENSORS_DS1621 is not set 665# CONFIG_SENSORS_DS1621 is not set
643# CONFIG_SENSORS_FSCHER is not set 666# CONFIG_SENSORS_FSCHER is not set
644# CONFIG_SENSORS_FSCPOS is not set 667# CONFIG_SENSORS_FSCPOS is not set
@@ -654,6 +677,7 @@ CONFIG_I2C_SENSOR=y
654# CONFIG_SENSORS_LM85 is not set 677# CONFIG_SENSORS_LM85 is not set
655# CONFIG_SENSORS_LM87 is not set 678# CONFIG_SENSORS_LM87 is not set
656# CONFIG_SENSORS_LM90 is not set 679# CONFIG_SENSORS_LM90 is not set
680# CONFIG_SENSORS_LM92 is not set
657# CONFIG_SENSORS_MAX1619 is not set 681# CONFIG_SENSORS_MAX1619 is not set
658# CONFIG_SENSORS_PC87360 is not set 682# CONFIG_SENSORS_PC87360 is not set
659# CONFIG_SENSORS_SMSC47B397 is not set 683# CONFIG_SENSORS_SMSC47B397 is not set
@@ -663,14 +687,19 @@ CONFIG_I2C_SENSOR=y
663# CONFIG_SENSORS_W83781D is not set 687# CONFIG_SENSORS_W83781D is not set
664# CONFIG_SENSORS_W83L785TS is not set 688# CONFIG_SENSORS_W83L785TS is not set
665# CONFIG_SENSORS_W83627HF is not set 689# CONFIG_SENSORS_W83627HF is not set
690# CONFIG_SENSORS_W83627EHF is not set
666 691
667# 692#
668# Other I2C Chip support 693# Other I2C Chip support
669# 694#
695# CONFIG_SENSORS_DS1337 is not set
696# CONFIG_SENSORS_DS1374 is not set
670CONFIG_SENSORS_EEPROM=y 697CONFIG_SENSORS_EEPROM=y
671# CONFIG_SENSORS_PCF8574 is not set 698# CONFIG_SENSORS_PCF8574 is not set
699# CONFIG_SENSORS_PCA9539 is not set
672# CONFIG_SENSORS_PCF8591 is not set 700# CONFIG_SENSORS_PCF8591 is not set
673# CONFIG_SENSORS_RTC8564 is not set 701# CONFIG_SENSORS_RTC8564 is not set
702# CONFIG_SENSORS_MAX6875 is not set
674# CONFIG_I2C_DEBUG_CORE is not set 703# CONFIG_I2C_DEBUG_CORE is not set
675# CONFIG_I2C_DEBUG_ALGO is not set 704# CONFIG_I2C_DEBUG_ALGO is not set
676# CONFIG_I2C_DEBUG_BUS is not set 705# CONFIG_I2C_DEBUG_BUS is not set
@@ -724,6 +753,7 @@ CONFIG_EXT2_FS=y
724CONFIG_EXT2_FS_XATTR=y 753CONFIG_EXT2_FS_XATTR=y
725CONFIG_EXT2_FS_POSIX_ACL=y 754CONFIG_EXT2_FS_POSIX_ACL=y
726# CONFIG_EXT2_FS_SECURITY is not set 755# CONFIG_EXT2_FS_SECURITY is not set
756# CONFIG_EXT2_FS_XIP is not set
727CONFIG_EXT3_FS=y 757CONFIG_EXT3_FS=y
728CONFIG_EXT3_FS_XATTR=y 758CONFIG_EXT3_FS_XATTR=y
729CONFIG_EXT3_FS_POSIX_ACL=y 759CONFIG_EXT3_FS_POSIX_ACL=y
@@ -764,7 +794,6 @@ CONFIG_DNOTIFY=y
764# 794#
765CONFIG_PROC_FS=y 795CONFIG_PROC_FS=y
766CONFIG_SYSFS=y 796CONFIG_SYSFS=y
767# CONFIG_DEVFS_FS is not set
768# CONFIG_DEVPTS_FS_XATTR is not set 797# CONFIG_DEVPTS_FS_XATTR is not set
769CONFIG_TMPFS=y 798CONFIG_TMPFS=y
770# CONFIG_TMPFS_XATTR is not set 799# CONFIG_TMPFS_XATTR is not set
@@ -802,12 +831,14 @@ CONFIG_JFFS2_RTIME=y
802# 831#
803CONFIG_NFS_FS=y 832CONFIG_NFS_FS=y
804CONFIG_NFS_V3=y 833CONFIG_NFS_V3=y
834# CONFIG_NFS_V3_ACL is not set
805# CONFIG_NFS_V4 is not set 835# CONFIG_NFS_V4 is not set
806# CONFIG_NFS_DIRECTIO is not set 836# CONFIG_NFS_DIRECTIO is not set
807# CONFIG_NFSD is not set 837# CONFIG_NFSD is not set
808CONFIG_ROOT_NFS=y 838CONFIG_ROOT_NFS=y
809CONFIG_LOCKD=y 839CONFIG_LOCKD=y
810CONFIG_LOCKD_V4=y 840CONFIG_LOCKD_V4=y
841CONFIG_NFS_COMMON=y
811CONFIG_SUNRPC=y 842CONFIG_SUNRPC=y
812# CONFIG_RPCSEC_GSS_KRB5 is not set 843# CONFIG_RPCSEC_GSS_KRB5 is not set
813# CONFIG_RPCSEC_GSS_SPKM3 is not set 844# CONFIG_RPCSEC_GSS_SPKM3 is not set
diff --git a/arch/arm/configs/ixdp2801_defconfig b/arch/arm/configs/ixdp2801_defconfig
index f1afe3d09ec6..2d6f960e3395 100644
--- a/arch/arm/configs/ixdp2801_defconfig
+++ b/arch/arm/configs/ixdp2801_defconfig
@@ -1,14 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc1-bk2 3# Linux kernel version: 2.6.13-rc2
4# Sun Mar 27 22:39:19 2005 4# Thu Jul 7 16:49:13 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_UID16=y 8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_GENERIC_IOMAP=y
12 11
13# 12#
14# Code maturity level options 13# Code maturity level options
@@ -16,6 +15,7 @@ CONFIG_GENERIC_IOMAP=y
16CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
17CONFIG_CLEAN_COMPILE=y 16CONFIG_CLEAN_COMPILE=y
18CONFIG_BROKEN_ON_SMP=y 17CONFIG_BROKEN_ON_SMP=y
18CONFIG_INIT_ENV_ARG_LIMIT=32
19 19
20# 20#
21# General setup 21# General setup
@@ -35,6 +35,8 @@ CONFIG_EMBEDDED=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -82,6 +84,7 @@ CONFIG_ARCH_IXP2000=y
82# CONFIG_ARCH_VERSATILE is not set 84# CONFIG_ARCH_VERSATILE is not set
83# CONFIG_ARCH_IMX is not set 85# CONFIG_ARCH_IMX is not set
84# CONFIG_ARCH_H720X is not set 86# CONFIG_ARCH_H720X is not set
87# CONFIG_ARCH_AAEC2000 is not set
85CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y 88CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
86 89
87# 90#
@@ -97,6 +100,7 @@ CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
97# CONFIG_ARCH_IXDP2401 is not set 100# CONFIG_ARCH_IXDP2401 is not set
98CONFIG_ARCH_IXDP2801=y 101CONFIG_ARCH_IXDP2801=y
99CONFIG_ARCH_IXDP2X01=y 102CONFIG_ARCH_IXDP2X01=y
103# CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO is not set
100 104
101# 105#
102# Processor Type 106# Processor Type
@@ -107,7 +111,6 @@ CONFIG_CPU_32v5=y
107CONFIG_CPU_ABRT_EV5T=y 111CONFIG_CPU_ABRT_EV5T=y
108CONFIG_CPU_CACHE_VIVT=y 112CONFIG_CPU_CACHE_VIVT=y
109CONFIG_CPU_TLB_V4WBI=y 113CONFIG_CPU_TLB_V4WBI=y
110CONFIG_CPU_MINICACHE=y
111 114
112# 115#
113# Processor Features 116# Processor Features
@@ -119,9 +122,11 @@ CONFIG_XSCALE_PMU=y
119# 122#
120# Bus support 123# Bus support
121# 124#
125CONFIG_ISA_DMA_API=y
122CONFIG_PCI=y 126CONFIG_PCI=y
123CONFIG_PCI_LEGACY_PROC=y 127CONFIG_PCI_LEGACY_PROC=y
124CONFIG_PCI_NAMES=y 128CONFIG_PCI_NAMES=y
129# CONFIG_PCI_DEBUG is not set
125 130
126# 131#
127# PCCARD (PCMCIA/CardBus) support 132# PCCARD (PCMCIA/CardBus) support
@@ -131,7 +136,16 @@ CONFIG_PCI_NAMES=y
131# 136#
132# Kernel Features 137# Kernel Features
133# 138#
139# CONFIG_SMP is not set
134# CONFIG_PREEMPT is not set 140# CONFIG_PREEMPT is not set
141# CONFIG_NO_IDLE_HZ is not set
142# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
143CONFIG_SELECT_MEMORY_MODEL=y
144CONFIG_FLATMEM_MANUAL=y
145# CONFIG_DISCONTIGMEM_MANUAL is not set
146# CONFIG_SPARSEMEM_MANUAL is not set
147CONFIG_FLATMEM=y
148CONFIG_FLAT_NODE_MEM_MAP=y
135CONFIG_ALIGNMENT_TRAP=y 149CONFIG_ALIGNMENT_TRAP=y
136 150
137# 151#
@@ -270,7 +284,6 @@ CONFIG_MTD_IXP2000=y
270# 284#
271# Block devices 285# Block devices
272# 286#
273# CONFIG_BLK_DEV_FD is not set
274# CONFIG_BLK_CPQ_DA is not set 287# CONFIG_BLK_CPQ_DA is not set
275# CONFIG_BLK_CPQ_CISS_DA is not set 288# CONFIG_BLK_CPQ_CISS_DA is not set
276# CONFIG_BLK_DEV_DAC960 is not set 289# CONFIG_BLK_DEV_DAC960 is not set
@@ -309,6 +322,7 @@ CONFIG_IOSCHED_CFQ=y
309# 322#
310# Fusion MPT device support 323# Fusion MPT device support
311# 324#
325# CONFIG_FUSION is not set
312 326
313# 327#
314# IEEE 1394 (FireWire) support 328# IEEE 1394 (FireWire) support
@@ -330,12 +344,12 @@ CONFIG_NET=y
330# 344#
331CONFIG_PACKET=y 345CONFIG_PACKET=y
332CONFIG_PACKET_MMAP=y 346CONFIG_PACKET_MMAP=y
333# CONFIG_NETLINK_DEV is not set
334CONFIG_UNIX=y 347CONFIG_UNIX=y
335# CONFIG_NET_KEY is not set 348# CONFIG_NET_KEY is not set
336CONFIG_INET=y 349CONFIG_INET=y
337# CONFIG_IP_MULTICAST is not set 350# CONFIG_IP_MULTICAST is not set
338# CONFIG_IP_ADVANCED_ROUTER is not set 351# CONFIG_IP_ADVANCED_ROUTER is not set
352CONFIG_IP_FIB_HASH=y
339CONFIG_IP_PNP=y 353CONFIG_IP_PNP=y
340CONFIG_IP_PNP_DHCP=y 354CONFIG_IP_PNP_DHCP=y
341CONFIG_IP_PNP_BOOTP=y 355CONFIG_IP_PNP_BOOTP=y
@@ -350,6 +364,8 @@ CONFIG_SYN_COOKIES=y
350# CONFIG_INET_TUNNEL is not set 364# CONFIG_INET_TUNNEL is not set
351# CONFIG_IP_TCPDIAG is not set 365# CONFIG_IP_TCPDIAG is not set
352# CONFIG_IP_TCPDIAG_IPV6 is not set 366# CONFIG_IP_TCPDIAG_IPV6 is not set
367# CONFIG_TCP_CONG_ADVANCED is not set
368CONFIG_TCP_CONG_BIC=y
353# CONFIG_IPV6 is not set 369# CONFIG_IPV6 is not set
354# CONFIG_NETFILTER is not set 370# CONFIG_NETFILTER is not set
355 371
@@ -405,6 +421,7 @@ CONFIG_MII=y
405# CONFIG_SUNGEM is not set 421# CONFIG_SUNGEM is not set
406# CONFIG_NET_VENDOR_3COM is not set 422# CONFIG_NET_VENDOR_3COM is not set
407# CONFIG_SMC91X is not set 423# CONFIG_SMC91X is not set
424# CONFIG_DM9000 is not set
408 425
409# 426#
410# Tulip family network device support 427# Tulip family network device support
@@ -442,9 +459,11 @@ CONFIG_EEPRO100=y
442# CONFIG_HAMACHI is not set 459# CONFIG_HAMACHI is not set
443# CONFIG_YELLOWFIN is not set 460# CONFIG_YELLOWFIN is not set
444# CONFIG_R8169 is not set 461# CONFIG_R8169 is not set
462# CONFIG_SKGE is not set
445# CONFIG_SK98LIN is not set 463# CONFIG_SK98LIN is not set
446# CONFIG_VIA_VELOCITY is not set 464# CONFIG_VIA_VELOCITY is not set
447# CONFIG_TIGON3 is not set 465# CONFIG_TIGON3 is not set
466# CONFIG_BNX2 is not set
448 467
449# 468#
450# Ethernet (10000 Mbit) 469# Ethernet (10000 Mbit)
@@ -466,6 +485,7 @@ CONFIG_EEPRO100=y
466# Wan interfaces 485# Wan interfaces
467# 486#
468CONFIG_WAN=y 487CONFIG_WAN=y
488# CONFIG_DSCC4 is not set
469# CONFIG_LANMEDIA is not set 489# CONFIG_LANMEDIA is not set
470# CONFIG_SYNCLINK_SYNCPPP is not set 490# CONFIG_SYNCLINK_SYNCPPP is not set
471CONFIG_HDLC=y 491CONFIG_HDLC=y
@@ -528,7 +548,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
528# 548#
529# CONFIG_SERIO is not set 549# CONFIG_SERIO is not set
530# CONFIG_GAMEPORT is not set 550# CONFIG_GAMEPORT is not set
531CONFIG_SOUND_GAMEPORT=y
532 551
533# 552#
534# Character devices 553# Character devices
@@ -549,6 +568,7 @@ CONFIG_SERIAL_8250_NR_UARTS=2
549# 568#
550CONFIG_SERIAL_CORE=y 569CONFIG_SERIAL_CORE=y
551CONFIG_SERIAL_CORE_CONSOLE=y 570CONFIG_SERIAL_CORE_CONSOLE=y
571# CONFIG_SERIAL_JSM is not set
552CONFIG_UNIX98_PTYS=y 572CONFIG_UNIX98_PTYS=y
553CONFIG_LEGACY_PTYS=y 573CONFIG_LEGACY_PTYS=y
554CONFIG_LEGACY_PTY_COUNT=256 574CONFIG_LEGACY_PTY_COUNT=256
@@ -615,17 +635,18 @@ CONFIG_I2C_ALGOBIT=y
615# CONFIG_I2C_AMD8111 is not set 635# CONFIG_I2C_AMD8111 is not set
616# CONFIG_I2C_I801 is not set 636# CONFIG_I2C_I801 is not set
617# CONFIG_I2C_I810 is not set 637# CONFIG_I2C_I810 is not set
638# CONFIG_I2C_PIIX4 is not set
618# CONFIG_I2C_ISA is not set 639# CONFIG_I2C_ISA is not set
619# CONFIG_I2C_IXP2000 is not set 640# CONFIG_I2C_IXP2000 is not set
620# CONFIG_I2C_NFORCE2 is not set 641# CONFIG_I2C_NFORCE2 is not set
621# CONFIG_I2C_PARPORT_LIGHT is not set 642# CONFIG_I2C_PARPORT_LIGHT is not set
622# CONFIG_I2C_PIIX4 is not set
623# CONFIG_I2C_PROSAVAGE is not set 643# CONFIG_I2C_PROSAVAGE is not set
624# CONFIG_I2C_SAVAGE4 is not set 644# CONFIG_I2C_SAVAGE4 is not set
625# CONFIG_SCx200_ACB is not set 645# CONFIG_SCx200_ACB is not set
626# CONFIG_I2C_SIS5595 is not set 646# CONFIG_I2C_SIS5595 is not set
627# CONFIG_I2C_SIS630 is not set 647# CONFIG_I2C_SIS630 is not set
628# CONFIG_I2C_SIS96X is not set 648# CONFIG_I2C_SIS96X is not set
649# CONFIG_I2C_STUB is not set
629# CONFIG_I2C_VIA is not set 650# CONFIG_I2C_VIA is not set
630# CONFIG_I2C_VIAPRO is not set 651# CONFIG_I2C_VIAPRO is not set
631# CONFIG_I2C_VOODOO3 is not set 652# CONFIG_I2C_VOODOO3 is not set
@@ -639,7 +660,9 @@ CONFIG_I2C_SENSOR=y
639# CONFIG_SENSORS_ADM1025 is not set 660# CONFIG_SENSORS_ADM1025 is not set
640# CONFIG_SENSORS_ADM1026 is not set 661# CONFIG_SENSORS_ADM1026 is not set
641# CONFIG_SENSORS_ADM1031 is not set 662# CONFIG_SENSORS_ADM1031 is not set
663# CONFIG_SENSORS_ADM9240 is not set
642# CONFIG_SENSORS_ASB100 is not set 664# CONFIG_SENSORS_ASB100 is not set
665# CONFIG_SENSORS_ATXP1 is not set
643# CONFIG_SENSORS_DS1621 is not set 666# CONFIG_SENSORS_DS1621 is not set
644# CONFIG_SENSORS_FSCHER is not set 667# CONFIG_SENSORS_FSCHER is not set
645# CONFIG_SENSORS_FSCPOS is not set 668# CONFIG_SENSORS_FSCPOS is not set
@@ -655,6 +678,7 @@ CONFIG_I2C_SENSOR=y
655# CONFIG_SENSORS_LM85 is not set 678# CONFIG_SENSORS_LM85 is not set
656# CONFIG_SENSORS_LM87 is not set 679# CONFIG_SENSORS_LM87 is not set
657# CONFIG_SENSORS_LM90 is not set 680# CONFIG_SENSORS_LM90 is not set
681# CONFIG_SENSORS_LM92 is not set
658# CONFIG_SENSORS_MAX1619 is not set 682# CONFIG_SENSORS_MAX1619 is not set
659# CONFIG_SENSORS_PC87360 is not set 683# CONFIG_SENSORS_PC87360 is not set
660# CONFIG_SENSORS_SMSC47B397 is not set 684# CONFIG_SENSORS_SMSC47B397 is not set
@@ -664,14 +688,19 @@ CONFIG_I2C_SENSOR=y
664# CONFIG_SENSORS_W83781D is not set 688# CONFIG_SENSORS_W83781D is not set
665# CONFIG_SENSORS_W83L785TS is not set 689# CONFIG_SENSORS_W83L785TS is not set
666# CONFIG_SENSORS_W83627HF is not set 690# CONFIG_SENSORS_W83627HF is not set
691# CONFIG_SENSORS_W83627EHF is not set
667 692
668# 693#
669# Other I2C Chip support 694# Other I2C Chip support
670# 695#
696# CONFIG_SENSORS_DS1337 is not set
697# CONFIG_SENSORS_DS1374 is not set
671CONFIG_SENSORS_EEPROM=y 698CONFIG_SENSORS_EEPROM=y
672# CONFIG_SENSORS_PCF8574 is not set 699# CONFIG_SENSORS_PCF8574 is not set
700# CONFIG_SENSORS_PCA9539 is not set
673# CONFIG_SENSORS_PCF8591 is not set 701# CONFIG_SENSORS_PCF8591 is not set
674# CONFIG_SENSORS_RTC8564 is not set 702# CONFIG_SENSORS_RTC8564 is not set
703# CONFIG_SENSORS_MAX6875 is not set
675# CONFIG_I2C_DEBUG_CORE is not set 704# CONFIG_I2C_DEBUG_CORE is not set
676# CONFIG_I2C_DEBUG_ALGO is not set 705# CONFIG_I2C_DEBUG_ALGO is not set
677# CONFIG_I2C_DEBUG_BUS is not set 706# CONFIG_I2C_DEBUG_BUS is not set
@@ -725,6 +754,7 @@ CONFIG_EXT2_FS=y
725CONFIG_EXT2_FS_XATTR=y 754CONFIG_EXT2_FS_XATTR=y
726CONFIG_EXT2_FS_POSIX_ACL=y 755CONFIG_EXT2_FS_POSIX_ACL=y
727# CONFIG_EXT2_FS_SECURITY is not set 756# CONFIG_EXT2_FS_SECURITY is not set
757# CONFIG_EXT2_FS_XIP is not set
728CONFIG_EXT3_FS=y 758CONFIG_EXT3_FS=y
729CONFIG_EXT3_FS_XATTR=y 759CONFIG_EXT3_FS_XATTR=y
730CONFIG_EXT3_FS_POSIX_ACL=y 760CONFIG_EXT3_FS_POSIX_ACL=y
@@ -765,7 +795,6 @@ CONFIG_DNOTIFY=y
765# 795#
766CONFIG_PROC_FS=y 796CONFIG_PROC_FS=y
767CONFIG_SYSFS=y 797CONFIG_SYSFS=y
768# CONFIG_DEVFS_FS is not set
769# CONFIG_DEVPTS_FS_XATTR is not set 798# CONFIG_DEVPTS_FS_XATTR is not set
770CONFIG_TMPFS=y 799CONFIG_TMPFS=y
771# CONFIG_TMPFS_XATTR is not set 800# CONFIG_TMPFS_XATTR is not set
@@ -803,12 +832,14 @@ CONFIG_JFFS2_RTIME=y
803# 832#
804CONFIG_NFS_FS=y 833CONFIG_NFS_FS=y
805CONFIG_NFS_V3=y 834CONFIG_NFS_V3=y
835# CONFIG_NFS_V3_ACL is not set
806# CONFIG_NFS_V4 is not set 836# CONFIG_NFS_V4 is not set
807# CONFIG_NFS_DIRECTIO is not set 837# CONFIG_NFS_DIRECTIO is not set
808# CONFIG_NFSD is not set 838# CONFIG_NFSD is not set
809CONFIG_ROOT_NFS=y 839CONFIG_ROOT_NFS=y
810CONFIG_LOCKD=y 840CONFIG_LOCKD=y
811CONFIG_LOCKD_V4=y 841CONFIG_LOCKD_V4=y
842CONFIG_NFS_COMMON=y
812CONFIG_SUNRPC=y 843CONFIG_SUNRPC=y
813# CONFIG_RPCSEC_GSS_KRB5 is not set 844# CONFIG_RPCSEC_GSS_KRB5 is not set
814# CONFIG_RPCSEC_GSS_SPKM3 is not set 845# CONFIG_RPCSEC_GSS_SPKM3 is not set
diff --git a/arch/arm/configs/omap_h2_1610_defconfig b/arch/arm/configs/omap_h2_1610_defconfig
index 4e58d9341bce..24955263b096 100644
--- a/arch/arm/configs/omap_h2_1610_defconfig
+++ b/arch/arm/configs/omap_h2_1610_defconfig
@@ -1,14 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc1-bk2 3# Linux kernel version: 2.6.13-rc2
4# Sun Mar 27 17:52:41 2005 4# Fri Jul 8 04:49:34 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_UID16=y 8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_GENERIC_IOMAP=y
12 11
13# 12#
14# Code maturity level options 13# Code maturity level options
@@ -17,6 +16,7 @@ CONFIG_EXPERIMENTAL=y
17CONFIG_CLEAN_COMPILE=y 16CONFIG_CLEAN_COMPILE=y
18CONFIG_BROKEN_ON_SMP=y 17CONFIG_BROKEN_ON_SMP=y
19CONFIG_LOCK_KERNEL=y 18CONFIG_LOCK_KERNEL=y
19CONFIG_INIT_ENV_ARG_LIMIT=32
20 20
21# 21#
22# General setup 22# General setup
@@ -33,8 +33,9 @@ CONFIG_KOBJECT_UEVENT=y
33# CONFIG_IKCONFIG is not set 33# CONFIG_IKCONFIG is not set
34# CONFIG_EMBEDDED is not set 34# CONFIG_EMBEDDED is not set
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 36# CONFIG_KALLSYMS_EXTRA_PASS is not set
37CONFIG_PRINTK=y
38CONFIG_BUG=y
38CONFIG_BASE_FULL=y 39CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 40CONFIG_FUTEX=y
40CONFIG_EPOLL=y 41CONFIG_EPOLL=y
@@ -82,10 +83,28 @@ CONFIG_ARCH_OMAP=y
82# CONFIG_ARCH_VERSATILE is not set 83# CONFIG_ARCH_VERSATILE is not set
83# CONFIG_ARCH_IMX is not set 84# CONFIG_ARCH_IMX is not set
84# CONFIG_ARCH_H720X is not set 85# CONFIG_ARCH_H720X is not set
86# CONFIG_ARCH_AAEC2000 is not set
85 87
86# 88#
87# TI OMAP Implementations 89# TI OMAP Implementations
88# 90#
91CONFIG_ARCH_OMAP_OTG=y
92CONFIG_ARCH_OMAP1=y
93# CONFIG_ARCH_OMAP2 is not set
94
95#
96# OMAP Feature Selections
97#
98# CONFIG_OMAP_RESET_CLOCKS is not set
99CONFIG_OMAP_MUX=y
100# CONFIG_OMAP_MUX_DEBUG is not set
101CONFIG_OMAP_MUX_WARNINGS=y
102# CONFIG_OMAP_MPU_TIMER is not set
103CONFIG_OMAP_32K_TIMER=y
104CONFIG_OMAP_32K_TIMER_HZ=128
105CONFIG_OMAP_LL_DEBUG_UART1=y
106# CONFIG_OMAP_LL_DEBUG_UART2 is not set
107# CONFIG_OMAP_LL_DEBUG_UART3 is not set
89 108
90# 109#
91# OMAP Core Type 110# OMAP Core Type
@@ -93,7 +112,6 @@ CONFIG_ARCH_OMAP=y
93# CONFIG_ARCH_OMAP730 is not set 112# CONFIG_ARCH_OMAP730 is not set
94# CONFIG_ARCH_OMAP1510 is not set 113# CONFIG_ARCH_OMAP1510 is not set
95CONFIG_ARCH_OMAP16XX=y 114CONFIG_ARCH_OMAP16XX=y
96CONFIG_ARCH_OMAP_OTG=y
97 115
98# 116#
99# OMAP Board Type 117# OMAP Board Type
@@ -101,21 +119,14 @@ CONFIG_ARCH_OMAP_OTG=y
101# CONFIG_MACH_OMAP_INNOVATOR is not set 119# CONFIG_MACH_OMAP_INNOVATOR is not set
102CONFIG_MACH_OMAP_H2=y 120CONFIG_MACH_OMAP_H2=y
103# CONFIG_MACH_OMAP_H3 is not set 121# CONFIG_MACH_OMAP_H3 is not set
104# CONFIG_MACH_OMAP_H4 is not set
105# CONFIG_MACH_OMAP_OSK is not set 122# CONFIG_MACH_OMAP_OSK is not set
106# CONFIG_MACH_OMAP_GENERIC is not set 123# CONFIG_MACH_OMAP_GENERIC is not set
107 124
108# 125#
109# OMAP Feature Selections 126# OMAP CPU Speed
110# 127#
111CONFIG_OMAP_MUX=y 128# CONFIG_OMAP_CLOCKS_SET_BY_BOOTLOADER is not set
112# CONFIG_OMAP_MUX_DEBUG is not set 129# CONFIG_OMAP_ARM_216MHZ is not set
113CONFIG_OMAP_MUX_WARNINGS=y
114CONFIG_OMAP_MPU_TIMER=y
115# CONFIG_OMAP_32K_TIMER is not set
116CONFIG_OMAP_LL_DEBUG_UART1=y
117# CONFIG_OMAP_LL_DEBUG_UART2 is not set
118# CONFIG_OMAP_LL_DEBUG_UART3 is not set
119CONFIG_OMAP_ARM_192MHZ=y 130CONFIG_OMAP_ARM_192MHZ=y
120# CONFIG_OMAP_ARM_168MHZ is not set 131# CONFIG_OMAP_ARM_168MHZ is not set
121# CONFIG_OMAP_ARM_120MHZ is not set 132# CONFIG_OMAP_ARM_120MHZ is not set
@@ -145,6 +156,7 @@ CONFIG_ARM_THUMB=y
145# 156#
146# Bus support 157# Bus support
147# 158#
159CONFIG_ISA_DMA_API=y
148 160
149# 161#
150# PCCARD (PCMCIA/CardBus) support 162# PCCARD (PCMCIA/CardBus) support
@@ -154,7 +166,16 @@ CONFIG_ARM_THUMB=y
154# 166#
155# Kernel Features 167# Kernel Features
156# 168#
169# CONFIG_SMP is not set
157CONFIG_PREEMPT=y 170CONFIG_PREEMPT=y
171CONFIG_NO_IDLE_HZ=y
172# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
173CONFIG_SELECT_MEMORY_MODEL=y
174CONFIG_FLATMEM_MANUAL=y
175# CONFIG_DISCONTIGMEM_MANUAL is not set
176# CONFIG_SPARSEMEM_MANUAL is not set
177CONFIG_FLATMEM=y
178CONFIG_FLAT_NODE_MEM_MAP=y
158# CONFIG_LEDS is not set 179# CONFIG_LEDS is not set
159CONFIG_ALIGNMENT_TRAP=y 180CONFIG_ALIGNMENT_TRAP=y
160 181
@@ -167,6 +188,22 @@ CONFIG_CMDLINE="mem=32M console=ttyS0,115200n8 root=0801 ro init=/bin/sh"
167# CONFIG_XIP_KERNEL is not set 188# CONFIG_XIP_KERNEL is not set
168 189
169# 190#
191# CPU Frequency scaling
192#
193CONFIG_CPU_FREQ=y
194CONFIG_CPU_FREQ_TABLE=y
195# CONFIG_CPU_FREQ_DEBUG is not set
196CONFIG_CPU_FREQ_STAT=y
197# CONFIG_CPU_FREQ_STAT_DETAILS is not set
198# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
199CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
200# CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set
201# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
202CONFIG_CPU_FREQ_GOV_USERSPACE=y
203# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
204# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
205
206#
170# Floating point emulation 207# Floating point emulation
171# 208#
172 209
@@ -202,7 +239,6 @@ CONFIG_PM=y
202CONFIG_STANDALONE=y 239CONFIG_STANDALONE=y
203CONFIG_PREVENT_FIRMWARE_BUILD=y 240CONFIG_PREVENT_FIRMWARE_BUILD=y
204# CONFIG_FW_LOADER is not set 241# CONFIG_FW_LOADER is not set
205CONFIG_DEBUG_DRIVER=y
206 242
207# 243#
208# Memory Technology Devices (MTD) 244# Memory Technology Devices (MTD)
@@ -292,7 +328,6 @@ CONFIG_MTD_CFI_UTIL=y
292# 328#
293# Block devices 329# Block devices
294# 330#
295# CONFIG_BLK_DEV_FD is not set
296# CONFIG_BLK_DEV_COW_COMMON is not set 331# CONFIG_BLK_DEV_COW_COMMON is not set
297CONFIG_BLK_DEV_LOOP=y 332CONFIG_BLK_DEV_LOOP=y
298# CONFIG_BLK_DEV_CRYPTOLOOP is not set 333# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -327,6 +362,7 @@ CONFIG_SCSI_PROC_FS=y
327# CONFIG_CHR_DEV_OSST is not set 362# CONFIG_CHR_DEV_OSST is not set
328# CONFIG_BLK_DEV_SR is not set 363# CONFIG_BLK_DEV_SR is not set
329# CONFIG_CHR_DEV_SG is not set 364# CONFIG_CHR_DEV_SG is not set
365# CONFIG_CHR_DEV_SCH is not set
330 366
331# 367#
332# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 368# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -356,6 +392,7 @@ CONFIG_SCSI_PROC_FS=y
356# 392#
357# Fusion MPT device support 393# Fusion MPT device support
358# 394#
395# CONFIG_FUSION is not set
359 396
360# 397#
361# IEEE 1394 (FireWire) support 398# IEEE 1394 (FireWire) support
@@ -375,12 +412,12 @@ CONFIG_NET=y
375# 412#
376CONFIG_PACKET=y 413CONFIG_PACKET=y
377# CONFIG_PACKET_MMAP is not set 414# CONFIG_PACKET_MMAP is not set
378# CONFIG_NETLINK_DEV is not set
379CONFIG_UNIX=y 415CONFIG_UNIX=y
380# CONFIG_NET_KEY is not set 416# CONFIG_NET_KEY is not set
381CONFIG_INET=y 417CONFIG_INET=y
382# CONFIG_IP_MULTICAST is not set 418# CONFIG_IP_MULTICAST is not set
383# CONFIG_IP_ADVANCED_ROUTER is not set 419# CONFIG_IP_ADVANCED_ROUTER is not set
420CONFIG_IP_FIB_HASH=y
384CONFIG_IP_PNP=y 421CONFIG_IP_PNP=y
385CONFIG_IP_PNP_DHCP=y 422CONFIG_IP_PNP_DHCP=y
386CONFIG_IP_PNP_BOOTP=y 423CONFIG_IP_PNP_BOOTP=y
@@ -395,6 +432,8 @@ CONFIG_IP_PNP_BOOTP=y
395# CONFIG_INET_TUNNEL is not set 432# CONFIG_INET_TUNNEL is not set
396CONFIG_IP_TCPDIAG=y 433CONFIG_IP_TCPDIAG=y
397# CONFIG_IP_TCPDIAG_IPV6 is not set 434# CONFIG_IP_TCPDIAG_IPV6 is not set
435# CONFIG_TCP_CONG_ADVANCED is not set
436CONFIG_TCP_CONG_BIC=y
398# CONFIG_IPV6 is not set 437# CONFIG_IPV6 is not set
399# CONFIG_NETFILTER is not set 438# CONFIG_NETFILTER is not set
400 439
@@ -442,6 +481,7 @@ CONFIG_NETDEVICES=y
442CONFIG_NET_ETHERNET=y 481CONFIG_NET_ETHERNET=y
443CONFIG_MII=y 482CONFIG_MII=y
444CONFIG_SMC91X=y 483CONFIG_SMC91X=y
484# CONFIG_DM9000 is not set
445 485
446# 486#
447# Ethernet (1000 Mbit) 487# Ethernet (1000 Mbit)
@@ -518,7 +558,6 @@ CONFIG_SERIO=y
518CONFIG_SERIO_SERPORT=y 558CONFIG_SERIO_SERPORT=y
519# CONFIG_SERIO_RAW is not set 559# CONFIG_SERIO_RAW is not set
520# CONFIG_GAMEPORT is not set 560# CONFIG_GAMEPORT is not set
521CONFIG_SOUND_GAMEPORT=y
522 561
523# 562#
524# Character devices 563# Character devices
@@ -567,13 +606,11 @@ CONFIG_WATCHDOG_NOWAYOUT=y
567# 606#
568# Ftape, the floppy tape device driver 607# Ftape, the floppy tape device driver
569# 608#
570# CONFIG_DRM is not set
571# CONFIG_RAW_DRIVER is not set 609# CONFIG_RAW_DRIVER is not set
572 610
573# 611#
574# TPM devices 612# TPM devices
575# 613#
576# CONFIG_TCG_TPM is not set
577 614
578# 615#
579# I2C support 616# I2C support
@@ -604,7 +641,9 @@ CONFIG_I2C_CHARDEV=y
604# CONFIG_SENSORS_ADM1025 is not set 641# CONFIG_SENSORS_ADM1025 is not set
605# CONFIG_SENSORS_ADM1026 is not set 642# CONFIG_SENSORS_ADM1026 is not set
606# CONFIG_SENSORS_ADM1031 is not set 643# CONFIG_SENSORS_ADM1031 is not set
644# CONFIG_SENSORS_ADM9240 is not set
607# CONFIG_SENSORS_ASB100 is not set 645# CONFIG_SENSORS_ASB100 is not set
646# CONFIG_SENSORS_ATXP1 is not set
608# CONFIG_SENSORS_DS1621 is not set 647# CONFIG_SENSORS_DS1621 is not set
609# CONFIG_SENSORS_FSCHER is not set 648# CONFIG_SENSORS_FSCHER is not set
610# CONFIG_SENSORS_FSCPOS is not set 649# CONFIG_SENSORS_FSCPOS is not set
@@ -620,6 +659,7 @@ CONFIG_I2C_CHARDEV=y
620# CONFIG_SENSORS_LM85 is not set 659# CONFIG_SENSORS_LM85 is not set
621# CONFIG_SENSORS_LM87 is not set 660# CONFIG_SENSORS_LM87 is not set
622# CONFIG_SENSORS_LM90 is not set 661# CONFIG_SENSORS_LM90 is not set
662# CONFIG_SENSORS_LM92 is not set
623# CONFIG_SENSORS_MAX1619 is not set 663# CONFIG_SENSORS_MAX1619 is not set
624# CONFIG_SENSORS_PC87360 is not set 664# CONFIG_SENSORS_PC87360 is not set
625# CONFIG_SENSORS_SMSC47B397 is not set 665# CONFIG_SENSORS_SMSC47B397 is not set
@@ -627,15 +667,21 @@ CONFIG_I2C_CHARDEV=y
627# CONFIG_SENSORS_W83781D is not set 667# CONFIG_SENSORS_W83781D is not set
628# CONFIG_SENSORS_W83L785TS is not set 668# CONFIG_SENSORS_W83L785TS is not set
629# CONFIG_SENSORS_W83627HF is not set 669# CONFIG_SENSORS_W83627HF is not set
670# CONFIG_SENSORS_W83627EHF is not set
630 671
631# 672#
632# Other I2C Chip support 673# Other I2C Chip support
633# 674#
675# CONFIG_SENSORS_DS1337 is not set
676# CONFIG_SENSORS_DS1374 is not set
634# CONFIG_SENSORS_EEPROM is not set 677# CONFIG_SENSORS_EEPROM is not set
635# CONFIG_SENSORS_PCF8574 is not set 678# CONFIG_SENSORS_PCF8574 is not set
679# CONFIG_SENSORS_PCA9539 is not set
636# CONFIG_SENSORS_PCF8591 is not set 680# CONFIG_SENSORS_PCF8591 is not set
637# CONFIG_SENSORS_RTC8564 is not set 681# CONFIG_SENSORS_RTC8564 is not set
638CONFIG_ISP1301_OMAP=y 682CONFIG_ISP1301_OMAP=y
683CONFIG_TPS65010=y
684# CONFIG_SENSORS_MAX6875 is not set
639# CONFIG_I2C_DEBUG_CORE is not set 685# CONFIG_I2C_DEBUG_CORE is not set
640# CONFIG_I2C_DEBUG_ALGO is not set 686# CONFIG_I2C_DEBUG_ALGO is not set
641# CONFIG_I2C_DEBUG_BUS is not set 687# CONFIG_I2C_DEBUG_BUS is not set
@@ -663,8 +709,10 @@ CONFIG_FB=y
663# CONFIG_FB_CFB_COPYAREA is not set 709# CONFIG_FB_CFB_COPYAREA is not set
664# CONFIG_FB_CFB_IMAGEBLIT is not set 710# CONFIG_FB_CFB_IMAGEBLIT is not set
665# CONFIG_FB_SOFT_CURSOR is not set 711# CONFIG_FB_SOFT_CURSOR is not set
712# CONFIG_FB_MACMODES is not set
666CONFIG_FB_MODE_HELPERS=y 713CONFIG_FB_MODE_HELPERS=y
667# CONFIG_FB_TILEBLITTING is not set 714# CONFIG_FB_TILEBLITTING is not set
715# CONFIG_FB_S1D13XXX is not set
668# CONFIG_FB_VIRTUAL is not set 716# CONFIG_FB_VIRTUAL is not set
669 717
670# 718#
@@ -677,11 +725,13 @@ CONFIG_FONTS=y
677CONFIG_FONT_8x8=y 725CONFIG_FONT_8x8=y
678CONFIG_FONT_8x16=y 726CONFIG_FONT_8x16=y
679# CONFIG_FONT_6x11 is not set 727# CONFIG_FONT_6x11 is not set
728# CONFIG_FONT_7x14 is not set
680# CONFIG_FONT_PEARL_8x8 is not set 729# CONFIG_FONT_PEARL_8x8 is not set
681# CONFIG_FONT_ACORN_8x8 is not set 730# CONFIG_FONT_ACORN_8x8 is not set
682# CONFIG_FONT_MINI_4x6 is not set 731# CONFIG_FONT_MINI_4x6 is not set
683# CONFIG_FONT_SUN8x16 is not set 732# CONFIG_FONT_SUN8x16 is not set
684# CONFIG_FONT_SUN12x22 is not set 733# CONFIG_FONT_SUN12x22 is not set
734# CONFIG_FONT_10x18 is not set
685 735
686# 736#
687# Logo configuration 737# Logo configuration
@@ -729,14 +779,14 @@ CONFIG_USB_ARCH_HAS_OHCI=y
729# 779#
730CONFIG_USB_GADGET=y 780CONFIG_USB_GADGET=y
731# CONFIG_USB_GADGET_DEBUG_FILES is not set 781# CONFIG_USB_GADGET_DEBUG_FILES is not set
782CONFIG_USB_GADGET_SELECTED=y
732# CONFIG_USB_GADGET_NET2280 is not set 783# CONFIG_USB_GADGET_NET2280 is not set
733# CONFIG_USB_GADGET_PXA2XX is not set 784# CONFIG_USB_GADGET_PXA2XX is not set
734# CONFIG_USB_GADGET_GOKU is not set 785# CONFIG_USB_GADGET_GOKU is not set
735# CONFIG_USB_GADGET_SA1100 is not set
736# CONFIG_USB_GADGET_LH7A40X is not set 786# CONFIG_USB_GADGET_LH7A40X is not set
737# CONFIG_USB_GADGET_DUMMY_HCD is not set
738CONFIG_USB_GADGET_OMAP=y 787CONFIG_USB_GADGET_OMAP=y
739CONFIG_USB_OMAP=y 788CONFIG_USB_OMAP=y
789# CONFIG_USB_GADGET_DUMMY_HCD is not set
740# CONFIG_USB_GADGET_DUALSPEED is not set 790# CONFIG_USB_GADGET_DUALSPEED is not set
741# CONFIG_USB_ZERO is not set 791# CONFIG_USB_ZERO is not set
742CONFIG_USB_ETH=y 792CONFIG_USB_ETH=y
@@ -755,6 +805,7 @@ CONFIG_USB_ETH_RNDIS=y
755# 805#
756CONFIG_EXT2_FS=y 806CONFIG_EXT2_FS=y
757# CONFIG_EXT2_FS_XATTR is not set 807# CONFIG_EXT2_FS_XATTR is not set
808# CONFIG_EXT2_FS_XIP is not set
758# CONFIG_EXT3_FS is not set 809# CONFIG_EXT3_FS is not set
759# CONFIG_JBD is not set 810# CONFIG_JBD is not set
760# CONFIG_REISERFS_FS is not set 811# CONFIG_REISERFS_FS is not set
@@ -791,7 +842,6 @@ CONFIG_FAT_DEFAULT_CODEPAGE=437
791# 842#
792CONFIG_PROC_FS=y 843CONFIG_PROC_FS=y
793CONFIG_SYSFS=y 844CONFIG_SYSFS=y
794# CONFIG_DEVFS_FS is not set
795# CONFIG_DEVPTS_FS_XATTR is not set 845# CONFIG_DEVPTS_FS_XATTR is not set
796# CONFIG_TMPFS is not set 846# CONFIG_TMPFS is not set
797# CONFIG_HUGETLB_PAGE is not set 847# CONFIG_HUGETLB_PAGE is not set
@@ -828,12 +878,14 @@ CONFIG_CRAMFS=y
828# 878#
829CONFIG_NFS_FS=y 879CONFIG_NFS_FS=y
830CONFIG_NFS_V3=y 880CONFIG_NFS_V3=y
881# CONFIG_NFS_V3_ACL is not set
831CONFIG_NFS_V4=y 882CONFIG_NFS_V4=y
832# CONFIG_NFS_DIRECTIO is not set 883# CONFIG_NFS_DIRECTIO is not set
833# CONFIG_NFSD is not set 884# CONFIG_NFSD is not set
834CONFIG_ROOT_NFS=y 885CONFIG_ROOT_NFS=y
835CONFIG_LOCKD=y 886CONFIG_LOCKD=y
836CONFIG_LOCKD_V4=y 887CONFIG_LOCKD_V4=y
888CONFIG_NFS_COMMON=y
837CONFIG_SUNRPC=y 889CONFIG_SUNRPC=y
838CONFIG_SUNRPC_GSS=y 890CONFIG_SUNRPC_GSS=y
839CONFIG_RPCSEC_GSS_KRB5=y 891CONFIG_RPCSEC_GSS_KRB5=y
@@ -903,24 +955,11 @@ CONFIG_NLS_DEFAULT="iso8859-1"
903# Kernel hacking 955# Kernel hacking
904# 956#
905# CONFIG_PRINTK_TIME is not set 957# CONFIG_PRINTK_TIME is not set
906CONFIG_DEBUG_KERNEL=y 958# CONFIG_DEBUG_KERNEL is not set
907# CONFIG_MAGIC_SYSRQ is not set
908CONFIG_LOG_BUF_SHIFT=14 959CONFIG_LOG_BUF_SHIFT=14
909# CONFIG_SCHEDSTATS is not set
910# CONFIG_DEBUG_SLAB is not set
911CONFIG_DEBUG_PREEMPT=y
912# CONFIG_DEBUG_SPINLOCK is not set
913# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
914# CONFIG_DEBUG_KOBJECT is not set
915CONFIG_DEBUG_BUGVERBOSE=y 960CONFIG_DEBUG_BUGVERBOSE=y
916CONFIG_DEBUG_INFO=y
917# CONFIG_DEBUG_FS is not set
918CONFIG_FRAME_POINTER=y 961CONFIG_FRAME_POINTER=y
919CONFIG_DEBUG_USER=y 962# CONFIG_DEBUG_USER is not set
920# CONFIG_DEBUG_WAITQ is not set
921CONFIG_DEBUG_ERRORS=y
922CONFIG_DEBUG_LL=y
923# CONFIG_DEBUG_ICEDCC is not set
924 963
925# 964#
926# Security options 965# Security options
diff --git a/arch/arm/configs/omnimeter_defconfig b/arch/arm/configs/omnimeter_defconfig
deleted file mode 100644
index 78fdb4a428b1..000000000000
--- a/arch/arm/configs/omnimeter_defconfig
+++ /dev/null
@@ -1,803 +0,0 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc1-bk2
4# Sun Mar 27 21:31:45 2005
5#
6CONFIG_ARM=y
7CONFIG_MMU=y
8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_GENERIC_IOMAP=y
12
13#
14# Code maturity level options
15#
16CONFIG_EXPERIMENTAL=y
17CONFIG_CLEAN_COMPILE=y
18CONFIG_BROKEN_ON_SMP=y
19
20#
21# General setup
22#
23CONFIG_LOCALVERSION=""
24CONFIG_SWAP=y
25CONFIG_SYSVIPC=y
26# CONFIG_POSIX_MQUEUE is not set
27# CONFIG_BSD_PROCESS_ACCT is not set
28CONFIG_SYSCTL=y
29# CONFIG_AUDIT is not set
30CONFIG_HOTPLUG=y
31CONFIG_KOBJECT_UEVENT=y
32# CONFIG_IKCONFIG is not set
33# CONFIG_EMBEDDED is not set
34CONFIG_KALLSYMS=y
35# CONFIG_KALLSYMS_EXTRA_PASS is not set
36CONFIG_BASE_FULL=y
37CONFIG_FUTEX=y
38CONFIG_EPOLL=y
39CONFIG_CC_OPTIMIZE_FOR_SIZE=y
40CONFIG_SHMEM=y
41CONFIG_CC_ALIGN_FUNCTIONS=0
42CONFIG_CC_ALIGN_LABELS=0
43CONFIG_CC_ALIGN_LOOPS=0
44CONFIG_CC_ALIGN_JUMPS=0
45# CONFIG_TINY_SHMEM is not set
46CONFIG_BASE_SMALL=0
47
48#
49# Loadable module support
50#
51CONFIG_MODULES=y
52# CONFIG_MODULE_UNLOAD is not set
53CONFIG_OBSOLETE_MODPARM=y
54# CONFIG_MODVERSIONS is not set
55# CONFIG_MODULE_SRCVERSION_ALL is not set
56CONFIG_KMOD=y
57
58#
59# System Type
60#
61# CONFIG_ARCH_CLPS7500 is not set
62# CONFIG_ARCH_CLPS711X is not set
63# CONFIG_ARCH_CO285 is not set
64# CONFIG_ARCH_EBSA110 is not set
65# CONFIG_ARCH_CAMELOT is not set
66# CONFIG_ARCH_FOOTBRIDGE is not set
67# CONFIG_ARCH_INTEGRATOR is not set
68# CONFIG_ARCH_IOP3XX is not set
69# CONFIG_ARCH_IXP4XX is not set
70# CONFIG_ARCH_IXP2000 is not set
71# CONFIG_ARCH_L7200 is not set
72# CONFIG_ARCH_PXA is not set
73# CONFIG_ARCH_RPC is not set
74CONFIG_ARCH_SA1100=y
75# CONFIG_ARCH_S3C2410 is not set
76# CONFIG_ARCH_SHARK is not set
77# CONFIG_ARCH_LH7A40X is not set
78# CONFIG_ARCH_OMAP is not set
79# CONFIG_ARCH_VERSATILE is not set
80# CONFIG_ARCH_IMX is not set
81# CONFIG_ARCH_H720X is not set
82
83#
84# SA11x0 Implementations
85#
86# CONFIG_SA1100_ASSABET is not set
87# CONFIG_SA1100_CERF is not set
88# CONFIG_SA1100_COLLIE is not set
89# CONFIG_SA1100_H3100 is not set
90# CONFIG_SA1100_H3600 is not set
91# CONFIG_SA1100_H3800 is not set
92# CONFIG_SA1100_BADGE4 is not set
93# CONFIG_SA1100_JORNADA720 is not set
94# CONFIG_SA1100_HACKKIT is not set
95# CONFIG_SA1100_LART is not set
96# CONFIG_SA1100_PLEB is not set
97# CONFIG_SA1100_SHANNON is not set
98# CONFIG_SA1100_SIMPAD is not set
99# CONFIG_SA1100_SSP is not set
100
101#
102# Processor Type
103#
104CONFIG_CPU_32=y
105CONFIG_CPU_SA1100=y
106CONFIG_CPU_32v4=y
107CONFIG_CPU_ABRT_EV4=y
108CONFIG_CPU_CACHE_V4WB=y
109CONFIG_CPU_CACHE_VIVT=y
110CONFIG_CPU_TLB_V4WB=y
111CONFIG_CPU_MINICACHE=y
112
113#
114# Processor Features
115#
116
117#
118# Bus support
119#
120CONFIG_ISA=y
121
122#
123# PCCARD (PCMCIA/CardBus) support
124#
125CONFIG_PCCARD=y
126# CONFIG_PCMCIA_DEBUG is not set
127CONFIG_PCMCIA=y
128
129#
130# PC-card bridges
131#
132CONFIG_I82365=y
133# CONFIG_TCIC is not set
134CONFIG_PCMCIA_SA1100=y
135CONFIG_PCCARD_NONSTATIC=y
136
137#
138# Kernel Features
139#
140# CONFIG_PREEMPT is not set
141CONFIG_DISCONTIGMEM=y
142# CONFIG_LEDS is not set
143CONFIG_ALIGNMENT_TRAP=y
144
145#
146# Boot options
147#
148CONFIG_ZBOOT_ROM_TEXT=0x0
149CONFIG_ZBOOT_ROM_BSS=0x0
150CONFIG_CMDLINE="keepinitrd mem=16M root=/dev/ram ramdisk=8192 initrd=0xd0000000,4M"
151# CONFIG_XIP_KERNEL is not set
152
153#
154# CPU Frequency scaling
155#
156# CONFIG_CPU_FREQ is not set
157
158#
159# Floating point emulation
160#
161
162#
163# At least one emulation must be selected
164#
165# CONFIG_FPE_NWFPE is not set
166# CONFIG_FPE_FASTFPE is not set
167
168#
169# Userspace binary formats
170#
171CONFIG_BINFMT_ELF=y
172CONFIG_BINFMT_AOUT=y
173# CONFIG_BINFMT_MISC is not set
174# CONFIG_ARTHUR is not set
175
176#
177# Power management options
178#
179# CONFIG_PM is not set
180
181#
182# Device Drivers
183#
184
185#
186# Generic Driver Options
187#
188CONFIG_STANDALONE=y
189CONFIG_PREVENT_FIRMWARE_BUILD=y
190# CONFIG_FW_LOADER is not set
191
192#
193# Memory Technology Devices (MTD)
194#
195# CONFIG_MTD is not set
196
197#
198# Parallel port support
199#
200# CONFIG_PARPORT is not set
201
202#
203# Plug and Play support
204#
205# CONFIG_PNP is not set
206
207#
208# Block devices
209#
210# CONFIG_BLK_DEV_FD is not set
211# CONFIG_BLK_DEV_XD is not set
212# CONFIG_BLK_DEV_COW_COMMON is not set
213CONFIG_BLK_DEV_LOOP=m
214# CONFIG_BLK_DEV_CRYPTOLOOP is not set
215CONFIG_BLK_DEV_NBD=m
216# CONFIG_BLK_DEV_RAM is not set
217CONFIG_BLK_DEV_RAM_COUNT=16
218CONFIG_INITRAMFS_SOURCE=""
219# CONFIG_CDROM_PKTCDVD is not set
220
221#
222# IO Schedulers
223#
224CONFIG_IOSCHED_NOOP=y
225CONFIG_IOSCHED_AS=y
226CONFIG_IOSCHED_DEADLINE=y
227CONFIG_IOSCHED_CFQ=y
228# CONFIG_ATA_OVER_ETH is not set
229
230#
231# ATA/ATAPI/MFM/RLL support
232#
233CONFIG_IDE=y
234CONFIG_BLK_DEV_IDE=y
235
236#
237# Please see Documentation/ide.txt for help/info on IDE drives
238#
239# CONFIG_BLK_DEV_IDE_SATA is not set
240CONFIG_BLK_DEV_IDEDISK=y
241# CONFIG_IDEDISK_MULTI_MODE is not set
242# CONFIG_BLK_DEV_IDECS is not set
243# CONFIG_BLK_DEV_IDECD is not set
244# CONFIG_BLK_DEV_IDETAPE is not set
245# CONFIG_BLK_DEV_IDEFLOPPY is not set
246# CONFIG_IDE_TASK_IOCTL is not set
247
248#
249# IDE chipset support/bugfixes
250#
251CONFIG_IDE_GENERIC=y
252# CONFIG_IDE_ARM is not set
253# CONFIG_IDE_CHIPSETS is not set
254# CONFIG_BLK_DEV_IDEDMA is not set
255# CONFIG_IDEDMA_AUTO is not set
256# CONFIG_BLK_DEV_HD is not set
257
258#
259# SCSI device support
260#
261# CONFIG_SCSI is not set
262
263#
264# Multi-device support (RAID and LVM)
265#
266# CONFIG_MD is not set
267
268#
269# Fusion MPT device support
270#
271
272#
273# IEEE 1394 (FireWire) support
274#
275
276#
277# I2O device support
278#
279
280#
281# Networking support
282#
283CONFIG_NET=y
284
285#
286# Networking options
287#
288CONFIG_PACKET=y
289CONFIG_PACKET_MMAP=y
290# CONFIG_NETLINK_DEV is not set
291CONFIG_UNIX=y
292# CONFIG_NET_KEY is not set
293CONFIG_INET=y
294CONFIG_IP_MULTICAST=y
295# CONFIG_IP_ADVANCED_ROUTER is not set
296# CONFIG_IP_PNP is not set
297# CONFIG_NET_IPIP is not set
298# CONFIG_NET_IPGRE is not set
299# CONFIG_IP_MROUTE is not set
300# CONFIG_ARPD is not set
301# CONFIG_SYN_COOKIES is not set
302# CONFIG_INET_AH is not set
303# CONFIG_INET_ESP is not set
304# CONFIG_INET_IPCOMP is not set
305# CONFIG_INET_TUNNEL is not set
306CONFIG_IP_TCPDIAG=y
307# CONFIG_IP_TCPDIAG_IPV6 is not set
308
309#
310# IP: Virtual Server Configuration
311#
312# CONFIG_IP_VS is not set
313# CONFIG_IPV6 is not set
314CONFIG_NETFILTER=y
315# CONFIG_NETFILTER_DEBUG is not set
316
317#
318# IP: Netfilter Configuration
319#
320# CONFIG_IP_NF_CONNTRACK is not set
321# CONFIG_IP_NF_CONNTRACK_MARK is not set
322# CONFIG_IP_NF_QUEUE is not set
323# CONFIG_IP_NF_IPTABLES is not set
324# CONFIG_IP_NF_ARPTABLES is not set
325
326#
327# SCTP Configuration (EXPERIMENTAL)
328#
329# CONFIG_IP_SCTP is not set
330# CONFIG_ATM is not set
331# CONFIG_BRIDGE is not set
332# CONFIG_VLAN_8021Q is not set
333# CONFIG_DECNET is not set
334# CONFIG_LLC2 is not set
335# CONFIG_IPX is not set
336# CONFIG_ATALK is not set
337# CONFIG_X25 is not set
338# CONFIG_LAPB is not set
339# CONFIG_NET_DIVERT is not set
340# CONFIG_ECONET is not set
341# CONFIG_WAN_ROUTER is not set
342
343#
344# QoS and/or fair queueing
345#
346# CONFIG_NET_SCHED is not set
347# CONFIG_NET_CLS_ROUTE is not set
348
349#
350# Network testing
351#
352# CONFIG_NET_PKTGEN is not set
353# CONFIG_NETPOLL is not set
354# CONFIG_NET_POLL_CONTROLLER is not set
355# CONFIG_HAMRADIO is not set
356# CONFIG_IRDA is not set
357# CONFIG_BT is not set
358CONFIG_NETDEVICES=y
359# CONFIG_DUMMY is not set
360# CONFIG_BONDING is not set
361# CONFIG_EQUALIZER is not set
362# CONFIG_TUN is not set
363
364#
365# ARCnet devices
366#
367# CONFIG_ARCNET is not set
368
369#
370# Ethernet (10 or 100Mbit)
371#
372CONFIG_NET_ETHERNET=y
373# CONFIG_MII is not set
374# CONFIG_NET_VENDOR_3COM is not set
375# CONFIG_LANCE is not set
376# CONFIG_NET_VENDOR_SMC is not set
377# CONFIG_SMC91X is not set
378# CONFIG_NET_VENDOR_RACAL is not set
379# CONFIG_AT1700 is not set
380# CONFIG_DEPCA is not set
381# CONFIG_HP100 is not set
382# CONFIG_NET_ISA is not set
383# CONFIG_NET_PCI is not set
384# CONFIG_NET_POCKET is not set
385
386#
387# Ethernet (1000 Mbit)
388#
389
390#
391# Ethernet (10000 Mbit)
392#
393
394#
395# Token Ring devices
396#
397# CONFIG_TR is not set
398
399#
400# Wireless LAN (non-hamradio)
401#
402CONFIG_NET_RADIO=y
403
404#
405# Obsolete Wireless cards support (pre-802.11)
406#
407# CONFIG_STRIP is not set
408# CONFIG_ARLAN is not set
409# CONFIG_WAVELAN is not set
410CONFIG_PCMCIA_WAVELAN=y
411# CONFIG_PCMCIA_NETWAVE is not set
412
413#
414# Wireless 802.11 Frequency Hopping cards support
415#
416# CONFIG_PCMCIA_RAYCS is not set
417
418#
419# Wireless 802.11b ISA/PCI cards support
420#
421# CONFIG_HERMES is not set
422# CONFIG_ATMEL is not set
423
424#
425# Wireless 802.11b Pcmcia/Cardbus cards support
426#
427CONFIG_AIRO_CS=y
428CONFIG_PCMCIA_WL3501=y
429CONFIG_NET_WIRELESS=y
430
431#
432# PCMCIA network device support
433#
434CONFIG_NET_PCMCIA=y
435CONFIG_PCMCIA_3C589=y
436# CONFIG_PCMCIA_3C574 is not set
437# CONFIG_PCMCIA_FMVJ18X is not set
438CONFIG_PCMCIA_PCNET=y
439# CONFIG_PCMCIA_NMCLAN is not set
440# CONFIG_PCMCIA_SMC91C92 is not set
441# CONFIG_PCMCIA_XIRC2PS is not set
442# CONFIG_PCMCIA_AXNET is not set
443
444#
445# Wan interfaces
446#
447# CONFIG_WAN is not set
448# CONFIG_PPP is not set
449# CONFIG_SLIP is not set
450# CONFIG_SHAPER is not set
451# CONFIG_NETCONSOLE is not set
452
453#
454# ISDN subsystem
455#
456# CONFIG_ISDN is not set
457
458#
459# Input device support
460#
461CONFIG_INPUT=y
462
463#
464# Userland interfaces
465#
466CONFIG_INPUT_MOUSEDEV=y
467CONFIG_INPUT_MOUSEDEV_PSAUX=y
468CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
469CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
470# CONFIG_INPUT_JOYDEV is not set
471# CONFIG_INPUT_TSDEV is not set
472# CONFIG_INPUT_EVDEV is not set
473# CONFIG_INPUT_EVBUG is not set
474
475#
476# Input Device Drivers
477#
478CONFIG_INPUT_KEYBOARD=y
479CONFIG_KEYBOARD_ATKBD=y
480# CONFIG_KEYBOARD_SUNKBD is not set
481# CONFIG_KEYBOARD_LKKBD is not set
482# CONFIG_KEYBOARD_XTKBD is not set
483# CONFIG_KEYBOARD_NEWTON is not set
484CONFIG_INPUT_MOUSE=y
485CONFIG_MOUSE_PS2=y
486# CONFIG_MOUSE_SERIAL is not set
487# CONFIG_MOUSE_INPORT is not set
488# CONFIG_MOUSE_LOGIBM is not set
489# CONFIG_MOUSE_PC110PAD is not set
490# CONFIG_MOUSE_VSXXXAA is not set
491# CONFIG_INPUT_JOYSTICK is not set
492# CONFIG_INPUT_TOUCHSCREEN is not set
493# CONFIG_INPUT_MISC is not set
494
495#
496# Hardware I/O ports
497#
498CONFIG_SERIO=y
499CONFIG_SERIO_SERPORT=y
500CONFIG_SERIO_LIBPS2=y
501# CONFIG_SERIO_RAW is not set
502# CONFIG_GAMEPORT is not set
503CONFIG_SOUND_GAMEPORT=y
504
505#
506# Character devices
507#
508CONFIG_VT=y
509CONFIG_VT_CONSOLE=y
510CONFIG_HW_CONSOLE=y
511# CONFIG_SERIAL_NONSTANDARD is not set
512
513#
514# Serial drivers
515#
516# CONFIG_SERIAL_8250 is not set
517
518#
519# Non-8250 serial port support
520#
521CONFIG_SERIAL_SA1100=y
522CONFIG_SERIAL_SA1100_CONSOLE=y
523CONFIG_SERIAL_CORE=y
524CONFIG_SERIAL_CORE_CONSOLE=y
525CONFIG_UNIX98_PTYS=y
526CONFIG_LEGACY_PTYS=y
527CONFIG_LEGACY_PTY_COUNT=256
528
529#
530# IPMI
531#
532# CONFIG_IPMI_HANDLER is not set
533
534#
535# Watchdog Cards
536#
537# CONFIG_WATCHDOG is not set
538# CONFIG_NVRAM is not set
539# CONFIG_RTC is not set
540# CONFIG_DTLK is not set
541# CONFIG_R3964 is not set
542
543#
544# Ftape, the floppy tape device driver
545#
546# CONFIG_DRM is not set
547
548#
549# PCMCIA character devices
550#
551# CONFIG_SYNCLINK_CS is not set
552# CONFIG_RAW_DRIVER is not set
553
554#
555# TPM devices
556#
557# CONFIG_TCG_TPM is not set
558
559#
560# I2C support
561#
562# CONFIG_I2C is not set
563
564#
565# Misc devices
566#
567
568#
569# Multimedia devices
570#
571# CONFIG_VIDEO_DEV is not set
572
573#
574# Digital Video Broadcasting Devices
575#
576# CONFIG_DVB is not set
577
578#
579# Graphics support
580#
581CONFIG_FB=y
582CONFIG_FB_CFB_FILLRECT=y
583CONFIG_FB_CFB_COPYAREA=y
584CONFIG_FB_CFB_IMAGEBLIT=y
585CONFIG_FB_SOFT_CURSOR=y
586# CONFIG_FB_MODE_HELPERS is not set
587# CONFIG_FB_TILEBLITTING is not set
588CONFIG_FB_SA1100=y
589# CONFIG_FB_VIRTUAL is not set
590
591#
592# Console display driver support
593#
594# CONFIG_VGA_CONSOLE is not set
595# CONFIG_MDA_CONSOLE is not set
596CONFIG_DUMMY_CONSOLE=y
597CONFIG_FRAMEBUFFER_CONSOLE=y
598CONFIG_FONTS=y
599CONFIG_FONT_8x8=y
600# CONFIG_FONT_8x16 is not set
601# CONFIG_FONT_6x11 is not set
602# CONFIG_FONT_PEARL_8x8 is not set
603# CONFIG_FONT_ACORN_8x8 is not set
604# CONFIG_FONT_MINI_4x6 is not set
605# CONFIG_FONT_SUN8x16 is not set
606# CONFIG_FONT_SUN12x22 is not set
607
608#
609# Logo configuration
610#
611# CONFIG_LOGO is not set
612# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
613
614#
615# Sound
616#
617# CONFIG_SOUND is not set
618
619#
620# USB support
621#
622CONFIG_USB_ARCH_HAS_HCD=y
623# CONFIG_USB_ARCH_HAS_OHCI is not set
624# CONFIG_USB is not set
625
626#
627# USB Gadget Support
628#
629# CONFIG_USB_GADGET is not set
630
631#
632# MMC/SD Card support
633#
634# CONFIG_MMC is not set
635
636#
637# File systems
638#
639CONFIG_EXT2_FS=y
640# CONFIG_EXT2_FS_XATTR is not set
641# CONFIG_EXT3_FS is not set
642# CONFIG_JBD is not set
643# CONFIG_REISERFS_FS is not set
644# CONFIG_JFS_FS is not set
645
646#
647# XFS support
648#
649# CONFIG_XFS_FS is not set
650# CONFIG_MINIX_FS is not set
651# CONFIG_ROMFS_FS is not set
652# CONFIG_QUOTA is not set
653CONFIG_DNOTIFY=y
654# CONFIG_AUTOFS_FS is not set
655# CONFIG_AUTOFS4_FS is not set
656
657#
658# CD-ROM/DVD Filesystems
659#
660# CONFIG_ISO9660_FS is not set
661# CONFIG_UDF_FS is not set
662
663#
664# DOS/FAT/NT Filesystems
665#
666CONFIG_FAT_FS=y
667CONFIG_MSDOS_FS=y
668# CONFIG_VFAT_FS is not set
669CONFIG_FAT_DEFAULT_CODEPAGE=437
670# CONFIG_NTFS_FS is not set
671
672#
673# Pseudo filesystems
674#
675CONFIG_PROC_FS=y
676CONFIG_SYSFS=y
677# CONFIG_DEVFS_FS is not set
678# CONFIG_DEVPTS_FS_XATTR is not set
679# CONFIG_TMPFS is not set
680# CONFIG_HUGETLB_PAGE is not set
681CONFIG_RAMFS=y
682
683#
684# Miscellaneous filesystems
685#
686# CONFIG_ADFS_FS is not set
687# CONFIG_AFFS_FS is not set
688# CONFIG_HFS_FS is not set
689# CONFIG_HFSPLUS_FS is not set
690# CONFIG_BEFS_FS is not set
691# CONFIG_BFS_FS is not set
692# CONFIG_EFS_FS is not set
693# CONFIG_CRAMFS is not set
694# CONFIG_VXFS_FS is not set
695# CONFIG_HPFS_FS is not set
696# CONFIG_QNX4FS_FS is not set
697# CONFIG_SYSV_FS is not set
698# CONFIG_UFS_FS is not set
699
700#
701# Network File Systems
702#
703CONFIG_NFS_FS=y
704# CONFIG_NFS_V3 is not set
705# CONFIG_NFS_V4 is not set
706# CONFIG_NFS_DIRECTIO is not set
707# CONFIG_NFSD is not set
708CONFIG_LOCKD=y
709CONFIG_SUNRPC=y
710# CONFIG_RPCSEC_GSS_KRB5 is not set
711# CONFIG_RPCSEC_GSS_SPKM3 is not set
712# CONFIG_SMB_FS is not set
713# CONFIG_CIFS is not set
714# CONFIG_NCP_FS is not set
715# CONFIG_CODA_FS is not set
716# CONFIG_AFS_FS is not set
717
718#
719# Partition Types
720#
721# CONFIG_PARTITION_ADVANCED is not set
722CONFIG_MSDOS_PARTITION=y
723
724#
725# Native Language Support
726#
727CONFIG_NLS=y
728CONFIG_NLS_DEFAULT="iso8859-1"
729# CONFIG_NLS_CODEPAGE_437 is not set
730# CONFIG_NLS_CODEPAGE_737 is not set
731# CONFIG_NLS_CODEPAGE_775 is not set
732# CONFIG_NLS_CODEPAGE_850 is not set
733# CONFIG_NLS_CODEPAGE_852 is not set
734# CONFIG_NLS_CODEPAGE_855 is not set
735# CONFIG_NLS_CODEPAGE_857 is not set
736# CONFIG_NLS_CODEPAGE_860 is not set
737# CONFIG_NLS_CODEPAGE_861 is not set
738# CONFIG_NLS_CODEPAGE_862 is not set
739# CONFIG_NLS_CODEPAGE_863 is not set
740# CONFIG_NLS_CODEPAGE_864 is not set
741# CONFIG_NLS_CODEPAGE_865 is not set
742# CONFIG_NLS_CODEPAGE_866 is not set
743# CONFIG_NLS_CODEPAGE_869 is not set
744# CONFIG_NLS_CODEPAGE_936 is not set
745# CONFIG_NLS_CODEPAGE_950 is not set
746# CONFIG_NLS_CODEPAGE_932 is not set
747# CONFIG_NLS_CODEPAGE_949 is not set
748# CONFIG_NLS_CODEPAGE_874 is not set
749# CONFIG_NLS_ISO8859_8 is not set
750# CONFIG_NLS_CODEPAGE_1250 is not set
751# CONFIG_NLS_CODEPAGE_1251 is not set
752# CONFIG_NLS_ASCII is not set
753# CONFIG_NLS_ISO8859_1 is not set
754# CONFIG_NLS_ISO8859_2 is not set
755# CONFIG_NLS_ISO8859_3 is not set
756# CONFIG_NLS_ISO8859_4 is not set
757# CONFIG_NLS_ISO8859_5 is not set
758# CONFIG_NLS_ISO8859_6 is not set
759# CONFIG_NLS_ISO8859_7 is not set
760# CONFIG_NLS_ISO8859_9 is not set
761# CONFIG_NLS_ISO8859_13 is not set
762# CONFIG_NLS_ISO8859_14 is not set
763# CONFIG_NLS_ISO8859_15 is not set
764# CONFIG_NLS_KOI8_R is not set
765# CONFIG_NLS_KOI8_U is not set
766# CONFIG_NLS_UTF8 is not set
767
768#
769# Profiling support
770#
771# CONFIG_PROFILING is not set
772
773#
774# Kernel hacking
775#
776# CONFIG_PRINTK_TIME is not set
777# CONFIG_DEBUG_KERNEL is not set
778CONFIG_LOG_BUF_SHIFT=14
779CONFIG_DEBUG_BUGVERBOSE=y
780CONFIG_FRAME_POINTER=y
781# CONFIG_DEBUG_USER is not set
782
783#
784# Security options
785#
786# CONFIG_KEYS is not set
787# CONFIG_SECURITY is not set
788
789#
790# Cryptographic options
791#
792# CONFIG_CRYPTO is not set
793
794#
795# Hardware crypto devices
796#
797
798#
799# Library routines
800#
801# CONFIG_CRC_CCITT is not set
802CONFIG_CRC32=y
803# CONFIG_LIBCRC32C is not set
diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig
index 2a63fb277196..96a794d8de84 100644
--- a/arch/arm/configs/s3c2410_defconfig
+++ b/arch/arm/configs/s3c2410_defconfig
@@ -1,14 +1,13 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc1-bk2 3# Linux kernel version: 2.6.12-git4
4# Sun Mar 27 17:47:45 2005 4# Wed Jun 22 15:56:42 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_UID16=y 8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_GENERIC_IOMAP=y
12 11
13# 12#
14# Code maturity level options 13# Code maturity level options
@@ -17,6 +16,7 @@ CONFIG_EXPERIMENTAL=y
17# CONFIG_CLEAN_COMPILE is not set 16# CONFIG_CLEAN_COMPILE is not set
18CONFIG_BROKEN=y 17CONFIG_BROKEN=y
19CONFIG_BROKEN_ON_SMP=y 18CONFIG_BROKEN_ON_SMP=y
19CONFIG_INIT_ENV_ARG_LIMIT=32
20 20
21# 21#
22# General setup 22# General setup
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y
35CONFIG_KALLSYMS=y 35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 36# CONFIG_KALLSYMS_ALL is not set
37# CONFIG_KALLSYMS_EXTRA_PASS is not set 37# CONFIG_KALLSYMS_EXTRA_PASS is not set
38CONFIG_PRINTK=y
39CONFIG_BUG=y
38CONFIG_BASE_FULL=y 40CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y 41CONFIG_FUTEX=y
40CONFIG_EPOLL=y 42CONFIG_EPOLL=y
@@ -81,6 +83,7 @@ CONFIG_ARCH_S3C2410=y
81# CONFIG_ARCH_VERSATILE is not set 83# CONFIG_ARCH_VERSATILE is not set
82# CONFIG_ARCH_IMX is not set 84# CONFIG_ARCH_IMX is not set
83# CONFIG_ARCH_H720X is not set 85# CONFIG_ARCH_H720X is not set
86# CONFIG_ARCH_AAEC2000 is not set
84 87
85# 88#
86# S3C24XX Implementations 89# S3C24XX Implementations
@@ -134,6 +137,7 @@ CONFIG_CPU_TLB_V4WBI=y
134# 137#
135# Bus support 138# Bus support
136# 139#
140CONFIG_ISA_DMA_API=y
137 141
138# 142#
139# PCCARD (PCMCIA/CardBus) support 143# PCCARD (PCMCIA/CardBus) support
@@ -143,7 +147,9 @@ CONFIG_CPU_TLB_V4WBI=y
143# 147#
144# Kernel Features 148# Kernel Features
145# 149#
150# CONFIG_SMP is not set
146# CONFIG_PREEMPT is not set 151# CONFIG_PREEMPT is not set
152# CONFIG_DISCONTIGMEM is not set
147CONFIG_ALIGNMENT_TRAP=y 153CONFIG_ALIGNMENT_TRAP=y
148 154
149# 155#
@@ -297,7 +303,6 @@ CONFIG_PARPORT_1284=y
297# 303#
298# Block devices 304# Block devices
299# 305#
300# CONFIG_BLK_DEV_FD is not set
301# CONFIG_PARIDE is not set 306# CONFIG_PARIDE is not set
302# CONFIG_BLK_DEV_COW_COMMON is not set 307# CONFIG_BLK_DEV_COW_COMMON is not set
303CONFIG_BLK_DEV_LOOP=y 308CONFIG_BLK_DEV_LOOP=y
@@ -359,6 +364,7 @@ CONFIG_BLK_DEV_IDE_BAST=y
359# 364#
360# Fusion MPT device support 365# Fusion MPT device support
361# 366#
367# CONFIG_FUSION is not set
362 368
363# 369#
364# IEEE 1394 (FireWire) support 370# IEEE 1394 (FireWire) support
@@ -378,10 +384,11 @@ CONFIG_NET=y
378# Networking options 384# Networking options
379# 385#
380# CONFIG_PACKET is not set 386# CONFIG_PACKET is not set
381# CONFIG_NETLINK_DEV is not set
382CONFIG_UNIX=y 387CONFIG_UNIX=y
383# CONFIG_NET_KEY is not set 388# CONFIG_NET_KEY is not set
384CONFIG_INET=y 389CONFIG_INET=y
390CONFIG_IP_FIB_HASH=y
391# CONFIG_IP_FIB_TRIE is not set
385# CONFIG_IP_MULTICAST is not set 392# CONFIG_IP_MULTICAST is not set
386# CONFIG_IP_ADVANCED_ROUTER is not set 393# CONFIG_IP_ADVANCED_ROUTER is not set
387CONFIG_IP_PNP=y 394CONFIG_IP_PNP=y
@@ -443,8 +450,9 @@ CONFIG_NETDEVICES=y
443# Ethernet (10 or 100Mbit) 450# Ethernet (10 or 100Mbit)
444# 451#
445CONFIG_NET_ETHERNET=y 452CONFIG_NET_ETHERNET=y
446# CONFIG_MII is not set 453CONFIG_MII=m
447# CONFIG_SMC91X is not set 454# CONFIG_SMC91X is not set
455CONFIG_DM9000=m
448 456
449# 457#
450# Ethernet (1000 Mbit) 458# Ethernet (1000 Mbit)
@@ -521,7 +529,6 @@ CONFIG_SERIO_SERPORT=y
521CONFIG_SERIO_LIBPS2=y 529CONFIG_SERIO_LIBPS2=y
522# CONFIG_SERIO_RAW is not set 530# CONFIG_SERIO_RAW is not set
523# CONFIG_GAMEPORT is not set 531# CONFIG_GAMEPORT is not set
524CONFIG_SOUND_GAMEPORT=y
525 532
526# 533#
527# Character devices 534# Character devices
@@ -563,7 +570,6 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
563# 570#
564CONFIG_SERIAL_S3C2410=y 571CONFIG_SERIAL_S3C2410=y
565CONFIG_SERIAL_S3C2410_CONSOLE=y 572CONFIG_SERIAL_S3C2410_CONSOLE=y
566CONFIG_SERIAL_BAST_SIO=y
567CONFIG_SERIAL_CORE=y 573CONFIG_SERIAL_CORE=y
568CONFIG_SERIAL_CORE_CONSOLE=y 574CONFIG_SERIAL_CORE_CONSOLE=y
569CONFIG_UNIX98_PTYS=y 575CONFIG_UNIX98_PTYS=y
@@ -605,7 +611,6 @@ CONFIG_S3C2410_RTC=y
605# 611#
606# TPM devices 612# TPM devices
607# 613#
608# CONFIG_TCG_TPM is not set
609 614
610# 615#
611# I2C support 616# I2C support
@@ -654,6 +659,7 @@ CONFIG_SENSORS_LM78=m
654CONFIG_SENSORS_LM85=m 659CONFIG_SENSORS_LM85=m
655# CONFIG_SENSORS_LM87 is not set 660# CONFIG_SENSORS_LM87 is not set
656# CONFIG_SENSORS_LM90 is not set 661# CONFIG_SENSORS_LM90 is not set
662# CONFIG_SENSORS_LM92 is not set
657# CONFIG_SENSORS_MAX1619 is not set 663# CONFIG_SENSORS_MAX1619 is not set
658# CONFIG_SENSORS_PC87360 is not set 664# CONFIG_SENSORS_PC87360 is not set
659# CONFIG_SENSORS_SMSC47B397 is not set 665# CONFIG_SENSORS_SMSC47B397 is not set
@@ -665,6 +671,7 @@ CONFIG_SENSORS_LM85=m
665# 671#
666# Other I2C Chip support 672# Other I2C Chip support
667# 673#
674# CONFIG_SENSORS_DS1337 is not set
668CONFIG_SENSORS_EEPROM=m 675CONFIG_SENSORS_EEPROM=m
669# CONFIG_SENSORS_PCF8574 is not set 676# CONFIG_SENSORS_PCF8574 is not set
670# CONFIG_SENSORS_PCF8591 is not set 677# CONFIG_SENSORS_PCF8591 is not set
@@ -696,8 +703,10 @@ CONFIG_FB=y
696# CONFIG_FB_CFB_COPYAREA is not set 703# CONFIG_FB_CFB_COPYAREA is not set
697# CONFIG_FB_CFB_IMAGEBLIT is not set 704# CONFIG_FB_CFB_IMAGEBLIT is not set
698# CONFIG_FB_SOFT_CURSOR is not set 705# CONFIG_FB_SOFT_CURSOR is not set
706# CONFIG_FB_MACMODES is not set
699CONFIG_FB_MODE_HELPERS=y 707CONFIG_FB_MODE_HELPERS=y
700# CONFIG_FB_TILEBLITTING is not set 708# CONFIG_FB_TILEBLITTING is not set
709# CONFIG_FB_S1D13XXX is not set
701# CONFIG_FB_VIRTUAL is not set 710# CONFIG_FB_VIRTUAL is not set
702 711
703# 712#
@@ -782,7 +791,6 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
782# 791#
783CONFIG_PROC_FS=y 792CONFIG_PROC_FS=y
784CONFIG_SYSFS=y 793CONFIG_SYSFS=y
785# CONFIG_DEVFS_FS is not set
786# CONFIG_DEVPTS_FS_XATTR is not set 794# CONFIG_DEVPTS_FS_XATTR is not set
787# CONFIG_TMPFS is not set 795# CONFIG_TMPFS is not set
788# CONFIG_HUGETLBFS is not set 796# CONFIG_HUGETLBFS is not set
diff --git a/arch/arm/configs/shark_defconfig b/arch/arm/configs/shark_defconfig
index 1d9bcbbc8dfc..271823f0d708 100644
--- a/arch/arm/configs/shark_defconfig
+++ b/arch/arm/configs/shark_defconfig
@@ -1,22 +1,21 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc1-bk2 3# Linux kernel version: 2.6.12-git3
4# Sun Mar 27 23:59:14 2005 4# Sat Jul 16 15:21:47 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_UID16=y 8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_GENERIC_IOMAP=y
12 11
13# 12#
14# Code maturity level options 13# Code maturity level options
15# 14#
16CONFIG_EXPERIMENTAL=y 15CONFIG_EXPERIMENTAL=y
17# CONFIG_CLEAN_COMPILE is not set 16CONFIG_CLEAN_COMPILE=y
18CONFIG_BROKEN=y
19CONFIG_BROKEN_ON_SMP=y 17CONFIG_BROKEN_ON_SMP=y
18CONFIG_INIT_ENV_ARG_LIMIT=32
20 19
21# 20#
22# General setup 21# General setup
@@ -33,7 +32,10 @@ CONFIG_KOBJECT_UEVENT=y
33# CONFIG_IKCONFIG is not set 32# CONFIG_IKCONFIG is not set
34# CONFIG_EMBEDDED is not set 33# CONFIG_EMBEDDED is not set
35CONFIG_KALLSYMS=y 34CONFIG_KALLSYMS=y
35# CONFIG_KALLSYMS_ALL is not set
36# CONFIG_KALLSYMS_EXTRA_PASS is not set 36# CONFIG_KALLSYMS_EXTRA_PASS is not set
37CONFIG_PRINTK=y
38CONFIG_BUG=y
37CONFIG_BASE_FULL=y 39CONFIG_BASE_FULL=y
38CONFIG_FUTEX=y 40CONFIG_FUTEX=y
39CONFIG_EPOLL=y 41CONFIG_EPOLL=y
@@ -81,6 +83,7 @@ CONFIG_ARCH_SHARK=y
81# CONFIG_ARCH_VERSATILE is not set 83# CONFIG_ARCH_VERSATILE is not set
82# CONFIG_ARCH_IMX is not set 84# CONFIG_ARCH_IMX is not set
83# CONFIG_ARCH_H720X is not set 85# CONFIG_ARCH_H720X is not set
86# CONFIG_ARCH_AAEC2000 is not set
84 87
85# 88#
86# Processor Type 89# Processor Type
@@ -103,10 +106,12 @@ CONFIG_CPU_TLB_V4WB=y
103# 106#
104CONFIG_ISA=y 107CONFIG_ISA=y
105CONFIG_ISA_DMA=y 108CONFIG_ISA_DMA=y
109CONFIG_ISA_DMA_API=y
106CONFIG_PCI=y 110CONFIG_PCI=y
107CONFIG_PCI_HOST_VIA82C505=y 111CONFIG_PCI_HOST_VIA82C505=y
108CONFIG_PCI_LEGACY_PROC=y 112CONFIG_PCI_LEGACY_PROC=y
109# CONFIG_PCI_NAMES is not set 113# CONFIG_PCI_NAMES is not set
114# CONFIG_PCI_DEBUG is not set
110 115
111# 116#
112# PCCARD (PCMCIA/CardBus) support 117# PCCARD (PCMCIA/CardBus) support
@@ -116,7 +121,9 @@ CONFIG_PCI_LEGACY_PROC=y
116# 121#
117# Kernel Features 122# Kernel Features
118# 123#
124# CONFIG_SMP is not set
119# CONFIG_PREEMPT is not set 125# CONFIG_PREEMPT is not set
126# CONFIG_DISCONTIGMEM is not set
120CONFIG_LEDS=y 127CONFIG_LEDS=y
121CONFIG_LEDS_TIMER=y 128CONFIG_LEDS_TIMER=y
122# CONFIG_LEDS_CPU is not set 129# CONFIG_LEDS_CPU is not set
@@ -163,6 +170,7 @@ CONFIG_BINFMT_ELF=y
163# CONFIG_STANDALONE is not set 170# CONFIG_STANDALONE is not set
164CONFIG_PREVENT_FIRMWARE_BUILD=y 171CONFIG_PREVENT_FIRMWARE_BUILD=y
165# CONFIG_FW_LOADER is not set 172# CONFIG_FW_LOADER is not set
173# CONFIG_DEBUG_DRIVER is not set
166 174
167# 175#
168# Memory Technology Devices (MTD) 176# Memory Technology Devices (MTD)
@@ -172,8 +180,8 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
172# 180#
173# Parallel port support 181# Parallel port support
174# 182#
175CONFIG_PARPORT=y 183CONFIG_PARPORT=m
176CONFIG_PARPORT_PC=y 184CONFIG_PARPORT_PC=m
177# CONFIG_PARPORT_SERIAL is not set 185# CONFIG_PARPORT_SERIAL is not set
178# CONFIG_PARPORT_PC_FIFO is not set 186# CONFIG_PARPORT_PC_FIFO is not set
179# CONFIG_PARPORT_PC_SUPERIO is not set 187# CONFIG_PARPORT_PC_SUPERIO is not set
@@ -189,7 +197,6 @@ CONFIG_PARPORT_PC=y
189# 197#
190# Block devices 198# Block devices
191# 199#
192# CONFIG_BLK_DEV_FD is not set
193# CONFIG_BLK_DEV_XD is not set 200# CONFIG_BLK_DEV_XD is not set
194# CONFIG_PARIDE is not set 201# CONFIG_PARIDE is not set
195# CONFIG_BLK_CPQ_DA is not set 202# CONFIG_BLK_CPQ_DA is not set
@@ -229,7 +236,7 @@ CONFIG_BLK_DEV_IDE=y
229# CONFIG_BLK_DEV_IDE_SATA is not set 236# CONFIG_BLK_DEV_IDE_SATA is not set
230CONFIG_BLK_DEV_IDEDISK=y 237CONFIG_BLK_DEV_IDEDISK=y
231# CONFIG_IDEDISK_MULTI_MODE is not set 238# CONFIG_IDEDISK_MULTI_MODE is not set
232CONFIG_BLK_DEV_IDECD=y 239CONFIG_BLK_DEV_IDECD=m
233# CONFIG_BLK_DEV_IDETAPE is not set 240# CONFIG_BLK_DEV_IDETAPE is not set
234CONFIG_BLK_DEV_IDEFLOPPY=y 241CONFIG_BLK_DEV_IDEFLOPPY=y
235# CONFIG_BLK_DEV_IDESCSI is not set 242# CONFIG_BLK_DEV_IDESCSI is not set
@@ -261,6 +268,7 @@ CONFIG_CHR_DEV_ST=m
261CONFIG_BLK_DEV_SR=m 268CONFIG_BLK_DEV_SR=m
262# CONFIG_BLK_DEV_SR_VENDOR is not set 269# CONFIG_BLK_DEV_SR_VENDOR is not set
263CONFIG_CHR_DEV_SG=m 270CONFIG_CHR_DEV_SG=m
271# CONFIG_CHR_DEV_SCH is not set
264 272
265# 273#
266# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 274# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
@@ -290,17 +298,14 @@ CONFIG_CHR_DEV_SG=m
290# CONFIG_SCSI_AIC7XXX_OLD is not set 298# CONFIG_SCSI_AIC7XXX_OLD is not set
291# CONFIG_SCSI_AIC79XX is not set 299# CONFIG_SCSI_AIC79XX is not set
292# CONFIG_SCSI_DPT_I2O is not set 300# CONFIG_SCSI_DPT_I2O is not set
293# CONFIG_SCSI_ADVANSYS is not set
294# CONFIG_SCSI_IN2000 is not set 301# CONFIG_SCSI_IN2000 is not set
295# CONFIG_MEGARAID_NEWGEN is not set 302# CONFIG_MEGARAID_NEWGEN is not set
296# CONFIG_MEGARAID_LEGACY is not set 303# CONFIG_MEGARAID_LEGACY is not set
297# CONFIG_SCSI_SATA is not set 304# CONFIG_SCSI_SATA is not set
298# CONFIG_SCSI_BUSLOGIC is not set 305# CONFIG_SCSI_BUSLOGIC is not set
299# CONFIG_SCSI_CPQFCTS is not set
300# CONFIG_SCSI_DMX3191D is not set 306# CONFIG_SCSI_DMX3191D is not set
301# CONFIG_SCSI_DTC3280 is not set 307# CONFIG_SCSI_DTC3280 is not set
302# CONFIG_SCSI_EATA is not set 308# CONFIG_SCSI_EATA is not set
303# CONFIG_SCSI_EATA_PIO is not set
304# CONFIG_SCSI_FUTURE_DOMAIN is not set 309# CONFIG_SCSI_FUTURE_DOMAIN is not set
305# CONFIG_SCSI_GDTH is not set 310# CONFIG_SCSI_GDTH is not set
306# CONFIG_SCSI_GENERIC_NCR5380 is not set 311# CONFIG_SCSI_GENERIC_NCR5380 is not set
@@ -314,11 +319,8 @@ CONFIG_CHR_DEV_SG=m
314# CONFIG_SCSI_SYM53C8XX_2 is not set 319# CONFIG_SCSI_SYM53C8XX_2 is not set
315# CONFIG_SCSI_IPR is not set 320# CONFIG_SCSI_IPR is not set
316# CONFIG_SCSI_PAS16 is not set 321# CONFIG_SCSI_PAS16 is not set
317# CONFIG_SCSI_PCI2000 is not set
318# CONFIG_SCSI_PCI2220I is not set
319# CONFIG_SCSI_PSI240I is not set 322# CONFIG_SCSI_PSI240I is not set
320# CONFIG_SCSI_QLOGIC_FAS is not set 323# CONFIG_SCSI_QLOGIC_FAS is not set
321# CONFIG_SCSI_QLOGIC_ISP is not set
322# CONFIG_SCSI_QLOGIC_FC is not set 324# CONFIG_SCSI_QLOGIC_FC is not set
323# CONFIG_SCSI_QLOGIC_1280 is not set 325# CONFIG_SCSI_QLOGIC_1280 is not set
324CONFIG_SCSI_QLA2XXX=m 326CONFIG_SCSI_QLA2XXX=m
@@ -327,6 +329,7 @@ CONFIG_SCSI_QLA2XXX=m
327# CONFIG_SCSI_QLA2300 is not set 329# CONFIG_SCSI_QLA2300 is not set
328# CONFIG_SCSI_QLA2322 is not set 330# CONFIG_SCSI_QLA2322 is not set
329# CONFIG_SCSI_QLA6312 is not set 331# CONFIG_SCSI_QLA6312 is not set
332# CONFIG_SCSI_LPFC is not set
330# CONFIG_SCSI_SYM53C416 is not set 333# CONFIG_SCSI_SYM53C416 is not set
331# CONFIG_SCSI_DC395x is not set 334# CONFIG_SCSI_DC395x is not set
332# CONFIG_SCSI_DC390T is not set 335# CONFIG_SCSI_DC390T is not set
@@ -344,6 +347,8 @@ CONFIG_SCSI_QLA2XXX=m
344# Fusion MPT device support 347# Fusion MPT device support
345# 348#
346# CONFIG_FUSION is not set 349# CONFIG_FUSION is not set
350# CONFIG_FUSION_SPI is not set
351# CONFIG_FUSION_FC is not set
347 352
348# 353#
349# IEEE 1394 (FireWire) support 354# IEEE 1394 (FireWire) support
@@ -365,7 +370,6 @@ CONFIG_NET=y
365# 370#
366CONFIG_PACKET=y 371CONFIG_PACKET=y
367# CONFIG_PACKET_MMAP is not set 372# CONFIG_PACKET_MMAP is not set
368# CONFIG_NETLINK_DEV is not set
369CONFIG_UNIX=y 373CONFIG_UNIX=y
370# CONFIG_NET_KEY is not set 374# CONFIG_NET_KEY is not set
371CONFIG_INET=y 375CONFIG_INET=y
@@ -380,7 +384,7 @@ CONFIG_INET=y
380# CONFIG_INET_ESP is not set 384# CONFIG_INET_ESP is not set
381# CONFIG_INET_IPCOMP is not set 385# CONFIG_INET_IPCOMP is not set
382# CONFIG_INET_TUNNEL is not set 386# CONFIG_INET_TUNNEL is not set
383# CONFIG_IP_TCPDIAG is not set 387CONFIG_IP_TCPDIAG=y
384# CONFIG_IP_TCPDIAG_IPV6 is not set 388# CONFIG_IP_TCPDIAG_IPV6 is not set
385# CONFIG_IPV6 is not set 389# CONFIG_IPV6 is not set
386# CONFIG_NETFILTER is not set 390# CONFIG_NETFILTER is not set
@@ -439,6 +443,7 @@ CONFIG_NET_ETHERNET=y
439# CONFIG_LANCE is not set 443# CONFIG_LANCE is not set
440# CONFIG_NET_VENDOR_SMC is not set 444# CONFIG_NET_VENDOR_SMC is not set
441# CONFIG_SMC91X is not set 445# CONFIG_SMC91X is not set
446# CONFIG_DM9000 is not set
442# CONFIG_NET_VENDOR_RACAL is not set 447# CONFIG_NET_VENDOR_RACAL is not set
443 448
444# 449#
@@ -483,9 +488,11 @@ CONFIG_CS89x0=y
483# CONFIG_HAMACHI is not set 488# CONFIG_HAMACHI is not set
484# CONFIG_YELLOWFIN is not set 489# CONFIG_YELLOWFIN is not set
485# CONFIG_R8169 is not set 490# CONFIG_R8169 is not set
491# CONFIG_SKGE is not set
486# CONFIG_SK98LIN is not set 492# CONFIG_SK98LIN is not set
487# CONFIG_VIA_VELOCITY is not set 493# CONFIG_VIA_VELOCITY is not set
488# CONFIG_TIGON3 is not set 494# CONFIG_TIGON3 is not set
495# CONFIG_BNX2 is not set
489 496
490# 497#
491# Ethernet (10000 Mbit) 498# Ethernet (10000 Mbit)
@@ -569,7 +576,6 @@ CONFIG_SERIO_I8042=y
569CONFIG_SERIO_LIBPS2=y 576CONFIG_SERIO_LIBPS2=y
570# CONFIG_SERIO_RAW is not set 577# CONFIG_SERIO_RAW is not set
571# CONFIG_GAMEPORT is not set 578# CONFIG_GAMEPORT is not set
572CONFIG_SOUND_GAMEPORT=y
573 579
574# 580#
575# Character devices 581# Character devices
@@ -592,6 +598,7 @@ CONFIG_SERIAL_8250_NR_UARTS=4
592# 598#
593CONFIG_SERIAL_CORE=y 599CONFIG_SERIAL_CORE=y
594CONFIG_SERIAL_CORE_CONSOLE=y 600CONFIG_SERIAL_CORE_CONSOLE=y
601# CONFIG_SERIAL_JSM is not set
595CONFIG_UNIX98_PTYS=y 602CONFIG_UNIX98_PTYS=y
596CONFIG_LEGACY_PTYS=y 603CONFIG_LEGACY_PTYS=y
597CONFIG_LEGACY_PTY_COUNT=256 604CONFIG_LEGACY_PTY_COUNT=256
@@ -653,6 +660,7 @@ CONFIG_FB_CFB_FILLRECT=y
653CONFIG_FB_CFB_COPYAREA=y 660CONFIG_FB_CFB_COPYAREA=y
654CONFIG_FB_CFB_IMAGEBLIT=y 661CONFIG_FB_CFB_IMAGEBLIT=y
655CONFIG_FB_SOFT_CURSOR=y 662CONFIG_FB_SOFT_CURSOR=y
663# CONFIG_FB_MACMODES is not set
656# CONFIG_FB_MODE_HELPERS is not set 664# CONFIG_FB_MODE_HELPERS is not set
657# CONFIG_FB_TILEBLITTING is not set 665# CONFIG_FB_TILEBLITTING is not set
658# CONFIG_FB_CIRRUS is not set 666# CONFIG_FB_CIRRUS is not set
@@ -674,7 +682,7 @@ CONFIG_FB_CYBER2000=y
674# CONFIG_FB_3DFX is not set 682# CONFIG_FB_3DFX is not set
675# CONFIG_FB_VOODOO1 is not set 683# CONFIG_FB_VOODOO1 is not set
676# CONFIG_FB_TRIDENT is not set 684# CONFIG_FB_TRIDENT is not set
677# CONFIG_FB_PM3 is not set 685# CONFIG_FB_S1D13XXX is not set
678# CONFIG_FB_VIRTUAL is not set 686# CONFIG_FB_VIRTUAL is not set
679 687
680# 688#
@@ -808,7 +816,7 @@ CONFIG_DNOTIFY=y
808# 816#
809# CD-ROM/DVD Filesystems 817# CD-ROM/DVD Filesystems
810# 818#
811CONFIG_ISO9660_FS=y 819CONFIG_ISO9660_FS=m
812CONFIG_JOLIET=y 820CONFIG_JOLIET=y
813# CONFIG_ZISOFS is not set 821# CONFIG_ZISOFS is not set
814# CONFIG_UDF_FS is not set 822# CONFIG_UDF_FS is not set
@@ -816,9 +824,9 @@ CONFIG_JOLIET=y
816# 824#
817# DOS/FAT/NT Filesystems 825# DOS/FAT/NT Filesystems
818# 826#
819CONFIG_FAT_FS=y 827CONFIG_FAT_FS=m
820CONFIG_MSDOS_FS=y 828CONFIG_MSDOS_FS=m
821CONFIG_VFAT_FS=y 829CONFIG_VFAT_FS=m
822CONFIG_FAT_DEFAULT_CODEPAGE=437 830CONFIG_FAT_DEFAULT_CODEPAGE=437
823CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" 831CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
824# CONFIG_NTFS_FS is not set 832# CONFIG_NTFS_FS is not set
@@ -833,7 +841,6 @@ CONFIG_DEVFS_MOUNT=y
833# CONFIG_DEVFS_DEBUG is not set 841# CONFIG_DEVFS_DEBUG is not set
834# CONFIG_DEVPTS_FS_XATTR is not set 842# CONFIG_DEVPTS_FS_XATTR is not set
835# CONFIG_TMPFS is not set 843# CONFIG_TMPFS is not set
836# CONFIG_HUGETLBFS is not set
837# CONFIG_HUGETLB_PAGE is not set 844# CONFIG_HUGETLB_PAGE is not set
838CONFIG_RAMFS=y 845CONFIG_RAMFS=y
839 846
@@ -857,13 +864,14 @@ CONFIG_RAMFS=y
857# 864#
858# Network File Systems 865# Network File Systems
859# 866#
860CONFIG_NFS_FS=y 867CONFIG_NFS_FS=m
861# CONFIG_NFS_V3 is not set 868CONFIG_NFS_V3=y
862# CONFIG_NFS_V4 is not set 869# CONFIG_NFS_V4 is not set
863# CONFIG_NFS_DIRECTIO is not set 870# CONFIG_NFS_DIRECTIO is not set
864# CONFIG_NFSD is not set 871# CONFIG_NFSD is not set
865CONFIG_LOCKD=y 872CONFIG_LOCKD=m
866CONFIG_SUNRPC=y 873CONFIG_LOCKD_V4=y
874CONFIG_SUNRPC=m
867# CONFIG_RPCSEC_GSS_KRB5 is not set 875# CONFIG_RPCSEC_GSS_KRB5 is not set
868# CONFIG_RPCSEC_GSS_SPKM3 is not set 876# CONFIG_RPCSEC_GSS_SPKM3 is not set
869# CONFIG_SMB_FS is not set 877# CONFIG_SMB_FS is not set
@@ -895,12 +903,12 @@ CONFIG_MSDOS_PARTITION=y
895# 903#
896# Native Language Support 904# Native Language Support
897# 905#
898CONFIG_NLS=y 906CONFIG_NLS=m
899CONFIG_NLS_DEFAULT="iso8859-1" 907CONFIG_NLS_DEFAULT="iso8859-1"
900CONFIG_NLS_CODEPAGE_437=y 908CONFIG_NLS_CODEPAGE_437=m
901# CONFIG_NLS_CODEPAGE_737 is not set 909# CONFIG_NLS_CODEPAGE_737 is not set
902# CONFIG_NLS_CODEPAGE_775 is not set 910# CONFIG_NLS_CODEPAGE_775 is not set
903CONFIG_NLS_CODEPAGE_850=y 911CONFIG_NLS_CODEPAGE_850=m
904# CONFIG_NLS_CODEPAGE_852 is not set 912# CONFIG_NLS_CODEPAGE_852 is not set
905# CONFIG_NLS_CODEPAGE_855 is not set 913# CONFIG_NLS_CODEPAGE_855 is not set
906# CONFIG_NLS_CODEPAGE_857 is not set 914# CONFIG_NLS_CODEPAGE_857 is not set
@@ -921,7 +929,7 @@ CONFIG_NLS_CODEPAGE_850=y
921# CONFIG_NLS_CODEPAGE_1250 is not set 929# CONFIG_NLS_CODEPAGE_1250 is not set
922# CONFIG_NLS_CODEPAGE_1251 is not set 930# CONFIG_NLS_CODEPAGE_1251 is not set
923# CONFIG_NLS_ASCII is not set 931# CONFIG_NLS_ASCII is not set
924CONFIG_NLS_ISO8859_1=y 932CONFIG_NLS_ISO8859_1=m
925# CONFIG_NLS_ISO8859_2 is not set 933# CONFIG_NLS_ISO8859_2 is not set
926# CONFIG_NLS_ISO8859_3 is not set 934# CONFIG_NLS_ISO8859_3 is not set
927# CONFIG_NLS_ISO8859_4 is not set 935# CONFIG_NLS_ISO8859_4 is not set
@@ -945,11 +953,22 @@ CONFIG_NLS_ISO8859_1=y
945# Kernel hacking 953# Kernel hacking
946# 954#
947# CONFIG_PRINTK_TIME is not set 955# CONFIG_PRINTK_TIME is not set
948# CONFIG_DEBUG_KERNEL is not set 956CONFIG_DEBUG_KERNEL=y
957# CONFIG_MAGIC_SYSRQ is not set
949CONFIG_LOG_BUF_SHIFT=14 958CONFIG_LOG_BUF_SHIFT=14
959# CONFIG_SCHEDSTATS is not set
960# CONFIG_DEBUG_SLAB is not set
961# CONFIG_DEBUG_SPINLOCK is not set
962# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
963# CONFIG_DEBUG_KOBJECT is not set
950CONFIG_DEBUG_BUGVERBOSE=y 964CONFIG_DEBUG_BUGVERBOSE=y
965# CONFIG_DEBUG_INFO is not set
966# CONFIG_DEBUG_FS is not set
951CONFIG_FRAME_POINTER=y 967CONFIG_FRAME_POINTER=y
952CONFIG_DEBUG_USER=y 968CONFIG_DEBUG_USER=y
969# CONFIG_DEBUG_WAITQ is not set
970# CONFIG_DEBUG_ERRORS is not set
971# CONFIG_DEBUG_LL is not set
953 972
954# 973#
955# Security options 974# Security options
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
index 4c38bd8bc298..835d450797a1 100644
--- a/arch/arm/kernel/armksyms.c
+++ b/arch/arm/kernel/armksyms.c
@@ -30,9 +30,6 @@ extern void __lshrdi3(void);
30extern void __modsi3(void); 30extern void __modsi3(void);
31extern void __muldi3(void); 31extern void __muldi3(void);
32extern void __ucmpdi2(void); 32extern void __ucmpdi2(void);
33extern void __udivdi3(void);
34extern void __umoddi3(void);
35extern void __udivmoddi4(void);
36extern void __udivsi3(void); 33extern void __udivsi3(void);
37extern void __umodsi3(void); 34extern void __umodsi3(void);
38extern void __do_div64(void); 35extern void __do_div64(void);
@@ -44,7 +41,10 @@ extern void fp_enter(void);
44 * This has a special calling convention; it doesn't 41 * This has a special calling convention; it doesn't
45 * modify any of the usual registers, except for LR. 42 * modify any of the usual registers, except for LR.
46 */ 43 */
44#define EXPORT_CRC_ALIAS(sym) __CRC_SYMBOL(sym, "")
45
47#define EXPORT_SYMBOL_ALIAS(sym,orig) \ 46#define EXPORT_SYMBOL_ALIAS(sym,orig) \
47 EXPORT_CRC_ALIAS(sym) \
48 const struct kernel_symbol __ksymtab_##sym \ 48 const struct kernel_symbol __ksymtab_##sym \
49 __attribute__((section("__ksymtab"))) = \ 49 __attribute__((section("__ksymtab"))) = \
50 { (unsigned long)&orig, #sym }; 50 { (unsigned long)&orig, #sym };
@@ -134,9 +134,6 @@ EXPORT_SYMBOL(__lshrdi3);
134EXPORT_SYMBOL(__modsi3); 134EXPORT_SYMBOL(__modsi3);
135EXPORT_SYMBOL(__muldi3); 135EXPORT_SYMBOL(__muldi3);
136EXPORT_SYMBOL(__ucmpdi2); 136EXPORT_SYMBOL(__ucmpdi2);
137EXPORT_SYMBOL(__udivdi3);
138EXPORT_SYMBOL(__umoddi3);
139EXPORT_SYMBOL(__udivmoddi4);
140EXPORT_SYMBOL(__udivsi3); 137EXPORT_SYMBOL(__udivsi3);
141EXPORT_SYMBOL(__umodsi3); 138EXPORT_SYMBOL(__umodsi3);
142EXPORT_SYMBOL(__do_div64); 139EXPORT_SYMBOL(__do_div64);
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index ad26e98f1e62..c4923fac8dff 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -447,9 +447,26 @@ pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
447 region->end = res->end - offset; 447 region->end = res->end - offset;
448} 448}
449 449
450void __devinit
451pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
452 struct pci_bus_region *region)
453{
454 struct pci_sys_data *root = dev->sysdata;
455 unsigned long offset = 0;
456
457 if (res->flags & IORESOURCE_IO)
458 offset = root->io_offset;
459 if (res->flags & IORESOURCE_MEM)
460 offset = root->mem_offset;
461
462 res->start = region->start + offset;
463 res->end = region->end + offset;
464}
465
450#ifdef CONFIG_HOTPLUG 466#ifdef CONFIG_HOTPLUG
451EXPORT_SYMBOL(pcibios_fixup_bus); 467EXPORT_SYMBOL(pcibios_fixup_bus);
452EXPORT_SYMBOL(pcibios_resource_to_bus); 468EXPORT_SYMBOL(pcibios_resource_to_bus);
469EXPORT_SYMBOL(pcibios_bus_to_resource);
453#endif 470#endif
454 471
455/* 472/*
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index bd4823c74645..1155cf07c871 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -344,9 +344,9 @@ __create_page_tables:
344 str r6, [r0] 344 str r6, [r0]
345#endif 345#endif
346 346
347#ifdef CONFIG_DEBUG_LL
347 bic r7, r7, #0x0c @ turn off cacheable 348 bic r7, r7, #0x0c @ turn off cacheable
348 @ and bufferable bits 349 @ and bufferable bits
349#ifdef CONFIG_DEBUG_LL
350 /* 350 /*
351 * Map in IO space for serial debugging. 351 * Map in IO space for serial debugging.
352 * This allows debug messages to be output 352 * This allows debug messages to be output
@@ -372,28 +372,24 @@ __create_page_tables:
372 teq r1, #MACH_TYPE_NETWINDER 372 teq r1, #MACH_TYPE_NETWINDER
373 teqne r1, #MACH_TYPE_CATS 373 teqne r1, #MACH_TYPE_CATS
374 bne 1f 374 bne 1f
375 add r0, r4, #0x3fc0 @ ff000000 375 add r0, r4, #0xff000000 >> 18
376 mov r3, #0x7c000000 376 orr r3, r7, #0x7c000000
377 orr r3, r3, r7 377 str r3, [r0]
378 str r3, [r0], #4
379 add r3, r3, #1 << 20
380 str r3, [r0], #4
3811: 3781:
382#endif 379#endif
383#endif
384#ifdef CONFIG_ARCH_RPC 380#ifdef CONFIG_ARCH_RPC
385 /* 381 /*
386 * Map in screen at 0x02000000 & SCREEN2_BASE 382 * Map in screen at 0x02000000 & SCREEN2_BASE
387 * Similar reasons here - for debug. This is 383 * Similar reasons here - for debug. This is
388 * only for Acorn RiscPC architectures. 384 * only for Acorn RiscPC architectures.
389 */ 385 */
390 add r0, r4, #0x80 @ 02000000 386 add r0, r4, #0x02000000 >> 18
391 mov r3, #0x02000000 387 orr r3, r7, #0x02000000
392 orr r3, r3, r7
393 str r3, [r0] 388 str r3, [r0]
394 add r0, r4, #0x3600 @ d8000000 389 add r0, r4, #0xd8000000 >> 18
395 str r3, [r0] 390 str r3, [r0]
396#endif 391#endif
392#endif
397 mov pc, lr 393 mov pc, lr
398 .ltorg 394 .ltorg
399 395
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index ff187f4308f0..395137a8fad2 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -4,6 +4,10 @@
4 * Copyright (C) 1992 Linus Torvalds 4 * Copyright (C) 1992 Linus Torvalds
5 * Modifications for ARM processor Copyright (C) 1995-2000 Russell King. 5 * Modifications for ARM processor Copyright (C) 1995-2000 Russell King.
6 * 6 *
7 * Support for Dynamic Tick Timer Copyright (C) 2004-2005 Nokia Corporation.
8 * Dynamic Tick Timer written by Tony Lindgren <tony@atomide.com> and
9 * Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>.
10 *
7 * This program is free software; you can redistribute it and/or modify 11 * 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 12 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation. 13 * published by the Free Software Foundation.
@@ -37,6 +41,7 @@
37#include <asm/irq.h> 41#include <asm/irq.h>
38#include <asm/system.h> 42#include <asm/system.h>
39#include <asm/mach/irq.h> 43#include <asm/mach/irq.h>
44#include <asm/mach/time.h>
40 45
41/* 46/*
42 * Maximum IRQ count. Currently, this is arbitary. However, it should 47 * Maximum IRQ count. Currently, this is arbitary. However, it should
@@ -329,6 +334,15 @@ __do_irq(unsigned int irq, struct irqaction *action, struct pt_regs *regs)
329 334
330 spin_unlock(&irq_controller_lock); 335 spin_unlock(&irq_controller_lock);
331 336
337#ifdef CONFIG_NO_IDLE_HZ
338 if (!(action->flags & SA_TIMER) && system_timer->dyn_tick != NULL) {
339 write_seqlock(&xtime_lock);
340 if (system_timer->dyn_tick->state & DYN_TICK_ENABLED)
341 system_timer->dyn_tick->handler(irq, 0, regs);
342 write_sequnlock(&xtime_lock);
343 }
344#endif
345
332 if (!(action->flags & SA_INTERRUPT)) 346 if (!(action->flags & SA_INTERRUPT))
333 local_irq_enable(); 347 local_irq_enable();
334 348
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 8f146a4b4752..409db6d5ec99 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -32,6 +32,7 @@
32#include <asm/leds.h> 32#include <asm/leds.h>
33#include <asm/processor.h> 33#include <asm/processor.h>
34#include <asm/uaccess.h> 34#include <asm/uaccess.h>
35#include <asm/mach/time.h>
35 36
36extern const char *processor_modes[]; 37extern const char *processor_modes[];
37extern void setup_mm_for_reboot(char mode); 38extern void setup_mm_for_reboot(char mode);
@@ -85,8 +86,10 @@ EXPORT_SYMBOL(pm_power_off);
85void default_idle(void) 86void default_idle(void)
86{ 87{
87 local_irq_disable(); 88 local_irq_disable();
88 if (!need_resched() && !hlt_counter) 89 if (!need_resched() && !hlt_counter) {
90 timer_dyn_reprogram();
89 arch_idle(); 91 arch_idle();
92 }
90 local_irq_enable(); 93 local_irq_enable();
91} 94}
92 95
@@ -128,7 +131,6 @@ void machine_halt(void)
128{ 131{
129} 132}
130 133
131EXPORT_SYMBOL(machine_halt);
132 134
133void machine_power_off(void) 135void machine_power_off(void)
134{ 136{
@@ -136,7 +138,6 @@ void machine_power_off(void)
136 pm_power_off(); 138 pm_power_off();
137} 139}
138 140
139EXPORT_SYMBOL(machine_power_off);
140 141
141void machine_restart(char * __unused) 142void machine_restart(char * __unused)
142{ 143{
@@ -166,8 +167,6 @@ void machine_restart(char * __unused)
166 while (1); 167 while (1);
167} 168}
168 169
169EXPORT_SYMBOL(machine_restart);
170
171void __show_regs(struct pt_regs *regs) 170void __show_regs(struct pt_regs *regs)
172{ 171{
173 unsigned long flags = condition_codes(regs); 172 unsigned long flags = condition_codes(regs);
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 9fed5fa194d9..c9b69771f92e 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -359,7 +359,8 @@ void cpu_init(void)
359 "I" (offsetof(struct stack, abt[0])), 359 "I" (offsetof(struct stack, abt[0])),
360 "I" (PSR_F_BIT | PSR_I_BIT | UND_MODE), 360 "I" (PSR_F_BIT | PSR_I_BIT | UND_MODE),
361 "I" (offsetof(struct stack, und[0])), 361 "I" (offsetof(struct stack, und[0])),
362 "I" (PSR_F_BIT | PSR_I_BIT | SVC_MODE)); 362 "I" (PSR_F_BIT | PSR_I_BIT | SVC_MODE)
363 : "r14");
363} 364}
364 365
365static struct machine_desc * __init setup_machine(unsigned int nr) 366static struct machine_desc * __init setup_machine(unsigned int nr)
@@ -395,6 +396,20 @@ static void __init early_initrd(char **p)
395} 396}
396__early_param("initrd=", early_initrd); 397__early_param("initrd=", early_initrd);
397 398
399static void __init add_memory(unsigned long start, unsigned long size)
400{
401 /*
402 * Ensure that start/size are aligned to a page boundary.
403 * Size is appropriately rounded down, start is rounded up.
404 */
405 size -= start & ~PAGE_MASK;
406
407 meminfo.bank[meminfo.nr_banks].start = PAGE_ALIGN(start);
408 meminfo.bank[meminfo.nr_banks].size = size & PAGE_MASK;
409 meminfo.bank[meminfo.nr_banks].node = PHYS_TO_NID(start);
410 meminfo.nr_banks += 1;
411}
412
398/* 413/*
399 * Pick out the memory size. We look for mem=size@start, 414 * Pick out the memory size. We look for mem=size@start,
400 * where start and size are "size[KkMm]" 415 * where start and size are "size[KkMm]"
@@ -419,10 +434,7 @@ static void __init early_mem(char **p)
419 if (**p == '@') 434 if (**p == '@')
420 start = memparse(*p + 1, p); 435 start = memparse(*p + 1, p);
421 436
422 meminfo.bank[meminfo.nr_banks].start = start; 437 add_memory(start, size);
423 meminfo.bank[meminfo.nr_banks].size = size;
424 meminfo.bank[meminfo.nr_banks].node = PHYS_TO_NID(start);
425 meminfo.nr_banks += 1;
426} 438}
427__early_param("mem=", early_mem); 439__early_param("mem=", early_mem);
428 440
@@ -564,11 +576,7 @@ static int __init parse_tag_mem32(const struct tag *tag)
564 tag->u.mem.start, tag->u.mem.size / 1024); 576 tag->u.mem.start, tag->u.mem.size / 1024);
565 return -EINVAL; 577 return -EINVAL;
566 } 578 }
567 meminfo.bank[meminfo.nr_banks].start = tag->u.mem.start; 579 add_memory(tag->u.mem.start, tag->u.mem.size);
568 meminfo.bank[meminfo.nr_banks].size = tag->u.mem.size;
569 meminfo.bank[meminfo.nr_banks].node = PHYS_TO_NID(tag->u.mem.start);
570 meminfo.nr_banks += 1;
571
572 return 0; 580 return 0;
573} 581}
574 582
@@ -729,8 +737,8 @@ void __init setup_arch(char **cmdline_p)
729 if (mdesc->soft_reboot) 737 if (mdesc->soft_reboot)
730 reboot_setup("s"); 738 reboot_setup("s");
731 739
732 if (mdesc->param_offset) 740 if (mdesc->boot_params)
733 tags = phys_to_virt(mdesc->param_offset); 741 tags = phys_to_virt(mdesc->boot_params);
734 742
735 /* 743 /*
736 * If we have the old style parameters, convert them to 744 * If we have the old style parameters, convert them to
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index 931919fd5121..5e435e42dacd 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -19,6 +19,7 @@
19#include <asm/unistd.h> 19#include <asm/unistd.h>
20 20
21#include "ptrace.h" 21#include "ptrace.h"
22#include "signal.h"
22 23
23#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) 24#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
24 25
@@ -35,7 +36,7 @@
35#define SWI_THUMB_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_sigreturn - __NR_SYSCALL_BASE)) 36#define SWI_THUMB_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_sigreturn - __NR_SYSCALL_BASE))
36#define SWI_THUMB_RT_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_rt_sigreturn - __NR_SYSCALL_BASE)) 37#define SWI_THUMB_RT_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_rt_sigreturn - __NR_SYSCALL_BASE))
37 38
38static const unsigned long retcodes[4] = { 39const unsigned long sigreturn_codes[4] = {
39 SWI_SYS_SIGRETURN, SWI_THUMB_SIGRETURN, 40 SWI_SYS_SIGRETURN, SWI_THUMB_SIGRETURN,
40 SWI_SYS_RT_SIGRETURN, SWI_THUMB_RT_SIGRETURN 41 SWI_SYS_RT_SIGRETURN, SWI_THUMB_RT_SIGRETURN
41}; 42};
@@ -500,17 +501,25 @@ setup_return(struct pt_regs *regs, struct k_sigaction *ka,
500 if (ka->sa.sa_flags & SA_SIGINFO) 501 if (ka->sa.sa_flags & SA_SIGINFO)
501 idx += 2; 502 idx += 2;
502 503
503 if (__put_user(retcodes[idx], rc)) 504 if (__put_user(sigreturn_codes[idx], rc))
504 return 1; 505 return 1;
505 506
506 /* 507 if (cpsr & MODE32_BIT) {
507 * Ensure that the instruction cache sees 508 /*
508 * the return code written onto the stack. 509 * 32-bit code can use the new high-page
509 */ 510 * signal return code support.
510 flush_icache_range((unsigned long)rc, 511 */
511 (unsigned long)(rc + 1)); 512 retcode = KERN_SIGRETURN_CODE + (idx << 2) + thumb;
512 513 } else {
513 retcode = ((unsigned long)rc) + thumb; 514 /*
515 * Ensure that the instruction cache sees
516 * the return code written onto the stack.
517 */
518 flush_icache_range((unsigned long)rc,
519 (unsigned long)(rc + 1));
520
521 retcode = ((unsigned long)rc) + thumb;
522 }
514 } 523 }
515 524
516 regs->ARM_r0 = usig; 525 regs->ARM_r0 = usig;
@@ -688,7 +697,7 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall)
688 if (!user_mode(regs)) 697 if (!user_mode(regs))
689 return 0; 698 return 0;
690 699
691 if (try_to_freeze(0)) 700 if (try_to_freeze())
692 goto no_signal; 701 goto no_signal;
693 702
694 if (current->ptrace & PT_SINGLESTEP) 703 if (current->ptrace & PT_SINGLESTEP)
diff --git a/arch/arm/kernel/signal.h b/arch/arm/kernel/signal.h
new file mode 100644
index 000000000000..91d26faca62b
--- /dev/null
+++ b/arch/arm/kernel/signal.h
@@ -0,0 +1,12 @@
1/*
2 * linux/arch/arm/kernel/signal.h
3 *
4 * Copyright (C) 2005 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#define KERN_SIGRETURN_CODE 0xffff0500
11
12extern const unsigned long sigreturn_codes[4];
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 34892758f098..b2085735a2ba 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -36,7 +36,7 @@
36 * The present bitmask indicates that the CPU is physically present. 36 * The present bitmask indicates that the CPU is physically present.
37 * The online bitmask indicates that the CPU is up and running. 37 * The online bitmask indicates that the CPU is up and running.
38 */ 38 */
39cpumask_t cpu_present_mask; 39cpumask_t cpu_possible_map;
40cpumask_t cpu_online_map; 40cpumask_t cpu_online_map;
41 41
42/* 42/*
@@ -78,7 +78,7 @@ struct smp_call_struct {
78static struct smp_call_struct * volatile smp_call_function_data; 78static struct smp_call_struct * volatile smp_call_function_data;
79static DEFINE_SPINLOCK(smp_call_function_lock); 79static DEFINE_SPINLOCK(smp_call_function_lock);
80 80
81int __init __cpu_up(unsigned int cpu) 81int __cpuinit __cpu_up(unsigned int cpu)
82{ 82{
83 struct task_struct *idle; 83 struct task_struct *idle;
84 pgd_t *pgd; 84 pgd_t *pgd;
@@ -159,7 +159,7 @@ int __init __cpu_up(unsigned int cpu)
159 * This is the secondary CPU boot entry. We're using this CPUs 159 * This is the secondary CPU boot entry. We're using this CPUs
160 * idle thread stack, but a set of temporary page tables. 160 * idle thread stack, but a set of temporary page tables.
161 */ 161 */
162asmlinkage void __init secondary_start_kernel(void) 162asmlinkage void __cpuinit secondary_start_kernel(void)
163{ 163{
164 struct mm_struct *mm = &init_mm; 164 struct mm_struct *mm = &init_mm;
165 unsigned int cpu = smp_processor_id(); 165 unsigned int cpu = smp_processor_id();
@@ -176,6 +176,7 @@ asmlinkage void __init secondary_start_kernel(void)
176 cpu_set(cpu, mm->cpu_vm_mask); 176 cpu_set(cpu, mm->cpu_vm_mask);
177 cpu_switch_mm(mm->pgd, mm); 177 cpu_switch_mm(mm->pgd, mm);
178 enter_lazy_tlb(mm, current); 178 enter_lazy_tlb(mm, current);
179 local_flush_tlb_all();
179 180
180 cpu_init(); 181 cpu_init();
181 182
@@ -209,7 +210,7 @@ asmlinkage void __init secondary_start_kernel(void)
209 * Called by both boot and secondaries to move global data into 210 * Called by both boot and secondaries to move global data into
210 * per-processor storage. 211 * per-processor storage.
211 */ 212 */
212void __init smp_store_cpu_info(unsigned int cpuid) 213void __cpuinit smp_store_cpu_info(unsigned int cpuid)
213{ 214{
214 struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpuid); 215 struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpuid);
215 216
@@ -235,7 +236,8 @@ void __init smp_prepare_boot_cpu(void)
235{ 236{
236 unsigned int cpu = smp_processor_id(); 237 unsigned int cpu = smp_processor_id();
237 238
238 cpu_set(cpu, cpu_present_mask); 239 cpu_set(cpu, cpu_possible_map);
240 cpu_set(cpu, cpu_present_map);
239 cpu_set(cpu, cpu_online_map); 241 cpu_set(cpu, cpu_online_map);
240} 242}
241 243
@@ -355,7 +357,7 @@ void show_ipi_list(struct seq_file *p)
355 357
356 seq_puts(p, "IPI:"); 358 seq_puts(p, "IPI:");
357 359
358 for_each_online_cpu(cpu) 360 for_each_present_cpu(cpu)
359 seq_printf(p, " %10lu", per_cpu(ipi_data, cpu).ipi_count); 361 seq_printf(p, " %10lu", per_cpu(ipi_data, cpu).ipi_count);
360 362
361 seq_putc(p, '\n'); 363 seq_putc(p, '\n');
@@ -502,3 +504,126 @@ int __init setup_profiling_timer(unsigned int multiplier)
502{ 504{
503 return -EINVAL; 505 return -EINVAL;
504} 506}
507
508static int
509on_each_cpu_mask(void (*func)(void *), void *info, int retry, int wait,
510 cpumask_t mask)
511{
512 int ret = 0;
513
514 preempt_disable();
515
516 ret = smp_call_function_on_cpu(func, info, retry, wait, mask);
517 if (cpu_isset(smp_processor_id(), mask))
518 func(info);
519
520 preempt_enable();
521
522 return ret;
523}
524
525/**********************************************************************/
526
527/*
528 * TLB operations
529 */
530struct tlb_args {
531 struct vm_area_struct *ta_vma;
532 unsigned long ta_start;
533 unsigned long ta_end;
534};
535
536static inline void ipi_flush_tlb_all(void *ignored)
537{
538 local_flush_tlb_all();
539}
540
541static inline void ipi_flush_tlb_mm(void *arg)
542{
543 struct mm_struct *mm = (struct mm_struct *)arg;
544
545 local_flush_tlb_mm(mm);
546}
547
548static inline void ipi_flush_tlb_page(void *arg)
549{
550 struct tlb_args *ta = (struct tlb_args *)arg;
551
552 local_flush_tlb_page(ta->ta_vma, ta->ta_start);
553}
554
555static inline void ipi_flush_tlb_kernel_page(void *arg)
556{
557 struct tlb_args *ta = (struct tlb_args *)arg;
558
559 local_flush_tlb_kernel_page(ta->ta_start);
560}
561
562static inline void ipi_flush_tlb_range(void *arg)
563{
564 struct tlb_args *ta = (struct tlb_args *)arg;
565
566 local_flush_tlb_range(ta->ta_vma, ta->ta_start, ta->ta_end);
567}
568
569static inline void ipi_flush_tlb_kernel_range(void *arg)
570{
571 struct tlb_args *ta = (struct tlb_args *)arg;
572
573 local_flush_tlb_kernel_range(ta->ta_start, ta->ta_end);
574}
575
576void flush_tlb_all(void)
577{
578 on_each_cpu(ipi_flush_tlb_all, NULL, 1, 1);
579}
580
581void flush_tlb_mm(struct mm_struct *mm)
582{
583 cpumask_t mask = mm->cpu_vm_mask;
584
585 on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, 1, mask);
586}
587
588void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr)
589{
590 cpumask_t mask = vma->vm_mm->cpu_vm_mask;
591 struct tlb_args ta;
592
593 ta.ta_vma = vma;
594 ta.ta_start = uaddr;
595
596 on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, 1, mask);
597}
598
599void flush_tlb_kernel_page(unsigned long kaddr)
600{
601 struct tlb_args ta;
602
603 ta.ta_start = kaddr;
604
605 on_each_cpu(ipi_flush_tlb_kernel_page, &ta, 1, 1);
606}
607
608void flush_tlb_range(struct vm_area_struct *vma,
609 unsigned long start, unsigned long end)
610{
611 cpumask_t mask = vma->vm_mm->cpu_vm_mask;
612 struct tlb_args ta;
613
614 ta.ta_vma = vma;
615 ta.ta_start = start;
616 ta.ta_end = end;
617
618 on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, 1, mask);
619}
620
621void flush_tlb_kernel_range(unsigned long start, unsigned long end)
622{
623 struct tlb_args ta;
624
625 ta.ta_start = start;
626 ta.ta_end = end;
627
628 on_each_cpu(ipi_flush_tlb_kernel_range, &ta, 1, 1);
629}
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index c232f24f4a60..1b7fcd50c3e2 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -381,6 +381,99 @@ static struct sysdev_class timer_sysclass = {
381 .resume = timer_resume, 381 .resume = timer_resume,
382}; 382};
383 383
384#ifdef CONFIG_NO_IDLE_HZ
385static int timer_dyn_tick_enable(void)
386{
387 struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick;
388 unsigned long flags;
389 int ret = -ENODEV;
390
391 if (dyn_tick) {
392 write_seqlock_irqsave(&xtime_lock, flags);
393 ret = 0;
394 if (!(dyn_tick->state & DYN_TICK_ENABLED)) {
395 ret = dyn_tick->enable();
396
397 if (ret == 0)
398 dyn_tick->state |= DYN_TICK_ENABLED;
399 }
400 write_sequnlock_irqrestore(&xtime_lock, flags);
401 }
402
403 return ret;
404}
405
406static int timer_dyn_tick_disable(void)
407{
408 struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick;
409 unsigned long flags;
410 int ret = -ENODEV;
411
412 if (dyn_tick) {
413 write_seqlock_irqsave(&xtime_lock, flags);
414 ret = 0;
415 if (dyn_tick->state & DYN_TICK_ENABLED) {
416 ret = dyn_tick->disable();
417
418 if (ret == 0)
419 dyn_tick->state &= ~DYN_TICK_ENABLED;
420 }
421 write_sequnlock_irqrestore(&xtime_lock, flags);
422 }
423
424 return ret;
425}
426
427/*
428 * Reprogram the system timer for at least the calculated time interval.
429 * This function should be called from the idle thread with IRQs disabled,
430 * immediately before sleeping.
431 */
432void timer_dyn_reprogram(void)
433{
434 struct dyn_tick_timer *dyn_tick = system_timer->dyn_tick;
435
436 write_seqlock(&xtime_lock);
437 if (dyn_tick->state & DYN_TICK_ENABLED)
438 dyn_tick->reprogram(next_timer_interrupt() - jiffies);
439 write_sequnlock(&xtime_lock);
440}
441
442static ssize_t timer_show_dyn_tick(struct sys_device *dev, char *buf)
443{
444 return sprintf(buf, "%i\n",
445 (system_timer->dyn_tick->state & DYN_TICK_ENABLED) >> 1);
446}
447
448static ssize_t timer_set_dyn_tick(struct sys_device *dev, const char *buf,
449 size_t count)
450{
451 unsigned int enable = simple_strtoul(buf, NULL, 2);
452
453 if (enable)
454 timer_dyn_tick_enable();
455 else
456 timer_dyn_tick_disable();
457
458 return count;
459}
460static SYSDEV_ATTR(dyn_tick, 0644, timer_show_dyn_tick, timer_set_dyn_tick);
461
462/*
463 * dyntick=enable|disable
464 */
465static char dyntick_str[4] __initdata = "";
466
467static int __init dyntick_setup(char *str)
468{
469 if (str)
470 strlcpy(dyntick_str, str, sizeof(dyntick_str));
471 return 1;
472}
473
474__setup("dyntick=", dyntick_setup);
475#endif
476
384static int __init timer_init_sysfs(void) 477static int __init timer_init_sysfs(void)
385{ 478{
386 int ret = sysdev_class_register(&timer_sysclass); 479 int ret = sysdev_class_register(&timer_sysclass);
@@ -388,6 +481,20 @@ static int __init timer_init_sysfs(void)
388 system_timer->dev.cls = &timer_sysclass; 481 system_timer->dev.cls = &timer_sysclass;
389 ret = sysdev_register(&system_timer->dev); 482 ret = sysdev_register(&system_timer->dev);
390 } 483 }
484
485#ifdef CONFIG_NO_IDLE_HZ
486 if (ret == 0 && system_timer->dyn_tick) {
487 ret = sysdev_create_file(&system_timer->dev, &attr_dyn_tick);
488
489 /*
490 * Turn on dynamic tick after calibrate delay
491 * for correct bogomips
492 */
493 if (ret == 0 && dyntick_str[0] == 'e')
494 ret = timer_dyn_tick_enable();
495 }
496#endif
497
391 return ret; 498 return ret;
392} 499}
393 500
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 45d2a032d890..d571c37ac30c 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -30,6 +30,7 @@
30#include <asm/traps.h> 30#include <asm/traps.h>
31 31
32#include "ptrace.h" 32#include "ptrace.h"
33#include "signal.h"
33 34
34const char *processor_modes[]= 35const char *processor_modes[]=
35{ "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" , 36{ "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" ,
@@ -229,16 +230,8 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
229 do_exit(SIGSEGV); 230 do_exit(SIGSEGV);
230} 231}
231 232
232void die_if_kernel(const char *str, struct pt_regs *regs, int err) 233void notify_die(const char *str, struct pt_regs *regs, struct siginfo *info,
233{ 234 unsigned long err, unsigned long trap)
234 if (user_mode(regs))
235 return;
236
237 die(str, regs, err);
238}
239
240static void notify_die(const char *str, struct pt_regs *regs, siginfo_t *info,
241 unsigned long err, unsigned long trap)
242{ 235{
243 if (user_mode(regs)) { 236 if (user_mode(regs)) {
244 current->thread.error_code = err; 237 current->thread.error_code = err;
@@ -255,16 +248,20 @@ static DEFINE_SPINLOCK(undef_lock);
255 248
256void register_undef_hook(struct undef_hook *hook) 249void register_undef_hook(struct undef_hook *hook)
257{ 250{
258 spin_lock_irq(&undef_lock); 251 unsigned long flags;
252
253 spin_lock_irqsave(&undef_lock, flags);
259 list_add(&hook->node, &undef_hook); 254 list_add(&hook->node, &undef_hook);
260 spin_unlock_irq(&undef_lock); 255 spin_unlock_irqrestore(&undef_lock, flags);
261} 256}
262 257
263void unregister_undef_hook(struct undef_hook *hook) 258void unregister_undef_hook(struct undef_hook *hook)
264{ 259{
265 spin_lock_irq(&undef_lock); 260 unsigned long flags;
261
262 spin_lock_irqsave(&undef_lock, flags);
266 list_del(&hook->node); 263 list_del(&hook->node);
267 spin_unlock_irq(&undef_lock); 264 spin_unlock_irqrestore(&undef_lock, flags);
268} 265}
269 266
270asmlinkage void do_undefinstr(struct pt_regs *regs) 267asmlinkage void do_undefinstr(struct pt_regs *regs)
@@ -683,6 +680,14 @@ void __init trap_init(void)
683 memcpy((void *)0xffff0000, __vectors_start, __vectors_end - __vectors_start); 680 memcpy((void *)0xffff0000, __vectors_start, __vectors_end - __vectors_start);
684 memcpy((void *)0xffff0200, __stubs_start, __stubs_end - __stubs_start); 681 memcpy((void *)0xffff0200, __stubs_start, __stubs_end - __stubs_start);
685 memcpy((void *)0xffff1000 - kuser_sz, __kuser_helper_start, kuser_sz); 682 memcpy((void *)0xffff1000 - kuser_sz, __kuser_helper_start, kuser_sz);
683
684 /*
685 * Copy signal return handlers into the vector page, and
686 * set sigreturn to be a pointer to these.
687 */
688 memcpy((void *)KERN_SIGRETURN_CODE, sigreturn_codes,
689 sizeof(sigreturn_codes));
690
686 flush_icache_range(0xffff0000, 0xffff0000 + PAGE_SIZE); 691 flush_icache_range(0xffff0000, 0xffff0000 + PAGE_SIZE);
687 modify_domain(DOMAIN_USER, DOMAIN_CLIENT); 692 modify_domain(DOMAIN_USER, DOMAIN_CLIENT);
688} 693}
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index c0e65833ffc4..8725d63e4219 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -11,7 +11,7 @@ lib-y := backtrace.o changebit.o csumipv6.o csumpartial.o \
11 strnlen_user.o strchr.o strrchr.o testchangebit.o \ 11 strnlen_user.o strchr.o strrchr.o testchangebit.o \
12 testclearbit.o testsetbit.o uaccess.o getuser.o \ 12 testclearbit.o testsetbit.o uaccess.o getuser.o \
13 putuser.o ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ 13 putuser.o ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \
14 ucmpdi2.o udivdi3.o lib1funcs.o div64.o \ 14 ucmpdi2.o lib1funcs.o div64.o \
15 io-readsb.o io-writesb.o io-readsl.o io-writesl.o 15 io-readsb.o io-writesb.o io-readsl.o io-writesl.o
16 16
17ifeq ($(CONFIG_CPU_32v3),y) 17ifeq ($(CONFIG_CPU_32v3),y)
diff --git a/arch/arm/lib/bitops.h b/arch/arm/lib/bitops.h
index 4a83ab6cd565..2036ff15bda9 100644
--- a/arch/arm/lib/bitops.h
+++ b/arch/arm/lib/bitops.h
@@ -1,3 +1,33 @@
1#if __LINUX_ARM_ARCH__ >= 6
2 .macro bitop, instr
3 mov r2, #1
4 and r3, r0, #7 @ Get bit offset
5 add r1, r1, r0, lsr #3 @ Get byte offset
6 mov r3, r2, lsl r3
71: ldrexb r2, [r1]
8 \instr r2, r2, r3
9 strexb r0, r2, [r1]
10 cmp r0, #0
11 bne 1b
12 mov pc, lr
13 .endm
14
15 .macro testop, instr, store
16 and r3, r0, #7 @ Get bit offset
17 mov r2, #1
18 add r1, r1, r0, lsr #3 @ Get byte offset
19 mov r3, r2, lsl r3 @ create mask
201: ldrexb r2, [r1]
21 ands r0, r2, r3 @ save old value of bit
22 \instr r2, r2, r3 @ toggle bit
23 strexb ip, r2, [r1]
24 cmp ip, #0
25 bne 1b
26 cmp r0, #0
27 movne r0, #1
282: mov pc, lr
29 .endm
30#else
1 .macro bitop, instr 31 .macro bitop, instr
2 and r2, r0, #7 32 and r2, r0, #7
3 mov r3, #1 33 mov r3, #1
@@ -31,3 +61,4 @@
31 moveq r0, #0 61 moveq r0, #0
32 mov pc, lr 62 mov pc, lr
33 .endm 63 .endm
64#endif
diff --git a/arch/arm/lib/io-shark.c b/arch/arm/lib/io-shark.c
index 108d4573e970..824253948f51 100644
--- a/arch/arm/lib/io-shark.c
+++ b/arch/arm/lib/io-shark.c
@@ -11,73 +11,3 @@
11 * it under the terms of the GNU General Public License version 2 as 11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14#include <linux/kernel.h>
15
16#include <asm/io.h>
17
18void print_warning(void)
19{
20 printk(KERN_WARNING "ins?/outs? not implemented on this architecture\n");
21}
22
23void insl(unsigned int port, void *to, int len)
24{
25 print_warning();
26}
27
28void insb(unsigned int port, void *to, int len)
29{
30 print_warning();
31}
32
33void outsl(unsigned int port, const void *from, int len)
34{
35 print_warning();
36}
37
38void outsb(unsigned int port, const void *from, int len)
39{
40 print_warning();
41}
42
43/* these should be in assembler again */
44
45/*
46 * Purpose: read a block of data from a hardware register to memory.
47 * Proto : insw(int from_port, void *to, int len_in_words);
48 * Proto : inswb(int from_port, void *to, int len_in_bytes);
49 * Notes : increment to
50 */
51
52void insw(unsigned int port, void *to, int len)
53{
54 int i;
55
56 for (i = 0; i < len; i++)
57 ((unsigned short *) to)[i] = inw(port);
58}
59
60void inswb(unsigned int port, void *to, int len)
61{
62 insw(port, to, len >> 2);
63}
64
65/*
66 * Purpose: write a block of data from memory to a hardware register.
67 * Proto : outsw(int to_reg, void *from, int len_in_words);
68 * Proto : outswb(int to_reg, void *from, int len_in_bytes);
69 * Notes : increments from
70 */
71
72void outsw(unsigned int port, const void *from, int len)
73{
74 int i;
75
76 for (i = 0; i < len; i++)
77 outw(((unsigned short *) from)[i], port);
78}
79
80void outswb(unsigned int port, const void *from, int len)
81{
82 outsw(port, from, len >> 2);
83}
diff --git a/arch/arm/lib/longlong.h b/arch/arm/lib/longlong.h
deleted file mode 100644
index 90ae647e4d76..000000000000
--- a/arch/arm/lib/longlong.h
+++ /dev/null
@@ -1,183 +0,0 @@
1/* longlong.h -- based on code from gcc-2.95.3
2
3 definitions for mixed size 32/64 bit arithmetic.
4 Copyright (C) 1991, 92, 94, 95, 96, 1997, 1998 Free Software Foundation, Inc.
5
6 This definition file is free software; you can redistribute it
7 and/or modify it under the terms of the GNU General Public
8 License as published by the Free Software Foundation; either
9 version 2, or (at your option) any later version.
10
11 This definition file is distributed in the hope that it will be
12 useful, but WITHOUT ANY WARRANTY; without even the implied
13 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 See the 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,
19 Boston, MA 02111-1307, USA. */
20
21/* Borrowed from GCC 2.95.3, I Molton 29/07/01 */
22
23#ifndef SI_TYPE_SIZE
24#define SI_TYPE_SIZE 32
25#endif
26
27#define __BITS4 (SI_TYPE_SIZE / 4)
28#define __ll_B (1L << (SI_TYPE_SIZE / 2))
29#define __ll_lowpart(t) ((u32) (t) % __ll_B)
30#define __ll_highpart(t) ((u32) (t) / __ll_B)
31
32/* Define auxiliary asm macros.
33
34 1) umul_ppmm(high_prod, low_prod, multipler, multiplicand)
35 multiplies two u32 integers MULTIPLER and MULTIPLICAND,
36 and generates a two-part u32 product in HIGH_PROD and
37 LOW_PROD.
38
39 2) __umulsidi3(a,b) multiplies two u32 integers A and B,
40 and returns a u64 product. This is just a variant of umul_ppmm.
41
42 3) udiv_qrnnd(quotient, remainder, high_numerator, low_numerator,
43 denominator) divides a two-word unsigned integer, composed by the
44 integers HIGH_NUMERATOR and LOW_NUMERATOR, by DENOMINATOR and
45 places the quotient in QUOTIENT and the remainder in REMAINDER.
46 HIGH_NUMERATOR must be less than DENOMINATOR for correct operation.
47 If, in addition, the most significant bit of DENOMINATOR must be 1,
48 then the pre-processor symbol UDIV_NEEDS_NORMALIZATION is defined to 1.
49
50 4) sdiv_qrnnd(quotient, remainder, high_numerator, low_numerator,
51 denominator). Like udiv_qrnnd but the numbers are signed. The
52 quotient is rounded towards 0.
53
54 5) count_leading_zeros(count, x) counts the number of zero-bits from
55 the msb to the first non-zero bit. This is the number of steps X
56 needs to be shifted left to set the msb. Undefined for X == 0.
57
58 6) add_ssaaaa(high_sum, low_sum, high_addend_1, low_addend_1,
59 high_addend_2, low_addend_2) adds two two-word unsigned integers,
60 composed by HIGH_ADDEND_1 and LOW_ADDEND_1, and HIGH_ADDEND_2 and
61 LOW_ADDEND_2 respectively. The result is placed in HIGH_SUM and
62 LOW_SUM. Overflow (i.e. carry out) is not stored anywhere, and is
63 lost.
64
65 7) sub_ddmmss(high_difference, low_difference, high_minuend,
66 low_minuend, high_subtrahend, low_subtrahend) subtracts two
67 two-word unsigned integers, composed by HIGH_MINUEND_1 and
68 LOW_MINUEND_1, and HIGH_SUBTRAHEND_2 and LOW_SUBTRAHEND_2
69 respectively. The result is placed in HIGH_DIFFERENCE and
70 LOW_DIFFERENCE. Overflow (i.e. carry out) is not stored anywhere,
71 and is lost.
72
73 If any of these macros are left undefined for a particular CPU,
74 C macros are used. */
75
76#if defined (__arm__)
77#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
78 __asm__ ("adds %1, %4, %5 \n\
79 adc %0, %2, %3" \
80 : "=r" ((u32) (sh)), \
81 "=&r" ((u32) (sl)) \
82 : "%r" ((u32) (ah)), \
83 "rI" ((u32) (bh)), \
84 "%r" ((u32) (al)), \
85 "rI" ((u32) (bl)))
86#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
87 __asm__ ("subs %1, %4, %5 \n\
88 sbc %0, %2, %3" \
89 : "=r" ((u32) (sh)), \
90 "=&r" ((u32) (sl)) \
91 : "r" ((u32) (ah)), \
92 "rI" ((u32) (bh)), \
93 "r" ((u32) (al)), \
94 "rI" ((u32) (bl)))
95#define umul_ppmm(xh, xl, a, b) \
96{register u32 __t0, __t1, __t2; \
97 __asm__ ("%@ Inlined umul_ppmm \n\
98 mov %2, %5, lsr #16 \n\
99 mov %0, %6, lsr #16 \n\
100 bic %3, %5, %2, lsl #16 \n\
101 bic %4, %6, %0, lsl #16 \n\
102 mul %1, %3, %4 \n\
103 mul %4, %2, %4 \n\
104 mul %3, %0, %3 \n\
105 mul %0, %2, %0 \n\
106 adds %3, %4, %3 \n\
107 addcs %0, %0, #65536 \n\
108 adds %1, %1, %3, lsl #16 \n\
109 adc %0, %0, %3, lsr #16" \
110 : "=&r" ((u32) (xh)), \
111 "=r" ((u32) (xl)), \
112 "=&r" (__t0), "=&r" (__t1), "=r" (__t2) \
113 : "r" ((u32) (a)), \
114 "r" ((u32) (b)));}
115#define UMUL_TIME 20
116#define UDIV_TIME 100
117#endif /* __arm__ */
118
119#define __umulsidi3(u, v) \
120 ({DIunion __w; \
121 umul_ppmm (__w.s.high, __w.s.low, u, v); \
122 __w.ll; })
123
124#define __udiv_qrnnd_c(q, r, n1, n0, d) \
125 do { \
126 u32 __d1, __d0, __q1, __q0; \
127 u32 __r1, __r0, __m; \
128 __d1 = __ll_highpart (d); \
129 __d0 = __ll_lowpart (d); \
130 \
131 __r1 = (n1) % __d1; \
132 __q1 = (n1) / __d1; \
133 __m = (u32) __q1 * __d0; \
134 __r1 = __r1 * __ll_B | __ll_highpart (n0); \
135 if (__r1 < __m) \
136 { \
137 __q1--, __r1 += (d); \
138 if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\
139 if (__r1 < __m) \
140 __q1--, __r1 += (d); \
141 } \
142 __r1 -= __m; \
143 \
144 __r0 = __r1 % __d1; \
145 __q0 = __r1 / __d1; \
146 __m = (u32) __q0 * __d0; \
147 __r0 = __r0 * __ll_B | __ll_lowpart (n0); \
148 if (__r0 < __m) \
149 { \
150 __q0--, __r0 += (d); \
151 if (__r0 >= (d)) \
152 if (__r0 < __m) \
153 __q0--, __r0 += (d); \
154 } \
155 __r0 -= __m; \
156 \
157 (q) = (u32) __q1 * __ll_B | __q0; \
158 (r) = __r0; \
159 } while (0)
160
161#define UDIV_NEEDS_NORMALIZATION 1
162#define udiv_qrnnd __udiv_qrnnd_c
163
164#define count_leading_zeros(count, x) \
165 do { \
166 u32 __xr = (x); \
167 u32 __a; \
168 \
169 if (SI_TYPE_SIZE <= 32) \
170 { \
171 __a = __xr < ((u32)1<<2*__BITS4) \
172 ? (__xr < ((u32)1<<__BITS4) ? 0 : __BITS4) \
173 : (__xr < ((u32)1<<3*__BITS4) ? 2*__BITS4 : 3*__BITS4); \
174 } \
175 else \
176 { \
177 for (__a = SI_TYPE_SIZE - 8; __a > 0; __a -= 8) \
178 if (((__xr >> __a) & 0xff) != 0) \
179 break; \
180 } \
181 \
182 (count) = SI_TYPE_SIZE - (__clz_tab[__xr >> __a] + __a); \
183 } while (0)
diff --git a/arch/arm/lib/udivdi3.c b/arch/arm/lib/udivdi3.c
deleted file mode 100644
index e343be4c6642..000000000000
--- a/arch/arm/lib/udivdi3.c
+++ /dev/null
@@ -1,222 +0,0 @@
1/* More subroutines needed by GCC output code on some machines. */
2/* Compile this one with gcc. */
3/* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc.
4
5This file is part of GNU CC.
6
7GNU CC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2, or (at your option)
10any later version.
11
12GNU CC is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GNU CC; see the file COPYING. If not, write to
19the Free Software Foundation, 59 Temple Place - Suite 330,
20Boston, MA 02111-1307, USA. */
21
22/* As a special exception, if you link this library with other files,
23 some of which are compiled with GCC, to produce an executable,
24 this library does not by itself cause the resulting executable
25 to be covered by the GNU General Public License.
26 This exception does not however invalidate any other reasons why
27 the executable file might be covered by the GNU General Public License.
28 */
29/* support functions required by the kernel. based on code from gcc-2.95.3 */
30/* I Molton 29/07/01 */
31
32#include "gcclib.h"
33#include "longlong.h"
34
35static const u8 __clz_tab[] = {
36 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5,
37 5, 5, 5, 5, 5, 5, 5, 5,
38 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
39 6, 6, 6, 6, 6, 6, 6, 6,
40 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
41 7, 7, 7, 7, 7, 7, 7, 7,
42 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
43 7, 7, 7, 7, 7, 7, 7, 7,
44 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
45 8, 8, 8, 8, 8, 8, 8, 8,
46 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
47 8, 8, 8, 8, 8, 8, 8, 8,
48 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
49 8, 8, 8, 8, 8, 8, 8, 8,
50 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
51 8, 8, 8, 8, 8, 8, 8, 8,
52};
53
54u64 __udivmoddi4(u64 n, u64 d, u64 * rp)
55{
56 DIunion ww;
57 DIunion nn, dd;
58 DIunion rr;
59 u32 d0, d1, n0, n1, n2;
60 u32 q0, q1;
61 u32 b, bm;
62
63 nn.ll = n;
64 dd.ll = d;
65
66 d0 = dd.s.low;
67 d1 = dd.s.high;
68 n0 = nn.s.low;
69 n1 = nn.s.high;
70
71 if (d1 == 0) {
72 if (d0 > n1) {
73 /* 0q = nn / 0D */
74
75 count_leading_zeros(bm, d0);
76
77 if (bm != 0) {
78 /* Normalize, i.e. make the most significant bit of the
79 denominator set. */
80
81 d0 = d0 << bm;
82 n1 = (n1 << bm) | (n0 >> (SI_TYPE_SIZE - bm));
83 n0 = n0 << bm;
84 }
85
86 udiv_qrnnd(q0, n0, n1, n0, d0);
87 q1 = 0;
88
89 /* Remainder in n0 >> bm. */
90 } else {
91 /* qq = NN / 0d */
92
93 if (d0 == 0)
94 d0 = 1 / d0; /* Divide intentionally by zero. */
95
96 count_leading_zeros(bm, d0);
97
98 if (bm == 0) {
99 /* From (n1 >= d0) /\ (the most significant bit of d0 is set),
100 conclude (the most significant bit of n1 is set) /\ (the
101 leading quotient digit q1 = 1).
102
103 This special case is necessary, not an optimization.
104 (Shifts counts of SI_TYPE_SIZE are undefined.) */
105
106 n1 -= d0;
107 q1 = 1;
108 } else {
109 /* Normalize. */
110
111 b = SI_TYPE_SIZE - bm;
112
113 d0 = d0 << bm;
114 n2 = n1 >> b;
115 n1 = (n1 << bm) | (n0 >> b);
116 n0 = n0 << bm;
117
118 udiv_qrnnd(q1, n1, n2, n1, d0);
119 }
120
121 /* n1 != d0... */
122
123 udiv_qrnnd(q0, n0, n1, n0, d0);
124
125 /* Remainder in n0 >> bm. */
126 }
127
128 if (rp != 0) {
129 rr.s.low = n0 >> bm;
130 rr.s.high = 0;
131 *rp = rr.ll;
132 }
133 } else {
134 if (d1 > n1) {
135 /* 00 = nn / DD */
136
137 q0 = 0;
138 q1 = 0;
139
140 /* Remainder in n1n0. */
141 if (rp != 0) {
142 rr.s.low = n0;
143 rr.s.high = n1;
144 *rp = rr.ll;
145 }
146 } else {
147 /* 0q = NN / dd */
148
149 count_leading_zeros(bm, d1);
150 if (bm == 0) {
151 /* From (n1 >= d1) /\ (the most significant bit of d1 is set),
152 conclude (the most significant bit of n1 is set) /\ (the
153 quotient digit q0 = 0 or 1).
154
155 This special case is necessary, not an optimization. */
156
157 /* The condition on the next line takes advantage of that
158 n1 >= d1 (true due to program flow). */
159 if (n1 > d1 || n0 >= d0) {
160 q0 = 1;
161 sub_ddmmss(n1, n0, n1, n0, d1, d0);
162 } else
163 q0 = 0;
164
165 q1 = 0;
166
167 if (rp != 0) {
168 rr.s.low = n0;
169 rr.s.high = n1;
170 *rp = rr.ll;
171 }
172 } else {
173 u32 m1, m0;
174 /* Normalize. */
175
176 b = SI_TYPE_SIZE - bm;
177
178 d1 = (d1 << bm) | (d0 >> b);
179 d0 = d0 << bm;
180 n2 = n1 >> b;
181 n1 = (n1 << bm) | (n0 >> b);
182 n0 = n0 << bm;
183
184 udiv_qrnnd(q0, n1, n2, n1, d1);
185 umul_ppmm(m1, m0, q0, d0);
186
187 if (m1 > n1 || (m1 == n1 && m0 > n0)) {
188 q0--;
189 sub_ddmmss(m1, m0, m1, m0, d1, d0);
190 }
191
192 q1 = 0;
193
194 /* Remainder in (n1n0 - m1m0) >> bm. */
195 if (rp != 0) {
196 sub_ddmmss(n1, n0, n1, n0, m1, m0);
197 rr.s.low = (n1 << b) | (n0 >> bm);
198 rr.s.high = n1 >> bm;
199 *rp = rr.ll;
200 }
201 }
202 }
203 }
204
205 ww.s.low = q0;
206 ww.s.high = q1;
207 return ww.ll;
208}
209
210u64 __udivdi3(u64 n, u64 d)
211{
212 return __udivmoddi4(n, d, (u64 *) 0);
213}
214
215u64 __umoddi3(u64 u, u64 v)
216{
217 u64 w;
218
219 (void)__udivmoddi4(u, v, &w);
220
221 return w;
222}
diff --git a/arch/arm/mach-aaec2000/Makefile.boot b/arch/arm/mach-aaec2000/Makefile.boot
new file mode 100644
index 000000000000..8f5a8b7c53c7
--- /dev/null
+++ b/arch/arm/mach-aaec2000/Makefile.boot
@@ -0,0 +1 @@
zreladdr-y := 0xf0008000
diff --git a/arch/arm/mach-aaec2000/aaed2000.c b/arch/arm/mach-aaec2000/aaed2000.c
index 5417ca3f4621..c9d899886648 100644
--- a/arch/arm/mach-aaec2000/aaed2000.c
+++ b/arch/arm/mach-aaec2000/aaed2000.c
@@ -40,9 +40,11 @@ static void __init aaed2000_map_io(void)
40} 40}
41 41
42MACHINE_START(AAED2000, "Agilent AAED-2000 Development Platform") 42MACHINE_START(AAED2000, "Agilent AAED-2000 Development Platform")
43 MAINTAINER("Nicolas Bellido Y Ortega") 43 /* Maintainer: Nicolas Bellido Y Ortega */
44 BOOT_MEM(0xf0000000, PIO_BASE, VIO_BASE) 44 .phys_ram = 0xf0000000,
45 MAPIO(aaed2000_map_io) 45 .phys_io = PIO_BASE,
46 INITIRQ(aaed2000_init_irq) 46 .io_pg_offst = ((VIO_BASE) >> 18) & 0xfffc,
47 .map_io = aaed2000_map_io,
48 .init_irq = aaed2000_init_irq,
47 .timer = &aaec2000_timer, 49 .timer = &aaec2000_timer,
48MACHINE_END 50MACHINE_END
diff --git a/arch/arm/mach-aaec2000/core.c b/arch/arm/mach-aaec2000/core.c
index fc145b3768fa..aece0cd4f0a3 100644
--- a/arch/arm/mach-aaec2000/core.c
+++ b/arch/arm/mach-aaec2000/core.c
@@ -128,8 +128,8 @@ aaec2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
128 128
129static struct irqaction aaec2000_timer_irq = { 129static struct irqaction aaec2000_timer_irq = {
130 .name = "AAEC-2000 Timer Tick", 130 .name = "AAEC-2000 Timer Tick",
131 .flags = SA_INTERRUPT, 131 .flags = SA_INTERRUPT | SA_TIMER,
132 .handler = aaec2000_timer_interrupt 132 .handler = aaec2000_timer_interrupt,
133}; 133};
134 134
135static void __init aaec2000_timer_init(void) 135static void __init aaec2000_timer_init(void)
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index 45c930ccd064..0793dcf54f2e 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -28,7 +28,7 @@ config ARCH_CLEP7312
28config ARCH_EDB7211 28config ARCH_EDB7211
29 bool "EDB7211" 29 bool "EDB7211"
30 select ISA 30 select ISA
31 select DISCONTIGMEM 31 select ARCH_DISCONTIGMEM_ENABLE
32 help 32 help
33 Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211 33 Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211
34 evaluation board. 34 evaluation board.
diff --git a/arch/arm/mach-clps711x/autcpu12.c b/arch/arm/mach-clps711x/autcpu12.c
index c106704a2c34..dc73feb1ffb0 100644
--- a/arch/arm/mach-clps711x/autcpu12.c
+++ b/arch/arm/mach-clps711x/autcpu12.c
@@ -59,11 +59,13 @@ void __init autcpu12_map_io(void)
59} 59}
60 60
61MACHINE_START(AUTCPU12, "autronix autcpu12") 61MACHINE_START(AUTCPU12, "autronix autcpu12")
62 MAINTAINER("Thomas Gleixner") 62 /* Maintainer: Thomas Gleixner */
63 BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) 63 .phys_ram = 0xc0000000,
64 BOOT_PARAMS(0xc0020000) 64 .phys_io = 0x80000000,
65 MAPIO(autcpu12_map_io) 65 .io_pg_offst = ((0xff000000) >> 18) & 0xfffc,
66 INITIRQ(clps711x_init_irq) 66 .boot_params = 0xc0020000,
67 .map_io = autcpu12_map_io,
68 .init_irq = clps711x_init_irq,
67 .timer = &clps711x_timer, 69 .timer = &clps711x_timer,
68MACHINE_END 70MACHINE_END
69 71
diff --git a/arch/arm/mach-clps711x/cdb89712.c b/arch/arm/mach-clps711x/cdb89712.c
index 7664f9cf83b8..a46c82cd2711 100644
--- a/arch/arm/mach-clps711x/cdb89712.c
+++ b/arch/arm/mach-clps711x/cdb89712.c
@@ -49,10 +49,12 @@ static void __init cdb89712_map_io(void)
49} 49}
50 50
51MACHINE_START(CDB89712, "Cirrus-CDB89712") 51MACHINE_START(CDB89712, "Cirrus-CDB89712")
52 MAINTAINER("Ray Lehtiniemi") 52 /* Maintainer: Ray Lehtiniemi */
53 BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) 53 .phys_ram = 0xc0000000,
54 BOOT_PARAMS(0xc0000100) 54 .phys_io = 0x80000000,
55 MAPIO(cdb89712_map_io) 55 .io_pg_offst = ((0xff000000) >> 18) & 0xfffc,
56 INITIRQ(clps711x_init_irq) 56 .boot_params = 0xc0000100,
57 .map_io = cdb89712_map_io,
58 .init_irq = clps711x_init_irq,
57 .timer = &clps711x_timer, 59 .timer = &clps711x_timer,
58MACHINE_END 60MACHINE_END
diff --git a/arch/arm/mach-clps711x/ceiva.c b/arch/arm/mach-clps711x/ceiva.c
index e4093be3c4cb..780d91805984 100644
--- a/arch/arm/mach-clps711x/ceiva.c
+++ b/arch/arm/mach-clps711x/ceiva.c
@@ -53,10 +53,12 @@ static void __init ceiva_map_io(void)
53 53
54 54
55MACHINE_START(CEIVA, "CEIVA/Polaroid Photo MAX Digital Picture Frame") 55MACHINE_START(CEIVA, "CEIVA/Polaroid Photo MAX Digital Picture Frame")
56 MAINTAINER("Rob Scott") 56 /* Maintainer: Rob Scott */
57 BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) 57 .phys_ram = 0xc0000000,
58 BOOT_PARAMS(0xc0000100) 58 .phys_io = 0x80000000,
59 MAPIO(ceiva_map_io) 59 .io_pg_offst = ((0xff000000) >> 18) & 0xfffc,
60 INITIRQ(clps711x_init_irq) 60 .boot_params = 0xc0000100,
61 .map_io = ceiva_map_io,
62 .init_irq = clps711x_init_irq,
61 .timer = &clps711x_timer, 63 .timer = &clps711x_timer,
62MACHINE_END 64MACHINE_END
diff --git a/arch/arm/mach-clps711x/clep7312.c b/arch/arm/mach-clps711x/clep7312.c
index 9ca21cb481ba..c83f3fd68fcd 100644
--- a/arch/arm/mach-clps711x/clep7312.c
+++ b/arch/arm/mach-clps711x/clep7312.c
@@ -37,12 +37,14 @@ fixup_clep7312(struct machine_desc *desc, struct tag *tags,
37 37
38 38
39MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312") 39MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312")
40 MAINTAINER("Nobody") 40 /* Maintainer: Nobody */
41 BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) 41 .phys_ram = 0xc0000000,
42 BOOT_PARAMS(0xc0000100) 42 .phys_io = 0x80000000,
43 FIXUP(fixup_clep7312) 43 .io_pg_offst = ((0xff000000) >> 18) & 0xfffc,
44 MAPIO(clps711x_map_io) 44 .boot_params = 0xc0000100,
45 INITIRQ(clps711x_init_irq) 45 .fixup = fixup_clep7312,
46 .map_io = clps711x_map_io,
47 .init_irq = clps711x_init_irq,
46 .timer = &clps711x_timer, 48 .timer = &clps711x_timer,
47MACHINE_END 49MACHINE_END
48 50
diff --git a/arch/arm/mach-clps711x/edb7211-arch.c b/arch/arm/mach-clps711x/edb7211-arch.c
index c6c46324a2e3..255c98b63e15 100644
--- a/arch/arm/mach-clps711x/edb7211-arch.c
+++ b/arch/arm/mach-clps711x/edb7211-arch.c
@@ -51,11 +51,13 @@ fixup_edb7211(struct machine_desc *desc, struct tag *tags,
51} 51}
52 52
53MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") 53MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)")
54 MAINTAINER("Jon McClintock") 54 /* Maintainer: Jon McClintock */
55 BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) 55 .phys_ram = 0xc0000000,
56 BOOT_PARAMS(0xc0020100) /* 0xc0000000 - 0xc001ffff can be video RAM */ 56 .phys_io = 0x80000000,
57 FIXUP(fixup_edb7211) 57 .io_pg_offst = ((0xff000000) >> 18) & 0xfffc,
58 MAPIO(edb7211_map_io) 58 .boot_params = 0xc0020100, /* 0xc0000000 - 0xc001ffff can be video RAM */
59 INITIRQ(clps711x_init_irq) 59 .fixup = fixup_edb7211,
60 .map_io = edb7211_map_io,
61 .init_irq = clps711x_init_irq,
60 .timer = &clps711x_timer, 62 .timer = &clps711x_timer,
61MACHINE_END 63MACHINE_END
diff --git a/arch/arm/mach-clps711x/fortunet.c b/arch/arm/mach-clps711x/fortunet.c
index c1c5b8e01549..f83a59761e02 100644
--- a/arch/arm/mach-clps711x/fortunet.c
+++ b/arch/arm/mach-clps711x/fortunet.c
@@ -75,11 +75,13 @@ fortunet_fixup(struct machine_desc *desc, struct tag *tags,
75} 75}
76 76
77MACHINE_START(FORTUNET, "ARM-FortuNet") 77MACHINE_START(FORTUNET, "ARM-FortuNet")
78 MAINTAINER("FortuNet Inc.") 78 /* Maintainer: FortuNet Inc. */
79 BOOT_MEM(0xc0000000, 0x80000000, 0xf0000000) 79 .phys_ram = 0xc0000000,
80 BOOT_PARAMS(0x00000000) 80 .phys_io = 0x80000000,
81 FIXUP(fortunet_fixup) 81 .io_pg_offst = ((0xf0000000) >> 18) & 0xfffc,
82 MAPIO(clps711x_map_io) 82 .boot_params = 0x00000000,
83 INITIRQ(clps711x_init_irq) 83 .fixup = fortunet_fixup,
84 .map_io = clps711x_map_io,
85 .init_irq = clps711x_init_irq,
84 .timer = &clps711x_timer, 86 .timer = &clps711x_timer,
85MACHINE_END 87MACHINE_END
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c
index 29269df054f5..5bdb90edf992 100644
--- a/arch/arm/mach-clps711x/p720t.c
+++ b/arch/arm/mach-clps711x/p720t.c
@@ -79,12 +79,14 @@ static void __init p720t_map_io(void)
79} 79}
80 80
81MACHINE_START(P720T, "ARM-Prospector720T") 81MACHINE_START(P720T, "ARM-Prospector720T")
82 MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") 82 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
83 BOOT_MEM(0xc0000000, 0x80000000, 0xff000000) 83 .phys_ram = 0xc0000000,
84 BOOT_PARAMS(0xc0000100) 84 .phys_io = 0x80000000,
85 FIXUP(fixup_p720t) 85 .io_pg_offst = ((0xff000000) >> 18) & 0xfffc,
86 MAPIO(p720t_map_io) 86 .boot_params = 0xc0000100,
87 INITIRQ(clps711x_init_irq) 87 .fixup = fixup_p720t,
88 .map_io = p720t_map_io,
89 .init_irq = clps711x_init_irq,
88 .timer = &clps711x_timer, 90 .timer = &clps711x_timer,
89MACHINE_END 91MACHINE_END
90 92
diff --git a/arch/arm/mach-clps711x/time.c b/arch/arm/mach-clps711x/time.c
index 383d4e0c6e35..1a23f0dcd4b8 100644
--- a/arch/arm/mach-clps711x/time.c
+++ b/arch/arm/mach-clps711x/time.c
@@ -57,8 +57,8 @@ p720t_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
57 57
58static struct irqaction clps711x_timer_irq = { 58static struct irqaction clps711x_timer_irq = {
59 .name = "CLPS711x Timer Tick", 59 .name = "CLPS711x Timer Tick",
60 .flags = SA_INTERRUPT, 60 .flags = SA_INTERRUPT | SA_TIMER,
61 .handler = p720t_timer_interrupt 61 .handler = p720t_timer_interrupt,
62}; 62};
63 63
64static void __init clps711x_timer_init(void) 64static void __init clps711x_timer_init(void)
diff --git a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c
index fdfededfd96f..112f1d68fb2b 100644
--- a/arch/arm/mach-clps7500/core.c
+++ b/arch/arm/mach-clps7500/core.c
@@ -26,6 +26,8 @@
26#include <asm/irq.h> 26#include <asm/irq.h>
27#include <asm/mach-types.h> 27#include <asm/mach-types.h>
28 28
29unsigned int vram_size;
30
29static void cl7500_ack_irq_a(unsigned int irq) 31static void cl7500_ack_irq_a(unsigned int irq)
30{ 32{
31 unsigned int val, mask; 33 unsigned int val, mask;
@@ -296,8 +298,8 @@ clps7500_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
296 298
297static struct irqaction clps7500_timer_irq = { 299static struct irqaction clps7500_timer_irq = {
298 .name = "CLPS7500 Timer Tick", 300 .name = "CLPS7500 Timer Tick",
299 .flags = SA_INTERRUPT, 301 .flags = SA_INTERRUPT | SA_TIMER,
300 .handler = clps7500_timer_interrupt 302 .handler = clps7500_timer_interrupt,
301}; 303};
302 304
303/* 305/*
@@ -364,11 +366,13 @@ static void __init clps7500_init(void)
364} 366}
365 367
366MACHINE_START(CLPS7500, "CL-PS7500") 368MACHINE_START(CLPS7500, "CL-PS7500")
367 MAINTAINER("Philip Blundell") 369 /* Maintainer: Philip Blundell */
368 BOOT_MEM(0x10000000, 0x03000000, 0xe0000000) 370 .phys_ram = 0x10000000,
369 MAPIO(clps7500_map_io) 371 .phys_io = 0x03000000,
370 INITIRQ(clps7500_init_irq) 372 .io_pg_offst = ((0xe0000000) >> 18) & 0xfffc,
371 .init_machine = clps7500_init, 373 .map_io = clps7500_map_io,
372 .timer = &clps7500_timer, 374 .init_irq = clps7500_init_irq,
375 .init_machine = clps7500_init,
376 .timer = &clps7500_timer,
373MACHINE_END 377MACHINE_END
374 378
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index ef362d44949d..23c4da10101b 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -173,8 +173,8 @@ ebsa110_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
173 173
174static struct irqaction ebsa110_timer_irq = { 174static struct irqaction ebsa110_timer_irq = {
175 .name = "EBSA110 Timer Tick", 175 .name = "EBSA110 Timer Tick",
176 .flags = SA_INTERRUPT, 176 .flags = SA_INTERRUPT | SA_TIMER,
177 .handler = ebsa110_timer_interrupt 177 .handler = ebsa110_timer_interrupt,
178}; 178};
179 179
180/* 180/*
@@ -233,13 +233,15 @@ static int __init ebsa110_init(void)
233arch_initcall(ebsa110_init); 233arch_initcall(ebsa110_init);
234 234
235MACHINE_START(EBSA110, "EBSA110") 235MACHINE_START(EBSA110, "EBSA110")
236 MAINTAINER("Russell King") 236 /* Maintainer: Russell King */
237 BOOT_MEM(0x00000000, 0xe0000000, 0xe0000000) 237 .phys_ram = 0x00000000,
238 BOOT_PARAMS(0x00000400) 238 .phys_io = 0xe0000000,
239 DISABLE_PARPORT(0) 239 .io_pg_offst = ((0xe0000000) >> 18) & 0xfffc,
240 DISABLE_PARPORT(2) 240 .boot_params = 0x00000400,
241 SOFT_REBOOT 241 .reserve_lp0 = 1,
242 MAPIO(ebsa110_map_io) 242 .reserve_lp2 = 1,
243 INITIRQ(ebsa110_init_irq) 243 .soft_reboot = 1,
244 .map_io = ebsa110_map_io,
245 .init_irq = ebsa110_init_irq,
244 .timer = &ebsa110_timer, 246 .timer = &ebsa110_timer,
245MACHINE_END 247MACHINE_END
diff --git a/arch/arm/mach-epxa10db/arch.c b/arch/arm/mach-epxa10db/arch.c
index 1b40340e8a21..7daa021676d0 100644
--- a/arch/arm/mach-epxa10db/arch.c
+++ b/arch/arm/mach-epxa10db/arch.c
@@ -63,10 +63,12 @@ extern void epxa10db_init_irq(void);
63extern struct sys_timer epxa10db_timer; 63extern struct sys_timer epxa10db_timer;
64 64
65MACHINE_START(CAMELOT, "Altera Epxa10db") 65MACHINE_START(CAMELOT, "Altera Epxa10db")
66 MAINTAINER("Altera Corporation") 66 /* Maintainer: Altera Corporation */
67 BOOT_MEM(0x00000000, 0x7fffc000, 0xffffc000) 67 .phys_ram = 0x00000000,
68 MAPIO(epxa10db_map_io) 68 .phys_io = 0x7fffc000,
69 INITIRQ(epxa10db_init_irq) 69 .io_pg_offst = ((0xffffc000) >> 18) & 0xfffc,
70 .map_io = epxa10db_map_io,
71 .init_irq = epxa10db_init_irq,
70 .timer = &epxa10db_timer, 72 .timer = &epxa10db_timer,
71MACHINE_END 73MACHINE_END
72 74
diff --git a/arch/arm/mach-epxa10db/time.c b/arch/arm/mach-epxa10db/time.c
index 1b991f3cc3c6..4b1084dde8dd 100644
--- a/arch/arm/mach-epxa10db/time.c
+++ b/arch/arm/mach-epxa10db/time.c
@@ -56,8 +56,8 @@ epxa10db_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
56 56
57static struct irqaction epxa10db_timer_irq = { 57static struct irqaction epxa10db_timer_irq = {
58 .name = "Excalibur Timer Tick", 58 .name = "Excalibur Timer Tick",
59 .flags = SA_INTERRUPT, 59 .flags = SA_INTERRUPT | SA_TIMER,
60 .handler = epxa10db_timer_interrupt 60 .handler = epxa10db_timer_interrupt,
61}; 61};
62 62
63/* 63/*
diff --git a/arch/arm/mach-footbridge/cats-hw.c b/arch/arm/mach-footbridge/cats-hw.c
index d1ced86c379c..49b898af0032 100644
--- a/arch/arm/mach-footbridge/cats-hw.c
+++ b/arch/arm/mach-footbridge/cats-hw.c
@@ -84,12 +84,14 @@ fixup_cats(struct machine_desc *desc, struct tag *tags,
84} 84}
85 85
86MACHINE_START(CATS, "Chalice-CATS") 86MACHINE_START(CATS, "Chalice-CATS")
87 MAINTAINER("Philip Blundell") 87 /* Maintainer: Philip Blundell */
88 BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000) 88 .phys_ram = 0x00000000,
89 BOOT_PARAMS(0x00000100) 89 .phys_io = DC21285_ARMCSR_BASE,
90 SOFT_REBOOT 90 .io_pg_offst = ((0xfe000000) >> 18) & 0xfffc,
91 FIXUP(fixup_cats) 91 .boot_params = 0x00000100,
92 MAPIO(footbridge_map_io) 92 .soft_reboot = 1,
93 INITIRQ(footbridge_init_irq) 93 .fixup = fixup_cats,
94 .map_io = footbridge_map_io,
95 .init_irq = footbridge_init_irq,
94 .timer = &isa_timer, 96 .timer = &isa_timer,
95MACHINE_END 97MACHINE_END
diff --git a/arch/arm/mach-footbridge/co285.c b/arch/arm/mach-footbridge/co285.c
index e1541914fdcd..548a79081688 100644
--- a/arch/arm/mach-footbridge/co285.c
+++ b/arch/arm/mach-footbridge/co285.c
@@ -28,11 +28,13 @@ fixup_coebsa285(struct machine_desc *desc, struct tag *tags,
28} 28}
29 29
30MACHINE_START(CO285, "co-EBSA285") 30MACHINE_START(CO285, "co-EBSA285")
31 MAINTAINER("Mark van Doesburg") 31 /* Maintainer: Mark van Doesburg */
32 BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0x7cf00000) 32 .phys_ram = 0x00000000,
33 FIXUP(fixup_coebsa285) 33 .phys_io = DC21285_ARMCSR_BASE,
34 MAPIO(footbridge_map_io) 34 .io_pg_offst = ((0x7cf00000) >> 18) & 0xfffc,
35 INITIRQ(footbridge_init_irq) 35 .fixup = fixup_coebsa285,
36 .map_io = footbridge_map_io,
37 .init_irq = footbridge_init_irq,
36 .timer = &footbridge_timer, 38 .timer = &footbridge_timer,
37MACHINE_END 39MACHINE_END
38 40
diff --git a/arch/arm/mach-footbridge/dc21285-timer.c b/arch/arm/mach-footbridge/dc21285-timer.c
index da5b9b7623ca..14a62d6008fe 100644
--- a/arch/arm/mach-footbridge/dc21285-timer.c
+++ b/arch/arm/mach-footbridge/dc21285-timer.c
@@ -43,7 +43,7 @@ timer1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
43static struct irqaction footbridge_timer_irq = { 43static struct irqaction footbridge_timer_irq = {
44 .name = "Timer1 timer tick", 44 .name = "Timer1 timer tick",
45 .handler = timer1_interrupt, 45 .handler = timer1_interrupt,
46 .flags = SA_INTERRUPT, 46 .flags = SA_INTERRUPT | SA_TIMER,
47}; 47};
48 48
49/* 49/*
diff --git a/arch/arm/mach-footbridge/ebsa285.c b/arch/arm/mach-footbridge/ebsa285.c
index d0931f5a63c8..1c37605268d5 100644
--- a/arch/arm/mach-footbridge/ebsa285.c
+++ b/arch/arm/mach-footbridge/ebsa285.c
@@ -13,12 +13,15 @@
13#include "common.h" 13#include "common.h"
14 14
15MACHINE_START(EBSA285, "EBSA285") 15MACHINE_START(EBSA285, "EBSA285")
16 MAINTAINER("Russell King") 16 /* Maintainer: Russell King */
17 BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000) 17 .phys_ram = 0x00000000,
18 BOOT_PARAMS(0x00000100) 18 .phys_io = DC21285_ARMCSR_BASE,
19 VIDEO(0x000a0000, 0x000bffff) 19 .io_pg_offst = ((0xfe000000) >> 18) & 0xfffc,
20 MAPIO(footbridge_map_io) 20 .boot_params = 0x00000100,
21 INITIRQ(footbridge_init_irq) 21 .video_start = 0x000a0000,
22 .video_end = 0x000bffff,
23 .map_io = footbridge_map_io,
24 .init_irq = footbridge_init_irq,
22 .timer = &footbridge_timer, 25 .timer = &footbridge_timer,
23MACHINE_END 26MACHINE_END
24 27
diff --git a/arch/arm/mach-footbridge/isa-timer.c b/arch/arm/mach-footbridge/isa-timer.c
index a4fefa0bb5a1..c1d74f7ab669 100644
--- a/arch/arm/mach-footbridge/isa-timer.c
+++ b/arch/arm/mach-footbridge/isa-timer.c
@@ -72,7 +72,7 @@ isa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
72static struct irqaction isa_timer_irq = { 72static struct irqaction isa_timer_irq = {
73 .name = "ISA timer tick", 73 .name = "ISA timer tick",
74 .handler = isa_timer_interrupt, 74 .handler = isa_timer_interrupt,
75 .flags = SA_INTERRUPT, 75 .flags = SA_INTERRUPT | SA_TIMER,
76}; 76};
77 77
78static void __init isa_timer_init(void) 78static void __init isa_timer_init(void)
diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c
index 1e1dfd79f4fe..775f85fc8513 100644
--- a/arch/arm/mach-footbridge/netwinder-hw.c
+++ b/arch/arm/mach-footbridge/netwinder-hw.c
@@ -647,14 +647,17 @@ fixup_netwinder(struct machine_desc *desc, struct tag *tags,
647} 647}
648 648
649MACHINE_START(NETWINDER, "Rebel-NetWinder") 649MACHINE_START(NETWINDER, "Rebel-NetWinder")
650 MAINTAINER("Russell King/Rebel.com") 650 /* Maintainer: Russell King/Rebel.com */
651 BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000) 651 .phys_ram = 0x00000000,
652 BOOT_PARAMS(0x00000100) 652 .phys_io = DC21285_ARMCSR_BASE,
653 VIDEO(0x000a0000, 0x000bffff) 653 .io_pg_offst = ((0xfe000000) >> 18) & 0xfffc,
654 DISABLE_PARPORT(0) 654 .boot_params = 0x00000100,
655 DISABLE_PARPORT(2) 655 .video_start = 0x000a0000,
656 FIXUP(fixup_netwinder) 656 .video_end = 0x000bffff,
657 MAPIO(footbridge_map_io) 657 .reserve_lp0 = 1,
658 INITIRQ(footbridge_init_irq) 658 .reserve_lp2 = 1,
659 .fixup = fixup_netwinder,
660 .map_io = footbridge_map_io,
661 .init_irq = footbridge_init_irq,
659 .timer = &isa_timer, 662 .timer = &isa_timer,
660MACHINE_END 663MACHINE_END
diff --git a/arch/arm/mach-footbridge/personal.c b/arch/arm/mach-footbridge/personal.c
index 415086d7bbee..0146b8bb59da 100644
--- a/arch/arm/mach-footbridge/personal.c
+++ b/arch/arm/mach-footbridge/personal.c
@@ -13,11 +13,13 @@
13#include "common.h" 13#include "common.h"
14 14
15MACHINE_START(PERSONAL_SERVER, "Compaq-PersonalServer") 15MACHINE_START(PERSONAL_SERVER, "Compaq-PersonalServer")
16 MAINTAINER("Jamey Hicks / George France") 16 /* Maintainer: Jamey Hicks / George France */
17 BOOT_MEM(0x00000000, DC21285_ARMCSR_BASE, 0xfe000000) 17 .phys_ram = 0x00000000,
18 BOOT_PARAMS(0x00000100) 18 .phys_io = DC21285_ARMCSR_BASE,
19 MAPIO(footbridge_map_io) 19 .io_pg_offst = ((0xfe000000) >> 18) & 0xfffc,
20 INITIRQ(footbridge_init_irq) 20 .boot_params = 0x00000100,
21 .map_io = footbridge_map_io,
22 .init_irq = footbridge_init_irq,
21 .timer = &footbridge_timer, 23 .timer = &footbridge_timer,
22MACHINE_END 24MACHINE_END
23 25
diff --git a/arch/arm/mach-h720x/cpu-h7201.c b/arch/arm/mach-h720x/cpu-h7201.c
index 743656881ed6..af9e4a5d5ea7 100644
--- a/arch/arm/mach-h720x/cpu-h7201.c
+++ b/arch/arm/mach-h720x/cpu-h7201.c
@@ -41,8 +41,8 @@ h7201_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
41 41
42static struct irqaction h7201_timer_irq = { 42static struct irqaction h7201_timer_irq = {
43 .name = "h7201 Timer Tick", 43 .name = "h7201 Timer Tick",
44 .flags = SA_INTERRUPT, 44 .flags = SA_INTERRUPT | SA_TIMER,
45 .handler = h7201_timer_interrupt 45 .handler = h7201_timer_interrupt,
46}; 46};
47 47
48/* 48/*
diff --git a/arch/arm/mach-h720x/cpu-h7202.c b/arch/arm/mach-h720x/cpu-h7202.c
index 21b8fb6122cd..593b6a2a30e1 100644
--- a/arch/arm/mach-h720x/cpu-h7202.c
+++ b/arch/arm/mach-h720x/cpu-h7202.c
@@ -171,8 +171,8 @@ static struct irqchip h7202_timerx_chip = {
171 171
172static struct irqaction h7202_timer_irq = { 172static struct irqaction h7202_timer_irq = {
173 .name = "h7202 Timer Tick", 173 .name = "h7202 Timer Tick",
174 .flags = SA_INTERRUPT, 174 .flags = SA_INTERRUPT | SA_TIMER,
175 .handler = h7202_timer_interrupt 175 .handler = h7202_timer_interrupt,
176}; 176};
177 177
178/* 178/*
diff --git a/arch/arm/mach-h720x/h7201-eval.c b/arch/arm/mach-h720x/h7201-eval.c
index 9b24b9b0db15..fa59e9e2a5c8 100644
--- a/arch/arm/mach-h720x/h7201-eval.c
+++ b/arch/arm/mach-h720x/h7201-eval.c
@@ -30,10 +30,12 @@
30#include "common.h" 30#include "common.h"
31 31
32MACHINE_START(H7201, "Hynix GMS30C7201") 32MACHINE_START(H7201, "Hynix GMS30C7201")
33 MAINTAINER("Robert Schwebel, Pengutronix") 33 /* Maintainer: Robert Schwebel, Pengutronix */
34 BOOT_MEM(0x40000000, 0x80000000, 0xf0000000) 34 .phys_ram = 0x40000000,
35 BOOT_PARAMS(0xc0001000) 35 .phys_io = 0x80000000,
36 MAPIO(h720x_map_io) 36 .io_pg_offst = ((0xf0000000) >> 18) & 0xfffc,
37 INITIRQ(h720x_init_irq) 37 .boot_params = 0xc0001000,
38 .timer = &h7201_timer, 38 .map_io = h720x_map_io,
39 .init_irq = h720x_init_irq,
40 .timer = &h7201_timer,
39MACHINE_END 41MACHINE_END
diff --git a/arch/arm/mach-h720x/h7202-eval.c b/arch/arm/mach-h720x/h7202-eval.c
index 3456a00d5f5c..db9078ad008c 100644
--- a/arch/arm/mach-h720x/h7202-eval.c
+++ b/arch/arm/mach-h720x/h7202-eval.c
@@ -71,11 +71,13 @@ static void __init init_eval_h7202(void)
71} 71}
72 72
73MACHINE_START(H7202, "Hynix HMS30C7202") 73MACHINE_START(H7202, "Hynix HMS30C7202")
74 MAINTAINER("Robert Schwebel, Pengutronix") 74 /* Maintainer: Robert Schwebel, Pengutronix */
75 BOOT_MEM(0x40000000, 0x80000000, 0xf0000000) 75 .phys_ram = 0x40000000,
76 BOOT_PARAMS(0x40000100) 76 .phys_io = 0x80000000,
77 MAPIO(h720x_map_io) 77 .io_pg_offst = ((0xf0000000) >> 18) & 0xfffc,
78 INITIRQ(h7202_init_irq) 78 .boot_params = 0x40000100,
79 .timer = &h7202_timer, 79 .map_io = h720x_map_io,
80 INIT_MACHINE(init_eval_h7202) 80 .init_irq = h7202_init_irq,
81 .timer = &h7202_timer,
82 .init_machine = init_eval_h7202,
81MACHINE_END 83MACHINE_END
diff --git a/arch/arm/mach-imx/mx1ads.c b/arch/arm/mach-imx/mx1ads.c
index 625dd01c2578..5d25434d332c 100644
--- a/arch/arm/mach-imx/mx1ads.c
+++ b/arch/arm/mach-imx/mx1ads.c
@@ -78,11 +78,13 @@ mx1ads_map_io(void)
78} 78}
79 79
80MACHINE_START(MX1ADS, "Motorola MX1ADS") 80MACHINE_START(MX1ADS, "Motorola MX1ADS")
81 MAINTAINER("Sascha Hauer, Pengutronix") 81 /* Maintainer: Sascha Hauer, Pengutronix */
82 BOOT_MEM(0x08000000, 0x00200000, 0xe0200000) 82 .phys_ram = 0x08000000,
83 BOOT_PARAMS(0x08000100) 83 .phys_io = 0x00200000,
84 MAPIO(mx1ads_map_io) 84 .io_pg_offst = ((0xe0200000) >> 18) & 0xfffc,
85 INITIRQ(imx_init_irq) 85 .boot_params = 0x08000100,
86 .map_io = mx1ads_map_io,
87 .init_irq = imx_init_irq,
86 .timer = &imx_timer, 88 .timer = &imx_timer,
87 INIT_MACHINE(mx1ads_init) 89 .init_machine = mx1ads_init,
88MACHINE_END 90MACHINE_END
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c
index 11f1e56c36bc..ea805bfa5e54 100644
--- a/arch/arm/mach-imx/time.c
+++ b/arch/arm/mach-imx/time.c
@@ -72,8 +72,8 @@ imx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
72 72
73static struct irqaction imx_timer_irq = { 73static struct irqaction imx_timer_irq = {
74 .name = "i.MX Timer Tick", 74 .name = "i.MX Timer Tick",
75 .flags = SA_INTERRUPT, 75 .flags = SA_INTERRUPT | SA_TIMER,
76 .handler = imx_timer_interrupt 76 .handler = imx_timer_interrupt,
77}; 77};
78 78
79/* 79/*
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c
index bd1e5e3c9d34..dacbf504dae2 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-integrator/core.c
@@ -20,6 +20,7 @@
20#include <asm/irq.h> 20#include <asm/irq.h>
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/hardware/amba.h> 22#include <asm/hardware/amba.h>
23#include <asm/hardware/arm_timer.h>
23#include <asm/arch/cm.h> 24#include <asm/arch/cm.h>
24#include <asm/system.h> 25#include <asm/system.h>
25#include <asm/leds.h> 26#include <asm/leds.h>
@@ -156,16 +157,6 @@ EXPORT_SYMBOL(cm_control);
156#define TICKS2USECS(x) ((x) / TICKS_PER_uSEC) 157#define TICKS2USECS(x) ((x) / TICKS_PER_uSEC)
157#endif 158#endif
158 159
159/*
160 * What does it look like?
161 */
162typedef struct TimerStruct {
163 unsigned long TimerLoad;
164 unsigned long TimerValue;
165 unsigned long TimerControl;
166 unsigned long TimerClear;
167} TimerStruct_t;
168
169static unsigned long timer_reload; 160static unsigned long timer_reload;
170 161
171/* 162/*
@@ -174,7 +165,6 @@ static unsigned long timer_reload;
174 */ 165 */
175unsigned long integrator_gettimeoffset(void) 166unsigned long integrator_gettimeoffset(void)
176{ 167{
177 volatile TimerStruct_t *timer1 = (TimerStruct_t *)TIMER1_VA_BASE;
178 unsigned long ticks1, ticks2, status; 168 unsigned long ticks1, ticks2, status;
179 169
180 /* 170 /*
@@ -183,11 +173,11 @@ unsigned long integrator_gettimeoffset(void)
183 * an interrupt. We get around this by ensuring that the 173 * an interrupt. We get around this by ensuring that the
184 * counter has not reloaded between our two reads. 174 * counter has not reloaded between our two reads.
185 */ 175 */
186 ticks2 = timer1->TimerValue & 0xffff; 176 ticks2 = readl(TIMER1_VA_BASE + TIMER_VALUE) & 0xffff;
187 do { 177 do {
188 ticks1 = ticks2; 178 ticks1 = ticks2;
189 status = __raw_readl(VA_IC_BASE + IRQ_RAW_STATUS); 179 status = __raw_readl(VA_IC_BASE + IRQ_RAW_STATUS);
190 ticks2 = timer1->TimerValue & 0xffff; 180 ticks2 = readl(TIMER1_VA_BASE + TIMER_VALUE) & 0xffff;
191 } while (ticks2 > ticks1); 181 } while (ticks2 > ticks1);
192 182
193 /* 183 /*
@@ -213,14 +203,12 @@ unsigned long integrator_gettimeoffset(void)
213static irqreturn_t 203static irqreturn_t
214integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 204integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
215{ 205{
216 volatile TimerStruct_t *timer1 = (volatile TimerStruct_t *)TIMER1_VA_BASE;
217
218 write_seqlock(&xtime_lock); 206 write_seqlock(&xtime_lock);
219 207
220 /* 208 /*
221 * clear the interrupt 209 * clear the interrupt
222 */ 210 */
223 timer1->TimerClear = 1; 211 writel(1, TIMER1_VA_BASE + TIMER_INTCLR);
224 212
225 /* 213 /*
226 * the clock tick routines are only processed on the 214 * the clock tick routines are only processed on the
@@ -247,8 +235,8 @@ integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
247 235
248static struct irqaction integrator_timer_irq = { 236static struct irqaction integrator_timer_irq = {
249 .name = "Integrator Timer Tick", 237 .name = "Integrator Timer Tick",
250 .flags = SA_INTERRUPT, 238 .flags = SA_INTERRUPT | SA_TIMER,
251 .handler = integrator_timer_interrupt 239 .handler = integrator_timer_interrupt,
252}; 240};
253 241
254/* 242/*
@@ -256,32 +244,29 @@ static struct irqaction integrator_timer_irq = {
256 */ 244 */
257void __init integrator_time_init(unsigned long reload, unsigned int ctrl) 245void __init integrator_time_init(unsigned long reload, unsigned int ctrl)
258{ 246{
259 volatile TimerStruct_t *timer0 = (volatile TimerStruct_t *)TIMER0_VA_BASE; 247 unsigned int timer_ctrl = TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC;
260 volatile TimerStruct_t *timer1 = (volatile TimerStruct_t *)TIMER1_VA_BASE;
261 volatile TimerStruct_t *timer2 = (volatile TimerStruct_t *)TIMER2_VA_BASE;
262 unsigned int timer_ctrl = 0x80 | 0x40; /* periodic */
263 248
264 timer_reload = reload; 249 timer_reload = reload;
265 timer_ctrl |= ctrl; 250 timer_ctrl |= ctrl;
266 251
267 if (timer_reload > 0x100000) { 252 if (timer_reload > 0x100000) {
268 timer_reload >>= 8; 253 timer_reload >>= 8;
269 timer_ctrl |= 0x08; /* /256 */ 254 timer_ctrl |= TIMER_CTRL_DIV256;
270 } else if (timer_reload > 0x010000) { 255 } else if (timer_reload > 0x010000) {
271 timer_reload >>= 4; 256 timer_reload >>= 4;
272 timer_ctrl |= 0x04; /* /16 */ 257 timer_ctrl |= TIMER_CTRL_DIV16;
273 } 258 }
274 259
275 /* 260 /*
276 * Initialise to a known state (all timers off) 261 * Initialise to a known state (all timers off)
277 */ 262 */
278 timer0->TimerControl = 0; 263 writel(0, TIMER0_VA_BASE + TIMER_CTRL);
279 timer1->TimerControl = 0; 264 writel(0, TIMER1_VA_BASE + TIMER_CTRL);
280 timer2->TimerControl = 0; 265 writel(0, TIMER2_VA_BASE + TIMER_CTRL);
281 266
282 timer1->TimerLoad = timer_reload; 267 writel(timer_reload, TIMER1_VA_BASE + TIMER_LOAD);
283 timer1->TimerValue = timer_reload; 268 writel(timer_reload, TIMER1_VA_BASE + TIMER_VALUE);
284 timer1->TimerControl = timer_ctrl; 269 writel(timer_ctrl, TIMER1_VA_BASE + TIMER_CTRL);
285 270
286 /* 271 /*
287 * Make irqs happen for the system timer 272 * Make irqs happen for the system timer
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index 91ba9fd79c87..36e2b6eb67b7 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -292,11 +292,13 @@ static struct sys_timer ap_timer = {
292}; 292};
293 293
294MACHINE_START(INTEGRATOR, "ARM-Integrator") 294MACHINE_START(INTEGRATOR, "ARM-Integrator")
295 MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") 295 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
296 BOOT_MEM(0x00000000, 0x16000000, 0xf1600000) 296 .phys_ram = 0x00000000,
297 BOOT_PARAMS(0x00000100) 297 .phys_io = 0x16000000,
298 MAPIO(ap_map_io) 298 .io_pg_offst = ((0xf1600000) >> 18) & 0xfffc,
299 INITIRQ(ap_init_irq) 299 .boot_params = 0x00000100,
300 .map_io = ap_map_io,
301 .init_irq = ap_init_irq,
300 .timer = &ap_timer, 302 .timer = &ap_timer,
301 INIT_MACHINE(ap_init) 303 .init_machine = ap_init,
302MACHINE_END 304MACHINE_END
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index e0a01eef0993..569f328c479d 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -532,11 +532,13 @@ static struct sys_timer cp_timer = {
532}; 532};
533 533
534MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP") 534MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP")
535 MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") 535 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
536 BOOT_MEM(0x00000000, 0x16000000, 0xf1600000) 536 .phys_ram = 0x00000000,
537 BOOT_PARAMS(0x00000100) 537 .phys_io = 0x16000000,
538 MAPIO(intcp_map_io) 538 .io_pg_offst = ((0xf1600000) >> 18) & 0xfffc,
539 INITIRQ(intcp_init_irq) 539 .boot_params = 0x00000100,
540 .map_io = intcp_map_io,
541 .init_irq = intcp_init_irq,
540 .timer = &cp_timer, 542 .timer = &cp_timer,
541 INIT_MACHINE(intcp_init) 543 .init_machine = intcp_init,
542MACHINE_END 544MACHINE_END
diff --git a/arch/arm/mach-integrator/platsmp.c b/arch/arm/mach-integrator/platsmp.c
index ead15dfcb53d..ea10bd8c972c 100644
--- a/arch/arm/mach-integrator/platsmp.c
+++ b/arch/arm/mach-integrator/platsmp.c
@@ -15,6 +15,7 @@
15#include <linux/mm.h> 15#include <linux/mm.h>
16 16
17#include <asm/atomic.h> 17#include <asm/atomic.h>
18#include <asm/cacheflush.h>
18#include <asm/delay.h> 19#include <asm/delay.h>
19#include <asm/mmu_context.h> 20#include <asm/mmu_context.h>
20#include <asm/procinfo.h> 21#include <asm/procinfo.h>
@@ -27,12 +28,12 @@ extern void integrator_secondary_startup(void);
27 * control for which core is the next to come out of the secondary 28 * control for which core is the next to come out of the secondary
28 * boot "holding pen" 29 * boot "holding pen"
29 */ 30 */
30volatile int __initdata pen_release = -1; 31volatile int __cpuinitdata pen_release = -1;
31unsigned long __initdata phys_pen_release = 0; 32unsigned long __cpuinitdata phys_pen_release = 0;
32 33
33static DEFINE_SPINLOCK(boot_lock); 34static DEFINE_SPINLOCK(boot_lock);
34 35
35void __init platform_secondary_init(unsigned int cpu) 36void __cpuinit platform_secondary_init(unsigned int cpu)
36{ 37{
37 /* 38 /*
38 * the primary core may have used a "cross call" soft interrupt 39 * the primary core may have used a "cross call" soft interrupt
@@ -61,7 +62,7 @@ void __init platform_secondary_init(unsigned int cpu)
61 spin_unlock(&boot_lock); 62 spin_unlock(&boot_lock);
62} 63}
63 64
64int __init boot_secondary(unsigned int cpu, struct task_struct *idle) 65int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
65{ 66{
66 unsigned long timeout; 67 unsigned long timeout;
67 68
@@ -80,6 +81,7 @@ int __init boot_secondary(unsigned int cpu, struct task_struct *idle)
80 * "cpu" is Linux's internal ID. 81 * "cpu" is Linux's internal ID.
81 */ 82 */
82 pen_release = cpu; 83 pen_release = cpu;
84 flush_cache_all();
83 85
84 /* 86 /*
85 * XXX 87 * XXX
@@ -174,11 +176,13 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
174 max_cpus = ncores; 176 max_cpus = ncores;
175 177
176 /* 178 /*
177 * Initialise the present mask - this tells us which CPUs should 179 * Initialise the possible/present maps.
178 * be present. 180 * cpu_possible_map describes the set of CPUs which may be present
181 * cpu_present_map describes the set of CPUs populated
179 */ 182 */
180 for (i = 0; i < max_cpus; i++) { 183 for (i = 0; i < max_cpus; i++) {
181 cpu_set(i, cpu_present_mask); 184 cpu_set(i, cpu_possible_map);
185 cpu_set(i, cpu_present_map);
182 } 186 }
183 187
184 /* 188 /*
diff --git a/arch/arm/mach-iop3xx/iop321-setup.c b/arch/arm/mach-iop3xx/iop321-setup.c
index bf23e0fd2843..0f921ba2750c 100644
--- a/arch/arm/mach-iop3xx/iop321-setup.c
+++ b/arch/arm/mach-iop3xx/iop321-setup.c
@@ -146,23 +146,27 @@ extern void iop321_init_time(void);
146 146
147#if defined(CONFIG_ARCH_IQ80321) 147#if defined(CONFIG_ARCH_IQ80321)
148MACHINE_START(IQ80321, "Intel IQ80321") 148MACHINE_START(IQ80321, "Intel IQ80321")
149 MAINTAINER("Intel Corporation") 149 /* Maintainer: Intel Corporation */
150 BOOT_MEM(PHYS_OFFSET, IQ80321_UART, IQ80321_UART) 150 .phys_ram = PHYS_OFFSET,
151 MAPIO(iq80321_map_io) 151 .phys_io = IQ80321_UART,
152 INITIRQ(iop321_init_irq) 152 .io_pg_offst = ((IQ80321_UART) >> 18) & 0xfffc,
153 .map_io = iq80321_map_io,
154 .init_irq = iop321_init_irq,
153 .timer = &iop321_timer, 155 .timer = &iop321_timer,
154 BOOT_PARAMS(0xa0000100) 156 .boot_params = 0xa0000100,
155 INIT_MACHINE(iop32x_init) 157 .init_machine = iop32x_init,
156MACHINE_END 158MACHINE_END
157#elif defined(CONFIG_ARCH_IQ31244) 159#elif defined(CONFIG_ARCH_IQ31244)
158MACHINE_START(IQ31244, "Intel IQ31244") 160MACHINE_START(IQ31244, "Intel IQ31244")
159 MAINTAINER("Intel Corp.") 161 /* Maintainer: Intel Corp. */
160 BOOT_MEM(PHYS_OFFSET, IQ31244_UART, IQ31244_UART) 162 .phys_ram = PHYS_OFFSET,
161 MAPIO(iq31244_map_io) 163 .phys_io = IQ31244_UART,
162 INITIRQ(iop321_init_irq) 164 .io_pg_offst = ((IQ31244_UART) >> 18) & 0xfffc,
165 .map_io = iq31244_map_io,
166 .init_irq = iop321_init_irq,
163 .timer = &iop321_timer, 167 .timer = &iop321_timer,
164 BOOT_PARAMS(0xa0000100) 168 .boot_params = 0xa0000100,
165 INIT_MACHINE(iop32x_init) 169 .init_machine = iop32x_init,
166MACHINE_END 170MACHINE_END
167#else 171#else
168#error No machine descriptor defined for this IOP3XX implementation 172#error No machine descriptor defined for this IOP3XX implementation
diff --git a/arch/arm/mach-iop3xx/iop321-time.c b/arch/arm/mach-iop3xx/iop321-time.c
index 9b7dd64d1b8f..d53af1669502 100644
--- a/arch/arm/mach-iop3xx/iop321-time.c
+++ b/arch/arm/mach-iop3xx/iop321-time.c
@@ -86,7 +86,7 @@ iop321_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
86static struct irqaction iop321_timer_irq = { 86static struct irqaction iop321_timer_irq = {
87 .name = "IOP321 Timer Tick", 87 .name = "IOP321 Timer Tick",
88 .handler = iop321_timer_interrupt, 88 .handler = iop321_timer_interrupt,
89 .flags = SA_INTERRUPT 89 .flags = SA_INTERRUPT | SA_TIMER,
90}; 90};
91 91
92static void __init iop321_timer_init(void) 92static void __init iop321_timer_init(void)
diff --git a/arch/arm/mach-iop3xx/iop331-setup.c b/arch/arm/mach-iop3xx/iop331-setup.c
index 622e7914819a..fc74b722f72f 100644
--- a/arch/arm/mach-iop3xx/iop331-setup.c
+++ b/arch/arm/mach-iop3xx/iop331-setup.c
@@ -148,26 +148,28 @@ extern void iq80332_map_io(void);
148 148
149#if defined(CONFIG_ARCH_IQ80331) 149#if defined(CONFIG_ARCH_IQ80331)
150MACHINE_START(IQ80331, "Intel IQ80331") 150MACHINE_START(IQ80331, "Intel IQ80331")
151 MAINTAINER("Intel Corp.") 151 /* Maintainer: Intel Corp. */
152 BOOT_MEM(PHYS_OFFSET, 0xfefff000, 0xfffff000) // virtual, physical 152 .phys_ram = PHYS_OFFSET,
153 //BOOT_MEM(PHYS_OFFSET, IOP331_UART0_VIRT, IOP331_UART0_PHYS) 153 .phys_io = 0xfefff000,
154 MAPIO(iq80331_map_io) 154 .io_pg_offst = ((0xfffff000) >> 18) & 0xfffc, // virtual, physical
155 INITIRQ(iop331_init_irq) 155 .map_io = iq80331_map_io,
156 .init_irq = iop331_init_irq,
156 .timer = &iop331_timer, 157 .timer = &iop331_timer,
157 BOOT_PARAMS(0x0100) 158 .boot_params = 0x0100,
158 INIT_MACHINE(iop33x_init) 159 .init_machine = iop33x_init,
159MACHINE_END 160MACHINE_END
160 161
161#elif defined(CONFIG_MACH_IQ80332) 162#elif defined(CONFIG_MACH_IQ80332)
162MACHINE_START(IQ80332, "Intel IQ80332") 163MACHINE_START(IQ80332, "Intel IQ80332")
163 MAINTAINER("Intel Corp.") 164 /* Maintainer: Intel Corp. */
164 BOOT_MEM(PHYS_OFFSET, 0xfefff000, 0xfffff000) // virtual, physical 165 .phys_ram = PHYS_OFFSET,
165 //BOOT_MEM(PHYS_OFFSET, IOP331_UART0_VIRT, IOP331_UART0_PHYS) 166 .phys_io = 0xfefff000,
166 MAPIO(iq80332_map_io) 167 .io_pg_offst = ((0xfffff000) >> 18) & 0xfffc, // virtual, physical
167 INITIRQ(iop331_init_irq) 168 .map_io = iq80332_map_io,
169 .init_irq = iop331_init_irq,
168 .timer = &iop331_timer, 170 .timer = &iop331_timer,
169 BOOT_PARAMS(0x0100) 171 .boot_params = 0x0100,
170 INIT_MACHINE(iop33x_init) 172 .init_machine = iop33x_init,
171MACHINE_END 173MACHINE_END
172 174
173#else 175#else
diff --git a/arch/arm/mach-iop3xx/iop331-time.c b/arch/arm/mach-iop3xx/iop331-time.c
index e01696769263..1a6d9d661e4b 100644
--- a/arch/arm/mach-iop3xx/iop331-time.c
+++ b/arch/arm/mach-iop3xx/iop331-time.c
@@ -83,7 +83,7 @@ iop331_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
83static struct irqaction iop331_timer_irq = { 83static struct irqaction iop331_timer_irq = {
84 .name = "IOP331 Timer Tick", 84 .name = "IOP331 Timer Tick",
85 .handler = iop331_timer_interrupt, 85 .handler = iop331_timer_interrupt,
86 .flags = SA_INTERRUPT 86 .flags = SA_INTERRUPT | SA_TIMER,
87}; 87};
88 88
89static void __init iop331_timer_init(void) 89static void __init iop331_timer_init(void)
diff --git a/arch/arm/mach-ixp2000/Kconfig b/arch/arm/mach-ixp2000/Kconfig
index 9361e05f6fa3..ecb58d83478e 100644
--- a/arch/arm/mach-ixp2000/Kconfig
+++ b/arch/arm/mach-ixp2000/Kconfig
@@ -54,6 +54,14 @@ config ARCH_IXDP2X01
54 depends on ARCH_IXDP2401 || ARCH_IXDP2801 54 depends on ARCH_IXDP2401 || ARCH_IXDP2801
55 default y 55 default y
56 56
57config IXP2000_SUPPORT_BROKEN_PCI_IO
58 bool "Support broken PCI I/O on older IXP2000s"
59 default y
60 help
61 Say 'N' here if you only intend to run your kernel on an
62 IXP2000 B0 or later model and do not need the PCI I/O
63 byteswap workaround. Say 'Y' otherwise.
64
57endmenu 65endmenu
58 66
59endif 67endif
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c
index fc0555596d6d..45b18658499f 100644
--- a/arch/arm/mach-ixp2000/core.c
+++ b/arch/arm/mach-ixp2000/core.c
@@ -23,7 +23,7 @@
23#include <linux/serial.h> 23#include <linux/serial.h>
24#include <linux/tty.h> 24#include <linux/tty.h>
25#include <linux/bitops.h> 25#include <linux/bitops.h>
26#include <linux/serial_core.h> 26#include <linux/serial_8250.h>
27#include <linux/mm.h> 27#include <linux/mm.h>
28 28
29#include <asm/types.h> 29#include <asm/types.h>
@@ -40,6 +40,8 @@
40#include <asm/mach/time.h> 40#include <asm/mach/time.h>
41#include <asm/mach/irq.h> 41#include <asm/mach/irq.h>
42 42
43#include <asm/arch/gpio.h>
44
43static DEFINE_SPINLOCK(ixp2000_slowport_lock); 45static DEFINE_SPINLOCK(ixp2000_slowport_lock);
44static unsigned long ixp2000_slowport_irq_flags; 46static unsigned long ixp2000_slowport_irq_flags;
45 47
@@ -101,6 +103,11 @@ static struct map_desc ixp2000_io_desc[] __initdata = {
101 .length = IXP2000_PCI_CSR_SIZE, 103 .length = IXP2000_PCI_CSR_SIZE,
102 .type = MT_DEVICE 104 .type = MT_DEVICE
103 }, { 105 }, {
106 .virtual = IXP2000_MSF_VIRT_BASE,
107 .physical = IXP2000_MSF_PHYS_BASE,
108 .length = IXP2000_MSF_SIZE,
109 .type = MT_DEVICE
110 }, {
104 .virtual = IXP2000_PCI_IO_VIRT_BASE, 111 .virtual = IXP2000_PCI_IO_VIRT_BASE,
105 .physical = IXP2000_PCI_IO_PHYS_BASE, 112 .physical = IXP2000_PCI_IO_PHYS_BASE,
106 .length = IXP2000_PCI_IO_SIZE, 113 .length = IXP2000_PCI_IO_SIZE,
@@ -118,19 +125,6 @@ static struct map_desc ixp2000_io_desc[] __initdata = {
118 } 125 }
119}; 126};
120 127
121static struct uart_port ixp2000_serial_port = {
122 .membase = (char *)(IXP2000_UART_VIRT_BASE + 3),
123 .mapbase = IXP2000_UART_PHYS_BASE + 3,
124 .irq = IRQ_IXP2000_UART,
125 .flags = UPF_SKIP_TEST,
126 .iotype = UPIO_MEM,
127 .regshift = 2,
128 .uartclk = 50000000,
129 .line = 0,
130 .type = PORT_XSCALE,
131 .fifosize = 16
132};
133
134void __init ixp2000_map_io(void) 128void __init ixp2000_map_io(void)
135{ 129{
136 extern unsigned int processor_id; 130 extern unsigned int processor_id;
@@ -150,12 +144,50 @@ void __init ixp2000_map_io(void)
150 } 144 }
151 145
152 iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc)); 146 iotable_init(ixp2000_io_desc, ARRAY_SIZE(ixp2000_io_desc));
153 early_serial_setup(&ixp2000_serial_port);
154 147
155 /* Set slowport to 8-bit mode. */ 148 /* Set slowport to 8-bit mode. */
156 ixp2000_reg_write(IXP2000_SLOWPORT_FRM, 1); 149 ixp2000_reg_write(IXP2000_SLOWPORT_FRM, 1);
157} 150}
158 151
152
153/*************************************************************************
154 * Serial port support for IXP2000
155 *************************************************************************/
156static struct plat_serial8250_port ixp2000_serial_port[] = {
157 {
158 .mapbase = IXP2000_UART_PHYS_BASE,
159 .membase = (char *)(IXP2000_UART_VIRT_BASE + 3),
160 .irq = IRQ_IXP2000_UART,
161 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
162 .iotype = UPIO_MEM,
163 .regshift = 2,
164 .uartclk = 50000000,
165 },
166 { },
167};
168
169static struct resource ixp2000_uart_resource = {
170 .start = IXP2000_UART_PHYS_BASE,
171 .end = IXP2000_UART_PHYS_BASE + 0xffff,
172 .flags = IORESOURCE_MEM,
173};
174
175static struct platform_device ixp2000_serial_device = {
176 .name = "serial8250",
177 .id = 0,
178 .dev = {
179 .platform_data = ixp2000_serial_port,
180 },
181 .num_resources = 1,
182 .resource = &ixp2000_uart_resource,
183};
184
185void __init ixp2000_uart_init(void)
186{
187 platform_device_register(&ixp2000_serial_device);
188}
189
190
159/************************************************************************* 191/*************************************************************************
160 * Timer-tick functions for IXP2000 192 * Timer-tick functions for IXP2000
161 *************************************************************************/ 193 *************************************************************************/
@@ -179,7 +211,7 @@ static int ixp2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
179 211
180 /* clear timer 1 */ 212 /* clear timer 1 */
181 ixp2000_reg_write(IXP2000_T1_CLR, 1); 213 ixp2000_reg_write(IXP2000_T1_CLR, 1);
182 214
183 while ((next_jiffy_time - *missing_jiffy_timer_csr) > ticks_per_jiffy) { 215 while ((next_jiffy_time - *missing_jiffy_timer_csr) > ticks_per_jiffy) {
184 timer_tick(regs); 216 timer_tick(regs);
185 next_jiffy_time -= ticks_per_jiffy; 217 next_jiffy_time -= ticks_per_jiffy;
@@ -192,8 +224,8 @@ static int ixp2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
192 224
193static struct irqaction ixp2000_timer_irq = { 225static struct irqaction ixp2000_timer_irq = {
194 .name = "IXP2000 Timer Tick", 226 .name = "IXP2000 Timer Tick",
195 .flags = SA_INTERRUPT, 227 .flags = SA_INTERRUPT | SA_TIMER,
196 .handler = ixp2000_timer_interrupt 228 .handler = ixp2000_timer_interrupt,
197}; 229};
198 230
199void __init ixp2000_init_time(unsigned long tick_rate) 231void __init ixp2000_init_time(unsigned long tick_rate)
@@ -238,35 +270,40 @@ void __init ixp2000_init_time(unsigned long tick_rate)
238/************************************************************************* 270/*************************************************************************
239 * GPIO helpers 271 * GPIO helpers
240 *************************************************************************/ 272 *************************************************************************/
241static unsigned long GPIO_IRQ_rising_edge;
242static unsigned long GPIO_IRQ_falling_edge; 273static unsigned long GPIO_IRQ_falling_edge;
274static unsigned long GPIO_IRQ_rising_edge;
243static unsigned long GPIO_IRQ_level_low; 275static unsigned long GPIO_IRQ_level_low;
244static unsigned long GPIO_IRQ_level_high; 276static unsigned long GPIO_IRQ_level_high;
245 277
246void gpio_line_config(int line, int style) 278static void update_gpio_int_csrs(void)
279{
280 ixp2000_reg_write(IXP2000_GPIO_FEDR, GPIO_IRQ_falling_edge);
281 ixp2000_reg_write(IXP2000_GPIO_REDR, GPIO_IRQ_rising_edge);
282 ixp2000_reg_write(IXP2000_GPIO_LSLR, GPIO_IRQ_level_low);
283 ixp2000_reg_write(IXP2000_GPIO_LSHR, GPIO_IRQ_level_high);
284}
285
286void gpio_line_config(int line, int direction)
247{ 287{
248 unsigned long flags; 288 unsigned long flags;
249 289
250 local_irq_save(flags); 290 local_irq_save(flags);
291 if (direction == GPIO_OUT) {
292 irq_desc[line + IRQ_IXP2000_GPIO0].valid = 0;
251 293
252 if(style == GPIO_OUT) {
253 /* if it's an output, it ain't an interrupt anymore */ 294 /* if it's an output, it ain't an interrupt anymore */
254 ixp2000_reg_write(IXP2000_GPIO_PDSR, (1 << line));
255 GPIO_IRQ_falling_edge &= ~(1 << line); 295 GPIO_IRQ_falling_edge &= ~(1 << line);
256 GPIO_IRQ_rising_edge &= ~(1 << line); 296 GPIO_IRQ_rising_edge &= ~(1 << line);
257 GPIO_IRQ_level_low &= ~(1 << line); 297 GPIO_IRQ_level_low &= ~(1 << line);
258 GPIO_IRQ_level_high &= ~(1 << line); 298 GPIO_IRQ_level_high &= ~(1 << line);
259 ixp2000_reg_write(IXP2000_GPIO_FEDR, GPIO_IRQ_falling_edge); 299 update_gpio_int_csrs();
260 ixp2000_reg_write(IXP2000_GPIO_REDR, GPIO_IRQ_rising_edge); 300
261 ixp2000_reg_write(IXP2000_GPIO_LSHR, GPIO_IRQ_level_high); 301 ixp2000_reg_write(IXP2000_GPIO_PDSR, 1 << line);
262 ixp2000_reg_write(IXP2000_GPIO_LSLR, GPIO_IRQ_level_low); 302 } else if (direction == GPIO_IN) {
263 irq_desc[line+IRQ_IXP2000_GPIO0].valid = 0; 303 ixp2000_reg_write(IXP2000_GPIO_PDCR, 1 << line);
264 } else if(style == GPIO_IN) {
265 ixp2000_reg_write(IXP2000_GPIO_PDCR, (1 << line));
266 } 304 }
267
268 local_irq_restore(flags); 305 local_irq_restore(flags);
269} 306}
270 307
271 308
272/************************************************************************* 309/*************************************************************************
@@ -285,9 +322,50 @@ static void ixp2000_GPIO_irq_handler(unsigned int irq, struct irqdesc *desc, str
285 } 322 }
286} 323}
287 324
325static int ixp2000_GPIO_irq_type(unsigned int irq, unsigned int type)
326{
327 int line = irq - IRQ_IXP2000_GPIO0;
328
329 /*
330 * First, configure this GPIO line as an input.
331 */
332 ixp2000_reg_write(IXP2000_GPIO_PDCR, 1 << line);
333
334 /*
335 * Then, set the proper trigger type.
336 */
337 if (type & IRQT_FALLING)
338 GPIO_IRQ_falling_edge |= 1 << line;
339 else
340 GPIO_IRQ_falling_edge &= ~(1 << line);
341 if (type & IRQT_RISING)
342 GPIO_IRQ_rising_edge |= 1 << line;
343 else
344 GPIO_IRQ_rising_edge &= ~(1 << line);
345 if (type & IRQT_LOW)
346 GPIO_IRQ_level_low |= 1 << line;
347 else
348 GPIO_IRQ_level_low &= ~(1 << line);
349 if (type & IRQT_HIGH)
350 GPIO_IRQ_level_high |= 1 << line;
351 else
352 GPIO_IRQ_level_high &= ~(1 << line);
353 update_gpio_int_csrs();
354
355 /*
356 * Finally, mark the corresponding IRQ as valid.
357 */
358 irq_desc[irq].valid = 1;
359
360 return 0;
361}
362
288static void ixp2000_GPIO_irq_mask_ack(unsigned int irq) 363static void ixp2000_GPIO_irq_mask_ack(unsigned int irq)
289{ 364{
290 ixp2000_reg_write(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0))); 365 ixp2000_reg_write(IXP2000_GPIO_INCR, (1 << (irq - IRQ_IXP2000_GPIO0)));
366
367 ixp2000_reg_write(IXP2000_GPIO_EDSR, (1 << (irq - IRQ_IXP2000_GPIO0)));
368 ixp2000_reg_write(IXP2000_GPIO_LDSR, (1 << (irq - IRQ_IXP2000_GPIO0)));
291 ixp2000_reg_write(IXP2000_GPIO_INST, (1 << (irq - IRQ_IXP2000_GPIO0))); 369 ixp2000_reg_write(IXP2000_GPIO_INST, (1 << (irq - IRQ_IXP2000_GPIO0)));
292} 370}
293 371
@@ -302,6 +380,7 @@ static void ixp2000_GPIO_irq_unmask(unsigned int irq)
302} 380}
303 381
304static struct irqchip ixp2000_GPIO_irq_chip = { 382static struct irqchip ixp2000_GPIO_irq_chip = {
383 .type = ixp2000_GPIO_irq_type,
305 .ack = ixp2000_GPIO_irq_mask_ack, 384 .ack = ixp2000_GPIO_irq_mask_ack,
306 .mask = ixp2000_GPIO_irq_mask, 385 .mask = ixp2000_GPIO_irq_mask,
307 .unmask = ixp2000_GPIO_irq_unmask 386 .unmask = ixp2000_GPIO_irq_unmask
@@ -338,7 +417,7 @@ static void ixp2000_irq_mask(unsigned int irq)
338 417
339static void ixp2000_irq_unmask(unsigned int irq) 418static void ixp2000_irq_unmask(unsigned int irq)
340{ 419{
341 ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << irq)); 420 ixp2000_reg_write(IXP2000_IRQ_ENABLE_SET, (1 << irq));
342} 421}
343 422
344static struct irqchip ixp2000_irq_chip = { 423static struct irqchip ixp2000_irq_chip = {
@@ -375,16 +454,16 @@ void __init ixp2000_init_irq(void)
375 * our mask/unmask code much simpler. 454 * our mask/unmask code much simpler.
376 */ 455 */
377 for (irq = IRQ_IXP2000_SOFT_INT; irq <= IRQ_IXP2000_THDB3; irq++) { 456 for (irq = IRQ_IXP2000_SOFT_INT; irq <= IRQ_IXP2000_THDB3; irq++) {
378 if((1 << irq) & IXP2000_VALID_IRQ_MASK) { 457 if ((1 << irq) & IXP2000_VALID_IRQ_MASK) {
379 set_irq_chip(irq, &ixp2000_irq_chip); 458 set_irq_chip(irq, &ixp2000_irq_chip);
380 set_irq_handler(irq, do_level_IRQ); 459 set_irq_handler(irq, do_level_IRQ);
381 set_irq_flags(irq, IRQF_VALID); 460 set_irq_flags(irq, IRQF_VALID);
382 } else set_irq_flags(irq, 0); 461 } else set_irq_flags(irq, 0);
383 } 462 }
384 463
385 /* 464 /*
386 * GPIO IRQs are invalid until someone sets the interrupt mode 465 * GPIO IRQs are invalid until someone sets the interrupt mode
387 * by calling gpio_line_set(); 466 * by calling set_irq_type().
388 */ 467 */
389 for (irq = IRQ_IXP2000_GPIO0; irq <= IRQ_IXP2000_GPIO7; irq++) { 468 for (irq = IRQ_IXP2000_GPIO0; irq <= IRQ_IXP2000_GPIO7; irq++) {
390 set_irq_chip(irq, &ixp2000_GPIO_irq_chip); 469 set_irq_chip(irq, &ixp2000_GPIO_irq_chip);
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c
index 04b38bcf9aac..9aa54de44740 100644
--- a/arch/arm/mach-ixp2000/enp2611.c
+++ b/arch/arm/mach-ixp2000/enp2611.c
@@ -197,24 +197,42 @@ static struct platform_device enp2611_flash = {
197 .resource = &enp2611_flash_resource, 197 .resource = &enp2611_flash_resource,
198}; 198};
199 199
200static struct ixp2000_i2c_pins enp2611_i2c_gpio_pins = {
201 .sda_pin = ENP2611_GPIO_SDA,
202 .scl_pin = ENP2611_GPIO_SCL,
203};
204
205static struct platform_device enp2611_i2c_controller = {
206 .name = "IXP2000-I2C",
207 .id = 0,
208 .dev = {
209 .platform_data = &enp2611_i2c_gpio_pins
210 },
211 .num_resources = 0
212};
213
200static struct platform_device *enp2611_devices[] __initdata = { 214static struct platform_device *enp2611_devices[] __initdata = {
201 &enp2611_flash 215 &enp2611_flash,
216 &enp2611_i2c_controller
202}; 217};
203 218
204static void __init enp2611_init_machine(void) 219static void __init enp2611_init_machine(void)
205{ 220{
206 platform_add_devices(enp2611_devices, ARRAY_SIZE(enp2611_devices)); 221 platform_add_devices(enp2611_devices, ARRAY_SIZE(enp2611_devices));
222 ixp2000_uart_init();
207} 223}
208 224
209 225
210MACHINE_START(ENP2611, "Radisys ENP-2611 PCI network processor board") 226MACHINE_START(ENP2611, "Radisys ENP-2611 PCI network processor board")
211 MAINTAINER("Lennert Buytenhek <buytenh@wantstofly.org>") 227 /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
212 BOOT_MEM(0x00000000, IXP2000_UART_PHYS_BASE, IXP2000_UART_VIRT_BASE) 228 .phys_ram = 0x00000000,
213 BOOT_PARAMS(0x00000100) 229 .phys_io = IXP2000_UART_PHYS_BASE,
214 MAPIO(ixp2000_map_io) 230 .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc,
215 INITIRQ(ixp2000_init_irq) 231 .boot_params = 0x00000100,
232 .map_io = ixp2000_map_io,
233 .init_irq = ixp2000_init_irq,
216 .timer = &enp2611_timer, 234 .timer = &enp2611_timer,
217 INIT_MACHINE(enp2611_init_machine) 235 .init_machine = enp2611_init_machine,
218MACHINE_END 236MACHINE_END
219 237
220 238
diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c
index df3ff26c8cdd..fd280a93637e 100644
--- a/arch/arm/mach-ixp2000/ixdp2400.c
+++ b/arch/arm/mach-ixp2000/ixdp2400.c
@@ -168,12 +168,14 @@ void ixdp2400_init_irq(void)
168} 168}
169 169
170MACHINE_START(IXDP2400, "Intel IXDP2400 Development Platform") 170MACHINE_START(IXDP2400, "Intel IXDP2400 Development Platform")
171 MAINTAINER("MontaVista Software, Inc.") 171 /* Maintainer: MontaVista Software, Inc. */
172 BOOT_MEM(0x00000000, IXP2000_UART_PHYS_BASE, IXP2000_UART_VIRT_BASE) 172 .phys_ram = 0x00000000,
173 BOOT_PARAMS(0x00000100) 173 .phys_io = IXP2000_UART_PHYS_BASE,
174 MAPIO(ixdp2x00_map_io) 174 .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc,
175 INITIRQ(ixdp2400_init_irq) 175 .boot_params = 0x00000100,
176 .map_io = ixdp2x00_map_io,
177 .init_irq = ixdp2400_init_irq,
176 .timer = &ixdp2400_timer, 178 .timer = &ixdp2400_timer,
177 INIT_MACHINE(ixdp2x00_init_machine) 179 .init_machine = ixdp2x00_init_machine,
178MACHINE_END 180MACHINE_END
179 181
diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c
index aec13c7108a9..f9073aa28615 100644
--- a/arch/arm/mach-ixp2000/ixdp2800.c
+++ b/arch/arm/mach-ixp2000/ixdp2800.c
@@ -42,12 +42,6 @@
42#include <asm/mach/flash.h> 42#include <asm/mach/flash.h>
43#include <asm/mach/arch.h> 43#include <asm/mach/arch.h>
44 44
45
46void ixdp2400_init_irq(void)
47{
48 ixdp2x00_init_irq(IXDP2800_CPLD_INT_STAT, IXDP2800_CPLD_INT_MASK, IXDP2400_NR_IRQS);
49}
50
51/************************************************************************* 45/*************************************************************************
52 * IXDP2800 timer tick 46 * IXDP2800 timer tick
53 *************************************************************************/ 47 *************************************************************************/
@@ -290,12 +284,14 @@ void ixdp2800_init_irq(void)
290} 284}
291 285
292MACHINE_START(IXDP2800, "Intel IXDP2800 Development Platform") 286MACHINE_START(IXDP2800, "Intel IXDP2800 Development Platform")
293 MAINTAINER("MontaVista Software, Inc.") 287 /* Maintainer: MontaVista Software, Inc. */
294 BOOT_MEM(0x00000000, IXP2000_UART_PHYS_BASE, IXP2000_UART_VIRT_BASE) 288 .phys_ram = 0x00000000,
295 BOOT_PARAMS(0x00000100) 289 .phys_io = IXP2000_UART_PHYS_BASE,
296 MAPIO(ixdp2x00_map_io) 290 .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc,
297 INITIRQ(ixdp2800_init_irq) 291 .boot_params = 0x00000100,
292 .map_io = ixdp2x00_map_io,
293 .init_irq = ixdp2800_init_irq,
298 .timer = &ixdp2800_timer, 294 .timer = &ixdp2800_timer,
299 INIT_MACHINE(ixdp2x00_init_machine) 295 .init_machine = ixdp2x00_init_machine,
300MACHINE_END 296MACHINE_END
301 297
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c
index 21c41fe15b99..a43369ad876c 100644
--- a/arch/arm/mach-ixp2000/ixdp2x00.c
+++ b/arch/arm/mach-ixp2000/ixdp2x00.c
@@ -42,6 +42,9 @@
42#include <asm/mach/flash.h> 42#include <asm/mach/flash.h>
43#include <asm/mach/arch.h> 43#include <asm/mach/arch.h>
44 44
45#include <asm/arch/gpio.h>
46
47
45/************************************************************************* 48/*************************************************************************
46 * IXDP2x00 IRQ Initialization 49 * IXDP2x00 IRQ Initialization
47 *************************************************************************/ 50 *************************************************************************/
@@ -300,5 +303,6 @@ void __init ixdp2x00_init_machine(void)
300 gpio_line_config(IXDP2X00_GPIO_I2C_ENABLE, GPIO_OUT); 303 gpio_line_config(IXDP2X00_GPIO_I2C_ENABLE, GPIO_OUT);
301 304
302 platform_add_devices(ixdp2x00_devices, ARRAY_SIZE(ixdp2x00_devices)); 305 platform_add_devices(ixdp2x00_devices, ARRAY_SIZE(ixdp2x00_devices));
306 ixp2000_uart_init();
303} 307}
304 308
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c
index e94dace3d412..43447dad1657 100644
--- a/arch/arm/mach-ixp2000/ixdp2x01.c
+++ b/arch/arm/mach-ixp2000/ixdp2x01.c
@@ -370,30 +370,35 @@ static void __init ixdp2x01_init_machine(void)
370 ((*IXDP2X01_CPLD_FLASH_REG & IXDP2X01_CPLD_FLASH_BANK_MASK) + 1); 370 ((*IXDP2X01_CPLD_FLASH_REG & IXDP2X01_CPLD_FLASH_BANK_MASK) + 1);
371 371
372 platform_add_devices(ixdp2x01_devices, ARRAY_SIZE(ixdp2x01_devices)); 372 platform_add_devices(ixdp2x01_devices, ARRAY_SIZE(ixdp2x01_devices));
373 ixp2000_uart_init();
373} 374}
374 375
375 376
376#ifdef CONFIG_ARCH_IXDP2401 377#ifdef CONFIG_ARCH_IXDP2401
377MACHINE_START(IXDP2401, "Intel IXDP2401 Development Platform") 378MACHINE_START(IXDP2401, "Intel IXDP2401 Development Platform")
378 MAINTAINER("MontaVista Software, Inc.") 379 /* Maintainer: MontaVista Software, Inc. */
379 BOOT_MEM(0x00000000, IXP2000_UART_PHYS_BASE, IXP2000_UART_VIRT_BASE) 380 .phys_ram = 0x00000000,
380 BOOT_PARAMS(0x00000100) 381 .phys_io = IXP2000_UART_PHYS_BASE,
381 MAPIO(ixdp2x01_map_io) 382 .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc,
382 INITIRQ(ixdp2x01_init_irq) 383 .boot_params = 0x00000100,
384 .map_io = ixdp2x01_map_io,
385 .init_irq = ixdp2x01_init_irq,
383 .timer = &ixdp2x01_timer, 386 .timer = &ixdp2x01_timer,
384 INIT_MACHINE(ixdp2x01_init_machine) 387 .init_machine = ixdp2x01_init_machine,
385MACHINE_END 388MACHINE_END
386#endif 389#endif
387 390
388#ifdef CONFIG_ARCH_IXDP2801 391#ifdef CONFIG_ARCH_IXDP2801
389MACHINE_START(IXDP2801, "Intel IXDP2801 Development Platform") 392MACHINE_START(IXDP2801, "Intel IXDP2801 Development Platform")
390 MAINTAINER("MontaVista Software, Inc.") 393 /* Maintainer: MontaVista Software, Inc. */
391 BOOT_MEM(0x00000000, IXP2000_UART_PHYS_BASE, IXP2000_UART_VIRT_BASE) 394 .phys_ram = 0x00000000,
392 BOOT_PARAMS(0x00000100) 395 .phys_io = IXP2000_UART_PHYS_BASE,
393 MAPIO(ixdp2x01_map_io) 396 .io_pg_offst = ((IXP2000_UART_VIRT_BASE) >> 18) & 0xfffc,
394 INITIRQ(ixdp2x01_init_irq) 397 .boot_params = 0x00000100,
398 .map_io = ixdp2x01_map_io,
399 .init_irq = ixdp2x01_init_irq,
395 .timer = &ixdp2x01_timer, 400 .timer = &ixdp2x01_timer,
396 INIT_MACHINE(ixdp2x01_init_machine) 401 .init_machine = ixdp2x01_init_machine,
397MACHINE_END 402MACHINE_END
398#endif 403#endif
399 404
diff --git a/arch/arm/mach-ixp2000/pci.c b/arch/arm/mach-ixp2000/pci.c
index 5ff2f2718c58..0788fb2b5c10 100644
--- a/arch/arm/mach-ixp2000/pci.c
+++ b/arch/arm/mach-ixp2000/pci.c
@@ -198,6 +198,19 @@ clear_master_aborts(void)
198void __init 198void __init
199ixp2000_pci_preinit(void) 199ixp2000_pci_preinit(void)
200{ 200{
201#ifndef CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO
202 /*
203 * Configure the PCI unit to properly byteswap I/O transactions,
204 * and verify that it worked.
205 */
206 ixp2000_reg_write(IXP2000_PCI_CONTROL,
207 (*IXP2000_PCI_CONTROL | PCI_CONTROL_IEE));
208
209 if ((*IXP2000_PCI_CONTROL & PCI_CONTROL_IEE) == 0)
210 panic("IXP2000: PCI I/O is broken on this ixp model, and "
211 "the needed workaround has not been configured in");
212#endif
213
201 hook_fault_code(16+6, ixp2000_pci_abort_handler, SIGBUS, 214 hook_fault_code(16+6, ixp2000_pci_abort_handler, SIGBUS,
202 "PCI config cycle to non-existent device"); 215 "PCI config cycle to non-existent device");
203} 216}
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index aa92e3708838..2b544363c078 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -453,8 +453,8 @@ int ixp4xx_setup(int nr, struct pci_sys_data *sys)
453 local_write_config(PCI_COMMAND, 2, PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); 453 local_write_config(PCI_COMMAND, 2, PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
454 454
455 res[0].name = "PCI I/O Space"; 455 res[0].name = "PCI I/O Space";
456 res[0].start = 0x00001000; 456 res[0].start = 0x00000000;
457 res[0].end = 0xffff0000; 457 res[0].end = 0x0000ffff;
458 res[0].flags = IORESOURCE_IO; 458 res[0].flags = IORESOURCE_IO;
459 459
460 res[1].name = "PCI Memory Space"; 460 res[1].name = "PCI Memory Space";
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 267ba02d77dc..04490a9f8f6e 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -141,7 +141,15 @@ static struct map_desc ixp4xx_io_desc[] __initdata = {
141 .physical = IXP4XX_PCI_CFG_BASE_PHYS, 141 .physical = IXP4XX_PCI_CFG_BASE_PHYS,
142 .length = IXP4XX_PCI_CFG_REGION_SIZE, 142 .length = IXP4XX_PCI_CFG_REGION_SIZE,
143 .type = MT_DEVICE 143 .type = MT_DEVICE
144 },
145#ifdef CONFIG_DEBUG_LL
146 { /* Debug UART mapping */
147 .virtual = IXP4XX_DEBUG_UART_BASE_VIRT,
148 .physical = IXP4XX_DEBUG_UART_BASE_PHYS,
149 .length = IXP4XX_DEBUG_UART_REGION_SIZE,
150 .type = MT_DEVICE
144 } 151 }
152#endif
145}; 153};
146 154
147void __init ixp4xx_map_io(void) 155void __init ixp4xx_map_io(void)
@@ -290,8 +298,8 @@ static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id, struct pt_regs
290 298
291static struct irqaction ixp4xx_timer_irq = { 299static struct irqaction ixp4xx_timer_irq = {
292 .name = "IXP4xx Timer Tick", 300 .name = "IXP4xx Timer Tick",
293 .flags = SA_INTERRUPT, 301 .flags = SA_INTERRUPT | SA_TIMER,
294 .handler = ixp4xx_timer_interrupt 302 .handler = ixp4xx_timer_interrupt,
295}; 303};
296 304
297static void __init ixp4xx_timer_init(void) 305static void __init ixp4xx_timer_init(void)
diff --git a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c
index 8a05a1227e5f..7f58afb27e71 100644
--- a/arch/arm/mach-ixp4xx/coyote-setup.c
+++ b/arch/arm/mach-ixp4xx/coyote-setup.c
@@ -56,21 +56,24 @@ static struct resource coyote_uart_resource = {
56 .flags = IORESOURCE_MEM, 56 .flags = IORESOURCE_MEM,
57}; 57};
58 58
59static struct plat_serial8250_port coyote_uart_data = { 59static struct plat_serial8250_port coyote_uart_data[] = {
60 .mapbase = IXP4XX_UART2_BASE_PHYS, 60 {
61 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET, 61 .mapbase = IXP4XX_UART2_BASE_PHYS,
62 .irq = IRQ_IXP4XX_UART2, 62 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
63 .flags = UPF_BOOT_AUTOCONF, 63 .irq = IRQ_IXP4XX_UART2,
64 .iotype = UPIO_MEM, 64 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
65 .regshift = 2, 65 .iotype = UPIO_MEM,
66 .uartclk = IXP4XX_UART_XTAL, 66 .regshift = 2,
67 .uartclk = IXP4XX_UART_XTAL,
68 },
69 { },
67}; 70};
68 71
69static struct platform_device coyote_uart = { 72static struct platform_device coyote_uart = {
70 .name = "serial8250", 73 .name = "serial8250",
71 .id = 0, 74 .id = 0,
72 .dev = { 75 .dev = {
73 .platform_data = &coyote_uart_data, 76 .platform_data = coyote_uart_data,
74 }, 77 },
75 .num_resources = 1, 78 .num_resources = 1,
76 .resource = &coyote_uart_resource, 79 .resource = &coyote_uart_resource,
@@ -87,10 +90,10 @@ static void __init coyote_init(void)
87 *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0; 90 *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
88 91
89 if (machine_is_ixdpg425()) { 92 if (machine_is_ixdpg425()) {
90 coyote_uart_data.membase = 93 coyote_uart_data[0].membase =
91 (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET); 94 (char*)(IXP4XX_UART1_BASE_VIRT + REG_OFFSET);
92 coyote_uart_data.mapbase = IXP4XX_UART1_BASE_PHYS; 95 coyote_uart_data[0].mapbase = IXP4XX_UART1_BASE_PHYS;
93 coyote_uart_data.irq = IRQ_IXP4XX_UART1; 96 coyote_uart_data[0].irq = IRQ_IXP4XX_UART1;
94 } 97 }
95 98
96 99
@@ -100,14 +103,15 @@ static void __init coyote_init(void)
100 103
101#ifdef CONFIG_ARCH_ADI_COYOTE 104#ifdef CONFIG_ARCH_ADI_COYOTE
102MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote") 105MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote")
103 MAINTAINER("MontaVista Software, Inc.") 106 /* Maintainer: MontaVista Software, Inc. */
104 BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, 107 .phys_ram = PHYS_OFFSET,
105 IXP4XX_PERIPHERAL_BASE_VIRT) 108 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
106 MAPIO(coyote_map_io) 109 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
107 INITIRQ(ixp4xx_init_irq) 110 .map_io = coyote_map_io,
111 .init_irq = ixp4xx_init_irq,
108 .timer = &ixp4xx_timer, 112 .timer = &ixp4xx_timer,
109 BOOT_PARAMS(0x0100) 113 .boot_params = 0x0100,
110 INIT_MACHINE(coyote_init) 114 .init_machine = coyote_init,
111MACHINE_END 115MACHINE_END
112#endif 116#endif
113 117
@@ -117,14 +121,15 @@ MACHINE_END
117 */ 121 */
118#ifdef CONFIG_MACH_IXDPG425 122#ifdef CONFIG_MACH_IXDPG425
119MACHINE_START(IXDPG425, "Intel IXDPG425") 123MACHINE_START(IXDPG425, "Intel IXDPG425")
120 MAINTAINER("MontaVista Software, Inc.") 124 /* Maintainer: MontaVista Software, Inc. */
121 BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, 125 .phys_ram = PHYS_OFFSET,
122 IXP4XX_PERIPHERAL_BASE_VIRT) 126 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
123 MAPIO(coyote_map_io) 127 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
124 INITIRQ(ixp4xx_init_irq) 128 .map_io = coyote_map_io,
129 .init_irq = ixp4xx_init_irq,
125 .timer = &ixp4xx_timer, 130 .timer = &ixp4xx_timer,
126 BOOT_PARAMS(0x0100) 131 .boot_params = 0x0100,
127 INIT_MACHINE(coyote_init) 132 .init_machine = coyote_init,
128MACHINE_END 133MACHINE_END
129#endif 134#endif
130 135
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-setup.c b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
index e77c86efd21d..65e356bd10d6 100644
--- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c
+++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
@@ -83,7 +83,7 @@ static struct plat_serial8250_port gtwx5715_uart_platform_data[] = {
83 .mapbase = IXP4XX_UART2_BASE_PHYS, 83 .mapbase = IXP4XX_UART2_BASE_PHYS,
84 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET, 84 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
85 .irq = IRQ_IXP4XX_UART2, 85 .irq = IRQ_IXP4XX_UART2,
86 .flags = UPF_BOOT_AUTOCONF, 86 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
87 .iotype = UPIO_MEM, 87 .iotype = UPIO_MEM,
88 .regshift = 2, 88 .regshift = 2,
89 .uartclk = IXP4XX_UART_XTAL, 89 .uartclk = IXP4XX_UART_XTAL,
@@ -140,14 +140,15 @@ static void __init gtwx5715_init(void)
140 140
141 141
142MACHINE_START(GTWX5715, "Gemtek GTWX5715 (Linksys WRV54G)") 142MACHINE_START(GTWX5715, "Gemtek GTWX5715 (Linksys WRV54G)")
143 MAINTAINER("George Joseph") 143 /* Maintainer: George Joseph */
144 BOOT_MEM(PHYS_OFFSET, IXP4XX_UART2_BASE_PHYS, 144 .phys_ram = PHYS_OFFSET,
145 IXP4XX_UART2_BASE_VIRT) 145 .phys_io = IXP4XX_UART2_BASE_PHYS,
146 MAPIO(gtwx5715_map_io) 146 .io_pg_offst = ((IXP4XX_UART2_BASE_VIRT) >> 18) & 0xfffc,
147 INITIRQ(ixp4xx_init_irq) 147 .map_io = gtwx5715_map_io,
148 .timer = &ixp4xx_timer, 148 .init_irq = ixp4xx_init_irq,
149 BOOT_PARAMS(0x0100) 149 .timer = &ixp4xx_timer,
150 INIT_MACHINE(gtwx5715_init) 150 .boot_params = 0x0100,
151 .init_machine = gtwx5715_init,
151MACHINE_END 152MACHINE_END
152 153
153 154
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index 77346c1f676b..4633470a6a37 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -82,7 +82,7 @@ static struct plat_serial8250_port ixdp425_uart_data[] = {
82 .mapbase = IXP4XX_UART1_BASE_PHYS, 82 .mapbase = IXP4XX_UART1_BASE_PHYS,
83 .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET, 83 .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
84 .irq = IRQ_IXP4XX_UART1, 84 .irq = IRQ_IXP4XX_UART1,
85 .flags = UPF_BOOT_AUTOCONF, 85 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
86 .iotype = UPIO_MEM, 86 .iotype = UPIO_MEM,
87 .regshift = 2, 87 .regshift = 2,
88 .uartclk = IXP4XX_UART_XTAL, 88 .uartclk = IXP4XX_UART_XTAL,
@@ -91,11 +91,12 @@ static struct plat_serial8250_port ixdp425_uart_data[] = {
91 .mapbase = IXP4XX_UART2_BASE_PHYS, 91 .mapbase = IXP4XX_UART2_BASE_PHYS,
92 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET, 92 .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
93 .irq = IRQ_IXP4XX_UART1, 93 .irq = IRQ_IXP4XX_UART1,
94 .flags = UPF_BOOT_AUTOCONF, 94 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
95 .iotype = UPIO_MEM, 95 .iotype = UPIO_MEM,
96 .regshift = 2, 96 .regshift = 2,
97 .uartclk = IXP4XX_UART_XTAL, 97 .uartclk = IXP4XX_UART_XTAL,
98 } 98 },
99 { },
99}; 100};
100 101
101static struct platform_device ixdp425_uart = { 102static struct platform_device ixdp425_uart = {
@@ -128,36 +129,39 @@ static void __init ixdp425_init(void)
128} 129}
129 130
130MACHINE_START(IXDP425, "Intel IXDP425 Development Platform") 131MACHINE_START(IXDP425, "Intel IXDP425 Development Platform")
131 MAINTAINER("MontaVista Software, Inc.") 132 /* Maintainer: MontaVista Software, Inc. */
132 BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, 133 .phys_ram = PHYS_OFFSET,
133 IXP4XX_PERIPHERAL_BASE_VIRT) 134 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
134 MAPIO(ixdp425_map_io) 135 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
135 INITIRQ(ixp4xx_init_irq) 136 .map_io = ixdp425_map_io,
137 .init_irq = ixp4xx_init_irq,
136 .timer = &ixp4xx_timer, 138 .timer = &ixp4xx_timer,
137 BOOT_PARAMS(0x0100) 139 .boot_params = 0x0100,
138 INIT_MACHINE(ixdp425_init) 140 .init_machine = ixdp425_init,
139MACHINE_END 141MACHINE_END
140 142
141MACHINE_START(IXDP465, "Intel IXDP465 Development Platform") 143MACHINE_START(IXDP465, "Intel IXDP465 Development Platform")
142 MAINTAINER("MontaVista Software, Inc.") 144 /* Maintainer: MontaVista Software, Inc. */
143 BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, 145 .phys_ram = PHYS_OFFSET,
144 IXP4XX_PERIPHERAL_BASE_VIRT) 146 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
145 MAPIO(ixdp425_map_io) 147 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
146 INITIRQ(ixp4xx_init_irq) 148 .map_io = ixdp425_map_io,
149 .init_irq = ixp4xx_init_irq,
147 .timer = &ixp4xx_timer, 150 .timer = &ixp4xx_timer,
148 BOOT_PARAMS(0x0100) 151 .boot_params = 0x0100,
149 INIT_MACHINE(ixdp425_init) 152 .init_machine = ixdp425_init,
150MACHINE_END 153MACHINE_END
151 154
152MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform") 155MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform")
153 MAINTAINER("MontaVista Software, Inc.") 156 /* Maintainer: MontaVista Software, Inc. */
154 BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, 157 .phys_ram = PHYS_OFFSET,
155 IXP4XX_PERIPHERAL_BASE_VIRT) 158 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
156 MAPIO(ixdp425_map_io) 159 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
157 INITIRQ(ixp4xx_init_irq) 160 .map_io = ixdp425_map_io,
161 .init_irq = ixp4xx_init_irq,
158 .timer = &ixp4xx_timer, 162 .timer = &ixp4xx_timer,
159 BOOT_PARAMS(0x0100) 163 .boot_params = 0x0100,
160 INIT_MACHINE(ixdp425_init) 164 .init_machine = ixdp425_init,
161MACHINE_END 165MACHINE_END
162 166
163/* 167/*
@@ -168,14 +172,15 @@ MACHINE_END
168 */ 172 */
169#ifdef CONFIG_ARCH_AVILA 173#ifdef CONFIG_ARCH_AVILA
170MACHINE_START(AVILA, "Gateworks Avila Network Platform") 174MACHINE_START(AVILA, "Gateworks Avila Network Platform")
171 MAINTAINER("Deepak Saxena <dsaxena@plexity.net>") 175 /* Maintainer: Deepak Saxena <dsaxena@plexity.net> */
172 BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS, 176 .phys_ram = PHYS_OFFSET,
173 IXP4XX_PERIPHERAL_BASE_VIRT) 177 .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
174 MAPIO(ixdp425_map_io) 178 .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
175 INITIRQ(ixp4xx_init_irq) 179 .map_io = ixdp425_map_io,
180 .init_irq = ixp4xx_init_irq,
176 .timer = &ixp4xx_timer, 181 .timer = &ixp4xx_timer,
177 BOOT_PARAMS(0x0100) 182 .boot_params = 0x0100,
178 INIT_MACHINE(ixdp425_init) 183 .init_machine = ixdp425_init,
179MACHINE_END 184MACHINE_END
180#endif 185#endif
181 186
diff --git a/arch/arm/mach-l7200/core.c b/arch/arm/mach-l7200/core.c
index 606ca95f8217..2a7fee2a7635 100644
--- a/arch/arm/mach-l7200/core.c
+++ b/arch/arm/mach-l7200/core.c
@@ -81,9 +81,11 @@ static void __init l7200_map_io(void)
81} 81}
82 82
83MACHINE_START(L7200, "LinkUp Systems L7200") 83MACHINE_START(L7200, "LinkUp Systems L7200")
84 MAINTAINER("Steve Hill / Scott McConnell") 84 /* Maintainer: Steve Hill / Scott McConnell */
85 BOOT_MEM(0xf0000000, 0x80040000, 0xd0000000) 85 .phys_ram = 0xf0000000,
86 MAPIO(l7200_map_io) 86 .phys_io = 0x80040000,
87 INITIRQ(l7200_init_irq) 87 .io_pg_offst = ((0xd0000000) >> 18) & 0xfffc,
88 .map_io = l7200_map_io,
89 .init_irq = l7200_init_irq,
88MACHINE_END 90MACHINE_END
89 91
diff --git a/arch/arm/mach-lh7a40x/arch-kev7a400.c b/arch/arm/mach-lh7a40x/arch-kev7a400.c
index be5d17fe9dcb..cb3dcd3bd00a 100644
--- a/arch/arm/mach-lh7a40x/arch-kev7a400.c
+++ b/arch/arm/mach-lh7a40x/arch-kev7a400.c
@@ -102,10 +102,12 @@ void __init lh7a40x_init_board_irq (void)
102} 102}
103 103
104MACHINE_START (KEV7A400, "Sharp KEV7a400") 104MACHINE_START (KEV7A400, "Sharp KEV7a400")
105 MAINTAINER ("Marc Singer") 105 /* Maintainer: Marc Singer */
106 BOOT_MEM (0xc0000000, 0x80000000, io_p2v (0x80000000)) 106 .phys_ram = 0xc0000000,
107 BOOT_PARAMS (0xc0000100) 107 .phys_io = 0x80000000,
108 MAPIO (kev7a400_map_io) 108 .io_pg_offst = ((io_p2v (0x80000000))>>18) & 0xfffc,
109 INITIRQ (lh7a400_init_irq) 109 .boot_params = 0xc0000100,
110 .map_io = kev7a400_map_io,
111 .init_irq = lh7a400_init_irq,
110 .timer = &lh7a40x_timer, 112 .timer = &lh7a40x_timer,
111MACHINE_END 113MACHINE_END
diff --git a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c
index c823447a150f..6eb61a17c63b 100644
--- a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c
+++ b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c
@@ -260,13 +260,15 @@ lpd7a400_map_io(void)
260#ifdef CONFIG_MACH_LPD7A400 260#ifdef CONFIG_MACH_LPD7A400
261 261
262MACHINE_START (LPD7A400, "Logic Product Development LPD7A400-10") 262MACHINE_START (LPD7A400, "Logic Product Development LPD7A400-10")
263 MAINTAINER ("Marc Singer") 263 /* Maintainer: Marc Singer */
264 BOOT_MEM (0xc0000000, 0x80000000, io_p2v (0x80000000)) 264 .phys_ram = 0xc0000000,
265 BOOT_PARAMS (0xc0000100) 265 .phys_io = 0x80000000,
266 MAPIO (lpd7a400_map_io) 266 .io_pg_offst = ((io_p2v (0x80000000))>>18) & 0xfffc,
267 INITIRQ (lh7a400_init_irq) 267 .boot_params = 0xc0000100,
268 .map_io = lpd7a400_map_io,
269 .init_irq = lh7a400_init_irq,
268 .timer = &lh7a40x_timer, 270 .timer = &lh7a40x_timer,
269 INIT_MACHINE (lpd7a40x_init) 271 .init_machine = lpd7a40x_init,
270MACHINE_END 272MACHINE_END
271 273
272#endif 274#endif
@@ -274,13 +276,15 @@ MACHINE_END
274#ifdef CONFIG_MACH_LPD7A404 276#ifdef CONFIG_MACH_LPD7A404
275 277
276MACHINE_START (LPD7A404, "Logic Product Development LPD7A404-10") 278MACHINE_START (LPD7A404, "Logic Product Development LPD7A404-10")
277 MAINTAINER ("Marc Singer") 279 /* Maintainer: Marc Singer */
278 BOOT_MEM (0xc0000000, 0x80000000, io_p2v (0x80000000)) 280 .phys_ram = 0xc0000000,
279 BOOT_PARAMS (0xc0000100) 281 .phys_io = 0x80000000,
280 MAPIO (lpd7a400_map_io) 282 .io_pg_offst = ((io_p2v (0x80000000))>>18) & 0xfffc,
281 INITIRQ (lh7a404_init_irq) 283 .boot_params = 0xc0000100,
284 .map_io = lpd7a400_map_io,
285 .init_irq = lh7a404_init_irq,
282 .timer = &lh7a40x_timer, 286 .timer = &lh7a40x_timer,
283 INIT_MACHINE (lpd7a40x_init) 287 .init_machine = lpd7a40x_init,
284MACHINE_END 288MACHINE_END
285 289
286#endif 290#endif
diff --git a/arch/arm/mach-lh7a40x/time.c b/arch/arm/mach-lh7a40x/time.c
index 51e1c814b400..be377e331f25 100644
--- a/arch/arm/mach-lh7a40x/time.c
+++ b/arch/arm/mach-lh7a40x/time.c
@@ -53,8 +53,8 @@ lh7a40x_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
53 53
54static struct irqaction lh7a40x_timer_irq = { 54static struct irqaction lh7a40x_timer_irq = {
55 .name = "LHA740x Timer Tick", 55 .name = "LHA740x Timer Tick",
56 .flags = SA_INTERRUPT, 56 .flags = SA_INTERRUPT | SA_TIMER,
57 .handler = lh7a40x_timer_interrupt 57 .handler = lh7a40x_timer_interrupt,
58}; 58};
59 59
60static void __init lh7a40x_timer_init(void) 60static void __init lh7a40x_timer_init(void)
diff --git a/arch/arm/mach-omap/Kconfig b/arch/arm/mach-omap/Kconfig
deleted file mode 100644
index 9e42efa66b2b..000000000000
--- a/arch/arm/mach-omap/Kconfig
+++ /dev/null
@@ -1,221 +0,0 @@
1if ARCH_OMAP
2
3menu "TI OMAP Implementations"
4
5comment "OMAP Core Type"
6
7config ARCH_OMAP730
8 depends on ARCH_OMAP
9 bool "OMAP730 Based System"
10 select ARCH_OMAP_OTG
11
12config ARCH_OMAP1510
13 depends on ARCH_OMAP
14 default y
15 bool "OMAP1510 Based System"
16
17config ARCH_OMAP16XX
18 depends on ARCH_OMAP
19 bool "OMAP16XX Based System"
20 select ARCH_OMAP_OTG
21
22config ARCH_OMAP_OTG
23 bool
24
25comment "OMAP Board Type"
26
27config MACH_OMAP_INNOVATOR
28 bool "TI Innovator"
29 depends on ARCH_OMAP1510 || ARCH_OMAP16XX
30 help
31 TI OMAP 1510 or 1610 Innovator board support. Say Y here if you
32 have such a board.
33
34config MACH_OMAP_H2
35 bool "TI H2 Support"
36 depends on ARCH_OMAP16XX
37 help
38 TI OMAP 1610/1611B H2 board support. Say Y here if you have such
39 a board.
40
41config MACH_OMAP_H3
42 bool "TI H3 Support"
43 depends on ARCH_OMAP16XX
44 help
45 TI OMAP 1710 H3 board support. Say Y here if you have such
46 a board.
47
48config MACH_OMAP_H4
49 bool "TI H4 Support"
50 depends on ARCH_OMAP16XX
51 help
52 TI OMAP 1610 H4 board support. Say Y here if you have such
53 a board.
54
55config MACH_OMAP_OSK
56 bool "TI OSK Support"
57 depends on ARCH_OMAP16XX
58 help
59 TI OMAP 5912 OSK (OMAP Starter Kit) board support. Say Y here
60 if you have such a board.
61
62config MACH_OMAP_PERSEUS2
63 bool "TI Perseus2"
64 depends on ARCH_OMAP730
65 help
66 Support for TI OMAP 730 Perseus2 board. Say Y here if you have such
67 a board.
68
69config MACH_VOICEBLUE
70 bool "Voiceblue"
71 depends on ARCH_OMAP1510
72 help
73 Support for Voiceblue GSM/VoIP gateway. Say Y here if you have such
74 board.
75
76config MACH_NETSTAR
77 bool "NetStar"
78 depends on ARCH_OMAP1510
79 help
80 Support for NetStar PBX. Say Y here if you have such a board.
81
82config MACH_OMAP_GENERIC
83 bool "Generic OMAP board"
84 depends on ARCH_OMAP1510 || ARCH_OMAP16XX
85 help
86 Support for generic OMAP-1510, 1610 or 1710 board with
87 no FPGA. Can be used as template for porting Linux to
88 custom OMAP boards. Say Y here if you have a custom
89 board.
90
91comment "OMAP Feature Selections"
92
93#config OMAP_BOOT_TAG
94# bool "OMAP bootloader information passing"
95# depends on ARCH_OMAP
96# default n
97# help
98# Say Y, if you have a bootloader which passes information
99# about your board and its peripheral configuration.
100
101config OMAP_MUX
102 bool "OMAP multiplexing support"
103 depends on ARCH_OMAP
104 default y
105 help
106 Pin multiplexing support for OMAP boards. If your bootloader
107 sets the multiplexing correctly, say N. Otherwise, or if unsure,
108 say Y.
109
110config OMAP_MUX_DEBUG
111 bool "Multiplexing debug output"
112 depends on OMAP_MUX
113 default n
114 help
115 Makes the multiplexing functions print out a lot of debug info.
116 This is useful if you want to find out the correct values of the
117 multiplexing registers.
118
119config OMAP_MUX_WARNINGS
120 bool "Warn about pins the bootloader didn't set up"
121 depends on OMAP_MUX
122 default y
123 help
124 Choose Y here to warn whenever driver initialization logic needs
125 to change the pin multiplexing setup. When there are no warnings
126 printed, it's safe to deselect OMAP_MUX for your product.
127
128choice
129 prompt "System timer"
130 default OMAP_MPU_TIMER
131
132config OMAP_MPU_TIMER
133 bool "Use mpu timer"
134 help
135 Select this option if you want to use the OMAP mpu timer. This
136 timer provides more intra-tick resolution than the 32KHz timer,
137 but consumes more power.
138
139config OMAP_32K_TIMER
140 bool "Use 32KHz timer"
141 depends on ARCH_OMAP16XX
142 help
143 Select this option if you want to enable the OMAP 32KHz timer.
144 This timer saves power compared to the OMAP_MPU_TIMER, and has
145 support for no tick during idle. The 32KHz timer provides less
146 intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is
147 currently only available for OMAP-16xx.
148
149endchoice
150
151config OMAP_32K_TIMER_HZ
152 int "Kernel internal timer frequency for 32KHz timer"
153 range 32 1024
154 depends on OMAP_32K_TIMER
155 default "128"
156 help
157 Kernel internal timer frequency should be a divisor of 32768,
158 such as 64 or 128.
159
160choice
161 prompt "Low-level debug console UART"
162 depends on ARCH_OMAP
163 default OMAP_LL_DEBUG_UART1
164
165config OMAP_LL_DEBUG_UART1
166 bool "UART1"
167
168config OMAP_LL_DEBUG_UART2
169 bool "UART2"
170
171config OMAP_LL_DEBUG_UART3
172 bool "UART3"
173
174endchoice
175
176config OMAP_ARM_195MHZ
177 bool "OMAP ARM 195 MHz CPU"
178 depends on ARCH_OMAP730
179 help
180 Enable 195MHz clock for OMAP CPU. If unsure, say N.
181
182config OMAP_ARM_192MHZ
183 bool "OMAP ARM 192 MHz CPU"
184 depends on ARCH_OMAP16XX
185 help
186 Enable 192MHz clock for OMAP CPU. If unsure, say N.
187
188config OMAP_ARM_182MHZ
189 bool "OMAP ARM 182 MHz CPU"
190 depends on ARCH_OMAP730
191 help
192 Enable 182MHz clock for OMAP CPU. If unsure, say N.
193
194config OMAP_ARM_168MHZ
195 bool "OMAP ARM 168 MHz CPU"
196 depends on ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730
197 help
198 Enable 168MHz clock for OMAP CPU. If unsure, say N.
199
200config OMAP_ARM_120MHZ
201 bool "OMAP ARM 120 MHz CPU"
202 depends on ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730
203 help
204 Enable 120MHz clock for OMAP CPU. If unsure, say N.
205
206config OMAP_ARM_60MHZ
207 bool "OMAP ARM 60 MHz CPU"
208 depends on ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730
209 default y
210 help
211 Enable 60MHz clock for OMAP CPU. If unsure, say Y.
212
213config OMAP_ARM_30MHZ
214 bool "OMAP ARM 30 MHz CPU"
215 depends on ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730
216 help
217 Enable 30MHz clock for OMAP CPU. If unsure, say N.
218
219endmenu
220
221endif
diff --git a/arch/arm/mach-omap/Makefile b/arch/arm/mach-omap/Makefile
deleted file mode 100644
index 4cafb11d2c02..000000000000
--- a/arch/arm/mach-omap/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
1#
2# Makefile for the linux kernel.
3#
4
5# Common support
6obj-y := common.o time.o irq.o dma.o clock.o mux.o gpio.o mcbsp.o usb.o
7obj-m :=
8obj-n :=
9obj- :=
10led-y := leds.o
11
12# Specific board support
13obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o
14obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o
15obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
16obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o
17obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o
18obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o
19obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o
20obj-$(CONFIG_MACH_NETSTAR) += board-netstar.o
21
22# OCPI interconnect support for 1710, 1610 and 5912
23obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
24
25# LEDs support
26led-$(CONFIG_MACH_OMAP_H2) += leds-h2p2-debug.o
27led-$(CONFIG_MACH_OMAP_INNOVATOR) += leds-innovator.o
28led-$(CONFIG_MACH_OMAP_PERSEUS2) += leds-h2p2-debug.o
29obj-$(CONFIG_LEDS) += $(led-y)
30
31# Power Management
32obj-$(CONFIG_PM) += pm.o sleep.o
33
34ifeq ($(CONFIG_ARCH_OMAP1510),y)
35# Innovator-1510 FPGA
36obj-$(CONFIG_MACH_OMAP_INNOVATOR) += fpga.o
37endif
38
39# kgdb support
40obj-$(CONFIG_KGDB_SERIAL) += kgdb-serial.o
diff --git a/arch/arm/mach-omap/common.c b/arch/arm/mach-omap/common.c
deleted file mode 100644
index 265cde48586f..000000000000
--- a/arch/arm/mach-omap/common.c
+++ /dev/null
@@ -1,549 +0,0 @@
1/*
2 * linux/arch/arm/mach-omap/common.c
3 *
4 * Code common to all OMAP machines.
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/config.h>
11#include <linux/module.h>
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/delay.h>
15#include <linux/pm.h>
16#include <linux/console.h>
17#include <linux/serial.h>
18#include <linux/tty.h>
19#include <linux/serial_8250.h>
20#include <linux/serial_reg.h>
21
22#include <asm/hardware.h>
23#include <asm/system.h>
24#include <asm/pgtable.h>
25#include <asm/mach/map.h>
26#include <asm/hardware/clock.h>
27#include <asm/io.h>
28#include <asm/mach-types.h>
29
30#include <asm/arch/board.h>
31#include <asm/arch/mux.h>
32#include <asm/arch/fpga.h>
33
34#include "clock.h"
35
36#define DEBUG 1
37
38struct omap_id {
39 u16 jtag_id; /* Used to determine OMAP type */
40 u8 die_rev; /* Processor revision */
41 u32 omap_id; /* OMAP revision */
42 u32 type; /* Cpu id bits [31:08], cpu class bits [07:00] */
43};
44
45/* Register values to detect the OMAP version */
46static struct omap_id omap_ids[] __initdata = {
47 { .jtag_id = 0x355f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300100},
48 { .jtag_id = 0xb55f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300300},
49 { .jtag_id = 0xb470, .die_rev = 0x0, .omap_id = 0x03310100, .type = 0x15100000},
50 { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x16100000},
51 { .jtag_id = 0xb576, .die_rev = 0x2, .omap_id = 0x03320100, .type = 0x16110000},
52 { .jtag_id = 0xb576, .die_rev = 0x3, .omap_id = 0x03320100, .type = 0x16100c00},
53 { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320200, .type = 0x16100d00},
54 { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 0x1610ef00},
55 { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 0x1610ef00},
56 { .jtag_id = 0xb576, .die_rev = 0x1, .omap_id = 0x03320100, .type = 0x16110000},
57 { .jtag_id = 0xb58c, .die_rev = 0x2, .omap_id = 0x03320200, .type = 0x16110b00},
58 { .jtag_id = 0xb58c, .die_rev = 0x3, .omap_id = 0x03320200, .type = 0x16110c00},
59 { .jtag_id = 0xb65f, .die_rev = 0x0, .omap_id = 0x03320400, .type = 0x16212300},
60 { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320400, .type = 0x16212300},
61 { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320500, .type = 0x16212300},
62 { .jtag_id = 0xb5f7, .die_rev = 0x0, .omap_id = 0x03330000, .type = 0x17100000},
63 { .jtag_id = 0xb5f7, .die_rev = 0x1, .omap_id = 0x03330100, .type = 0x17100000},
64 { .jtag_id = 0xb5f7, .die_rev = 0x2, .omap_id = 0x03330100, .type = 0x17100000},
65};
66
67/*
68 * Get OMAP type from PROD_ID.
69 * 1710 has the PROD_ID in bits 15:00, not in 16:01 as documented in TRM.
70 * 1510 PROD_ID is empty, and 1610 PROD_ID does not make sense.
71 * Undocumented register in TEST BLOCK is used as fallback; This seems to
72 * work on 1510, 1610 & 1710. The official way hopefully will work in future
73 * processors.
74 */
75static u16 __init omap_get_jtag_id(void)
76{
77 u32 prod_id, omap_id;
78
79 prod_id = omap_readl(OMAP_PRODUCTION_ID_1);
80 omap_id = omap_readl(OMAP32_ID_1);
81
82 /* Check for unusable OMAP_PRODUCTION_ID_1 on 1611B/5912 and 730 */
83 if (((prod_id >> 20) == 0) || (prod_id == omap_id))
84 prod_id = 0;
85 else
86 prod_id &= 0xffff;
87
88 if (prod_id)
89 return prod_id;
90
91 /* Use OMAP32_ID_1 as fallback */
92 prod_id = ((omap_id >> 12) & 0xffff);
93
94 return prod_id;
95}
96
97/*
98 * Get OMAP revision from DIE_REV.
99 * Early 1710 processors may have broken OMAP_DIE_ID, it contains PROD_ID.
100 * Undocumented register in the TEST BLOCK is used as fallback.
101 * REVISIT: This does not seem to work on 1510
102 */
103static u8 __init omap_get_die_rev(void)
104{
105 u32 die_rev;
106
107 die_rev = omap_readl(OMAP_DIE_ID_1);
108
109 /* Check for broken OMAP_DIE_ID on early 1710 */
110 if (((die_rev >> 12) & 0xffff) == omap_get_jtag_id())
111 die_rev = 0;
112
113 die_rev = (die_rev >> 17) & 0xf;
114 if (die_rev)
115 return die_rev;
116
117 die_rev = (omap_readl(OMAP32_ID_1) >> 28) & 0xf;
118
119 return die_rev;
120}
121
122static void __init omap_check_revision(void)
123{
124 int i;
125 u16 jtag_id;
126 u8 die_rev;
127 u32 omap_id;
128 u8 cpu_type;
129
130 jtag_id = omap_get_jtag_id();
131 die_rev = omap_get_die_rev();
132 omap_id = omap_readl(OMAP32_ID_0);
133
134#ifdef DEBUG
135 printk("OMAP_DIE_ID_0: 0x%08x\n", omap_readl(OMAP_DIE_ID_0));
136 printk("OMAP_DIE_ID_1: 0x%08x DIE_REV: %i\n",
137 omap_readl(OMAP_DIE_ID_1),
138 (omap_readl(OMAP_DIE_ID_1) >> 17) & 0xf);
139 printk("OMAP_PRODUCTION_ID_0: 0x%08x\n", omap_readl(OMAP_PRODUCTION_ID_0));
140 printk("OMAP_PRODUCTION_ID_1: 0x%08x JTAG_ID: 0x%04x\n",
141 omap_readl(OMAP_PRODUCTION_ID_1),
142 omap_readl(OMAP_PRODUCTION_ID_1) & 0xffff);
143 printk("OMAP32_ID_0: 0x%08x\n", omap_readl(OMAP32_ID_0));
144 printk("OMAP32_ID_1: 0x%08x\n", omap_readl(OMAP32_ID_1));
145 printk("JTAG_ID: 0x%04x DIE_REV: %i\n", jtag_id, die_rev);
146#endif
147
148 system_serial_high = omap_readl(OMAP_DIE_ID_0);
149 system_serial_low = omap_readl(OMAP_DIE_ID_1);
150
151 /* First check only the major version in a safe way */
152 for (i = 0; i < ARRAY_SIZE(omap_ids); i++) {
153 if (jtag_id == (omap_ids[i].jtag_id)) {
154 system_rev = omap_ids[i].type;
155 break;
156 }
157 }
158
159 /* Check if we can find the die revision */
160 for (i = 0; i < ARRAY_SIZE(omap_ids); i++) {
161 if (jtag_id == omap_ids[i].jtag_id && die_rev == omap_ids[i].die_rev) {
162 system_rev = omap_ids[i].type;
163 break;
164 }
165 }
166
167 /* Finally check also the omap_id */
168 for (i = 0; i < ARRAY_SIZE(omap_ids); i++) {
169 if (jtag_id == omap_ids[i].jtag_id
170 && die_rev == omap_ids[i].die_rev
171 && omap_id == omap_ids[i].omap_id) {
172 system_rev = omap_ids[i].type;
173 break;
174 }
175 }
176
177 /* Add the cpu class info (7xx, 15xx, 16xx, 24xx) */
178 cpu_type = system_rev >> 24;
179
180 switch (cpu_type) {
181 case 0x07:
182 system_rev |= 0x07;
183 break;
184 case 0x15:
185 system_rev |= 0x15;
186 break;
187 case 0x16:
188 case 0x17:
189 system_rev |= 0x16;
190 break;
191 case 0x24:
192 system_rev |= 0x24;
193 break;
194 default:
195 printk("Unknown OMAP cpu type: 0x%02x\n", cpu_type);
196 }
197
198 printk("OMAP%04x", system_rev >> 16);
199 if ((system_rev >> 8) & 0xff)
200 printk("%x", (system_rev >> 8) & 0xff);
201 printk(" revision %i handled as %02xxx id: %08x%08x\n",
202 die_rev, system_rev & 0xff, system_serial_low,
203 system_serial_high);
204}
205
206/*
207 * ----------------------------------------------------------------------------
208 * OMAP I/O mapping
209 *
210 * The machine specific code may provide the extra mapping besides the
211 * default mapping provided here.
212 * ----------------------------------------------------------------------------
213 */
214
215static struct map_desc omap_io_desc[] __initdata = {
216 { IO_VIRT, IO_PHYS, IO_SIZE, MT_DEVICE },
217};
218
219#ifdef CONFIG_ARCH_OMAP730
220static struct map_desc omap730_io_desc[] __initdata = {
221 { OMAP730_DSP_BASE, OMAP730_DSP_START, OMAP730_DSP_SIZE, MT_DEVICE },
222 { OMAP730_DSPREG_BASE, OMAP730_DSPREG_START, OMAP730_DSPREG_SIZE, MT_DEVICE },
223 { OMAP730_SRAM_BASE, OMAP730_SRAM_START, OMAP730_SRAM_SIZE, MT_DEVICE }
224};
225#endif
226
227#ifdef CONFIG_ARCH_OMAP1510
228static struct map_desc omap1510_io_desc[] __initdata = {
229 { OMAP1510_DSP_BASE, OMAP1510_DSP_START, OMAP1510_DSP_SIZE, MT_DEVICE },
230 { OMAP1510_DSPREG_BASE, OMAP1510_DSPREG_START, OMAP1510_DSPREG_SIZE, MT_DEVICE },
231 { OMAP1510_SRAM_BASE, OMAP1510_SRAM_START, OMAP1510_SRAM_SIZE, MT_DEVICE }
232};
233#endif
234
235#if defined(CONFIG_ARCH_OMAP16XX)
236static struct map_desc omap1610_io_desc[] __initdata = {
237 { OMAP16XX_DSP_BASE, OMAP16XX_DSP_START, OMAP16XX_DSP_SIZE, MT_DEVICE },
238 { OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_START, OMAP16XX_DSPREG_SIZE, MT_DEVICE },
239 { OMAP16XX_SRAM_BASE, OMAP16XX_SRAM_START, OMAP1610_SRAM_SIZE, MT_DEVICE }
240};
241
242static struct map_desc omap5912_io_desc[] __initdata = {
243 { OMAP16XX_DSP_BASE, OMAP16XX_DSP_START, OMAP16XX_DSP_SIZE, MT_DEVICE },
244 { OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_START, OMAP16XX_DSPREG_SIZE, MT_DEVICE },
245/*
246 * The OMAP5912 has 250kByte internal SRAM. Because the mapping is baseed on page
247 * size (4kByte), it seems that the last 2kByte (=0x800) of the 250kByte are not mapped.
248 * Add additional 2kByte (0x800) so that the last page is mapped and the last 2kByte
249 * can be used.
250 */
251 { OMAP16XX_SRAM_BASE, OMAP16XX_SRAM_START, OMAP5912_SRAM_SIZE + 0x800, MT_DEVICE }
252};
253#endif
254
255static int initialized = 0;
256
257static void __init _omap_map_io(void)
258{
259 initialized = 1;
260
261 /* We have to initialize the IO space mapping before we can run
262 * cpu_is_omapxxx() macros. */
263 iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc));
264 omap_check_revision();
265
266#ifdef CONFIG_ARCH_OMAP730
267 if (cpu_is_omap730()) {
268 iotable_init(omap730_io_desc, ARRAY_SIZE(omap730_io_desc));
269 }
270#endif
271#ifdef CONFIG_ARCH_OMAP1510
272 if (cpu_is_omap1510()) {
273 iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc));
274 }
275#endif
276#if defined(CONFIG_ARCH_OMAP16XX)
277 if (cpu_is_omap1610() || cpu_is_omap1710()) {
278 iotable_init(omap1610_io_desc, ARRAY_SIZE(omap1610_io_desc));
279 }
280 if (cpu_is_omap5912()) {
281 iotable_init(omap5912_io_desc, ARRAY_SIZE(omap5912_io_desc));
282 }
283#endif
284
285 /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort
286 * on a Posted Write in the TIPB Bridge".
287 */
288 omap_writew(0x0, MPU_PUBLIC_TIPB_CNTL);
289 omap_writew(0x0, MPU_PRIVATE_TIPB_CNTL);
290
291 /* Must init clocks early to assure that timer interrupt works
292 */
293 clk_init();
294}
295
296/*
297 * This should only get called from board specific init
298 */
299void omap_map_io(void)
300{
301 if (!initialized)
302 _omap_map_io();
303}
304
305static inline unsigned int omap_serial_in(struct plat_serial8250_port *up,
306 int offset)
307{
308 offset <<= up->regshift;
309 return (unsigned int)__raw_readb(up->membase + offset);
310}
311
312static inline void omap_serial_outp(struct plat_serial8250_port *p, int offset,
313 int value)
314{
315 offset <<= p->regshift;
316 __raw_writeb(value, p->membase + offset);
317}
318
319/*
320 * Internal UARTs need to be initialized for the 8250 autoconfig to work
321 * properly. Note that the TX watermark initialization may not be needed
322 * once the 8250.c watermark handling code is merged.
323 */
324static void __init omap_serial_reset(struct plat_serial8250_port *p)
325{
326 omap_serial_outp(p, UART_OMAP_MDR1, 0x07); /* disable UART */
327 omap_serial_outp(p, UART_OMAP_SCR, 0x08); /* TX watermark */
328 omap_serial_outp(p, UART_OMAP_MDR1, 0x00); /* enable UART */
329
330 if (!cpu_is_omap1510()) {
331 omap_serial_outp(p, UART_OMAP_SYSC, 0x01);
332 while (!(omap_serial_in(p, UART_OMAP_SYSC) & 0x01));
333 }
334}
335
336static struct plat_serial8250_port serial_platform_data[] = {
337 {
338 .membase = (char*)IO_ADDRESS(OMAP_UART1_BASE),
339 .mapbase = (unsigned long)OMAP_UART1_BASE,
340 .irq = INT_UART1,
341 .flags = UPF_BOOT_AUTOCONF,
342 .iotype = UPIO_MEM,
343 .regshift = 2,
344 .uartclk = OMAP16XX_BASE_BAUD * 16,
345 },
346 {
347 .membase = (char*)IO_ADDRESS(OMAP_UART2_BASE),
348 .mapbase = (unsigned long)OMAP_UART2_BASE,
349 .irq = INT_UART2,
350 .flags = UPF_BOOT_AUTOCONF,
351 .iotype = UPIO_MEM,
352 .regshift = 2,
353 .uartclk = OMAP16XX_BASE_BAUD * 16,
354 },
355 {
356 .membase = (char*)IO_ADDRESS(OMAP_UART3_BASE),
357 .mapbase = (unsigned long)OMAP_UART3_BASE,
358 .irq = INT_UART3,
359 .flags = UPF_BOOT_AUTOCONF,
360 .iotype = UPIO_MEM,
361 .regshift = 2,
362 .uartclk = OMAP16XX_BASE_BAUD * 16,
363 },
364 { },
365};
366
367static struct platform_device serial_device = {
368 .name = "serial8250",
369 .id = 0,
370 .dev = {
371 .platform_data = serial_platform_data,
372 },
373};
374
375/*
376 * Note that on Innovator-1510 UART2 pins conflict with USB2.
377 * By default UART2 does not work on Innovator-1510 if you have
378 * USB OHCI enabled. To use UART2, you must disable USB2 first.
379 */
380void __init omap_serial_init(int ports[OMAP_MAX_NR_PORTS])
381{
382 int i;
383
384 if (cpu_is_omap730()) {
385 serial_platform_data[0].regshift = 0;
386 serial_platform_data[1].regshift = 0;
387 serial_platform_data[0].irq = INT_730_UART_MODEM_1;
388 serial_platform_data[1].irq = INT_730_UART_MODEM_IRDA_2;
389 }
390
391 if (cpu_is_omap1510()) {
392 serial_platform_data[0].uartclk = OMAP1510_BASE_BAUD * 16;
393 serial_platform_data[1].uartclk = OMAP1510_BASE_BAUD * 16;
394 serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16;
395 }
396
397 for (i = 0; i < OMAP_MAX_NR_PORTS; i++) {
398 unsigned char reg;
399
400 if (ports[i] == 0) {
401 serial_platform_data[i].membase = 0;
402 serial_platform_data[i].mapbase = 0;
403 continue;
404 }
405
406 switch (i) {
407 case 0:
408 if (cpu_is_omap1510()) {
409 omap_cfg_reg(UART1_TX);
410 omap_cfg_reg(UART1_RTS);
411 if (machine_is_omap_innovator()) {
412 reg = fpga_read(OMAP1510_FPGA_POWER);
413 reg |= OMAP1510_FPGA_PCR_COM1_EN;
414 fpga_write(reg, OMAP1510_FPGA_POWER);
415 udelay(10);
416 }
417 }
418 break;
419 case 1:
420 if (cpu_is_omap1510()) {
421 omap_cfg_reg(UART2_TX);
422 omap_cfg_reg(UART2_RTS);
423 if (machine_is_omap_innovator()) {
424 reg = fpga_read(OMAP1510_FPGA_POWER);
425 reg |= OMAP1510_FPGA_PCR_COM2_EN;
426 fpga_write(reg, OMAP1510_FPGA_POWER);
427 udelay(10);
428 }
429 }
430 break;
431 case 2:
432 if (cpu_is_omap1510()) {
433 omap_cfg_reg(UART3_TX);
434 omap_cfg_reg(UART3_RX);
435 }
436 if (cpu_is_omap1710()) {
437 clk_enable(clk_get(0, "uart3_ck"));
438 }
439 break;
440 }
441 omap_serial_reset(&serial_platform_data[i]);
442 }
443}
444
445static int __init omap_init(void)
446{
447 return platform_device_register(&serial_device);
448}
449arch_initcall(omap_init);
450
451#define NO_LENGTH_CHECK 0xffffffff
452
453extern int omap_bootloader_tag_len;
454extern u8 omap_bootloader_tag[];
455
456struct omap_board_config_kernel *omap_board_config;
457int omap_board_config_size = 0;
458
459static const void *get_config(u16 tag, size_t len, int skip, size_t *len_out)
460{
461 struct omap_board_config_kernel *kinfo = NULL;
462 int i;
463
464#ifdef CONFIG_OMAP_BOOT_TAG
465 struct omap_board_config_entry *info = NULL;
466
467 if (omap_bootloader_tag_len > 4)
468 info = (struct omap_board_config_entry *) omap_bootloader_tag;
469 while (info != NULL) {
470 u8 *next;
471
472 if (info->tag == tag) {
473 if (skip == 0)
474 break;
475 skip--;
476 }
477
478 if ((info->len & 0x03) != 0) {
479 /* We bail out to avoid an alignment fault */
480 printk(KERN_ERR "OMAP peripheral config: Length (%d) not word-aligned (tag %04x)\n",
481 info->len, info->tag);
482 return NULL;
483 }
484 next = (u8 *) info + sizeof(*info) + info->len;
485 if (next >= omap_bootloader_tag + omap_bootloader_tag_len)
486 info = NULL;
487 else
488 info = (struct omap_board_config_entry *) next;
489 }
490 if (info != NULL) {
491 /* Check the length as a lame attempt to check for
492 * binary inconsistancy. */
493 if (len != NO_LENGTH_CHECK) {
494 /* Word-align len */
495 if (len & 0x03)
496 len = (len + 3) & ~0x03;
497 if (info->len != len) {
498 printk(KERN_ERR "OMAP peripheral config: Length mismatch with tag %x (want %d, got %d)\n",
499 tag, len, info->len);
500 return NULL;
501 }
502 }
503 if (len_out != NULL)
504 *len_out = info->len;
505 return info->data;
506 }
507#endif
508 /* Try to find the config from the board-specific structures
509 * in the kernel. */
510 for (i = 0; i < omap_board_config_size; i++) {
511 if (omap_board_config[i].tag == tag) {
512 kinfo = &omap_board_config[i];
513 break;
514 }
515 }
516 if (kinfo == NULL)
517 return NULL;
518 return kinfo->data;
519}
520
521const void *__omap_get_config(u16 tag, size_t len, int nr)
522{
523 return get_config(tag, len, nr, NULL);
524}
525EXPORT_SYMBOL(__omap_get_config);
526
527const void *omap_get_var_config(u16 tag, size_t *len)
528{
529 return get_config(tag, NO_LENGTH_CHECK, 0, len);
530}
531EXPORT_SYMBOL(omap_get_var_config);
532
533static int __init omap_add_serial_console(void)
534{
535 const struct omap_uart_config *info;
536
537 info = omap_get_config(OMAP_TAG_UART, struct omap_uart_config);
538 if (info != NULL && info->console_uart) {
539 static char speed[11], *opt = NULL;
540
541 if (info->console_speed) {
542 snprintf(speed, sizeof(speed), "%u", info->console_speed);
543 opt = speed;
544 }
545 return add_preferred_console("ttyS", info->console_uart - 1, opt);
546 }
547 return 0;
548}
549console_initcall(omap_add_serial_console);
diff --git a/arch/arm/mach-omap/common.h b/arch/arm/mach-omap/common.h
deleted file mode 100644
index 9f62858c0df4..000000000000
--- a/arch/arm/mach-omap/common.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * linux/arch/arm/mach-omap/common.h
3 *
4 * Header for code common to all OMAP machines.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 *
11 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
12 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
14 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
15 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
17 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
18 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
20 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 *
22 * You should have received a copy of the GNU General Public License along
23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26
27#ifndef __ARCH_ARM_MACH_OMAP_COMMON_H
28#define __ARCH_ARM_MACH_OMAP_COMMON_H
29
30struct sys_timer;
31
32extern void omap_map_io(void);
33extern struct sys_timer omap_timer;
34extern void omap_serial_init(int ports[]);
35
36#endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */
diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig
new file mode 100644
index 000000000000..7408ac94f771
--- /dev/null
+++ b/arch/arm/mach-omap1/Kconfig
@@ -0,0 +1,144 @@
1comment "OMAP Core Type"
2 depends on ARCH_OMAP1
3
4config ARCH_OMAP730
5 depends on ARCH_OMAP1
6 bool "OMAP730 Based System"
7 select ARCH_OMAP_OTG
8
9config ARCH_OMAP1510
10 depends on ARCH_OMAP1
11 default y
12 bool "OMAP1510 Based System"
13
14config ARCH_OMAP16XX
15 depends on ARCH_OMAP1
16 bool "OMAP16xx Based System"
17 select ARCH_OMAP_OTG
18
19comment "OMAP Board Type"
20 depends on ARCH_OMAP1
21
22config MACH_OMAP_INNOVATOR
23 bool "TI Innovator"
24 depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX)
25 help
26 TI OMAP 1510 or 1610 Innovator board support. Say Y here if you
27 have such a board.
28
29config MACH_OMAP_H2
30 bool "TI H2 Support"
31 depends on ARCH_OMAP1 && ARCH_OMAP16XX
32 help
33 TI OMAP 1610/1611B H2 board support. Say Y here if you have such
34 a board.
35
36config MACH_OMAP_H3
37 bool "TI H3 Support"
38 depends on ARCH_OMAP1 && ARCH_OMAP16XX
39 help
40 TI OMAP 1710 H3 board support. Say Y here if you have such
41 a board.
42
43config MACH_OMAP_OSK
44 bool "TI OSK Support"
45 depends on ARCH_OMAP1 && ARCH_OMAP16XX
46 help
47 TI OMAP 5912 OSK (OMAP Starter Kit) board support. Say Y here
48 if you have such a board.
49
50config MACH_OMAP_PERSEUS2
51 bool "TI Perseus2"
52 depends on ARCH_OMAP1 && ARCH_OMAP730
53 help
54 Support for TI OMAP 730 Perseus2 board. Say Y here if you have such
55 a board.
56
57config MACH_VOICEBLUE
58 bool "Voiceblue"
59 depends on ARCH_OMAP1 && ARCH_OMAP1510
60 help
61 Support for Voiceblue GSM/VoIP gateway. Say Y here if you have
62 such a board.
63
64config MACH_NETSTAR
65 bool "NetStar"
66 depends on ARCH_OMAP1 && ARCH_OMAP1510
67 help
68 Support for NetStar PBX. Say Y here if you have such a board.
69
70config MACH_OMAP_GENERIC
71 bool "Generic OMAP board"
72 depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX)
73 help
74 Support for generic OMAP-1510, 1610 or 1710 board with
75 no FPGA. Can be used as template for porting Linux to
76 custom OMAP boards. Say Y here if you have a custom
77 board.
78
79comment "OMAP CPU Speed"
80 depends on ARCH_OMAP1
81
82config OMAP_CLOCKS_SET_BY_BOOTLOADER
83 bool "OMAP clocks set by bootloader"
84 depends on ARCH_OMAP1
85 help
86 Enable this option to prevent the kernel from overriding the clock
87 frequencies programmed by bootloader for MPU, DSP, MMUs, TC,
88 internal LCD controller and MPU peripherals.
89
90config OMAP_ARM_216MHZ
91 bool "OMAP ARM 216 MHz CPU (1710 only)"
92 depends on ARCH_OMAP1 && ARCH_OMAP16XX
93 help
94 Enable 216 MHz clock for OMAP1710 CPU. If unsure, say N.
95
96config OMAP_ARM_195MHZ
97 bool "OMAP ARM 195 MHz CPU"
98 depends on ARCH_OMAP1 && ARCH_OMAP730
99 help
100 Enable 195MHz clock for OMAP CPU. If unsure, say N.
101
102config OMAP_ARM_192MHZ
103 bool "OMAP ARM 192 MHz CPU"
104 depends on ARCH_OMAP1 && ARCH_OMAP16XX
105 help
106 Enable 192MHz clock for OMAP CPU. If unsure, say N.
107
108config OMAP_ARM_182MHZ
109 bool "OMAP ARM 182 MHz CPU"
110 depends on ARCH_OMAP1 && ARCH_OMAP730
111 help
112 Enable 182MHz clock for OMAP CPU. If unsure, say N.
113
114config OMAP_ARM_168MHZ
115 bool "OMAP ARM 168 MHz CPU"
116 depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730)
117 help
118 Enable 168MHz clock for OMAP CPU. If unsure, say N.
119
120config OMAP_ARM_150MHZ
121 bool "OMAP ARM 150 MHz CPU"
122 depends on ARCH_OMAP1 && ARCH_OMAP1510
123 help
124 Enable 150MHz clock for OMAP CPU. If unsure, say N.
125
126config OMAP_ARM_120MHZ
127 bool "OMAP ARM 120 MHz CPU"
128 depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730)
129 help
130 Enable 120MHz clock for OMAP CPU. If unsure, say N.
131
132config OMAP_ARM_60MHZ
133 bool "OMAP ARM 60 MHz CPU"
134 depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730)
135 default y
136 help
137 Enable 60MHz clock for OMAP CPU. If unsure, say Y.
138
139config OMAP_ARM_30MHZ
140 bool "OMAP ARM 30 MHz CPU"
141 depends on ARCH_OMAP1 && (ARCH_OMAP1510 || ARCH_OMAP16XX || ARCH_OMAP730)
142 help
143 Enable 30MHz clock for OMAP CPU. If unsure, say N.
144
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
new file mode 100644
index 000000000000..d386fd913f0c
--- /dev/null
+++ b/arch/arm/mach-omap1/Makefile
@@ -0,0 +1,30 @@
1#
2# Makefile for the linux kernel.
3#
4
5# Common support
6obj-y := io.o id.o irq.o time.o serial.o
7led-y := leds.o
8
9# Specific board support
10obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o
11obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o
12obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
13obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o
14obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o
15obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o
16obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o
17obj-$(CONFIG_MACH_NETSTAR) += board-netstar.o
18
19ifeq ($(CONFIG_ARCH_OMAP1510),y)
20# Innovator-1510 FPGA
21obj-$(CONFIG_MACH_OMAP_INNOVATOR) += fpga.o
22endif
23
24# LEDs support
25led-$(CONFIG_MACH_OMAP_H2) += leds-h2p2-debug.o
26led-$(CONFIG_MACH_OMAP_INNOVATOR) += leds-innovator.o
27led-$(CONFIG_MACH_OMAP_PERSEUS2) += leds-h2p2-debug.o
28led-$(CONFIG_MACH_OMAP_OSK) += leds-osk.o
29obj-$(CONFIG_LEDS) += $(led-y)
30
diff --git a/arch/arm/mach-omap/Makefile.boot b/arch/arm/mach-omap1/Makefile.boot
index fee1a6a15b54..292d56c5a888 100644
--- a/arch/arm/mach-omap/Makefile.boot
+++ b/arch/arm/mach-omap1/Makefile.boot
@@ -1,4 +1,3 @@
1 zreladdr-y := 0x10008000 1 zreladdr-y := 0x10008000
2params_phys-y := 0x10000100 2params_phys-y := 0x10000100
3initrd_phys-y := 0x10800000 3initrd_phys-y := 0x10800000
4
diff --git a/arch/arm/mach-omap/board-generic.c b/arch/arm/mach-omap1/board-generic.c
index 2102a2cd1013..122796ebe8f5 100644
--- a/arch/arm/mach-omap/board-generic.c
+++ b/arch/arm/mach-omap1/board-generic.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/board-generic.c 2 * linux/arch/arm/mach-omap1/board-generic.c
3 * 3 *
4 * Modified from board-innovator1510.c 4 * Modified from board-innovator1510.c
5 * 5 *
@@ -26,8 +26,7 @@
26#include <asm/arch/mux.h> 26#include <asm/arch/mux.h>
27#include <asm/arch/usb.h> 27#include <asm/arch/usb.h>
28#include <asm/arch/board.h> 28#include <asm/arch/board.h>
29 29#include <asm/arch/common.h>
30#include "common.h"
31 30
32static int __initdata generic_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; 31static int __initdata generic_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
33 32
@@ -84,15 +83,17 @@ static void __init omap_generic_init(void)
84 83
85static void __init omap_generic_map_io(void) 84static void __init omap_generic_map_io(void)
86{ 85{
87 omap_map_io(); 86 omap_map_common_io()
88} 87}
89 88
90MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710") 89MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")
91 MAINTAINER("Tony Lindgren <tony@atomide.com>") 90 /* Maintainer: Tony Lindgren <tony@atomide.com> */
92 BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) 91 .phys_ram = 0x10000000,
93 BOOT_PARAMS(0x10000100) 92 .phys_io = 0xfff00000,
94 MAPIO(omap_generic_map_io) 93 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
95 INITIRQ(omap_generic_init_irq) 94 .boot_params = 0x10000100,
96 INIT_MACHINE(omap_generic_init) 95 .map_io = omap_generic_map_io,
96 .init_irq = omap_generic_init_irq,
97 .init_machine = omap_generic_init,
97 .timer = &omap_timer, 98 .timer = &omap_timer,
98MACHINE_END 99MACHINE_END
diff --git a/arch/arm/mach-omap/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 1f067830d1fc..f4983ee95ab4 100644
--- a/arch/arm/mach-omap/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/board-h2.c 2 * linux/arch/arm/mach-omap1/board-h2.c
3 * 3 *
4 * Board specific inits for OMAP-1610 H2 4 * Board specific inits for OMAP-1610 H2
5 * 5 *
@@ -35,8 +35,7 @@
35#include <asm/arch/gpio.h> 35#include <asm/arch/gpio.h>
36#include <asm/arch/tc.h> 36#include <asm/arch/tc.h>
37#include <asm/arch/usb.h> 37#include <asm/arch/usb.h>
38 38#include <asm/arch/common.h>
39#include "common.h"
40 39
41extern int omap_gpio_init(void); 40extern int omap_gpio_init(void);
42 41
@@ -172,16 +171,18 @@ static void __init h2_init(void)
172 171
173static void __init h2_map_io(void) 172static void __init h2_map_io(void)
174{ 173{
175 omap_map_io(); 174 omap_map_common_io();
176 omap_serial_init(h2_serial_ports); 175 omap_serial_init(h2_serial_ports);
177} 176}
178 177
179MACHINE_START(OMAP_H2, "TI-H2") 178MACHINE_START(OMAP_H2, "TI-H2")
180 MAINTAINER("Imre Deak <imre.deak@nokia.com>") 179 /* Maintainer: Imre Deak <imre.deak@nokia.com> */
181 BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) 180 .phys_ram = 0x10000000,
182 BOOT_PARAMS(0x10000100) 181 .phys_io = 0xfff00000,
183 MAPIO(h2_map_io) 182 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
184 INITIRQ(h2_init_irq) 183 .boot_params = 0x10000100,
185 INIT_MACHINE(h2_init) 184 .map_io = h2_map_io,
185 .init_irq = h2_init_irq,
186 .init_machine = h2_init,
186 .timer = &omap_timer, 187 .timer = &omap_timer,
187MACHINE_END 188MACHINE_END
diff --git a/arch/arm/mach-omap/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 486a5a006c9a..7cd419d61b40 100644
--- a/arch/arm/mach-omap/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/board-h3.c 2 * linux/arch/arm/mach-omap1/board-h3.c
3 * 3 *
4 * This file contains OMAP1710 H3 specific code. 4 * This file contains OMAP1710 H3 specific code.
5 * 5 *
@@ -37,8 +37,7 @@
37#include <asm/arch/mux.h> 37#include <asm/arch/mux.h>
38#include <asm/arch/tc.h> 38#include <asm/arch/tc.h>
39#include <asm/arch/usb.h> 39#include <asm/arch/usb.h>
40 40#include <asm/arch/common.h>
41#include "common.h"
42 41
43extern int omap_gpio_init(void); 42extern int omap_gpio_init(void);
44 43
@@ -190,16 +189,18 @@ void h3_init_irq(void)
190 189
191static void __init h3_map_io(void) 190static void __init h3_map_io(void)
192{ 191{
193 omap_map_io(); 192 omap_map_common_io();
194 omap_serial_init(h3_serial_ports); 193 omap_serial_init(h3_serial_ports);
195} 194}
196 195
197MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") 196MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
198 MAINTAINER("Texas Instruments, Inc.") 197 /* Maintainer: Texas Instruments, Inc. */
199 BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) 198 .phys_ram = 0x10000000,
200 BOOT_PARAMS(0x10000100) 199 .phys_io = 0xfff00000,
201 MAPIO(h3_map_io) 200 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
202 INITIRQ(h3_init_irq) 201 .boot_params = 0x10000100,
203 INIT_MACHINE(h3_init) 202 .map_io = h3_map_io,
203 .init_irq = h3_init_irq,
204 .init_machine = h3_init,
204 .timer = &omap_timer, 205 .timer = &omap_timer,
205MACHINE_END 206MACHINE_END
diff --git a/arch/arm/mach-omap/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index 57cf4da88d55..91de60a91ef8 100644
--- a/arch/arm/mach-omap/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/board-innovator.c 2 * linux/arch/arm/mach-omap1/board-innovator.c
3 * 3 *
4 * Board specific inits for OMAP-1510 and OMAP-1610 Innovator 4 * Board specific inits for OMAP-1510 and OMAP-1610 Innovator
5 * 5 *
@@ -33,8 +33,7 @@
33#include <asm/arch/gpio.h> 33#include <asm/arch/gpio.h>
34#include <asm/arch/tc.h> 34#include <asm/arch/tc.h>
35#include <asm/arch/usb.h> 35#include <asm/arch/usb.h>
36 36#include <asm/arch/common.h>
37#include "common.h"
38 37
39static int __initdata innovator_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1}; 38static int __initdata innovator_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
40 39
@@ -252,7 +251,7 @@ static void __init innovator_init(void)
252 251
253static void __init innovator_map_io(void) 252static void __init innovator_map_io(void)
254{ 253{
255 omap_map_io(); 254 omap_map_common_io();
256 255
257#ifdef CONFIG_ARCH_OMAP1510 256#ifdef CONFIG_ARCH_OMAP1510
258 if (cpu_is_omap1510()) { 257 if (cpu_is_omap1510()) {
@@ -270,11 +269,13 @@ static void __init innovator_map_io(void)
270} 269}
271 270
272MACHINE_START(OMAP_INNOVATOR, "TI-Innovator") 271MACHINE_START(OMAP_INNOVATOR, "TI-Innovator")
273 MAINTAINER("MontaVista Software, Inc.") 272 /* Maintainer: MontaVista Software, Inc. */
274 BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) 273 .phys_ram = 0x10000000,
275 BOOT_PARAMS(0x10000100) 274 .phys_io = 0xfff00000,
276 MAPIO(innovator_map_io) 275 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
277 INITIRQ(innovator_init_irq) 276 .boot_params = 0x10000100,
278 INIT_MACHINE(innovator_init) 277 .map_io = innovator_map_io,
278 .init_irq = innovator_init_irq,
279 .init_machine = innovator_init,
279 .timer = &omap_timer, 280 .timer = &omap_timer,
280MACHINE_END 281MACHINE_END
diff --git a/arch/arm/mach-omap/board-netstar.c b/arch/arm/mach-omap1/board-netstar.c
index 54acbd215c4b..6750b2014092 100644
--- a/arch/arm/mach-omap/board-netstar.c
+++ b/arch/arm/mach-omap1/board-netstar.c
@@ -26,8 +26,7 @@
26#include <asm/arch/gpio.h> 26#include <asm/arch/gpio.h>
27#include <asm/arch/mux.h> 27#include <asm/arch/mux.h>
28#include <asm/arch/usb.h> 28#include <asm/arch/usb.h>
29 29#include <asm/arch/common.h>
30#include "common.h"
31 30
32extern void __init omap_init_time(void); 31extern void __init omap_init_time(void);
33extern int omap_gpio_init(void); 32extern int omap_gpio_init(void);
@@ -100,7 +99,7 @@ static int __initdata omap_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
100 99
101static void __init netstar_map_io(void) 100static void __init netstar_map_io(void)
102{ 101{
103 omap_map_io(); 102 omap_map_common_io();
104 omap_serial_init(omap_serial_ports); 103 omap_serial_init(omap_serial_ports);
105} 104}
106 105
@@ -141,11 +140,13 @@ static int __init netstar_late_init(void)
141postcore_initcall(netstar_late_init); 140postcore_initcall(netstar_late_init);
142 141
143MACHINE_START(NETSTAR, "NetStar OMAP5910") 142MACHINE_START(NETSTAR, "NetStar OMAP5910")
144 MAINTAINER("Ladislav Michl <michl@2n.cz>") 143 /* Maintainer: Ladislav Michl <michl@2n.cz> */
145 BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) 144 .phys_ram = 0x10000000,
146 BOOT_PARAMS(0x10000100) 145 .phys_io = 0xfff00000,
147 MAPIO(netstar_map_io) 146 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
148 INITIRQ(netstar_init_irq) 147 .boot_params = 0x10000100,
149 INIT_MACHINE(netstar_init) 148 .map_io = netstar_map_io,
150 .timer = &omap_timer, 149 .init_irq = netstar_init_irq,
150 .init_machine = netstar_init,
151 .timer = &omap_timer,
151MACHINE_END 152MACHINE_END
diff --git a/arch/arm/mach-omap/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index a951fc82459b..6844e536c698 100644
--- a/arch/arm/mach-omap/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/board-osk.c 2 * linux/arch/arm/mach-omap1/board-osk.c
3 * 3 *
4 * Board specific init for OMAP5912 OSK 4 * Board specific init for OMAP5912 OSK
5 * 5 *
@@ -39,8 +39,7 @@
39#include <asm/arch/usb.h> 39#include <asm/arch/usb.h>
40#include <asm/arch/mux.h> 40#include <asm/arch/mux.h>
41#include <asm/arch/tc.h> 41#include <asm/arch/tc.h>
42 42#include <asm/arch/common.h>
43#include "common.h"
44 43
45static struct map_desc osk5912_io_desc[] __initdata = { 44static struct map_desc osk5912_io_desc[] __initdata = {
46{ OMAP_OSK_NOR_FLASH_BASE, OMAP_OSK_NOR_FLASH_START, OMAP_OSK_NOR_FLASH_SIZE, 45{ OMAP_OSK_NOR_FLASH_BASE, OMAP_OSK_NOR_FLASH_START, OMAP_OSK_NOR_FLASH_SIZE,
@@ -153,17 +152,19 @@ static void __init osk_init(void)
153 152
154static void __init osk_map_io(void) 153static void __init osk_map_io(void)
155{ 154{
156 omap_map_io(); 155 omap_map_common_io();
157 iotable_init(osk5912_io_desc, ARRAY_SIZE(osk5912_io_desc)); 156 iotable_init(osk5912_io_desc, ARRAY_SIZE(osk5912_io_desc));
158 omap_serial_init(osk_serial_ports); 157 omap_serial_init(osk_serial_ports);
159} 158}
160 159
161MACHINE_START(OMAP_OSK, "TI-OSK") 160MACHINE_START(OMAP_OSK, "TI-OSK")
162 MAINTAINER("Dirk Behme <dirk.behme@de.bosch.com>") 161 /* Maintainer: Dirk Behme <dirk.behme@de.bosch.com> */
163 BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) 162 .phys_ram = 0x10000000,
164 BOOT_PARAMS(0x10000100) 163 .phys_io = 0xfff00000,
165 MAPIO(osk_map_io) 164 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
166 INITIRQ(osk_init_irq) 165 .boot_params = 0x10000100,
167 INIT_MACHINE(osk_init) 166 .map_io = osk_map_io,
167 .init_irq = osk_init_irq,
168 .init_machine = osk_init,
168 .timer = &omap_timer, 169 .timer = &omap_timer,
169MACHINE_END 170MACHINE_END
diff --git a/arch/arm/mach-omap/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index 64515aeb49cf..213317392d9b 100644
--- a/arch/arm/mach-omap/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/board-perseus2.c 2 * linux/arch/arm/mach-omap1/board-perseus2.c
3 * 3 *
4 * Modified from board-generic.c 4 * Modified from board-generic.c
5 * 5 *
@@ -27,8 +27,7 @@
27#include <asm/arch/gpio.h> 27#include <asm/arch/gpio.h>
28#include <asm/arch/mux.h> 28#include <asm/arch/mux.h>
29#include <asm/arch/fpga.h> 29#include <asm/arch/fpga.h>
30 30#include <asm/arch/common.h>
31#include "common.h"
32 31
33static struct resource smc91x_resources[] = { 32static struct resource smc91x_resources[] = {
34 [0] = { 33 [0] = {
@@ -140,7 +139,7 @@ static struct map_desc omap_perseus2_io_desc[] __initdata = {
140 139
141static void __init omap_perseus2_map_io(void) 140static void __init omap_perseus2_map_io(void)
142{ 141{
143 omap_map_io(); 142 omap_map_common_io();
144 iotable_init(omap_perseus2_io_desc, 143 iotable_init(omap_perseus2_io_desc,
145 ARRAY_SIZE(omap_perseus2_io_desc)); 144 ARRAY_SIZE(omap_perseus2_io_desc));
146 145
@@ -179,11 +178,13 @@ static void __init omap_perseus2_map_io(void)
179} 178}
180 179
181MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2") 180MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2")
182 MAINTAINER("Kevin Hilman <kjh@hilman.org>") 181 /* Maintainer: Kevin Hilman <kjh@hilman.org> */
183 BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) 182 .phys_ram = 0x10000000,
184 BOOT_PARAMS(0x10000100) 183 .phys_io = 0xfff00000,
185 MAPIO(omap_perseus2_map_io) 184 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
186 INITIRQ(omap_perseus2_init_irq) 185 .boot_params = 0x10000100,
187 INIT_MACHINE(omap_perseus2_init) 186 .map_io = omap_perseus2_map_io,
187 .init_irq = omap_perseus2_init_irq,
188 .init_machine = omap_perseus2_init,
188 .timer = &omap_timer, 189 .timer = &omap_timer,
189MACHINE_END 190MACHINE_END
diff --git a/arch/arm/mach-omap/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index f1a5bffac666..e42281988990 100644
--- a/arch/arm/mach-omap/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/board-voiceblue.c 2 * linux/arch/arm/mach-omap1/board-voiceblue.c
3 * 3 *
4 * Modified from board-generic.c 4 * Modified from board-generic.c
5 * 5 *
@@ -31,8 +31,7 @@
31#include <asm/arch/tc.h> 31#include <asm/arch/tc.h>
32#include <asm/arch/mux.h> 32#include <asm/arch/mux.h>
33#include <asm/arch/usb.h> 33#include <asm/arch/usb.h>
34 34#include <asm/arch/common.h>
35#include "common.h"
36 35
37extern void omap_init_time(void); 36extern void omap_init_time(void);
38extern int omap_gpio_init(void); 37extern int omap_gpio_init(void);
@@ -170,7 +169,7 @@ static int __initdata omap_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
170 169
171static void __init voiceblue_map_io(void) 170static void __init voiceblue_map_io(void)
172{ 171{
173 omap_map_io(); 172 omap_map_common_io();
174 omap_serial_init(omap_serial_ports); 173 omap_serial_init(omap_serial_ports);
175} 174}
176 175
@@ -246,11 +245,13 @@ EXPORT_SYMBOL(voiceblue_wdt_disable);
246EXPORT_SYMBOL(voiceblue_wdt_ping); 245EXPORT_SYMBOL(voiceblue_wdt_ping);
247 246
248MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") 247MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
249 MAINTAINER("Ladislav Michl <michl@2n.cz>") 248 /* Maintainer: Ladislav Michl <michl@2n.cz> */
250 BOOT_MEM(0x10000000, 0xfff00000, 0xfef00000) 249 .phys_ram = 0x10000000,
251 BOOT_PARAMS(0x10000100) 250 .phys_io = 0xfff00000,
252 MAPIO(voiceblue_map_io) 251 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
253 INITIRQ(voiceblue_init_irq) 252 .boot_params = 0x10000100,
254 INIT_MACHINE(voiceblue_init) 253 .map_io = voiceblue_map_io,
255 .timer = &omap_timer, 254 .init_irq = voiceblue_init_irq,
255 .init_machine = voiceblue_init,
256 .timer = &omap_timer,
256MACHINE_END 257MACHINE_END
diff --git a/arch/arm/mach-omap/fpga.c b/arch/arm/mach-omap1/fpga.c
index 7c08f6c2e1d0..7c08f6c2e1d0 100644
--- a/arch/arm/mach-omap/fpga.c
+++ b/arch/arm/mach-omap1/fpga.c
diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
new file mode 100644
index 000000000000..986c3b7e09bb
--- /dev/null
+++ b/arch/arm/mach-omap1/id.c
@@ -0,0 +1,188 @@
1/*
2 * linux/arch/arm/mach-omap1/id.c
3 *
4 * OMAP1 CPU identification code
5 *
6 * Copyright (C) 2004 Nokia Corporation
7 * Written by Tony Lindgren <tony@atomide.com>
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#include <linux/config.h>
15#include <linux/module.h>
16#include <linux/kernel.h>
17#include <linux/init.h>
18
19#include <asm/io.h>
20
21struct omap_id {
22 u16 jtag_id; /* Used to determine OMAP type */
23 u8 die_rev; /* Processor revision */
24 u32 omap_id; /* OMAP revision */
25 u32 type; /* Cpu id bits [31:08], cpu class bits [07:00] */
26};
27
28/* Register values to detect the OMAP version */
29static struct omap_id omap_ids[] __initdata = {
30 { .jtag_id = 0x355f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300100},
31 { .jtag_id = 0xb55f, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x07300300},
32 { .jtag_id = 0xb470, .die_rev = 0x0, .omap_id = 0x03310100, .type = 0x15100000},
33 { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320000, .type = 0x16100000},
34 { .jtag_id = 0xb576, .die_rev = 0x2, .omap_id = 0x03320100, .type = 0x16110000},
35 { .jtag_id = 0xb576, .die_rev = 0x3, .omap_id = 0x03320100, .type = 0x16100c00},
36 { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320200, .type = 0x16100d00},
37 { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 0x1610ef00},
38 { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 0x1610ef00},
39 { .jtag_id = 0xb576, .die_rev = 0x1, .omap_id = 0x03320100, .type = 0x16110000},
40 { .jtag_id = 0xb58c, .die_rev = 0x2, .omap_id = 0x03320200, .type = 0x16110b00},
41 { .jtag_id = 0xb58c, .die_rev = 0x3, .omap_id = 0x03320200, .type = 0x16110c00},
42 { .jtag_id = 0xb65f, .die_rev = 0x0, .omap_id = 0x03320400, .type = 0x16212300},
43 { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320400, .type = 0x16212300},
44 { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320500, .type = 0x16212300},
45 { .jtag_id = 0xb5f7, .die_rev = 0x0, .omap_id = 0x03330000, .type = 0x17100000},
46 { .jtag_id = 0xb5f7, .die_rev = 0x1, .omap_id = 0x03330100, .type = 0x17100000},
47 { .jtag_id = 0xb5f7, .die_rev = 0x2, .omap_id = 0x03330100, .type = 0x17100000},
48};
49
50/*
51 * Get OMAP type from PROD_ID.
52 * 1710 has the PROD_ID in bits 15:00, not in 16:01 as documented in TRM.
53 * 1510 PROD_ID is empty, and 1610 PROD_ID does not make sense.
54 * Undocumented register in TEST BLOCK is used as fallback; This seems to
55 * work on 1510, 1610 & 1710. The official way hopefully will work in future
56 * processors.
57 */
58static u16 __init omap_get_jtag_id(void)
59{
60 u32 prod_id, omap_id;
61
62 prod_id = omap_readl(OMAP_PRODUCTION_ID_1);
63 omap_id = omap_readl(OMAP32_ID_1);
64
65 /* Check for unusable OMAP_PRODUCTION_ID_1 on 1611B/5912 and 730 */
66 if (((prod_id >> 20) == 0) || (prod_id == omap_id))
67 prod_id = 0;
68 else
69 prod_id &= 0xffff;
70
71 if (prod_id)
72 return prod_id;
73
74 /* Use OMAP32_ID_1 as fallback */
75 prod_id = ((omap_id >> 12) & 0xffff);
76
77 return prod_id;
78}
79
80/*
81 * Get OMAP revision from DIE_REV.
82 * Early 1710 processors may have broken OMAP_DIE_ID, it contains PROD_ID.
83 * Undocumented register in the TEST BLOCK is used as fallback.
84 * REVISIT: This does not seem to work on 1510
85 */
86static u8 __init omap_get_die_rev(void)
87{
88 u32 die_rev;
89
90 die_rev = omap_readl(OMAP_DIE_ID_1);
91
92 /* Check for broken OMAP_DIE_ID on early 1710 */
93 if (((die_rev >> 12) & 0xffff) == omap_get_jtag_id())
94 die_rev = 0;
95
96 die_rev = (die_rev >> 17) & 0xf;
97 if (die_rev)
98 return die_rev;
99
100 die_rev = (omap_readl(OMAP32_ID_1) >> 28) & 0xf;
101
102 return die_rev;
103}
104
105void __init omap_check_revision(void)
106{
107 int i;
108 u16 jtag_id;
109 u8 die_rev;
110 u32 omap_id;
111 u8 cpu_type;
112
113 jtag_id = omap_get_jtag_id();
114 die_rev = omap_get_die_rev();
115 omap_id = omap_readl(OMAP32_ID_0);
116
117#ifdef DEBUG
118 printk("OMAP_DIE_ID_0: 0x%08x\n", omap_readl(OMAP_DIE_ID_0));
119 printk("OMAP_DIE_ID_1: 0x%08x DIE_REV: %i\n",
120 omap_readl(OMAP_DIE_ID_1),
121 (omap_readl(OMAP_DIE_ID_1) >> 17) & 0xf);
122 printk("OMAP_PRODUCTION_ID_0: 0x%08x\n", omap_readl(OMAP_PRODUCTION_ID_0));
123 printk("OMAP_PRODUCTION_ID_1: 0x%08x JTAG_ID: 0x%04x\n",
124 omap_readl(OMAP_PRODUCTION_ID_1),
125 omap_readl(OMAP_PRODUCTION_ID_1) & 0xffff);
126 printk("OMAP32_ID_0: 0x%08x\n", omap_readl(OMAP32_ID_0));
127 printk("OMAP32_ID_1: 0x%08x\n", omap_readl(OMAP32_ID_1));
128 printk("JTAG_ID: 0x%04x DIE_REV: %i\n", jtag_id, die_rev);
129#endif
130
131 system_serial_high = omap_readl(OMAP_DIE_ID_0);
132 system_serial_low = omap_readl(OMAP_DIE_ID_1);
133
134 /* First check only the major version in a safe way */
135 for (i = 0; i < ARRAY_SIZE(omap_ids); i++) {
136 if (jtag_id == (omap_ids[i].jtag_id)) {
137 system_rev = omap_ids[i].type;
138 break;
139 }
140 }
141
142 /* Check if we can find the die revision */
143 for (i = 0; i < ARRAY_SIZE(omap_ids); i++) {
144 if (jtag_id == omap_ids[i].jtag_id && die_rev == omap_ids[i].die_rev) {
145 system_rev = omap_ids[i].type;
146 break;
147 }
148 }
149
150 /* Finally check also the omap_id */
151 for (i = 0; i < ARRAY_SIZE(omap_ids); i++) {
152 if (jtag_id == omap_ids[i].jtag_id
153 && die_rev == omap_ids[i].die_rev
154 && omap_id == omap_ids[i].omap_id) {
155 system_rev = omap_ids[i].type;
156 break;
157 }
158 }
159
160 /* Add the cpu class info (7xx, 15xx, 16xx, 24xx) */
161 cpu_type = system_rev >> 24;
162
163 switch (cpu_type) {
164 case 0x07:
165 system_rev |= 0x07;
166 break;
167 case 0x15:
168 system_rev |= 0x15;
169 break;
170 case 0x16:
171 case 0x17:
172 system_rev |= 0x16;
173 break;
174 case 0x24:
175 system_rev |= 0x24;
176 break;
177 default:
178 printk("Unknown OMAP cpu type: 0x%02x\n", cpu_type);
179 }
180
181 printk("OMAP%04x", system_rev >> 16);
182 if ((system_rev >> 8) & 0xff)
183 printk("%x", (system_rev >> 8) & 0xff);
184 printk(" revision %i handled as %02xxx id: %08x%08x\n",
185 die_rev, system_rev & 0xff, system_serial_low,
186 system_serial_high);
187}
188
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
new file mode 100644
index 000000000000..207df0fe934d
--- /dev/null
+++ b/arch/arm/mach-omap1/io.c
@@ -0,0 +1,115 @@
1/*
2 * linux/arch/arm/mach-omap1/io.c
3 *
4 * OMAP1 I/O mapping code
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#include <linux/config.h>
12#include <linux/module.h>
13#include <linux/kernel.h>
14#include <linux/init.h>
15
16#include <asm/mach/map.h>
17#include <asm/io.h>
18#include <asm/arch/tc.h>
19
20extern int clk_init(void);
21extern void omap_check_revision(void);
22
23/*
24 * The machine specific code may provide the extra mapping besides the
25 * default mapping provided here.
26 */
27static struct map_desc omap_io_desc[] __initdata = {
28 { IO_VIRT, IO_PHYS, IO_SIZE, MT_DEVICE },
29};
30
31#ifdef CONFIG_ARCH_OMAP730
32static struct map_desc omap730_io_desc[] __initdata = {
33 { OMAP730_DSP_BASE, OMAP730_DSP_START, OMAP730_DSP_SIZE, MT_DEVICE },
34 { OMAP730_DSPREG_BASE, OMAP730_DSPREG_START, OMAP730_DSPREG_SIZE, MT_DEVICE },
35 { OMAP730_SRAM_BASE, OMAP730_SRAM_START, OMAP730_SRAM_SIZE, MT_DEVICE }
36};
37#endif
38
39#ifdef CONFIG_ARCH_OMAP1510
40static struct map_desc omap1510_io_desc[] __initdata = {
41 { OMAP1510_DSP_BASE, OMAP1510_DSP_START, OMAP1510_DSP_SIZE, MT_DEVICE },
42 { OMAP1510_DSPREG_BASE, OMAP1510_DSPREG_START, OMAP1510_DSPREG_SIZE, MT_DEVICE },
43 { OMAP1510_SRAM_BASE, OMAP1510_SRAM_START, OMAP1510_SRAM_SIZE, MT_DEVICE }
44};
45#endif
46
47#if defined(CONFIG_ARCH_OMAP16XX)
48static struct map_desc omap1610_io_desc[] __initdata = {
49 { OMAP16XX_DSP_BASE, OMAP16XX_DSP_START, OMAP16XX_DSP_SIZE, MT_DEVICE },
50 { OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_START, OMAP16XX_DSPREG_SIZE, MT_DEVICE },
51 { OMAP16XX_SRAM_BASE, OMAP16XX_SRAM_START, OMAP1610_SRAM_SIZE, MT_DEVICE }
52};
53
54static struct map_desc omap5912_io_desc[] __initdata = {
55 { OMAP16XX_DSP_BASE, OMAP16XX_DSP_START, OMAP16XX_DSP_SIZE, MT_DEVICE },
56 { OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_START, OMAP16XX_DSPREG_SIZE, MT_DEVICE },
57/*
58 * The OMAP5912 has 250kByte internal SRAM. Because the mapping is baseed on page
59 * size (4kByte), it seems that the last 2kByte (=0x800) of the 250kByte are not mapped.
60 * Add additional 2kByte (0x800) so that the last page is mapped and the last 2kByte
61 * can be used.
62 */
63 { OMAP16XX_SRAM_BASE, OMAP16XX_SRAM_START, OMAP5912_SRAM_SIZE + 0x800, MT_DEVICE }
64};
65#endif
66
67static int initialized = 0;
68
69static void __init _omap_map_io(void)
70{
71 initialized = 1;
72
73 /* We have to initialize the IO space mapping before we can run
74 * cpu_is_omapxxx() macros. */
75 iotable_init(omap_io_desc, ARRAY_SIZE(omap_io_desc));
76 omap_check_revision();
77
78#ifdef CONFIG_ARCH_OMAP730
79 if (cpu_is_omap730()) {
80 iotable_init(omap730_io_desc, ARRAY_SIZE(omap730_io_desc));
81 }
82#endif
83#ifdef CONFIG_ARCH_OMAP1510
84 if (cpu_is_omap1510()) {
85 iotable_init(omap1510_io_desc, ARRAY_SIZE(omap1510_io_desc));
86 }
87#endif
88#if defined(CONFIG_ARCH_OMAP16XX)
89 if (cpu_is_omap1610() || cpu_is_omap1710()) {
90 iotable_init(omap1610_io_desc, ARRAY_SIZE(omap1610_io_desc));
91 }
92 if (cpu_is_omap5912()) {
93 iotable_init(omap5912_io_desc, ARRAY_SIZE(omap5912_io_desc));
94 }
95#endif
96
97 /* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort
98 * on a Posted Write in the TIPB Bridge".
99 */
100 omap_writew(0x0, MPU_PUBLIC_TIPB_CNTL);
101 omap_writew(0x0, MPU_PRIVATE_TIPB_CNTL);
102
103 /* Must init clocks early to assure that timer interrupt works
104 */
105 clk_init();
106}
107
108/*
109 * This should only get called from board specific init
110 */
111void omap_map_common_io(void)
112{
113 if (!initialized)
114 _omap_map_io();
115}
diff --git a/arch/arm/mach-omap/irq.c b/arch/arm/mach-omap1/irq.c
index f01c99266a86..a11b6d807352 100644
--- a/arch/arm/mach-omap/irq.c
+++ b/arch/arm/mach-omap1/irq.c
@@ -56,6 +56,7 @@
56struct omap_irq_bank { 56struct omap_irq_bank {
57 unsigned long base_reg; 57 unsigned long base_reg;
58 unsigned long trigger_map; 58 unsigned long trigger_map;
59 unsigned long wake_enable;
59}; 60};
60 61
61static unsigned int irq_bank_count = 0; 62static unsigned int irq_bank_count = 0;
@@ -105,6 +106,19 @@ static void omap_mask_ack_irq(unsigned int irq)
105 omap_ack_irq(irq); 106 omap_ack_irq(irq);
106} 107}
107 108
109static int omap_wake_irq(unsigned int irq, unsigned int enable)
110{
111 int bank = IRQ_BANK(irq);
112
113 if (enable)
114 irq_banks[bank].wake_enable |= IRQ_BIT(irq);
115 else
116 irq_banks[bank].wake_enable &= ~IRQ_BIT(irq);
117
118 return 0;
119}
120
121
108/* 122/*
109 * Allows tuning the IRQ type and priority 123 * Allows tuning the IRQ type and priority
110 * 124 *
@@ -145,7 +159,7 @@ static struct omap_irq_bank omap1510_irq_banks[] = {
145static struct omap_irq_bank omap1610_irq_banks[] = { 159static struct omap_irq_bank omap1610_irq_banks[] = {
146 { .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3fefe8f }, 160 { .base_reg = OMAP_IH1_BASE, .trigger_map = 0xb3fefe8f },
147 { .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfdb7c1fd }, 161 { .base_reg = OMAP_IH2_BASE, .trigger_map = 0xfdb7c1fd },
148 { .base_reg = OMAP_IH2_BASE + 0x100, .trigger_map = 0xfffff7ff }, 162 { .base_reg = OMAP_IH2_BASE + 0x100, .trigger_map = 0xffffb7ff },
149 { .base_reg = OMAP_IH2_BASE + 0x200, .trigger_map = 0xffffffff }, 163 { .base_reg = OMAP_IH2_BASE + 0x200, .trigger_map = 0xffffffff },
150}; 164};
151#endif 165#endif
@@ -154,6 +168,7 @@ static struct irqchip omap_irq_chip = {
154 .ack = omap_mask_ack_irq, 168 .ack = omap_mask_ack_irq,
155 .mask = omap_mask_irq, 169 .mask = omap_mask_irq,
156 .unmask = omap_unmask_irq, 170 .unmask = omap_unmask_irq,
171 .wake = omap_wake_irq,
157}; 172};
158 173
159void __init omap_init_irq(void) 174void __init omap_init_irq(void)
diff --git a/arch/arm/mach-omap/leds-h2p2-debug.c b/arch/arm/mach-omap1/leds-h2p2-debug.c
index 6e98290cca5c..ec0d8285f243 100644
--- a/arch/arm/mach-omap/leds-h2p2-debug.c
+++ b/arch/arm/mach-omap1/leds-h2p2-debug.c
@@ -13,7 +13,6 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/kernel_stat.h> 14#include <linux/kernel_stat.h>
15#include <linux/sched.h> 15#include <linux/sched.h>
16#include <linux/version.h>
17 16
18#include <asm/io.h> 17#include <asm/io.h>
19#include <asm/hardware.h> 18#include <asm/hardware.h>
diff --git a/arch/arm/mach-omap/leds-innovator.c b/arch/arm/mach-omap1/leds-innovator.c
index 8043b7d0f66e..8043b7d0f66e 100644
--- a/arch/arm/mach-omap/leds-innovator.c
+++ b/arch/arm/mach-omap1/leds-innovator.c
diff --git a/arch/arm/mach-omap/leds-osk.c b/arch/arm/mach-omap1/leds-osk.c
index f5177f430793..4a0e8b9d4fc3 100644
--- a/arch/arm/mach-omap/leds-osk.c
+++ b/arch/arm/mach-omap1/leds-osk.c
@@ -129,14 +129,11 @@ void osk_leds_event(led_event_t evt)
129 129
130#ifdef CONFIG_FB_OMAP 130#ifdef CONFIG_FB_OMAP
131 131
132#ifdef CONFIG_LEDS_TIMER
133 case led_timer: 132 case led_timer:
134 hw_led_state ^= TIMER_LED; 133 hw_led_state ^= TIMER_LED;
135 mistral_setled(); 134 mistral_setled();
136 break; 135 break;
137#endif
138 136
139#ifdef CONFIG_LEDS_CPU
140 case led_idle_start: 137 case led_idle_start:
141 hw_led_state |= IDLE_LED; 138 hw_led_state |= IDLE_LED;
142 mistral_setled(); 139 mistral_setled();
@@ -146,7 +143,6 @@ void osk_leds_event(led_event_t evt)
146 hw_led_state &= ~IDLE_LED; 143 hw_led_state &= ~IDLE_LED;
147 mistral_setled(); 144 mistral_setled();
148 break; 145 break;
149#endif
150 146
151#endif /* CONFIG_FB_OMAP */ 147#endif /* CONFIG_FB_OMAP */
152 148
diff --git a/arch/arm/mach-omap/leds.c b/arch/arm/mach-omap1/leds.c
index 8ab21fe98e1b..8ab21fe98e1b 100644
--- a/arch/arm/mach-omap/leds.c
+++ b/arch/arm/mach-omap1/leds.c
diff --git a/arch/arm/mach-omap/leds.h b/arch/arm/mach-omap1/leds.h
index a1e9fedc376c..a1e9fedc376c 100644
--- a/arch/arm/mach-omap/leds.h
+++ b/arch/arm/mach-omap1/leds.h
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
new file mode 100644
index 000000000000..214e5d17c8b5
--- /dev/null
+++ b/arch/arm/mach-omap1/serial.c
@@ -0,0 +1,200 @@
1/*
2 * linux/arch/arm/mach-omap1/id.c
3 *
4 * OMAP1 CPU identification code
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#include <linux/config.h>
12#include <linux/module.h>
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/delay.h>
16#include <linux/serial.h>
17#include <linux/tty.h>
18#include <linux/serial_8250.h>
19#include <linux/serial_reg.h>
20
21#include <asm/io.h>
22#include <asm/mach-types.h>
23#include <asm/hardware/clock.h>
24
25#include <asm/arch/board.h>
26#include <asm/arch/mux.h>
27#include <asm/arch/fpga.h>
28
29static struct clk * uart1_ck = NULL;
30static struct clk * uart2_ck = NULL;
31static struct clk * uart3_ck = NULL;
32
33static inline unsigned int omap_serial_in(struct plat_serial8250_port *up,
34 int offset)
35{
36 offset <<= up->regshift;
37 return (unsigned int)__raw_readb(up->membase + offset);
38}
39
40static inline void omap_serial_outp(struct plat_serial8250_port *p, int offset,
41 int value)
42{
43 offset <<= p->regshift;
44 __raw_writeb(value, p->membase + offset);
45}
46
47/*
48 * Internal UARTs need to be initialized for the 8250 autoconfig to work
49 * properly. Note that the TX watermark initialization may not be needed
50 * once the 8250.c watermark handling code is merged.
51 */
52static void __init omap_serial_reset(struct plat_serial8250_port *p)
53{
54 omap_serial_outp(p, UART_OMAP_MDR1, 0x07); /* disable UART */
55 omap_serial_outp(p, UART_OMAP_SCR, 0x08); /* TX watermark */
56 omap_serial_outp(p, UART_OMAP_MDR1, 0x00); /* enable UART */
57
58 if (!cpu_is_omap1510()) {
59 omap_serial_outp(p, UART_OMAP_SYSC, 0x01);
60 while (!(omap_serial_in(p, UART_OMAP_SYSC) & 0x01));
61 }
62}
63
64static struct plat_serial8250_port serial_platform_data[] = {
65 {
66 .membase = (char*)IO_ADDRESS(OMAP_UART1_BASE),
67 .mapbase = (unsigned long)OMAP_UART1_BASE,
68 .irq = INT_UART1,
69 .flags = UPF_BOOT_AUTOCONF,
70 .iotype = UPIO_MEM,
71 .regshift = 2,
72 .uartclk = OMAP16XX_BASE_BAUD * 16,
73 },
74 {
75 .membase = (char*)IO_ADDRESS(OMAP_UART2_BASE),
76 .mapbase = (unsigned long)OMAP_UART2_BASE,
77 .irq = INT_UART2,
78 .flags = UPF_BOOT_AUTOCONF,
79 .iotype = UPIO_MEM,
80 .regshift = 2,
81 .uartclk = OMAP16XX_BASE_BAUD * 16,
82 },
83 {
84 .membase = (char*)IO_ADDRESS(OMAP_UART3_BASE),
85 .mapbase = (unsigned long)OMAP_UART3_BASE,
86 .irq = INT_UART3,
87 .flags = UPF_BOOT_AUTOCONF,
88 .iotype = UPIO_MEM,
89 .regshift = 2,
90 .uartclk = OMAP16XX_BASE_BAUD * 16,
91 },
92 { },
93};
94
95static struct platform_device serial_device = {
96 .name = "serial8250",
97 .id = 0,
98 .dev = {
99 .platform_data = serial_platform_data,
100 },
101};
102
103/*
104 * Note that on Innovator-1510 UART2 pins conflict with USB2.
105 * By default UART2 does not work on Innovator-1510 if you have
106 * USB OHCI enabled. To use UART2, you must disable USB2 first.
107 */
108void __init omap_serial_init(int ports[OMAP_MAX_NR_PORTS])
109{
110 int i;
111
112 if (cpu_is_omap730()) {
113 serial_platform_data[0].regshift = 0;
114 serial_platform_data[1].regshift = 0;
115 serial_platform_data[0].irq = INT_730_UART_MODEM_1;
116 serial_platform_data[1].irq = INT_730_UART_MODEM_IRDA_2;
117 }
118
119 if (cpu_is_omap1510()) {
120 serial_platform_data[0].uartclk = OMAP1510_BASE_BAUD * 16;
121 serial_platform_data[1].uartclk = OMAP1510_BASE_BAUD * 16;
122 serial_platform_data[2].uartclk = OMAP1510_BASE_BAUD * 16;
123 }
124
125 for (i = 0; i < OMAP_MAX_NR_PORTS; i++) {
126 unsigned char reg;
127
128 if (ports[i] == 0) {
129 serial_platform_data[i].membase = NULL;
130 serial_platform_data[i].mapbase = 0;
131 continue;
132 }
133
134 switch (i) {
135 case 0:
136 uart1_ck = clk_get(NULL, "uart1_ck");
137 if (IS_ERR(uart1_ck))
138 printk("Could not get uart1_ck\n");
139 else {
140 clk_use(uart1_ck);
141 if (cpu_is_omap1510())
142 clk_set_rate(uart1_ck, 12000000);
143 }
144 if (cpu_is_omap1510()) {
145 omap_cfg_reg(UART1_TX);
146 omap_cfg_reg(UART1_RTS);
147 if (machine_is_omap_innovator()) {
148 reg = fpga_read(OMAP1510_FPGA_POWER);
149 reg |= OMAP1510_FPGA_PCR_COM1_EN;
150 fpga_write(reg, OMAP1510_FPGA_POWER);
151 udelay(10);
152 }
153 }
154 break;
155 case 1:
156 uart2_ck = clk_get(NULL, "uart2_ck");
157 if (IS_ERR(uart2_ck))
158 printk("Could not get uart2_ck\n");
159 else {
160 clk_use(uart2_ck);
161 if (cpu_is_omap1510())
162 clk_set_rate(uart2_ck, 12000000);
163 else
164 clk_set_rate(uart2_ck, 48000000);
165 }
166 if (cpu_is_omap1510()) {
167 omap_cfg_reg(UART2_TX);
168 omap_cfg_reg(UART2_RTS);
169 if (machine_is_omap_innovator()) {
170 reg = fpga_read(OMAP1510_FPGA_POWER);
171 reg |= OMAP1510_FPGA_PCR_COM2_EN;
172 fpga_write(reg, OMAP1510_FPGA_POWER);
173 udelay(10);
174 }
175 }
176 break;
177 case 2:
178 uart3_ck = clk_get(NULL, "uart3_ck");
179 if (IS_ERR(uart3_ck))
180 printk("Could not get uart3_ck\n");
181 else {
182 clk_use(uart3_ck);
183 if (cpu_is_omap1510())
184 clk_set_rate(uart3_ck, 12000000);
185 }
186 if (cpu_is_omap1510()) {
187 omap_cfg_reg(UART3_TX);
188 omap_cfg_reg(UART3_RX);
189 }
190 break;
191 }
192 omap_serial_reset(&serial_platform_data[i]);
193 }
194}
195
196static int __init omap_init(void)
197{
198 return platform_device_register(&serial_device);
199}
200arch_initcall(omap_init);
diff --git a/arch/arm/mach-omap/time.c b/arch/arm/mach-omap1/time.c
index 4205fdcb632c..d540539c9bbb 100644
--- a/arch/arm/mach-omap/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -1,10 +1,10 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/time.c 2 * linux/arch/arm/mach-omap1/time.c
3 * 3 *
4 * OMAP Timers 4 * OMAP Timers
5 * 5 *
6 * Copyright (C) 2004 Nokia Corporation 6 * Copyright (C) 2004 Nokia Corporation
7 * Partial timer rewrite and additional VST timer support by 7 * Partial timer rewrite and additional dynamic tick timer support by
8 * Tony Lindgen <tony@atomide.com> and 8 * Tony Lindgen <tony@atomide.com> and
9 * Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com> 9 * Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
10 * 10 *
@@ -58,17 +58,9 @@ struct sys_timer omap_timer;
58 * MPU timer 58 * MPU timer
59 * --------------------------------------------------------------------------- 59 * ---------------------------------------------------------------------------
60 */ 60 */
61#define OMAP_MPU_TIMER1_BASE (0xfffec500)
62#define OMAP_MPU_TIMER2_BASE (0xfffec600)
63#define OMAP_MPU_TIMER3_BASE (0xfffec700)
64#define OMAP_MPU_TIMER_BASE OMAP_MPU_TIMER1_BASE 61#define OMAP_MPU_TIMER_BASE OMAP_MPU_TIMER1_BASE
65#define OMAP_MPU_TIMER_OFFSET 0x100 62#define OMAP_MPU_TIMER_OFFSET 0x100
66 63
67#define MPU_TIMER_FREE (1 << 6)
68#define MPU_TIMER_CLOCK_ENABLE (1 << 5)
69#define MPU_TIMER_AR (1 << 1)
70#define MPU_TIMER_ST (1 << 0)
71
72/* cycles to nsec conversions taken from arch/i386/kernel/timers/timer_tsc.c, 64/* cycles to nsec conversions taken from arch/i386/kernel/timers/timer_tsc.c,
73 * converted to use kHz by Kevin Hilman */ 65 * converted to use kHz by Kevin Hilman */
74/* convert from cycles(64bits) => nanoseconds (64bits) 66/* convert from cycles(64bits) => nanoseconds (64bits)
@@ -188,8 +180,8 @@ static irqreturn_t omap_mpu_timer_interrupt(int irq, void *dev_id,
188 180
189static struct irqaction omap_mpu_timer_irq = { 181static struct irqaction omap_mpu_timer_irq = {
190 .name = "mpu timer", 182 .name = "mpu timer",
191 .flags = SA_INTERRUPT, 183 .flags = SA_INTERRUPT | SA_TIMER,
192 .handler = omap_mpu_timer_interrupt 184 .handler = omap_mpu_timer_interrupt,
193}; 185};
194 186
195static unsigned long omap_mpu_timer1_overflows; 187static unsigned long omap_mpu_timer1_overflows;
@@ -203,7 +195,7 @@ static irqreturn_t omap_mpu_timer1_interrupt(int irq, void *dev_id,
203static struct irqaction omap_mpu_timer1_irq = { 195static struct irqaction omap_mpu_timer1_irq = {
204 .name = "mpu timer1 overflow", 196 .name = "mpu timer1 overflow",
205 .flags = SA_INTERRUPT, 197 .flags = SA_INTERRUPT,
206 .handler = omap_mpu_timer1_interrupt 198 .handler = omap_mpu_timer1_interrupt,
207}; 199};
208 200
209static __init void omap_init_mpu_timer(void) 201static __init void omap_init_mpu_timer(void)
@@ -255,13 +247,19 @@ unsigned long long sched_clock(void)
255#define OMAP_32K_TIMER_TCR 0x04 247#define OMAP_32K_TIMER_TCR 0x04
256 248
257#define OMAP_32K_TICKS_PER_HZ (32768 / HZ) 249#define OMAP_32K_TICKS_PER_HZ (32768 / HZ)
250#if (32768 % HZ) != 0
251/* We cannot ignore modulo.
252 * Potential error can be as high as several percent.
253 */
254#define OMAP_32K_TICK_MODULO (32768 % HZ)
255static unsigned modulo_count = 0; /* Counts 1/HZ units */
256#endif
258 257
259/* 258/*
260 * TRM says 1 / HZ = ( TVR + 1) / 32768, so TRV = (32768 / HZ) - 1 259 * TRM says 1 / HZ = ( TVR + 1) / 32768, so TRV = (32768 / HZ) - 1
261 * so with HZ = 100, TVR = 327.68. 260 * so with HZ = 100, TVR = 327.68.
262 */ 261 */
263#define OMAP_32K_TIMER_TICK_PERIOD ((32768 / HZ) - 1) 262#define OMAP_32K_TIMER_TICK_PERIOD ((32768 / HZ) - 1)
264#define MAX_SKIP_JIFFIES 25
265#define TIMER_32K_SYNCHRONIZED 0xfffbc410 263#define TIMER_32K_SYNCHRONIZED 0xfffbc410
266 264
267#define JIFFIES_TO_HW_TICKS(nr_jiffies, clock_rate) \ 265#define JIFFIES_TO_HW_TICKS(nr_jiffies, clock_rate) \
@@ -332,6 +330,19 @@ static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id,
332 now = omap_32k_sync_timer_read(); 330 now = omap_32k_sync_timer_read();
333 331
334 while (now - omap_32k_last_tick >= OMAP_32K_TICKS_PER_HZ) { 332 while (now - omap_32k_last_tick >= OMAP_32K_TICKS_PER_HZ) {
333#ifdef OMAP_32K_TICK_MODULO
334 /* Modulo addition may put omap_32k_last_tick ahead of now
335 * and cause unwanted repetition of the while loop.
336 */
337 if (unlikely(now - omap_32k_last_tick == ~0))
338 break;
339
340 modulo_count += OMAP_32K_TICK_MODULO;
341 if (modulo_count > HZ) {
342 ++omap_32k_last_tick;
343 modulo_count -= HZ;
344 }
345#endif
335 omap_32k_last_tick += OMAP_32K_TICKS_PER_HZ; 346 omap_32k_last_tick += OMAP_32K_TICKS_PER_HZ;
336 timer_tick(regs); 347 timer_tick(regs);
337 } 348 }
@@ -347,14 +358,55 @@ static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id,
347 return IRQ_HANDLED; 358 return IRQ_HANDLED;
348} 359}
349 360
361#ifdef CONFIG_NO_IDLE_HZ
362/*
363 * Programs the next timer interrupt needed. Called when dynamic tick is
364 * enabled, and to reprogram the ticks to skip from pm_idle. Note that
365 * we can keep the timer continuous, and don't need to set it to run in
366 * one-shot mode. This is because the timer will get reprogrammed again
367 * after next interrupt.
368 */
369void omap_32k_timer_reprogram(unsigned long next_tick)
370{
371 omap_32k_timer_start(JIFFIES_TO_HW_TICKS(next_tick, 32768) + 1);
372}
373
374static struct irqaction omap_32k_timer_irq;
375extern struct timer_update_handler timer_update;
376
377static int omap_32k_timer_enable_dyn_tick(void)
378{
379 /* No need to reprogram timer, just use the next interrupt */
380 return 0;
381}
382
383static int omap_32k_timer_disable_dyn_tick(void)
384{
385 omap_32k_timer_start(OMAP_32K_TIMER_TICK_PERIOD);
386 return 0;
387}
388
389static struct dyn_tick_timer omap_dyn_tick_timer = {
390 .enable = omap_32k_timer_enable_dyn_tick,
391 .disable = omap_32k_timer_disable_dyn_tick,
392 .reprogram = omap_32k_timer_reprogram,
393 .handler = omap_32k_timer_interrupt,
394};
395#endif /* CONFIG_NO_IDLE_HZ */
396
350static struct irqaction omap_32k_timer_irq = { 397static struct irqaction omap_32k_timer_irq = {
351 .name = "32KHz timer", 398 .name = "32KHz timer",
352 .flags = SA_INTERRUPT, 399 .flags = SA_INTERRUPT | SA_TIMER,
353 .handler = omap_32k_timer_interrupt 400 .handler = omap_32k_timer_interrupt,
354}; 401};
355 402
356static __init void omap_init_32k_timer(void) 403static __init void omap_init_32k_timer(void)
357{ 404{
405
406#ifdef CONFIG_NO_IDLE_HZ
407 omap_timer.dyn_tick = &omap_dyn_tick_timer;
408#endif
409
358 setup_irq(INT_OS_TIMER, &omap_32k_timer_irq); 410 setup_irq(INT_OS_TIMER, &omap_32k_timer_irq);
359 omap_timer.offset = omap_32k_timer_gettimeoffset; 411 omap_timer.offset = omap_32k_timer_gettimeoffset;
360 omap_32k_last_tick = omap_32k_sync_timer_read(); 412 omap_32k_last_tick = omap_32k_sync_timer_read();
@@ -367,7 +419,7 @@ static __init void omap_init_32k_timer(void)
367 * Timer initialization 419 * Timer initialization
368 * --------------------------------------------------------------------------- 420 * ---------------------------------------------------------------------------
369 */ 421 */
370void __init omap_timer_init(void) 422static void __init omap_timer_init(void)
371{ 423{
372#if defined(CONFIG_OMAP_MPU_TIMER) 424#if defined(CONFIG_OMAP_MPU_TIMER)
373 omap_init_mpu_timer(); 425 omap_init_mpu_timer();
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index c4e6d2523585..efc2f657184e 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -24,3 +24,7 @@ obj-$(CONFIG_LEDS) += $(led-y)
24 24
25# Misc features 25# Misc features
26obj-$(CONFIG_PM) += pm.o sleep.o 26obj-$(CONFIG_PM) += pm.o sleep.o
27
28ifeq ($(CONFIG_PXA27x),y)
29obj-$(CONFIG_PM) += standby.o
30endif
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index f691cf77d390..86b862f56e7e 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -287,34 +287,40 @@ static void __init corgi_map_io(void)
287 287
288#ifdef CONFIG_MACH_CORGI 288#ifdef CONFIG_MACH_CORGI
289MACHINE_START(CORGI, "SHARP Corgi") 289MACHINE_START(CORGI, "SHARP Corgi")
290 BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) 290 .phys_ram = 0xa0000000,
291 FIXUP(fixup_corgi) 291 .phys_io = 0x40000000,
292 MAPIO(corgi_map_io) 292 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
293 INITIRQ(corgi_init_irq) 293 .fixup = fixup_corgi,
294 .init_machine = corgi_init, 294 .map_io = corgi_map_io,
295 .timer = &pxa_timer, 295 .init_irq = corgi_init_irq,
296 .init_machine = corgi_init,
297 .timer = &pxa_timer,
296MACHINE_END 298MACHINE_END
297#endif 299#endif
298 300
299#ifdef CONFIG_MACH_SHEPHERD 301#ifdef CONFIG_MACH_SHEPHERD
300MACHINE_START(SHEPHERD, "SHARP Shepherd") 302MACHINE_START(SHEPHERD, "SHARP Shepherd")
301 BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) 303 .phys_ram = 0xa0000000,
302 FIXUP(fixup_corgi) 304 .phys_io = 0x40000000,
303 MAPIO(corgi_map_io) 305 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
304 INITIRQ(corgi_init_irq) 306 .fixup = fixup_corgi,
305 .init_machine = corgi_init, 307 .map_io = corgi_map_io,
306 .timer = &pxa_timer, 308 .init_irq = corgi_init_irq,
309 .init_machine = corgi_init,
310 .timer = &pxa_timer,
307MACHINE_END 311MACHINE_END
308#endif 312#endif
309 313
310#ifdef CONFIG_MACH_HUSKY 314#ifdef CONFIG_MACH_HUSKY
311MACHINE_START(HUSKY, "SHARP Husky") 315MACHINE_START(HUSKY, "SHARP Husky")
312 BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) 316 .phys_ram = 0xa0000000,
313 FIXUP(fixup_corgi) 317 .phys_io = 0x40000000,
314 MAPIO(corgi_map_io) 318 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
315 INITIRQ(corgi_init_irq) 319 .fixup = fixup_corgi,
316 .init_machine = corgi_init, 320 .map_io = corgi_map_io,
317 .timer = &pxa_timer, 321 .init_irq = corgi_init_irq,
322 .init_machine = corgi_init,
323 .timer = &pxa_timer,
318MACHINE_END 324MACHINE_END
319#endif 325#endif
320 326
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index c5a66bf4d3d5..386e107b53cc 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -181,10 +181,12 @@ static void __init idp_map_io(void)
181 181
182 182
183MACHINE_START(PXA_IDP, "Vibren PXA255 IDP") 183MACHINE_START(PXA_IDP, "Vibren PXA255 IDP")
184 MAINTAINER("Vibren Technologies") 184 /* Maintainer: Vibren Technologies */
185 BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) 185 .phys_ram = 0xa0000000,
186 MAPIO(idp_map_io) 186 .phys_io = 0x40000000,
187 INITIRQ(idp_init_irq) 187 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
188 .map_io = idp_map_io,
189 .init_irq = idp_init_irq,
188 .timer = &pxa_timer, 190 .timer = &pxa_timer,
189 INIT_MACHINE(idp_init) 191 .init_machine = idp_init,
190MACHINE_END 192MACHINE_END
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index f2c9e0d2b24b..6309853b59be 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -268,10 +268,12 @@ static void __init lubbock_map_io(void)
268} 268}
269 269
270MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform (aka Lubbock)") 270MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform (aka Lubbock)")
271 MAINTAINER("MontaVista Software Inc.") 271 /* Maintainer: MontaVista Software Inc. */
272 BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) 272 .phys_ram = 0xa0000000,
273 MAPIO(lubbock_map_io) 273 .phys_io = 0x40000000,
274 INITIRQ(lubbock_init_irq) 274 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
275 .map_io = lubbock_map_io,
276 .init_irq = lubbock_init_irq,
275 .timer = &pxa_timer, 277 .timer = &pxa_timer,
276 INIT_MACHINE(lubbock_init) 278 .init_machine = lubbock_init,
277MACHINE_END 279MACHINE_END
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index 9896afca751f..827b7b5a5be8 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -345,10 +345,12 @@ static void __init mainstone_map_io(void)
345} 345}
346 346
347MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)") 347MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)")
348 MAINTAINER("MontaVista Software Inc.") 348 /* Maintainer: MontaVista Software Inc. */
349 BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) 349 .phys_ram = 0xa0000000,
350 MAPIO(mainstone_map_io) 350 .phys_io = 0x40000000,
351 INITIRQ(mainstone_init_irq) 351 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
352 .map_io = mainstone_map_io,
353 .init_irq = mainstone_init_irq,
352 .timer = &pxa_timer, 354 .timer = &pxa_timer,
353 INIT_MACHINE(mainstone_init) 355 .init_machine = mainstone_init,
354MACHINE_END 356MACHINE_END
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index b6c746ea3830..0e4f6fab100a 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -180,10 +180,12 @@ static void __init poodle_map_io(void)
180} 180}
181 181
182MACHINE_START(POODLE, "SHARP Poodle") 182MACHINE_START(POODLE, "SHARP Poodle")
183 BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000)) 183 .phys_ram = 0xa0000000,
184 FIXUP(fixup_poodle) 184 .phys_io = 0x40000000,
185 MAPIO(poodle_map_io) 185 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
186 INITIRQ(pxa_init_irq) 186 .fixup = fixup_poodle,
187 .timer = &pxa_timer, 187 .map_io = poodle_map_io,
188 .init_machine = poodle_init, 188 .init_irq = pxa_init_irq,
189 .timer = &pxa_timer,
190 .init_machine = poodle_init,
189MACHINE_END 191MACHINE_END
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index 893964fb9659..9a791b07118d 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -126,6 +126,7 @@ int pxa_cpu_pm_prepare(suspend_state_t state)
126{ 126{
127 switch (state) { 127 switch (state) {
128 case PM_SUSPEND_MEM: 128 case PM_SUSPEND_MEM:
129 case PM_SUSPEND_STANDBY:
129 return 0; 130 return 0;
130 default: 131 default:
131 return -EINVAL; 132 return -EINVAL;
@@ -138,7 +139,10 @@ void pxa_cpu_pm_enter(suspend_state_t state)
138 extern void pxa_cpu_suspend(unsigned int); 139 extern void pxa_cpu_suspend(unsigned int);
139 extern void pxa_cpu_resume(void); 140 extern void pxa_cpu_resume(void);
140 141
141 CKEN = CKEN22_MEMC | CKEN9_OSTIMER; 142 if (state == PM_SUSPEND_STANDBY)
143 CKEN = CKEN22_MEMC | CKEN9_OSTIMER | CKEN16_LCD |CKEN0_PWM0;
144 else
145 CKEN = CKEN22_MEMC | CKEN9_OSTIMER;
142 146
143 /* ensure voltage-change sequencer not initiated, which hangs */ 147 /* ensure voltage-change sequencer not initiated, which hangs */
144 PCFR &= ~PCFR_FVC; 148 PCFR &= ~PCFR_FVC;
@@ -147,6 +151,9 @@ void pxa_cpu_pm_enter(suspend_state_t state)
147 PEDR = 0xDF12FE1B; 151 PEDR = 0xDF12FE1B;
148 152
149 switch (state) { 153 switch (state) {
154 case PM_SUSPEND_STANDBY:
155 pxa_cpu_standby();
156 break;
150 case PM_SUSPEND_MEM: 157 case PM_SUSPEND_MEM:
151 /* set resume return address */ 158 /* set resume return address */
152 PSPR = virt_to_phys(pxa_cpu_resume); 159 PSPR = virt_to_phys(pxa_cpu_resume);
diff --git a/arch/arm/mach-pxa/standby.S b/arch/arm/mach-pxa/standby.S
new file mode 100644
index 000000000000..8a3f27b76784
--- /dev/null
+++ b/arch/arm/mach-pxa/standby.S
@@ -0,0 +1,32 @@
1/*
2 * PXA27x standby mode
3 *
4 * Author: David Burrage
5 *
6 * 2005 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11
12#include <linux/config.h>
13#include <linux/linkage.h>
14#include <asm/assembler.h>
15#include <asm/hardware.h>
16
17#include <asm/arch/pxa-regs.h>
18
19 .text
20
21ENTRY(pxa_cpu_standby)
22 ldr r0, =PSSR
23 mov r1, #(PSSR_PH | PSSR_STS)
24 mov r2, #2
25 mov r3, #UNCACHED_PHYS_0 @ Read mem context in.
26 ldr ip, [r3]
27 b 1f
28
29 .align 5
301: mcr p14, 0, r2, c7, c0, 0 @ put the system into Standby
31 str r1, [r0] @ make sure PSSR_PH/STS are clear
32 mov pc, lr
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index 473fb6173f72..6e5202154f91 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -105,8 +105,8 @@ pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
105 105
106static struct irqaction pxa_timer_irq = { 106static struct irqaction pxa_timer_irq = {
107 .name = "PXA Timer Tick", 107 .name = "PXA Timer Tick",
108 .flags = SA_INTERRUPT, 108 .flags = SA_INTERRUPT | SA_TIMER,
109 .handler = pxa_timer_interrupt 109 .handler = pxa_timer_interrupt,
110}; 110};
111 111
112static void __init pxa_timer_init(void) 112static void __init pxa_timer_init(void)
diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c
index 815c53225cd8..a10268618f74 100644
--- a/arch/arm/mach-rpc/riscpc.c
+++ b/arch/arm/mach-rpc/riscpc.c
@@ -32,10 +32,7 @@
32 32
33extern void rpc_init_irq(void); 33extern void rpc_init_irq(void);
34 34
35extern unsigned int vram_size; 35unsigned int vram_size;
36
37#if 0
38
39unsigned int memc_ctrl_reg; 36unsigned int memc_ctrl_reg;
40unsigned int number_mfm_drives; 37unsigned int number_mfm_drives;
41 38
@@ -63,8 +60,6 @@ static int __init parse_tag_acorn(const struct tag *tag)
63 60
64__tagtable(ATAG_ACORN, parse_tag_acorn); 61__tagtable(ATAG_ACORN, parse_tag_acorn);
65 62
66#endif
67
68static struct map_desc rpc_io_desc[] __initdata = { 63static struct map_desc rpc_io_desc[] __initdata = {
69 { SCREEN_BASE, SCREEN_START, 2*1048576, MT_DEVICE }, /* VRAM */ 64 { SCREEN_BASE, SCREEN_START, 2*1048576, MT_DEVICE }, /* VRAM */
70 { (u32)IO_BASE, IO_START, IO_SIZE , MT_DEVICE }, /* IO space */ 65 { (u32)IO_BASE, IO_START, IO_SIZE , MT_DEVICE }, /* IO space */
@@ -168,12 +163,14 @@ arch_initcall(rpc_init);
168extern struct sys_timer ioc_timer; 163extern struct sys_timer ioc_timer;
169 164
170MACHINE_START(RISCPC, "Acorn-RiscPC") 165MACHINE_START(RISCPC, "Acorn-RiscPC")
171 MAINTAINER("Russell King") 166 /* Maintainer: Russell King */
172 BOOT_MEM(0x10000000, 0x03000000, 0xe0000000) 167 .phys_ram = 0x10000000,
173 BOOT_PARAMS(0x10000100) 168 .phys_io = 0x03000000,
174 DISABLE_PARPORT(0) 169 .io_pg_offst = ((0xe0000000) >> 18) & 0xfffc,
175 DISABLE_PARPORT(1) 170 .boot_params = 0x10000100,
176 MAPIO(rpc_map_io) 171 .reserve_lp0 = 1,
177 INITIRQ(rpc_init_irq) 172 .reserve_lp1 = 1,
173 .map_io = rpc_map_io,
174 .init_irq = rpc_init_irq,
178 .timer = &ioc_timer, 175 .timer = &ioc_timer,
179MACHINE_END 176MACHINE_END
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index 534df0c6c770..d4d03d0daaec 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -154,6 +154,11 @@ config S3C2410_PM_CHECK_CHUNKSIZE
154 the CRC data block will take more memory, but wil identify any 154 the CRC data block will take more memory, but wil identify any
155 faults with better precision. 155 faults with better precision.
156 156
157config PM_SIMTEC
158 bool
159 depends on PM && (ARCH_BAST || MACH_VR1000)
160 default y
161
157config S3C2410_LOWLEVEL_UART_PORT 162config S3C2410_LOWLEVEL_UART_PORT
158 int "S3C2410 UART to use for low-level messages" 163 int "S3C2410 UART to use for low-level messages"
159 default 0 164 default 0
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile
index 7c379aad5d62..55ed7c7e57da 100644
--- a/arch/arm/mach-s3c2410/Makefile
+++ b/arch/arm/mach-s3c2410/Makefile
@@ -18,10 +18,13 @@ obj-$(CONFIG_S3C2410_DMA) += dma.o
18# Power Management support 18# Power Management support
19 19
20obj-$(CONFIG_PM) += pm.o sleep.o 20obj-$(CONFIG_PM) += pm.o sleep.o
21obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o
21 22
22# S3C2440 support 23# S3C2440 support
23 24
24obj-$(CONFIG_CPU_S3C2440) += s3c2440.o s3c2440-dsc.o 25obj-$(CONFIG_CPU_S3C2440) += s3c2440.o s3c2440-dsc.o
26obj-$(CONFIG_CPU_S3C2440) += s3c2440-irq.o
27obj-$(CONFIG_CPU_S3C2440) += s3c2440-clock.o
25 28
26# machine specific support 29# machine specific support
27 30
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c
index 8d986b8401c2..9a66050e887d 100644
--- a/arch/arm/mach-s3c2410/clock.c
+++ b/arch/arm/mach-s3c2410/clock.c
@@ -448,60 +448,3 @@ int __init s3c24xx_setup_clocks(unsigned long xtal,
448 448
449 return 0; 449 return 0;
450} 450}
451
452/* S3C2440 extended clock support */
453
454#ifdef CONFIG_CPU_S3C2440
455
456static struct clk s3c2440_clk_upll = {
457 .name = "upll",
458 .id = -1,
459};
460
461static struct clk s3c2440_clk_cam = {
462 .name = "camif",
463 .parent = &clk_h,
464 .id = -1,
465 .enable = s3c24xx_clkcon_enable,
466 .ctrlbit = S3C2440_CLKCON_CAMERA,
467};
468
469static struct clk s3c2440_clk_ac97 = {
470 .name = "ac97",
471 .parent = &clk_p,
472 .id = -1,
473 .enable = s3c24xx_clkcon_enable,
474 .ctrlbit = S3C2440_CLKCON_CAMERA,
475};
476
477static int s3c2440_clk_add(struct sys_device *sysdev)
478{
479 unsigned long upllcon = __raw_readl(S3C2410_UPLLCON);
480
481 s3c2440_clk_upll.rate = s3c2410_get_pll(upllcon, clk_xtal.rate);
482
483 printk("S3C2440: Clock Support, UPLL %ld.%03ld MHz\n",
484 print_mhz(s3c2440_clk_upll.rate));
485
486 s3c24xx_register_clock(&s3c2440_clk_ac97);
487 s3c24xx_register_clock(&s3c2440_clk_cam);
488 s3c24xx_register_clock(&s3c2440_clk_upll);
489
490 clk_disable(&s3c2440_clk_ac97);
491 clk_disable(&s3c2440_clk_cam);
492
493 return 0;
494}
495
496static struct sysdev_driver s3c2440_clk_driver = {
497 .add = s3c2440_clk_add,
498};
499
500static int s3c24xx_clk_driver(void)
501{
502 return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_clk_driver);
503}
504
505arch_initcall(s3c24xx_clk_driver);
506
507#endif /* CONFIG_CPU_S3C2440 */
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c
index 64792f678668..4664bd11adc1 100644
--- a/arch/arm/mach-s3c2410/devs.c
+++ b/arch/arm/mach-s3c2410/devs.c
@@ -96,8 +96,8 @@ struct platform_device s3c_device_lcd = {
96 .num_resources = ARRAY_SIZE(s3c_lcd_resource), 96 .num_resources = ARRAY_SIZE(s3c_lcd_resource),
97 .resource = s3c_lcd_resource, 97 .resource = s3c_lcd_resource,
98 .dev = { 98 .dev = {
99 .dma_mask = &s3c_device_lcd_dmamask, 99 .dma_mask = &s3c_device_lcd_dmamask,
100 .coherent_dma_mask = 0xffffffffUL 100 .coherent_dma_mask = 0xffffffffUL
101 } 101 }
102}; 102};
103 103
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c
index c7c28890d406..65feaf20d23e 100644
--- a/arch/arm/mach-s3c2410/dma.c
+++ b/arch/arm/mach-s3c2410/dma.c
@@ -436,7 +436,7 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id,
436 436
437 buf = kmem_cache_alloc(dma_kmem, GFP_ATOMIC); 437 buf = kmem_cache_alloc(dma_kmem, GFP_ATOMIC);
438 if (buf == NULL) { 438 if (buf == NULL) {
439 pr_debug("%s: out of memory (%d alloc)\n", 439 pr_debug("%s: out of memory (%ld alloc)\n",
440 __FUNCTION__, sizeof(*buf)); 440 __FUNCTION__, sizeof(*buf));
441 return -ENOMEM; 441 return -ENOMEM;
442 } 442 }
diff --git a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c
index b668c48f4399..973a5fe6769c 100644
--- a/arch/arm/mach-s3c2410/irq.c
+++ b/arch/arm/mach-s3c2410/irq.c
@@ -40,8 +40,14 @@
40 * 04-Nov-2004 Ben Dooks 40 * 04-Nov-2004 Ben Dooks
41 * Fix standard IRQ wake for EINT0..4 and RTC 41 * Fix standard IRQ wake for EINT0..4 and RTC
42 * 42 *
43 * 22-Feb-2004 Ben Dooks 43 * 22-Feb-2005 Ben Dooks
44 * Fixed edge-triggering on ADC IRQ 44 * Fixed edge-triggering on ADC IRQ
45 *
46 * 28-Jun-2005 Ben Dooks
47 * Mark IRQ_LCD valid
48 *
49 * 25-Jul-2005 Ben Dooks
50 * Split the S3C2440 IRQ code to seperate file
45*/ 51*/
46 52
47#include <linux/init.h> 53#include <linux/init.h>
@@ -62,11 +68,7 @@
62 68
63#include "cpu.h" 69#include "cpu.h"
64#include "pm.h" 70#include "pm.h"
65 71#include "irq.h"
66#define irqdbf(x...)
67#define irqdbf2(x...)
68
69#define EXTINT_OFF (IRQ_EINT4 - 4)
70 72
71/* wakeup irq control */ 73/* wakeup irq control */
72 74
@@ -178,7 +180,7 @@ s3c_irq_unmask(unsigned int irqno)
178 __raw_writel(mask, S3C2410_INTMSK); 180 __raw_writel(mask, S3C2410_INTMSK);
179} 181}
180 182
181static struct irqchip s3c_irq_level_chip = { 183struct irqchip s3c_irq_level_chip = {
182 .ack = s3c_irq_maskack, 184 .ack = s3c_irq_maskack,
183 .mask = s3c_irq_mask, 185 .mask = s3c_irq_mask,
184 .unmask = s3c_irq_unmask, 186 .unmask = s3c_irq_unmask,
@@ -366,86 +368,7 @@ static struct irqchip s3c_irq_eint0t4 = {
366#define INTMSK_UART1 (1UL << (IRQ_UART1 - IRQ_EINT0)) 368#define INTMSK_UART1 (1UL << (IRQ_UART1 - IRQ_EINT0))
367#define INTMSK_UART2 (1UL << (IRQ_UART2 - IRQ_EINT0)) 369#define INTMSK_UART2 (1UL << (IRQ_UART2 - IRQ_EINT0))
368#define INTMSK_ADCPARENT (1UL << (IRQ_ADCPARENT - IRQ_EINT0)) 370#define INTMSK_ADCPARENT (1UL << (IRQ_ADCPARENT - IRQ_EINT0))
369#define INTMSK_LCD (1UL << (IRQ_LCD - IRQ_EINT0))
370
371static inline void
372s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit,
373 int subcheck)
374{
375 unsigned long mask;
376 unsigned long submask;
377
378 submask = __raw_readl(S3C2410_INTSUBMSK);
379 mask = __raw_readl(S3C2410_INTMSK);
380
381 submask |= (1UL << (irqno - IRQ_S3CUART_RX0));
382
383 /* check to see if we need to mask the parent IRQ */
384
385 if ((submask & subcheck) == subcheck) {
386 __raw_writel(mask | parentbit, S3C2410_INTMSK);
387 }
388
389 /* write back masks */
390 __raw_writel(submask, S3C2410_INTSUBMSK);
391
392}
393
394static inline void
395s3c_irqsub_unmask(unsigned int irqno, unsigned int parentbit)
396{
397 unsigned long mask;
398 unsigned long submask;
399
400 submask = __raw_readl(S3C2410_INTSUBMSK);
401 mask = __raw_readl(S3C2410_INTMSK);
402
403 submask &= ~(1UL << (irqno - IRQ_S3CUART_RX0));
404 mask &= ~parentbit;
405
406 /* write back masks */
407 __raw_writel(submask, S3C2410_INTSUBMSK);
408 __raw_writel(mask, S3C2410_INTMSK);
409}
410
411
412static inline void
413s3c_irqsub_maskack(unsigned int irqno, unsigned int parentmask, unsigned int group)
414{
415 unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);
416
417 s3c_irqsub_mask(irqno, parentmask, group);
418
419 __raw_writel(bit, S3C2410_SUBSRCPND);
420
421 /* only ack parent if we've got all the irqs (seems we must
422 * ack, all and hope that the irq system retriggers ok when
423 * the interrupt goes off again)
424 */
425
426 if (1) {
427 __raw_writel(parentmask, S3C2410_SRCPND);
428 __raw_writel(parentmask, S3C2410_INTPND);
429 }
430}
431
432static inline void
433s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group)
434{
435 unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);
436
437 __raw_writel(bit, S3C2410_SUBSRCPND);
438 371
439 /* only ack parent if we've got all the irqs (seems we must
440 * ack, all and hope that the irq system retriggers ok when
441 * the interrupt goes off again)
442 */
443
444 if (1) {
445 __raw_writel(parentmask, S3C2410_SRCPND);
446 __raw_writel(parentmask, S3C2410_INTPND);
447 }
448}
449 372
450/* UART0 */ 373/* UART0 */
451 374
@@ -716,7 +639,6 @@ void __init s3c24xx_init_irq(void)
716 case IRQ_UART0: 639 case IRQ_UART0:
717 case IRQ_UART1: 640 case IRQ_UART1:
718 case IRQ_UART2: 641 case IRQ_UART2:
719 case IRQ_LCD:
720 case IRQ_ADCPARENT: 642 case IRQ_ADCPARENT:
721 set_irq_chip(irqno, &s3c_irq_level_chip); 643 set_irq_chip(irqno, &s3c_irq_level_chip);
722 set_irq_handler(irqno, do_level_IRQ); 644 set_irq_handler(irqno, do_level_IRQ);
@@ -793,174 +715,3 @@ void __init s3c24xx_init_irq(void)
793 715
794 irqdbf("s3c2410: registered interrupt handlers\n"); 716 irqdbf("s3c2410: registered interrupt handlers\n");
795} 717}
796
797/* s3c2440 irq code
798*/
799
800#ifdef CONFIG_CPU_S3C2440
801
802/* WDT/AC97 */
803
804static void s3c_irq_demux_wdtac97(unsigned int irq,
805 struct irqdesc *desc,
806 struct pt_regs *regs)
807{
808 unsigned int subsrc, submsk;
809 struct irqdesc *mydesc;
810
811 /* read the current pending interrupts, and the mask
812 * for what it is available */
813
814 subsrc = __raw_readl(S3C2410_SUBSRCPND);
815 submsk = __raw_readl(S3C2410_INTSUBMSK);
816
817 subsrc &= ~submsk;
818 subsrc >>= 13;
819 subsrc &= 3;
820
821 if (subsrc != 0) {
822 if (subsrc & 1) {
823 mydesc = irq_desc + IRQ_S3C2440_WDT;
824 mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs);
825 }
826 if (subsrc & 2) {
827 mydesc = irq_desc + IRQ_S3C2440_AC97;
828 mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs);
829 }
830 }
831}
832
833
834#define INTMSK_WDT (1UL << (IRQ_WDT - IRQ_EINT0))
835
836static void
837s3c_irq_wdtac97_mask(unsigned int irqno)
838{
839 s3c_irqsub_mask(irqno, INTMSK_WDT, 3<<13);
840}
841
842static void
843s3c_irq_wdtac97_unmask(unsigned int irqno)
844{
845 s3c_irqsub_unmask(irqno, INTMSK_WDT);
846}
847
848static void
849s3c_irq_wdtac97_ack(unsigned int irqno)
850{
851 s3c_irqsub_maskack(irqno, INTMSK_WDT, 3<<13);
852}
853
854static struct irqchip s3c_irq_wdtac97 = {
855 .mask = s3c_irq_wdtac97_mask,
856 .unmask = s3c_irq_wdtac97_unmask,
857 .ack = s3c_irq_wdtac97_ack,
858};
859
860/* camera irq */
861
862static void s3c_irq_demux_cam(unsigned int irq,
863 struct irqdesc *desc,
864 struct pt_regs *regs)
865{
866 unsigned int subsrc, submsk;
867 struct irqdesc *mydesc;
868
869 /* read the current pending interrupts, and the mask
870 * for what it is available */
871
872 subsrc = __raw_readl(S3C2410_SUBSRCPND);
873 submsk = __raw_readl(S3C2410_INTSUBMSK);
874
875 subsrc &= ~submsk;
876 subsrc >>= 11;
877 subsrc &= 3;
878
879 if (subsrc != 0) {
880 if (subsrc & 1) {
881 mydesc = irq_desc + IRQ_S3C2440_CAM_C;
882 mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs);
883 }
884 if (subsrc & 2) {
885 mydesc = irq_desc + IRQ_S3C2440_CAM_P;
886 mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs);
887 }
888 }
889}
890
891#define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0))
892
893static void
894s3c_irq_cam_mask(unsigned int irqno)
895{
896 s3c_irqsub_mask(irqno, INTMSK_CAM, 3<<11);
897}
898
899static void
900s3c_irq_cam_unmask(unsigned int irqno)
901{
902 s3c_irqsub_unmask(irqno, INTMSK_CAM);
903}
904
905static void
906s3c_irq_cam_ack(unsigned int irqno)
907{
908 s3c_irqsub_maskack(irqno, INTMSK_CAM, 3<<11);
909}
910
911static struct irqchip s3c_irq_cam = {
912 .mask = s3c_irq_cam_mask,
913 .unmask = s3c_irq_cam_unmask,
914 .ack = s3c_irq_cam_ack,
915};
916
917static int s3c2440_irq_add(struct sys_device *sysdev)
918{
919 unsigned int irqno;
920
921 printk("S3C2440: IRQ Support\n");
922
923 set_irq_chip(IRQ_NFCON, &s3c_irq_level_chip);
924 set_irq_handler(IRQ_NFCON, do_level_IRQ);
925 set_irq_flags(IRQ_NFCON, IRQF_VALID);
926
927 /* add new chained handler for wdt, ac7 */
928
929 set_irq_chip(IRQ_WDT, &s3c_irq_level_chip);
930 set_irq_handler(IRQ_WDT, do_level_IRQ);
931 set_irq_chained_handler(IRQ_WDT, s3c_irq_demux_wdtac97);
932
933 for (irqno = IRQ_S3C2440_WDT; irqno <= IRQ_S3C2440_AC97; irqno++) {
934 set_irq_chip(irqno, &s3c_irq_wdtac97);
935 set_irq_handler(irqno, do_level_IRQ);
936 set_irq_flags(irqno, IRQF_VALID);
937 }
938
939 /* add chained handler for camera */
940
941 set_irq_chip(IRQ_CAM, &s3c_irq_level_chip);
942 set_irq_handler(IRQ_CAM, do_level_IRQ);
943 set_irq_chained_handler(IRQ_CAM, s3c_irq_demux_cam);
944
945 for (irqno = IRQ_S3C2440_CAM_C; irqno <= IRQ_S3C2440_CAM_P; irqno++) {
946 set_irq_chip(irqno, &s3c_irq_cam);
947 set_irq_handler(irqno, do_level_IRQ);
948 set_irq_flags(irqno, IRQF_VALID);
949 }
950
951 return 0;
952}
953
954static struct sysdev_driver s3c2440_irq_driver = {
955 .add = s3c2440_irq_add,
956};
957
958static int s3c24xx_irq_driver(void)
959{
960 return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver);
961}
962
963arch_initcall(s3c24xx_irq_driver);
964
965#endif /* CONFIG_CPU_S3C2440 */
966
diff --git a/arch/arm/mach-s3c2410/irq.h b/arch/arm/mach-s3c2410/irq.h
new file mode 100644
index 000000000000..4abf0ca14e00
--- /dev/null
+++ b/arch/arm/mach-s3c2410/irq.h
@@ -0,0 +1,99 @@
1/* arch/arm/mach-s3c2410/irq.h
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Header file for S3C24XX CPU IRQ support
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 * Modifications:
13*/
14
15#define irqdbf(x...)
16#define irqdbf2(x...)
17
18#define EXTINT_OFF (IRQ_EINT4 - 4)
19
20extern struct irqchip s3c_irq_level_chip;
21
22static inline void
23s3c_irqsub_mask(unsigned int irqno, unsigned int parentbit,
24 int subcheck)
25{
26 unsigned long mask;
27 unsigned long submask;
28
29 submask = __raw_readl(S3C2410_INTSUBMSK);
30 mask = __raw_readl(S3C2410_INTMSK);
31
32 submask |= (1UL << (irqno - IRQ_S3CUART_RX0));
33
34 /* check to see if we need to mask the parent IRQ */
35
36 if ((submask & subcheck) == subcheck) {
37 __raw_writel(mask | parentbit, S3C2410_INTMSK);
38 }
39
40 /* write back masks */
41 __raw_writel(submask, S3C2410_INTSUBMSK);
42
43}
44
45static inline void
46s3c_irqsub_unmask(unsigned int irqno, unsigned int parentbit)
47{
48 unsigned long mask;
49 unsigned long submask;
50
51 submask = __raw_readl(S3C2410_INTSUBMSK);
52 mask = __raw_readl(S3C2410_INTMSK);
53
54 submask &= ~(1UL << (irqno - IRQ_S3CUART_RX0));
55 mask &= ~parentbit;
56
57 /* write back masks */
58 __raw_writel(submask, S3C2410_INTSUBMSK);
59 __raw_writel(mask, S3C2410_INTMSK);
60}
61
62
63static inline void
64s3c_irqsub_maskack(unsigned int irqno, unsigned int parentmask, unsigned int group)
65{
66 unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);
67
68 s3c_irqsub_mask(irqno, parentmask, group);
69
70 __raw_writel(bit, S3C2410_SUBSRCPND);
71
72 /* only ack parent if we've got all the irqs (seems we must
73 * ack, all and hope that the irq system retriggers ok when
74 * the interrupt goes off again)
75 */
76
77 if (1) {
78 __raw_writel(parentmask, S3C2410_SRCPND);
79 __raw_writel(parentmask, S3C2410_INTPND);
80 }
81}
82
83static inline void
84s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group)
85{
86 unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);
87
88 __raw_writel(bit, S3C2410_SUBSRCPND);
89
90 /* only ack parent if we've got all the irqs (seems we must
91 * ack, all and hope that the irq system retriggers ok when
92 * the interrupt goes off again)
93 */
94
95 if (1) {
96 __raw_writel(parentmask, S3C2410_SRCPND);
97 __raw_writel(parentmask, S3C2410_INTPND);
98 }
99}
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index 3bb97eb6e693..e9182242da95 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -25,7 +25,12 @@
25 * 14-Jan-2005 BJD Add support for muitlple NAND devices 25 * 14-Jan-2005 BJD Add support for muitlple NAND devices
26 * 03-Mar-2005 BJD Ensured that bast-cpld.h is included 26 * 03-Mar-2005 BJD Ensured that bast-cpld.h is included
27 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA 27 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
28 * 14-Mar-2006 BJD Updated for __iomem changes 28 * 14-Mar-2005 BJD Updated for __iomem changes
29 * 22-Jun-2005 BJD Added DM9000 platform information
30 * 28-Jun-2005 BJD Moved pm functionality out to common code
31 * 17-Jul-2005 BJD Changed to platform device for SuperIO 16550s
32 * 25-Jul-2005 BJD Removed ASIX static mappings
33 * 27-Jul-2005 BJD Ensure maximum frequency of i2c bus
29*/ 34*/
30 35
31#include <linux/kernel.h> 36#include <linux/kernel.h>
@@ -35,6 +40,7 @@
35#include <linux/timer.h> 40#include <linux/timer.h>
36#include <linux/init.h> 41#include <linux/init.h>
37#include <linux/device.h> 42#include <linux/device.h>
43#include <linux/dm9000.h>
38 44
39#include <asm/mach/arch.h> 45#include <asm/mach/arch.h>
40#include <asm/mach/map.h> 46#include <asm/mach/map.h>
@@ -53,18 +59,21 @@
53#include <asm/arch/regs-serial.h> 59#include <asm/arch/regs-serial.h>
54#include <asm/arch/regs-gpio.h> 60#include <asm/arch/regs-gpio.h>
55#include <asm/arch/regs-mem.h> 61#include <asm/arch/regs-mem.h>
62#include <asm/arch/regs-lcd.h>
56#include <asm/arch/nand.h> 63#include <asm/arch/nand.h>
64#include <asm/arch/iic.h>
57 65
58#include <linux/mtd/mtd.h> 66#include <linux/mtd/mtd.h>
59#include <linux/mtd/nand.h> 67#include <linux/mtd/nand.h>
60#include <linux/mtd/nand_ecc.h> 68#include <linux/mtd/nand_ecc.h>
61#include <linux/mtd/partitions.h> 69#include <linux/mtd/partitions.h>
62 70
71#include <linux/serial_8250.h>
72
63#include "clock.h" 73#include "clock.h"
64#include "devs.h" 74#include "devs.h"
65#include "cpu.h" 75#include "cpu.h"
66#include "usb-simtec.h" 76#include "usb-simtec.h"
67#include "pm.h"
68 77
69#define COPYRIGHT ", (c) 2004-2005 Simtec Electronics" 78#define COPYRIGHT ", (c) 2004-2005 Simtec Electronics"
70 79
@@ -110,9 +119,7 @@ static struct map_desc bast_iodesc[] __initdata = {
110 /* slow, byte */ 119 /* slow, byte */
111 { VA_C2(BAST_VA_ISAIO), PA_CS2(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, 120 { VA_C2(BAST_VA_ISAIO), PA_CS2(BAST_PA_ISAIO), SZ_16M, MT_DEVICE },
112 { VA_C2(BAST_VA_ISAMEM), PA_CS2(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, 121 { VA_C2(BAST_VA_ISAMEM), PA_CS2(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE },
113 { VA_C2(BAST_VA_ASIXNET), PA_CS3(BAST_PA_ASIXNET), SZ_1M, MT_DEVICE },
114 { VA_C2(BAST_VA_SUPERIO), PA_CS2(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, 122 { VA_C2(BAST_VA_SUPERIO), PA_CS2(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE },
115 { VA_C2(BAST_VA_DM9000), PA_CS2(BAST_PA_DM9000), SZ_1M, MT_DEVICE },
116 { VA_C2(BAST_VA_IDEPRI), PA_CS3(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE }, 123 { VA_C2(BAST_VA_IDEPRI), PA_CS3(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE },
117 { VA_C2(BAST_VA_IDESEC), PA_CS3(BAST_PA_IDESEC), SZ_1M, MT_DEVICE }, 124 { VA_C2(BAST_VA_IDESEC), PA_CS3(BAST_PA_IDESEC), SZ_1M, MT_DEVICE },
118 { VA_C2(BAST_VA_IDEPRIAUX), PA_CS3(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, 125 { VA_C2(BAST_VA_IDEPRIAUX), PA_CS3(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE },
@@ -121,9 +128,7 @@ static struct map_desc bast_iodesc[] __initdata = {
121 /* slow, word */ 128 /* slow, word */
122 { VA_C3(BAST_VA_ISAIO), PA_CS3(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, 129 { VA_C3(BAST_VA_ISAIO), PA_CS3(BAST_PA_ISAIO), SZ_16M, MT_DEVICE },
123 { VA_C3(BAST_VA_ISAMEM), PA_CS3(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, 130 { VA_C3(BAST_VA_ISAMEM), PA_CS3(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE },
124 { VA_C3(BAST_VA_ASIXNET), PA_CS3(BAST_PA_ASIXNET), SZ_1M, MT_DEVICE },
125 { VA_C3(BAST_VA_SUPERIO), PA_CS3(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, 131 { VA_C3(BAST_VA_SUPERIO), PA_CS3(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE },
126 { VA_C3(BAST_VA_DM9000), PA_CS3(BAST_PA_DM9000), SZ_1M, MT_DEVICE },
127 { VA_C3(BAST_VA_IDEPRI), PA_CS3(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE }, 132 { VA_C3(BAST_VA_IDEPRI), PA_CS3(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE },
128 { VA_C3(BAST_VA_IDESEC), PA_CS3(BAST_PA_IDESEC), SZ_1M, MT_DEVICE }, 133 { VA_C3(BAST_VA_IDESEC), PA_CS3(BAST_PA_IDESEC), SZ_1M, MT_DEVICE },
129 { VA_C3(BAST_VA_IDEPRIAUX), PA_CS3(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, 134 { VA_C3(BAST_VA_IDEPRIAUX), PA_CS3(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE },
@@ -132,9 +137,7 @@ static struct map_desc bast_iodesc[] __initdata = {
132 /* fast, byte */ 137 /* fast, byte */
133 { VA_C4(BAST_VA_ISAIO), PA_CS4(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, 138 { VA_C4(BAST_VA_ISAIO), PA_CS4(BAST_PA_ISAIO), SZ_16M, MT_DEVICE },
134 { VA_C4(BAST_VA_ISAMEM), PA_CS4(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, 139 { VA_C4(BAST_VA_ISAMEM), PA_CS4(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE },
135 { VA_C4(BAST_VA_ASIXNET), PA_CS5(BAST_PA_ASIXNET), SZ_1M, MT_DEVICE },
136 { VA_C4(BAST_VA_SUPERIO), PA_CS4(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, 140 { VA_C4(BAST_VA_SUPERIO), PA_CS4(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE },
137 { VA_C4(BAST_VA_DM9000), PA_CS4(BAST_PA_DM9000), SZ_1M, MT_DEVICE },
138 { VA_C4(BAST_VA_IDEPRI), PA_CS5(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE }, 141 { VA_C4(BAST_VA_IDEPRI), PA_CS5(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE },
139 { VA_C4(BAST_VA_IDESEC), PA_CS5(BAST_PA_IDESEC), SZ_1M, MT_DEVICE }, 142 { VA_C4(BAST_VA_IDESEC), PA_CS5(BAST_PA_IDESEC), SZ_1M, MT_DEVICE },
140 { VA_C4(BAST_VA_IDEPRIAUX), PA_CS5(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, 143 { VA_C4(BAST_VA_IDEPRIAUX), PA_CS5(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE },
@@ -143,9 +146,7 @@ static struct map_desc bast_iodesc[] __initdata = {
143 /* fast, word */ 146 /* fast, word */
144 { VA_C5(BAST_VA_ISAIO), PA_CS5(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, 147 { VA_C5(BAST_VA_ISAIO), PA_CS5(BAST_PA_ISAIO), SZ_16M, MT_DEVICE },
145 { VA_C5(BAST_VA_ISAMEM), PA_CS5(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, 148 { VA_C5(BAST_VA_ISAMEM), PA_CS5(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE },
146 { VA_C5(BAST_VA_ASIXNET), PA_CS5(BAST_PA_ASIXNET), SZ_1M, MT_DEVICE },
147 { VA_C5(BAST_VA_SUPERIO), PA_CS5(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, 149 { VA_C5(BAST_VA_SUPERIO), PA_CS5(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE },
148 { VA_C5(BAST_VA_DM9000), PA_CS5(BAST_PA_DM9000), SZ_1M, MT_DEVICE },
149 { VA_C5(BAST_VA_IDEPRI), PA_CS5(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE }, 150 { VA_C5(BAST_VA_IDEPRI), PA_CS5(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE },
150 { VA_C5(BAST_VA_IDESEC), PA_CS5(BAST_PA_IDESEC), SZ_1M, MT_DEVICE }, 151 { VA_C5(BAST_VA_IDESEC), PA_CS5(BAST_PA_IDESEC), SZ_1M, MT_DEVICE },
151 { VA_C5(BAST_VA_IDEPRIAUX), PA_CS5(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, 152 { VA_C5(BAST_VA_IDEPRIAUX), PA_CS5(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE },
@@ -305,7 +306,7 @@ static void bast_nand_select(struct s3c2410_nand_set *set, int slot)
305} 306}
306 307
307static struct s3c2410_platform_nand bast_nand_info = { 308static struct s3c2410_platform_nand bast_nand_info = {
308 .tacls = 80, 309 .tacls = 40,
309 .twrph0 = 80, 310 .twrph0 = 80,
310 .twrph1 = 80, 311 .twrph1 = 80,
311 .nr_sets = ARRAY_SIZE(bast_nand_sets), 312 .nr_sets = ARRAY_SIZE(bast_nand_sets),
@@ -313,6 +314,89 @@ static struct s3c2410_platform_nand bast_nand_info = {
313 .select_chip = bast_nand_select, 314 .select_chip = bast_nand_select,
314}; 315};
315 316
317/* DM9000 */
318
319static struct resource bast_dm9k_resource[] = {
320 [0] = {
321 .start = S3C2410_CS5 + BAST_PA_DM9000,
322 .end = S3C2410_CS5 + BAST_PA_DM9000 + 3,
323 .flags = IORESOURCE_MEM
324 },
325 [1] = {
326 .start = S3C2410_CS5 + BAST_PA_DM9000 + 0x40,
327 .end = S3C2410_CS5 + BAST_PA_DM9000 + 0x40 + 0x3f,
328 .flags = IORESOURCE_MEM
329 },
330 [2] = {
331 .start = IRQ_DM9000,
332 .end = IRQ_DM9000,
333 .flags = IORESOURCE_IRQ
334 }
335
336};
337
338/* for the moment we limit ourselves to 16bit IO until some
339 * better IO routines can be written and tested
340*/
341
342struct dm9000_plat_data bast_dm9k_platdata = {
343 .flags = DM9000_PLATF_16BITONLY
344};
345
346static struct platform_device bast_device_dm9k = {
347 .name = "dm9000",
348 .id = 0,
349 .num_resources = ARRAY_SIZE(bast_dm9k_resource),
350 .resource = bast_dm9k_resource,
351 .dev = {
352 .platform_data = &bast_dm9k_platdata,
353 }
354};
355
356/* serial devices */
357
358#define SERIAL_BASE (S3C2410_CS2 + BAST_PA_SUPERIO)
359#define SERIAL_FLAGS (UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SHARE_IRQ)
360#define SERIAL_CLK (1843200)
361
362static struct plat_serial8250_port bast_sio_data[] = {
363 [0] = {
364 .mapbase = SERIAL_BASE + 0x2f8,
365 .irq = IRQ_PCSERIAL1,
366 .flags = SERIAL_FLAGS,
367 .iotype = UPIO_MEM,
368 .regshift = 0,
369 .uartclk = SERIAL_CLK,
370 },
371 [1] = {
372 .mapbase = SERIAL_BASE + 0x3f8,
373 .irq = IRQ_PCSERIAL2,
374 .flags = SERIAL_FLAGS,
375 .iotype = UPIO_MEM,
376 .regshift = 0,
377 .uartclk = SERIAL_CLK,
378 },
379 { }
380};
381
382static struct platform_device bast_sio = {
383 .name = "serial8250",
384 .id = 0,
385 .dev = {
386 .platform_data = &bast_sio_data,
387 },
388};
389
390/* we have devices on the bus which cannot work much over the
391 * standard 100KHz i2c bus frequency
392*/
393
394static struct s3c2410_platform_i2c bast_i2c_info = {
395 .flags = 0,
396 .slave_addr = 0x10,
397 .bus_freq = 100*1000,
398 .max_freq = 130*1000,
399};
316 400
317/* Standard BAST devices */ 401/* Standard BAST devices */
318 402
@@ -324,7 +408,9 @@ static struct platform_device *bast_devices[] __initdata = {
324 &s3c_device_iis, 408 &s3c_device_iis,
325 &s3c_device_rtc, 409 &s3c_device_rtc,
326 &s3c_device_nand, 410 &s3c_device_nand,
327 &bast_device_nor 411 &bast_device_nor,
412 &bast_device_dm9k,
413 &bast_sio,
328}; 414};
329 415
330static struct clk *bast_clocks[] = { 416static struct clk *bast_clocks[] = {
@@ -358,6 +444,7 @@ void __init bast_map_io(void)
358 s3c24xx_uclk.parent = &s3c24xx_clkout1; 444 s3c24xx_uclk.parent = &s3c24xx_clkout1;
359 445
360 s3c_device_nand.dev.platform_data = &bast_nand_info; 446 s3c_device_nand.dev.platform_data = &bast_nand_info;
447 s3c_device_i2c.dev.platform_data = &bast_i2c_info;
361 448
362 s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); 449 s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
363 s3c24xx_init_clocks(0); 450 s3c24xx_init_clocks(0);
@@ -366,44 +453,14 @@ void __init bast_map_io(void)
366 usb_simtec_init(); 453 usb_simtec_init();
367} 454}
368 455
369void __init bast_init_irq(void)
370{
371 s3c24xx_init_irq();
372}
373
374#ifdef CONFIG_PM
375
376/* bast_init_machine
377 *
378 * enable the power management functions for the EB2410ITX
379*/
380
381static __init void bast_init_machine(void)
382{
383 unsigned long gstatus4;
384
385 printk(KERN_INFO "BAST Power Manangement" COPYRIGHT "\n");
386
387 gstatus4 = (__raw_readl(S3C2410_BANKCON7) & 0x3) << 30;
388 gstatus4 |= (__raw_readl(S3C2410_BANKCON6) & 0x3) << 28;
389 gstatus4 |= (__raw_readl(S3C2410_BANKSIZE) & S3C2410_BANKSIZE_MASK);
390
391 __raw_writel(gstatus4, S3C2410_GSTATUS4);
392
393 s3c2410_pm_init();
394}
395
396#else
397#define bast_init_machine NULL
398#endif
399
400 456
401MACHINE_START(BAST, "Simtec-BAST") 457MACHINE_START(BAST, "Simtec-BAST")
402 MAINTAINER("Ben Dooks <ben@simtec.co.uk>") 458 /* Maintainer: Ben Dooks <ben@simtec.co.uk> */
403 BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 459 .phys_ram = S3C2410_SDRAM_PA,
404 BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 460 .phys_io = S3C2410_PA_UART,
405 MAPIO(bast_map_io) 461 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
406 INITIRQ(bast_init_irq) 462 .boot_params = S3C2410_SDRAM_PA + 0x100,
407 .init_machine = bast_init_machine, 463 .map_io = bast_map_io,
464 .init_irq = s3c24xx_init_irq,
408 .timer = &s3c24xx_timer, 465 .timer = &s3c24xx_timer,
409MACHINE_END 466MACHINE_END
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
index 2924afc068a4..ea4fb1a97a50 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -117,10 +117,12 @@ void __init h1940_init_irq(void)
117} 117}
118 118
119MACHINE_START(H1940, "IPAQ-H1940") 119MACHINE_START(H1940, "IPAQ-H1940")
120 MAINTAINER("Ben Dooks <ben@fluff.org>") 120 /* Maintainer: Ben Dooks <ben@fluff.org> */
121 BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 121 .phys_ram = S3C2410_SDRAM_PA,
122 BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 122 .phys_io = S3C2410_PA_UART,
123 MAPIO(h1940_map_io) 123 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
124 INITIRQ(h1940_init_irq) 124 .boot_params = S3C2410_SDRAM_PA + 0x100,
125 .map_io = h1940_map_io,
126 .init_irq = h1940_init_irq,
125 .timer = &s3c24xx_timer, 127 .timer = &s3c24xx_timer,
126MACHINE_END 128MACHINE_END
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index bd15998c129b..79044d9bce38 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -137,10 +137,11 @@ void __init n30_init(void)
137} 137}
138 138
139MACHINE_START(N30, "Acer-N30") 139MACHINE_START(N30, "Acer-N30")
140 MAINTAINER("Christer Weinigel <christer@weinigel.se>, Ben Dooks <ben-linux@fluff.org>") 140 /* Maintainer: Christer Weinigel <christer@weinigel.se>, Ben Dooks <ben-linux@fluff.org> */
141 BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 141 .phys_ram = S3C2410_SDRAM_PA,
142 BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 142 .phys_io = S3C2410_PA_UART,
143 143 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
144 .boot_params = S3C2410_SDRAM_PA + 0x100,
144 .timer = &s3c24xx_timer, 145 .timer = &s3c24xx_timer,
145 .init_machine = n30_init, 146 .init_machine = n30_init,
146 .init_irq = n30_init_irq, 147 .init_irq = n30_init_irq,
diff --git a/arch/arm/mach-s3c2410/mach-nexcoder.c b/arch/arm/mach-s3c2410/mach-nexcoder.c
index 70487bf4b71e..d24c242414ca 100644
--- a/arch/arm/mach-s3c2410/mach-nexcoder.c
+++ b/arch/arm/mach-s3c2410/mach-nexcoder.c
@@ -147,9 +147,11 @@ void __init nexcoder_map_io(void)
147 147
148 148
149MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440") 149MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440")
150 MAINTAINER("Guillaume GOURAT <guillaume.gourat@nexvision.tv>") 150 /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */
151 BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 151 .phys_ram = S3C2410_SDRAM_PA,
152 BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 152 .phys_io = S3C2410_PA_UART,
153 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
154 .boot_params = S3C2410_SDRAM_PA + 0x100,
153 .map_io = nexcoder_map_io, 155 .map_io = nexcoder_map_io,
154 .init_irq = s3c24xx_init_irq, 156 .init_irq = s3c24xx_init_irq,
155 .timer = &s3c24xx_timer, 157 .timer = &s3c24xx_timer,
diff --git a/arch/arm/mach-s3c2410/mach-otom.c b/arch/arm/mach-s3c2410/mach-otom.c
index 67d8ce8fb00f..d901ed492ff5 100644
--- a/arch/arm/mach-s3c2410/mach-otom.c
+++ b/arch/arm/mach-s3c2410/mach-otom.c
@@ -115,9 +115,11 @@ void __init otom11_map_io(void)
115 115
116 116
117MACHINE_START(OTOM, "Nex Vision - Otom 1.1") 117MACHINE_START(OTOM, "Nex Vision - Otom 1.1")
118 MAINTAINER("Guillaume GOURAT <guillaume.gourat@nexvision.tv>") 118 /* Maintainer: Guillaume GOURAT <guillaume.gourat@nexvision.tv> */
119 BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 119 .phys_ram = S3C2410_SDRAM_PA,
120 BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 120 .phys_io = S3C2410_PA_UART,
121 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
122 .boot_params = S3C2410_SDRAM_PA + 0x100,
121 .map_io = otom11_map_io, 123 .map_io = otom11_map_io,
122 .init_irq = s3c24xx_init_irq, 124 .init_irq = s3c24xx_init_irq,
123 .timer = &s3c24xx_timer, 125 .timer = &s3c24xx_timer,
diff --git a/arch/arm/mach-s3c2410/mach-rx3715.c b/arch/arm/mach-s3c2410/mach-rx3715.c
index f8d3a9784e71..a73d61c1de46 100644
--- a/arch/arm/mach-s3c2410/mach-rx3715.c
+++ b/arch/arm/mach-s3c2410/mach-rx3715.c
@@ -131,11 +131,13 @@ static void __init rx3715_init_machine(void)
131#endif 131#endif
132 132
133MACHINE_START(RX3715, "IPAQ-RX3715") 133MACHINE_START(RX3715, "IPAQ-RX3715")
134 MAINTAINER("Ben Dooks <ben@fluff.org>") 134 /* Maintainer: Ben Dooks <ben@fluff.org> */
135 BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 135 .phys_ram = S3C2410_SDRAM_PA,
136 BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 136 .phys_io = S3C2410_PA_UART,
137 MAPIO(rx3715_map_io) 137 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
138 INITIRQ(rx3715_init_irq) 138 .boot_params = S3C2410_SDRAM_PA + 0x100,
139 INIT_MACHINE(rx3715_init_machine) 139 .map_io = rx3715_map_io,
140 .init_irq = rx3715_init_irq,
141 .init_machine = rx3715_init_machine,
140 .timer = &s3c24xx_timer, 142 .timer = &s3c24xx_timer,
141MACHINE_END 143MACHINE_END
diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c
index c1a4a1420ea0..67e903a700d3 100644
--- a/arch/arm/mach-s3c2410/mach-smdk2410.c
+++ b/arch/arm/mach-s3c2410/mach-smdk2410.c
@@ -112,11 +112,13 @@ void __init smdk2410_init_irq(void)
112 112
113MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switch 113MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switch
114 * to SMDK2410 */ 114 * to SMDK2410 */
115 MAINTAINER("Jonas Dietsche") 115 /* Maintainer: Jonas Dietsche */
116 BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 116 .phys_ram = S3C2410_SDRAM_PA,
117 BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 117 .phys_io = S3C2410_PA_UART,
118 MAPIO(smdk2410_map_io) 118 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
119 INITIRQ(smdk2410_init_irq) 119 .boot_params = S3C2410_SDRAM_PA + 0x100,
120 .map_io = smdk2410_map_io,
121 .init_irq = smdk2410_init_irq,
120 .timer = &s3c24xx_timer, 122 .timer = &s3c24xx_timer,
121MACHINE_END 123MACHINE_END
122 124
diff --git a/arch/arm/mach-s3c2410/mach-smdk2440.c b/arch/arm/mach-s3c2410/mach-smdk2440.c
index 7857176d9bcb..357522106f68 100644
--- a/arch/arm/mach-s3c2410/mach-smdk2440.c
+++ b/arch/arm/mach-s3c2410/mach-smdk2440.c
@@ -124,9 +124,11 @@ void __init smdk2440_machine_init(void)
124} 124}
125 125
126MACHINE_START(S3C2440, "SMDK2440") 126MACHINE_START(S3C2440, "SMDK2440")
127 MAINTAINER("Ben Dooks <ben@fluff.org>") 127 /* Maintainer: Ben Dooks <ben@fluff.org> */
128 BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 128 .phys_ram = S3C2410_SDRAM_PA,
129 BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 129 .phys_io = S3C2410_PA_UART,
130 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
131 .boot_params = S3C2410_SDRAM_PA + 0x100,
130 132
131 .init_irq = s3c24xx_init_irq, 133 .init_irq = s3c24xx_init_irq,
132 .map_io = smdk2440_map_io, 134 .map_io = smdk2440_map_io,
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c
index 5512146b1ce4..924e8464c212 100644
--- a/arch/arm/mach-s3c2410/mach-vr1000.c
+++ b/arch/arm/mach-s3c2410/mach-vr1000.c
@@ -27,6 +27,7 @@
27 * 10-Feb-2005 BJD Added power-off capability 27 * 10-Feb-2005 BJD Added power-off capability
28 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA 28 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
29 * 14-Mar-2006 BJD void __iomem fixes 29 * 14-Mar-2006 BJD void __iomem fixes
30 * 22-Jun-2006 BJD Added DM9000 platform information
30*/ 31*/
31 32
32#include <linux/kernel.h> 33#include <linux/kernel.h>
@@ -35,6 +36,7 @@
35#include <linux/list.h> 36#include <linux/list.h>
36#include <linux/timer.h> 37#include <linux/timer.h>
37#include <linux/init.h> 38#include <linux/init.h>
39#include <linux/dm9000.h>
38 40
39#include <linux/serial.h> 41#include <linux/serial.h>
40#include <linux/tty.h> 42#include <linux/tty.h>
@@ -98,28 +100,24 @@ static struct map_desc vr1000_iodesc[] __initdata = {
98 * are only 8bit */ 100 * are only 8bit */
99 101
100 /* slow, byte */ 102 /* slow, byte */
101 { VA_C2(VR1000_VA_DM9000), PA_CS2(VR1000_PA_DM9000), SZ_1M, MT_DEVICE },
102 { VA_C2(VR1000_VA_IDEPRI), PA_CS3(VR1000_PA_IDEPRI), SZ_1M, MT_DEVICE }, 103 { VA_C2(VR1000_VA_IDEPRI), PA_CS3(VR1000_PA_IDEPRI), SZ_1M, MT_DEVICE },
103 { VA_C2(VR1000_VA_IDESEC), PA_CS3(VR1000_PA_IDESEC), SZ_1M, MT_DEVICE }, 104 { VA_C2(VR1000_VA_IDESEC), PA_CS3(VR1000_PA_IDESEC), SZ_1M, MT_DEVICE },
104 { VA_C2(VR1000_VA_IDEPRIAUX), PA_CS3(VR1000_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, 105 { VA_C2(VR1000_VA_IDEPRIAUX), PA_CS3(VR1000_PA_IDEPRIAUX), SZ_1M, MT_DEVICE },
105 { VA_C2(VR1000_VA_IDESECAUX), PA_CS3(VR1000_PA_IDESECAUX), SZ_1M, MT_DEVICE }, 106 { VA_C2(VR1000_VA_IDESECAUX), PA_CS3(VR1000_PA_IDESECAUX), SZ_1M, MT_DEVICE },
106 107
107 /* slow, word */ 108 /* slow, word */
108 { VA_C3(VR1000_VA_DM9000), PA_CS3(VR1000_PA_DM9000), SZ_1M, MT_DEVICE },
109 { VA_C3(VR1000_VA_IDEPRI), PA_CS3(VR1000_PA_IDEPRI), SZ_1M, MT_DEVICE }, 109 { VA_C3(VR1000_VA_IDEPRI), PA_CS3(VR1000_PA_IDEPRI), SZ_1M, MT_DEVICE },
110 { VA_C3(VR1000_VA_IDESEC), PA_CS3(VR1000_PA_IDESEC), SZ_1M, MT_DEVICE }, 110 { VA_C3(VR1000_VA_IDESEC), PA_CS3(VR1000_PA_IDESEC), SZ_1M, MT_DEVICE },
111 { VA_C3(VR1000_VA_IDEPRIAUX), PA_CS3(VR1000_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, 111 { VA_C3(VR1000_VA_IDEPRIAUX), PA_CS3(VR1000_PA_IDEPRIAUX), SZ_1M, MT_DEVICE },
112 { VA_C3(VR1000_VA_IDESECAUX), PA_CS3(VR1000_PA_IDESECAUX), SZ_1M, MT_DEVICE }, 112 { VA_C3(VR1000_VA_IDESECAUX), PA_CS3(VR1000_PA_IDESECAUX), SZ_1M, MT_DEVICE },
113 113
114 /* fast, byte */ 114 /* fast, byte */
115 { VA_C4(VR1000_VA_DM9000), PA_CS4(VR1000_PA_DM9000), SZ_1M, MT_DEVICE },
116 { VA_C4(VR1000_VA_IDEPRI), PA_CS5(VR1000_PA_IDEPRI), SZ_1M, MT_DEVICE }, 115 { VA_C4(VR1000_VA_IDEPRI), PA_CS5(VR1000_PA_IDEPRI), SZ_1M, MT_DEVICE },
117 { VA_C4(VR1000_VA_IDESEC), PA_CS5(VR1000_PA_IDESEC), SZ_1M, MT_DEVICE }, 116 { VA_C4(VR1000_VA_IDESEC), PA_CS5(VR1000_PA_IDESEC), SZ_1M, MT_DEVICE },
118 { VA_C4(VR1000_VA_IDEPRIAUX), PA_CS5(VR1000_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, 117 { VA_C4(VR1000_VA_IDEPRIAUX), PA_CS5(VR1000_PA_IDEPRIAUX), SZ_1M, MT_DEVICE },
119 { VA_C4(VR1000_VA_IDESECAUX), PA_CS5(VR1000_PA_IDESECAUX), SZ_1M, MT_DEVICE }, 118 { VA_C4(VR1000_VA_IDESECAUX), PA_CS5(VR1000_PA_IDESECAUX), SZ_1M, MT_DEVICE },
120 119
121 /* fast, word */ 120 /* fast, word */
122 { VA_C5(VR1000_VA_DM9000), PA_CS5(VR1000_PA_DM9000), SZ_1M, MT_DEVICE },
123 { VA_C5(VR1000_VA_IDEPRI), PA_CS5(VR1000_PA_IDEPRI), SZ_1M, MT_DEVICE }, 121 { VA_C5(VR1000_VA_IDEPRI), PA_CS5(VR1000_PA_IDEPRI), SZ_1M, MT_DEVICE },
124 { VA_C5(VR1000_VA_IDESEC), PA_CS5(VR1000_PA_IDESEC), SZ_1M, MT_DEVICE }, 122 { VA_C5(VR1000_VA_IDESEC), PA_CS5(VR1000_PA_IDESEC), SZ_1M, MT_DEVICE },
125 { VA_C5(VR1000_VA_IDEPRIAUX), PA_CS5(VR1000_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, 123 { VA_C5(VR1000_VA_IDEPRIAUX), PA_CS5(VR1000_PA_IDEPRIAUX), SZ_1M, MT_DEVICE },
@@ -246,6 +244,74 @@ static struct platform_device vr1000_nor = {
246 .resource = vr1000_nor_resource, 244 .resource = vr1000_nor_resource,
247}; 245};
248 246
247/* DM9000 ethernet devices */
248
249static struct resource vr1000_dm9k0_resource[] = {
250 [0] = {
251 .start = S3C2410_CS5 + VR1000_PA_DM9000,
252 .end = S3C2410_CS5 + VR1000_PA_DM9000 + 3,
253 .flags = IORESOURCE_MEM
254 },
255 [1] = {
256 .start = S3C2410_CS5 + VR1000_PA_DM9000 + 0x40,
257 .end = S3C2410_CS5 + VR1000_PA_DM9000 + 0x7f,
258 .flags = IORESOURCE_MEM
259 },
260 [2] = {
261 .start = IRQ_VR1000_DM9000A,
262 .end = IRQ_VR1000_DM9000A,
263 .flags = IORESOURCE_IRQ
264 }
265
266};
267
268static struct resource vr1000_dm9k1_resource[] = {
269 [0] = {
270 .start = S3C2410_CS5 + VR1000_PA_DM9000 + 0x80,
271 .end = S3C2410_CS5 + VR1000_PA_DM9000 + 0x83,
272 .flags = IORESOURCE_MEM
273 },
274 [1] = {
275 .start = S3C2410_CS5 + VR1000_PA_DM9000 + 0xC0,
276 .end = S3C2410_CS5 + VR1000_PA_DM9000 + 0xFF,
277 .flags = IORESOURCE_MEM
278 },
279 [2] = {
280 .start = IRQ_VR1000_DM9000N,
281 .end = IRQ_VR1000_DM9000N,
282 .flags = IORESOURCE_IRQ
283 }
284};
285
286/* for the moment we limit ourselves to 16bit IO until some
287 * better IO routines can be written and tested
288*/
289
290struct dm9000_plat_data vr1000_dm9k_platdata = {
291 .flags = DM9000_PLATF_16BITONLY,
292};
293
294static struct platform_device vr1000_dm9k0 = {
295 .name = "dm9000",
296 .id = 0,
297 .num_resources = ARRAY_SIZE(vr1000_dm9k0_resource),
298 .resource = vr1000_dm9k0_resource,
299 .dev = {
300 .platform_data = &vr1000_dm9k_platdata,
301 }
302};
303
304static struct platform_device vr1000_dm9k1 = {
305 .name = "dm9000",
306 .id = 1,
307 .num_resources = ARRAY_SIZE(vr1000_dm9k1_resource),
308 .resource = vr1000_dm9k1_resource,
309 .dev = {
310 .platform_data = &vr1000_dm9k_platdata,
311 }
312};
313
314/* devices for this board */
249 315
250static struct platform_device *vr1000_devices[] __initdata = { 316static struct platform_device *vr1000_devices[] __initdata = {
251 &s3c_device_usb, 317 &s3c_device_usb,
@@ -253,8 +319,11 @@ static struct platform_device *vr1000_devices[] __initdata = {
253 &s3c_device_wdt, 319 &s3c_device_wdt,
254 &s3c_device_i2c, 320 &s3c_device_i2c,
255 &s3c_device_iis, 321 &s3c_device_iis,
322 &s3c_device_adc,
256 &serial_device, 323 &serial_device,
257 &vr1000_nor, 324 &vr1000_nor,
325 &vr1000_dm9k0,
326 &vr1000_dm9k1
258}; 327};
259 328
260static struct clk *vr1000_clocks[] = { 329static struct clk *vr1000_clocks[] = {
@@ -302,16 +371,14 @@ void __init vr1000_map_io(void)
302 usb_simtec_init(); 371 usb_simtec_init();
303} 372}
304 373
305void __init vr1000_init_irq(void)
306{
307 s3c24xx_init_irq();
308}
309 374
310MACHINE_START(VR1000, "Thorcom-VR1000") 375MACHINE_START(VR1000, "Thorcom-VR1000")
311 MAINTAINER("Ben Dooks <ben@simtec.co.uk>") 376 /* Maintainer: Ben Dooks <ben@simtec.co.uk> */
312 BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART) 377 .phys_ram = S3C2410_SDRAM_PA,
313 BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100) 378 .phys_io = S3C2410_PA_UART,
314 MAPIO(vr1000_map_io) 379 .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc,
315 INITIRQ(vr1000_init_irq) 380 .boot_params = S3C2410_SDRAM_PA + 0x100,
381 .map_io = vr1000_map_io,
382 .init_irq = s3c24xx_init_irq,
316 .timer = &s3c24xx_timer, 383 .timer = &s3c24xx_timer,
317MACHINE_END 384MACHINE_END
diff --git a/arch/arm/mach-s3c2410/pm-simtec.c b/arch/arm/mach-s3c2410/pm-simtec.c
new file mode 100644
index 000000000000..2cb798832223
--- /dev/null
+++ b/arch/arm/mach-s3c2410/pm-simtec.c
@@ -0,0 +1,65 @@
1/* linux/arch/arm/mach-s3c2410/pm-simtec.c
2 *
3 * Copyright (c) 2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * http://armlinux.simtec.co.uk/
7 *
8 * Power Management helpers for Simtec S3C24XX implementations
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 version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#include <linux/kernel.h>
16#include <linux/types.h>
17#include <linux/interrupt.h>
18#include <linux/list.h>
19#include <linux/timer.h>
20#include <linux/init.h>
21#include <linux/device.h>
22
23#include <asm/mach/arch.h>
24#include <asm/mach/map.h>
25
26#include <asm/hardware.h>
27#include <asm/io.h>
28
29#include <asm/arch/map.h>
30#include <asm/arch/regs-serial.h>
31#include <asm/arch/regs-gpio.h>
32#include <asm/arch/regs-mem.h>
33
34#include <asm/mach-types.h>
35
36#include "pm.h"
37
38#define COPYRIGHT ", (c) 2005 Simtec Electronics"
39
40/* pm_simtec_init
41 *
42 * enable the power management functions
43*/
44
45static __init int pm_simtec_init(void)
46{
47 unsigned long gstatus4;
48
49 /* check which machine we are running on */
50
51 if (!machine_is_bast() && !machine_is_vr1000())
52 return 0;
53
54 printk(KERN_INFO "Simtec Board Power Manangement" COPYRIGHT "\n");
55
56 gstatus4 = (__raw_readl(S3C2410_BANKCON7) & 0x3) << 30;
57 gstatus4 |= (__raw_readl(S3C2410_BANKCON6) & 0x3) << 28;
58 gstatus4 |= (__raw_readl(S3C2410_BANKSIZE) & S3C2410_BANKSIZE_MASK);
59
60 __raw_writel(gstatus4, S3C2410_GSTATUS4);
61
62 return s3c2410_pm_init();
63}
64
65arch_initcall(pm_simtec_init);
diff --git a/arch/arm/mach-s3c2410/s3c2440-clock.c b/arch/arm/mach-s3c2410/s3c2440-clock.c
new file mode 100644
index 000000000000..b018a1f680ce
--- /dev/null
+++ b/arch/arm/mach-s3c2410/s3c2440-clock.c
@@ -0,0 +1,116 @@
1/* linux/arch/arm/mach-s3c2410/s3c2440-clock.c
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C2440 Clock support
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22*/
23
24#include <linux/init.h>
25#include <linux/module.h>
26#include <linux/kernel.h>
27#include <linux/list.h>
28#include <linux/errno.h>
29#include <linux/err.h>
30#include <linux/device.h>
31#include <linux/sysdev.h>
32
33#include <linux/interrupt.h>
34#include <linux/ioport.h>
35
36#include <asm/hardware.h>
37#include <asm/atomic.h>
38#include <asm/irq.h>
39#include <asm/io.h>
40
41#include <asm/hardware/clock.h>
42#include <asm/arch/regs-clock.h>
43
44#include "clock.h"
45#include "cpu.h"
46
47/* S3C2440 extended clock support */
48
49static struct clk s3c2440_clk_upll = {
50 .name = "upll",
51 .id = -1,
52};
53
54static struct clk s3c2440_clk_cam = {
55 .name = "camif",
56 .id = -1,
57 .enable = s3c24xx_clkcon_enable,
58 .ctrlbit = S3C2440_CLKCON_CAMERA,
59};
60
61static struct clk s3c2440_clk_ac97 = {
62 .name = "ac97",
63 .id = -1,
64 .enable = s3c24xx_clkcon_enable,
65 .ctrlbit = S3C2440_CLKCON_CAMERA,
66};
67
68static int s3c2440_clk_add(struct sys_device *sysdev)
69{
70 unsigned long upllcon = __raw_readl(S3C2410_UPLLCON);
71 struct clk *clk_h;
72 struct clk *clk_p;
73 struct clk *clk_xtal;
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
83 printk("S3C2440: Clock Support, UPLL %ld.%03ld MHz\n",
84 print_mhz(s3c2440_clk_upll.rate));
85
86 clk_p = clk_get(NULL, "pclk");
87 clk_h = clk_get(NULL, "hclk");
88
89 if (IS_ERR(clk_p) || IS_ERR(clk_h)) {
90 printk(KERN_ERR "S3C2440: Failed to get parent clocks\n");
91 return -EINVAL;
92 }
93
94 s3c2440_clk_cam.parent = clk_h;
95 s3c2440_clk_ac97.parent = clk_p;
96
97 s3c24xx_register_clock(&s3c2440_clk_ac97);
98 s3c24xx_register_clock(&s3c2440_clk_cam);
99 s3c24xx_register_clock(&s3c2440_clk_upll);
100
101 clk_disable(&s3c2440_clk_ac97);
102 clk_disable(&s3c2440_clk_cam);
103
104 return 0;
105}
106
107static struct sysdev_driver s3c2440_clk_driver = {
108 .add = s3c2440_clk_add,
109};
110
111static __init int s3c24xx_clk_driver(void)
112{
113 return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_clk_driver);
114}
115
116arch_initcall(s3c24xx_clk_driver);
diff --git a/arch/arm/mach-s3c2410/s3c2440-irq.c b/arch/arm/mach-s3c2410/s3c2440-irq.c
new file mode 100644
index 000000000000..7cb9912242a3
--- /dev/null
+++ b/arch/arm/mach-s3c2410/s3c2440-irq.c
@@ -0,0 +1,207 @@
1/* linux/arch/arm/mach-s3c2410/s3c2440-irq.c
2 *
3 * Copyright (c) 2003,2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
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 * Changelog:
21 * 25-Jul-2005 BJD Split from irq.c
22 *
23*/
24
25#include <linux/init.h>
26#include <linux/module.h>
27#include <linux/interrupt.h>
28#include <linux/ioport.h>
29#include <linux/ptrace.h>
30#include <linux/sysdev.h>
31
32#include <asm/hardware.h>
33#include <asm/irq.h>
34#include <asm/io.h>
35
36#include <asm/mach/irq.h>
37
38#include <asm/arch/regs-irq.h>
39#include <asm/arch/regs-gpio.h>
40
41#include "cpu.h"
42#include "pm.h"
43#include "irq.h"
44
45/* WDT/AC97 */
46
47static void s3c_irq_demux_wdtac97(unsigned int irq,
48 struct irqdesc *desc,
49 struct pt_regs *regs)
50{
51 unsigned int subsrc, submsk;
52 struct irqdesc *mydesc;
53
54 /* read the current pending interrupts, and the mask
55 * for what it is available */
56
57 subsrc = __raw_readl(S3C2410_SUBSRCPND);
58 submsk = __raw_readl(S3C2410_INTSUBMSK);
59
60 subsrc &= ~submsk;
61 subsrc >>= 13;
62 subsrc &= 3;
63
64 if (subsrc != 0) {
65 if (subsrc & 1) {
66 mydesc = irq_desc + IRQ_S3C2440_WDT;
67 mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs);
68 }
69 if (subsrc & 2) {
70 mydesc = irq_desc + IRQ_S3C2440_AC97;
71 mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs);
72 }
73 }
74}
75
76
77#define INTMSK_WDT (1UL << (IRQ_WDT - IRQ_EINT0))
78
79static void
80s3c_irq_wdtac97_mask(unsigned int irqno)
81{
82 s3c_irqsub_mask(irqno, INTMSK_WDT, 3<<13);
83}
84
85static void
86s3c_irq_wdtac97_unmask(unsigned int irqno)
87{
88 s3c_irqsub_unmask(irqno, INTMSK_WDT);
89}
90
91static void
92s3c_irq_wdtac97_ack(unsigned int irqno)
93{
94 s3c_irqsub_maskack(irqno, INTMSK_WDT, 3<<13);
95}
96
97static struct irqchip s3c_irq_wdtac97 = {
98 .mask = s3c_irq_wdtac97_mask,
99 .unmask = s3c_irq_wdtac97_unmask,
100 .ack = s3c_irq_wdtac97_ack,
101};
102
103/* camera irq */
104
105static void s3c_irq_demux_cam(unsigned int irq,
106 struct irqdesc *desc,
107 struct pt_regs *regs)
108{
109 unsigned int subsrc, submsk;
110 struct irqdesc *mydesc;
111
112 /* read the current pending interrupts, and the mask
113 * for what it is available */
114
115 subsrc = __raw_readl(S3C2410_SUBSRCPND);
116 submsk = __raw_readl(S3C2410_INTSUBMSK);
117
118 subsrc &= ~submsk;
119 subsrc >>= 11;
120 subsrc &= 3;
121
122 if (subsrc != 0) {
123 if (subsrc & 1) {
124 mydesc = irq_desc + IRQ_S3C2440_CAM_C;
125 mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs);
126 }
127 if (subsrc & 2) {
128 mydesc = irq_desc + IRQ_S3C2440_CAM_P;
129 mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs);
130 }
131 }
132}
133
134#define INTMSK_CAM (1UL << (IRQ_CAM - IRQ_EINT0))
135
136static void
137s3c_irq_cam_mask(unsigned int irqno)
138{
139 s3c_irqsub_mask(irqno, INTMSK_CAM, 3<<11);
140}
141
142static void
143s3c_irq_cam_unmask(unsigned int irqno)
144{
145 s3c_irqsub_unmask(irqno, INTMSK_CAM);
146}
147
148static void
149s3c_irq_cam_ack(unsigned int irqno)
150{
151 s3c_irqsub_maskack(irqno, INTMSK_CAM, 3<<11);
152}
153
154static struct irqchip s3c_irq_cam = {
155 .mask = s3c_irq_cam_mask,
156 .unmask = s3c_irq_cam_unmask,
157 .ack = s3c_irq_cam_ack,
158};
159
160static int s3c2440_irq_add(struct sys_device *sysdev)
161{
162 unsigned int irqno;
163
164 printk("S3C2440: IRQ Support\n");
165
166 set_irq_chip(IRQ_NFCON, &s3c_irq_level_chip);
167 set_irq_handler(IRQ_NFCON, do_level_IRQ);
168 set_irq_flags(IRQ_NFCON, IRQF_VALID);
169
170 /* add new chained handler for wdt, ac7 */
171
172 set_irq_chip(IRQ_WDT, &s3c_irq_level_chip);
173 set_irq_handler(IRQ_WDT, do_level_IRQ);
174 set_irq_chained_handler(IRQ_WDT, s3c_irq_demux_wdtac97);
175
176 for (irqno = IRQ_S3C2440_WDT; irqno <= IRQ_S3C2440_AC97; irqno++) {
177 set_irq_chip(irqno, &s3c_irq_wdtac97);
178 set_irq_handler(irqno, do_level_IRQ);
179 set_irq_flags(irqno, IRQF_VALID);
180 }
181
182 /* add chained handler for camera */
183
184 set_irq_chip(IRQ_CAM, &s3c_irq_level_chip);
185 set_irq_handler(IRQ_CAM, do_level_IRQ);
186 set_irq_chained_handler(IRQ_CAM, s3c_irq_demux_cam);
187
188 for (irqno = IRQ_S3C2440_CAM_C; irqno <= IRQ_S3C2440_CAM_P; irqno++) {
189 set_irq_chip(irqno, &s3c_irq_cam);
190 set_irq_handler(irqno, do_level_IRQ);
191 set_irq_flags(irqno, IRQF_VALID);
192 }
193
194 return 0;
195}
196
197static struct sysdev_driver s3c2440_irq_driver = {
198 .add = s3c2440_irq_add,
199};
200
201static int s3c24xx_irq_driver(void)
202{
203 return sysdev_driver_register(&s3c2440_sysclass, &s3c2440_irq_driver);
204}
205
206arch_initcall(s3c24xx_irq_driver);
207
diff --git a/arch/arm/mach-s3c2410/time.c b/arch/arm/mach-s3c2410/time.c
index 179f0e031af4..765a3a9ae032 100644
--- a/arch/arm/mach-s3c2410/time.c
+++ b/arch/arm/mach-s3c2410/time.c
@@ -137,8 +137,8 @@ s3c2410_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
137 137
138static struct irqaction s3c2410_timer_irq = { 138static struct irqaction s3c2410_timer_irq = {
139 .name = "S3C2410 Timer Tick", 139 .name = "S3C2410 Timer Tick",
140 .flags = SA_INTERRUPT, 140 .flags = SA_INTERRUPT | SA_TIMER,
141 .handler = s3c2410_timer_interrupt 141 .handler = s3c2410_timer_interrupt,
142}; 142};
143 143
144/* 144/*
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c
index bedf88fafe08..4d4d303ee3a8 100644
--- a/arch/arm/mach-sa1100/assabet.c
+++ b/arch/arm/mach-sa1100/assabet.c
@@ -431,11 +431,13 @@ static void __init assabet_map_io(void)
431 431
432 432
433MACHINE_START(ASSABET, "Intel-Assabet") 433MACHINE_START(ASSABET, "Intel-Assabet")
434 BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 434 .phys_ram = 0xc0000000,
435 BOOT_PARAMS(0xc0000100) 435 .phys_io = 0x80000000,
436 FIXUP(fixup_assabet) 436 .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
437 MAPIO(assabet_map_io) 437 .boot_params = 0xc0000100,
438 INITIRQ(sa1100_init_irq) 438 .fixup = fixup_assabet,
439 .map_io = assabet_map_io,
440 .init_irq = sa1100_init_irq,
439 .timer = &sa1100_timer, 441 .timer = &sa1100_timer,
440 .init_machine = assabet_init, 442 .init_machine = assabet_init,
441MACHINE_END 443MACHINE_END
diff --git a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c
index 6a60b497ab42..b6169cb09196 100644
--- a/arch/arm/mach-sa1100/badge4.c
+++ b/arch/arm/mach-sa1100/badge4.c
@@ -285,9 +285,11 @@ static void __init badge4_map_io(void)
285} 285}
286 286
287MACHINE_START(BADGE4, "Hewlett-Packard Laboratories BadgePAD 4") 287MACHINE_START(BADGE4, "Hewlett-Packard Laboratories BadgePAD 4")
288 BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 288 .phys_ram = 0xc0000000,
289 BOOT_PARAMS(0xc0000100) 289 .phys_io = 0x80000000,
290 MAPIO(badge4_map_io) 290 .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
291 INITIRQ(sa1100_init_irq) 291 .boot_params = 0xc0000100,
292 .map_io = badge4_map_io,
293 .init_irq = sa1100_init_irq,
292 .timer = &sa1100_timer, 294 .timer = &sa1100_timer,
293MACHINE_END 295MACHINE_END
diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c
index f8edde5e7cbf..0aa918e24c31 100644
--- a/arch/arm/mach-sa1100/cerf.c
+++ b/arch/arm/mach-sa1100/cerf.c
@@ -123,10 +123,12 @@ static void __init cerf_init(void)
123} 123}
124 124
125MACHINE_START(CERF, "Intrinsyc CerfBoard/CerfCube") 125MACHINE_START(CERF, "Intrinsyc CerfBoard/CerfCube")
126 MAINTAINER("support@intrinsyc.com") 126 /* Maintainer: support@intrinsyc.com */
127 BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 127 .phys_ram = 0xc0000000,
128 MAPIO(cerf_map_io) 128 .phys_io = 0x80000000,
129 INITIRQ(cerf_init_irq) 129 .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
130 .map_io = cerf_map_io,
131 .init_irq = cerf_init_irq,
130 .timer = &sa1100_timer, 132 .timer = &sa1100_timer,
131 .init_machine = cerf_init, 133 .init_machine = cerf_init,
132MACHINE_END 134MACHINE_END
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index 99287890d396..8cb69113a57c 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -184,9 +184,11 @@ static void __init collie_map_io(void)
184} 184}
185 185
186MACHINE_START(COLLIE, "Sharp-Collie") 186MACHINE_START(COLLIE, "Sharp-Collie")
187 BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 187 .phys_ram = 0xc0000000,
188 MAPIO(collie_map_io) 188 .phys_io = 0x80000000,
189 INITIRQ(sa1100_init_irq) 189 .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
190 .map_io = collie_map_io,
191 .init_irq = sa1100_init_irq,
190 .timer = &sa1100_timer, 192 .timer = &sa1100_timer,
191 .init_machine = collie_init, 193 .init_machine = collie_init,
192MACHINE_END 194MACHINE_END
diff --git a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c
index 8d2a89a2ea01..04c94ab6c18b 100644
--- a/arch/arm/mach-sa1100/cpu-sa1110.c
+++ b/arch/arm/mach-sa1100/cpu-sa1110.c
@@ -271,8 +271,7 @@ static int sa1110_target(struct cpufreq_policy *policy,
271 */ 271 */
272 sdram_set_refresh(2); 272 sdram_set_refresh(2);
273 if (!irqs_disabled()) { 273 if (!irqs_disabled()) {
274 set_current_state(TASK_UNINTERRUPTIBLE); 274 msleep(20);
275 schedule_timeout(20 * HZ / 1000);
276 } else { 275 } else {
277 mdelay(20); 276 mdelay(20);
278 } 277 }
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 84c86543501a..e7aa2681ca64 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -380,10 +380,12 @@ static void __init h3100_map_io(void)
380} 380}
381 381
382MACHINE_START(H3100, "Compaq iPAQ H3100") 382MACHINE_START(H3100, "Compaq iPAQ H3100")
383 BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 383 .phys_ram = 0xc0000000,
384 BOOT_PARAMS(0xc0000100) 384 .phys_io = 0x80000000,
385 MAPIO(h3100_map_io) 385 .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
386 INITIRQ(sa1100_init_irq) 386 .boot_params = 0xc0000100,
387 .map_io = h3100_map_io,
388 .init_irq = sa1100_init_irq,
387 .timer = &sa1100_timer, 389 .timer = &sa1100_timer,
388 .init_machine = h3xxx_mach_init, 390 .init_machine = h3xxx_mach_init,
389MACHINE_END 391MACHINE_END
@@ -496,10 +498,12 @@ static void __init h3600_map_io(void)
496} 498}
497 499
498MACHINE_START(H3600, "Compaq iPAQ H3600") 500MACHINE_START(H3600, "Compaq iPAQ H3600")
499 BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 501 .phys_ram = 0xc0000000,
500 BOOT_PARAMS(0xc0000100) 502 .phys_io = 0x80000000,
501 MAPIO(h3600_map_io) 503 .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
502 INITIRQ(sa1100_init_irq) 504 .boot_params = 0xc0000100,
505 .map_io = h3600_map_io,
506 .init_irq = sa1100_init_irq,
503 .timer = &sa1100_timer, 507 .timer = &sa1100_timer,
504 .init_machine = h3xxx_mach_init, 508 .init_machine = h3xxx_mach_init,
505MACHINE_END 509MACHINE_END
@@ -727,7 +731,7 @@ static void h3800_IRQ_demux(unsigned int irq, struct irqdesc *desc, struct pt_re
727static struct irqaction h3800_irq = { 731static struct irqaction h3800_irq = {
728 .name = "h3800_asic", 732 .name = "h3800_asic",
729 .handler = h3800_IRQ_demux, 733 .handler = h3800_IRQ_demux,
730 .flags = SA_INTERRUPT, 734 .flags = SA_INTERRUPT | SA_TIMER,
731}; 735};
732 736
733u32 kpio_int_shadow = 0; 737u32 kpio_int_shadow = 0;
@@ -881,10 +885,12 @@ static void __init h3800_map_io(void)
881} 885}
882 886
883MACHINE_START(H3800, "Compaq iPAQ H3800") 887MACHINE_START(H3800, "Compaq iPAQ H3800")
884 BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 888 .phys_ram = 0xc0000000,
885 BOOT_PARAMS(0xc0000100) 889 .phys_io = 0x80000000,
886 MAPIO(h3800_map_io) 890 .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
887 INITIRQ(h3800_init_irq) 891 .boot_params = 0xc0000100,
892 .map_io = h3800_map_io,
893 .init_irq = h3800_init_irq,
888 .timer = &sa1100_timer, 894 .timer = &sa1100_timer,
889 .init_machine = h3xxx_mach_init, 895 .init_machine = h3xxx_mach_init,
890MACHINE_END 896MACHINE_END
diff --git a/arch/arm/mach-sa1100/hackkit.c b/arch/arm/mach-sa1100/hackkit.c
index 570841779714..502d65cfe654 100644
--- a/arch/arm/mach-sa1100/hackkit.c
+++ b/arch/arm/mach-sa1100/hackkit.c
@@ -191,10 +191,12 @@ static void __init hackkit_init(void)
191 */ 191 */
192 192
193MACHINE_START(HACKKIT, "HackKit Cpu Board") 193MACHINE_START(HACKKIT, "HackKit Cpu Board")
194 BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 194 .phys_ram = 0xc0000000,
195 BOOT_PARAMS(0xc0000100) 195 .phys_io = 0x80000000,
196 MAPIO(hackkit_map_io) 196 .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
197 INITIRQ(sa1100_init_irq) 197 .boot_params = 0xc0000100,
198 .map_io = hackkit_map_io,
199 .init_irq = sa1100_init_irq,
198 .timer = &sa1100_timer, 200 .timer = &sa1100_timer,
199 .init_machine = hackkit_init, 201 .init_machine = hackkit_init,
200MACHINE_END 202MACHINE_END
diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c
index 6be78291a878..2f497112c96a 100644
--- a/arch/arm/mach-sa1100/jornada720.c
+++ b/arch/arm/mach-sa1100/jornada720.c
@@ -97,9 +97,12 @@ static void __init jornada720_map_io(void)
97} 97}
98 98
99MACHINE_START(JORNADA720, "HP Jornada 720") 99MACHINE_START(JORNADA720, "HP Jornada 720")
100 BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 100 /* Maintainer: Michael Gernoth <michael@gernoth.net> */
101 BOOT_PARAMS(0xc0000100) 101 .phys_ram = 0xc0000000,
102 MAPIO(jornada720_map_io) 102 .phys_io = 0x80000000,
103 INITIRQ(sa1100_init_irq) 103 .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
104 .boot_params = 0xc0000100,
105 .map_io = jornada720_map_io,
106 .init_irq = sa1100_init_irq,
104 .timer = &sa1100_timer, 107 .timer = &sa1100_timer,
105MACHINE_END 108MACHINE_END
diff --git a/arch/arm/mach-sa1100/lart.c b/arch/arm/mach-sa1100/lart.c
index 51c08ccfb8db..870b488aeda4 100644
--- a/arch/arm/mach-sa1100/lart.c
+++ b/arch/arm/mach-sa1100/lart.c
@@ -41,9 +41,11 @@ static void __init lart_map_io(void)
41} 41}
42 42
43MACHINE_START(LART, "LART") 43MACHINE_START(LART, "LART")
44 BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 44 .phys_ram = 0xc0000000,
45 BOOT_PARAMS(0xc0000100) 45 .phys_io = 0x80000000,
46 MAPIO(lart_map_io) 46 .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
47 INITIRQ(sa1100_init_irq) 47 .boot_params = 0xc0000100,
48 .map_io = lart_map_io,
49 .init_irq = sa1100_init_irq,
48 .timer = &sa1100_timer, 50 .timer = &sa1100_timer,
49MACHINE_END 51MACHINE_END
diff --git a/arch/arm/mach-sa1100/pleb.c b/arch/arm/mach-sa1100/pleb.c
index 5606bd71b024..e17b58fb9c9c 100644
--- a/arch/arm/mach-sa1100/pleb.c
+++ b/arch/arm/mach-sa1100/pleb.c
@@ -146,9 +146,11 @@ static void __init pleb_map_io(void)
146} 146}
147 147
148MACHINE_START(PLEB, "PLEB") 148MACHINE_START(PLEB, "PLEB")
149 BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 149 .phys_ram = 0xc0000000,
150 MAPIO(pleb_map_io) 150 .phys_io = 0x80000000,
151 INITIRQ(sa1100_init_irq) 151 .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
152 .map_io = pleb_map_io,
153 .init_irq = sa1100_init_irq,
152 .timer = &sa1100_timer, 154 .timer = &sa1100_timer,
153 .init_machine = pleb_init, 155 .init_machine = pleb_init,
154MACHINE_END 156MACHINE_END
diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c
index edddd559be02..43a00359fcdd 100644
--- a/arch/arm/mach-sa1100/shannon.c
+++ b/arch/arm/mach-sa1100/shannon.c
@@ -76,10 +76,12 @@ static void __init shannon_map_io(void)
76} 76}
77 77
78MACHINE_START(SHANNON, "Shannon (AKA: Tuxscreen)") 78MACHINE_START(SHANNON, "Shannon (AKA: Tuxscreen)")
79 BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 79 .phys_ram = 0xc0000000,
80 BOOT_PARAMS(0xc0000100) 80 .phys_io = 0x80000000,
81 MAPIO(shannon_map_io) 81 .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
82 INITIRQ(sa1100_init_irq) 82 .boot_params = 0xc0000100,
83 .map_io = shannon_map_io,
84 .init_irq = sa1100_init_irq,
83 .timer = &sa1100_timer, 85 .timer = &sa1100_timer,
84 .init_machine = shannon_init, 86 .init_machine = shannon_init,
85MACHINE_END 87MACHINE_END
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c
index 8d113d629867..77978586b126 100644
--- a/arch/arm/mach-sa1100/simpad.c
+++ b/arch/arm/mach-sa1100/simpad.c
@@ -215,10 +215,12 @@ arch_initcall(simpad_init);
215 215
216 216
217MACHINE_START(SIMPAD, "Simpad") 217MACHINE_START(SIMPAD, "Simpad")
218 MAINTAINER("Holger Freyther") 218 /* Maintainer: Holger Freyther */
219 BOOT_MEM(0xc0000000, 0x80000000, 0xf8000000) 219 .phys_ram = 0xc0000000,
220 BOOT_PARAMS(0xc0000100) 220 .phys_io = 0x80000000,
221 MAPIO(simpad_map_io) 221 .io_pg_offst = ((0xf8000000) >> 18) & 0xfffc,
222 INITIRQ(sa1100_init_irq) 222 .boot_params = 0xc0000100,
223 .map_io = simpad_map_io,
224 .init_irq = sa1100_init_irq,
223 .timer = &sa1100_timer, 225 .timer = &sa1100_timer,
224MACHINE_END 226MACHINE_END
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
index 19b0c0fd6377..0eeb3616ffea 100644
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -99,8 +99,8 @@ sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
99 99
100static struct irqaction sa1100_timer_irq = { 100static struct irqaction sa1100_timer_irq = {
101 .name = "SA11xx Timer Tick", 101 .name = "SA11xx Timer Tick",
102 .flags = SA_INTERRUPT, 102 .flags = SA_INTERRUPT | SA_TIMER,
103 .handler = sa1100_timer_interrupt 103 .handler = sa1100_timer_interrupt,
104}; 104};
105 105
106static void __init sa1100_timer_init(void) 106static void __init sa1100_timer_init(void)
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c
index a9bc5d0dbd85..e737eae4521f 100644
--- a/arch/arm/mach-shark/core.c
+++ b/arch/arm/mach-shark/core.c
@@ -24,7 +24,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
24 .iobase = 0x3f8, 24 .iobase = 0x3f8,
25 .irq = 4, 25 .irq = 4,
26 .uartclk = 1843200, 26 .uartclk = 1843200,
27 .regshift = 2, 27 .regshift = 0,
28 .iotype = UPIO_PORT, 28 .iotype = UPIO_PORT,
29 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, 29 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
30 }, 30 },
@@ -32,7 +32,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
32 .iobase = 0x2f8, 32 .iobase = 0x2f8,
33 .irq = 3, 33 .irq = 3,
34 .uartclk = 1843200, 34 .uartclk = 1843200,
35 .regshift = 2, 35 .regshift = 0,
36 .iotype = UPIO_PORT, 36 .iotype = UPIO_PORT,
37 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, 37 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
38 }, 38 },
@@ -84,8 +84,8 @@ shark_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
84 84
85static struct irqaction shark_timer_irq = { 85static struct irqaction shark_timer_irq = {
86 .name = "Shark Timer Tick", 86 .name = "Shark Timer Tick",
87 .flags = SA_INTERRUPT, 87 .flags = SA_INTERRUPT | SA_TIMER,
88 .handler = shark_timer_interrupt 88 .handler = shark_timer_interrupt,
89}; 89};
90 90
91/* 91/*
@@ -105,10 +105,12 @@ static struct sys_timer shark_timer = {
105}; 105};
106 106
107MACHINE_START(SHARK, "Shark") 107MACHINE_START(SHARK, "Shark")
108 MAINTAINER("Alexander Schulz") 108 /* Maintainer: Alexander Schulz */
109 BOOT_MEM(0x08000000, 0x40000000, 0xe0000000) 109 .phys_ram = 0x08000000,
110 BOOT_PARAMS(0x08003000) 110 .phys_io = 0x40000000,
111 MAPIO(shark_map_io) 111 .io_pg_offst = ((0xe0000000) >> 18) & 0xfffc,
112 INITIRQ(shark_init_irq) 112 .boot_params = 0x08003000,
113 .map_io = shark_map_io,
114 .init_irq = shark_init_irq,
113 .timer = &shark_timer, 115 .timer = &shark_timer,
114MACHINE_END 116MACHINE_END
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 6a7cbea5e098..f01c0f8a2bb3 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -33,6 +33,7 @@
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/hardware/amba.h> 34#include <asm/hardware/amba.h>
35#include <asm/hardware/amba_clcd.h> 35#include <asm/hardware/amba_clcd.h>
36#include <asm/hardware/arm_timer.h>
36#include <asm/hardware/icst307.h> 37#include <asm/hardware/icst307.h>
37 38
38#include <asm/mach/arch.h> 39#include <asm/mach/arch.h>
@@ -788,38 +789,25 @@ void __init versatile_init(void)
788 */ 789 */
789#define TIMER_INTERVAL (TICKS_PER_uSEC * mSEC_10) 790#define TIMER_INTERVAL (TICKS_PER_uSEC * mSEC_10)
790#if TIMER_INTERVAL >= 0x100000 791#if TIMER_INTERVAL >= 0x100000
791#define TIMER_RELOAD (TIMER_INTERVAL >> 8) /* Divide by 256 */ 792#define TIMER_RELOAD (TIMER_INTERVAL >> 8)
792#define TIMER_CTRL 0x88 /* Enable, Clock / 256 */ 793#define TIMER_DIVISOR (TIMER_CTRL_DIV256)
793#define TICKS2USECS(x) (256 * (x) / TICKS_PER_uSEC) 794#define TICKS2USECS(x) (256 * (x) / TICKS_PER_uSEC)
794#elif TIMER_INTERVAL >= 0x10000 795#elif TIMER_INTERVAL >= 0x10000
795#define TIMER_RELOAD (TIMER_INTERVAL >> 4) /* Divide by 16 */ 796#define TIMER_RELOAD (TIMER_INTERVAL >> 4) /* Divide by 16 */
796#define TIMER_CTRL 0x84 /* Enable, Clock / 16 */ 797#define TIMER_DIVISOR (TIMER_CTRL_DIV16)
797#define TICKS2USECS(x) (16 * (x) / TICKS_PER_uSEC) 798#define TICKS2USECS(x) (16 * (x) / TICKS_PER_uSEC)
798#else 799#else
799#define TIMER_RELOAD (TIMER_INTERVAL) 800#define TIMER_RELOAD (TIMER_INTERVAL)
800#define TIMER_CTRL 0x80 /* Enable */ 801#define TIMER_DIVISOR (TIMER_CTRL_DIV1)
801#define TICKS2USECS(x) ((x) / TICKS_PER_uSEC) 802#define TICKS2USECS(x) ((x) / TICKS_PER_uSEC)
802#endif 803#endif
803 804
804#define TIMER_CTRL_IE (1 << 5) /* Interrupt Enable */
805
806/*
807 * What does it look like?
808 */
809typedef struct TimerStruct {
810 unsigned long TimerLoad;
811 unsigned long TimerValue;
812 unsigned long TimerControl;
813 unsigned long TimerClear;
814} TimerStruct_t;
815
816/* 805/*
817 * Returns number of ms since last clock interrupt. Note that interrupts 806 * Returns number of ms since last clock interrupt. Note that interrupts
818 * will have been disabled by do_gettimeoffset() 807 * will have been disabled by do_gettimeoffset()
819 */ 808 */
820static unsigned long versatile_gettimeoffset(void) 809static unsigned long versatile_gettimeoffset(void)
821{ 810{
822 volatile TimerStruct_t *timer0 = (TimerStruct_t *)TIMER0_VA_BASE;
823 unsigned long ticks1, ticks2, status; 811 unsigned long ticks1, ticks2, status;
824 812
825 /* 813 /*
@@ -828,11 +816,11 @@ static unsigned long versatile_gettimeoffset(void)
828 * an interrupt. We get around this by ensuring that the 816 * an interrupt. We get around this by ensuring that the
829 * counter has not reloaded between our two reads. 817 * counter has not reloaded between our two reads.
830 */ 818 */
831 ticks2 = timer0->TimerValue & 0xffff; 819 ticks2 = readl(TIMER0_VA_BASE + TIMER_VALUE) & 0xffff;
832 do { 820 do {
833 ticks1 = ticks2; 821 ticks1 = ticks2;
834 status = __raw_readl(VA_IC_BASE + VIC_IRQ_RAW_STATUS); 822 status = __raw_readl(VA_IC_BASE + VIC_IRQ_RAW_STATUS);
835 ticks2 = timer0->TimerValue & 0xffff; 823 ticks2 = readl(TIMER0_VA_BASE + TIMER_VALUE) & 0xffff;
836 } while (ticks2 > ticks1); 824 } while (ticks2 > ticks1);
837 825
838 /* 826 /*
@@ -859,12 +847,10 @@ static unsigned long versatile_gettimeoffset(void)
859 */ 847 */
860static irqreturn_t versatile_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 848static irqreturn_t versatile_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
861{ 849{
862 volatile TimerStruct_t *timer0 = (volatile TimerStruct_t *)TIMER0_VA_BASE;
863
864 write_seqlock(&xtime_lock); 850 write_seqlock(&xtime_lock);
865 851
866 // ...clear the interrupt 852 // ...clear the interrupt
867 timer0->TimerClear = 1; 853 writel(1, TIMER0_VA_BASE + TIMER_INTCLR);
868 854
869 timer_tick(regs); 855 timer_tick(regs);
870 856
@@ -875,8 +861,8 @@ static irqreturn_t versatile_timer_interrupt(int irq, void *dev_id, struct pt_re
875 861
876static struct irqaction versatile_timer_irq = { 862static struct irqaction versatile_timer_irq = {
877 .name = "Versatile Timer Tick", 863 .name = "Versatile Timer Tick",
878 .flags = SA_INTERRUPT, 864 .flags = SA_INTERRUPT | SA_TIMER,
879 .handler = versatile_timer_interrupt 865 .handler = versatile_timer_interrupt,
880}; 866};
881 867
882/* 868/*
@@ -884,31 +870,32 @@ static struct irqaction versatile_timer_irq = {
884 */ 870 */
885static void __init versatile_timer_init(void) 871static void __init versatile_timer_init(void)
886{ 872{
887 volatile TimerStruct_t *timer0 = (volatile TimerStruct_t *)TIMER0_VA_BASE; 873 u32 val;
888 volatile TimerStruct_t *timer1 = (volatile TimerStruct_t *)TIMER1_VA_BASE;
889 volatile TimerStruct_t *timer2 = (volatile TimerStruct_t *)TIMER2_VA_BASE;
890 volatile TimerStruct_t *timer3 = (volatile TimerStruct_t *)TIMER3_VA_BASE;
891 874
892 /* 875 /*
893 * set clock frequency: 876 * set clock frequency:
894 * VERSATILE_REFCLK is 32KHz 877 * VERSATILE_REFCLK is 32KHz
895 * VERSATILE_TIMCLK is 1MHz 878 * VERSATILE_TIMCLK is 1MHz
896 */ 879 */
897 *(volatile unsigned int *)IO_ADDRESS(VERSATILE_SCTL_BASE) |= 880 val = readl(IO_ADDRESS(VERSATILE_SCTL_BASE));
898 ((VERSATILE_TIMCLK << VERSATILE_TIMER1_EnSel) | (VERSATILE_TIMCLK << VERSATILE_TIMER2_EnSel) | 881 writel((VERSATILE_TIMCLK << VERSATILE_TIMER1_EnSel) |
899 (VERSATILE_TIMCLK << VERSATILE_TIMER3_EnSel) | (VERSATILE_TIMCLK << VERSATILE_TIMER4_EnSel)); 882 (VERSATILE_TIMCLK << VERSATILE_TIMER2_EnSel) |
883 (VERSATILE_TIMCLK << VERSATILE_TIMER3_EnSel) |
884 (VERSATILE_TIMCLK << VERSATILE_TIMER4_EnSel) | val,
885 IO_ADDRESS(VERSATILE_SCTL_BASE));
900 886
901 /* 887 /*
902 * Initialise to a known state (all timers off) 888 * Initialise to a known state (all timers off)
903 */ 889 */
904 timer0->TimerControl = 0; 890 writel(0, TIMER0_VA_BASE + TIMER_CTRL);
905 timer1->TimerControl = 0; 891 writel(0, TIMER1_VA_BASE + TIMER_CTRL);
906 timer2->TimerControl = 0; 892 writel(0, TIMER2_VA_BASE + TIMER_CTRL);
907 timer3->TimerControl = 0; 893 writel(0, TIMER3_VA_BASE + TIMER_CTRL);
908 894
909 timer0->TimerLoad = TIMER_RELOAD; 895 writel(TIMER_RELOAD, TIMER0_VA_BASE + TIMER_LOAD);
910 timer0->TimerValue = TIMER_RELOAD; 896 writel(TIMER_RELOAD, TIMER0_VA_BASE + TIMER_VALUE);
911 timer0->TimerControl = TIMER_CTRL | 0x40 | TIMER_CTRL_IE; /* periodic + IE */ 897 writel(TIMER_DIVISOR | TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC |
898 TIMER_CTRL_IE, TIMER0_VA_BASE + TIMER_CTRL);
912 899
913 /* 900 /*
914 * Make irqs happen for the system timer 901 * Make irqs happen for the system timer
diff --git a/arch/arm/mach-versatile/versatile_ab.c b/arch/arm/mach-versatile/versatile_ab.c
index d332084586cf..8b0b3bef24ae 100644
--- a/arch/arm/mach-versatile/versatile_ab.c
+++ b/arch/arm/mach-versatile/versatile_ab.c
@@ -35,11 +35,13 @@
35#include "core.h" 35#include "core.h"
36 36
37MACHINE_START(VERSATILE_AB, "ARM-Versatile AB") 37MACHINE_START(VERSATILE_AB, "ARM-Versatile AB")
38 MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") 38 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
39 BOOT_MEM(0x00000000, 0x101f1000, 0xf11f1000) 39 .phys_ram = 0x00000000,
40 BOOT_PARAMS(0x00000100) 40 .phys_io = 0x101f1000,
41 MAPIO(versatile_map_io) 41 .io_pg_offst = ((0xf11f1000) >> 18) & 0xfffc,
42 INITIRQ(versatile_init_irq) 42 .boot_params = 0x00000100,
43 .map_io = versatile_map_io,
44 .init_irq = versatile_init_irq,
43 .timer = &versatile_timer, 45 .timer = &versatile_timer,
44 INIT_MACHINE(versatile_init) 46 .init_machine = versatile_init,
45MACHINE_END 47MACHINE_END
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c
index 2702099a68f3..7c3078c38916 100644
--- a/arch/arm/mach-versatile/versatile_pb.c
+++ b/arch/arm/mach-versatile/versatile_pb.c
@@ -99,11 +99,13 @@ static int __init versatile_pb_init(void)
99arch_initcall(versatile_pb_init); 99arch_initcall(versatile_pb_init);
100 100
101MACHINE_START(VERSATILE_PB, "ARM-Versatile PB") 101MACHINE_START(VERSATILE_PB, "ARM-Versatile PB")
102 MAINTAINER("ARM Ltd/Deep Blue Solutions Ltd") 102 /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
103 BOOT_MEM(0x00000000, 0x101f1000, 0xf11f1000) 103 .phys_ram = 0x00000000,
104 BOOT_PARAMS(0x00000100) 104 .phys_io = 0x101f1000,
105 MAPIO(versatile_map_io) 105 .io_pg_offst = ((0xf11f1000) >> 18) & 0xfffc,
106 INITIRQ(versatile_init_irq) 106 .boot_params = 0x00000100,
107 .map_io = versatile_map_io,
108 .init_irq = versatile_init_irq,
107 .timer = &versatile_timer, 109 .timer = &versatile_timer,
108 INIT_MACHINE(versatile_init) 110 .init_machine = versatile_init,
109MACHINE_END 111MACHINE_END
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 95606b4a3ba6..afbbeb6f4658 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -101,7 +101,7 @@ config CPU_ARM922T
101 101
102# ARM925T 102# ARM925T
103config CPU_ARM925T 103config CPU_ARM925T
104 bool "Support ARM925T processor" if ARCH_OMAP 104 bool "Support ARM925T processor" if ARCH_OMAP1
105 depends on ARCH_OMAP1510 105 depends on ARCH_OMAP1510
106 default y if ARCH_OMAP1510 106 default y if ARCH_OMAP1510
107 select CPU_32v4 107 select CPU_32v4
diff --git a/arch/arm/mm/blockops.c b/arch/arm/mm/blockops.c
index 806c6eeb1b0c..4f5ee2d08996 100644
--- a/arch/arm/mm/blockops.c
+++ b/arch/arm/mm/blockops.c
@@ -25,13 +25,14 @@ blk_flush_kern_dcache_page(void *kaddr)
25{ 25{
26 asm( 26 asm(
27 "add r1, r0, %0 \n\ 27 "add r1, r0, %0 \n\
28 sub r1, r1, %1 \n\
281: .word 0xec401f0e @ mcrr p15, 0, r0, r1, c14, 0 @ blocking \n\ 291: .word 0xec401f0e @ mcrr p15, 0, r0, r1, c14, 0 @ blocking \n\
29 mov r0, #0 \n\ 30 mov r0, #0 \n\
30 mcr p15, 0, r0, c7, c5, 0 \n\ 31 mcr p15, 0, r0, c7, c5, 0 \n\
31 mcr p15, 0, r0, c7, c10, 4 \n\ 32 mcr p15, 0, r0, c7, c10, 4 \n\
32 mov pc, lr" 33 mov pc, lr"
33 : 34 :
34 : "I" (PAGE_SIZE)); 35 : "I" (PAGE_SIZE), "I" (L1_CACHE_BYTES));
35} 36}
36 37
37/* 38/*
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index e25b4fd8412c..0b6c4db44e08 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -238,9 +238,9 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
238 up_read(&mm->mmap_sem); 238 up_read(&mm->mmap_sem);
239 239
240 /* 240 /*
241 * Handle the "normal" case first 241 * Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR
242 */ 242 */
243 if (fault > 0) 243 if (fault >= VM_FAULT_MINOR)
244 return 0; 244 return 0;
245 245
246 /* 246 /*
@@ -261,7 +261,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
261 do_exit(SIGKILL); 261 do_exit(SIGKILL);
262 return 0; 262 return 0;
263 263
264 case 0: 264 case VM_FAULT_SIGBUS:
265 /* 265 /*
266 * We had some memory, but were unable to 266 * We had some memory, but were unable to
267 * successfully fix up this page fault. 267 * successfully fix up this page fault.
@@ -372,49 +372,50 @@ do_bad(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
372static struct fsr_info { 372static struct fsr_info {
373 int (*fn)(unsigned long addr, unsigned int fsr, struct pt_regs *regs); 373 int (*fn)(unsigned long addr, unsigned int fsr, struct pt_regs *regs);
374 int sig; 374 int sig;
375 int code;
375 const char *name; 376 const char *name;
376} fsr_info[] = { 377} fsr_info[] = {
377 /* 378 /*
378 * The following are the standard ARMv3 and ARMv4 aborts. ARMv5 379 * The following are the standard ARMv3 and ARMv4 aborts. ARMv5
379 * defines these to be "precise" aborts. 380 * defines these to be "precise" aborts.
380 */ 381 */
381 { do_bad, SIGSEGV, "vector exception" }, 382 { do_bad, SIGSEGV, 0, "vector exception" },
382 { do_bad, SIGILL, "alignment exception" }, 383 { do_bad, SIGILL, BUS_ADRALN, "alignment exception" },
383 { do_bad, SIGKILL, "terminal exception" }, 384 { do_bad, SIGKILL, 0, "terminal exception" },
384 { do_bad, SIGILL, "alignment exception" }, 385 { do_bad, SIGILL, BUS_ADRALN, "alignment exception" },
385 { do_bad, SIGBUS, "external abort on linefetch" }, 386 { do_bad, SIGBUS, 0, "external abort on linefetch" },
386 { do_translation_fault, SIGSEGV, "section translation fault" }, 387 { do_translation_fault, SIGSEGV, SEGV_MAPERR, "section translation fault" },
387 { do_bad, SIGBUS, "external abort on linefetch" }, 388 { do_bad, SIGBUS, 0, "external abort on linefetch" },
388 { do_page_fault, SIGSEGV, "page translation fault" }, 389 { do_page_fault, SIGSEGV, SEGV_MAPERR, "page translation fault" },
389 { do_bad, SIGBUS, "external abort on non-linefetch" }, 390 { do_bad, SIGBUS, 0, "external abort on non-linefetch" },
390 { do_bad, SIGSEGV, "section domain fault" }, 391 { do_bad, SIGSEGV, SEGV_ACCERR, "section domain fault" },
391 { do_bad, SIGBUS, "external abort on non-linefetch" }, 392 { do_bad, SIGBUS, 0, "external abort on non-linefetch" },
392 { do_bad, SIGSEGV, "page domain fault" }, 393 { do_bad, SIGSEGV, SEGV_ACCERR, "page domain fault" },
393 { do_bad, SIGBUS, "external abort on translation" }, 394 { do_bad, SIGBUS, 0, "external abort on translation" },
394 { do_sect_fault, SIGSEGV, "section permission fault" }, 395 { do_sect_fault, SIGSEGV, SEGV_ACCERR, "section permission fault" },
395 { do_bad, SIGBUS, "external abort on translation" }, 396 { do_bad, SIGBUS, 0, "external abort on translation" },
396 { do_page_fault, SIGSEGV, "page permission fault" }, 397 { do_page_fault, SIGSEGV, SEGV_ACCERR, "page permission fault" },
397 /* 398 /*
398 * The following are "imprecise" aborts, which are signalled by bit 399 * The following are "imprecise" aborts, which are signalled by bit
399 * 10 of the FSR, and may not be recoverable. These are only 400 * 10 of the FSR, and may not be recoverable. These are only
400 * supported if the CPU abort handler supports bit 10. 401 * supported if the CPU abort handler supports bit 10.
401 */ 402 */
402 { do_bad, SIGBUS, "unknown 16" }, 403 { do_bad, SIGBUS, 0, "unknown 16" },
403 { do_bad, SIGBUS, "unknown 17" }, 404 { do_bad, SIGBUS, 0, "unknown 17" },
404 { do_bad, SIGBUS, "unknown 18" }, 405 { do_bad, SIGBUS, 0, "unknown 18" },
405 { do_bad, SIGBUS, "unknown 19" }, 406 { do_bad, SIGBUS, 0, "unknown 19" },
406 { do_bad, SIGBUS, "lock abort" }, /* xscale */ 407 { do_bad, SIGBUS, 0, "lock abort" }, /* xscale */
407 { do_bad, SIGBUS, "unknown 21" }, 408 { do_bad, SIGBUS, 0, "unknown 21" },
408 { do_bad, SIGBUS, "imprecise external abort" }, /* xscale */ 409 { do_bad, SIGBUS, BUS_OBJERR, "imprecise external abort" }, /* xscale */
409 { do_bad, SIGBUS, "unknown 23" }, 410 { do_bad, SIGBUS, 0, "unknown 23" },
410 { do_bad, SIGBUS, "dcache parity error" }, /* xscale */ 411 { do_bad, SIGBUS, 0, "dcache parity error" }, /* xscale */
411 { do_bad, SIGBUS, "unknown 25" }, 412 { do_bad, SIGBUS, 0, "unknown 25" },
412 { do_bad, SIGBUS, "unknown 26" }, 413 { do_bad, SIGBUS, 0, "unknown 26" },
413 { do_bad, SIGBUS, "unknown 27" }, 414 { do_bad, SIGBUS, 0, "unknown 27" },
414 { do_bad, SIGBUS, "unknown 28" }, 415 { do_bad, SIGBUS, 0, "unknown 28" },
415 { do_bad, SIGBUS, "unknown 29" }, 416 { do_bad, SIGBUS, 0, "unknown 29" },
416 { do_bad, SIGBUS, "unknown 30" }, 417 { do_bad, SIGBUS, 0, "unknown 30" },
417 { do_bad, SIGBUS, "unknown 31" } 418 { do_bad, SIGBUS, 0, "unknown 31" }
418}; 419};
419 420
420void __init 421void __init
@@ -435,15 +436,19 @@ asmlinkage void
435do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs) 436do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
436{ 437{
437 const struct fsr_info *inf = fsr_info + (fsr & 15) + ((fsr & (1 << 10)) >> 6); 438 const struct fsr_info *inf = fsr_info + (fsr & 15) + ((fsr & (1 << 10)) >> 6);
439 struct siginfo info;
438 440
439 if (!inf->fn(addr, fsr, regs)) 441 if (!inf->fn(addr, fsr, regs))
440 return; 442 return;
441 443
442 printk(KERN_ALERT "Unhandled fault: %s (0x%03x) at 0x%08lx\n", 444 printk(KERN_ALERT "Unhandled fault: %s (0x%03x) at 0x%08lx\n",
443 inf->name, fsr, addr); 445 inf->name, fsr, addr);
444 force_sig(inf->sig, current); 446
445 show_pte(current->mm, addr); 447 info.si_signo = inf->sig;
446 die_if_kernel("Oops", regs, 0); 448 info.si_errno = 0;
449 info.si_code = inf->code;
450 info.si_addr = (void __user *)addr;
451 notify_die("", regs, &info, fsr, 0);
447} 452}
448 453
449asmlinkage void 454asmlinkage void
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 72a2b8cee319..edffa47a4b2a 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -93,14 +93,7 @@ struct node_info {
93}; 93};
94 94
95#define O_PFN_DOWN(x) ((x) >> PAGE_SHIFT) 95#define O_PFN_DOWN(x) ((x) >> PAGE_SHIFT)
96#define V_PFN_DOWN(x) O_PFN_DOWN(__pa(x))
97
98#define O_PFN_UP(x) (PAGE_ALIGN(x) >> PAGE_SHIFT) 96#define O_PFN_UP(x) (PAGE_ALIGN(x) >> PAGE_SHIFT)
99#define V_PFN_UP(x) O_PFN_UP(__pa(x))
100
101#define PFN_SIZE(x) ((x) >> PAGE_SHIFT)
102#define PFN_RANGE(s,e) PFN_SIZE(PAGE_ALIGN((unsigned long)(e)) - \
103 (((unsigned long)(s)) & PAGE_MASK))
104 97
105/* 98/*
106 * FIXME: We really want to avoid allocating the bootmap bitmap 99 * FIXME: We really want to avoid allocating the bootmap bitmap
@@ -113,7 +106,7 @@ find_bootmap_pfn(int node, struct meminfo *mi, unsigned int bootmap_pages)
113{ 106{
114 unsigned int start_pfn, bank, bootmap_pfn; 107 unsigned int start_pfn, bank, bootmap_pfn;
115 108
116 start_pfn = V_PFN_UP(&_end); 109 start_pfn = O_PFN_UP(__pa(&_end));
117 bootmap_pfn = 0; 110 bootmap_pfn = 0;
118 111
119 for (bank = 0; bank < mi->nr_banks; bank ++) { 112 for (bank = 0; bank < mi->nr_banks; bank ++) {
@@ -122,9 +115,9 @@ find_bootmap_pfn(int node, struct meminfo *mi, unsigned int bootmap_pages)
122 if (mi->bank[bank].node != node) 115 if (mi->bank[bank].node != node)
123 continue; 116 continue;
124 117
125 start = O_PFN_UP(mi->bank[bank].start); 118 start = mi->bank[bank].start >> PAGE_SHIFT;
126 end = O_PFN_DOWN(mi->bank[bank].size + 119 end = (mi->bank[bank].size +
127 mi->bank[bank].start); 120 mi->bank[bank].start) >> PAGE_SHIFT;
128 121
129 if (end < start_pfn) 122 if (end < start_pfn)
130 continue; 123 continue;
@@ -191,8 +184,8 @@ find_memend_and_nodes(struct meminfo *mi, struct node_info *np)
191 /* 184 /*
192 * Get the start and end pfns for this bank 185 * Get the start and end pfns for this bank
193 */ 186 */
194 start = O_PFN_UP(mi->bank[i].start); 187 start = mi->bank[i].start >> PAGE_SHIFT;
195 end = O_PFN_DOWN(mi->bank[i].start + mi->bank[i].size); 188 end = (mi->bank[i].start + mi->bank[i].size) >> PAGE_SHIFT;
196 189
197 if (np[node].start > start) 190 if (np[node].start > start)
198 np[node].start = start; 191 np[node].start = start;
@@ -444,7 +437,7 @@ void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc)
444 memtable_init(mi); 437 memtable_init(mi);
445 if (mdesc->map_io) 438 if (mdesc->map_io)
446 mdesc->map_io(); 439 mdesc->map_io();
447 flush_tlb_all(); 440 local_flush_tlb_all();
448 441
449 /* 442 /*
450 * initialise the zones within each node 443 * initialise the zones within each node
@@ -529,6 +522,69 @@ static inline void free_area(unsigned long addr, unsigned long end, char *s)
529 printk(KERN_INFO "Freeing %s memory: %dK\n", s, size); 522 printk(KERN_INFO "Freeing %s memory: %dK\n", s, size);
530} 523}
531 524
525static inline void
526free_memmap(int node, unsigned long start_pfn, unsigned long end_pfn)
527{
528 struct page *start_pg, *end_pg;
529 unsigned long pg, pgend;
530
531 /*
532 * Convert start_pfn/end_pfn to a struct page pointer.
533 */
534 start_pg = pfn_to_page(start_pfn);
535 end_pg = pfn_to_page(end_pfn);
536
537 /*
538 * Convert to physical addresses, and
539 * round start upwards and end downwards.
540 */
541 pg = PAGE_ALIGN(__pa(start_pg));
542 pgend = __pa(end_pg) & PAGE_MASK;
543
544 /*
545 * If there are free pages between these,
546 * free the section of the memmap array.
547 */
548 if (pg < pgend)
549 free_bootmem_node(NODE_DATA(node), pg, pgend - pg);
550}
551
552/*
553 * The mem_map array can get very big. Free the unused area of the memory map.
554 */
555static void __init free_unused_memmap_node(int node, struct meminfo *mi)
556{
557 unsigned long bank_start, prev_bank_end = 0;
558 unsigned int i;
559
560 /*
561 * [FIXME] This relies on each bank being in address order. This
562 * may not be the case, especially if the user has provided the
563 * information on the command line.
564 */
565 for (i = 0; i < mi->nr_banks; i++) {
566 if (mi->bank[i].size == 0 || mi->bank[i].node != node)
567 continue;
568
569 bank_start = mi->bank[i].start >> PAGE_SHIFT;
570 if (bank_start < prev_bank_end) {
571 printk(KERN_ERR "MEM: unordered memory banks. "
572 "Not freeing memmap.\n");
573 break;
574 }
575
576 /*
577 * If we had a previous bank, and there is a space
578 * between the current bank and the previous, free it.
579 */
580 if (prev_bank_end && prev_bank_end != bank_start)
581 free_memmap(node, prev_bank_end, bank_start);
582
583 prev_bank_end = (mi->bank[i].start +
584 mi->bank[i].size) >> PAGE_SHIFT;
585 }
586}
587
532/* 588/*
533 * mem_init() marks the free areas in the mem_map and tells us how much 589 * mem_init() marks the free areas in the mem_map and tells us how much
534 * memory is free. This is done after various parts of the system have 590 * memory is free. This is done after various parts of the system have
@@ -547,16 +603,12 @@ void __init mem_init(void)
547 max_mapnr = virt_to_page(high_memory) - mem_map; 603 max_mapnr = virt_to_page(high_memory) - mem_map;
548#endif 604#endif
549 605
550 /*
551 * We may have non-contiguous memory.
552 */
553 if (meminfo.nr_banks != 1)
554 create_memmap_holes(&meminfo);
555
556 /* this will put all unused low memory onto the freelists */ 606 /* this will put all unused low memory onto the freelists */
557 for_each_online_node(node) { 607 for_each_online_node(node) {
558 pg_data_t *pgdat = NODE_DATA(node); 608 pg_data_t *pgdat = NODE_DATA(node);
559 609
610 free_unused_memmap_node(node, &meminfo);
611
560 if (pgdat->node_spanned_pages != 0) 612 if (pgdat->node_spanned_pages != 0)
561 totalram_pages += free_all_bootmem_node(pgdat); 613 totalram_pages += free_all_bootmem_node(pgdat);
562 } 614 }
diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c
index 2c2b93d77d43..e33fe4229d05 100644
--- a/arch/arm/mm/mm-armv.c
+++ b/arch/arm/mm/mm-armv.c
@@ -169,7 +169,14 @@ pgd_t *get_pgd_slow(struct mm_struct *mm)
169 169
170 memzero(new_pgd, FIRST_KERNEL_PGD_NR * sizeof(pgd_t)); 170 memzero(new_pgd, FIRST_KERNEL_PGD_NR * sizeof(pgd_t));
171 171
172 /*
173 * Copy over the kernel and IO PGD entries
174 */
172 init_pgd = pgd_offset_k(0); 175 init_pgd = pgd_offset_k(0);
176 memcpy(new_pgd + FIRST_KERNEL_PGD_NR, init_pgd + FIRST_KERNEL_PGD_NR,
177 (PTRS_PER_PGD - FIRST_KERNEL_PGD_NR) * sizeof(pgd_t));
178
179 clean_dcache_area(new_pgd, PTRS_PER_PGD * sizeof(pgd_t));
173 180
174 if (!vectors_high()) { 181 if (!vectors_high()) {
175 /* 182 /*
@@ -198,14 +205,6 @@ pgd_t *get_pgd_slow(struct mm_struct *mm)
198 spin_unlock(&mm->page_table_lock); 205 spin_unlock(&mm->page_table_lock);
199 } 206 }
200 207
201 /*
202 * Copy over the kernel and IO PGD entries
203 */
204 memcpy(new_pgd + FIRST_KERNEL_PGD_NR, init_pgd + FIRST_KERNEL_PGD_NR,
205 (PTRS_PER_PGD - FIRST_KERNEL_PGD_NR) * sizeof(pgd_t));
206
207 clean_dcache_area(new_pgd, PTRS_PER_PGD * sizeof(pgd_t));
208
209 return new_pgd; 208 return new_pgd;
210 209
211no_pte: 210no_pte:
@@ -400,7 +399,7 @@ static void __init build_mem_type_table(void)
400 ecc_mask = 0; 399 ecc_mask = 0;
401 } 400 }
402 401
403 if (cpu_arch <= CPU_ARCH_ARMv5) { 402 if (cpu_arch <= CPU_ARCH_ARMv5TEJ) {
404 for (i = 0; i < ARRAY_SIZE(mem_types); i++) { 403 for (i = 0; i < ARRAY_SIZE(mem_types); i++) {
405 if (mem_types[i].prot_l1) 404 if (mem_types[i].prot_l1)
406 mem_types[i].prot_l1 |= PMD_BIT4; 405 mem_types[i].prot_l1 |= PMD_BIT4;
@@ -426,6 +425,9 @@ static void __init build_mem_type_table(void)
426 mem_types[MT_ROM].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; 425 mem_types[MT_ROM].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE;
427 mem_types[MT_MINICLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; 426 mem_types[MT_MINICLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE;
428 mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE; 427 mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE;
428
429 mem_types[MT_DEVICE].prot_pte |= L_PTE_BUFFERABLE;
430 mem_types[MT_DEVICE].prot_sect |= PMD_SECT_BUFFERED;
429 } 431 }
430 432
431 cp = &cache_policies[cachepolicy]; 433 cp = &cache_policies[cachepolicy];
@@ -585,7 +587,7 @@ void setup_mm_for_reboot(char mode)
585 pmdval = (i << PGDIR_SHIFT) | 587 pmdval = (i << PGDIR_SHIFT) |
586 PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | 588 PMD_SECT_AP_WRITE | PMD_SECT_AP_READ |
587 PMD_TYPE_SECT; 589 PMD_TYPE_SECT;
588 if (cpu_arch <= CPU_ARCH_ARMv5) 590 if (cpu_arch <= CPU_ARCH_ARMv5TEJ)
589 pmdval |= PMD_BIT4; 591 pmdval |= PMD_BIT4;
590 pmd = pmd_off(pgd, i << PGDIR_SHIFT); 592 pmd = pmd_off(pgd, i << PGDIR_SHIFT);
591 pmd[0] = __pmd(pmdval); 593 pmd[0] = __pmd(pmdval);
@@ -683,7 +685,7 @@ void __init memtable_init(struct meminfo *mi)
683 } 685 }
684 686
685 flush_cache_all(); 687 flush_cache_all();
686 flush_tlb_all(); 688 local_flush_tlb_all();
687 689
688 top_pmd = pmd_off_k(0xffff0000); 690 top_pmd = pmd_off_k(0xffff0000);
689} 691}
@@ -698,75 +700,3 @@ void __init iotable_init(struct map_desc *io_desc, int nr)
698 for (i = 0; i < nr; i++) 700 for (i = 0; i < nr; i++)
699 create_mapping(io_desc + i); 701 create_mapping(io_desc + i);
700} 702}
701
702static inline void
703free_memmap(int node, unsigned long start_pfn, unsigned long end_pfn)
704{
705 struct page *start_pg, *end_pg;
706 unsigned long pg, pgend;
707
708 /*
709 * Convert start_pfn/end_pfn to a struct page pointer.
710 */
711 start_pg = pfn_to_page(start_pfn);
712 end_pg = pfn_to_page(end_pfn);
713
714 /*
715 * Convert to physical addresses, and
716 * round start upwards and end downwards.
717 */
718 pg = PAGE_ALIGN(__pa(start_pg));
719 pgend = __pa(end_pg) & PAGE_MASK;
720
721 /*
722 * If there are free pages between these,
723 * free the section of the memmap array.
724 */
725 if (pg < pgend)
726 free_bootmem_node(NODE_DATA(node), pg, pgend - pg);
727}
728
729static inline void free_unused_memmap_node(int node, struct meminfo *mi)
730{
731 unsigned long bank_start, prev_bank_end = 0;
732 unsigned int i;
733
734 /*
735 * [FIXME] This relies on each bank being in address order. This
736 * may not be the case, especially if the user has provided the
737 * information on the command line.
738 */
739 for (i = 0; i < mi->nr_banks; i++) {
740 if (mi->bank[i].size == 0 || mi->bank[i].node != node)
741 continue;
742
743 bank_start = mi->bank[i].start >> PAGE_SHIFT;
744 if (bank_start < prev_bank_end) {
745 printk(KERN_ERR "MEM: unordered memory banks. "
746 "Not freeing memmap.\n");
747 break;
748 }
749
750 /*
751 * If we had a previous bank, and there is a space
752 * between the current bank and the previous, free it.
753 */
754 if (prev_bank_end && prev_bank_end != bank_start)
755 free_memmap(node, prev_bank_end, bank_start);
756
757 prev_bank_end = PAGE_ALIGN(mi->bank[i].start +
758 mi->bank[i].size) >> PAGE_SHIFT;
759 }
760}
761
762/*
763 * The mem_map array can get very big. Free
764 * the unused area of the memory map.
765 */
766void __init create_memmap_holes(struct meminfo *mi)
767{
768 int node;
769
770 for_each_online_node(node)
771 free_unused_memmap_node(node, mi);
772}
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S
index 1f325231b9e4..5c0ae5260d1c 100644
--- a/arch/arm/mm/proc-arm1020.S
+++ b/arch/arm/mm/proc-arm1020.S
@@ -445,14 +445,14 @@ __arm1020_setup:
445 /* 445 /*
446 * R 446 * R
447 * .RVI ZFRS BLDP WCAM 447 * .RVI ZFRS BLDP WCAM
448 * .0.1 1001 ..11 0101 /* FIXME: why no V bit? */ 448 * .011 1001 ..11 0101
449 */ 449 */
450 .type arm1020_cr1_clear, #object 450 .type arm1020_cr1_clear, #object
451 .type arm1020_cr1_set, #object 451 .type arm1020_cr1_set, #object
452arm1020_cr1_clear: 452arm1020_cr1_clear:
453 .word 0x593f 453 .word 0x593f
454arm1020_cr1_set: 454arm1020_cr1_set:
455 .word 0x1935 455 .word 0x3935
456 456
457 __INITDATA 457 __INITDATA
458 458
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S
index 142a2c2d6f0b..d69389c4d4ba 100644
--- a/arch/arm/mm/proc-arm1020e.S
+++ b/arch/arm/mm/proc-arm1020e.S
@@ -427,14 +427,14 @@ __arm1020e_setup:
427 /* 427 /*
428 * R 428 * R
429 * .RVI ZFRS BLDP WCAM 429 * .RVI ZFRS BLDP WCAM
430 * .0.1 1001 ..11 0101 /* FIXME: why no V bit? */ 430 * .011 1001 ..11 0101
431 */ 431 */
432 .type arm1020e_cr1_clear, #object 432 .type arm1020e_cr1_clear, #object
433 .type arm1020e_cr1_set, #object 433 .type arm1020e_cr1_set, #object
434arm1020e_cr1_clear: 434arm1020e_cr1_clear:
435 .word 0x5f3f 435 .word 0x5f3f
436arm1020e_cr1_set: 436arm1020e_cr1_set:
437 .word 0x1935 437 .word 0x3935
438 438
439 __INITDATA 439 __INITDATA
440 440
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
index 0aa73d414783..352db98ee269 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -132,8 +132,8 @@ ENTRY(cpu_v6_switch_mm)
132 * 100x 1 0 1 r/o no acc 132 * 100x 1 0 1 r/o no acc
133 * 10x0 1 0 1 r/o no acc 133 * 10x0 1 0 1 r/o no acc
134 * 1011 0 0 1 r/w no acc 134 * 1011 0 0 1 r/w no acc
135 * 110x 1 1 0 r/o r/o 135 * 110x 0 1 0 r/w r/o
136 * 11x0 1 1 0 r/o r/o 136 * 11x0 0 1 0 r/w r/o
137 * 1111 0 1 1 r/w r/w 137 * 1111 0 1 1 r/w r/w
138 */ 138 */
139ENTRY(cpu_v6_set_pte) 139ENTRY(cpu_v6_set_pte)
@@ -150,7 +150,7 @@ ENTRY(cpu_v6_set_pte)
150 tst r1, #L_PTE_USER 150 tst r1, #L_PTE_USER
151 orrne r2, r2, #AP1 | nG 151 orrne r2, r2, #AP1 | nG
152 tstne r2, #APX 152 tstne r2, #APX
153 eorne r2, r2, #AP0 153 bicne r2, r2, #APX | AP0
154 154
155 tst r1, #L_PTE_YOUNG 155 tst r1, #L_PTE_YOUNG
156 biceq r2, r2, #APX | AP1 | AP0 156 biceq r2, r2, #APX | AP1 | AP0
@@ -200,7 +200,7 @@ __v6_setup:
200 mcr p15, 0, r4, c2, c0, 1 @ load TTB1 200 mcr p15, 0, r4, c2, c0, 1 @ load TTB1
201#ifdef CONFIG_VFP 201#ifdef CONFIG_VFP
202 mrc p15, 0, r0, c1, c0, 2 202 mrc p15, 0, r0, c1, c0, 2
203 orr r0, r0, #(3 << 20) 203 orr r0, r0, #(0xf << 20)
204 mcr p15, 0, r0, c1, c0, 2 @ Enable full access to VFP 204 mcr p15, 0, r0, c1, c0, 2 @ Enable full access to VFP
205#endif 205#endif
206 mrc p15, 0, r0, c1, c0, 0 @ read control register 206 mrc p15, 0, r0, c1, c0, 0 @ read control register
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S
index 2d977b4eeeab..b88de2700146 100644
--- a/arch/arm/mm/proc-xscale.S
+++ b/arch/arm/mm/proc-xscale.S
@@ -370,142 +370,6 @@ ENTRY(cpu_xscale_dcache_clean_area)
370 bhi 1b 370 bhi 1b
371 mov pc, lr 371 mov pc, lr
372 372
373/* ================================ CACHE LOCKING============================
374 *
375 * The XScale MicroArchitecture implements support for locking entries into
376 * the data and instruction cache. The following functions implement the core
377 * low level instructions needed to accomplish the locking. The developer's
378 * manual states that the code that performs the locking must be in non-cached
379 * memory. To accomplish this, the code in xscale-cache-lock.c copies the
380 * following functions from the cache into a non-cached memory region that
381 * is allocated through consistent_alloc().
382 *
383 */
384 .align 5
385/*
386 * xscale_icache_lock
387 *
388 * r0: starting address to lock
389 * r1: end address to lock
390 */
391ENTRY(xscale_icache_lock)
392
393iLockLoop:
394 bic r0, r0, #CACHELINESIZE - 1
395 mcr p15, 0, r0, c9, c1, 0 @ lock into cache
396 cmp r0, r1 @ are we done?
397 add r0, r0, #CACHELINESIZE @ advance to next cache line
398 bls iLockLoop
399 mov pc, lr
400
401/*
402 * xscale_icache_unlock
403 */
404ENTRY(xscale_icache_unlock)
405 mcr p15, 0, r0, c9, c1, 1 @ Unlock icache
406 mov pc, lr
407
408/*
409 * xscale_dcache_lock
410 *
411 * r0: starting address to lock
412 * r1: end address to lock
413 */
414ENTRY(xscale_dcache_lock)
415 mcr p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer
416 mov r2, #1
417 mcr p15, 0, r2, c9, c2, 0 @ Put dcache in lock mode
418 cpwait ip @ Wait for completion
419
420 mrs r2, cpsr
421 orr r3, r2, #PSR_F_BIT | PSR_I_BIT
422dLockLoop:
423 msr cpsr_c, r3
424 mcr p15, 0, r0, c7, c10, 1 @ Write back line if it is dirty
425 mcr p15, 0, r0, c7, c6, 1 @ Flush/invalidate line
426 msr cpsr_c, r2
427 ldr ip, [r0], #CACHELINESIZE @ Preload 32 bytes into cache from
428 @ location [r0]. Post-increment
429 @ r3 to next cache line
430 cmp r0, r1 @ Are we done?
431 bls dLockLoop
432
433 mcr p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer
434 mov r2, #0
435 mcr p15, 0, r2, c9, c2, 0 @ Get out of lock mode
436 cpwait_ret lr, ip
437
438/*
439 * xscale_dcache_unlock
440 */
441ENTRY(xscale_dcache_unlock)
442 mcr p15, 0, ip, c7, c10, 4 @ Drain Write (& Fill) Buffer
443 mcr p15, 0, ip, c9, c2, 1 @ Unlock cache
444 mov pc, lr
445
446/*
447 * Needed to determine the length of the code that needs to be copied.
448 */
449 .align 5
450ENTRY(xscale_cache_dummy)
451 mov pc, lr
452
453/* ================================ TLB LOCKING==============================
454 *
455 * The XScale MicroArchitecture implements support for locking entries into
456 * the Instruction and Data TLBs. The following functions provide the
457 * low level support for supporting these under Linux. xscale-lock.c
458 * implements some higher level management code. Most of the following
459 * is taken straight out of the Developer's Manual.
460 */
461
462/*
463 * Lock I-TLB entry
464 *
465 * r0: Virtual address to translate and lock
466 */
467 .align 5
468ENTRY(xscale_itlb_lock)
469 mrs r2, cpsr
470 orr r3, r2, #PSR_F_BIT | PSR_I_BIT
471 msr cpsr_c, r3 @ Disable interrupts
472 mcr p15, 0, r0, c8, c5, 1 @ Invalidate I-TLB entry
473 mcr p15, 0, r0, c10, c4, 0 @ Translate and lock
474 msr cpsr_c, r2 @ Restore interrupts
475 cpwait_ret lr, ip
476
477/*
478 * Lock D-TLB entry
479 *
480 * r0: Virtual address to translate and lock
481 */
482 .align 5
483ENTRY(xscale_dtlb_lock)
484 mrs r2, cpsr
485 orr r3, r2, #PSR_F_BIT | PSR_I_BIT
486 msr cpsr_c, r3 @ Disable interrupts
487 mcr p15, 0, r0, c8, c6, 1 @ Invalidate D-TLB entry
488 mcr p15, 0, r0, c10, c8, 0 @ Translate and lock
489 msr cpsr_c, r2 @ Restore interrupts
490 cpwait_ret lr, ip
491
492/*
493 * Unlock all I-TLB entries
494 */
495 .align 5
496ENTRY(xscale_itlb_unlock)
497 mcr p15, 0, ip, c10, c4, 1 @ Unlock I-TLB
498 mcr p15, 0, ip, c8, c5, 0 @ Invalidate I-TLB
499 cpwait_ret lr, ip
500
501/*
502 * Unlock all D-TLB entries
503 */
504ENTRY(xscale_dtlb_unlock)
505 mcr p15, 0, ip, c10, c8, 1 @ Unlock D-TBL
506 mcr p15, 0, ip, c8, c6, 0 @ Invalidate D-TLB
507 cpwait_ret lr, ip
508
509/* =============================== PageTable ============================== */ 373/* =============================== PageTable ============================== */
510 374
511#define PTE_CACHE_WRITE_ALLOCATE 0 375#define PTE_CACHE_WRITE_ALLOCATE 0
diff --git a/arch/arm/nwfpe/double_cpdo.c b/arch/arm/nwfpe/double_cpdo.c
index 7ffd8cb9bc96..c51d1386a97c 100644
--- a/arch/arm/nwfpe/double_cpdo.c
+++ b/arch/arm/nwfpe/double_cpdo.c
@@ -40,17 +40,17 @@ float64 float64_arccos(float64 rFm);
40float64 float64_pow(float64 rFn, float64 rFm); 40float64 float64_pow(float64 rFn, float64 rFm);
41float64 float64_pol(float64 rFn, float64 rFm); 41float64 float64_pol(float64 rFn, float64 rFm);
42 42
43static float64 float64_rsf(float64 rFn, float64 rFm) 43static float64 float64_rsf(struct roundingData *roundData, float64 rFn, float64 rFm)
44{ 44{
45 return float64_sub(rFm, rFn); 45 return float64_sub(roundData, rFm, rFn);
46} 46}
47 47
48static float64 float64_rdv(float64 rFn, float64 rFm) 48static float64 float64_rdv(struct roundingData *roundData, float64 rFn, float64 rFm)
49{ 49{
50 return float64_div(rFm, rFn); 50 return float64_div(roundData, rFm, rFn);
51} 51}
52 52
53static float64 (*const dyadic_double[16])(float64 rFn, float64 rFm) = { 53static float64 (*const dyadic_double[16])(struct roundingData*, float64 rFn, float64 rFm) = {
54 [ADF_CODE >> 20] = float64_add, 54 [ADF_CODE >> 20] = float64_add,
55 [MUF_CODE >> 20] = float64_mul, 55 [MUF_CODE >> 20] = float64_mul,
56 [SUF_CODE >> 20] = float64_sub, 56 [SUF_CODE >> 20] = float64_sub,
@@ -65,12 +65,12 @@ static float64 (*const dyadic_double[16])(float64 rFn, float64 rFm) = {
65 [FRD_CODE >> 20] = float64_rdv, 65 [FRD_CODE >> 20] = float64_rdv,
66}; 66};
67 67
68static float64 float64_mvf(float64 rFm) 68static float64 float64_mvf(struct roundingData *roundData,float64 rFm)
69{ 69{
70 return rFm; 70 return rFm;
71} 71}
72 72
73static float64 float64_mnf(float64 rFm) 73static float64 float64_mnf(struct roundingData *roundData,float64 rFm)
74{ 74{
75 union float64_components u; 75 union float64_components u;
76 76
@@ -84,7 +84,7 @@ static float64 float64_mnf(float64 rFm)
84 return u.f64; 84 return u.f64;
85} 85}
86 86
87static float64 float64_abs(float64 rFm) 87static float64 float64_abs(struct roundingData *roundData,float64 rFm)
88{ 88{
89 union float64_components u; 89 union float64_components u;
90 90
@@ -98,7 +98,7 @@ static float64 float64_abs(float64 rFm)
98 return u.f64; 98 return u.f64;
99} 99}
100 100
101static float64 (*const monadic_double[16])(float64 rFm) = { 101static float64 (*const monadic_double[16])(struct roundingData *, float64 rFm) = {
102 [MVF_CODE >> 20] = float64_mvf, 102 [MVF_CODE >> 20] = float64_mvf,
103 [MNF_CODE >> 20] = float64_mnf, 103 [MNF_CODE >> 20] = float64_mnf,
104 [ABS_CODE >> 20] = float64_abs, 104 [ABS_CODE >> 20] = float64_abs,
@@ -108,7 +108,7 @@ static float64 (*const monadic_double[16])(float64 rFm) = {
108 [NRM_CODE >> 20] = float64_mvf, 108 [NRM_CODE >> 20] = float64_mvf,
109}; 109};
110 110
111unsigned int DoubleCPDO(const unsigned int opcode, FPREG * rFd) 111unsigned int DoubleCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd)
112{ 112{
113 FPA11 *fpa11 = GET_FPA11(); 113 FPA11 *fpa11 = GET_FPA11();
114 float64 rFm; 114 float64 rFm;
@@ -151,13 +151,13 @@ unsigned int DoubleCPDO(const unsigned int opcode, FPREG * rFd)
151 } 151 }
152 152
153 if (dyadic_double[opc_mask_shift]) { 153 if (dyadic_double[opc_mask_shift]) {
154 rFd->fDouble = dyadic_double[opc_mask_shift](rFn, rFm); 154 rFd->fDouble = dyadic_double[opc_mask_shift](roundData, rFn, rFm);
155 } else { 155 } else {
156 return 0; 156 return 0;
157 } 157 }
158 } else { 158 } else {
159 if (monadic_double[opc_mask_shift]) { 159 if (monadic_double[opc_mask_shift]) {
160 rFd->fDouble = monadic_double[opc_mask_shift](rFm); 160 rFd->fDouble = monadic_double[opc_mask_shift](roundData, rFm);
161 } else { 161 } else {
162 return 0; 162 return 0;
163 } 163 }
diff --git a/arch/arm/nwfpe/extended_cpdo.c b/arch/arm/nwfpe/extended_cpdo.c
index c39f68a3449e..65a279ba927f 100644
--- a/arch/arm/nwfpe/extended_cpdo.c
+++ b/arch/arm/nwfpe/extended_cpdo.c
@@ -35,17 +35,17 @@ floatx80 floatx80_arccos(floatx80 rFm);
35floatx80 floatx80_pow(floatx80 rFn, floatx80 rFm); 35floatx80 floatx80_pow(floatx80 rFn, floatx80 rFm);
36floatx80 floatx80_pol(floatx80 rFn, floatx80 rFm); 36floatx80 floatx80_pol(floatx80 rFn, floatx80 rFm);
37 37
38static floatx80 floatx80_rsf(floatx80 rFn, floatx80 rFm) 38static floatx80 floatx80_rsf(struct roundingData *roundData, floatx80 rFn, floatx80 rFm)
39{ 39{
40 return floatx80_sub(rFm, rFn); 40 return floatx80_sub(roundData, rFm, rFn);
41} 41}
42 42
43static floatx80 floatx80_rdv(floatx80 rFn, floatx80 rFm) 43static floatx80 floatx80_rdv(struct roundingData *roundData, floatx80 rFn, floatx80 rFm)
44{ 44{
45 return floatx80_div(rFm, rFn); 45 return floatx80_div(roundData, rFm, rFn);
46} 46}
47 47
48static floatx80 (*const dyadic_extended[16])(floatx80 rFn, floatx80 rFm) = { 48static floatx80 (*const dyadic_extended[16])(struct roundingData*, floatx80 rFn, floatx80 rFm) = {
49 [ADF_CODE >> 20] = floatx80_add, 49 [ADF_CODE >> 20] = floatx80_add,
50 [MUF_CODE >> 20] = floatx80_mul, 50 [MUF_CODE >> 20] = floatx80_mul,
51 [SUF_CODE >> 20] = floatx80_sub, 51 [SUF_CODE >> 20] = floatx80_sub,
@@ -60,24 +60,24 @@ static floatx80 (*const dyadic_extended[16])(floatx80 rFn, floatx80 rFm) = {
60 [FRD_CODE >> 20] = floatx80_rdv, 60 [FRD_CODE >> 20] = floatx80_rdv,
61}; 61};
62 62
63static floatx80 floatx80_mvf(floatx80 rFm) 63static floatx80 floatx80_mvf(struct roundingData *roundData, floatx80 rFm)
64{ 64{
65 return rFm; 65 return rFm;
66} 66}
67 67
68static floatx80 floatx80_mnf(floatx80 rFm) 68static floatx80 floatx80_mnf(struct roundingData *roundData, floatx80 rFm)
69{ 69{
70 rFm.high ^= 0x8000; 70 rFm.high ^= 0x8000;
71 return rFm; 71 return rFm;
72} 72}
73 73
74static floatx80 floatx80_abs(floatx80 rFm) 74static floatx80 floatx80_abs(struct roundingData *roundData, floatx80 rFm)
75{ 75{
76 rFm.high &= 0x7fff; 76 rFm.high &= 0x7fff;
77 return rFm; 77 return rFm;
78} 78}
79 79
80static floatx80 (*const monadic_extended[16])(floatx80 rFm) = { 80static floatx80 (*const monadic_extended[16])(struct roundingData*, floatx80 rFm) = {
81 [MVF_CODE >> 20] = floatx80_mvf, 81 [MVF_CODE >> 20] = floatx80_mvf,
82 [MNF_CODE >> 20] = floatx80_mnf, 82 [MNF_CODE >> 20] = floatx80_mnf,
83 [ABS_CODE >> 20] = floatx80_abs, 83 [ABS_CODE >> 20] = floatx80_abs,
@@ -87,7 +87,7 @@ static floatx80 (*const monadic_extended[16])(floatx80 rFm) = {
87 [NRM_CODE >> 20] = floatx80_mvf, 87 [NRM_CODE >> 20] = floatx80_mvf,
88}; 88};
89 89
90unsigned int ExtendedCPDO(const unsigned int opcode, FPREG * rFd) 90unsigned int ExtendedCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd)
91{ 91{
92 FPA11 *fpa11 = GET_FPA11(); 92 FPA11 *fpa11 = GET_FPA11();
93 floatx80 rFm; 93 floatx80 rFm;
@@ -138,13 +138,13 @@ unsigned int ExtendedCPDO(const unsigned int opcode, FPREG * rFd)
138 } 138 }
139 139
140 if (dyadic_extended[opc_mask_shift]) { 140 if (dyadic_extended[opc_mask_shift]) {
141 rFd->fExtended = dyadic_extended[opc_mask_shift](rFn, rFm); 141 rFd->fExtended = dyadic_extended[opc_mask_shift](roundData, rFn, rFm);
142 } else { 142 } else {
143 return 0; 143 return 0;
144 } 144 }
145 } else { 145 } else {
146 if (monadic_extended[opc_mask_shift]) { 146 if (monadic_extended[opc_mask_shift]) {
147 rFd->fExtended = monadic_extended[opc_mask_shift](rFm); 147 rFd->fExtended = monadic_extended[opc_mask_shift](roundData, rFm);
148 } else { 148 } else {
149 return 0; 149 return 0;
150 } 150 }
diff --git a/arch/arm/nwfpe/fpa11.c b/arch/arm/nwfpe/fpa11.c
index bf61696865ec..7690f731ee87 100644
--- a/arch/arm/nwfpe/fpa11.c
+++ b/arch/arm/nwfpe/fpa11.c
@@ -51,48 +51,42 @@ static void resetFPA11(void)
51 fpa11->fpsr = FP_EMULATOR | BIT_AC; 51 fpa11->fpsr = FP_EMULATOR | BIT_AC;
52} 52}
53 53
54void SetRoundingMode(const unsigned int opcode) 54int8 SetRoundingMode(const unsigned int opcode)
55{ 55{
56 switch (opcode & MASK_ROUNDING_MODE) { 56 switch (opcode & MASK_ROUNDING_MODE) {
57 default: 57 default:
58 case ROUND_TO_NEAREST: 58 case ROUND_TO_NEAREST:
59 float_rounding_mode = float_round_nearest_even; 59 return float_round_nearest_even;
60 break;
61 60
62 case ROUND_TO_PLUS_INFINITY: 61 case ROUND_TO_PLUS_INFINITY:
63 float_rounding_mode = float_round_up; 62 return float_round_up;
64 break;
65 63
66 case ROUND_TO_MINUS_INFINITY: 64 case ROUND_TO_MINUS_INFINITY:
67 float_rounding_mode = float_round_down; 65 return float_round_down;
68 break;
69 66
70 case ROUND_TO_ZERO: 67 case ROUND_TO_ZERO:
71 float_rounding_mode = float_round_to_zero; 68 return float_round_to_zero;
72 break;
73 } 69 }
74} 70}
75 71
76void SetRoundingPrecision(const unsigned int opcode) 72int8 SetRoundingPrecision(const unsigned int opcode)
77{ 73{
78#ifdef CONFIG_FPE_NWFPE_XP 74#ifdef CONFIG_FPE_NWFPE_XP
79 switch (opcode & MASK_ROUNDING_PRECISION) { 75 switch (opcode & MASK_ROUNDING_PRECISION) {
80 case ROUND_SINGLE: 76 case ROUND_SINGLE:
81 floatx80_rounding_precision = 32; 77 return 32;
82 break;
83 78
84 case ROUND_DOUBLE: 79 case ROUND_DOUBLE:
85 floatx80_rounding_precision = 64; 80 return 64;
86 break;
87 81
88 case ROUND_EXTENDED: 82 case ROUND_EXTENDED:
89 floatx80_rounding_precision = 80; 83 return 80;
90 break;
91 84
92 default: 85 default:
93 floatx80_rounding_precision = 80; 86 return 80;
94 } 87 }
95#endif 88#endif
89 return 80;
96} 90}
97 91
98void nwfpe_init_fpa(union fp_state *fp) 92void nwfpe_init_fpa(union fp_state *fp)
@@ -103,8 +97,6 @@ void nwfpe_init_fpa(union fp_state *fp)
103#endif 97#endif
104 memset(fpa11, 0, sizeof(FPA11)); 98 memset(fpa11, 0, sizeof(FPA11));
105 resetFPA11(); 99 resetFPA11();
106 SetRoundingMode(ROUND_TO_NEAREST);
107 SetRoundingPrecision(ROUND_EXTENDED);
108 fpa11->initflag = 1; 100 fpa11->initflag = 1;
109} 101}
110 102
diff --git a/arch/arm/nwfpe/fpa11.h b/arch/arm/nwfpe/fpa11.h
index 45cc65426a22..93523ae4b7a1 100644
--- a/arch/arm/nwfpe/fpa11.h
+++ b/arch/arm/nwfpe/fpa11.h
@@ -29,9 +29,7 @@
29 * stack+task struct. Use the same method as 'current' uses to 29 * stack+task struct. Use the same method as 'current' uses to
30 * reach them. 30 * reach them.
31 */ 31 */
32register unsigned long *user_registers asm("sl"); 32#define GET_USERREG() ((struct pt_regs *)(THREAD_START_SP + (unsigned long)current_thread_info()) - 1)
33
34#define GET_USERREG() (user_registers)
35 33
36#include <linux/config.h> 34#include <linux/config.h>
37#include <linux/thread_info.h> 35#include <linux/thread_info.h>
@@ -39,6 +37,13 @@ register unsigned long *user_registers asm("sl");
39/* includes */ 37/* includes */
40#include "fpsr.h" /* FP control and status register definitions */ 38#include "fpsr.h" /* FP control and status register definitions */
41#include "milieu.h" 39#include "milieu.h"
40
41struct roundingData {
42 int8 mode;
43 int8 precision;
44 signed char exception;
45};
46
42#include "softfloat.h" 47#include "softfloat.h"
43 48
44#define typeNone 0x00 49#define typeNone 0x00
@@ -86,8 +91,8 @@ typedef struct tagFPA11 {
86 initialised. */ 91 initialised. */
87} FPA11; 92} FPA11;
88 93
89extern void SetRoundingMode(const unsigned int); 94extern int8 SetRoundingMode(const unsigned int);
90extern void SetRoundingPrecision(const unsigned int); 95extern int8 SetRoundingPrecision(const unsigned int);
91extern void nwfpe_init_fpa(union fp_state *fp); 96extern void nwfpe_init_fpa(union fp_state *fp);
92 97
93#endif 98#endif
diff --git a/arch/arm/nwfpe/fpa11_cpdo.c b/arch/arm/nwfpe/fpa11_cpdo.c
index 1bea67437b6f..4a31dfd94068 100644
--- a/arch/arm/nwfpe/fpa11_cpdo.c
+++ b/arch/arm/nwfpe/fpa11_cpdo.c
@@ -24,15 +24,16 @@
24#include "fpa11.h" 24#include "fpa11.h"
25#include "fpopcode.h" 25#include "fpopcode.h"
26 26
27unsigned int SingleCPDO(const unsigned int opcode, FPREG * rFd); 27unsigned int SingleCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd);
28unsigned int DoubleCPDO(const unsigned int opcode, FPREG * rFd); 28unsigned int DoubleCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd);
29unsigned int ExtendedCPDO(const unsigned int opcode, FPREG * rFd); 29unsigned int ExtendedCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd);
30 30
31unsigned int EmulateCPDO(const unsigned int opcode) 31unsigned int EmulateCPDO(const unsigned int opcode)
32{ 32{
33 FPA11 *fpa11 = GET_FPA11(); 33 FPA11 *fpa11 = GET_FPA11();
34 FPREG *rFd; 34 FPREG *rFd;
35 unsigned int nType, nDest, nRc; 35 unsigned int nType, nDest, nRc;
36 struct roundingData roundData;
36 37
37 /* Get the destination size. If not valid let Linux perform 38 /* Get the destination size. If not valid let Linux perform
38 an invalid instruction trap. */ 39 an invalid instruction trap. */
@@ -40,7 +41,9 @@ unsigned int EmulateCPDO(const unsigned int opcode)
40 if (typeNone == nDest) 41 if (typeNone == nDest)
41 return 0; 42 return 0;
42 43
43 SetRoundingMode(opcode); 44 roundData.mode = SetRoundingMode(opcode);
45 roundData.precision = SetRoundingPrecision(opcode);
46 roundData.exception = 0;
44 47
45 /* Compare the size of the operands in Fn and Fm. 48 /* Compare the size of the operands in Fn and Fm.
46 Choose the largest size and perform operations in that size, 49 Choose the largest size and perform operations in that size,
@@ -63,14 +66,14 @@ unsigned int EmulateCPDO(const unsigned int opcode)
63 66
64 switch (nType) { 67 switch (nType) {
65 case typeSingle: 68 case typeSingle:
66 nRc = SingleCPDO(opcode, rFd); 69 nRc = SingleCPDO(&roundData, opcode, rFd);
67 break; 70 break;
68 case typeDouble: 71 case typeDouble:
69 nRc = DoubleCPDO(opcode, rFd); 72 nRc = DoubleCPDO(&roundData, opcode, rFd);
70 break; 73 break;
71#ifdef CONFIG_FPE_NWFPE_XP 74#ifdef CONFIG_FPE_NWFPE_XP
72 case typeExtended: 75 case typeExtended:
73 nRc = ExtendedCPDO(opcode, rFd); 76 nRc = ExtendedCPDO(&roundData, opcode, rFd);
74 break; 77 break;
75#endif 78#endif
76 default: 79 default:
@@ -93,9 +96,9 @@ unsigned int EmulateCPDO(const unsigned int opcode)
93 case typeSingle: 96 case typeSingle:
94 { 97 {
95 if (typeDouble == nType) 98 if (typeDouble == nType)
96 rFd->fSingle = float64_to_float32(rFd->fDouble); 99 rFd->fSingle = float64_to_float32(&roundData, rFd->fDouble);
97 else 100 else
98 rFd->fSingle = floatx80_to_float32(rFd->fExtended); 101 rFd->fSingle = floatx80_to_float32(&roundData, rFd->fExtended);
99 } 102 }
100 break; 103 break;
101 104
@@ -104,7 +107,7 @@ unsigned int EmulateCPDO(const unsigned int opcode)
104 if (typeSingle == nType) 107 if (typeSingle == nType)
105 rFd->fDouble = float32_to_float64(rFd->fSingle); 108 rFd->fDouble = float32_to_float64(rFd->fSingle);
106 else 109 else
107 rFd->fDouble = floatx80_to_float64(rFd->fExtended); 110 rFd->fDouble = floatx80_to_float64(&roundData, rFd->fExtended);
108 } 111 }
109 break; 112 break;
110 113
@@ -121,12 +124,15 @@ unsigned int EmulateCPDO(const unsigned int opcode)
121#else 124#else
122 if (nDest != nType) { 125 if (nDest != nType) {
123 if (nDest == typeSingle) 126 if (nDest == typeSingle)
124 rFd->fSingle = float64_to_float32(rFd->fDouble); 127 rFd->fSingle = float64_to_float32(&roundData, rFd->fDouble);
125 else 128 else
126 rFd->fDouble = float32_to_float64(rFd->fSingle); 129 rFd->fDouble = float32_to_float64(rFd->fSingle);
127 } 130 }
128#endif 131#endif
129 } 132 }
130 133
134 if (roundData.exception)
135 float_raise(roundData.exception);
136
131 return nRc; 137 return nRc;
132} 138}
diff --git a/arch/arm/nwfpe/fpa11_cpdt.c b/arch/arm/nwfpe/fpa11_cpdt.c
index 95fb63fa9d18..b0db5cbcc3b1 100644
--- a/arch/arm/nwfpe/fpa11_cpdt.c
+++ b/arch/arm/nwfpe/fpa11_cpdt.c
@@ -96,7 +96,7 @@ static inline void loadMultiple(const unsigned int Fn, const unsigned int __user
96 } 96 }
97} 97}
98 98
99static inline void storeSingle(const unsigned int Fn, unsigned int __user *pMem) 99static inline void storeSingle(struct roundingData *roundData, const unsigned int Fn, unsigned int __user *pMem)
100{ 100{
101 FPA11 *fpa11 = GET_FPA11(); 101 FPA11 *fpa11 = GET_FPA11();
102 union { 102 union {
@@ -106,12 +106,12 @@ static inline void storeSingle(const unsigned int Fn, unsigned int __user *pMem)
106 106
107 switch (fpa11->fType[Fn]) { 107 switch (fpa11->fType[Fn]) {
108 case typeDouble: 108 case typeDouble:
109 val.f = float64_to_float32(fpa11->fpreg[Fn].fDouble); 109 val.f = float64_to_float32(roundData, fpa11->fpreg[Fn].fDouble);
110 break; 110 break;
111 111
112#ifdef CONFIG_FPE_NWFPE_XP 112#ifdef CONFIG_FPE_NWFPE_XP
113 case typeExtended: 113 case typeExtended:
114 val.f = floatx80_to_float32(fpa11->fpreg[Fn].fExtended); 114 val.f = floatx80_to_float32(roundData, fpa11->fpreg[Fn].fExtended);
115 break; 115 break;
116#endif 116#endif
117 117
@@ -122,7 +122,7 @@ static inline void storeSingle(const unsigned int Fn, unsigned int __user *pMem)
122 put_user(val.i[0], pMem); 122 put_user(val.i[0], pMem);
123} 123}
124 124
125static inline void storeDouble(const unsigned int Fn, unsigned int __user *pMem) 125static inline void storeDouble(struct roundingData *roundData, const unsigned int Fn, unsigned int __user *pMem)
126{ 126{
127 FPA11 *fpa11 = GET_FPA11(); 127 FPA11 *fpa11 = GET_FPA11();
128 union { 128 union {
@@ -137,7 +137,7 @@ static inline void storeDouble(const unsigned int Fn, unsigned int __user *pMem)
137 137
138#ifdef CONFIG_FPE_NWFPE_XP 138#ifdef CONFIG_FPE_NWFPE_XP
139 case typeExtended: 139 case typeExtended:
140 val.f = floatx80_to_float64(fpa11->fpreg[Fn].fExtended); 140 val.f = floatx80_to_float64(roundData, fpa11->fpreg[Fn].fExtended);
141 break; 141 break;
142#endif 142#endif
143 143
@@ -259,8 +259,11 @@ unsigned int PerformSTF(const unsigned int opcode)
259{ 259{
260 unsigned int __user *pBase, *pAddress, *pFinal; 260 unsigned int __user *pBase, *pAddress, *pFinal;
261 unsigned int nRc = 1, write_back = WRITE_BACK(opcode); 261 unsigned int nRc = 1, write_back = WRITE_BACK(opcode);
262 struct roundingData roundData;
262 263
263 SetRoundingMode(ROUND_TO_NEAREST); 264 roundData.mode = SetRoundingMode(opcode);
265 roundData.precision = SetRoundingPrecision(opcode);
266 roundData.exception = 0;
264 267
265 pBase = (unsigned int __user *) readRegister(getRn(opcode)); 268 pBase = (unsigned int __user *) readRegister(getRn(opcode));
266 if (REG_PC == getRn(opcode)) { 269 if (REG_PC == getRn(opcode)) {
@@ -281,10 +284,10 @@ unsigned int PerformSTF(const unsigned int opcode)
281 284
282 switch (opcode & MASK_TRANSFER_LENGTH) { 285 switch (opcode & MASK_TRANSFER_LENGTH) {
283 case TRANSFER_SINGLE: 286 case TRANSFER_SINGLE:
284 storeSingle(getFd(opcode), pAddress); 287 storeSingle(&roundData, getFd(opcode), pAddress);
285 break; 288 break;
286 case TRANSFER_DOUBLE: 289 case TRANSFER_DOUBLE:
287 storeDouble(getFd(opcode), pAddress); 290 storeDouble(&roundData, getFd(opcode), pAddress);
288 break; 291 break;
289#ifdef CONFIG_FPE_NWFPE_XP 292#ifdef CONFIG_FPE_NWFPE_XP
290 case TRANSFER_EXTENDED: 293 case TRANSFER_EXTENDED:
@@ -295,6 +298,9 @@ unsigned int PerformSTF(const unsigned int opcode)
295 nRc = 0; 298 nRc = 0;
296 } 299 }
297 300
301 if (roundData.exception)
302 float_raise(roundData.exception);
303
298 if (write_back) 304 if (write_back)
299 writeRegister(getRn(opcode), (unsigned long) pFinal); 305 writeRegister(getRn(opcode), (unsigned long) pFinal);
300 return nRc; 306 return nRc;
diff --git a/arch/arm/nwfpe/fpa11_cprt.c b/arch/arm/nwfpe/fpa11_cprt.c
index db01fbc97216..adf8d3000540 100644
--- a/arch/arm/nwfpe/fpa11_cprt.c
+++ b/arch/arm/nwfpe/fpa11_cprt.c
@@ -33,8 +33,6 @@ extern flag floatx80_is_nan(floatx80);
33extern flag float64_is_nan(float64); 33extern flag float64_is_nan(float64);
34extern flag float32_is_nan(float32); 34extern flag float32_is_nan(float32);
35 35
36void SetRoundingMode(const unsigned int opcode);
37
38unsigned int PerformFLT(const unsigned int opcode); 36unsigned int PerformFLT(const unsigned int opcode);
39unsigned int PerformFIX(const unsigned int opcode); 37unsigned int PerformFIX(const unsigned int opcode);
40 38
@@ -77,14 +75,17 @@ unsigned int EmulateCPRT(const unsigned int opcode)
77unsigned int PerformFLT(const unsigned int opcode) 75unsigned int PerformFLT(const unsigned int opcode)
78{ 76{
79 FPA11 *fpa11 = GET_FPA11(); 77 FPA11 *fpa11 = GET_FPA11();
80 SetRoundingMode(opcode); 78 struct roundingData roundData;
81 SetRoundingPrecision(opcode); 79
80 roundData.mode = SetRoundingMode(opcode);
81 roundData.precision = SetRoundingPrecision(opcode);
82 roundData.exception = 0;
82 83
83 switch (opcode & MASK_ROUNDING_PRECISION) { 84 switch (opcode & MASK_ROUNDING_PRECISION) {
84 case ROUND_SINGLE: 85 case ROUND_SINGLE:
85 { 86 {
86 fpa11->fType[getFn(opcode)] = typeSingle; 87 fpa11->fType[getFn(opcode)] = typeSingle;
87 fpa11->fpreg[getFn(opcode)].fSingle = int32_to_float32(readRegister(getRd(opcode))); 88 fpa11->fpreg[getFn(opcode)].fSingle = int32_to_float32(&roundData, readRegister(getRd(opcode)));
88 } 89 }
89 break; 90 break;
90 91
@@ -108,6 +109,9 @@ unsigned int PerformFLT(const unsigned int opcode)
108 return 0; 109 return 0;
109 } 110 }
110 111
112 if (roundData.exception)
113 float_raise(roundData.exception);
114
111 return 1; 115 return 1;
112} 116}
113 117
@@ -115,26 +119,29 @@ unsigned int PerformFIX(const unsigned int opcode)
115{ 119{
116 FPA11 *fpa11 = GET_FPA11(); 120 FPA11 *fpa11 = GET_FPA11();
117 unsigned int Fn = getFm(opcode); 121 unsigned int Fn = getFm(opcode);
122 struct roundingData roundData;
118 123
119 SetRoundingMode(opcode); 124 roundData.mode = SetRoundingMode(opcode);
125 roundData.precision = SetRoundingPrecision(opcode);
126 roundData.exception = 0;
120 127
121 switch (fpa11->fType[Fn]) { 128 switch (fpa11->fType[Fn]) {
122 case typeSingle: 129 case typeSingle:
123 { 130 {
124 writeRegister(getRd(opcode), float32_to_int32(fpa11->fpreg[Fn].fSingle)); 131 writeRegister(getRd(opcode), float32_to_int32(&roundData, fpa11->fpreg[Fn].fSingle));
125 } 132 }
126 break; 133 break;
127 134
128 case typeDouble: 135 case typeDouble:
129 { 136 {
130 writeRegister(getRd(opcode), float64_to_int32(fpa11->fpreg[Fn].fDouble)); 137 writeRegister(getRd(opcode), float64_to_int32(&roundData, fpa11->fpreg[Fn].fDouble));
131 } 138 }
132 break; 139 break;
133 140
134#ifdef CONFIG_FPE_NWFPE_XP 141#ifdef CONFIG_FPE_NWFPE_XP
135 case typeExtended: 142 case typeExtended:
136 { 143 {
137 writeRegister(getRd(opcode), floatx80_to_int32(fpa11->fpreg[Fn].fExtended)); 144 writeRegister(getRd(opcode), floatx80_to_int32(&roundData, fpa11->fpreg[Fn].fExtended));
138 } 145 }
139 break; 146 break;
140#endif 147#endif
@@ -143,6 +150,9 @@ unsigned int PerformFIX(const unsigned int opcode)
143 return 0; 150 return 0;
144 } 151 }
145 152
153 if (roundData.exception)
154 float_raise(roundData.exception);
155
146 return 1; 156 return 1;
147} 157}
148 158
diff --git a/arch/arm/nwfpe/fpmodule.c b/arch/arm/nwfpe/fpmodule.c
index a806fea5c3ed..2dfe1ac42ee8 100644
--- a/arch/arm/nwfpe/fpmodule.c
+++ b/arch/arm/nwfpe/fpmodule.c
@@ -24,7 +24,6 @@
24#include "fpa11.h" 24#include "fpa11.h"
25 25
26#include <linux/module.h> 26#include <linux/module.h>
27#include <linux/version.h>
28#include <linux/config.h> 27#include <linux/config.h>
29 28
30/* XXX */ 29/* XXX */
@@ -117,8 +116,6 @@ fpmodule.c to integrate with the NetBSD kernel (I hope!).
117code to access data in user space in some other source files at the 116code to access data in user space in some other source files at the
118moment (grep for get_user / put_user calls). --philb] 117moment (grep for get_user / put_user calls). --philb]
119 118
120float_exception_flags is a global variable in SoftFloat.
121
122This function is called by the SoftFloat routines to raise a floating 119This function is called by the SoftFloat routines to raise a floating
123point exception. We check the trap enable byte in the FPSR, and raise 120point exception. We check the trap enable byte in the FPSR, and raise
124a SIGFPE exception if necessary. If not the relevant bits in the 121a SIGFPE exception if necessary. If not the relevant bits in the
@@ -130,15 +127,14 @@ void float_raise(signed char flags)
130 register unsigned int fpsr, cumulativeTraps; 127 register unsigned int fpsr, cumulativeTraps;
131 128
132#ifdef CONFIG_DEBUG_USER 129#ifdef CONFIG_DEBUG_USER
133 printk(KERN_DEBUG 130 /* Ignore inexact errors as there are far too many of them to log */
134 "NWFPE: %s[%d] takes exception %08x at %p from %08lx\n", 131 if (flags & ~BIT_IXC)
135 current->comm, current->pid, flags, 132 printk(KERN_DEBUG
136 __builtin_return_address(0), GET_USERREG()[15]); 133 "NWFPE: %s[%d] takes exception %08x at %p from %08lx\n",
134 current->comm, current->pid, flags,
135 __builtin_return_address(0), GET_USERREG()->ARM_pc);
137#endif 136#endif
138 137
139 /* Keep SoftFloat exception flags up to date. */
140 float_exception_flags |= flags;
141
142 /* Read fpsr and initialize the cumulativeTraps. */ 138 /* Read fpsr and initialize the cumulativeTraps. */
143 fpsr = readFPSR(); 139 fpsr = readFPSR();
144 cumulativeTraps = 0; 140 cumulativeTraps = 0;
diff --git a/arch/arm/nwfpe/fpmodule.inl b/arch/arm/nwfpe/fpmodule.inl
index e5f59e9a3022..2c39ad408f22 100644
--- a/arch/arm/nwfpe/fpmodule.inl
+++ b/arch/arm/nwfpe/fpmodule.inl
@@ -28,8 +28,8 @@ static inline unsigned long readRegister(const unsigned int nReg)
28 for this in this routine. LDF/STF instructions with Rn = PC 28 for this in this routine. LDF/STF instructions with Rn = PC
29 depend on the PC being correct, as they use PC+8 in their 29 depend on the PC being correct, as they use PC+8 in their
30 address calculations. */ 30 address calculations. */
31 unsigned long *userRegisters = GET_USERREG(); 31 struct pt_regs *regs = GET_USERREG();
32 unsigned int val = userRegisters[nReg]; 32 unsigned int val = regs->uregs[nReg];
33 if (REG_PC == nReg) 33 if (REG_PC == nReg)
34 val -= 4; 34 val -= 4;
35 return val; 35 return val;
@@ -38,8 +38,8 @@ static inline unsigned long readRegister(const unsigned int nReg)
38static inline void 38static inline void
39writeRegister(const unsigned int nReg, const unsigned long val) 39writeRegister(const unsigned int nReg, const unsigned long val)
40{ 40{
41 unsigned long *userRegisters = GET_USERREG(); 41 struct pt_regs *regs = GET_USERREG();
42 userRegisters[nReg] = val; 42 regs->uregs[nReg] = val;
43} 43}
44 44
45static inline unsigned long readCPSR(void) 45static inline unsigned long readCPSR(void)
@@ -63,12 +63,12 @@ static inline unsigned long readConditionCodes(void)
63 63
64static inline void writeConditionCodes(const unsigned long val) 64static inline void writeConditionCodes(const unsigned long val)
65{ 65{
66 unsigned long *userRegisters = GET_USERREG(); 66 struct pt_regs *regs = GET_USERREG();
67 unsigned long rval; 67 unsigned long rval;
68 /* 68 /*
69 * Operate directly on userRegisters since 69 * Operate directly on userRegisters since
70 * the CPSR may be the PC register itself. 70 * the CPSR may be the PC register itself.
71 */ 71 */
72 rval = userRegisters[REG_CPSR] & ~CC_MASK; 72 rval = regs->ARM_cpsr & ~CC_MASK;
73 userRegisters[REG_CPSR] = rval | (val & CC_MASK); 73 regs->ARM_cpsr = rval | (val & CC_MASK);
74} 74}
diff --git a/arch/arm/nwfpe/single_cpdo.c b/arch/arm/nwfpe/single_cpdo.c
index 705808e88d9d..c66981d682cf 100644
--- a/arch/arm/nwfpe/single_cpdo.c
+++ b/arch/arm/nwfpe/single_cpdo.c
@@ -36,17 +36,17 @@ float32 float32_arccos(float32 rFm);
36float32 float32_pow(float32 rFn, float32 rFm); 36float32 float32_pow(float32 rFn, float32 rFm);
37float32 float32_pol(float32 rFn, float32 rFm); 37float32 float32_pol(float32 rFn, float32 rFm);
38 38
39static float32 float32_rsf(float32 rFn, float32 rFm) 39static float32 float32_rsf(struct roundingData *roundData, float32 rFn, float32 rFm)
40{ 40{
41 return float32_sub(rFm, rFn); 41 return float32_sub(roundData, rFm, rFn);
42} 42}
43 43
44static float32 float32_rdv(float32 rFn, float32 rFm) 44static float32 float32_rdv(struct roundingData *roundData, float32 rFn, float32 rFm)
45{ 45{
46 return float32_div(rFm, rFn); 46 return float32_div(roundData, rFm, rFn);
47} 47}
48 48
49static float32 (*const dyadic_single[16])(float32 rFn, float32 rFm) = { 49static float32 (*const dyadic_single[16])(struct roundingData *, float32 rFn, float32 rFm) = {
50 [ADF_CODE >> 20] = float32_add, 50 [ADF_CODE >> 20] = float32_add,
51 [MUF_CODE >> 20] = float32_mul, 51 [MUF_CODE >> 20] = float32_mul,
52 [SUF_CODE >> 20] = float32_sub, 52 [SUF_CODE >> 20] = float32_sub,
@@ -60,22 +60,22 @@ static float32 (*const dyadic_single[16])(float32 rFn, float32 rFm) = {
60 [FRD_CODE >> 20] = float32_rdv, 60 [FRD_CODE >> 20] = float32_rdv,
61}; 61};
62 62
63static float32 float32_mvf(float32 rFm) 63static float32 float32_mvf(struct roundingData *roundData, float32 rFm)
64{ 64{
65 return rFm; 65 return rFm;
66} 66}
67 67
68static float32 float32_mnf(float32 rFm) 68static float32 float32_mnf(struct roundingData *roundData, float32 rFm)
69{ 69{
70 return rFm ^ 0x80000000; 70 return rFm ^ 0x80000000;
71} 71}
72 72
73static float32 float32_abs(float32 rFm) 73static float32 float32_abs(struct roundingData *roundData, float32 rFm)
74{ 74{
75 return rFm & 0x7fffffff; 75 return rFm & 0x7fffffff;
76} 76}
77 77
78static float32 (*const monadic_single[16])(float32 rFm) = { 78static float32 (*const monadic_single[16])(struct roundingData*, float32 rFm) = {
79 [MVF_CODE >> 20] = float32_mvf, 79 [MVF_CODE >> 20] = float32_mvf,
80 [MNF_CODE >> 20] = float32_mnf, 80 [MNF_CODE >> 20] = float32_mnf,
81 [ABS_CODE >> 20] = float32_abs, 81 [ABS_CODE >> 20] = float32_abs,
@@ -85,7 +85,7 @@ static float32 (*const monadic_single[16])(float32 rFm) = {
85 [NRM_CODE >> 20] = float32_mvf, 85 [NRM_CODE >> 20] = float32_mvf,
86}; 86};
87 87
88unsigned int SingleCPDO(const unsigned int opcode, FPREG * rFd) 88unsigned int SingleCPDO(struct roundingData *roundData, const unsigned int opcode, FPREG * rFd)
89{ 89{
90 FPA11 *fpa11 = GET_FPA11(); 90 FPA11 *fpa11 = GET_FPA11();
91 float32 rFm; 91 float32 rFm;
@@ -108,13 +108,13 @@ unsigned int SingleCPDO(const unsigned int opcode, FPREG * rFd)
108 if (fpa11->fType[Fn] == typeSingle && 108 if (fpa11->fType[Fn] == typeSingle &&
109 dyadic_single[opc_mask_shift]) { 109 dyadic_single[opc_mask_shift]) {
110 rFn = fpa11->fpreg[Fn].fSingle; 110 rFn = fpa11->fpreg[Fn].fSingle;
111 rFd->fSingle = dyadic_single[opc_mask_shift](rFn, rFm); 111 rFd->fSingle = dyadic_single[opc_mask_shift](roundData, rFn, rFm);
112 } else { 112 } else {
113 return 0; 113 return 0;
114 } 114 }
115 } else { 115 } else {
116 if (monadic_single[opc_mask_shift]) { 116 if (monadic_single[opc_mask_shift]) {
117 rFd->fSingle = monadic_single[opc_mask_shift](rFm); 117 rFd->fSingle = monadic_single[opc_mask_shift](roundData, rFm);
118 } else { 118 } else {
119 return 0; 119 return 0;
120 } 120 }
diff --git a/arch/arm/nwfpe/softfloat-macros b/arch/arm/nwfpe/softfloat-macros
index 5469989f2c5e..5a060f95a58f 100644
--- a/arch/arm/nwfpe/softfloat-macros
+++ b/arch/arm/nwfpe/softfloat-macros
@@ -563,8 +563,14 @@ static bits64 estimateDiv128To64( bits64 a0, bits64 a1, bits64 b )
563 bits64 rem0, rem1, term0, term1; 563 bits64 rem0, rem1, term0, term1;
564 bits64 z; 564 bits64 z;
565 if ( b <= a0 ) return LIT64( 0xFFFFFFFFFFFFFFFF ); 565 if ( b <= a0 ) return LIT64( 0xFFFFFFFFFFFFFFFF );
566 b0 = b>>32; 566 b0 = b>>32; /* hence b0 is 32 bits wide now */
567 z = ( b0<<32 <= a0 ) ? LIT64( 0xFFFFFFFF00000000 ) : ( a0 / b0 )<<32; 567 if ( b0<<32 <= a0 ) {
568 z = LIT64( 0xFFFFFFFF00000000 );
569 } else {
570 z = a0;
571 do_div( z, b0 );
572 z <<= 32;
573 }
568 mul64To128( b, z, &term0, &term1 ); 574 mul64To128( b, z, &term0, &term1 );
569 sub128( a0, a1, term0, term1, &rem0, &rem1 ); 575 sub128( a0, a1, term0, term1, &rem0, &rem1 );
570 while ( ( (sbits64) rem0 ) < 0 ) { 576 while ( ( (sbits64) rem0 ) < 0 ) {
@@ -573,7 +579,12 @@ static bits64 estimateDiv128To64( bits64 a0, bits64 a1, bits64 b )
573 add128( rem0, rem1, b0, b1, &rem0, &rem1 ); 579 add128( rem0, rem1, b0, b1, &rem0, &rem1 );
574 } 580 }
575 rem0 = ( rem0<<32 ) | ( rem1>>32 ); 581 rem0 = ( rem0<<32 ) | ( rem1>>32 );
576 z |= ( b0<<32 <= rem0 ) ? 0xFFFFFFFF : rem0 / b0; 582 if ( b0<<32 <= rem0 ) {
583 z |= 0xFFFFFFFF;
584 } else {
585 do_div( rem0, b0 );
586 z |= rem0;
587 }
577 return z; 588 return z;
578 589
579} 590}
@@ -601,6 +612,7 @@ static bits32 estimateSqrt32( int16 aExp, bits32 a )
601 }; 612 };
602 int8 index; 613 int8 index;
603 bits32 z; 614 bits32 z;
615 bits64 A;
604 616
605 index = ( a>>27 ) & 15; 617 index = ( a>>27 ) & 15;
606 if ( aExp & 1 ) { 618 if ( aExp & 1 ) {
@@ -614,7 +626,9 @@ static bits32 estimateSqrt32( int16 aExp, bits32 a )
614 z = ( 0x20000 <= z ) ? 0xFFFF8000 : ( z<<15 ); 626 z = ( 0x20000 <= z ) ? 0xFFFF8000 : ( z<<15 );
615 if ( z <= a ) return (bits32) ( ( (sbits32) a )>>1 ); 627 if ( z <= a ) return (bits32) ( ( (sbits32) a )>>1 );
616 } 628 }
617 return ( (bits32) ( ( ( (bits64) a )<<31 ) / z ) ) + ( z>>1 ); 629 A = ( (bits64) a )<<31;
630 do_div( A, z );
631 return ( (bits32) A ) + ( z>>1 );
618 632
619} 633}
620 634
diff --git a/arch/arm/nwfpe/softfloat.c b/arch/arm/nwfpe/softfloat.c
index 9d743ae29062..8b75a6e7cb3a 100644
--- a/arch/arm/nwfpe/softfloat.c
+++ b/arch/arm/nwfpe/softfloat.c
@@ -28,22 +28,14 @@ this code that are retained.
28=============================================================================== 28===============================================================================
29*/ 29*/
30 30
31#include <asm/div64.h>
32
31#include "fpa11.h" 33#include "fpa11.h"
32//#include "milieu.h" 34//#include "milieu.h"
33//#include "softfloat.h" 35//#include "softfloat.h"
34 36
35/* 37/*
36------------------------------------------------------------------------------- 38-------------------------------------------------------------------------------
37Floating-point rounding mode, extended double-precision rounding precision,
38and exception flags.
39-------------------------------------------------------------------------------
40*/
41int8 float_rounding_mode = float_round_nearest_even;
42int8 floatx80_rounding_precision = 80;
43int8 float_exception_flags;
44
45/*
46-------------------------------------------------------------------------------
47Primitive arithmetic functions, including multi-word arithmetic, and 39Primitive arithmetic functions, including multi-word arithmetic, and
48division and square root approximations. (Can be specialized to target if 40division and square root approximations. (Can be specialized to target if
49desired.) 41desired.)
@@ -75,14 +67,14 @@ input is too large, however, the invalid exception is raised and the largest
75positive or negative integer is returned. 67positive or negative integer is returned.
76------------------------------------------------------------------------------- 68-------------------------------------------------------------------------------
77*/ 69*/
78static int32 roundAndPackInt32( flag zSign, bits64 absZ ) 70static int32 roundAndPackInt32( struct roundingData *roundData, flag zSign, bits64 absZ )
79{ 71{
80 int8 roundingMode; 72 int8 roundingMode;
81 flag roundNearestEven; 73 flag roundNearestEven;
82 int8 roundIncrement, roundBits; 74 int8 roundIncrement, roundBits;
83 int32 z; 75 int32 z;
84 76
85 roundingMode = float_rounding_mode; 77 roundingMode = roundData->mode;
86 roundNearestEven = ( roundingMode == float_round_nearest_even ); 78 roundNearestEven = ( roundingMode == float_round_nearest_even );
87 roundIncrement = 0x40; 79 roundIncrement = 0x40;
88 if ( ! roundNearestEven ) { 80 if ( ! roundNearestEven ) {
@@ -105,10 +97,10 @@ static int32 roundAndPackInt32( flag zSign, bits64 absZ )
105 z = absZ; 97 z = absZ;
106 if ( zSign ) z = - z; 98 if ( zSign ) z = - z;
107 if ( ( absZ>>32 ) || ( z && ( ( z < 0 ) ^ zSign ) ) ) { 99 if ( ( absZ>>32 ) || ( z && ( ( z < 0 ) ^ zSign ) ) ) {
108 float_exception_flags |= float_flag_invalid; 100 roundData->exception |= float_flag_invalid;
109 return zSign ? 0x80000000 : 0x7FFFFFFF; 101 return zSign ? 0x80000000 : 0x7FFFFFFF;
110 } 102 }
111 if ( roundBits ) float_exception_flags |= float_flag_inexact; 103 if ( roundBits ) roundData->exception |= float_flag_inexact;
112 return z; 104 return z;
113 105
114} 106}
@@ -222,14 +214,14 @@ The handling of underflow and overflow follows the IEC/IEEE Standard for
222Binary Floating-point Arithmetic. 214Binary Floating-point Arithmetic.
223------------------------------------------------------------------------------- 215-------------------------------------------------------------------------------
224*/ 216*/
225static float32 roundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig ) 217static float32 roundAndPackFloat32( struct roundingData *roundData, flag zSign, int16 zExp, bits32 zSig )
226{ 218{
227 int8 roundingMode; 219 int8 roundingMode;
228 flag roundNearestEven; 220 flag roundNearestEven;
229 int8 roundIncrement, roundBits; 221 int8 roundIncrement, roundBits;
230 flag isTiny; 222 flag isTiny;
231 223
232 roundingMode = float_rounding_mode; 224 roundingMode = roundData->mode;
233 roundNearestEven = ( roundingMode == float_round_nearest_even ); 225 roundNearestEven = ( roundingMode == float_round_nearest_even );
234 roundIncrement = 0x40; 226 roundIncrement = 0x40;
235 if ( ! roundNearestEven ) { 227 if ( ! roundNearestEven ) {
@@ -252,7 +244,7 @@ static float32 roundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig )
252 || ( ( zExp == 0xFD ) 244 || ( ( zExp == 0xFD )
253 && ( (sbits32) ( zSig + roundIncrement ) < 0 ) ) 245 && ( (sbits32) ( zSig + roundIncrement ) < 0 ) )
254 ) { 246 ) {
255 float_raise( float_flag_overflow | float_flag_inexact ); 247 roundData->exception |= float_flag_overflow | float_flag_inexact;
256 return packFloat32( zSign, 0xFF, 0 ) - ( roundIncrement == 0 ); 248 return packFloat32( zSign, 0xFF, 0 ) - ( roundIncrement == 0 );
257 } 249 }
258 if ( zExp < 0 ) { 250 if ( zExp < 0 ) {
@@ -263,10 +255,10 @@ static float32 roundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig )
263 shift32RightJamming( zSig, - zExp, &zSig ); 255 shift32RightJamming( zSig, - zExp, &zSig );
264 zExp = 0; 256 zExp = 0;
265 roundBits = zSig & 0x7F; 257 roundBits = zSig & 0x7F;
266 if ( isTiny && roundBits ) float_raise( float_flag_underflow ); 258 if ( isTiny && roundBits ) roundData->exception |= float_flag_underflow;
267 } 259 }
268 } 260 }
269 if ( roundBits ) float_exception_flags |= float_flag_inexact; 261 if ( roundBits ) roundData->exception |= float_flag_inexact;
270 zSig = ( zSig + roundIncrement )>>7; 262 zSig = ( zSig + roundIncrement )>>7;
271 zSig &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven ); 263 zSig &= ~ ( ( ( roundBits ^ 0x40 ) == 0 ) & roundNearestEven );
272 if ( zSig == 0 ) zExp = 0; 264 if ( zSig == 0 ) zExp = 0;
@@ -285,12 +277,12 @@ point exponent.
285------------------------------------------------------------------------------- 277-------------------------------------------------------------------------------
286*/ 278*/
287static float32 279static float32
288 normalizeRoundAndPackFloat32( flag zSign, int16 zExp, bits32 zSig ) 280 normalizeRoundAndPackFloat32( struct roundingData *roundData, flag zSign, int16 zExp, bits32 zSig )
289{ 281{
290 int8 shiftCount; 282 int8 shiftCount;
291 283
292 shiftCount = countLeadingZeros32( zSig ) - 1; 284 shiftCount = countLeadingZeros32( zSig ) - 1;
293 return roundAndPackFloat32( zSign, zExp - shiftCount, zSig<<shiftCount ); 285 return roundAndPackFloat32( roundData, zSign, zExp - shiftCount, zSig<<shiftCount );
294 286
295} 287}
296 288
@@ -393,14 +385,14 @@ The handling of underflow and overflow follows the IEC/IEEE Standard for
393Binary Floating-point Arithmetic. 385Binary Floating-point Arithmetic.
394------------------------------------------------------------------------------- 386-------------------------------------------------------------------------------
395*/ 387*/
396static float64 roundAndPackFloat64( flag zSign, int16 zExp, bits64 zSig ) 388static float64 roundAndPackFloat64( struct roundingData *roundData, flag zSign, int16 zExp, bits64 zSig )
397{ 389{
398 int8 roundingMode; 390 int8 roundingMode;
399 flag roundNearestEven; 391 flag roundNearestEven;
400 int16 roundIncrement, roundBits; 392 int16 roundIncrement, roundBits;
401 flag isTiny; 393 flag isTiny;
402 394
403 roundingMode = float_rounding_mode; 395 roundingMode = roundData->mode;
404 roundNearestEven = ( roundingMode == float_round_nearest_even ); 396 roundNearestEven = ( roundingMode == float_round_nearest_even );
405 roundIncrement = 0x200; 397 roundIncrement = 0x200;
406 if ( ! roundNearestEven ) { 398 if ( ! roundNearestEven ) {
@@ -425,7 +417,7 @@ static float64 roundAndPackFloat64( flag zSign, int16 zExp, bits64 zSig )
425 ) { 417 ) {
426 //register int lr = __builtin_return_address(0); 418 //register int lr = __builtin_return_address(0);
427 //printk("roundAndPackFloat64 called from 0x%08x\n",lr); 419 //printk("roundAndPackFloat64 called from 0x%08x\n",lr);
428 float_raise( float_flag_overflow | float_flag_inexact ); 420 roundData->exception |= float_flag_overflow | float_flag_inexact;
429 return packFloat64( zSign, 0x7FF, 0 ) - ( roundIncrement == 0 ); 421 return packFloat64( zSign, 0x7FF, 0 ) - ( roundIncrement == 0 );
430 } 422 }
431 if ( zExp < 0 ) { 423 if ( zExp < 0 ) {
@@ -436,10 +428,10 @@ static float64 roundAndPackFloat64( flag zSign, int16 zExp, bits64 zSig )
436 shift64RightJamming( zSig, - zExp, &zSig ); 428 shift64RightJamming( zSig, - zExp, &zSig );
437 zExp = 0; 429 zExp = 0;
438 roundBits = zSig & 0x3FF; 430 roundBits = zSig & 0x3FF;
439 if ( isTiny && roundBits ) float_raise( float_flag_underflow ); 431 if ( isTiny && roundBits ) roundData->exception |= float_flag_underflow;
440 } 432 }
441 } 433 }
442 if ( roundBits ) float_exception_flags |= float_flag_inexact; 434 if ( roundBits ) roundData->exception |= float_flag_inexact;
443 zSig = ( zSig + roundIncrement )>>10; 435 zSig = ( zSig + roundIncrement )>>10;
444 zSig &= ~ ( ( ( roundBits ^ 0x200 ) == 0 ) & roundNearestEven ); 436 zSig &= ~ ( ( ( roundBits ^ 0x200 ) == 0 ) & roundNearestEven );
445 if ( zSig == 0 ) zExp = 0; 437 if ( zSig == 0 ) zExp = 0;
@@ -458,12 +450,12 @@ point exponent.
458------------------------------------------------------------------------------- 450-------------------------------------------------------------------------------
459*/ 451*/
460static float64 452static float64
461 normalizeRoundAndPackFloat64( flag zSign, int16 zExp, bits64 zSig ) 453 normalizeRoundAndPackFloat64( struct roundingData *roundData, flag zSign, int16 zExp, bits64 zSig )
462{ 454{
463 int8 shiftCount; 455 int8 shiftCount;
464 456
465 shiftCount = countLeadingZeros64( zSig ) - 1; 457 shiftCount = countLeadingZeros64( zSig ) - 1;
466 return roundAndPackFloat64( zSign, zExp - shiftCount, zSig<<shiftCount ); 458 return roundAndPackFloat64( roundData, zSign, zExp - shiftCount, zSig<<shiftCount );
467 459
468} 460}
469 461
@@ -570,14 +562,15 @@ Floating-point Arithmetic.
570*/ 562*/
571static floatx80 563static floatx80
572 roundAndPackFloatx80( 564 roundAndPackFloatx80(
573 int8 roundingPrecision, flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1 565 struct roundingData *roundData, flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1
574 ) 566 )
575{ 567{
576 int8 roundingMode; 568 int8 roundingMode, roundingPrecision;
577 flag roundNearestEven, increment, isTiny; 569 flag roundNearestEven, increment, isTiny;
578 int64 roundIncrement, roundMask, roundBits; 570 int64 roundIncrement, roundMask, roundBits;
579 571
580 roundingMode = float_rounding_mode; 572 roundingMode = roundData->mode;
573 roundingPrecision = roundData->precision;
581 roundNearestEven = ( roundingMode == float_round_nearest_even ); 574 roundNearestEven = ( roundingMode == float_round_nearest_even );
582 if ( roundingPrecision == 80 ) goto precision80; 575 if ( roundingPrecision == 80 ) goto precision80;
583 if ( roundingPrecision == 64 ) { 576 if ( roundingPrecision == 64 ) {
@@ -621,8 +614,8 @@ static floatx80
621 shift64RightJamming( zSig0, 1 - zExp, &zSig0 ); 614 shift64RightJamming( zSig0, 1 - zExp, &zSig0 );
622 zExp = 0; 615 zExp = 0;
623 roundBits = zSig0 & roundMask; 616 roundBits = zSig0 & roundMask;
624 if ( isTiny && roundBits ) float_raise( float_flag_underflow ); 617 if ( isTiny && roundBits ) roundData->exception |= float_flag_underflow;
625 if ( roundBits ) float_exception_flags |= float_flag_inexact; 618 if ( roundBits ) roundData->exception |= float_flag_inexact;
626 zSig0 += roundIncrement; 619 zSig0 += roundIncrement;
627 if ( (sbits64) zSig0 < 0 ) zExp = 1; 620 if ( (sbits64) zSig0 < 0 ) zExp = 1;
628 roundIncrement = roundMask + 1; 621 roundIncrement = roundMask + 1;
@@ -633,7 +626,7 @@ static floatx80
633 return packFloatx80( zSign, zExp, zSig0 ); 626 return packFloatx80( zSign, zExp, zSig0 );
634 } 627 }
635 } 628 }
636 if ( roundBits ) float_exception_flags |= float_flag_inexact; 629 if ( roundBits ) roundData->exception |= float_flag_inexact;
637 zSig0 += roundIncrement; 630 zSig0 += roundIncrement;
638 if ( zSig0 < roundIncrement ) { 631 if ( zSig0 < roundIncrement ) {
639 ++zExp; 632 ++zExp;
@@ -670,7 +663,7 @@ static floatx80
670 ) { 663 ) {
671 roundMask = 0; 664 roundMask = 0;
672 overflow: 665 overflow:
673 float_raise( float_flag_overflow | float_flag_inexact ); 666 roundData->exception |= float_flag_overflow | float_flag_inexact;
674 if ( ( roundingMode == float_round_to_zero ) 667 if ( ( roundingMode == float_round_to_zero )
675 || ( zSign && ( roundingMode == float_round_up ) ) 668 || ( zSign && ( roundingMode == float_round_up ) )
676 || ( ! zSign && ( roundingMode == float_round_down ) ) 669 || ( ! zSign && ( roundingMode == float_round_down ) )
@@ -687,8 +680,8 @@ static floatx80
687 || ( zSig0 < LIT64( 0xFFFFFFFFFFFFFFFF ) ); 680 || ( zSig0 < LIT64( 0xFFFFFFFFFFFFFFFF ) );
688 shift64ExtraRightJamming( zSig0, zSig1, 1 - zExp, &zSig0, &zSig1 ); 681 shift64ExtraRightJamming( zSig0, zSig1, 1 - zExp, &zSig0, &zSig1 );
689 zExp = 0; 682 zExp = 0;
690 if ( isTiny && zSig1 ) float_raise( float_flag_underflow ); 683 if ( isTiny && zSig1 ) roundData->exception |= float_flag_underflow;
691 if ( zSig1 ) float_exception_flags |= float_flag_inexact; 684 if ( zSig1 ) roundData->exception |= float_flag_inexact;
692 if ( roundNearestEven ) { 685 if ( roundNearestEven ) {
693 increment = ( (sbits64) zSig1 < 0 ); 686 increment = ( (sbits64) zSig1 < 0 );
694 } 687 }
@@ -708,7 +701,7 @@ static floatx80
708 return packFloatx80( zSign, zExp, zSig0 ); 701 return packFloatx80( zSign, zExp, zSig0 );
709 } 702 }
710 } 703 }
711 if ( zSig1 ) float_exception_flags |= float_flag_inexact; 704 if ( zSig1 ) roundData->exception |= float_flag_inexact;
712 if ( increment ) { 705 if ( increment ) {
713 ++zSig0; 706 ++zSig0;
714 if ( zSig0 == 0 ) { 707 if ( zSig0 == 0 ) {
@@ -738,7 +731,7 @@ normalized.
738*/ 731*/
739static floatx80 732static floatx80
740 normalizeRoundAndPackFloatx80( 733 normalizeRoundAndPackFloatx80(
741 int8 roundingPrecision, flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1 734 struct roundingData *roundData, flag zSign, int32 zExp, bits64 zSig0, bits64 zSig1
742 ) 735 )
743{ 736{
744 int8 shiftCount; 737 int8 shiftCount;
@@ -752,7 +745,7 @@ static floatx80
752 shortShift128Left( zSig0, zSig1, shiftCount, &zSig0, &zSig1 ); 745 shortShift128Left( zSig0, zSig1, shiftCount, &zSig0, &zSig1 );
753 zExp -= shiftCount; 746 zExp -= shiftCount;
754 return 747 return
755 roundAndPackFloatx80( roundingPrecision, zSign, zExp, zSig0, zSig1 ); 748 roundAndPackFloatx80( roundData, zSign, zExp, zSig0, zSig1 );
756 749
757} 750}
758 751
@@ -765,14 +758,14 @@ the single-precision floating-point format. The conversion is performed
765according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. 758according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
766------------------------------------------------------------------------------- 759-------------------------------------------------------------------------------
767*/ 760*/
768float32 int32_to_float32( int32 a ) 761float32 int32_to_float32(struct roundingData *roundData, int32 a)
769{ 762{
770 flag zSign; 763 flag zSign;
771 764
772 if ( a == 0 ) return 0; 765 if ( a == 0 ) return 0;
773 if ( a == 0x80000000 ) return packFloat32( 1, 0x9E, 0 ); 766 if ( a == 0x80000000 ) return packFloat32( 1, 0x9E, 0 );
774 zSign = ( a < 0 ); 767 zSign = ( a < 0 );
775 return normalizeRoundAndPackFloat32( zSign, 0x9C, zSign ? - a : a ); 768 return normalizeRoundAndPackFloat32( roundData, zSign, 0x9C, zSign ? - a : a );
776 769
777} 770}
778 771
@@ -838,7 +831,7 @@ positive integer is returned. Otherwise, if the conversion overflows, the
838largest integer with the same sign as `a' is returned. 831largest integer with the same sign as `a' is returned.
839------------------------------------------------------------------------------- 832-------------------------------------------------------------------------------
840*/ 833*/
841int32 float32_to_int32( float32 a ) 834int32 float32_to_int32( struct roundingData *roundData, float32 a )
842{ 835{
843 flag aSign; 836 flag aSign;
844 int16 aExp, shiftCount; 837 int16 aExp, shiftCount;
@@ -854,7 +847,7 @@ int32 float32_to_int32( float32 a )
854 zSig = aSig; 847 zSig = aSig;
855 zSig <<= 32; 848 zSig <<= 32;
856 if ( 0 < shiftCount ) shift64RightJamming( zSig, shiftCount, &zSig ); 849 if ( 0 < shiftCount ) shift64RightJamming( zSig, shiftCount, &zSig );
857 return roundAndPackInt32( aSign, zSig ); 850 return roundAndPackInt32( roundData, aSign, zSig );
858 851
859} 852}
860 853
@@ -887,13 +880,13 @@ int32 float32_to_int32_round_to_zero( float32 a )
887 return 0x80000000; 880 return 0x80000000;
888 } 881 }
889 else if ( aExp <= 0x7E ) { 882 else if ( aExp <= 0x7E ) {
890 if ( aExp | aSig ) float_exception_flags |= float_flag_inexact; 883 if ( aExp | aSig ) float_raise( float_flag_inexact );
891 return 0; 884 return 0;
892 } 885 }
893 aSig = ( aSig | 0x00800000 )<<8; 886 aSig = ( aSig | 0x00800000 )<<8;
894 z = aSig>>( - shiftCount ); 887 z = aSig>>( - shiftCount );
895 if ( (bits32) ( aSig<<( shiftCount & 31 ) ) ) { 888 if ( (bits32) ( aSig<<( shiftCount & 31 ) ) ) {
896 float_exception_flags |= float_flag_inexact; 889 float_raise( float_flag_inexact );
897 } 890 }
898 return aSign ? - z : z; 891 return aSign ? - z : z;
899 892
@@ -971,7 +964,7 @@ operation is performed according to the IEC/IEEE Standard for Binary
971Floating-point Arithmetic. 964Floating-point Arithmetic.
972------------------------------------------------------------------------------- 965-------------------------------------------------------------------------------
973*/ 966*/
974float32 float32_round_to_int( float32 a ) 967float32 float32_round_to_int( struct roundingData *roundData, float32 a )
975{ 968{
976 flag aSign; 969 flag aSign;
977 int16 aExp; 970 int16 aExp;
@@ -986,11 +979,12 @@ float32 float32_round_to_int( float32 a )
986 } 979 }
987 return a; 980 return a;
988 } 981 }
982 roundingMode = roundData->mode;
989 if ( aExp <= 0x7E ) { 983 if ( aExp <= 0x7E ) {
990 if ( (bits32) ( a<<1 ) == 0 ) return a; 984 if ( (bits32) ( a<<1 ) == 0 ) return a;
991 float_exception_flags |= float_flag_inexact; 985 roundData->exception |= float_flag_inexact;
992 aSign = extractFloat32Sign( a ); 986 aSign = extractFloat32Sign( a );
993 switch ( float_rounding_mode ) { 987 switch ( roundingMode ) {
994 case float_round_nearest_even: 988 case float_round_nearest_even:
995 if ( ( aExp == 0x7E ) && extractFloat32Frac( a ) ) { 989 if ( ( aExp == 0x7E ) && extractFloat32Frac( a ) ) {
996 return packFloat32( aSign, 0x7F, 0 ); 990 return packFloat32( aSign, 0x7F, 0 );
@@ -1007,7 +1001,6 @@ float32 float32_round_to_int( float32 a )
1007 lastBitMask <<= 0x96 - aExp; 1001 lastBitMask <<= 0x96 - aExp;
1008 roundBitsMask = lastBitMask - 1; 1002 roundBitsMask = lastBitMask - 1;
1009 z = a; 1003 z = a;
1010 roundingMode = float_rounding_mode;
1011 if ( roundingMode == float_round_nearest_even ) { 1004 if ( roundingMode == float_round_nearest_even ) {
1012 z += lastBitMask>>1; 1005 z += lastBitMask>>1;
1013 if ( ( z & roundBitsMask ) == 0 ) z &= ~ lastBitMask; 1006 if ( ( z & roundBitsMask ) == 0 ) z &= ~ lastBitMask;
@@ -1018,7 +1011,7 @@ float32 float32_round_to_int( float32 a )
1018 } 1011 }
1019 } 1012 }
1020 z &= ~ roundBitsMask; 1013 z &= ~ roundBitsMask;
1021 if ( z != a ) float_exception_flags |= float_flag_inexact; 1014 if ( z != a ) roundData->exception |= float_flag_inexact;
1022 return z; 1015 return z;
1023 1016
1024} 1017}
@@ -1032,7 +1025,7 @@ addition is performed according to the IEC/IEEE Standard for Binary
1032Floating-point Arithmetic. 1025Floating-point Arithmetic.
1033------------------------------------------------------------------------------- 1026-------------------------------------------------------------------------------
1034*/ 1027*/
1035static float32 addFloat32Sigs( float32 a, float32 b, flag zSign ) 1028static float32 addFloat32Sigs( struct roundingData *roundData, float32 a, float32 b, flag zSign )
1036{ 1029{
1037 int16 aExp, bExp, zExp; 1030 int16 aExp, bExp, zExp;
1038 bits32 aSig, bSig, zSig; 1031 bits32 aSig, bSig, zSig;
@@ -1091,7 +1084,7 @@ static float32 addFloat32Sigs( float32 a, float32 b, flag zSign )
1091 ++zExp; 1084 ++zExp;
1092 } 1085 }
1093 roundAndPack: 1086 roundAndPack:
1094 return roundAndPackFloat32( zSign, zExp, zSig ); 1087 return roundAndPackFloat32( roundData, zSign, zExp, zSig );
1095 1088
1096} 1089}
1097 1090
@@ -1104,7 +1097,7 @@ result is a NaN. The subtraction is performed according to the IEC/IEEE
1104Standard for Binary Floating-point Arithmetic. 1097Standard for Binary Floating-point Arithmetic.
1105------------------------------------------------------------------------------- 1098-------------------------------------------------------------------------------
1106*/ 1099*/
1107static float32 subFloat32Sigs( float32 a, float32 b, flag zSign ) 1100static float32 subFloat32Sigs( struct roundingData *roundData, float32 a, float32 b, flag zSign )
1108{ 1101{
1109 int16 aExp, bExp, zExp; 1102 int16 aExp, bExp, zExp;
1110 bits32 aSig, bSig, zSig; 1103 bits32 aSig, bSig, zSig;
@@ -1121,7 +1114,7 @@ static float32 subFloat32Sigs( float32 a, float32 b, flag zSign )
1121 if ( expDiff < 0 ) goto bExpBigger; 1114 if ( expDiff < 0 ) goto bExpBigger;
1122 if ( aExp == 0xFF ) { 1115 if ( aExp == 0xFF ) {
1123 if ( aSig | bSig ) return propagateFloat32NaN( a, b ); 1116 if ( aSig | bSig ) return propagateFloat32NaN( a, b );
1124 float_raise( float_flag_invalid ); 1117 roundData->exception |= float_flag_invalid;
1125 return float32_default_nan; 1118 return float32_default_nan;
1126 } 1119 }
1127 if ( aExp == 0 ) { 1120 if ( aExp == 0 ) {
@@ -1130,7 +1123,7 @@ static float32 subFloat32Sigs( float32 a, float32 b, flag zSign )
1130 } 1123 }
1131 if ( bSig < aSig ) goto aBigger; 1124 if ( bSig < aSig ) goto aBigger;
1132 if ( aSig < bSig ) goto bBigger; 1125 if ( aSig < bSig ) goto bBigger;
1133 return packFloat32( float_rounding_mode == float_round_down, 0, 0 ); 1126 return packFloat32( roundData->mode == float_round_down, 0, 0 );
1134 bExpBigger: 1127 bExpBigger:
1135 if ( bExp == 0xFF ) { 1128 if ( bExp == 0xFF ) {
1136 if ( bSig ) return propagateFloat32NaN( a, b ); 1129 if ( bSig ) return propagateFloat32NaN( a, b );
@@ -1167,7 +1160,7 @@ static float32 subFloat32Sigs( float32 a, float32 b, flag zSign )
1167 zExp = aExp; 1160 zExp = aExp;
1168 normalizeRoundAndPack: 1161 normalizeRoundAndPack:
1169 --zExp; 1162 --zExp;
1170 return normalizeRoundAndPackFloat32( zSign, zExp, zSig ); 1163 return normalizeRoundAndPackFloat32( roundData, zSign, zExp, zSig );
1171 1164
1172} 1165}
1173 1166
@@ -1178,17 +1171,17 @@ and `b'. The operation is performed according to the IEC/IEEE Standard for
1178Binary Floating-point Arithmetic. 1171Binary Floating-point Arithmetic.
1179------------------------------------------------------------------------------- 1172-------------------------------------------------------------------------------
1180*/ 1173*/
1181float32 float32_add( float32 a, float32 b ) 1174float32 float32_add( struct roundingData *roundData, float32 a, float32 b )
1182{ 1175{
1183 flag aSign, bSign; 1176 flag aSign, bSign;
1184 1177
1185 aSign = extractFloat32Sign( a ); 1178 aSign = extractFloat32Sign( a );
1186 bSign = extractFloat32Sign( b ); 1179 bSign = extractFloat32Sign( b );
1187 if ( aSign == bSign ) { 1180 if ( aSign == bSign ) {
1188 return addFloat32Sigs( a, b, aSign ); 1181 return addFloat32Sigs( roundData, a, b, aSign );
1189 } 1182 }
1190 else { 1183 else {
1191 return subFloat32Sigs( a, b, aSign ); 1184 return subFloat32Sigs( roundData, a, b, aSign );
1192 } 1185 }
1193 1186
1194} 1187}
@@ -1200,17 +1193,17 @@ Returns the result of subtracting the single-precision floating-point values
1200for Binary Floating-point Arithmetic. 1193for Binary Floating-point Arithmetic.
1201------------------------------------------------------------------------------- 1194-------------------------------------------------------------------------------
1202*/ 1195*/
1203float32 float32_sub( float32 a, float32 b ) 1196float32 float32_sub( struct roundingData *roundData, float32 a, float32 b )
1204{ 1197{
1205 flag aSign, bSign; 1198 flag aSign, bSign;
1206 1199
1207 aSign = extractFloat32Sign( a ); 1200 aSign = extractFloat32Sign( a );
1208 bSign = extractFloat32Sign( b ); 1201 bSign = extractFloat32Sign( b );
1209 if ( aSign == bSign ) { 1202 if ( aSign == bSign ) {
1210 return subFloat32Sigs( a, b, aSign ); 1203 return subFloat32Sigs( roundData, a, b, aSign );
1211 } 1204 }
1212 else { 1205 else {
1213 return addFloat32Sigs( a, b, aSign ); 1206 return addFloat32Sigs( roundData, a, b, aSign );
1214 } 1207 }
1215 1208
1216} 1209}
@@ -1222,7 +1215,7 @@ Returns the result of multiplying the single-precision floating-point values
1222for Binary Floating-point Arithmetic. 1215for Binary Floating-point Arithmetic.
1223------------------------------------------------------------------------------- 1216-------------------------------------------------------------------------------
1224*/ 1217*/
1225float32 float32_mul( float32 a, float32 b ) 1218float32 float32_mul( struct roundingData *roundData, float32 a, float32 b )
1226{ 1219{
1227 flag aSign, bSign, zSign; 1220 flag aSign, bSign, zSign;
1228 int16 aExp, bExp, zExp; 1221 int16 aExp, bExp, zExp;
@@ -1242,7 +1235,7 @@ float32 float32_mul( float32 a, float32 b )
1242 return propagateFloat32NaN( a, b ); 1235 return propagateFloat32NaN( a, b );
1243 } 1236 }
1244 if ( ( bExp | bSig ) == 0 ) { 1237 if ( ( bExp | bSig ) == 0 ) {
1245 float_raise( float_flag_invalid ); 1238 roundData->exception |= float_flag_invalid;
1246 return float32_default_nan; 1239 return float32_default_nan;
1247 } 1240 }
1248 return packFloat32( zSign, 0xFF, 0 ); 1241 return packFloat32( zSign, 0xFF, 0 );
@@ -1250,7 +1243,7 @@ float32 float32_mul( float32 a, float32 b )
1250 if ( bExp == 0xFF ) { 1243 if ( bExp == 0xFF ) {
1251 if ( bSig ) return propagateFloat32NaN( a, b ); 1244 if ( bSig ) return propagateFloat32NaN( a, b );
1252 if ( ( aExp | aSig ) == 0 ) { 1245 if ( ( aExp | aSig ) == 0 ) {
1253 float_raise( float_flag_invalid ); 1246 roundData->exception |= float_flag_invalid;
1254 return float32_default_nan; 1247 return float32_default_nan;
1255 } 1248 }
1256 return packFloat32( zSign, 0xFF, 0 ); 1249 return packFloat32( zSign, 0xFF, 0 );
@@ -1272,7 +1265,7 @@ float32 float32_mul( float32 a, float32 b )
1272 zSig <<= 1; 1265 zSig <<= 1;
1273 --zExp; 1266 --zExp;
1274 } 1267 }
1275 return roundAndPackFloat32( zSign, zExp, zSig ); 1268 return roundAndPackFloat32( roundData, zSign, zExp, zSig );
1276 1269
1277} 1270}
1278 1271
@@ -1283,7 +1276,7 @@ by the corresponding value `b'. The operation is performed according to the
1283IEC/IEEE Standard for Binary Floating-point Arithmetic. 1276IEC/IEEE Standard for Binary Floating-point Arithmetic.
1284------------------------------------------------------------------------------- 1277-------------------------------------------------------------------------------
1285*/ 1278*/
1286float32 float32_div( float32 a, float32 b ) 1279float32 float32_div( struct roundingData *roundData, float32 a, float32 b )
1287{ 1280{
1288 flag aSign, bSign, zSign; 1281 flag aSign, bSign, zSign;
1289 int16 aExp, bExp, zExp; 1282 int16 aExp, bExp, zExp;
@@ -1300,7 +1293,7 @@ float32 float32_div( float32 a, float32 b )
1300 if ( aSig ) return propagateFloat32NaN( a, b ); 1293 if ( aSig ) return propagateFloat32NaN( a, b );
1301 if ( bExp == 0xFF ) { 1294 if ( bExp == 0xFF ) {
1302 if ( bSig ) return propagateFloat32NaN( a, b ); 1295 if ( bSig ) return propagateFloat32NaN( a, b );
1303 float_raise( float_flag_invalid ); 1296 roundData->exception |= float_flag_invalid;
1304 return float32_default_nan; 1297 return float32_default_nan;
1305 } 1298 }
1306 return packFloat32( zSign, 0xFF, 0 ); 1299 return packFloat32( zSign, 0xFF, 0 );
@@ -1312,10 +1305,10 @@ float32 float32_div( float32 a, float32 b )
1312 if ( bExp == 0 ) { 1305 if ( bExp == 0 ) {
1313 if ( bSig == 0 ) { 1306 if ( bSig == 0 ) {
1314 if ( ( aExp | aSig ) == 0 ) { 1307 if ( ( aExp | aSig ) == 0 ) {
1315 float_raise( float_flag_invalid ); 1308 roundData->exception |= float_flag_invalid;
1316 return float32_default_nan; 1309 return float32_default_nan;
1317 } 1310 }
1318 float_raise( float_flag_divbyzero ); 1311 roundData->exception |= float_flag_divbyzero;
1319 return packFloat32( zSign, 0xFF, 0 ); 1312 return packFloat32( zSign, 0xFF, 0 );
1320 } 1313 }
1321 normalizeFloat32Subnormal( bSig, &bExp, &bSig ); 1314 normalizeFloat32Subnormal( bSig, &bExp, &bSig );
@@ -1331,11 +1324,15 @@ float32 float32_div( float32 a, float32 b )
1331 aSig >>= 1; 1324 aSig >>= 1;
1332 ++zExp; 1325 ++zExp;
1333 } 1326 }
1334 zSig = ( ( (bits64) aSig )<<32 ) / bSig; 1327 {
1328 bits64 tmp = ( (bits64) aSig )<<32;
1329 do_div( tmp, bSig );
1330 zSig = tmp;
1331 }
1335 if ( ( zSig & 0x3F ) == 0 ) { 1332 if ( ( zSig & 0x3F ) == 0 ) {
1336 zSig |= ( ( (bits64) bSig ) * zSig != ( (bits64) aSig )<<32 ); 1333 zSig |= ( ( (bits64) bSig ) * zSig != ( (bits64) aSig )<<32 );
1337 } 1334 }
1338 return roundAndPackFloat32( zSign, zExp, zSig ); 1335 return roundAndPackFloat32( roundData, zSign, zExp, zSig );
1339 1336
1340} 1337}
1341 1338
@@ -1346,7 +1343,7 @@ with respect to the corresponding value `b'. The operation is performed
1346according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. 1343according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
1347------------------------------------------------------------------------------- 1344-------------------------------------------------------------------------------
1348*/ 1345*/
1349float32 float32_rem( float32 a, float32 b ) 1346float32 float32_rem( struct roundingData *roundData, float32 a, float32 b )
1350{ 1347{
1351 flag aSign, bSign, zSign; 1348 flag aSign, bSign, zSign;
1352 int16 aExp, bExp, expDiff; 1349 int16 aExp, bExp, expDiff;
@@ -1366,7 +1363,7 @@ float32 float32_rem( float32 a, float32 b )
1366 if ( aSig || ( ( bExp == 0xFF ) && bSig ) ) { 1363 if ( aSig || ( ( bExp == 0xFF ) && bSig ) ) {
1367 return propagateFloat32NaN( a, b ); 1364 return propagateFloat32NaN( a, b );
1368 } 1365 }
1369 float_raise( float_flag_invalid ); 1366 roundData->exception |= float_flag_invalid;
1370 return float32_default_nan; 1367 return float32_default_nan;
1371 } 1368 }
1372 if ( bExp == 0xFF ) { 1369 if ( bExp == 0xFF ) {
@@ -1375,7 +1372,7 @@ float32 float32_rem( float32 a, float32 b )
1375 } 1372 }
1376 if ( bExp == 0 ) { 1373 if ( bExp == 0 ) {
1377 if ( bSig == 0 ) { 1374 if ( bSig == 0 ) {
1378 float_raise( float_flag_invalid ); 1375 roundData->exception |= float_flag_invalid;
1379 return float32_default_nan; 1376 return float32_default_nan;
1380 } 1377 }
1381 normalizeFloat32Subnormal( bSig, &bExp, &bSig ); 1378 normalizeFloat32Subnormal( bSig, &bExp, &bSig );
@@ -1397,7 +1394,9 @@ float32 float32_rem( float32 a, float32 b )
1397 q = ( bSig <= aSig ); 1394 q = ( bSig <= aSig );
1398 if ( q ) aSig -= bSig; 1395 if ( q ) aSig -= bSig;
1399 if ( 0 < expDiff ) { 1396 if ( 0 < expDiff ) {
1400 q = ( ( (bits64) aSig )<<32 ) / bSig; 1397 bits64 tmp = ( (bits64) aSig )<<32;
1398 do_div( tmp, bSig );
1399 q = tmp;
1401 q >>= 32 - expDiff; 1400 q >>= 32 - expDiff;
1402 bSig >>= 2; 1401 bSig >>= 2;
1403 aSig = ( ( aSig>>1 )<<( expDiff - 1 ) ) - bSig * q; 1402 aSig = ( ( aSig>>1 )<<( expDiff - 1 ) ) - bSig * q;
@@ -1436,7 +1435,7 @@ float32 float32_rem( float32 a, float32 b )
1436 } 1435 }
1437 zSign = ( (sbits32) aSig < 0 ); 1436 zSign = ( (sbits32) aSig < 0 );
1438 if ( zSign ) aSig = - aSig; 1437 if ( zSign ) aSig = - aSig;
1439 return normalizeRoundAndPackFloat32( aSign ^ zSign, bExp, aSig ); 1438 return normalizeRoundAndPackFloat32( roundData, aSign ^ zSign, bExp, aSig );
1440 1439
1441} 1440}
1442 1441
@@ -1447,7 +1446,7 @@ The operation is performed according to the IEC/IEEE Standard for Binary
1447Floating-point Arithmetic. 1446Floating-point Arithmetic.
1448------------------------------------------------------------------------------- 1447-------------------------------------------------------------------------------
1449*/ 1448*/
1450float32 float32_sqrt( float32 a ) 1449float32 float32_sqrt( struct roundingData *roundData, float32 a )
1451{ 1450{
1452 flag aSign; 1451 flag aSign;
1453 int16 aExp, zExp; 1452 int16 aExp, zExp;
@@ -1460,12 +1459,12 @@ float32 float32_sqrt( float32 a )
1460 if ( aExp == 0xFF ) { 1459 if ( aExp == 0xFF ) {
1461 if ( aSig ) return propagateFloat32NaN( a, 0 ); 1460 if ( aSig ) return propagateFloat32NaN( a, 0 );
1462 if ( ! aSign ) return a; 1461 if ( ! aSign ) return a;
1463 float_raise( float_flag_invalid ); 1462 roundData->exception |= float_flag_invalid;
1464 return float32_default_nan; 1463 return float32_default_nan;
1465 } 1464 }
1466 if ( aSign ) { 1465 if ( aSign ) {
1467 if ( ( aExp | aSig ) == 0 ) return a; 1466 if ( ( aExp | aSig ) == 0 ) return a;
1468 float_raise( float_flag_invalid ); 1467 roundData->exception |= float_flag_invalid;
1469 return float32_default_nan; 1468 return float32_default_nan;
1470 } 1469 }
1471 if ( aExp == 0 ) { 1470 if ( aExp == 0 ) {
@@ -1491,7 +1490,7 @@ float32 float32_sqrt( float32 a )
1491 } 1490 }
1492 } 1491 }
1493 shift32RightJamming( zSig, 1, &zSig ); 1492 shift32RightJamming( zSig, 1, &zSig );
1494 return roundAndPackFloat32( 0, zExp, zSig ); 1493 return roundAndPackFloat32( roundData, 0, zExp, zSig );
1495 1494
1496} 1495}
1497 1496
@@ -1653,7 +1652,7 @@ positive integer is returned. Otherwise, if the conversion overflows, the
1653largest integer with the same sign as `a' is returned. 1652largest integer with the same sign as `a' is returned.
1654------------------------------------------------------------------------------- 1653-------------------------------------------------------------------------------
1655*/ 1654*/
1656int32 float64_to_int32( float64 a ) 1655int32 float64_to_int32( struct roundingData *roundData, float64 a )
1657{ 1656{
1658 flag aSign; 1657 flag aSign;
1659 int16 aExp, shiftCount; 1658 int16 aExp, shiftCount;
@@ -1666,7 +1665,7 @@ int32 float64_to_int32( float64 a )
1666 if ( aExp ) aSig |= LIT64( 0x0010000000000000 ); 1665 if ( aExp ) aSig |= LIT64( 0x0010000000000000 );
1667 shiftCount = 0x42C - aExp; 1666 shiftCount = 0x42C - aExp;
1668 if ( 0 < shiftCount ) shift64RightJamming( aSig, shiftCount, &aSig ); 1667 if ( 0 < shiftCount ) shift64RightJamming( aSig, shiftCount, &aSig );
1669 return roundAndPackInt32( aSign, aSig ); 1668 return roundAndPackInt32( roundData, aSign, aSig );
1670 1669
1671} 1670}
1672 1671
@@ -1697,7 +1696,7 @@ int32 float64_to_int32_round_to_zero( float64 a )
1697 goto invalid; 1696 goto invalid;
1698 } 1697 }
1699 else if ( 52 < shiftCount ) { 1698 else if ( 52 < shiftCount ) {
1700 if ( aExp || aSig ) float_exception_flags |= float_flag_inexact; 1699 if ( aExp || aSig ) float_raise( float_flag_inexact );
1701 return 0; 1700 return 0;
1702 } 1701 }
1703 aSig |= LIT64( 0x0010000000000000 ); 1702 aSig |= LIT64( 0x0010000000000000 );
@@ -1707,11 +1706,11 @@ int32 float64_to_int32_round_to_zero( float64 a )
1707 if ( aSign ) z = - z; 1706 if ( aSign ) z = - z;
1708 if ( ( z < 0 ) ^ aSign ) { 1707 if ( ( z < 0 ) ^ aSign ) {
1709 invalid: 1708 invalid:
1710 float_exception_flags |= float_flag_invalid; 1709 float_raise( float_flag_invalid );
1711 return aSign ? 0x80000000 : 0x7FFFFFFF; 1710 return aSign ? 0x80000000 : 0x7FFFFFFF;
1712 } 1711 }
1713 if ( ( aSig<<shiftCount ) != savedASig ) { 1712 if ( ( aSig<<shiftCount ) != savedASig ) {
1714 float_exception_flags |= float_flag_inexact; 1713 float_raise( float_flag_inexact );
1715 } 1714 }
1716 return z; 1715 return z;
1717 1716
@@ -1728,7 +1727,7 @@ positive integer is returned. Otherwise, if the conversion overflows, the
1728largest positive integer is returned. 1727largest positive integer is returned.
1729------------------------------------------------------------------------------- 1728-------------------------------------------------------------------------------
1730*/ 1729*/
1731int32 float64_to_uint32( float64 a ) 1730int32 float64_to_uint32( struct roundingData *roundData, float64 a )
1732{ 1731{
1733 flag aSign; 1732 flag aSign;
1734 int16 aExp, shiftCount; 1733 int16 aExp, shiftCount;
@@ -1741,7 +1740,7 @@ int32 float64_to_uint32( float64 a )
1741 if ( aExp ) aSig |= LIT64( 0x0010000000000000 ); 1740 if ( aExp ) aSig |= LIT64( 0x0010000000000000 );
1742 shiftCount = 0x42C - aExp; 1741 shiftCount = 0x42C - aExp;
1743 if ( 0 < shiftCount ) shift64RightJamming( aSig, shiftCount, &aSig ); 1742 if ( 0 < shiftCount ) shift64RightJamming( aSig, shiftCount, &aSig );
1744 return roundAndPackInt32( aSign, aSig ); 1743 return roundAndPackInt32( roundData, aSign, aSig );
1745} 1744}
1746 1745
1747/* 1746/*
@@ -1770,7 +1769,7 @@ int32 float64_to_uint32_round_to_zero( float64 a )
1770 goto invalid; 1769 goto invalid;
1771 } 1770 }
1772 else if ( 52 < shiftCount ) { 1771 else if ( 52 < shiftCount ) {
1773 if ( aExp || aSig ) float_exception_flags |= float_flag_inexact; 1772 if ( aExp || aSig ) float_raise( float_flag_inexact );
1774 return 0; 1773 return 0;
1775 } 1774 }
1776 aSig |= LIT64( 0x0010000000000000 ); 1775 aSig |= LIT64( 0x0010000000000000 );
@@ -1780,11 +1779,11 @@ int32 float64_to_uint32_round_to_zero( float64 a )
1780 if ( aSign ) z = - z; 1779 if ( aSign ) z = - z;
1781 if ( ( z < 0 ) ^ aSign ) { 1780 if ( ( z < 0 ) ^ aSign ) {
1782 invalid: 1781 invalid:
1783 float_exception_flags |= float_flag_invalid; 1782 float_raise( float_flag_invalid );
1784 return aSign ? 0x80000000 : 0x7FFFFFFF; 1783 return aSign ? 0x80000000 : 0x7FFFFFFF;
1785 } 1784 }
1786 if ( ( aSig<<shiftCount ) != savedASig ) { 1785 if ( ( aSig<<shiftCount ) != savedASig ) {
1787 float_exception_flags |= float_flag_inexact; 1786 float_raise( float_flag_inexact );
1788 } 1787 }
1789 return z; 1788 return z;
1790} 1789}
@@ -1797,7 +1796,7 @@ performed according to the IEC/IEEE Standard for Binary Floating-point
1797Arithmetic. 1796Arithmetic.
1798------------------------------------------------------------------------------- 1797-------------------------------------------------------------------------------
1799*/ 1798*/
1800float32 float64_to_float32( float64 a ) 1799float32 float64_to_float32( struct roundingData *roundData, float64 a )
1801{ 1800{
1802 flag aSign; 1801 flag aSign;
1803 int16 aExp; 1802 int16 aExp;
@@ -1817,7 +1816,7 @@ float32 float64_to_float32( float64 a )
1817 zSig |= 0x40000000; 1816 zSig |= 0x40000000;
1818 aExp -= 0x381; 1817 aExp -= 0x381;
1819 } 1818 }
1820 return roundAndPackFloat32( aSign, aExp, zSig ); 1819 return roundAndPackFloat32( roundData, aSign, aExp, zSig );
1821 1820
1822} 1821}
1823 1822
@@ -1864,7 +1863,7 @@ operation is performed according to the IEC/IEEE Standard for Binary
1864Floating-point Arithmetic. 1863Floating-point Arithmetic.
1865------------------------------------------------------------------------------- 1864-------------------------------------------------------------------------------
1866*/ 1865*/
1867float64 float64_round_to_int( float64 a ) 1866float64 float64_round_to_int( struct roundingData *roundData, float64 a )
1868{ 1867{
1869 flag aSign; 1868 flag aSign;
1870 int16 aExp; 1869 int16 aExp;
@@ -1881,9 +1880,9 @@ float64 float64_round_to_int( float64 a )
1881 } 1880 }
1882 if ( aExp <= 0x3FE ) { 1881 if ( aExp <= 0x3FE ) {
1883 if ( (bits64) ( a<<1 ) == 0 ) return a; 1882 if ( (bits64) ( a<<1 ) == 0 ) return a;
1884 float_exception_flags |= float_flag_inexact; 1883 roundData->exception |= float_flag_inexact;
1885 aSign = extractFloat64Sign( a ); 1884 aSign = extractFloat64Sign( a );
1886 switch ( float_rounding_mode ) { 1885 switch ( roundData->mode ) {
1887 case float_round_nearest_even: 1886 case float_round_nearest_even:
1888 if ( ( aExp == 0x3FE ) && extractFloat64Frac( a ) ) { 1887 if ( ( aExp == 0x3FE ) && extractFloat64Frac( a ) ) {
1889 return packFloat64( aSign, 0x3FF, 0 ); 1888 return packFloat64( aSign, 0x3FF, 0 );
@@ -1901,7 +1900,7 @@ float64 float64_round_to_int( float64 a )
1901 lastBitMask <<= 0x433 - aExp; 1900 lastBitMask <<= 0x433 - aExp;
1902 roundBitsMask = lastBitMask - 1; 1901 roundBitsMask = lastBitMask - 1;
1903 z = a; 1902 z = a;
1904 roundingMode = float_rounding_mode; 1903 roundingMode = roundData->mode;
1905 if ( roundingMode == float_round_nearest_even ) { 1904 if ( roundingMode == float_round_nearest_even ) {
1906 z += lastBitMask>>1; 1905 z += lastBitMask>>1;
1907 if ( ( z & roundBitsMask ) == 0 ) z &= ~ lastBitMask; 1906 if ( ( z & roundBitsMask ) == 0 ) z &= ~ lastBitMask;
@@ -1912,7 +1911,7 @@ float64 float64_round_to_int( float64 a )
1912 } 1911 }
1913 } 1912 }
1914 z &= ~ roundBitsMask; 1913 z &= ~ roundBitsMask;
1915 if ( z != a ) float_exception_flags |= float_flag_inexact; 1914 if ( z != a ) roundData->exception |= float_flag_inexact;
1916 return z; 1915 return z;
1917 1916
1918} 1917}
@@ -1926,7 +1925,7 @@ addition is performed according to the IEC/IEEE Standard for Binary
1926Floating-point Arithmetic. 1925Floating-point Arithmetic.
1927------------------------------------------------------------------------------- 1926-------------------------------------------------------------------------------
1928*/ 1927*/
1929static float64 addFloat64Sigs( float64 a, float64 b, flag zSign ) 1928static float64 addFloat64Sigs( struct roundingData *roundData, float64 a, float64 b, flag zSign )
1930{ 1929{
1931 int16 aExp, bExp, zExp; 1930 int16 aExp, bExp, zExp;
1932 bits64 aSig, bSig, zSig; 1931 bits64 aSig, bSig, zSig;
@@ -1985,7 +1984,7 @@ static float64 addFloat64Sigs( float64 a, float64 b, flag zSign )
1985 ++zExp; 1984 ++zExp;
1986 } 1985 }
1987 roundAndPack: 1986 roundAndPack:
1988 return roundAndPackFloat64( zSign, zExp, zSig ); 1987 return roundAndPackFloat64( roundData, zSign, zExp, zSig );
1989 1988
1990} 1989}
1991 1990
@@ -1998,7 +1997,7 @@ result is a NaN. The subtraction is performed according to the IEC/IEEE
1998Standard for Binary Floating-point Arithmetic. 1997Standard for Binary Floating-point Arithmetic.
1999------------------------------------------------------------------------------- 1998-------------------------------------------------------------------------------
2000*/ 1999*/
2001static float64 subFloat64Sigs( float64 a, float64 b, flag zSign ) 2000static float64 subFloat64Sigs( struct roundingData *roundData, float64 a, float64 b, flag zSign )
2002{ 2001{
2003 int16 aExp, bExp, zExp; 2002 int16 aExp, bExp, zExp;
2004 bits64 aSig, bSig, zSig; 2003 bits64 aSig, bSig, zSig;
@@ -2015,7 +2014,7 @@ static float64 subFloat64Sigs( float64 a, float64 b, flag zSign )
2015 if ( expDiff < 0 ) goto bExpBigger; 2014 if ( expDiff < 0 ) goto bExpBigger;
2016 if ( aExp == 0x7FF ) { 2015 if ( aExp == 0x7FF ) {
2017 if ( aSig | bSig ) return propagateFloat64NaN( a, b ); 2016 if ( aSig | bSig ) return propagateFloat64NaN( a, b );
2018 float_raise( float_flag_invalid ); 2017 roundData->exception |= float_flag_invalid;
2019 return float64_default_nan; 2018 return float64_default_nan;
2020 } 2019 }
2021 if ( aExp == 0 ) { 2020 if ( aExp == 0 ) {
@@ -2024,7 +2023,7 @@ static float64 subFloat64Sigs( float64 a, float64 b, flag zSign )
2024 } 2023 }
2025 if ( bSig < aSig ) goto aBigger; 2024 if ( bSig < aSig ) goto aBigger;
2026 if ( aSig < bSig ) goto bBigger; 2025 if ( aSig < bSig ) goto bBigger;
2027 return packFloat64( float_rounding_mode == float_round_down, 0, 0 ); 2026 return packFloat64( roundData->mode == float_round_down, 0, 0 );
2028 bExpBigger: 2027 bExpBigger:
2029 if ( bExp == 0x7FF ) { 2028 if ( bExp == 0x7FF ) {
2030 if ( bSig ) return propagateFloat64NaN( a, b ); 2029 if ( bSig ) return propagateFloat64NaN( a, b );
@@ -2061,7 +2060,7 @@ static float64 subFloat64Sigs( float64 a, float64 b, flag zSign )
2061 zExp = aExp; 2060 zExp = aExp;
2062 normalizeRoundAndPack: 2061 normalizeRoundAndPack:
2063 --zExp; 2062 --zExp;
2064 return normalizeRoundAndPackFloat64( zSign, zExp, zSig ); 2063 return normalizeRoundAndPackFloat64( roundData, zSign, zExp, zSig );
2065 2064
2066} 2065}
2067 2066
@@ -2072,17 +2071,17 @@ and `b'. The operation is performed according to the IEC/IEEE Standard for
2072Binary Floating-point Arithmetic. 2071Binary Floating-point Arithmetic.
2073------------------------------------------------------------------------------- 2072-------------------------------------------------------------------------------
2074*/ 2073*/
2075float64 float64_add( float64 a, float64 b ) 2074float64 float64_add( struct roundingData *roundData, float64 a, float64 b )
2076{ 2075{
2077 flag aSign, bSign; 2076 flag aSign, bSign;
2078 2077
2079 aSign = extractFloat64Sign( a ); 2078 aSign = extractFloat64Sign( a );
2080 bSign = extractFloat64Sign( b ); 2079 bSign = extractFloat64Sign( b );
2081 if ( aSign == bSign ) { 2080 if ( aSign == bSign ) {
2082 return addFloat64Sigs( a, b, aSign ); 2081 return addFloat64Sigs( roundData, a, b, aSign );
2083 } 2082 }
2084 else { 2083 else {
2085 return subFloat64Sigs( a, b, aSign ); 2084 return subFloat64Sigs( roundData, a, b, aSign );
2086 } 2085 }
2087 2086
2088} 2087}
@@ -2094,17 +2093,17 @@ Returns the result of subtracting the double-precision floating-point values
2094for Binary Floating-point Arithmetic. 2093for Binary Floating-point Arithmetic.
2095------------------------------------------------------------------------------- 2094-------------------------------------------------------------------------------
2096*/ 2095*/
2097float64 float64_sub( float64 a, float64 b ) 2096float64 float64_sub( struct roundingData *roundData, float64 a, float64 b )
2098{ 2097{
2099 flag aSign, bSign; 2098 flag aSign, bSign;
2100 2099
2101 aSign = extractFloat64Sign( a ); 2100 aSign = extractFloat64Sign( a );
2102 bSign = extractFloat64Sign( b ); 2101 bSign = extractFloat64Sign( b );
2103 if ( aSign == bSign ) { 2102 if ( aSign == bSign ) {
2104 return subFloat64Sigs( a, b, aSign ); 2103 return subFloat64Sigs( roundData, a, b, aSign );
2105 } 2104 }
2106 else { 2105 else {
2107 return addFloat64Sigs( a, b, aSign ); 2106 return addFloat64Sigs( roundData, a, b, aSign );
2108 } 2107 }
2109 2108
2110} 2109}
@@ -2116,7 +2115,7 @@ Returns the result of multiplying the double-precision floating-point values
2116for Binary Floating-point Arithmetic. 2115for Binary Floating-point Arithmetic.
2117------------------------------------------------------------------------------- 2116-------------------------------------------------------------------------------
2118*/ 2117*/
2119float64 float64_mul( float64 a, float64 b ) 2118float64 float64_mul( struct roundingData *roundData, float64 a, float64 b )
2120{ 2119{
2121 flag aSign, bSign, zSign; 2120 flag aSign, bSign, zSign;
2122 int16 aExp, bExp, zExp; 2121 int16 aExp, bExp, zExp;
@@ -2134,7 +2133,7 @@ float64 float64_mul( float64 a, float64 b )
2134 return propagateFloat64NaN( a, b ); 2133 return propagateFloat64NaN( a, b );
2135 } 2134 }
2136 if ( ( bExp | bSig ) == 0 ) { 2135 if ( ( bExp | bSig ) == 0 ) {
2137 float_raise( float_flag_invalid ); 2136 roundData->exception |= float_flag_invalid;
2138 return float64_default_nan; 2137 return float64_default_nan;
2139 } 2138 }
2140 return packFloat64( zSign, 0x7FF, 0 ); 2139 return packFloat64( zSign, 0x7FF, 0 );
@@ -2142,7 +2141,7 @@ float64 float64_mul( float64 a, float64 b )
2142 if ( bExp == 0x7FF ) { 2141 if ( bExp == 0x7FF ) {
2143 if ( bSig ) return propagateFloat64NaN( a, b ); 2142 if ( bSig ) return propagateFloat64NaN( a, b );
2144 if ( ( aExp | aSig ) == 0 ) { 2143 if ( ( aExp | aSig ) == 0 ) {
2145 float_raise( float_flag_invalid ); 2144 roundData->exception |= float_flag_invalid;
2146 return float64_default_nan; 2145 return float64_default_nan;
2147 } 2146 }
2148 return packFloat64( zSign, 0x7FF, 0 ); 2147 return packFloat64( zSign, 0x7FF, 0 );
@@ -2164,7 +2163,7 @@ float64 float64_mul( float64 a, float64 b )
2164 zSig0 <<= 1; 2163 zSig0 <<= 1;
2165 --zExp; 2164 --zExp;
2166 } 2165 }
2167 return roundAndPackFloat64( zSign, zExp, zSig0 ); 2166 return roundAndPackFloat64( roundData, zSign, zExp, zSig0 );
2168 2167
2169} 2168}
2170 2169
@@ -2175,7 +2174,7 @@ by the corresponding value `b'. The operation is performed according to
2175the IEC/IEEE Standard for Binary Floating-point Arithmetic. 2174the IEC/IEEE Standard for Binary Floating-point Arithmetic.
2176------------------------------------------------------------------------------- 2175-------------------------------------------------------------------------------
2177*/ 2176*/
2178float64 float64_div( float64 a, float64 b ) 2177float64 float64_div( struct roundingData *roundData, float64 a, float64 b )
2179{ 2178{
2180 flag aSign, bSign, zSign; 2179 flag aSign, bSign, zSign;
2181 int16 aExp, bExp, zExp; 2180 int16 aExp, bExp, zExp;
@@ -2194,7 +2193,7 @@ float64 float64_div( float64 a, float64 b )
2194 if ( aSig ) return propagateFloat64NaN( a, b ); 2193 if ( aSig ) return propagateFloat64NaN( a, b );
2195 if ( bExp == 0x7FF ) { 2194 if ( bExp == 0x7FF ) {
2196 if ( bSig ) return propagateFloat64NaN( a, b ); 2195 if ( bSig ) return propagateFloat64NaN( a, b );
2197 float_raise( float_flag_invalid ); 2196 roundData->exception |= float_flag_invalid;
2198 return float64_default_nan; 2197 return float64_default_nan;
2199 } 2198 }
2200 return packFloat64( zSign, 0x7FF, 0 ); 2199 return packFloat64( zSign, 0x7FF, 0 );
@@ -2206,10 +2205,10 @@ float64 float64_div( float64 a, float64 b )
2206 if ( bExp == 0 ) { 2205 if ( bExp == 0 ) {
2207 if ( bSig == 0 ) { 2206 if ( bSig == 0 ) {
2208 if ( ( aExp | aSig ) == 0 ) { 2207 if ( ( aExp | aSig ) == 0 ) {
2209 float_raise( float_flag_invalid ); 2208 roundData->exception |= float_flag_invalid;
2210 return float64_default_nan; 2209 return float64_default_nan;
2211 } 2210 }
2212 float_raise( float_flag_divbyzero ); 2211 roundData->exception |= float_flag_divbyzero;
2213 return packFloat64( zSign, 0x7FF, 0 ); 2212 return packFloat64( zSign, 0x7FF, 0 );
2214 } 2213 }
2215 normalizeFloat64Subnormal( bSig, &bExp, &bSig ); 2214 normalizeFloat64Subnormal( bSig, &bExp, &bSig );
@@ -2235,7 +2234,7 @@ float64 float64_div( float64 a, float64 b )
2235 } 2234 }
2236 zSig |= ( rem1 != 0 ); 2235 zSig |= ( rem1 != 0 );
2237 } 2236 }
2238 return roundAndPackFloat64( zSign, zExp, zSig ); 2237 return roundAndPackFloat64( roundData, zSign, zExp, zSig );
2239 2238
2240} 2239}
2241 2240
@@ -2246,7 +2245,7 @@ with respect to the corresponding value `b'. The operation is performed
2246according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. 2245according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
2247------------------------------------------------------------------------------- 2246-------------------------------------------------------------------------------
2248*/ 2247*/
2249float64 float64_rem( float64 a, float64 b ) 2248float64 float64_rem( struct roundingData *roundData, float64 a, float64 b )
2250{ 2249{
2251 flag aSign, bSign, zSign; 2250 flag aSign, bSign, zSign;
2252 int16 aExp, bExp, expDiff; 2251 int16 aExp, bExp, expDiff;
@@ -2264,7 +2263,7 @@ float64 float64_rem( float64 a, float64 b )
2264 if ( aSig || ( ( bExp == 0x7FF ) && bSig ) ) { 2263 if ( aSig || ( ( bExp == 0x7FF ) && bSig ) ) {
2265 return propagateFloat64NaN( a, b ); 2264 return propagateFloat64NaN( a, b );
2266 } 2265 }
2267 float_raise( float_flag_invalid ); 2266 roundData->exception |= float_flag_invalid;
2268 return float64_default_nan; 2267 return float64_default_nan;
2269 } 2268 }
2270 if ( bExp == 0x7FF ) { 2269 if ( bExp == 0x7FF ) {
@@ -2273,7 +2272,7 @@ float64 float64_rem( float64 a, float64 b )
2273 } 2272 }
2274 if ( bExp == 0 ) { 2273 if ( bExp == 0 ) {
2275 if ( bSig == 0 ) { 2274 if ( bSig == 0 ) {
2276 float_raise( float_flag_invalid ); 2275 roundData->exception |= float_flag_invalid;
2277 return float64_default_nan; 2276 return float64_default_nan;
2278 } 2277 }
2279 normalizeFloat64Subnormal( bSig, &bExp, &bSig ); 2278 normalizeFloat64Subnormal( bSig, &bExp, &bSig );
@@ -2321,7 +2320,7 @@ float64 float64_rem( float64 a, float64 b )
2321 } 2320 }
2322 zSign = ( (sbits64) aSig < 0 ); 2321 zSign = ( (sbits64) aSig < 0 );
2323 if ( zSign ) aSig = - aSig; 2322 if ( zSign ) aSig = - aSig;
2324 return normalizeRoundAndPackFloat64( aSign ^ zSign, bExp, aSig ); 2323 return normalizeRoundAndPackFloat64( roundData, aSign ^ zSign, bExp, aSig );
2325 2324
2326} 2325}
2327 2326
@@ -2332,7 +2331,7 @@ The operation is performed according to the IEC/IEEE Standard for Binary
2332Floating-point Arithmetic. 2331Floating-point Arithmetic.
2333------------------------------------------------------------------------------- 2332-------------------------------------------------------------------------------
2334*/ 2333*/
2335float64 float64_sqrt( float64 a ) 2334float64 float64_sqrt( struct roundingData *roundData, float64 a )
2336{ 2335{
2337 flag aSign; 2336 flag aSign;
2338 int16 aExp, zExp; 2337 int16 aExp, zExp;
@@ -2346,12 +2345,12 @@ float64 float64_sqrt( float64 a )
2346 if ( aExp == 0x7FF ) { 2345 if ( aExp == 0x7FF ) {
2347 if ( aSig ) return propagateFloat64NaN( a, a ); 2346 if ( aSig ) return propagateFloat64NaN( a, a );
2348 if ( ! aSign ) return a; 2347 if ( ! aSign ) return a;
2349 float_raise( float_flag_invalid ); 2348 roundData->exception |= float_flag_invalid;
2350 return float64_default_nan; 2349 return float64_default_nan;
2351 } 2350 }
2352 if ( aSign ) { 2351 if ( aSign ) {
2353 if ( ( aExp | aSig ) == 0 ) return a; 2352 if ( ( aExp | aSig ) == 0 ) return a;
2354 float_raise( float_flag_invalid ); 2353 roundData->exception |= float_flag_invalid;
2355 return float64_default_nan; 2354 return float64_default_nan;
2356 } 2355 }
2357 if ( aExp == 0 ) { 2356 if ( aExp == 0 ) {
@@ -2382,7 +2381,7 @@ float64 float64_sqrt( float64 a )
2382 } 2381 }
2383 } 2382 }
2384 shift64RightJamming( zSig, 1, &zSig ); 2383 shift64RightJamming( zSig, 1, &zSig );
2385 return roundAndPackFloat64( 0, zExp, zSig ); 2384 return roundAndPackFloat64( roundData, 0, zExp, zSig );
2386 2385
2387} 2386}
2388 2387
@@ -2546,7 +2545,7 @@ largest positive integer is returned. Otherwise, if the conversion
2546overflows, the largest integer with the same sign as `a' is returned. 2545overflows, the largest integer with the same sign as `a' is returned.
2547------------------------------------------------------------------------------- 2546-------------------------------------------------------------------------------
2548*/ 2547*/
2549int32 floatx80_to_int32( floatx80 a ) 2548int32 floatx80_to_int32( struct roundingData *roundData, floatx80 a )
2550{ 2549{
2551 flag aSign; 2550 flag aSign;
2552 int32 aExp, shiftCount; 2551 int32 aExp, shiftCount;
@@ -2559,7 +2558,7 @@ int32 floatx80_to_int32( floatx80 a )
2559 shiftCount = 0x4037 - aExp; 2558 shiftCount = 0x4037 - aExp;
2560 if ( shiftCount <= 0 ) shiftCount = 1; 2559 if ( shiftCount <= 0 ) shiftCount = 1;
2561 shift64RightJamming( aSig, shiftCount, &aSig ); 2560 shift64RightJamming( aSig, shiftCount, &aSig );
2562 return roundAndPackInt32( aSign, aSig ); 2561 return roundAndPackInt32( roundData, aSign, aSig );
2563 2562
2564} 2563}
2565 2564
@@ -2590,7 +2589,7 @@ int32 floatx80_to_int32_round_to_zero( floatx80 a )
2590 goto invalid; 2589 goto invalid;
2591 } 2590 }
2592 else if ( 63 < shiftCount ) { 2591 else if ( 63 < shiftCount ) {
2593 if ( aExp || aSig ) float_exception_flags |= float_flag_inexact; 2592 if ( aExp || aSig ) float_raise( float_flag_inexact );
2594 return 0; 2593 return 0;
2595 } 2594 }
2596 savedASig = aSig; 2595 savedASig = aSig;
@@ -2599,11 +2598,11 @@ int32 floatx80_to_int32_round_to_zero( floatx80 a )
2599 if ( aSign ) z = - z; 2598 if ( aSign ) z = - z;
2600 if ( ( z < 0 ) ^ aSign ) { 2599 if ( ( z < 0 ) ^ aSign ) {
2601 invalid: 2600 invalid:
2602 float_exception_flags |= float_flag_invalid; 2601 float_raise( float_flag_invalid );
2603 return aSign ? 0x80000000 : 0x7FFFFFFF; 2602 return aSign ? 0x80000000 : 0x7FFFFFFF;
2604 } 2603 }
2605 if ( ( aSig<<shiftCount ) != savedASig ) { 2604 if ( ( aSig<<shiftCount ) != savedASig ) {
2606 float_exception_flags |= float_flag_inexact; 2605 float_raise( float_flag_inexact );
2607 } 2606 }
2608 return z; 2607 return z;
2609 2608
@@ -2617,7 +2616,7 @@ conversion is performed according to the IEC/IEEE Standard for Binary
2617Floating-point Arithmetic. 2616Floating-point Arithmetic.
2618------------------------------------------------------------------------------- 2617-------------------------------------------------------------------------------
2619*/ 2618*/
2620float32 floatx80_to_float32( floatx80 a ) 2619float32 floatx80_to_float32( struct roundingData *roundData, floatx80 a )
2621{ 2620{
2622 flag aSign; 2621 flag aSign;
2623 int32 aExp; 2622 int32 aExp;
@@ -2634,7 +2633,7 @@ float32 floatx80_to_float32( floatx80 a )
2634 } 2633 }
2635 shift64RightJamming( aSig, 33, &aSig ); 2634 shift64RightJamming( aSig, 33, &aSig );
2636 if ( aExp || aSig ) aExp -= 0x3F81; 2635 if ( aExp || aSig ) aExp -= 0x3F81;
2637 return roundAndPackFloat32( aSign, aExp, aSig ); 2636 return roundAndPackFloat32( roundData, aSign, aExp, aSig );
2638 2637
2639} 2638}
2640 2639
@@ -2646,7 +2645,7 @@ conversion is performed according to the IEC/IEEE Standard for Binary
2646Floating-point Arithmetic. 2645Floating-point Arithmetic.
2647------------------------------------------------------------------------------- 2646-------------------------------------------------------------------------------
2648*/ 2647*/
2649float64 floatx80_to_float64( floatx80 a ) 2648float64 floatx80_to_float64( struct roundingData *roundData, floatx80 a )
2650{ 2649{
2651 flag aSign; 2650 flag aSign;
2652 int32 aExp; 2651 int32 aExp;
@@ -2663,7 +2662,7 @@ float64 floatx80_to_float64( floatx80 a )
2663 } 2662 }
2664 shift64RightJamming( aSig, 1, &zSig ); 2663 shift64RightJamming( aSig, 1, &zSig );
2665 if ( aExp || aSig ) aExp -= 0x3C01; 2664 if ( aExp || aSig ) aExp -= 0x3C01;
2666 return roundAndPackFloat64( aSign, aExp, zSig ); 2665 return roundAndPackFloat64( roundData, aSign, aExp, zSig );
2667 2666
2668} 2667}
2669 2668
@@ -2675,7 +2674,7 @@ value. The operation is performed according to the IEC/IEEE Standard for
2675Binary Floating-point Arithmetic. 2674Binary Floating-point Arithmetic.
2676------------------------------------------------------------------------------- 2675-------------------------------------------------------------------------------
2677*/ 2676*/
2678floatx80 floatx80_round_to_int( floatx80 a ) 2677floatx80 floatx80_round_to_int( struct roundingData *roundData, floatx80 a )
2679{ 2678{
2680 flag aSign; 2679 flag aSign;
2681 int32 aExp; 2680 int32 aExp;
@@ -2695,9 +2694,9 @@ floatx80 floatx80_round_to_int( floatx80 a )
2695 && ( (bits64) ( extractFloatx80Frac( a )<<1 ) == 0 ) ) { 2694 && ( (bits64) ( extractFloatx80Frac( a )<<1 ) == 0 ) ) {
2696 return a; 2695 return a;
2697 } 2696 }
2698 float_exception_flags |= float_flag_inexact; 2697 roundData->exception |= float_flag_inexact;
2699 aSign = extractFloatx80Sign( a ); 2698 aSign = extractFloatx80Sign( a );
2700 switch ( float_rounding_mode ) { 2699 switch ( roundData->mode ) {
2701 case float_round_nearest_even: 2700 case float_round_nearest_even:
2702 if ( ( aExp == 0x3FFE ) && (bits64) ( extractFloatx80Frac( a )<<1 ) 2701 if ( ( aExp == 0x3FFE ) && (bits64) ( extractFloatx80Frac( a )<<1 )
2703 ) { 2702 ) {
@@ -2721,7 +2720,7 @@ floatx80 floatx80_round_to_int( floatx80 a )
2721 lastBitMask <<= 0x403E - aExp; 2720 lastBitMask <<= 0x403E - aExp;
2722 roundBitsMask = lastBitMask - 1; 2721 roundBitsMask = lastBitMask - 1;
2723 z = a; 2722 z = a;
2724 roundingMode = float_rounding_mode; 2723 roundingMode = roundData->mode;
2725 if ( roundingMode == float_round_nearest_even ) { 2724 if ( roundingMode == float_round_nearest_even ) {
2726 z.low += lastBitMask>>1; 2725 z.low += lastBitMask>>1;
2727 if ( ( z.low & roundBitsMask ) == 0 ) z.low &= ~ lastBitMask; 2726 if ( ( z.low & roundBitsMask ) == 0 ) z.low &= ~ lastBitMask;
@@ -2736,7 +2735,7 @@ floatx80 floatx80_round_to_int( floatx80 a )
2736 ++z.high; 2735 ++z.high;
2737 z.low = LIT64( 0x8000000000000000 ); 2736 z.low = LIT64( 0x8000000000000000 );
2738 } 2737 }
2739 if ( z.low != a.low ) float_exception_flags |= float_flag_inexact; 2738 if ( z.low != a.low ) roundData->exception |= float_flag_inexact;
2740 return z; 2739 return z;
2741 2740
2742} 2741}
@@ -2750,7 +2749,7 @@ The addition is performed according to the IEC/IEEE Standard for Binary
2750Floating-point Arithmetic. 2749Floating-point Arithmetic.
2751------------------------------------------------------------------------------- 2750-------------------------------------------------------------------------------
2752*/ 2751*/
2753static floatx80 addFloatx80Sigs( floatx80 a, floatx80 b, flag zSign ) 2752static floatx80 addFloatx80Sigs( struct roundingData *roundData, floatx80 a, floatx80 b, flag zSign )
2754{ 2753{
2755 int32 aExp, bExp, zExp; 2754 int32 aExp, bExp, zExp;
2756 bits64 aSig, bSig, zSig0, zSig1; 2755 bits64 aSig, bSig, zSig0, zSig1;
@@ -2806,7 +2805,7 @@ static floatx80 addFloatx80Sigs( floatx80 a, floatx80 b, flag zSign )
2806 roundAndPack: 2805 roundAndPack:
2807 return 2806 return
2808 roundAndPackFloatx80( 2807 roundAndPackFloatx80(
2809 floatx80_rounding_precision, zSign, zExp, zSig0, zSig1 ); 2808 roundData, zSign, zExp, zSig0, zSig1 );
2810 2809
2811} 2810}
2812 2811
@@ -2819,7 +2818,7 @@ result is a NaN. The subtraction is performed according to the IEC/IEEE
2819Standard for Binary Floating-point Arithmetic. 2818Standard for Binary Floating-point Arithmetic.
2820------------------------------------------------------------------------------- 2819-------------------------------------------------------------------------------
2821*/ 2820*/
2822static floatx80 subFloatx80Sigs( floatx80 a, floatx80 b, flag zSign ) 2821static floatx80 subFloatx80Sigs( struct roundingData *roundData, floatx80 a, floatx80 b, flag zSign )
2823{ 2822{
2824 int32 aExp, bExp, zExp; 2823 int32 aExp, bExp, zExp;
2825 bits64 aSig, bSig, zSig0, zSig1; 2824 bits64 aSig, bSig, zSig0, zSig1;
@@ -2837,7 +2836,7 @@ static floatx80 subFloatx80Sigs( floatx80 a, floatx80 b, flag zSign )
2837 if ( (bits64) ( ( aSig | bSig )<<1 ) ) { 2836 if ( (bits64) ( ( aSig | bSig )<<1 ) ) {
2838 return propagateFloatx80NaN( a, b ); 2837 return propagateFloatx80NaN( a, b );
2839 } 2838 }
2840 float_raise( float_flag_invalid ); 2839 roundData->exception |= float_flag_invalid;
2841 z.low = floatx80_default_nan_low; 2840 z.low = floatx80_default_nan_low;
2842 z.high = floatx80_default_nan_high; 2841 z.high = floatx80_default_nan_high;
2843 return z; 2842 return z;
@@ -2849,7 +2848,7 @@ static floatx80 subFloatx80Sigs( floatx80 a, floatx80 b, flag zSign )
2849 zSig1 = 0; 2848 zSig1 = 0;
2850 if ( bSig < aSig ) goto aBigger; 2849 if ( bSig < aSig ) goto aBigger;
2851 if ( aSig < bSig ) goto bBigger; 2850 if ( aSig < bSig ) goto bBigger;
2852 return packFloatx80( float_rounding_mode == float_round_down, 0, 0 ); 2851 return packFloatx80( roundData->mode == float_round_down, 0, 0 );
2853 bExpBigger: 2852 bExpBigger:
2854 if ( bExp == 0x7FFF ) { 2853 if ( bExp == 0x7FFF ) {
2855 if ( (bits64) ( bSig<<1 ) ) return propagateFloatx80NaN( a, b ); 2854 if ( (bits64) ( bSig<<1 ) ) return propagateFloatx80NaN( a, b );
@@ -2875,7 +2874,7 @@ static floatx80 subFloatx80Sigs( floatx80 a, floatx80 b, flag zSign )
2875 normalizeRoundAndPack: 2874 normalizeRoundAndPack:
2876 return 2875 return
2877 normalizeRoundAndPackFloatx80( 2876 normalizeRoundAndPackFloatx80(
2878 floatx80_rounding_precision, zSign, zExp, zSig0, zSig1 ); 2877 roundData, zSign, zExp, zSig0, zSig1 );
2879 2878
2880} 2879}
2881 2880
@@ -2886,17 +2885,17 @@ values `a' and `b'. The operation is performed according to the IEC/IEEE
2886Standard for Binary Floating-point Arithmetic. 2885Standard for Binary Floating-point Arithmetic.
2887------------------------------------------------------------------------------- 2886-------------------------------------------------------------------------------
2888*/ 2887*/
2889floatx80 floatx80_add( floatx80 a, floatx80 b ) 2888floatx80 floatx80_add( struct roundingData *roundData, floatx80 a, floatx80 b )
2890{ 2889{
2891 flag aSign, bSign; 2890 flag aSign, bSign;
2892 2891
2893 aSign = extractFloatx80Sign( a ); 2892 aSign = extractFloatx80Sign( a );
2894 bSign = extractFloatx80Sign( b ); 2893 bSign = extractFloatx80Sign( b );
2895 if ( aSign == bSign ) { 2894 if ( aSign == bSign ) {
2896 return addFloatx80Sigs( a, b, aSign ); 2895 return addFloatx80Sigs( roundData, a, b, aSign );
2897 } 2896 }
2898 else { 2897 else {
2899 return subFloatx80Sigs( a, b, aSign ); 2898 return subFloatx80Sigs( roundData, a, b, aSign );
2900 } 2899 }
2901 2900
2902} 2901}
@@ -2908,17 +2907,17 @@ point values `a' and `b'. The operation is performed according to the
2908IEC/IEEE Standard for Binary Floating-point Arithmetic. 2907IEC/IEEE Standard for Binary Floating-point Arithmetic.
2909------------------------------------------------------------------------------- 2908-------------------------------------------------------------------------------
2910*/ 2909*/
2911floatx80 floatx80_sub( floatx80 a, floatx80 b ) 2910floatx80 floatx80_sub( struct roundingData *roundData, floatx80 a, floatx80 b )
2912{ 2911{
2913 flag aSign, bSign; 2912 flag aSign, bSign;
2914 2913
2915 aSign = extractFloatx80Sign( a ); 2914 aSign = extractFloatx80Sign( a );
2916 bSign = extractFloatx80Sign( b ); 2915 bSign = extractFloatx80Sign( b );
2917 if ( aSign == bSign ) { 2916 if ( aSign == bSign ) {
2918 return subFloatx80Sigs( a, b, aSign ); 2917 return subFloatx80Sigs( roundData, a, b, aSign );
2919 } 2918 }
2920 else { 2919 else {
2921 return addFloatx80Sigs( a, b, aSign ); 2920 return addFloatx80Sigs( roundData, a, b, aSign );
2922 } 2921 }
2923 2922
2924} 2923}
@@ -2930,7 +2929,7 @@ point values `a' and `b'. The operation is performed according to the
2930IEC/IEEE Standard for Binary Floating-point Arithmetic. 2929IEC/IEEE Standard for Binary Floating-point Arithmetic.
2931------------------------------------------------------------------------------- 2930-------------------------------------------------------------------------------
2932*/ 2931*/
2933floatx80 floatx80_mul( floatx80 a, floatx80 b ) 2932floatx80 floatx80_mul( struct roundingData *roundData, floatx80 a, floatx80 b )
2934{ 2933{
2935 flag aSign, bSign, zSign; 2934 flag aSign, bSign, zSign;
2936 int32 aExp, bExp, zExp; 2935 int32 aExp, bExp, zExp;
@@ -2956,7 +2955,7 @@ floatx80 floatx80_mul( floatx80 a, floatx80 b )
2956 if ( (bits64) ( bSig<<1 ) ) return propagateFloatx80NaN( a, b ); 2955 if ( (bits64) ( bSig<<1 ) ) return propagateFloatx80NaN( a, b );
2957 if ( ( aExp | aSig ) == 0 ) { 2956 if ( ( aExp | aSig ) == 0 ) {
2958 invalid: 2957 invalid:
2959 float_raise( float_flag_invalid ); 2958 roundData->exception |= float_flag_invalid;
2960 z.low = floatx80_default_nan_low; 2959 z.low = floatx80_default_nan_low;
2961 z.high = floatx80_default_nan_high; 2960 z.high = floatx80_default_nan_high;
2962 return z; 2961 return z;
@@ -2979,7 +2978,7 @@ floatx80 floatx80_mul( floatx80 a, floatx80 b )
2979 } 2978 }
2980 return 2979 return
2981 roundAndPackFloatx80( 2980 roundAndPackFloatx80(
2982 floatx80_rounding_precision, zSign, zExp, zSig0, zSig1 ); 2981 roundData, zSign, zExp, zSig0, zSig1 );
2983 2982
2984} 2983}
2985 2984
@@ -2990,7 +2989,7 @@ value `a' by the corresponding value `b'. The operation is performed
2990according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. 2989according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
2991------------------------------------------------------------------------------- 2990-------------------------------------------------------------------------------
2992*/ 2991*/
2993floatx80 floatx80_div( floatx80 a, floatx80 b ) 2992floatx80 floatx80_div( struct roundingData *roundData, floatx80 a, floatx80 b )
2994{ 2993{
2995 flag aSign, bSign, zSign; 2994 flag aSign, bSign, zSign;
2996 int32 aExp, bExp, zExp; 2995 int32 aExp, bExp, zExp;
@@ -3021,12 +3020,12 @@ floatx80 floatx80_div( floatx80 a, floatx80 b )
3021 if ( bSig == 0 ) { 3020 if ( bSig == 0 ) {
3022 if ( ( aExp | aSig ) == 0 ) { 3021 if ( ( aExp | aSig ) == 0 ) {
3023 invalid: 3022 invalid:
3024 float_raise( float_flag_invalid ); 3023 roundData->exception |= float_flag_invalid;
3025 z.low = floatx80_default_nan_low; 3024 z.low = floatx80_default_nan_low;
3026 z.high = floatx80_default_nan_high; 3025 z.high = floatx80_default_nan_high;
3027 return z; 3026 return z;
3028 } 3027 }
3029 float_raise( float_flag_divbyzero ); 3028 roundData->exception |= float_flag_divbyzero;
3030 return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) ); 3029 return packFloatx80( zSign, 0x7FFF, LIT64( 0x8000000000000000 ) );
3031 } 3030 }
3032 normalizeFloatx80Subnormal( bSig, &bExp, &bSig ); 3031 normalizeFloatx80Subnormal( bSig, &bExp, &bSig );
@@ -3060,7 +3059,7 @@ floatx80 floatx80_div( floatx80 a, floatx80 b )
3060 } 3059 }
3061 return 3060 return
3062 roundAndPackFloatx80( 3061 roundAndPackFloatx80(
3063 floatx80_rounding_precision, zSign, zExp, zSig0, zSig1 ); 3062 roundData, zSign, zExp, zSig0, zSig1 );
3064 3063
3065} 3064}
3066 3065
@@ -3071,7 +3070,7 @@ Returns the remainder of the extended double-precision floating-point value
3071according to the IEC/IEEE Standard for Binary Floating-point Arithmetic. 3070according to the IEC/IEEE Standard for Binary Floating-point Arithmetic.
3072------------------------------------------------------------------------------- 3071-------------------------------------------------------------------------------
3073*/ 3072*/
3074floatx80 floatx80_rem( floatx80 a, floatx80 b ) 3073floatx80 floatx80_rem( struct roundingData *roundData, floatx80 a, floatx80 b )
3075{ 3074{
3076 flag aSign, bSign, zSign; 3075 flag aSign, bSign, zSign;
3077 int32 aExp, bExp, expDiff; 3076 int32 aExp, bExp, expDiff;
@@ -3099,7 +3098,7 @@ floatx80 floatx80_rem( floatx80 a, floatx80 b )
3099 if ( bExp == 0 ) { 3098 if ( bExp == 0 ) {
3100 if ( bSig == 0 ) { 3099 if ( bSig == 0 ) {
3101 invalid: 3100 invalid:
3102 float_raise( float_flag_invalid ); 3101 roundData->exception |= float_flag_invalid;
3103 z.low = floatx80_default_nan_low; 3102 z.low = floatx80_default_nan_low;
3104 z.high = floatx80_default_nan_high; 3103 z.high = floatx80_default_nan_high;
3105 return z; 3104 return z;
@@ -3156,9 +3155,10 @@ floatx80 floatx80_rem( floatx80 a, floatx80 b )
3156 aSig1 = alternateASig1; 3155 aSig1 = alternateASig1;
3157 zSign = ! zSign; 3156 zSign = ! zSign;
3158 } 3157 }
3158
3159 return 3159 return
3160 normalizeRoundAndPackFloatx80( 3160 normalizeRoundAndPackFloatx80(
3161 80, zSign, bExp + expDiff, aSig0, aSig1 ); 3161 roundData, zSign, bExp + expDiff, aSig0, aSig1 );
3162 3162
3163} 3163}
3164 3164
@@ -3169,7 +3169,7 @@ value `a'. The operation is performed according to the IEC/IEEE Standard
3169for Binary Floating-point Arithmetic. 3169for Binary Floating-point Arithmetic.
3170------------------------------------------------------------------------------- 3170-------------------------------------------------------------------------------
3171*/ 3171*/
3172floatx80 floatx80_sqrt( floatx80 a ) 3172floatx80 floatx80_sqrt( struct roundingData *roundData, floatx80 a )
3173{ 3173{
3174 flag aSign; 3174 flag aSign;
3175 int32 aExp, zExp; 3175 int32 aExp, zExp;
@@ -3189,7 +3189,7 @@ floatx80 floatx80_sqrt( floatx80 a )
3189 if ( aSign ) { 3189 if ( aSign ) {
3190 if ( ( aExp | aSig0 ) == 0 ) return a; 3190 if ( ( aExp | aSig0 ) == 0 ) return a;
3191 invalid: 3191 invalid:
3192 float_raise( float_flag_invalid ); 3192 roundData->exception |= float_flag_invalid;
3193 z.low = floatx80_default_nan_low; 3193 z.low = floatx80_default_nan_low;
3194 z.high = floatx80_default_nan_high; 3194 z.high = floatx80_default_nan_high;
3195 return z; 3195 return z;
@@ -3234,7 +3234,7 @@ floatx80 floatx80_sqrt( floatx80 a )
3234 } 3234 }
3235 return 3235 return
3236 roundAndPackFloatx80( 3236 roundAndPackFloatx80(
3237 floatx80_rounding_precision, 0, zExp, zSig0, zSig1 ); 3237 roundData, 0, zExp, zSig0, zSig1 );
3238 3238
3239} 3239}
3240 3240
@@ -3256,7 +3256,7 @@ flag floatx80_eq( floatx80 a, floatx80 b )
3256 ) { 3256 ) {
3257 if ( floatx80_is_signaling_nan( a ) 3257 if ( floatx80_is_signaling_nan( a )
3258 || floatx80_is_signaling_nan( b ) ) { 3258 || floatx80_is_signaling_nan( b ) ) {
3259 float_raise( float_flag_invalid ); 3259 roundData->exception |= float_flag_invalid;
3260 } 3260 }
3261 return 0; 3261 return 0;
3262 } 3262 }
@@ -3286,7 +3286,7 @@ flag floatx80_le( floatx80 a, floatx80 b )
3286 || ( ( extractFloatx80Exp( b ) == 0x7FFF ) 3286 || ( ( extractFloatx80Exp( b ) == 0x7FFF )
3287 && (bits64) ( extractFloatx80Frac( b )<<1 ) ) 3287 && (bits64) ( extractFloatx80Frac( b )<<1 ) )
3288 ) { 3288 ) {
3289 float_raise( float_flag_invalid ); 3289 roundData->exception |= float_flag_invalid;
3290 return 0; 3290 return 0;
3291 } 3291 }
3292 aSign = extractFloatx80Sign( a ); 3292 aSign = extractFloatx80Sign( a );
@@ -3320,7 +3320,7 @@ flag floatx80_lt( floatx80 a, floatx80 b )
3320 || ( ( extractFloatx80Exp( b ) == 0x7FFF ) 3320 || ( ( extractFloatx80Exp( b ) == 0x7FFF )
3321 && (bits64) ( extractFloatx80Frac( b )<<1 ) ) 3321 && (bits64) ( extractFloatx80Frac( b )<<1 ) )
3322 ) { 3322 ) {
3323 float_raise( float_flag_invalid ); 3323 roundData->exception |= float_flag_invalid;
3324 return 0; 3324 return 0;
3325 } 3325 }
3326 aSign = extractFloatx80Sign( a ); 3326 aSign = extractFloatx80Sign( a );
@@ -3353,7 +3353,7 @@ flag floatx80_eq_signaling( floatx80 a, floatx80 b )
3353 || ( ( extractFloatx80Exp( b ) == 0x7FFF ) 3353 || ( ( extractFloatx80Exp( b ) == 0x7FFF )
3354 && (bits64) ( extractFloatx80Frac( b )<<1 ) ) 3354 && (bits64) ( extractFloatx80Frac( b )<<1 ) )
3355 ) { 3355 ) {
3356 float_raise( float_flag_invalid ); 3356 roundData->exception |= float_flag_invalid;
3357 return 0; 3357 return 0;
3358 } 3358 }
3359 return 3359 return
@@ -3384,7 +3384,7 @@ flag floatx80_le_quiet( floatx80 a, floatx80 b )
3384 ) { 3384 ) {
3385 if ( floatx80_is_signaling_nan( a ) 3385 if ( floatx80_is_signaling_nan( a )
3386 || floatx80_is_signaling_nan( b ) ) { 3386 || floatx80_is_signaling_nan( b ) ) {
3387 float_raise( float_flag_invalid ); 3387 roundData->exception |= float_flag_invalid;
3388 } 3388 }
3389 return 0; 3389 return 0;
3390 } 3390 }
@@ -3421,7 +3421,7 @@ flag floatx80_lt_quiet( floatx80 a, floatx80 b )
3421 ) { 3421 ) {
3422 if ( floatx80_is_signaling_nan( a ) 3422 if ( floatx80_is_signaling_nan( a )
3423 || floatx80_is_signaling_nan( b ) ) { 3423 || floatx80_is_signaling_nan( b ) ) {
3424 float_raise( float_flag_invalid ); 3424 roundData->exception |= float_flag_invalid;
3425 } 3425 }
3426 return 0; 3426 return 0;
3427 } 3427 }
diff --git a/arch/arm/nwfpe/softfloat.h b/arch/arm/nwfpe/softfloat.h
index 1e1743173899..1c8799b9ee4d 100644
--- a/arch/arm/nwfpe/softfloat.h
+++ b/arch/arm/nwfpe/softfloat.h
@@ -74,7 +74,7 @@ enum {
74Software IEC/IEEE floating-point rounding mode. 74Software IEC/IEEE floating-point rounding mode.
75------------------------------------------------------------------------------- 75-------------------------------------------------------------------------------
76*/ 76*/
77extern signed char float_rounding_mode; 77//extern int8 float_rounding_mode;
78enum { 78enum {
79 float_round_nearest_even = 0, 79 float_round_nearest_even = 0,
80 float_round_to_zero = 1, 80 float_round_to_zero = 1,
@@ -86,7 +86,6 @@ enum {
86------------------------------------------------------------------------------- 86-------------------------------------------------------------------------------
87Software IEC/IEEE floating-point exception flags. 87Software IEC/IEEE floating-point exception flags.
88------------------------------------------------------------------------------- 88-------------------------------------------------------------------------------
89extern signed char float_exception_flags;
90enum { 89enum {
91 float_flag_inexact = 1, 90 float_flag_inexact = 1,
92 float_flag_underflow = 2, 91 float_flag_underflow = 2,
@@ -99,7 +98,6 @@ ScottB: November 4, 1998
99Changed the enumeration to match the bit order in the FPA11. 98Changed the enumeration to match the bit order in the FPA11.
100*/ 99*/
101 100
102extern signed char float_exception_flags;
103enum { 101enum {
104 float_flag_invalid = 1, 102 float_flag_invalid = 1,
105 float_flag_divbyzero = 2, 103 float_flag_divbyzero = 2,
@@ -121,7 +119,7 @@ void float_raise( signed char );
121Software IEC/IEEE integer-to-floating-point conversion routines. 119Software IEC/IEEE integer-to-floating-point conversion routines.
122------------------------------------------------------------------------------- 120-------------------------------------------------------------------------------
123*/ 121*/
124float32 int32_to_float32( signed int ); 122float32 int32_to_float32( struct roundingData *, signed int );
125float64 int32_to_float64( signed int ); 123float64 int32_to_float64( signed int );
126#ifdef FLOATX80 124#ifdef FLOATX80
127floatx80 int32_to_floatx80( signed int ); 125floatx80 int32_to_floatx80( signed int );
@@ -132,7 +130,7 @@ floatx80 int32_to_floatx80( signed int );
132Software IEC/IEEE single-precision conversion routines. 130Software IEC/IEEE single-precision conversion routines.
133------------------------------------------------------------------------------- 131-------------------------------------------------------------------------------
134*/ 132*/
135signed int float32_to_int32( float32 ); 133signed int float32_to_int32( struct roundingData *, float32 );
136signed int float32_to_int32_round_to_zero( float32 ); 134signed int float32_to_int32_round_to_zero( float32 );
137float64 float32_to_float64( float32 ); 135float64 float32_to_float64( float32 );
138#ifdef FLOATX80 136#ifdef FLOATX80
@@ -144,13 +142,13 @@ floatx80 float32_to_floatx80( float32 );
144Software IEC/IEEE single-precision operations. 142Software IEC/IEEE single-precision operations.
145------------------------------------------------------------------------------- 143-------------------------------------------------------------------------------
146*/ 144*/
147float32 float32_round_to_int( float32 ); 145float32 float32_round_to_int( struct roundingData*, float32 );
148float32 float32_add( float32, float32 ); 146float32 float32_add( struct roundingData *, float32, float32 );
149float32 float32_sub( float32, float32 ); 147float32 float32_sub( struct roundingData *, float32, float32 );
150float32 float32_mul( float32, float32 ); 148float32 float32_mul( struct roundingData *, float32, float32 );
151float32 float32_div( float32, float32 ); 149float32 float32_div( struct roundingData *, float32, float32 );
152float32 float32_rem( float32, float32 ); 150float32 float32_rem( struct roundingData *, float32, float32 );
153float32 float32_sqrt( float32 ); 151float32 float32_sqrt( struct roundingData*, float32 );
154char float32_eq( float32, float32 ); 152char float32_eq( float32, float32 );
155char float32_le( float32, float32 ); 153char float32_le( float32, float32 );
156char float32_lt( float32, float32 ); 154char float32_lt( float32, float32 );
@@ -164,9 +162,9 @@ char float32_is_signaling_nan( float32 );
164Software IEC/IEEE double-precision conversion routines. 162Software IEC/IEEE double-precision conversion routines.
165------------------------------------------------------------------------------- 163-------------------------------------------------------------------------------
166*/ 164*/
167signed int float64_to_int32( float64 ); 165signed int float64_to_int32( struct roundingData *, float64 );
168signed int float64_to_int32_round_to_zero( float64 ); 166signed int float64_to_int32_round_to_zero( float64 );
169float32 float64_to_float32( float64 ); 167float32 float64_to_float32( struct roundingData *, float64 );
170#ifdef FLOATX80 168#ifdef FLOATX80
171floatx80 float64_to_floatx80( float64 ); 169floatx80 float64_to_floatx80( float64 );
172#endif 170#endif
@@ -176,13 +174,13 @@ floatx80 float64_to_floatx80( float64 );
176Software IEC/IEEE double-precision operations. 174Software IEC/IEEE double-precision operations.
177------------------------------------------------------------------------------- 175-------------------------------------------------------------------------------
178*/ 176*/
179float64 float64_round_to_int( float64 ); 177float64 float64_round_to_int( struct roundingData *, float64 );
180float64 float64_add( float64, float64 ); 178float64 float64_add( struct roundingData *, float64, float64 );
181float64 float64_sub( float64, float64 ); 179float64 float64_sub( struct roundingData *, float64, float64 );
182float64 float64_mul( float64, float64 ); 180float64 float64_mul( struct roundingData *, float64, float64 );
183float64 float64_div( float64, float64 ); 181float64 float64_div( struct roundingData *, float64, float64 );
184float64 float64_rem( float64, float64 ); 182float64 float64_rem( struct roundingData *, float64, float64 );
185float64 float64_sqrt( float64 ); 183float64 float64_sqrt( struct roundingData *, float64 );
186char float64_eq( float64, float64 ); 184char float64_eq( float64, float64 );
187char float64_le( float64, float64 ); 185char float64_le( float64, float64 );
188char float64_lt( float64, float64 ); 186char float64_lt( float64, float64 );
@@ -198,31 +196,23 @@ char float64_is_signaling_nan( float64 );
198Software IEC/IEEE extended double-precision conversion routines. 196Software IEC/IEEE extended double-precision conversion routines.
199------------------------------------------------------------------------------- 197-------------------------------------------------------------------------------
200*/ 198*/
201signed int floatx80_to_int32( floatx80 ); 199signed int floatx80_to_int32( struct roundingData *, floatx80 );
202signed int floatx80_to_int32_round_to_zero( floatx80 ); 200signed int floatx80_to_int32_round_to_zero( floatx80 );
203float32 floatx80_to_float32( floatx80 ); 201float32 floatx80_to_float32( struct roundingData *, floatx80 );
204float64 floatx80_to_float64( floatx80 ); 202float64 floatx80_to_float64( struct roundingData *, floatx80 );
205
206/*
207-------------------------------------------------------------------------------
208Software IEC/IEEE extended double-precision rounding precision. Valid
209values are 32, 64, and 80.
210-------------------------------------------------------------------------------
211*/
212extern signed char floatx80_rounding_precision;
213 203
214/* 204/*
215------------------------------------------------------------------------------- 205-------------------------------------------------------------------------------
216Software IEC/IEEE extended double-precision operations. 206Software IEC/IEEE extended double-precision operations.
217------------------------------------------------------------------------------- 207-------------------------------------------------------------------------------
218*/ 208*/
219floatx80 floatx80_round_to_int( floatx80 ); 209floatx80 floatx80_round_to_int( struct roundingData *, floatx80 );
220floatx80 floatx80_add( floatx80, floatx80 ); 210floatx80 floatx80_add( struct roundingData *, floatx80, floatx80 );
221floatx80 floatx80_sub( floatx80, floatx80 ); 211floatx80 floatx80_sub( struct roundingData *, floatx80, floatx80 );
222floatx80 floatx80_mul( floatx80, floatx80 ); 212floatx80 floatx80_mul( struct roundingData *, floatx80, floatx80 );
223floatx80 floatx80_div( floatx80, floatx80 ); 213floatx80 floatx80_div( struct roundingData *, floatx80, floatx80 );
224floatx80 floatx80_rem( floatx80, floatx80 ); 214floatx80 floatx80_rem( struct roundingData *, floatx80, floatx80 );
225floatx80 floatx80_sqrt( floatx80 ); 215floatx80 floatx80_sqrt( struct roundingData *, floatx80 );
226char floatx80_eq( floatx80, floatx80 ); 216char floatx80_eq( floatx80, floatx80 );
227char floatx80_le( floatx80, floatx80 ); 217char floatx80_le( floatx80, floatx80 );
228char floatx80_lt( floatx80, floatx80 ); 218char floatx80_lt( floatx80, floatx80 );
diff --git a/arch/arm/oprofile/Makefile b/arch/arm/oprofile/Makefile
index ba1a6e9f2b28..8ffb523e6c77 100644
--- a/arch/arm/oprofile/Makefile
+++ b/arch/arm/oprofile/Makefile
@@ -6,6 +6,6 @@ DRIVER_OBJS = $(addprefix ../../../drivers/oprofile/, \
6 oprofilefs.o oprofile_stats.o \ 6 oprofilefs.o oprofile_stats.o \
7 timer_int.o ) 7 timer_int.o )
8 8
9oprofile-y := $(DRIVER_OBJS) init.o 9oprofile-y := $(DRIVER_OBJS) init.o backtrace.o
10oprofile-$(CONFIG_CPU_XSCALE) += common.o op_model_xscale.o 10oprofile-$(CONFIG_CPU_XSCALE) += common.o op_model_xscale.o
11 11
diff --git a/arch/arm/oprofile/backtrace.c b/arch/arm/oprofile/backtrace.c
new file mode 100644
index 000000000000..df35c452a8bf
--- /dev/null
+++ b/arch/arm/oprofile/backtrace.c
@@ -0,0 +1,144 @@
1/*
2 * Arm specific backtracing code for oprofile
3 *
4 * Copyright 2005 Openedhand Ltd.
5 *
6 * Author: Richard Purdie <rpurdie@openedhand.com>
7 *
8 * Based on i386 oprofile backtrace code by John Levon, David Smith
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 version 2 as
12 * published by the Free Software Foundation.
13 *
14 */
15
16#include <linux/oprofile.h>
17#include <linux/sched.h>
18#include <linux/mm.h>
19#include <asm/ptrace.h>
20#include <asm/uaccess.h>
21
22
23/*
24 * The registers we're interested in are at the end of the variable
25 * length saved register structure. The fp points at the end of this
26 * structure so the address of this struct is:
27 * (struct frame_tail *)(xxx->fp)-1
28 */
29struct frame_tail {
30 struct frame_tail *fp;
31 unsigned long sp;
32 unsigned long lr;
33} __attribute__((packed));
34
35
36#ifdef CONFIG_FRAME_POINTER
37static struct frame_tail* kernel_backtrace(struct frame_tail *tail)
38{
39 oprofile_add_trace(tail->lr);
40
41 /* frame pointers should strictly progress back up the stack
42 * (towards higher addresses) */
43 if (tail >= tail->fp)
44 return NULL;
45
46 return tail->fp-1;
47}
48#endif
49
50static struct frame_tail* user_backtrace(struct frame_tail *tail)
51{
52 struct frame_tail buftail;
53
54 /* hardware pte might not be valid due to dirty/accessed bit emulation
55 * so we use copy_from_user and benefit from exception fixups */
56 if (copy_from_user(&buftail, tail, sizeof(struct frame_tail)))
57 return NULL;
58
59 oprofile_add_trace(buftail.lr);
60
61 /* frame pointers should strictly progress back up the stack
62 * (towards higher addresses) */
63 if (tail >= buftail.fp)
64 return NULL;
65
66 return buftail.fp-1;
67}
68
69/* Compare two addresses and see if they're on the same page */
70#define CMP_ADDR_EQUAL(x,y,offset) ((((unsigned long) x) >> PAGE_SHIFT) \
71 == ((((unsigned long) y) + offset) >> PAGE_SHIFT))
72
73/* check that the page(s) containing the frame tail are present */
74static int pages_present(struct frame_tail *tail)
75{
76 struct mm_struct * mm = current->mm;
77
78 if (!check_user_page_readable(mm, (unsigned long)tail))
79 return 0;
80
81 if (CMP_ADDR_EQUAL(tail, tail, 8))
82 return 1;
83
84 if (!check_user_page_readable(mm, ((unsigned long)tail) + 8))
85 return 0;
86
87 return 1;
88}
89
90/*
91 * | | /\ Higher addresses
92 * | |
93 * --------------- stack base (address of current_thread_info)
94 * | thread info |
95 * . .
96 * | stack |
97 * --------------- saved regs->ARM_fp value if valid (frame_tail address)
98 * . .
99 * --------------- struct pt_regs stored on stack (struct pt_regs *)
100 * | |
101 * . .
102 * | |
103 * --------------- %esp
104 * | |
105 * | | \/ Lower addresses
106 *
107 * Thus, &pt_regs <-> stack base restricts the valid(ish) fp values
108 */
109static int valid_kernel_stack(struct frame_tail *tail, struct pt_regs *regs)
110{
111 unsigned long tailaddr = (unsigned long)tail;
112 unsigned long stack = (unsigned long)regs;
113 unsigned long stack_base = (stack & ~(THREAD_SIZE - 1)) + THREAD_SIZE;
114
115 return (tailaddr > stack) && (tailaddr < stack_base);
116}
117
118void arm_backtrace(struct pt_regs * const regs, unsigned int depth)
119{
120 struct frame_tail *tail;
121 unsigned long last_address = 0;
122
123 tail = ((struct frame_tail *) regs->ARM_fp) - 1;
124
125 if (!user_mode(regs)) {
126
127#ifdef CONFIG_FRAME_POINTER
128 while (depth-- && tail && valid_kernel_stack(tail, regs)) {
129 tail = kernel_backtrace(tail);
130 }
131#endif
132 return;
133 }
134
135 while (depth-- && tail && !((unsigned long) tail & 3)) {
136 if ((!CMP_ADDR_EQUAL(last_address, tail, 0)
137 || !CMP_ADDR_EQUAL(last_address, tail, 8))
138 && !pages_present(tail))
139 return;
140 last_address = (unsigned long) tail;
141 tail = user_backtrace(tail);
142 }
143}
144
diff --git a/arch/arm/oprofile/init.c b/arch/arm/oprofile/init.c
index cce3d3015eb7..d315a3a86c86 100644
--- a/arch/arm/oprofile/init.c
+++ b/arch/arm/oprofile/init.c
@@ -20,6 +20,8 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
20 ret = pmu_init(ops, &op_xscale_spec); 20 ret = pmu_init(ops, &op_xscale_spec);
21#endif 21#endif
22 22
23 ops->backtrace = arm_backtrace;
24
23 return ret; 25 return ret;
24} 26}
25 27
diff --git a/arch/arm/oprofile/op_arm_model.h b/arch/arm/oprofile/op_arm_model.h
index 2d4caf4781ad..2148d07484b7 100644
--- a/arch/arm/oprofile/op_arm_model.h
+++ b/arch/arm/oprofile/op_arm_model.h
@@ -24,6 +24,8 @@ struct op_arm_model_spec {
24extern struct op_arm_model_spec op_xscale_spec; 24extern struct op_arm_model_spec op_xscale_spec;
25#endif 25#endif
26 26
27extern void arm_backtrace(struct pt_regs * const regs, unsigned int depth);
28
27extern int __init pmu_init(struct oprofile_operations *ops, struct op_arm_model_spec *spec); 29extern int __init pmu_init(struct oprofile_operations *ops, struct op_arm_model_spec *spec);
28extern void pmu_exit(void); 30extern void pmu_exit(void);
29#endif /* OP_ARM_MODEL_H */ 31#endif /* OP_ARM_MODEL_H */
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
new file mode 100644
index 000000000000..345365852f8c
--- /dev/null
+++ b/arch/arm/plat-omap/Kconfig
@@ -0,0 +1,112 @@
1if ARCH_OMAP
2
3menu "TI OMAP Implementations"
4
5config ARCH_OMAP_OTG
6 bool
7
8choice
9 prompt "OMAP System Type"
10 default ARCH_OMAP1
11
12config ARCH_OMAP1
13 bool "TI OMAP1"
14
15config ARCH_OMAP2
16 bool "TI OMAP2"
17
18endchoice
19
20comment "OMAP Feature Selections"
21
22config OMAP_RESET_CLOCKS
23 bool "Reset unused clocks during boot"
24 depends on ARCH_OMAP
25 default n
26 help
27 Say Y if you want to reset unused clocks during boot.
28 This option saves power, but assumes all drivers are
29 using the clock framework. Broken drivers that do not
30 yet use clock framework may not work with this option.
31 If you are booting from another operating system, you
32 probably do not want this option enabled until your
33 device drivers work properly.
34
35config OMAP_MUX
36 bool "OMAP multiplexing support"
37 depends on ARCH_OMAP
38 default y
39 help
40 Pin multiplexing support for OMAP boards. If your bootloader
41 sets the multiplexing correctly, say N. Otherwise, or if unsure,
42 say Y.
43
44config OMAP_MUX_DEBUG
45 bool "Multiplexing debug output"
46 depends on OMAP_MUX
47 default n
48 help
49 Makes the multiplexing functions print out a lot of debug info.
50 This is useful if you want to find out the correct values of the
51 multiplexing registers.
52
53config OMAP_MUX_WARNINGS
54 bool "Warn about pins the bootloader didn't set up"
55 depends on OMAP_MUX
56 default y
57 help
58 Choose Y here to warn whenever driver initialization logic needs
59 to change the pin multiplexing setup. When there are no warnings
60 printed, it's safe to deselect OMAP_MUX for your product.
61
62choice
63 prompt "System timer"
64 default OMAP_MPU_TIMER
65
66config OMAP_MPU_TIMER
67 bool "Use mpu timer"
68 help
69 Select this option if you want to use the OMAP mpu timer. This
70 timer provides more intra-tick resolution than the 32KHz timer,
71 but consumes more power.
72
73config OMAP_32K_TIMER
74 bool "Use 32KHz timer"
75 depends on ARCH_OMAP16XX
76 help
77 Select this option if you want to enable the OMAP 32KHz timer.
78 This timer saves power compared to the OMAP_MPU_TIMER, and has
79 support for no tick during idle. The 32KHz timer provides less
80 intra-tick resolution than OMAP_MPU_TIMER. The 32KHz timer is
81 currently only available for OMAP-16xx.
82
83endchoice
84
85config OMAP_32K_TIMER_HZ
86 int "Kernel internal timer frequency for 32KHz timer"
87 range 32 1024
88 depends on OMAP_32K_TIMER
89 default "128"
90 help
91 Kernel internal timer frequency should be a divisor of 32768,
92 such as 64 or 128.
93
94choice
95 prompt "Low-level debug console UART"
96 depends on ARCH_OMAP
97 default OMAP_LL_DEBUG_UART1
98
99config OMAP_LL_DEBUG_UART1
100 bool "UART1"
101
102config OMAP_LL_DEBUG_UART2
103 bool "UART2"
104
105config OMAP_LL_DEBUG_UART3
106 bool "UART3"
107
108endchoice
109
110endmenu
111
112endif
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
new file mode 100644
index 000000000000..531e11af54d4
--- /dev/null
+++ b/arch/arm/plat-omap/Makefile
@@ -0,0 +1,17 @@
1#
2# Makefile for the linux kernel.
3#
4
5# Common support
6obj-y := common.o dma.o clock.o mux.o gpio.o mcbsp.o usb.o
7obj-m :=
8obj-n :=
9obj- :=
10
11# OCPI interconnect support for 1710, 1610 and 5912
12obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
13
14# Power Management
15obj-$(CONFIG_PM) += pm.o sleep.o
16
17obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
diff --git a/arch/arm/mach-omap/clock.c b/arch/arm/plat-omap/clock.c
index e91186b5341a..59d91b3262ba 100644
--- a/arch/arm/mach-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/clock.c 2 * linux/arch/arm/plat-omap/clock.c
3 * 3 *
4 * Copyright (C) 2004 Nokia corporation 4 * Copyright (C) 2004 Nokia corporation
5 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com> 5 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
@@ -14,6 +14,7 @@
14#include <linux/errno.h> 14#include <linux/errno.h>
15#include <linux/err.h> 15#include <linux/err.h>
16 16
17#include <asm/io.h>
17#include <asm/semaphore.h> 18#include <asm/semaphore.h>
18#include <asm/hardware/clock.h> 19#include <asm/hardware/clock.h>
19#include <asm/arch/board.h> 20#include <asm/arch/board.h>
@@ -25,6 +26,8 @@ static LIST_HEAD(clocks);
25static DECLARE_MUTEX(clocks_sem); 26static DECLARE_MUTEX(clocks_sem);
26static DEFINE_SPINLOCK(clockfw_lock); 27static DEFINE_SPINLOCK(clockfw_lock);
27static void propagate_rate(struct clk * clk); 28static void propagate_rate(struct clk * clk);
29/* UART clock function */
30static int set_uart_rate(struct clk * clk, unsigned long rate);
28/* External clock (MCLK & BCLK) functions */ 31/* External clock (MCLK & BCLK) functions */
29static int set_ext_clk_rate(struct clk * clk, unsigned long rate); 32static int set_ext_clk_rate(struct clk * clk, unsigned long rate);
30static long round_ext_clk_rate(struct clk * clk, unsigned long rate); 33static long round_ext_clk_rate(struct clk * clk, unsigned long rate);
@@ -34,7 +37,7 @@ static int select_table_rate(struct clk * clk, unsigned long rate);
34static long round_to_table_rate(struct clk * clk, unsigned long rate); 37static long round_to_table_rate(struct clk * clk, unsigned long rate);
35void clk_setdpll(__u16, __u16); 38void clk_setdpll(__u16, __u16);
36 39
37struct mpu_rate rate_table[] = { 40static struct mpu_rate rate_table[] = {
38 /* MPU MHz, xtal MHz, dpll1 MHz, CKCTL, DPLL_CTL 41 /* MPU MHz, xtal MHz, dpll1 MHz, CKCTL, DPLL_CTL
39 * armdiv, dspdiv, dspmmu, tcdiv, perdiv, lcddiv 42 * armdiv, dspdiv, dspmmu, tcdiv, perdiv, lcddiv
40 */ 43 */
@@ -48,7 +51,7 @@ struct mpu_rate rate_table[] = {
48 { 192000000, 19200000, 192000000, 0x050f, 0x2510 }, /* 1/1/2/2/8/8 */ 51 { 192000000, 19200000, 192000000, 0x050f, 0x2510 }, /* 1/1/2/2/8/8 */
49 { 192000000, 12000000, 192000000, 0x050f, 0x2810 }, /* 1/1/2/2/8/8 */ 52 { 192000000, 12000000, 192000000, 0x050f, 0x2810 }, /* 1/1/2/2/8/8 */
50 { 96000000, 12000000, 192000000, 0x055f, 0x2810 }, /* 2/2/2/2/8/8 */ 53 { 96000000, 12000000, 192000000, 0x055f, 0x2810 }, /* 2/2/2/2/8/8 */
51 { 48000000, 12000000, 192000000, 0x0ccf, 0x2810 }, /* 4/4/4/4/8/8 */ 54 { 48000000, 12000000, 192000000, 0x0baf, 0x2810 }, /* 4/8/4/4/8/8 */
52 { 24000000, 12000000, 192000000, 0x0fff, 0x2810 }, /* 8/8/8/8/8/8 */ 55 { 24000000, 12000000, 192000000, 0x0fff, 0x2810 }, /* 8/8/8/8/8/8 */
53#endif 56#endif
54#if defined(CONFIG_OMAP_ARM_182MHZ) 57#if defined(CONFIG_OMAP_ARM_182MHZ)
@@ -58,7 +61,7 @@ struct mpu_rate rate_table[] = {
58 { 168000000, 12000000, 168000000, 0x010f, 0x2710 }, /* 1/1/1/2/8/8 */ 61 { 168000000, 12000000, 168000000, 0x010f, 0x2710 }, /* 1/1/1/2/8/8 */
59#endif 62#endif
60#if defined(CONFIG_OMAP_ARM_150MHZ) 63#if defined(CONFIG_OMAP_ARM_150MHZ)
61 { 150000000, 12000000, 150000000, 0x150a, 0x2cb0 }, /* 0/0/1/1/2/2 */ 64 { 150000000, 12000000, 150000000, 0x010a, 0x2cb0 }, /* 1/1/1/2/4/4 */
62#endif 65#endif
63#if defined(CONFIG_OMAP_ARM_120MHZ) 66#if defined(CONFIG_OMAP_ARM_120MHZ)
64 { 120000000, 12000000, 120000000, 0x010a, 0x2510 }, /* 1/1/1/2/4/4 */ 67 { 120000000, 12000000, 120000000, 0x010a, 0x2510 }, /* 1/1/1/2/4/4 */
@@ -76,19 +79,11 @@ struct mpu_rate rate_table[] = {
76}; 79};
77 80
78 81
79static void ckctl_recalc(struct clk * clk) 82static void ckctl_recalc(struct clk * clk);
80{ 83int __clk_enable(struct clk *clk);
81 int dsor; 84void __clk_disable(struct clk *clk);
82 85void __clk_unuse(struct clk *clk);
83 /* Calculate divisor encoded as 2-bit exponent */ 86int __clk_use(struct clk *clk);
84 dsor = 1 << (3 & (omap_readw(ARM_CKCTL) >> clk->rate_offset));
85 if (unlikely(clk->rate == clk->parent->rate / dsor))
86 return; /* No change, quick exit */
87 clk->rate = clk->parent->rate / dsor;
88
89 if (unlikely(clk->flags & RATE_PROPAGATES))
90 propagate_rate(clk);
91}
92 87
93 88
94static void followparent_recalc(struct clk * clk) 89static void followparent_recalc(struct clk * clk)
@@ -102,6 +97,14 @@ static void watchdog_recalc(struct clk * clk)
102 clk->rate = clk->parent->rate / 14; 97 clk->rate = clk->parent->rate / 14;
103} 98}
104 99
100static void uart_recalc(struct clk * clk)
101{
102 unsigned int val = omap_readl(clk->enable_reg);
103 if (val & clk->enable_bit)
104 clk->rate = 48000000;
105 else
106 clk->rate = 12000000;
107}
105 108
106static struct clk ck_ref = { 109static struct clk ck_ref = {
107 .name = "ck_ref", 110 .name = "ck_ref",
@@ -138,7 +141,7 @@ static struct clk arm_ck = {
138static struct clk armper_ck = { 141static struct clk armper_ck = {
139 .name = "armper_ck", 142 .name = "armper_ck",
140 .parent = &ck_dpll1, 143 .parent = &ck_dpll1,
141 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 144 .flags = CLOCK_IN_OMAP730 | CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
142 RATE_CKCTL, 145 RATE_CKCTL,
143 .enable_reg = ARM_IDLECT2, 146 .enable_reg = ARM_IDLECT2,
144 .enable_bit = EN_PERCK, 147 .enable_bit = EN_PERCK,
@@ -185,7 +188,7 @@ static struct clk armwdt_ck = {
185static struct clk arminth_ck16xx = { 188static struct clk arminth_ck16xx = {
186 .name = "arminth_ck", 189 .name = "arminth_ck",
187 .parent = &arm_ck, 190 .parent = &arm_ck,
188 .flags = CLOCK_IN_OMAP16XX, 191 .flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
189 .recalc = &followparent_recalc, 192 .recalc = &followparent_recalc,
190 /* Note: On 16xx the frequency can be divided by 2 by programming 193 /* Note: On 16xx the frequency can be divided by 2 by programming
191 * ARM_CKCTL:ARM_INTHCK_SEL(14) to 1 194 * ARM_CKCTL:ARM_INTHCK_SEL(14) to 1
@@ -214,6 +217,38 @@ static struct clk dspmmu_ck = {
214 .recalc = &ckctl_recalc, 217 .recalc = &ckctl_recalc,
215}; 218};
216 219
220static struct clk dspper_ck = {
221 .name = "dspper_ck",
222 .parent = &ck_dpll1,
223 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
224 RATE_CKCTL | DSP_DOMAIN_CLOCK | VIRTUAL_IO_ADDRESS,
225 .enable_reg = DSP_IDLECT2,
226 .enable_bit = EN_PERCK,
227 .rate_offset = CKCTL_PERDIV_OFFSET,
228 .recalc = &followparent_recalc,
229 //.recalc = &ckctl_recalc,
230};
231
232static struct clk dspxor_ck = {
233 .name = "dspxor_ck",
234 .parent = &ck_ref,
235 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
236 DSP_DOMAIN_CLOCK | VIRTUAL_IO_ADDRESS,
237 .enable_reg = DSP_IDLECT2,
238 .enable_bit = EN_XORPCK,
239 .recalc = &followparent_recalc,
240};
241
242static struct clk dsptim_ck = {
243 .name = "dsptim_ck",
244 .parent = &ck_ref,
245 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
246 DSP_DOMAIN_CLOCK | VIRTUAL_IO_ADDRESS,
247 .enable_reg = DSP_IDLECT2,
248 .enable_bit = EN_DSPTIMCK,
249 .recalc = &followparent_recalc,
250};
251
217static struct clk tc_ck = { 252static struct clk tc_ck = {
218 .name = "tc_ck", 253 .name = "tc_ck",
219 .parent = &ck_dpll1, 254 .parent = &ck_dpll1,
@@ -226,7 +261,7 @@ static struct clk tc_ck = {
226static struct clk arminth_ck1510 = { 261static struct clk arminth_ck1510 = {
227 .name = "arminth_ck", 262 .name = "arminth_ck",
228 .parent = &tc_ck, 263 .parent = &tc_ck,
229 .flags = CLOCK_IN_OMAP1510, 264 .flags = CLOCK_IN_OMAP1510 | ALWAYS_ENABLED,
230 .recalc = &followparent_recalc, 265 .recalc = &followparent_recalc,
231 /* Note: On 1510 the frequency follows TC_CK 266 /* Note: On 1510 the frequency follows TC_CK
232 * 267 *
@@ -237,7 +272,7 @@ static struct clk arminth_ck1510 = {
237static struct clk tipb_ck = { 272static struct clk tipb_ck = {
238 .name = "tibp_ck", 273 .name = "tibp_ck",
239 .parent = &tc_ck, 274 .parent = &tc_ck,
240 .flags = CLOCK_IN_OMAP1510, 275 .flags = CLOCK_IN_OMAP1510 | ALWAYS_ENABLED,
241 .recalc = &followparent_recalc, 276 .recalc = &followparent_recalc,
242}; 277};
243 278
@@ -271,14 +306,15 @@ static struct clk tc2_ck = {
271static struct clk dma_ck = { 306static struct clk dma_ck = {
272 .name = "dma_ck", 307 .name = "dma_ck",
273 .parent = &tc_ck, 308 .parent = &tc_ck,
274 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX, 309 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX |
310 ALWAYS_ENABLED,
275 .recalc = &followparent_recalc, 311 .recalc = &followparent_recalc,
276}; 312};
277 313
278static struct clk dma_lcdfree_ck = { 314static struct clk dma_lcdfree_ck = {
279 .name = "dma_lcdfree_ck", 315 .name = "dma_lcdfree_ck",
280 .parent = &tc_ck, 316 .parent = &tc_ck,
281 .flags = CLOCK_IN_OMAP16XX, 317 .flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
282 .recalc = &followparent_recalc, 318 .recalc = &followparent_recalc,
283}; 319};
284 320
@@ -303,14 +339,14 @@ static struct clk lb_ck = {
303static struct clk rhea1_ck = { 339static struct clk rhea1_ck = {
304 .name = "rhea1_ck", 340 .name = "rhea1_ck",
305 .parent = &tc_ck, 341 .parent = &tc_ck,
306 .flags = CLOCK_IN_OMAP16XX, 342 .flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
307 .recalc = &followparent_recalc, 343 .recalc = &followparent_recalc,
308}; 344};
309 345
310static struct clk rhea2_ck = { 346static struct clk rhea2_ck = {
311 .name = "rhea2_ck", 347 .name = "rhea2_ck",
312 .parent = &tc_ck, 348 .parent = &tc_ck,
313 .flags = CLOCK_IN_OMAP16XX, 349 .flags = CLOCK_IN_OMAP16XX | ALWAYS_ENABLED,
314 .recalc = &followparent_recalc, 350 .recalc = &followparent_recalc,
315}; 351};
316 352
@@ -325,43 +361,55 @@ static struct clk lcd_ck = {
325 .recalc = &ckctl_recalc, 361 .recalc = &ckctl_recalc,
326}; 362};
327 363
328static struct clk uart1_ck = { 364static struct clk uart1_1510 = {
365 .name = "uart1_ck",
366 /* Direct from ULPD, no parent */
367 .rate = 12000000,
368 .flags = CLOCK_IN_OMAP1510 | ENABLE_REG_32BIT | ALWAYS_ENABLED,
369 .enable_reg = MOD_CONF_CTRL_0,
370 .enable_bit = 29, /* Chooses between 12MHz and 48MHz */
371 .set_rate = &set_uart_rate,
372 .recalc = &uart_recalc,
373};
374
375static struct clk uart1_16xx = {
329 .name = "uart1_ck", 376 .name = "uart1_ck",
330 /* Direct from ULPD, no parent */ 377 /* Direct from ULPD, no parent */
331 .rate = 48000000, 378 .rate = 48000000,
332 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 379 .flags = CLOCK_IN_OMAP16XX | RATE_FIXED | ENABLE_REG_32BIT,
333 RATE_FIXED | ENABLE_REG_32BIT,
334 .enable_reg = MOD_CONF_CTRL_0, 380 .enable_reg = MOD_CONF_CTRL_0,
335 .enable_bit = 29, 381 .enable_bit = 29,
336 /* (Only on 1510)
337 * The "enable bit" actually chooses between 48MHz and 12MHz.
338 */
339}; 382};
340 383
341static struct clk uart2_ck = { 384static struct clk uart2_ck = {
342 .name = "uart2_ck", 385 .name = "uart2_ck",
343 /* Direct from ULPD, no parent */ 386 /* Direct from ULPD, no parent */
344 .rate = 48000000, 387 .rate = 12000000,
345 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 388 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | ENABLE_REG_32BIT,
346 RATE_FIXED | ENABLE_REG_32BIT,
347 .enable_reg = MOD_CONF_CTRL_0, 389 .enable_reg = MOD_CONF_CTRL_0,
348 .enable_bit = 30, 390 .enable_bit = 30, /* Chooses between 12MHz and 48MHz */
349 /* (for both 1510 and 16xx) 391 .set_rate = &set_uart_rate,
350 * The "enable bit" actually chooses between 48MHz and 12MHz/32kHz. 392 .recalc = &uart_recalc,
351 */
352}; 393};
353 394
354static struct clk uart3_ck = { 395static struct clk uart3_1510 = {
396 .name = "uart3_ck",
397 /* Direct from ULPD, no parent */
398 .rate = 12000000,
399 .flags = CLOCK_IN_OMAP1510 | ENABLE_REG_32BIT | ALWAYS_ENABLED,
400 .enable_reg = MOD_CONF_CTRL_0,
401 .enable_bit = 31, /* Chooses between 12MHz and 48MHz */
402 .set_rate = &set_uart_rate,
403 .recalc = &uart_recalc,
404};
405
406static struct clk uart3_16xx = {
355 .name = "uart3_ck", 407 .name = "uart3_ck",
356 /* Direct from ULPD, no parent */ 408 /* Direct from ULPD, no parent */
357 .rate = 48000000, 409 .rate = 48000000,
358 .flags = CLOCK_IN_OMAP1510 | CLOCK_IN_OMAP16XX | 410 .flags = CLOCK_IN_OMAP16XX | RATE_FIXED | ENABLE_REG_32BIT,
359 RATE_FIXED | ENABLE_REG_32BIT,
360 .enable_reg = MOD_CONF_CTRL_0, 411 .enable_reg = MOD_CONF_CTRL_0,
361 .enable_bit = 31, 412 .enable_bit = 31,
362 /* (Only on 1510)
363 * The "enable bit" actually chooses between 48MHz and 12MHz.
364 */
365}; 413};
366 414
367static struct clk usb_clko = { /* 6 MHz output on W4_USB_CLKO */ 415static struct clk usb_clko = { /* 6 MHz output on W4_USB_CLKO */
@@ -480,6 +528,9 @@ static struct clk * onchip_clks[] = {
480 /* CK_GEN2 clocks */ 528 /* CK_GEN2 clocks */
481 &dsp_ck, 529 &dsp_ck,
482 &dspmmu_ck, 530 &dspmmu_ck,
531 &dspper_ck,
532 &dspxor_ck,
533 &dsptim_ck,
483 /* CK_GEN3 clocks */ 534 /* CK_GEN3 clocks */
484 &tc_ck, 535 &tc_ck,
485 &tipb_ck, 536 &tipb_ck,
@@ -494,9 +545,11 @@ static struct clk * onchip_clks[] = {
494 &rhea2_ck, 545 &rhea2_ck,
495 &lcd_ck, 546 &lcd_ck,
496 /* ULPD clocks */ 547 /* ULPD clocks */
497 &uart1_ck, 548 &uart1_1510,
549 &uart1_16xx,
498 &uart2_ck, 550 &uart2_ck,
499 &uart3_ck, 551 &uart3_1510,
552 &uart3_16xx,
500 &usb_clko, 553 &usb_clko,
501 &usb_hhc_ck1510, &usb_hhc_ck16xx, 554 &usb_hhc_ck1510, &usb_hhc_ck16xx,
502 &mclk_1510, &mclk_16xx, 555 &mclk_1510, &mclk_16xx,
@@ -547,14 +600,34 @@ int __clk_enable(struct clk *clk)
547 return 0; 600 return 0;
548 } 601 }
549 602
603 if (clk->flags & DSP_DOMAIN_CLOCK) {
604 __clk_use(&api_ck);
605 }
606
550 if (clk->flags & ENABLE_REG_32BIT) { 607 if (clk->flags & ENABLE_REG_32BIT) {
551 regval32 = omap_readl(clk->enable_reg); 608 if (clk->flags & VIRTUAL_IO_ADDRESS) {
552 regval32 |= (1 << clk->enable_bit); 609 regval32 = __raw_readl(clk->enable_reg);
553 omap_writel(regval32, clk->enable_reg); 610 regval32 |= (1 << clk->enable_bit);
611 __raw_writel(regval32, clk->enable_reg);
612 } else {
613 regval32 = omap_readl(clk->enable_reg);
614 regval32 |= (1 << clk->enable_bit);
615 omap_writel(regval32, clk->enable_reg);
616 }
554 } else { 617 } else {
555 regval16 = omap_readw(clk->enable_reg); 618 if (clk->flags & VIRTUAL_IO_ADDRESS) {
556 regval16 |= (1 << clk->enable_bit); 619 regval16 = __raw_readw(clk->enable_reg);
557 omap_writew(regval16, clk->enable_reg); 620 regval16 |= (1 << clk->enable_bit);
621 __raw_writew(regval16, clk->enable_reg);
622 } else {
623 regval16 = omap_readw(clk->enable_reg);
624 regval16 |= (1 << clk->enable_bit);
625 omap_writew(regval16, clk->enable_reg);
626 }
627 }
628
629 if (clk->flags & DSP_DOMAIN_CLOCK) {
630 __clk_unuse(&api_ck);
558 } 631 }
559 632
560 return 0; 633 return 0;
@@ -569,14 +642,34 @@ void __clk_disable(struct clk *clk)
569 if (clk->enable_reg == 0) 642 if (clk->enable_reg == 0)
570 return; 643 return;
571 644
645 if (clk->flags & DSP_DOMAIN_CLOCK) {
646 __clk_use(&api_ck);
647 }
648
572 if (clk->flags & ENABLE_REG_32BIT) { 649 if (clk->flags & ENABLE_REG_32BIT) {
573 regval32 = omap_readl(clk->enable_reg); 650 if (clk->flags & VIRTUAL_IO_ADDRESS) {
574 regval32 &= ~(1 << clk->enable_bit); 651 regval32 = __raw_readl(clk->enable_reg);
575 omap_writel(regval32, clk->enable_reg); 652 regval32 &= ~(1 << clk->enable_bit);
653 __raw_writel(regval32, clk->enable_reg);
654 } else {
655 regval32 = omap_readl(clk->enable_reg);
656 regval32 &= ~(1 << clk->enable_bit);
657 omap_writel(regval32, clk->enable_reg);
658 }
576 } else { 659 } else {
577 regval16 = omap_readw(clk->enable_reg); 660 if (clk->flags & VIRTUAL_IO_ADDRESS) {
578 regval16 &= ~(1 << clk->enable_bit); 661 regval16 = __raw_readw(clk->enable_reg);
579 omap_writew(regval16, clk->enable_reg); 662 regval16 &= ~(1 << clk->enable_bit);
663 __raw_writew(regval16, clk->enable_reg);
664 } else {
665 regval16 = omap_readw(clk->enable_reg);
666 regval16 &= ~(1 << clk->enable_bit);
667 omap_writew(regval16, clk->enable_reg);
668 }
669 }
670
671 if (clk->flags & DSP_DOMAIN_CLOCK) {
672 __clk_unuse(&api_ck);
580 } 673 }
581} 674}
582 675
@@ -766,6 +859,33 @@ static int calc_dsor_exp(struct clk *clk, unsigned long rate)
766 return dsor_exp; 859 return dsor_exp;
767} 860}
768 861
862
863static void ckctl_recalc(struct clk * clk)
864{
865 int dsor;
866
867 /* Calculate divisor encoded as 2-bit exponent */
868 if (clk->flags & DSP_DOMAIN_CLOCK) {
869 /* The clock control bits are in DSP domain,
870 * so api_ck is needed for access.
871 * Note that DSP_CKCTL virt addr = phys addr, so
872 * we must use __raw_readw() instead of omap_readw().
873 */
874 __clk_use(&api_ck);
875 dsor = 1 << (3 & (__raw_readw(DSP_CKCTL) >> clk->rate_offset));
876 __clk_unuse(&api_ck);
877 } else {
878 dsor = 1 << (3 & (omap_readw(ARM_CKCTL) >> clk->rate_offset));
879 }
880 if (unlikely(clk->rate == clk->parent->rate / dsor))
881 return; /* No change, quick exit */
882 clk->rate = clk->parent->rate / dsor;
883
884 if (unlikely(clk->flags & RATE_PROPAGATES))
885 propagate_rate(clk);
886}
887
888
769long clk_round_rate(struct clk *clk, unsigned long rate) 889long clk_round_rate(struct clk *clk, unsigned long rate)
770{ 890{
771 int dsor_exp; 891 int dsor_exp;
@@ -826,6 +946,9 @@ static int select_table_rate(struct clk * clk, unsigned long rate)
826 if (!ptr->rate) 946 if (!ptr->rate)
827 return -EINVAL; 947 return -EINVAL;
828 948
949 if (!ptr->rate)
950 return -EINVAL;
951
829 if (unlikely(ck_dpll1.rate == 0)) { 952 if (unlikely(ck_dpll1.rate == 0)) {
830 omap_writew(ptr->dpllctl_val, DPLL_CTL); 953 omap_writew(ptr->dpllctl_val, DPLL_CTL);
831 ck_dpll1.rate = ptr->pll_rate; 954 ck_dpll1.rate = ptr->pll_rate;
@@ -921,6 +1044,23 @@ static unsigned calc_ext_dsor(unsigned long rate)
921 return dsor; 1044 return dsor;
922} 1045}
923 1046
1047/* Only needed on 1510 */
1048static int set_uart_rate(struct clk * clk, unsigned long rate)
1049{
1050 unsigned int val;
1051
1052 val = omap_readl(clk->enable_reg);
1053 if (rate == 12000000)
1054 val &= ~(1 << clk->enable_bit);
1055 else if (rate == 48000000)
1056 val |= (1 << clk->enable_bit);
1057 else
1058 return -EINVAL;
1059 omap_writel(val, clk->enable_reg);
1060 clk->rate = rate;
1061
1062 return 0;
1063}
924 1064
925static int set_ext_clk_rate(struct clk * clk, unsigned long rate) 1065static int set_ext_clk_rate(struct clk * clk, unsigned long rate)
926{ 1066{
@@ -985,7 +1125,18 @@ void clk_unregister(struct clk *clk)
985} 1125}
986EXPORT_SYMBOL(clk_unregister); 1126EXPORT_SYMBOL(clk_unregister);
987 1127
988 1128#ifdef CONFIG_OMAP_RESET_CLOCKS
1129/*
1130 * Resets some clocks that may be left on from bootloader,
1131 * but leaves serial clocks on. See also omap_late_clk_reset().
1132 */
1133static inline void omap_early_clk_reset(void)
1134{
1135 //omap_writel(0x3 << 29, MOD_CONF_CTRL_0);
1136}
1137#else
1138#define omap_early_clk_reset() {}
1139#endif
989 1140
990int __init clk_init(void) 1141int __init clk_init(void)
991{ 1142{
@@ -993,6 +1144,8 @@ int __init clk_init(void)
993 const struct omap_clock_config *info; 1144 const struct omap_clock_config *info;
994 int crystal_type = 0; /* Default 12 MHz */ 1145 int crystal_type = 0; /* Default 12 MHz */
995 1146
1147 omap_early_clk_reset();
1148
996 for (clkp = onchip_clks; clkp < onchip_clks+ARRAY_SIZE(onchip_clks); clkp++) { 1149 for (clkp = onchip_clks; clkp < onchip_clks+ARRAY_SIZE(onchip_clks); clkp++) {
997 if (((*clkp)->flags &CLOCK_IN_OMAP1510) && cpu_is_omap1510()) { 1150 if (((*clkp)->flags &CLOCK_IN_OMAP1510) && cpu_is_omap1510()) {
998 clk_register(*clkp); 1151 clk_register(*clkp);
@@ -1023,9 +1176,42 @@ int __init clk_init(void)
1023 ck_ref.rate = 19200000; 1176 ck_ref.rate = 19200000;
1024#endif 1177#endif
1025 1178
1179 printk("Clocks: ARM_SYSST: 0x%04x DPLL_CTL: 0x%04x ARM_CKCTL: 0x%04x\n",
1180 omap_readw(ARM_SYSST), omap_readw(DPLL_CTL),
1181 omap_readw(ARM_CKCTL));
1182
1026 /* We want to be in syncronous scalable mode */ 1183 /* We want to be in syncronous scalable mode */
1027 omap_writew(0x1000, ARM_SYSST); 1184 omap_writew(0x1000, ARM_SYSST);
1028 1185
1186#ifdef CONFIG_OMAP_CLOCKS_SET_BY_BOOTLOADER
1187 /* Use values set by bootloader. Determine PLL rate and recalculate
1188 * dependent clocks as if kernel had changed PLL or divisors.
1189 */
1190 {
1191 unsigned pll_ctl_val = omap_readw(DPLL_CTL);
1192
1193 ck_dpll1.rate = ck_ref.rate; /* Base xtal rate */
1194 if (pll_ctl_val & 0x10) {
1195 /* PLL enabled, apply multiplier and divisor */
1196 if (pll_ctl_val & 0xf80)
1197 ck_dpll1.rate *= (pll_ctl_val & 0xf80) >> 7;
1198 ck_dpll1.rate /= ((pll_ctl_val & 0x60) >> 5) + 1;
1199 } else {
1200 /* PLL disabled, apply bypass divisor */
1201 switch (pll_ctl_val & 0xc) {
1202 case 0:
1203 break;
1204 case 0x4:
1205 ck_dpll1.rate /= 2;
1206 break;
1207 default:
1208 ck_dpll1.rate /= 4;
1209 break;
1210 }
1211 }
1212 }
1213 propagate_rate(&ck_dpll1);
1214#else
1029 /* Find the highest supported frequency and enable it */ 1215 /* Find the highest supported frequency and enable it */
1030 if (select_table_rate(&virtual_ck_mpu, ~0)) { 1216 if (select_table_rate(&virtual_ck_mpu, ~0)) {
1031 printk(KERN_ERR "System frequencies not set. Check your config.\n"); 1217 printk(KERN_ERR "System frequencies not set. Check your config.\n");
@@ -1034,12 +1220,13 @@ int __init clk_init(void)
1034 omap_writew(0x1005, ARM_CKCTL); 1220 omap_writew(0x1005, ARM_CKCTL);
1035 ck_dpll1.rate = 60000000; 1221 ck_dpll1.rate = 60000000;
1036 propagate_rate(&ck_dpll1); 1222 propagate_rate(&ck_dpll1);
1037 printk(KERN_INFO "Clocking rate (xtal/DPLL1/MPU): %ld/%ld/%ld\n",
1038 ck_ref.rate, ck_dpll1.rate, arm_ck.rate);
1039 } 1223 }
1040 1224#endif
1041 /* Cache rates for clocks connected to ck_ref (not dpll1) */ 1225 /* Cache rates for clocks connected to ck_ref (not dpll1) */
1042 propagate_rate(&ck_ref); 1226 propagate_rate(&ck_ref);
1227 printk(KERN_INFO "Clocking rate (xtal/DPLL1/MPU): %ld.%01ld/%ld/%ld MHz\n",
1228 ck_ref.rate / 1000000, (ck_ref.rate / 100000) % 10,
1229 ck_dpll1.rate, arm_ck.rate);
1043 1230
1044#ifdef CONFIG_MACH_OMAP_PERSEUS2 1231#ifdef CONFIG_MACH_OMAP_PERSEUS2
1045 /* Select slicer output as OMAP input clock */ 1232 /* Select slicer output as OMAP input clock */
@@ -1074,3 +1261,63 @@ int __init clk_init(void)
1074 1261
1075 return 0; 1262 return 0;
1076} 1263}
1264
1265
1266#ifdef CONFIG_OMAP_RESET_CLOCKS
1267
1268static int __init omap_late_clk_reset(void)
1269{
1270 /* Turn off all unused clocks */
1271 struct clk *p;
1272 __u32 regval32;
1273
1274 omap_writew(0, SOFT_REQ_REG);
1275 omap_writew(0, SOFT_REQ_REG2);
1276
1277 list_for_each_entry(p, &clocks, node) {
1278 if (p->usecount > 0 || (p->flags & ALWAYS_ENABLED) ||
1279 p->enable_reg == 0)
1280 continue;
1281
1282 /* Assume no DSP clocks have been activated by bootloader */
1283 if (p->flags & DSP_DOMAIN_CLOCK)
1284 continue;
1285
1286 /* Is the clock already disabled? */
1287 if (p->flags & ENABLE_REG_32BIT) {
1288 if (p->flags & VIRTUAL_IO_ADDRESS)
1289 regval32 = __raw_readl(p->enable_reg);
1290 else
1291 regval32 = omap_readl(p->enable_reg);
1292 } else {
1293 if (p->flags & VIRTUAL_IO_ADDRESS)
1294 regval32 = __raw_readw(p->enable_reg);
1295 else
1296 regval32 = omap_readw(p->enable_reg);
1297 }
1298
1299 if ((regval32 & (1 << p->enable_bit)) == 0)
1300 continue;
1301
1302 /* FIXME: This clock seems to be necessary but no-one
1303 * has asked for its activation. */
1304 if (p == &tc2_ck // FIX: pm.c (SRAM), CCP, Camera
1305 || p == &ck_dpll1out // FIX: SoSSI, SSR
1306 || p == &arm_gpio_ck // FIX: GPIO code for 1510
1307 ) {
1308 printk(KERN_INFO "FIXME: Clock \"%s\" seems unused\n",
1309 p->name);
1310 continue;
1311 }
1312
1313 printk(KERN_INFO "Disabling unused clock \"%s\"... ", p->name);
1314 __clk_disable(p);
1315 printk(" done\n");
1316 }
1317
1318 return 0;
1319}
1320
1321late_initcall(omap_late_clk_reset);
1322
1323#endif
diff --git a/arch/arm/mach-omap/clock.h b/arch/arm/plat-omap/clock.h
index 08c0ddde1835..a89e1e8c2519 100644
--- a/arch/arm/mach-omap/clock.h
+++ b/arch/arm/plat-omap/clock.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/clock.h 2 * linux/arch/arm/plat-omap/clock.h
3 * 3 *
4 * Copyright (C) 2004 Nokia corporation 4 * Copyright (C) 2004 Nokia corporation
5 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com> 5 * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
@@ -52,6 +52,8 @@ struct mpu_rate {
52#define CLOCK_IN_OMAP16XX 64 52#define CLOCK_IN_OMAP16XX 64
53#define CLOCK_IN_OMAP1510 128 53#define CLOCK_IN_OMAP1510 128
54#define CLOCK_IN_OMAP730 256 54#define CLOCK_IN_OMAP730 256
55#define DSP_DOMAIN_CLOCK 512
56#define VIRTUAL_IO_ADDRESS 1024
55 57
56/* ARM_CKCTL bit shifts */ 58/* ARM_CKCTL bit shifts */
57#define CKCTL_PERDIV_OFFSET 0 59#define CKCTL_PERDIV_OFFSET 0
@@ -63,6 +65,8 @@ struct mpu_rate {
63/*#define ARM_TIMXO 12*/ 65/*#define ARM_TIMXO 12*/
64#define EN_DSPCK 13 66#define EN_DSPCK 13
65/*#define ARM_INTHCK_SEL 14*/ /* Divide-by-2 for mpu inth_ck */ 67/*#define ARM_INTHCK_SEL 14*/ /* Divide-by-2 for mpu inth_ck */
68/* DSP_CKCTL bit shifts */
69#define CKCTL_DSPPERDIV_OFFSET 0
66 70
67/* ARM_IDLECT1 bit shifts */ 71/* ARM_IDLECT1 bit shifts */
68/*#define IDLWDT_ARM 0*/ 72/*#define IDLWDT_ARM 0*/
@@ -96,6 +100,9 @@ struct mpu_rate {
96#define EN_TC1_CK 2 100#define EN_TC1_CK 2
97#define EN_TC2_CK 4 101#define EN_TC2_CK 4
98 102
103/* DSP_IDLECT2 bit shifts (0,1,2 are same as for ARM_IDLECT2) */
104#define EN_DSPTIMCK 5
105
99/* Various register defines for clock controls scattered around OMAP chip */ 106/* Various register defines for clock controls scattered around OMAP chip */
100#define USB_MCLK_EN_BIT 4 /* In ULPD_CLKC_CTRL */ 107#define USB_MCLK_EN_BIT 4 /* In ULPD_CLKC_CTRL */
101#define USB_HOST_HHC_UHOST_EN 9 /* In MOD_CONF_CTRL_0 */ 108#define USB_HOST_HHC_UHOST_EN 9 /* In MOD_CONF_CTRL_0 */
@@ -103,7 +110,8 @@ struct mpu_rate {
103#define COM_ULPD_PLL_CLK_REQ 1 /* In COM_CLK_DIV_CTRL_SEL */ 110#define COM_ULPD_PLL_CLK_REQ 1 /* In COM_CLK_DIV_CTRL_SEL */
104#define SWD_CLK_DIV_CTRL_SEL 0xfffe0874 111#define SWD_CLK_DIV_CTRL_SEL 0xfffe0874
105#define COM_CLK_DIV_CTRL_SEL 0xfffe0878 112#define COM_CLK_DIV_CTRL_SEL 0xfffe0878
106 113#define SOFT_REQ_REG 0xfffe0834
114#define SOFT_REQ_REG2 0xfffe0880
107 115
108int clk_register(struct clk *clk); 116int clk_register(struct clk *clk);
109void clk_unregister(struct clk *clk); 117void clk_unregister(struct clk *clk);
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
new file mode 100644
index 000000000000..ea967a8f6ce5
--- /dev/null
+++ b/arch/arm/plat-omap/common.c
@@ -0,0 +1,135 @@
1/*
2 * linux/arch/arm/plat-omap/common.c
3 *
4 * Code common to all OMAP machines.
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/config.h>
11#include <linux/module.h>
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/delay.h>
15#include <linux/pm.h>
16#include <linux/console.h>
17#include <linux/serial.h>
18#include <linux/tty.h>
19#include <linux/serial_8250.h>
20#include <linux/serial_reg.h>
21
22#include <asm/hardware.h>
23#include <asm/system.h>
24#include <asm/pgtable.h>
25#include <asm/mach/map.h>
26#include <asm/hardware/clock.h>
27#include <asm/io.h>
28#include <asm/mach-types.h>
29
30#include <asm/arch/board.h>
31#include <asm/arch/mux.h>
32#include <asm/arch/fpga.h>
33
34#include "clock.h"
35
36#define NO_LENGTH_CHECK 0xffffffff
37
38extern int omap_bootloader_tag_len;
39extern u8 omap_bootloader_tag[];
40
41struct omap_board_config_kernel *omap_board_config;
42int omap_board_config_size = 0;
43
44static const void *get_config(u16 tag, size_t len, int skip, size_t *len_out)
45{
46 struct omap_board_config_kernel *kinfo = NULL;
47 int i;
48
49#ifdef CONFIG_OMAP_BOOT_TAG
50 struct omap_board_config_entry *info = NULL;
51
52 if (omap_bootloader_tag_len > 4)
53 info = (struct omap_board_config_entry *) omap_bootloader_tag;
54 while (info != NULL) {
55 u8 *next;
56
57 if (info->tag == tag) {
58 if (skip == 0)
59 break;
60 skip--;
61 }
62
63 if ((info->len & 0x03) != 0) {
64 /* We bail out to avoid an alignment fault */
65 printk(KERN_ERR "OMAP peripheral config: Length (%d) not word-aligned (tag %04x)\n",
66 info->len, info->tag);
67 return NULL;
68 }
69 next = (u8 *) info + sizeof(*info) + info->len;
70 if (next >= omap_bootloader_tag + omap_bootloader_tag_len)
71 info = NULL;
72 else
73 info = (struct omap_board_config_entry *) next;
74 }
75 if (info != NULL) {
76 /* Check the length as a lame attempt to check for
77 * binary inconsistancy. */
78 if (len != NO_LENGTH_CHECK) {
79 /* Word-align len */
80 if (len & 0x03)
81 len = (len + 3) & ~0x03;
82 if (info->len != len) {
83 printk(KERN_ERR "OMAP peripheral config: Length mismatch with tag %x (want %d, got %d)\n",
84 tag, len, info->len);
85 return NULL;
86 }
87 }
88 if (len_out != NULL)
89 *len_out = info->len;
90 return info->data;
91 }
92#endif
93 /* Try to find the config from the board-specific structures
94 * in the kernel. */
95 for (i = 0; i < omap_board_config_size; i++) {
96 if (omap_board_config[i].tag == tag) {
97 kinfo = &omap_board_config[i];
98 break;
99 }
100 }
101 if (kinfo == NULL)
102 return NULL;
103 return kinfo->data;
104}
105
106const void *__omap_get_config(u16 tag, size_t len, int nr)
107{
108 return get_config(tag, len, nr, NULL);
109}
110EXPORT_SYMBOL(__omap_get_config);
111
112const void *omap_get_var_config(u16 tag, size_t *len)
113{
114 return get_config(tag, NO_LENGTH_CHECK, 0, len);
115}
116EXPORT_SYMBOL(omap_get_var_config);
117
118static int __init omap_add_serial_console(void)
119{
120 const struct omap_serial_console_config *info;
121
122 info = omap_get_config(OMAP_TAG_SERIAL_CONSOLE,
123 struct omap_serial_console_config);
124 if (info != NULL && info->console_uart) {
125 static char speed[11], *opt = NULL;
126
127 if (info->console_speed) {
128 snprintf(speed, sizeof(speed), "%u", info->console_speed);
129 opt = speed;
130 }
131 return add_preferred_console("ttyS", info->console_uart - 1, opt);
132 }
133 return 0;
134}
135console_initcall(omap_add_serial_console);
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
new file mode 100644
index 000000000000..409aac2c4b9d
--- /dev/null
+++ b/arch/arm/plat-omap/cpu-omap.c
@@ -0,0 +1,128 @@
1/*
2 * linux/arch/arm/plat-omap/cpu-omap.c
3 *
4 * CPU frequency scaling for OMAP
5 *
6 * Copyright (C) 2005 Nokia Corporation
7 * Written by Tony Lindgren <tony@atomide.com>
8 *
9 * Based on cpu-sa1110.c, Copyright (C) 2001 Russell King
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14 */
15#include <linux/types.h>
16#include <linux/kernel.h>
17#include <linux/sched.h>
18#include <linux/cpufreq.h>
19#include <linux/delay.h>
20#include <linux/init.h>
21#include <linux/err.h>
22
23#include <asm/hardware.h>
24#include <asm/mach-types.h>
25#include <asm/io.h>
26#include <asm/system.h>
27
28#include <asm/hardware/clock.h>
29
30/* TODO: Add support for SDRAM timing changes */
31
32int omap_verify_speed(struct cpufreq_policy *policy)
33{
34 struct clk * mpu_clk;
35
36 if (policy->cpu)
37 return -EINVAL;
38
39 cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
40 policy->cpuinfo.max_freq);
41 mpu_clk = clk_get(NULL, "mpu");
42 if (IS_ERR(mpu_clk))
43 return PTR_ERR(mpu_clk);
44 policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000;
45 policy->max = clk_round_rate(mpu_clk, policy->max * 1000) / 1000;
46 cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
47 policy->cpuinfo.max_freq);
48 clk_put(mpu_clk);
49
50 return 0;
51}
52
53unsigned int omap_getspeed(unsigned int cpu)
54{
55 struct clk * mpu_clk;
56 unsigned long rate;
57
58 if (cpu)
59 return 0;
60
61 mpu_clk = clk_get(NULL, "mpu");
62 if (IS_ERR(mpu_clk))
63 return 0;
64 rate = clk_get_rate(mpu_clk) / 1000;
65 clk_put(mpu_clk);
66
67 return rate;
68}
69
70static int omap_target(struct cpufreq_policy *policy,
71 unsigned int target_freq,
72 unsigned int relation)
73{
74 struct clk * mpu_clk;
75 struct cpufreq_freqs freqs;
76 int ret = 0;
77
78 mpu_clk = clk_get(NULL, "mpu");
79 if (IS_ERR(mpu_clk))
80 return PTR_ERR(mpu_clk);
81
82 freqs.old = omap_getspeed(0);
83 freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
84 freqs.cpu = 0;
85
86 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
87 ret = clk_set_rate(mpu_clk, target_freq * 1000);
88 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
89 clk_put(mpu_clk);
90
91 return ret;
92}
93
94static int __init omap_cpu_init(struct cpufreq_policy *policy)
95{
96 struct clk * mpu_clk;
97
98 mpu_clk = clk_get(NULL, "mpu");
99 if (IS_ERR(mpu_clk))
100 return PTR_ERR(mpu_clk);
101
102 if (policy->cpu != 0)
103 return -EINVAL;
104 policy->cur = policy->min = policy->max = omap_getspeed(0);
105 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
106 policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000;
107 policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, 216000000) / 1000;
108 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
109 clk_put(mpu_clk);
110
111 return 0;
112}
113
114static struct cpufreq_driver omap_driver = {
115 .flags = CPUFREQ_STICKY,
116 .verify = omap_verify_speed,
117 .target = omap_target,
118 .get = omap_getspeed,
119 .init = omap_cpu_init,
120 .name = "omap",
121};
122
123static int __init omap_cpufreq_init(void)
124{
125 return cpufreq_register_driver(&omap_driver);
126}
127
128arch_initcall(omap_cpufreq_init);
diff --git a/arch/arm/mach-omap/dma.c b/arch/arm/plat-omap/dma.c
index 7a9ebe80d6f8..c0a5c2fa42bd 100644
--- a/arch/arm/mach-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/omap/dma.c 2 * linux/arch/arm/plat-omap/dma.c
3 * 3 *
4 * Copyright (C) 2003 Nokia Corporation 4 * Copyright (C) 2003 Nokia Corporation
5 * Author: Juha Yrjölä <juha.yrjola@nokia.com> 5 * Author: Juha Yrjölä <juha.yrjola@nokia.com>
@@ -794,10 +794,6 @@ static void set_b1_regs(void)
794 w = omap_readw(OMAP1610_DMA_LCD_CTRL); 794 w = omap_readw(OMAP1610_DMA_LCD_CTRL);
795 /* Always set the source port as SDRAM for now*/ 795 /* Always set the source port as SDRAM for now*/
796 w &= ~(0x03 << 6); 796 w &= ~(0x03 << 6);
797 if (lcd_dma.ext_ctrl)
798 w |= 1 << 8;
799 else
800 w &= ~(1 << 8);
801 if (lcd_dma.callback != NULL) 797 if (lcd_dma.callback != NULL)
802 w |= 1 << 1; /* Block interrupt enable */ 798 w |= 1 << 1; /* Block interrupt enable */
803 else 799 else
@@ -889,9 +885,15 @@ void omap_enable_lcd_dma(void)
889 */ 885 */
890 if (enable_1510_mode || !lcd_dma.ext_ctrl) 886 if (enable_1510_mode || !lcd_dma.ext_ctrl)
891 return; 887 return;
888
889 w = omap_readw(OMAP1610_DMA_LCD_CTRL);
890 w |= 1 << 8;
891 omap_writew(w, OMAP1610_DMA_LCD_CTRL);
892
892 w = omap_readw(OMAP1610_DMA_LCD_CCR); 893 w = omap_readw(OMAP1610_DMA_LCD_CCR);
893 w |= 1 << 7; 894 w |= 1 << 7;
894 omap_writew(w, OMAP1610_DMA_LCD_CCR); 895 omap_writew(w, OMAP1610_DMA_LCD_CCR);
896
895 lcd_dma.active = 1; 897 lcd_dma.active = 1;
896} 898}
897 899
@@ -922,10 +924,19 @@ void omap_setup_lcd_dma(void)
922 924
923void omap_stop_lcd_dma(void) 925void omap_stop_lcd_dma(void)
924{ 926{
927 u16 w;
928
925 lcd_dma.active = 0; 929 lcd_dma.active = 0;
926 if (!enable_1510_mode && lcd_dma.ext_ctrl) 930 if (enable_1510_mode || !lcd_dma.ext_ctrl)
927 omap_writew(omap_readw(OMAP1610_DMA_LCD_CCR) & ~(1 << 7), 931 return;
928 OMAP1610_DMA_LCD_CCR); 932
933 w = omap_readw(OMAP1610_DMA_LCD_CCR);
934 w &= ~(1 << 7);
935 omap_writew(w, OMAP1610_DMA_LCD_CCR);
936
937 w = omap_readw(OMAP1610_DMA_LCD_CTRL);
938 w &= ~(1 << 8);
939 omap_writew(w, OMAP1610_DMA_LCD_CTRL);
929} 940}
930 941
931/* 942/*
@@ -972,6 +983,25 @@ dma_addr_t omap_get_dma_dst_pos(int lch)
972 (OMAP_DMA_CDSA_U(lch) << 16)); 983 (OMAP_DMA_CDSA_U(lch) << 16));
973} 984}
974 985
986int omap_dma_running(void)
987{
988 int lch;
989
990 /* Check if LCD DMA is running */
991 if (cpu_is_omap16xx())
992 if (omap_readw(OMAP1610_DMA_LCD_CCR) & OMAP_DMA_CCR_EN)
993 return 1;
994
995 for (lch = 0; lch < dma_chan_count; lch++) {
996 u16 w;
997
998 w = omap_readw(OMAP_DMA_CCR(lch));
999 if (w & OMAP_DMA_CCR_EN)
1000 return 1;
1001 }
1002 return 0;
1003}
1004
975static int __init omap_init_dma(void) 1005static int __init omap_init_dma(void)
976{ 1006{
977 int ch, r; 1007 int ch, r;
diff --git a/arch/arm/mach-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 9045dfd469ad..1c85b4e536c2 100644
--- a/arch/arm/mach-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/gpio.c 2 * linux/arch/arm/plat-omap/gpio.c
3 * 3 *
4 * Support functions for OMAP GPIO 4 * Support functions for OMAP GPIO
5 * 5 *
diff --git a/arch/arm/mach-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index 7c4ad7713091..43567d5edddb 100644
--- a/arch/arm/mach-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/omap/mcbsp.c 2 * linux/arch/arm/plat-omap/mcbsp.c
3 * 3 *
4 * Copyright (C) 2004 Nokia Corporation 4 * Copyright (C) 2004 Nokia Corporation
5 * Author: Samuel Ortiz <samuel.ortiz@nokia.com> 5 * Author: Samuel Ortiz <samuel.ortiz@nokia.com>
@@ -66,6 +66,7 @@ struct omap_mcbsp {
66static struct omap_mcbsp mcbsp[OMAP_MAX_MCBSP_COUNT]; 66static struct omap_mcbsp mcbsp[OMAP_MAX_MCBSP_COUNT];
67static struct clk *mcbsp_dsp_ck = 0; 67static struct clk *mcbsp_dsp_ck = 0;
68static struct clk *mcbsp_api_ck = 0; 68static struct clk *mcbsp_api_ck = 0;
69static struct clk *mcbsp_dspxor_ck = 0;
69 70
70 71
71static void omap_mcbsp_dump_reg(u8 id) 72static void omap_mcbsp_dump_reg(u8 id)
@@ -175,7 +176,7 @@ static int omap_mcbsp_check(unsigned int id)
175 return 0; 176 return 0;
176 } 177 }
177 178
178 if (cpu_is_omap1510() || cpu_is_omap1610() || cpu_is_omap1710()) { 179 if (cpu_is_omap1510() || cpu_is_omap16xx()) {
179 if (id > OMAP_MAX_MCBSP_COUNT) { 180 if (id > OMAP_MAX_MCBSP_COUNT) {
180 printk(KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n", id + 1); 181 printk(KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n", id + 1);
181 return -1; 182 return -1;
@@ -191,15 +192,12 @@ static int omap_mcbsp_check(unsigned int id)
191 192
192static void omap_mcbsp_dsp_request(void) 193static void omap_mcbsp_dsp_request(void)
193{ 194{
194 if (cpu_is_omap1510() || cpu_is_omap1610() || cpu_is_omap1710()) { 195 if (cpu_is_omap1510() || cpu_is_omap16xx()) {
195 omap_writew((omap_readw(ARM_RSTCT1) | (1 << 1) | (1 << 2)), 196 clk_use(mcbsp_dsp_ck);
196 ARM_RSTCT1); 197 clk_use(mcbsp_api_ck);
197 clk_enable(mcbsp_dsp_ck);
198 clk_enable(mcbsp_api_ck);
199 198
200 /* enable 12MHz clock to mcbsp 1 & 3 */ 199 /* enable 12MHz clock to mcbsp 1 & 3 */
201 __raw_writew(__raw_readw(DSP_IDLECT2) | (1 << EN_XORPCK), 200 clk_use(mcbsp_dspxor_ck);
202 DSP_IDLECT2);
203 __raw_writew(__raw_readw(DSP_RSTCT2) | 1 | 1 << 1, 201 __raw_writew(__raw_readw(DSP_RSTCT2) | 1 | 1 << 1,
204 DSP_RSTCT2); 202 DSP_RSTCT2);
205 } 203 }
@@ -207,10 +205,13 @@ static void omap_mcbsp_dsp_request(void)
207 205
208static void omap_mcbsp_dsp_free(void) 206static void omap_mcbsp_dsp_free(void)
209{ 207{
210 /* Useless for now */ 208 if (cpu_is_omap1510() || cpu_is_omap16xx()) {
209 clk_unuse(mcbsp_dspxor_ck);
210 clk_unuse(mcbsp_dsp_ck);
211 clk_unuse(mcbsp_api_ck);
212 }
211} 213}
212 214
213
214int omap_mcbsp_request(unsigned int id) 215int omap_mcbsp_request(unsigned int id)
215{ 216{
216 int err; 217 int err;
@@ -350,6 +351,73 @@ void omap_mcbsp_stop(unsigned int id)
350} 351}
351 352
352 353
354/* polled mcbsp i/o operations */
355int omap_mcbsp_pollwrite(unsigned int id, u16 buf)
356{
357 u32 base = mcbsp[id].io_base;
358 writew(buf, base + OMAP_MCBSP_REG_DXR1);
359 /* if frame sync error - clear the error */
360 if (readw(base + OMAP_MCBSP_REG_SPCR2) & XSYNC_ERR) {
361 /* clear error */
362 writew(readw(base + OMAP_MCBSP_REG_SPCR2) & (~XSYNC_ERR),
363 base + OMAP_MCBSP_REG_SPCR2);
364 /* resend */
365 return -1;
366 } else {
367 /* wait for transmit confirmation */
368 int attemps = 0;
369 while (!(readw(base + OMAP_MCBSP_REG_SPCR2) & XRDY)) {
370 if (attemps++ > 1000) {
371 writew(readw(base + OMAP_MCBSP_REG_SPCR2) &
372 (~XRST),
373 base + OMAP_MCBSP_REG_SPCR2);
374 udelay(10);
375 writew(readw(base + OMAP_MCBSP_REG_SPCR2) |
376 (XRST),
377 base + OMAP_MCBSP_REG_SPCR2);
378 udelay(10);
379 printk(KERN_ERR
380 " Could not write to McBSP Register\n");
381 return -2;
382 }
383 }
384 }
385 return 0;
386}
387
388int omap_mcbsp_pollread(unsigned int id, u16 * buf)
389{
390 u32 base = mcbsp[id].io_base;
391 /* if frame sync error - clear the error */
392 if (readw(base + OMAP_MCBSP_REG_SPCR1) & RSYNC_ERR) {
393 /* clear error */
394 writew(readw(base + OMAP_MCBSP_REG_SPCR1) & (~RSYNC_ERR),
395 base + OMAP_MCBSP_REG_SPCR1);
396 /* resend */
397 return -1;
398 } else {
399 /* wait for recieve confirmation */
400 int attemps = 0;
401 while (!(readw(base + OMAP_MCBSP_REG_SPCR1) & RRDY)) {
402 if (attemps++ > 1000) {
403 writew(readw(base + OMAP_MCBSP_REG_SPCR1) &
404 (~RRST),
405 base + OMAP_MCBSP_REG_SPCR1);
406 udelay(10);
407 writew(readw(base + OMAP_MCBSP_REG_SPCR1) |
408 (RRST),
409 base + OMAP_MCBSP_REG_SPCR1);
410 udelay(10);
411 printk(KERN_ERR
412 " Could not read from McBSP Register\n");
413 return -2;
414 }
415 }
416 }
417 *buf = readw(base + OMAP_MCBSP_REG_DRR1);
418 return 0;
419}
420
353/* 421/*
354 * IRQ based word transmission. 422 * IRQ based word transmission.
355 */ 423 */
@@ -625,10 +693,15 @@ static int __init omap_mcbsp_init(void)
625 return PTR_ERR(mcbsp_dsp_ck); 693 return PTR_ERR(mcbsp_dsp_ck);
626 } 694 }
627 mcbsp_api_ck = clk_get(0, "api_ck"); 695 mcbsp_api_ck = clk_get(0, "api_ck");
628 if (IS_ERR(mcbsp_dsp_ck)) { 696 if (IS_ERR(mcbsp_api_ck)) {
629 printk(KERN_ERR "mcbsp: could not acquire api_ck handle.\n"); 697 printk(KERN_ERR "mcbsp: could not acquire api_ck handle.\n");
630 return PTR_ERR(mcbsp_api_ck); 698 return PTR_ERR(mcbsp_api_ck);
631 } 699 }
700 mcbsp_dspxor_ck = clk_get(0, "dspxor_ck");
701 if (IS_ERR(mcbsp_dspxor_ck)) {
702 printk(KERN_ERR "mcbsp: could not acquire dspxor_ck handle.\n");
703 return PTR_ERR(mcbsp_dspxor_ck);
704 }
632 705
633#ifdef CONFIG_ARCH_OMAP730 706#ifdef CONFIG_ARCH_OMAP730
634 if (cpu_is_omap730()) { 707 if (cpu_is_omap730()) {
@@ -643,7 +716,7 @@ static int __init omap_mcbsp_init(void)
643 } 716 }
644#endif 717#endif
645#if defined(CONFIG_ARCH_OMAP16XX) 718#if defined(CONFIG_ARCH_OMAP16XX)
646 if (cpu_is_omap1610() || cpu_is_omap1710()) { 719 if (cpu_is_omap16xx()) {
647 mcbsp_info = mcbsp_1610; 720 mcbsp_info = mcbsp_1610;
648 mcbsp_count = ARRAY_SIZE(mcbsp_1610); 721 mcbsp_count = ARRAY_SIZE(mcbsp_1610);
649 } 722 }
diff --git a/arch/arm/mach-omap/mux.c b/arch/arm/plat-omap/mux.c
index bcf3c6e5ecd0..ea7b955b9c81 100644
--- a/arch/arm/mach-omap/mux.c
+++ b/arch/arm/plat-omap/mux.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/mux.c 2 * linux/arch/arm/plat-omap/mux.c
3 * 3 *
4 * Utility to set the Omap MUX and PULL_DWN registers from a table in mux.h 4 * Utility to set the Omap MUX and PULL_DWN registers from a table in mux.h
5 * 5 *
@@ -53,19 +53,13 @@ omap_cfg_reg(const reg_cfg_t reg_cfg)
53 return -EINVAL; 53 return -EINVAL;
54 } 54 }
55 55
56 cfg = &reg_cfg_table[reg_cfg]; 56 cfg = (reg_cfg_set *)&reg_cfg_table[reg_cfg];
57
58 /*
59 * We do a pretty long section here with lock on, but pin muxing
60 * should only happen on driver init for each driver, so it's not time
61 * critical.
62 */
63 spin_lock_irqsave(&mux_spin_lock, flags);
64 57
65 /* Check the mux register in question */ 58 /* Check the mux register in question */
66 if (cfg->mux_reg) { 59 if (cfg->mux_reg) {
67 unsigned tmp1, tmp2; 60 unsigned tmp1, tmp2;
68 61
62 spin_lock_irqsave(&mux_spin_lock, flags);
69 reg_orig = omap_readl(cfg->mux_reg); 63 reg_orig = omap_readl(cfg->mux_reg);
70 64
71 /* The mux registers always seem to be 3 bits long */ 65 /* The mux registers always seem to be 3 bits long */
@@ -80,11 +74,13 @@ omap_cfg_reg(const reg_cfg_t reg_cfg)
80 warn = 1; 74 warn = 1;
81 75
82 omap_writel(reg, cfg->mux_reg); 76 omap_writel(reg, cfg->mux_reg);
77 spin_unlock_irqrestore(&mux_spin_lock, flags);
83 } 78 }
84 79
85 /* Check for pull up or pull down selection on 1610 */ 80 /* Check for pull up or pull down selection on 1610 */
86 if (!cpu_is_omap1510()) { 81 if (!cpu_is_omap1510()) {
87 if (cfg->pu_pd_reg && cfg->pull_val) { 82 if (cfg->pu_pd_reg && cfg->pull_val) {
83 spin_lock_irqsave(&mux_spin_lock, flags);
88 pu_pd_orig = omap_readl(cfg->pu_pd_reg); 84 pu_pd_orig = omap_readl(cfg->pu_pd_reg);
89 mask = 1 << cfg->pull_bit; 85 mask = 1 << cfg->pull_bit;
90 86
@@ -100,11 +96,13 @@ omap_cfg_reg(const reg_cfg_t reg_cfg)
100 pu_pd = pu_pd_orig & ~mask; 96 pu_pd = pu_pd_orig & ~mask;
101 } 97 }
102 omap_writel(pu_pd, cfg->pu_pd_reg); 98 omap_writel(pu_pd, cfg->pu_pd_reg);
99 spin_unlock_irqrestore(&mux_spin_lock, flags);
103 } 100 }
104 } 101 }
105 102
106 /* Check for an associated pull down register */ 103 /* Check for an associated pull down register */
107 if (cfg->pull_reg) { 104 if (cfg->pull_reg) {
105 spin_lock_irqsave(&mux_spin_lock, flags);
108 pull_orig = omap_readl(cfg->pull_reg); 106 pull_orig = omap_readl(cfg->pull_reg);
109 mask = 1 << cfg->pull_bit; 107 mask = 1 << cfg->pull_bit;
110 108
@@ -121,6 +119,7 @@ omap_cfg_reg(const reg_cfg_t reg_cfg)
121 } 119 }
122 120
123 omap_writel(pull, cfg->pull_reg); 121 omap_writel(pull, cfg->pull_reg);
122 spin_unlock_irqrestore(&mux_spin_lock, flags);
124 } 123 }
125 124
126 if (warn) { 125 if (warn) {
@@ -149,8 +148,6 @@ omap_cfg_reg(const reg_cfg_t reg_cfg)
149 } 148 }
150#endif 149#endif
151 150
152 spin_unlock_irqrestore(&mux_spin_lock, flags);
153
154#ifdef CONFIG_OMAP_MUX_ERRORS 151#ifdef CONFIG_OMAP_MUX_ERRORS
155 return warn ? -ETXTBSY : 0; 152 return warn ? -ETXTBSY : 0;
156#else 153#else
diff --git a/arch/arm/mach-omap/ocpi.c b/arch/arm/plat-omap/ocpi.c
index c9ced134a75d..2ede2ee8cae4 100644
--- a/arch/arm/mach-omap/ocpi.c
+++ b/arch/arm/plat-omap/ocpi.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/ocpi.c 2 * linux/arch/arm/plat-omap/ocpi.c
3 * 3 *
4 * Minimal OCP bus support for omap16xx 4 * Minimal OCP bus support for omap16xx
5 * 5 *
@@ -25,7 +25,6 @@
25 25
26#include <linux/config.h> 26#include <linux/config.h>
27#include <linux/module.h> 27#include <linux/module.h>
28#include <linux/version.h>
29#include <linux/types.h> 28#include <linux/types.h>
30#include <linux/errno.h> 29#include <linux/errno.h>
31#include <linux/kernel.h> 30#include <linux/kernel.h>
diff --git a/arch/arm/mach-omap/pm.c b/arch/arm/plat-omap/pm.c
index 00fac155df2a..e6536b16c385 100644
--- a/arch/arm/mach-omap/pm.c
+++ b/arch/arm/plat-omap/pm.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/pm.c 2 * linux/arch/arm/plat-omap/pm.c
3 * 3 *
4 * OMAP Power Management Routines 4 * OMAP Power Management Routines
5 * 5 *
@@ -41,7 +41,9 @@
41#include <linux/pm.h> 41#include <linux/pm.h>
42 42
43#include <asm/io.h> 43#include <asm/io.h>
44#include <asm/mach/time.h>
44#include <asm/mach-types.h> 45#include <asm/mach-types.h>
46
45#include <asm/arch/omap16xx.h> 47#include <asm/arch/omap16xx.h>
46#include <asm/arch/pm.h> 48#include <asm/arch/pm.h>
47#include <asm/arch/mux.h> 49#include <asm/arch/mux.h>
@@ -80,13 +82,13 @@ void omap_pm_idle(void)
80 return; 82 return;
81 } 83 }
82 mask32 = omap_readl(ARM_SYSST); 84 mask32 = omap_readl(ARM_SYSST);
83 local_fiq_enable();
84 local_irq_enable();
85 85
86#if defined(CONFIG_OMAP_32K_TIMER) && defined(CONFIG_NO_IDLE_HZ) 86 /*
87 /* Override timer to use VST for the next cycle */ 87 * Since an interrupt may set up a timer, we don't want to
88 omap_32k_timer_next_vst_interrupt(); 88 * reprogram the hardware timer with interrupts enabled.
89#endif 89 * Re-enable interrupts only after returning from idle.
90 */
91 timer_dyn_reprogram();
90 92
91 if ((mask32 & DSP_IDLE) == 0) { 93 if ((mask32 & DSP_IDLE) == 0) {
92 __asm__ volatile ("mcr p15, 0, r0, c7, c0, 4"); 94 __asm__ volatile ("mcr p15, 0, r0, c7, c0, 4");
@@ -102,6 +104,8 @@ void omap_pm_idle(void)
102 104
103 func_ptr(); 105 func_ptr();
104 } 106 }
107 local_fiq_enable();
108 local_irq_enable();
105} 109}
106 110
107/* 111/*
diff --git a/arch/arm/mach-omap/sleep.S b/arch/arm/plat-omap/sleep.S
index 4d426d105828..279490ce772b 100644
--- a/arch/arm/mach-omap/sleep.S
+++ b/arch/arm/plat-omap/sleep.S
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-omap/sleep.S 2 * linux/arch/arm/plat-omap/sleep.S
3 * 3 *
4 * Low-level OMAP1510/1610 sleep/wakeUp support 4 * Low-level OMAP1510/1610 sleep/wakeUp support
5 * 5 *
diff --git a/arch/arm/mach-omap/usb.c b/arch/arm/plat-omap/usb.c
index 6e805d451d0e..25bc4a8dd763 100644
--- a/arch/arm/mach-omap/usb.c
+++ b/arch/arm/plat-omap/usb.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/arm/mach-omap/usb.c -- platform level USB initialization 2 * arch/arm/plat-omap/usb.c -- platform level USB initialization
3 * 3 *
4 * Copyright (C) 2004 Texas Instruments, Inc. 4 * Copyright (C) 2004 Texas Instruments, Inc.
5 * 5 *
@@ -41,7 +41,6 @@
41 41
42/* These routines should handle the standard chip-specific modes 42/* These routines should handle the standard chip-specific modes
43 * for usb0/1/2 ports, covering basic mux and transceiver setup. 43 * for usb0/1/2 ports, covering basic mux and transceiver setup.
44 * Call omap_usb_init() once, from INIT_MACHINE().
45 * 44 *
46 * Some board-*.c files will need to set up additional mux options, 45 * Some board-*.c files will need to set up additional mux options,
47 * like for suspend handling, vbus sensing, GPIOs, and the D+ pullup. 46 * like for suspend handling, vbus sensing, GPIOs, and the D+ pullup.
@@ -288,8 +287,8 @@ static void usb_release(struct device *dev)
288static struct resource udc_resources[] = { 287static struct resource udc_resources[] = {
289 /* order is significant! */ 288 /* order is significant! */
290 { /* registers */ 289 { /* registers */
291 .start = IO_ADDRESS(UDC_BASE), 290 .start = UDC_BASE,
292 .end = IO_ADDRESS(UDC_BASE + 0xff), 291 .end = UDC_BASE + 0xff,
293 .flags = IORESOURCE_MEM, 292 .flags = IORESOURCE_MEM,
294 }, { /* general IRQ */ 293 }, { /* general IRQ */
295 .start = IH2_BASE + 20, 294 .start = IH2_BASE + 20,
@@ -327,7 +326,7 @@ static u64 ohci_dmamask = ~(u32)0;
327static struct resource ohci_resources[] = { 326static struct resource ohci_resources[] = {
328 { 327 {
329 .start = OMAP_OHCI_BASE, 328 .start = OMAP_OHCI_BASE,
330 .end = OMAP_OHCI_BASE + 4096, 329 .end = OMAP_OHCI_BASE + 4096 - 1,
331 .flags = IORESOURCE_MEM, 330 .flags = IORESOURCE_MEM,
332 }, 331 },
333 { 332 {
@@ -355,8 +354,8 @@ static struct platform_device ohci_device = {
355static struct resource otg_resources[] = { 354static struct resource otg_resources[] = {
356 /* order is significant! */ 355 /* order is significant! */
357 { 356 {
358 .start = IO_ADDRESS(OTG_BASE), 357 .start = OTG_BASE,
359 .end = IO_ADDRESS(OTG_BASE + 0xff), 358 .end = OTG_BASE + 0xff,
360 .flags = IORESOURCE_MEM, 359 .flags = IORESOURCE_MEM,
361 }, { 360 }, {
362 .start = IH2_BASE + 8, 361 .start = IH2_BASE + 8,
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 30c1dfbb052f..6d3a79e5fef8 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -6,7 +6,7 @@
6# To add an entry into this database, please see Documentation/arm/README, 6# To add an entry into this database, please see Documentation/arm/README,
7# or contact rmk@arm.linux.org.uk 7# or contact rmk@arm.linux.org.uk
8# 8#
9# Last update: Thu Mar 24 14:34:50 2005 9# Last update: Thu Jun 23 20:19:33 2005
10# 10#
11# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number 11# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
12# 12#
@@ -243,7 +243,7 @@ yoho ARCH_YOHO YOHO 231
243jasper ARCH_JASPER JASPER 232 243jasper ARCH_JASPER JASPER 232
244dsc25 ARCH_DSC25 DSC25 233 244dsc25 ARCH_DSC25 DSC25 233
245omap_innovator MACH_OMAP_INNOVATOR OMAP_INNOVATOR 234 245omap_innovator MACH_OMAP_INNOVATOR OMAP_INNOVATOR 234
246ramses ARCH_RAMSES RAMSES 235 246mnci ARCH_RAMSES RAMSES 235
247s28x ARCH_S28X S28X 236 247s28x ARCH_S28X S28X 236
248mport3 ARCH_MPORT3 MPORT3 237 248mport3 ARCH_MPORT3 MPORT3 237
249pxa_eagle250 ARCH_PXA_EAGLE250 PXA_EAGLE250 238 249pxa_eagle250 ARCH_PXA_EAGLE250 PXA_EAGLE250 238
@@ -323,7 +323,7 @@ nimbra29x ARCH_NIMBRA29X NIMBRA29X 311
323nimbra210 ARCH_NIMBRA210 NIMBRA210 312 323nimbra210 ARCH_NIMBRA210 NIMBRA210 312
324hhp_d95xx ARCH_HHP_D95XX HHP_D95XX 313 324hhp_d95xx ARCH_HHP_D95XX HHP_D95XX 313
325labarm ARCH_LABARM LABARM 314 325labarm ARCH_LABARM LABARM 314
326m825xx ARCH_M825XX M825XX 315 326comcerto ARCH_M825XX M825XX 315
327m7100 SA1100_M7100 M7100 316 327m7100 SA1100_M7100 M7100 316
328nipc2 ARCH_NIPC2 NIPC2 317 328nipc2 ARCH_NIPC2 NIPC2 317
329fu7202 ARCH_FU7202 FU7202 318 329fu7202 ARCH_FU7202 FU7202 318
@@ -724,3 +724,66 @@ lpc22xx MACH_LPC22XX LPC22XX 715
724omap_comet3 MACH_COMET3 COMET3 716 724omap_comet3 MACH_COMET3 COMET3 716
725omap_comet4 MACH_COMET4 COMET4 717 725omap_comet4 MACH_COMET4 COMET4 717
726csb625 MACH_CSB625 CSB625 718 726csb625 MACH_CSB625 CSB625 718
727fortunet2 MACH_FORTUNET2 FORTUNET2 719
728s5h2200 MACH_S5H2200 S5H2200 720
729optorm920 MACH_OPTORM920 OPTORM920 721
730adsbitsyxb MACH_ADSBITSYXB ADSBITSYXB 722
731adssphere MACH_ADSSPHERE ADSSPHERE 723
732adsportal MACH_ADSPORTAL ADSPORTAL 724
733ln2410sbc MACH_LN2410SBC LN2410SBC 725
734cb3rufc MACH_CB3RUFC CB3RUFC 726
735mp2usb MACH_MP2USB MP2USB 727
736ntnp425c MACH_NTNP425C NTNP425C 728
737colibri MACH_COLIBRI COLIBRI 729
738pcm7220 MACH_PCM7220 PCM7220 730
739gateway7001 MACH_GATEWAY7001 GATEWAY7001 731
740pcm027 MACH_PCM027 PCM027 732
741cmpxa MACH_CMPXA CMPXA 733
742anubis MACH_ANUBIS ANUBIS 734
743ite8152 MACH_ITE8152 ITE8152 735
744lpc3xxx MACH_LPC3XXX LPC3XXX 736
745puppeteer MACH_PUPPETEER PUPPETEER 737
746vt001 MACH_MACH_VADATECH MACH_VADATECH 738
747e570 MACH_E570 E570 739
748x50 MACH_X50 X50 740
749recon MACH_RECON RECON 741
750xboardgp8 MACH_XBOARDGP8 XBOARDGP8 742
751fpic2 MACH_FPIC2 FPIC2 743
752akita MACH_AKITA AKITA 744
753a81 MACH_A81 A81 745
754svm_sc25x MACH_SVM_SC25X SVM_SC25X 746
755vt020 MACH_VADATECH020 VADATECH020 747
756tli MACH_TLI TLI 748
757edb9315lc MACH_EDB9315LC EDB9315LC 749
758passec MACH_PASSEC PASSEC 750
759ds_tiger MACH_DS_TIGER DS_TIGER 751
760e310 MACH_E310 E310 752
761e330 MACH_E330 E330 753
762rt3000 MACH_RT3000 RT3000 754
763nokia770 MACH_NOKIA770 NOKIA770 755
764pnx0106 MACH_PNX0106 PNX0106 756
765hx21xx MACH_HX21XX HX21XX 757
766faraday MACH_FARADAY FARADAY 758
767sbc9312 MACH_SBC9312 SBC9312 759
768batman MACH_BATMAN BATMAN 760
769jpd201 MACH_JPD201 JPD201 761
770mipsa MACH_MIPSA MIPSA 762
771kacom MACH_KACOM KACOM 763
772swarcocpu MACH_SWARCOCPU SWARCOCPU 764
773swarcodsl MACH_SWARCODSL SWARCODSL 765
774blueangel MACH_BLUEANGEL BLUEANGEL 766
775hairygrama MACH_HAIRYGRAMA HAIRYGRAMA 767
776banff MACH_BANFF BANFF 768
777carmeva MACH_CARMEVA CARMEVA 769
778sam255 MACH_SAM255 SAM255 770
779ppm10 MACH_PPM10 PPM10 771
780edb9315a MACH_EDB9315A EDB9315A 772
781sunset MACH_SUNSET SUNSET 773
782stargate2 MACH_STARGATE2 STARGATE2 774
783intelmote2 MACH_INTELMOTE2 INTELMOTE2 775
784trizeps4 MACH_TRIZEPS4 TRIZEPS4 776
785mainstone2 MACH_MAINSTONE2 MAINSTONE2 777
786ez_ixp42x MACH_EZ_IXP42X EZ_IXP42X 778
787tapwave_zodiac MACH_TAPWAVE_ZODIAC TAPWAVE_ZODIAC 779
788universalmeter MACH_UNIVERSALMETER UNIVERSALMETER 780
789hicoarm9 MACH_HICOARM9 HICOARM9 781
diff --git a/arch/arm/vfp/vfp.h b/arch/arm/vfp/vfp.h
index 55a02bc994a3..4b97950984e9 100644
--- a/arch/arm/vfp/vfp.h
+++ b/arch/arm/vfp/vfp.h
@@ -117,7 +117,13 @@ static inline u64 vfp_estimate_div128to64(u64 nh, u64 nl, u64 m)
117 if (nh >= m) 117 if (nh >= m)
118 return ~0ULL; 118 return ~0ULL;
119 mh = m >> 32; 119 mh = m >> 32;
120 z = (mh << 32 <= nh) ? 0xffffffff00000000ULL : (nh / mh) << 32; 120 if (mh << 32 <= nh) {
121 z = 0xffffffff00000000ULL;
122 } else {
123 z = nh;
124 do_div(z, mh);
125 z <<= 32;
126 }
121 mul64to128(&termh, &terml, m, z); 127 mul64to128(&termh, &terml, m, z);
122 sub128(&remh, &reml, nh, nl, termh, terml); 128 sub128(&remh, &reml, nh, nl, termh, terml);
123 ml = m << 32; 129 ml = m << 32;
@@ -126,7 +132,12 @@ static inline u64 vfp_estimate_div128to64(u64 nh, u64 nl, u64 m)
126 add128(&remh, &reml, remh, reml, mh, ml); 132 add128(&remh, &reml, remh, reml, mh, ml);
127 } 133 }
128 remh = (remh << 32) | (reml >> 32); 134 remh = (remh << 32) | (reml >> 32);
129 z |= (mh << 32 <= remh) ? 0xffffffff : remh / mh; 135 if (mh << 32 <= remh) {
136 z |= 0xffffffff;
137 } else {
138 do_div(remh, mh);
139 z |= remh;
140 }
130 return z; 141 return z;
131} 142}
132 143
diff --git a/arch/arm/vfp/vfpdouble.c b/arch/arm/vfp/vfpdouble.c
index fa3053e84db5..9b367a65cb4d 100644
--- a/arch/arm/vfp/vfpdouble.c
+++ b/arch/arm/vfp/vfpdouble.c
@@ -32,6 +32,8 @@
32 */ 32 */
33#include <linux/kernel.h> 33#include <linux/kernel.h>
34#include <linux/bitops.h> 34#include <linux/bitops.h>
35
36#include <asm/div64.h>
35#include <asm/ptrace.h> 37#include <asm/ptrace.h>
36#include <asm/vfp.h> 38#include <asm/vfp.h>
37 39
@@ -768,6 +770,9 @@ vfp_double_add(struct vfp_double *vdd, struct vfp_double *vdn,
768 if ((s64)m_sig < 0) { 770 if ((s64)m_sig < 0) {
769 vdd->sign = vfp_sign_negate(vdd->sign); 771 vdd->sign = vfp_sign_negate(vdd->sign);
770 m_sig = -m_sig; 772 m_sig = -m_sig;
773 } else if (m_sig == 0) {
774 vdd->sign = (fpscr & FPSCR_RMODE_MASK) ==
775 FPSCR_ROUND_MINUSINF ? 0x8000 : 0;
771 } 776 }
772 } else { 777 } else {
773 m_sig += vdn->significand; 778 m_sig += vdn->significand;
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 3aeedd2afc70..22f3da4e0829 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -89,7 +89,7 @@ void vfp_raise_sigfpe(unsigned int sicode, struct pt_regs *regs)
89 current->thread.error_code = 0; 89 current->thread.error_code = 0;
90 current->thread.trap_no = 6; 90 current->thread.trap_no = 6;
91 91
92 force_sig_info(SIGFPE, &info, current); 92 send_sig_info(SIGFPE, &info, current);
93} 93}
94 94
95static void vfp_panic(char *reason) 95static void vfp_panic(char *reason)
diff --git a/arch/arm/vfp/vfpsingle.c b/arch/arm/vfp/vfpsingle.c
index 6849fe35cb2e..14dd696ddeb1 100644
--- a/arch/arm/vfp/vfpsingle.c
+++ b/arch/arm/vfp/vfpsingle.c
@@ -32,6 +32,8 @@
32 */ 32 */
33#include <linux/kernel.h> 33#include <linux/kernel.h>
34#include <linux/bitops.h> 34#include <linux/bitops.h>
35
36#include <asm/div64.h>
35#include <asm/ptrace.h> 37#include <asm/ptrace.h>
36#include <asm/vfp.h> 38#include <asm/vfp.h>
37 39
@@ -303,7 +305,11 @@ u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand)
303 if (z <= a) 305 if (z <= a)
304 return (s32)a >> 1; 306 return (s32)a >> 1;
305 } 307 }
306 return (u32)(((u64)a << 31) / z) + (z >> 1); 308 {
309 u64 v = (u64)a << 31;
310 do_div(v, z);
311 return v + (z >> 1);
312 }
307} 313}
308 314
309static u32 vfp_single_fsqrt(int sd, int unused, s32 m, u32 fpscr) 315static u32 vfp_single_fsqrt(int sd, int unused, s32 m, u32 fpscr)
@@ -1107,7 +1113,11 @@ static u32 vfp_single_fdiv(int sd, int sn, s32 m, u32 fpscr)
1107 vsn.significand >>= 1; 1113 vsn.significand >>= 1;
1108 vsd.exponent++; 1114 vsd.exponent++;
1109 } 1115 }
1110 vsd.significand = ((u64)vsn.significand << 32) / vsm.significand; 1116 {
1117 u64 significand = (u64)vsn.significand << 32;
1118 do_div(significand, vsm.significand);
1119 vsd.significand = significand;
1120 }
1111 if ((vsd.significand & 0x3f) == 0) 1121 if ((vsd.significand & 0x3f) == 0)
1112 vsd.significand |= ((u64)vsm.significand * vsd.significand != (u64)vsn.significand << 32); 1122 vsd.significand |= ((u64)vsm.significand * vsd.significand != (u64)vsn.significand << 32);
1113 1123