]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branches 'machtypes', 'core', 'ep93xx', 'ks8695', 'netdev' and 'sa1100' into...
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Thu, 9 Oct 2008 20:31:54 +0000 (21:31 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 9 Oct 2008 20:31:54 +0000 (21:31 +0100)
423 files changed:
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/boot/compressed/Makefile
arch/arm/boot/compressed/head.S
arch/arm/common/Kconfig
arch/arm/common/dmabounce.c
arch/arm/common/gic.c
arch/arm/common/locomo.c
arch/arm/common/sa1111.c
arch/arm/common/scoop.c
arch/arm/common/time-acorn.c
arch/arm/common/uengine.c
arch/arm/common/via82c505.c
arch/arm/common/vic.c
arch/arm/include/asm/bug.h
arch/arm/include/asm/cacheflush.h
arch/arm/include/asm/cachetype.h [new file with mode: 0644]
arch/arm/include/asm/cputype.h [new file with mode: 0644]
arch/arm/include/asm/dma-mapping.h
arch/arm/include/asm/futex.h
arch/arm/include/asm/irq.h
arch/arm/include/asm/kprobes.h
arch/arm/include/asm/mc146818rtc.h
arch/arm/include/asm/memory.h
arch/arm/include/asm/mmu_context.h
arch/arm/include/asm/pgtable.h
arch/arm/include/asm/ptrace.h
arch/arm/include/asm/setup.h
arch/arm/include/asm/sparsemem.h
arch/arm/include/asm/system.h
arch/arm/include/asm/thread_info.h
arch/arm/include/asm/uaccess.h
arch/arm/include/asm/vga.h
arch/arm/kernel/armksyms.c
arch/arm/kernel/bios32.c
arch/arm/kernel/crunch.c
arch/arm/kernel/debug.S
arch/arm/kernel/dma-isa.c
arch/arm/kernel/entry-armv.S
arch/arm/kernel/entry-common.S
arch/arm/kernel/fiq.c
arch/arm/kernel/head-common.S
arch/arm/kernel/head-nommu.S
arch/arm/kernel/head.S
arch/arm/kernel/init_task.c
arch/arm/kernel/io.c
arch/arm/kernel/kprobes-decode.c
arch/arm/kernel/kprobes.c
arch/arm/kernel/machine_kexec.c
arch/arm/kernel/process.c
arch/arm/kernel/ptrace.c
arch/arm/kernel/setup.c
arch/arm/kernel/signal.c
arch/arm/kernel/sys_arm.c
arch/arm/kernel/sys_oabi-compat.c
arch/arm/kernel/time.c
arch/arm/kernel/traps.c
arch/arm/kernel/xscale-cp0.c
arch/arm/lib/ashldi3.S
arch/arm/lib/ashrdi3.S
arch/arm/lib/backtrace.S
arch/arm/lib/changebit.S
arch/arm/lib/clear_user.S
arch/arm/lib/clearbit.S
arch/arm/lib/copy_from_user.S
arch/arm/lib/copy_page.S
arch/arm/lib/copy_to_user.S
arch/arm/lib/csumipv6.S
arch/arm/lib/csumpartial.S
arch/arm/lib/csumpartialcopy.S
arch/arm/lib/csumpartialcopygeneric.S
arch/arm/lib/csumpartialcopyuser.S
arch/arm/lib/delay.S
arch/arm/lib/div64.S
arch/arm/lib/findbit.S
arch/arm/lib/getuser.S
arch/arm/lib/io-readsb.S
arch/arm/lib/io-readsl.S
arch/arm/lib/io-readsw-armv4.S
arch/arm/lib/io-writesb.S
arch/arm/lib/io-writesl.S
arch/arm/lib/io-writesw-armv4.S
arch/arm/lib/lib1funcs.S
arch/arm/lib/lshrdi3.S
arch/arm/lib/memchr.S
arch/arm/lib/memcpy.S
arch/arm/lib/memmove.S
arch/arm/lib/memset.S
arch/arm/lib/memzero.S
arch/arm/lib/muldi3.S
arch/arm/lib/putuser.S
arch/arm/lib/setbit.S
arch/arm/lib/sha1.S
arch/arm/lib/strchr.S
arch/arm/lib/strncpy_from_user.S
arch/arm/lib/strnlen_user.S
arch/arm/lib/strrchr.S
arch/arm/lib/testchangebit.S
arch/arm/lib/testclearbit.S
arch/arm/lib/testsetbit.S
arch/arm/lib/uaccess.S
arch/arm/lib/ucmpdi2.S
arch/arm/mach-at91/at91x40_time.c
arch/arm/mach-at91/clock.c
arch/arm/mach-at91/gpio.c
arch/arm/mach-at91/include/mach/irqs.h
arch/arm/mach-at91/include/mach/uncompress.h
arch/arm/mach-at91/pm.c
arch/arm/mach-clps711x/autcpu12.c
arch/arm/mach-clps711x/cdb89712.c
arch/arm/mach-clps711x/include/mach/system.h
arch/arm/mach-clps711x/irq.c
arch/arm/mach-clps711x/p720t-leds.c
arch/arm/mach-clps711x/p720t.c
arch/arm/mach-clps711x/time.c
arch/arm/mach-clps7500/core.c
arch/arm/mach-clps7500/include/mach/irq.h
arch/arm/mach-clps7500/include/mach/memory.h
arch/arm/mach-clps7500/include/mach/system.h
arch/arm/mach-davinci/board-evm.c
arch/arm/mach-davinci/clock.c
arch/arm/mach-davinci/id.c
arch/arm/mach-davinci/include/mach/system.h
arch/arm/mach-davinci/io.c
arch/arm/mach-davinci/irq.c
arch/arm/mach-davinci/psc.c
arch/arm/mach-davinci/serial.c
arch/arm/mach-davinci/time.c
arch/arm/mach-ebsa110/core.c
arch/arm/mach-ebsa110/io.c
arch/arm/mach-ep93xx/Kconfig
arch/arm/mach-ep93xx/adssphere.c
arch/arm/mach-ep93xx/clock.c
arch/arm/mach-ep93xx/core.c
arch/arm/mach-ep93xx/edb9302.c
arch/arm/mach-ep93xx/edb9302a.c
arch/arm/mach-ep93xx/edb9307.c
arch/arm/mach-ep93xx/edb9312.c
arch/arm/mach-ep93xx/edb9315.c
arch/arm/mach-ep93xx/edb9315a.c
arch/arm/mach-ep93xx/gesbc9312.c
arch/arm/mach-ep93xx/gpio.c
arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
arch/arm/mach-ep93xx/include/mach/platform.h
arch/arm/mach-ep93xx/include/mach/ts72xx.h
arch/arm/mach-ep93xx/include/mach/uncompress.h
arch/arm/mach-ep93xx/micro9.c
arch/arm/mach-ep93xx/ts72xx.c
arch/arm/mach-footbridge/cats-hw.c
arch/arm/mach-footbridge/common.c
arch/arm/mach-footbridge/dc21285.c
arch/arm/mach-footbridge/dma.c
arch/arm/mach-footbridge/include/mach/memory.h
arch/arm/mach-footbridge/include/mach/system.h
arch/arm/mach-footbridge/isa-irq.c
arch/arm/mach-footbridge/isa-timer.c
arch/arm/mach-footbridge/netwinder-hw.c
arch/arm/mach-footbridge/time.c
arch/arm/mach-h720x/common.c
arch/arm/mach-imx/clock.c
arch/arm/mach-imx/irq.c
arch/arm/mach-imx/leds-mx1ads.c
arch/arm/mach-imx/time.c
arch/arm/mach-integrator/core.c
arch/arm/mach-integrator/cpu.c
arch/arm/mach-integrator/impd1.c
arch/arm/mach-integrator/integrator_ap.c
arch/arm/mach-integrator/integrator_cp.c
arch/arm/mach-integrator/leds.c
arch/arm/mach-integrator/pci_v3.c
arch/arm/mach-iop13xx/include/mach/memory.h
arch/arm/mach-iop13xx/include/mach/pci.h
arch/arm/mach-iop13xx/io.c
arch/arm/mach-iop13xx/setup.c
arch/arm/mach-iop13xx/tpmi.c
arch/arm/mach-iop32x/glantank.c
arch/arm/mach-iop32x/iq31244.c
arch/arm/mach-iop32x/iq80321.c
arch/arm/mach-iop32x/n2100.c
arch/arm/mach-iop33x/iq80331.c
arch/arm/mach-iop33x/iq80332.c
arch/arm/mach-iop33x/uart.c
arch/arm/mach-ixp2000/enp2611.c
arch/arm/mach-ixp2000/ixdp2400.c
arch/arm/mach-ixp2000/ixdp2800.c
arch/arm/mach-ixp2000/ixdp2x00.c
arch/arm/mach-ixp2000/ixdp2x01.c
arch/arm/mach-ixp2000/pci.c
arch/arm/mach-ixp23xx/pci.c
arch/arm/mach-ixp4xx/common-pci.c
arch/arm/mach-ixp4xx/common.c
arch/arm/mach-ixp4xx/fsg-setup.c
arch/arm/mach-ixp4xx/include/mach/cpu.h
arch/arm/mach-ixp4xx/ixdp425-setup.c
arch/arm/mach-ixp4xx/nas100d-setup.c
arch/arm/mach-ixp4xx/nslu2-setup.c
arch/arm/mach-ks8695/cpu.c
arch/arm/mach-ks8695/gpio.c
arch/arm/mach-ks8695/include/mach/memory.h
arch/arm/mach-ks8695/include/mach/regs-gpio.h
arch/arm/mach-ks8695/include/mach/regs-lan.h
arch/arm/mach-ks8695/include/mach/regs-wan.h
arch/arm/mach-ks8695/include/mach/system.h
arch/arm/mach-ks8695/include/mach/uncompress.h
arch/arm/mach-ks8695/irq.c
arch/arm/mach-ks8695/pci.c
arch/arm/mach-ks8695/time.c
arch/arm/mach-lh7a40x/Kconfig
arch/arm/mach-lh7a40x/include/mach/memory.h
arch/arm/mach-lh7a40x/ssp-cpld.c
arch/arm/mach-lh7a40x/time.c
arch/arm/mach-loki/addr-map.c
arch/arm/mach-loki/irq.c
arch/arm/mach-msm/board-halibut.c
arch/arm/mach-msm/common.c
arch/arm/mach-msm/dma.c
arch/arm/mach-msm/io.c
arch/arm/mach-msm/irq.c
arch/arm/mach-msm/timer.c
arch/arm/mach-mv78xx0/addr-map.c
arch/arm/mach-netx/generic.c
arch/arm/mach-netx/include/mach/system.h
arch/arm/mach-netx/pfifo.c
arch/arm/mach-netx/time.c
arch/arm/mach-netx/xc.c
arch/arm/mach-ns9xxx/gpio.c
arch/arm/mach-ns9xxx/include/mach/uncompress.h
arch/arm/mach-ns9xxx/irq.c
arch/arm/mach-omap1/clock.c
arch/arm/mach-omap1/devices.c
arch/arm/mach-omap1/fpga.c
arch/arm/mach-omap1/id.c
arch/arm/mach-omap1/io.c
arch/arm/mach-omap1/irq.c
arch/arm/mach-omap1/leds-h2p2-debug.c
arch/arm/mach-omap1/mailbox.c
arch/arm/mach-omap1/mux.c
arch/arm/mach-omap1/pm.c
arch/arm/mach-omap1/serial.c
arch/arm/mach-omap1/time.c
arch/arm/mach-omap1/timer32k.c
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-h4.c
arch/arm/mach-omap2/clock.c
arch/arm/mach-omap2/clock24xx.c
arch/arm/mach-omap2/clock34xx.c
arch/arm/mach-omap2/devices.c
arch/arm/mach-omap2/gpmc.c
arch/arm/mach-omap2/id.c
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/irq.c
arch/arm/mach-omap2/mailbox.c
arch/arm/mach-omap2/memory.c
arch/arm/mach-omap2/mux.c
arch/arm/mach-omap2/pm.c
arch/arm/mach-omap2/serial.c
arch/arm/mach-orion5x/addr-map.c
arch/arm/mach-orion5x/gpio.c
arch/arm/mach-orion5x/irq.c
arch/arm/mach-orion5x/mpp.c
arch/arm/mach-pnx4008/clock.c
arch/arm/mach-pnx4008/core.c
arch/arm/mach-pnx4008/dma.c
arch/arm/mach-pnx4008/gpio.c
arch/arm/mach-pnx4008/include/mach/system.h
arch/arm/mach-pnx4008/include/mach/timex.h
arch/arm/mach-pnx4008/irq.c
arch/arm/mach-pnx4008/pm.c
arch/arm/mach-pnx4008/serial.c
arch/arm/mach-pnx4008/time.c
arch/arm/mach-pxa/Kconfig
arch/arm/mach-pxa/corgi.c
arch/arm/mach-pxa/gpio.c
arch/arm/mach-pxa/include/mach/hardware.h
arch/arm/mach-pxa/reset.c
arch/arm/mach-pxa/spitz.c
arch/arm/mach-pxa/ssp.c
arch/arm/mach-realview/core.c
arch/arm/mach-realview/core.h
arch/arm/mach-realview/include/mach/system.h
arch/arm/mach-realview/localtimer.c
arch/arm/mach-realview/platsmp.c
arch/arm/mach-realview/realview_eb.c
arch/arm/mach-realview/realview_pb1176.c
arch/arm/mach-realview/realview_pb11mp.c
arch/arm/mach-rpc/dma.c
arch/arm/mach-rpc/include/mach/memory.h
arch/arm/mach-rpc/include/mach/system.h
arch/arm/mach-rpc/include/mach/uncompress.h
arch/arm/mach-rpc/irq.c
arch/arm/mach-rpc/riscpc.c
arch/arm/mach-s3c2400/gpio.c
arch/arm/mach-s3c2410/bast-irq.c
arch/arm/mach-s3c2410/clock.c
arch/arm/mach-s3c2410/gpio.c
arch/arm/mach-s3c2410/include/mach/system-reset.h
arch/arm/mach-s3c2410/include/mach/system.h
arch/arm/mach-s3c2410/mach-amlm5900.c
arch/arm/mach-s3c2410/mach-bast.c
arch/arm/mach-s3c2410/mach-h1940.c
arch/arm/mach-s3c2410/mach-n30.c
arch/arm/mach-s3c2410/mach-otom.c
arch/arm/mach-s3c2410/mach-qt2410.c
arch/arm/mach-s3c2410/mach-smdk2410.c
arch/arm/mach-s3c2410/mach-tct_hammer.c
arch/arm/mach-s3c2410/mach-vr1000.c
arch/arm/mach-s3c2410/pm.c
arch/arm/mach-s3c2410/s3c2410.c
arch/arm/mach-s3c2410/usb-simtec.c
arch/arm/mach-s3c2412/clock.c
arch/arm/mach-s3c2412/dma.c
arch/arm/mach-s3c2412/irq.c
arch/arm/mach-s3c2412/mach-smdk2413.c
arch/arm/mach-s3c2412/mach-vstms.c
arch/arm/mach-s3c2412/pm.c
arch/arm/mach-s3c2412/s3c2412.c
arch/arm/mach-s3c2440/clock.c
arch/arm/mach-s3c2440/dsc.c
arch/arm/mach-s3c2440/irq.c
arch/arm/mach-s3c2440/mach-anubis.c
arch/arm/mach-s3c2440/mach-nexcoder.c
arch/arm/mach-s3c2440/mach-osiris.c
arch/arm/mach-s3c2440/mach-rx3715.c
arch/arm/mach-s3c2440/mach-smdk2440.c
arch/arm/mach-s3c2440/s3c2440.c
arch/arm/mach-s3c2442/clock.c
arch/arm/mach-s3c2443/clock.c
arch/arm/mach-s3c2443/dma.c
arch/arm/mach-s3c2443/irq.c
arch/arm/mach-s3c2443/mach-smdk2443.c
arch/arm/mach-s3c2443/s3c2443.c
arch/arm/mach-sa1100/cpu-sa1100.c
arch/arm/mach-sa1100/cpu-sa1110.c
arch/arm/mach-sa1100/include/mach/SA-1100.h
arch/arm/mach-sa1100/include/mach/hardware.h
arch/arm/mach-sa1100/include/mach/memory.h
arch/arm/mach-sa1100/pleb.c
arch/arm/mach-sa1100/simpad.c
arch/arm/mach-sa1100/ssp.c
arch/arm/mach-shark/core.c
arch/arm/mach-shark/include/mach/system.h
arch/arm/mach-shark/irq.c
arch/arm/mach-shark/leds.c
arch/arm/mach-versatile/core.c
arch/arm/mach-versatile/include/mach/system.h
arch/arm/mach-versatile/pci.c
arch/arm/mach-versatile/versatile_ab.c
arch/arm/mach-versatile/versatile_pb.c
arch/arm/mm/Makefile
arch/arm/mm/abort-ev7.S
arch/arm/mm/abort-nommu.S
arch/arm/mm/alignment.c
arch/arm/mm/cache-l2x0.c
arch/arm/mm/cache-v7.S
arch/arm/mm/cache-xsc3l2.c
arch/arm/mm/copypage-v6.c
arch/arm/mm/dma-mapping.c [moved from arch/arm/mm/consistent.c with 79% similarity]
arch/arm/mm/extable.c
arch/arm/mm/fault-armv.c
arch/arm/mm/fault.c
arch/arm/mm/flush.c
arch/arm/mm/init.c
arch/arm/mm/iomap.c
arch/arm/mm/ioremap.c
arch/arm/mm/mm.h
arch/arm/mm/mmap.c
arch/arm/mm/mmu.c
arch/arm/mm/nommu.c
arch/arm/mm/proc-v7.S
arch/arm/mm/tlb-v7.S
arch/arm/nwfpe/fpa11_cpdt.c
arch/arm/oprofile/Makefile
arch/arm/oprofile/backtrace.c
arch/arm/oprofile/common.c
arch/arm/oprofile/op_arm_model.h
arch/arm/oprofile/op_model_mpcore.c
arch/arm/oprofile/op_model_v7.c [new file with mode: 0644]
arch/arm/oprofile/op_model_v7.h [new file with mode: 0644]
arch/arm/oprofile/op_model_xscale.c
arch/arm/plat-iop/i2c.c
arch/arm/plat-iop/io.c
arch/arm/plat-iop/pci.c
arch/arm/plat-iop/time.c
arch/arm/plat-mxc/irq.c
arch/arm/plat-omap/clock.c
arch/arm/plat-omap/common.c
arch/arm/plat-omap/cpu-omap.c
arch/arm/plat-omap/debug-devices.c
arch/arm/plat-omap/debug-leds.c
arch/arm/plat-omap/devices.c
arch/arm/plat-omap/dmtimer.c
arch/arm/plat-omap/fb.c
arch/arm/plat-omap/gpio.c
arch/arm/plat-omap/include/mach/gpio.h
arch/arm/plat-omap/include/mach/irqs.h
arch/arm/plat-omap/mailbox.c
arch/arm/plat-omap/mux.c
arch/arm/plat-omap/ocpi.c
arch/arm/plat-omap/sram.c
arch/arm/plat-omap/usb.c
arch/arm/plat-s3c24xx/clock.c
arch/arm/plat-s3c24xx/common-smdk.c
arch/arm/plat-s3c24xx/cpu.c
arch/arm/plat-s3c24xx/devs.c
arch/arm/plat-s3c24xx/dma.c
arch/arm/plat-s3c24xx/gpio.c
arch/arm/plat-s3c24xx/irq.c
arch/arm/plat-s3c24xx/pm-simtec.c
arch/arm/plat-s3c24xx/pm.c
arch/arm/plat-s3c24xx/s3c244x-clock.c
arch/arm/plat-s3c24xx/s3c244x-irq.c
arch/arm/plat-s3c24xx/s3c244x.c
arch/arm/plat-s3c24xx/time.c
arch/arm/tools/mach-types
arch/arm/vfp/entry.S
arch/arm/vfp/vfphw.S
drivers/net/Kconfig
drivers/net/cs89x0.c
drivers/net/smc91x.c
drivers/net/smc91x.h
drivers/serial/serial_ks8695.c
drivers/watchdog/ixp4xx_wdt.c
include/linux/smc91x.h

index 4b8acd2851f48e4a7e42bd6f8886fae30aae930c..ea52fae33290a2d9c2baffab08d58f83407c0c22 100644 (file)
@@ -148,7 +148,6 @@ config ARCH_MAY_HAVE_PC_FDC
 
 config ZONE_DMA
        bool
-       default y
 
 config GENERIC_ISA_DMA
        bool
@@ -178,6 +177,11 @@ config OPROFILE_MPCORE
 config OPROFILE_ARM11_CORE
        bool
 
+config OPROFILE_ARMV7
+       def_bool y
+       depends on CPU_V7 && !SMP
+       bool
+
 endif
 
 config VECTORS_BASE
@@ -245,6 +249,7 @@ config ARCH_CLPS7500
        select TIMER_ACORN
        select ISA
        select NO_IOPORT
+       select ARCH_SPARSEMEM_ENABLE
        help
          Support for the Cirrus Logic PS7500FE system-on-a-chip.
 
@@ -306,6 +311,7 @@ config ARCH_IOP13XX
        select PLAT_IOP
        select PCI
        select ARCH_SUPPORTS_MSI
+       select VMSPLIT_1G
        help
          Support for Intel's IOP13XX (XScale) family of processors.
 
@@ -350,6 +356,7 @@ config ARCH_IXP4XX
        select GENERIC_GPIO
        select GENERIC_TIME
        select GENERIC_CLOCKEVENTS
+       select ZONE_DMA if PCI
        help
          Support for Intel's IXP4XX (XScale) family of processors.
 
@@ -464,6 +471,7 @@ config ARCH_RPC
        select HAVE_PATA_PLATFORM
        select ISA_DMA_API
        select NO_IOPORT
+       select ARCH_SPARSEMEM_ENABLE
        help
          On the Acorn Risc-PC, Linux can support the internal IDE disk and
          CD-ROM interface, serial and parallel port, and the floppy drive.
@@ -471,9 +479,7 @@ config ARCH_RPC
 config ARCH_SA1100
        bool "SA1100-based"
        select ISA
-       select ARCH_DISCONTIGMEM_ENABLE
        select ARCH_SPARSEMEM_ENABLE
-       select ARCH_SELECT_MEMORY_MODEL
        select ARCH_MTD_XIP
        select GENERIC_GPIO
        select GENERIC_TIME
@@ -497,6 +503,7 @@ config ARCH_SHARK
        bool "Shark"
        select ISA
        select ISA_DMA
+       select ZONE_DMA
        select PCI
        help
          Support for the StrongARM based Digital DNARD machine, also known
@@ -504,6 +511,8 @@ config ARCH_SHARK
 
 config ARCH_LH7A40X
        bool "Sharp LH7A40X"
+       select ARCH_DISCONTIGMEM_ENABLE if !LH7A40X_CONTIGMEM
+       select ARCH_SPARSEMEM_ENABLE if !LH7A40X_CONTIGMEM
        help
          Say Y here for systems based on one of the Sharp LH7A40X
          System on a Chip processors.  These CPUs include an ARM922T
@@ -516,6 +525,7 @@ config ARCH_DAVINCI
        select GENERIC_CLOCKEVENTS
        select GENERIC_GPIO
        select HAVE_CLK
+       select ZONE_DMA
        help
          Support for TI's DaVinci platform.
 
@@ -734,6 +744,29 @@ config SMP
 
          If you don't know what to do here, say N.
 
+choice
+       prompt "Memory split"
+       default VMSPLIT_3G
+       help
+         Select the desired split between kernel and user memory.
+
+         If you are not absolutely sure what you are doing, leave this
+         option alone!
+
+       config VMSPLIT_3G
+               bool "3G/1G user/kernel split"
+       config VMSPLIT_2G
+               bool "2G/2G user/kernel split"
+       config VMSPLIT_1G
+               bool "1G/3G user/kernel split"
+endchoice
+
+config PAGE_OFFSET
+       hex
+       default 0x40000000 if VMSPLIT_1G
+       default 0x80000000 if VMSPLIT_2G
+       default 0xC0000000
+
 config NR_CPUS
        int "Maximum number of CPUs (2-32)"
        range 2 32
@@ -810,20 +843,18 @@ config OABI_COMPAT
          UNPREDICTABLE (in fact it can be predicted that it won't work
          at all). If in doubt say Y.
 
+# Discontigmem is deprecated
 config ARCH_DISCONTIGMEM_ENABLE
        bool
-       default (ARCH_LH7A40X && !LH7A40X_CONTIGMEM)
-       help
-         Say Y to support efficient handling of discontiguous physical memory,
-         for architectures which are either NUMA (Non-Uniform Memory Access)
-         or have huge holes in the physical address space for other reasons.
-         See <file:Documentation/vm/numa> for more.
 
 config ARCH_SPARSEMEM_ENABLE
        bool
 
+config ARCH_SPARSEMEM_DEFAULT
+       def_bool ARCH_SPARSEMEM_ENABLE
+
 config ARCH_SELECT_MEMORY_MODEL
-       bool
+       def_bool ARCH_DISCONTIGMEM_ENABLE && ARCH_SPARSEMEM_ENABLE
 
 config NODES_SHIFT
        int
@@ -1000,9 +1031,9 @@ config ATAGS_PROC
 
 endmenu
 
-if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX || ARCH_PXA)
+menu "CPU Power Management"
 
-menu "CPU Frequency scaling"
+if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX || ARCH_PXA)
 
 source "drivers/cpufreq/Kconfig"
 
@@ -1042,10 +1073,12 @@ config CPU_FREQ_PXA
        default y
        select CPU_FREQ_DEFAULT_GOV_USERSPACE
 
-endmenu
-
 endif
 
+source "drivers/cpuidle/Kconfig"
+
+endmenu
+
 menu "Floating point emulation"
 
 comment "At least one emulation must be selected"
@@ -1197,6 +1230,8 @@ source "drivers/power/Kconfig"
 
 source "drivers/hwmon/Kconfig"
 
+source "drivers/thermal/Kconfig"
+
 source "drivers/watchdog/Kconfig"
 
 source "drivers/ssb/Kconfig"
@@ -1217,6 +1252,10 @@ source "drivers/usb/Kconfig"
 
 source "drivers/mmc/Kconfig"
 
+source "drivers/memstick/Kconfig"
+
+source "drivers/accessibility/Kconfig"
+
 source "drivers/leds/Kconfig"
 
 source "drivers/rtc/Kconfig"
@@ -1225,6 +1264,8 @@ source "drivers/dma/Kconfig"
 
 source "drivers/dca/Kconfig"
 
+source "drivers/auxdisplay/Kconfig"
+
 source "drivers/regulator/Kconfig"
 
 source "drivers/uio/Kconfig"
index 703a44fa0f9b7c70814c17ab21e613eafcf4655a..e2274bc0b5441d249c225a0a49eb5474b490e14e 100644 (file)
@@ -47,7 +47,7 @@ comma = ,
 # Note that GCC does not numerically define an architecture version
 # macro, but instead defines a whole series of macros which makes
 # testing for a specific architecture or later rather impossible.
-arch-$(CONFIG_CPU_32v7)                :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7a,-march=armv5t -Wa$(comma)-march=armv7a)
+arch-$(CONFIG_CPU_32v7)                :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
 arch-$(CONFIG_CPU_32v6)                :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
 # Only override the compiler option if ARMv6. The ARMv6K extensions are
 # always available in ARMv7
index 94462a097f86697ce51558bd9389a4886b904318..7a03f200788255924f225c807b967fdb09d01eae 100644 (file)
@@ -76,7 +76,7 @@ KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
 endif
 
 EXTRA_CFLAGS  := -fpic -fno-builtin
-EXTRA_AFLAGS  :=
+EXTRA_AFLAGS  := -Wa,-march=all
 
 # Supply ZRELADDR, INITRD_PHYS and PARAMS_PHYS to the decompressor via
 # linker symbols.  We only define initrd_phys and params_phys if the
index d42f89b7760bf2c537d3f4769bbc53715af7b6b5..84a1e0496a3c6ffb7b1adbfa38182341ca943c27 100644 (file)
@@ -421,6 +421,7 @@ __setup_mmu:        sub     r3, r4, #16384          @ Page directory size
                add     r1, r1, #1048576
                str     r1, [r0]
                mov     pc, lr
+ENDPROC(__setup_mmu)
 
 __armv4_mmu_cache_on:
                mov     r12, lr
@@ -801,7 +802,7 @@ loop1:
                add     r2, r2, #4              @ add 4 (line length offset)
                ldr     r4, =0x3ff
                ands    r4, r4, r1, lsr #3      @ find maximum number on the way size
-               .word   0xe16f5f14              @ clz r5, r4 - find bit position of way size increment
+               clz     r5, r4                  @ find bit position of way size increment
                ldr     r7, =0x7fff
                ands    r7, r7, r1, lsr #13     @ extract max number of the index size
 loop2:
index 3e073467caca6b63a5515b2bd9afb543ca233e2e..2e32acca02fbb83374c74f67e1fba340cfaa9a2c 100644 (file)
@@ -12,7 +12,8 @@ config ICST307
 
 config SA1111
        bool
-       select DMABOUNCE
+       select DMABOUNCE if !ARCH_PXA
+       select ZONE_DMA if !ARCH_PXA
 
 config DMABOUNCE
        bool
index aecc6c3f908fd2dd5a79e31a847d1c9cd1cc2568..f030f0775be7d11016d14ed4add82c16be38d254 100644 (file)
@@ -154,9 +154,7 @@ alloc_safe_buffer(struct dmabounce_device_info *device_info, void *ptr,
 #endif
 
        write_lock_irqsave(&device_info->lock, flags);
-
        list_add(&buf->node, &device_info->safe_buffers);
-
        write_unlock_irqrestore(&device_info->lock, flags);
 
        return buf;
@@ -205,8 +203,22 @@ free_safe_buffer(struct dmabounce_device_info *device_info, struct safe_buffer *
 
 /* ************************************************** */
 
-static inline dma_addr_t
-map_single(struct device *dev, void *ptr, size_t size,
+static struct safe_buffer *find_safe_buffer_dev(struct device *dev,
+               dma_addr_t dma_addr, const char *where)
+{
+       if (!dev || !dev->archdata.dmabounce)
+               return NULL;
+       if (dma_mapping_error(dev, dma_addr)) {
+               if (dev)
+                       dev_err(dev, "Trying to %s invalid mapping\n", where);
+               else
+                       pr_err("unknown device: Trying to %s invalid mapping\n", where);
+               return NULL;
+       }
+       return find_safe_buffer(dev->archdata.dmabounce, dma_addr);
+}
+
+static inline dma_addr_t map_single(struct device *dev, void *ptr, size_t size,
                enum dma_data_direction dir)
 {
        struct dmabounce_device_info *device_info = dev->archdata.dmabounce;
@@ -270,33 +282,21 @@ map_single(struct device *dev, void *ptr, size_t size,
        return dma_addr;
 }
 
-static inline void
-unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
-               enum dma_data_direction dir)
+static inline void unmap_single(struct device *dev, dma_addr_t dma_addr,
+               size_t size, enum dma_data_direction dir)
 {
-       struct dmabounce_device_info *device_info = dev->archdata.dmabounce;
-       struct safe_buffer *buf = NULL;
-
-       /*
-        * Trying to unmap an invalid mapping
-        */
-       if (dma_mapping_error(dev, dma_addr)) {
-               dev_err(dev, "Trying to unmap invalid mapping\n");
-               return;
-       }
-
-       if (device_info)
-               buf = find_safe_buffer(device_info, dma_addr);
+       struct safe_buffer *buf = find_safe_buffer_dev(dev, dma_addr, "unmap");
 
        if (buf) {
                BUG_ON(buf->size != size);
+               BUG_ON(buf->direction != dir);
 
                dev_dbg(dev,
                        "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n",
                        __func__, buf->ptr, virt_to_dma(dev, buf->ptr),
                        buf->safe, buf->safe_dma_addr);
 
-               DO_STATS ( device_info->bounce_count++ );
+               DO_STATS(dev->archdata.dmabounce->bounce_count++);
 
                if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL) {
                        void *ptr = buf->ptr;
@@ -317,74 +317,7 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
                        dmac_clean_range(ptr, ptr + size);
                        outer_clean_range(__pa(ptr), __pa(ptr) + size);
                }
-               free_safe_buffer(device_info, buf);
-       }
-}
-
-static int sync_single(struct device *dev, dma_addr_t dma_addr, size_t size,
-                       enum dma_data_direction dir)
-{
-       struct dmabounce_device_info *device_info = dev->archdata.dmabounce;
-       struct safe_buffer *buf = NULL;
-
-       if (device_info)
-               buf = find_safe_buffer(device_info, dma_addr);
-
-       if (buf) {
-               /*
-                * Both of these checks from original code need to be
-                * commented out b/c some drivers rely on the following:
-                *
-                * 1) Drivers may map a large chunk of memory into DMA space
-                *    but only sync a small portion of it. Good example is
-                *    allocating a large buffer, mapping it, and then
-                *    breaking it up into small descriptors. No point
-                *    in syncing the whole buffer if you only have to
-                *    touch one descriptor.
-                *
-                * 2) Buffers that are mapped as DMA_BIDIRECTIONAL are
-                *    usually only synced in one dir at a time.
-                *
-                * See drivers/net/eepro100.c for examples of both cases.
-                *
-                * -ds
-                *
-                * BUG_ON(buf->size != size);
-                * BUG_ON(buf->direction != dir);
-                */
-
-               dev_dbg(dev,
-                       "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n",
-                       __func__, buf->ptr, virt_to_dma(dev, buf->ptr),
-                       buf->safe, buf->safe_dma_addr);
-
-               DO_STATS ( device_info->bounce_count++ );
-
-               switch (dir) {
-               case DMA_FROM_DEVICE:
-                       dev_dbg(dev,
-                               "%s: copy back safe %p to unsafe %p size %d\n",
-                               __func__, buf->safe, buf->ptr, size);
-                       memcpy(buf->ptr, buf->safe, size);
-                       break;
-               case DMA_TO_DEVICE:
-                       dev_dbg(dev,
-                               "%s: copy out unsafe %p to safe %p, size %d\n",
-                               __func__,buf->ptr, buf->safe, size);
-                       memcpy(buf->safe, buf->ptr, size);
-                       break;
-               case DMA_BIDIRECTIONAL:
-                       BUG();  /* is this allowed?  what does it mean? */
-               default:
-                       BUG();
-               }
-               /*
-                * No need to sync the safe buffer - it was allocated
-                * via the coherent allocators.
-                */
-               return 0;
-       } else {
-               return 1;
+               free_safe_buffer(dev->archdata.dmabounce, buf);
        }
 }
 
@@ -396,21 +329,29 @@ static int sync_single(struct device *dev, dma_addr_t dma_addr, size_t size,
  * substitute the safe buffer for the unsafe one.
  * (basically move the buffer from an unsafe area to a safe one)
  */
-dma_addr_t
-dma_map_single(struct device *dev, void *ptr, size_t size,
+dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
                enum dma_data_direction dir)
 {
-       dma_addr_t dma_addr;
-
        dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n",
                __func__, ptr, size, dir);
 
-       BUG_ON(dir == DMA_NONE);
+       BUG_ON(!valid_dma_direction(dir));
 
-       dma_addr = map_single(dev, ptr, size, dir);
+       return map_single(dev, ptr, size, dir);
+}
+EXPORT_SYMBOL(dma_map_single);
 
-       return dma_addr;
+dma_addr_t dma_map_page(struct device *dev, struct page *page,
+               unsigned long offset, size_t size, enum dma_data_direction dir)
+{
+       dev_dbg(dev, "%s(page=%p,off=%#lx,size=%zx,dir=%x)\n",
+               __func__, page, offset, size, dir);
+
+       BUG_ON(!valid_dma_direction(dir));
+
+       return map_single(dev, page_address(page) + offset, size, dir);
 }
+EXPORT_SYMBOL(dma_map_page);
 
 /*
  * see if a mapped address was really a "safe" buffer and if so, copy
@@ -419,126 +360,76 @@ dma_map_single(struct device *dev, void *ptr, size_t size,
  * should be)
  */
 
-void
-dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
-                       enum dma_data_direction dir)
+void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
+               enum dma_data_direction dir)
 {
        dev_dbg(dev, "%s(ptr=%p,size=%d,dir=%x)\n",
                __func__, (void *) dma_addr, size, dir);
 
-       BUG_ON(dir == DMA_NONE);
-
        unmap_single(dev, dma_addr, size, dir);
 }
+EXPORT_SYMBOL(dma_unmap_single);
 
-int
-dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
-               enum dma_data_direction dir)
+int dmabounce_sync_for_cpu(struct device *dev, dma_addr_t addr,
+               unsigned long off, size_t sz, enum dma_data_direction dir)
 {
-       int i;
-
-       dev_dbg(dev, "%s(sg=%p,nents=%d,dir=%x)\n",
-               __func__, sg, nents, dir);
-
-       BUG_ON(dir == DMA_NONE);
-
-       for (i = 0; i < nents; i++, sg++) {
-               struct page *page = sg_page(sg);
-               unsigned int offset = sg->offset;
-               unsigned int length = sg->length;
-               void *ptr = page_address(page) + offset;
+       struct safe_buffer *buf;
 
-               sg->dma_address =
-                       map_single(dev, ptr, length, dir);
-       }
+       dev_dbg(dev, "%s(dma=%#x,off=%#lx,sz=%zx,dir=%x)\n",
+               __func__, addr, off, sz, dir);
 
-       return nents;
-}
-
-void
-dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
-               enum dma_data_direction dir)
-{
-       int i;
+       buf = find_safe_buffer_dev(dev, addr, __func__);
+       if (!buf)
+               return 1;
 
-       dev_dbg(dev, "%s(sg=%p,nents=%d,dir=%x)\n",
-               __func__, sg, nents, dir);
+       BUG_ON(buf->direction != dir);
 
-       BUG_ON(dir == DMA_NONE);
+       dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n",
+               __func__, buf->ptr, virt_to_dma(dev, buf->ptr),
+               buf->safe, buf->safe_dma_addr);
 
-       for (i = 0; i < nents; i++, sg++) {
-               dma_addr_t dma_addr = sg->dma_address;
-               unsigned int length = sg->length;
+       DO_STATS(dev->archdata.dmabounce->bounce_count++);
 
-               unmap_single(dev, dma_addr, length, dir);
+       if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL) {
+               dev_dbg(dev, "%s: copy back safe %p to unsafe %p size %d\n",
+                       __func__, buf->safe + off, buf->ptr + off, sz);
+               memcpy(buf->ptr + off, buf->safe + off, sz);
        }
+       return 0;
 }
+EXPORT_SYMBOL(dmabounce_sync_for_cpu);
 
-void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_addr,
-                                  unsigned long offset, size_t size,
-                                  enum dma_data_direction dir)
-{
-       dev_dbg(dev, "%s(dma=%#x,off=%#lx,size=%zx,dir=%x)\n",
-               __func__, dma_addr, offset, size, dir);
-
-       if (sync_single(dev, dma_addr, offset + size, dir))
-               dma_cache_maint(dma_to_virt(dev, dma_addr) + offset, size, dir);
-}
-EXPORT_SYMBOL(dma_sync_single_range_for_cpu);
-
-void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_addr,
-                                     unsigned long offset, size_t size,
-                                     enum dma_data_direction dir)
-{
-       dev_dbg(dev, "%s(dma=%#x,off=%#lx,size=%zx,dir=%x)\n",
-               __func__, dma_addr, offset, size, dir);
-
-       if (sync_single(dev, dma_addr, offset + size, dir))
-               dma_cache_maint(dma_to_virt(dev, dma_addr) + offset, size, dir);
-}
-EXPORT_SYMBOL(dma_sync_single_range_for_device);
-
-void
-dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents,
-                       enum dma_data_direction dir)
+int dmabounce_sync_for_device(struct device *dev, dma_addr_t addr,
+               unsigned long off, size_t sz, enum dma_data_direction dir)
 {
-       int i;
-
-       dev_dbg(dev, "%s(sg=%p,nents=%d,dir=%x)\n",
-               __func__, sg, nents, dir);
-
-       BUG_ON(dir == DMA_NONE);
+       struct safe_buffer *buf;
 
-       for (i = 0; i < nents; i++, sg++) {
-               dma_addr_t dma_addr = sg->dma_address;
-               unsigned int length = sg->length;
+       dev_dbg(dev, "%s(dma=%#x,off=%#lx,sz=%zx,dir=%x)\n",
+               __func__, addr, off, sz, dir);
 
-               sync_single(dev, dma_addr, length, dir);
-       }
-}
-
-void
-dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
-                       enum dma_data_direction dir)
-{
-       int i;
+       buf = find_safe_buffer_dev(dev, addr, __func__);
+       if (!buf)
+               return 1;
 
-       dev_dbg(dev, "%s(sg=%p,nents=%d,dir=%x)\n",
-               __func__, sg, nents, dir);
+       BUG_ON(buf->direction != dir);
 
-       BUG_ON(dir == DMA_NONE);
+       dev_dbg(dev, "%s: unsafe buffer %p (dma=%#x) mapped to %p (dma=%#x)\n",
+               __func__, buf->ptr, virt_to_dma(dev, buf->ptr),
+               buf->safe, buf->safe_dma_addr);
 
-       for (i = 0; i < nents; i++, sg++) {
-               dma_addr_t dma_addr = sg->dma_address;
-               unsigned int length = sg->length;
+       DO_STATS(dev->archdata.dmabounce->bounce_count++);
 
-               sync_single(dev, dma_addr, length, dir);
+       if (dir == DMA_TO_DEVICE || dir == DMA_BIDIRECTIONAL) {
+               dev_dbg(dev, "%s: copy out unsafe %p to safe %p, size %d\n",
+                       __func__,buf->ptr + off, buf->safe + off, sz);
+               memcpy(buf->safe + off, buf->ptr + off, sz);
        }
+       return 0;
 }
+EXPORT_SYMBOL(dmabounce_sync_for_device);
 
-static int
-dmabounce_init_pool(struct dmabounce_pool *pool, struct device *dev, const char *name,
-                   unsigned long size)
+static int dmabounce_init_pool(struct dmabounce_pool *pool, struct device *dev,
+               const char *name, unsigned long size)
 {
        pool->size = size;
        DO_STATS(pool->allocs = 0);
@@ -549,9 +440,8 @@ dmabounce_init_pool(struct dmabounce_pool *pool, struct device *dev, const char
        return pool->pool ? 0 : -ENOMEM;
 }
 
-int
-dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
-                       unsigned long large_buffer_size)
+int dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
+               unsigned long large_buffer_size)
 {
        struct dmabounce_device_info *device_info;
        int ret;
@@ -607,9 +497,9 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size,
        kfree(device_info);
        return ret;
 }
+EXPORT_SYMBOL(dmabounce_register_dev);
 
-void
-dmabounce_unregister_dev(struct device *dev)
+void dmabounce_unregister_dev(struct device *dev)
 {
        struct dmabounce_device_info *device_info = dev->archdata.dmabounce;
 
@@ -642,15 +532,6 @@ dmabounce_unregister_dev(struct device *dev)
 
        dev_info(dev, "dmabounce: device unregistered\n");
 }
-
-
-EXPORT_SYMBOL(dma_map_single);
-EXPORT_SYMBOL(dma_unmap_single);
-EXPORT_SYMBOL(dma_map_sg);
-EXPORT_SYMBOL(dma_unmap_sg);
-EXPORT_SYMBOL(dma_sync_sg_for_cpu);
-EXPORT_SYMBOL(dma_sync_sg_for_device);
-EXPORT_SYMBOL(dmabounce_register_dev);
 EXPORT_SYMBOL(dmabounce_unregister_dev);
 
 MODULE_AUTHOR("Christopher Hoover <ch@hpl.hp.com>, Deepak Saxena <dsaxena@plexity.net>");
index 0c89bd35e06fb495dbaddfe2796c6d88a28cea87..7fc9860a97d79b5dcf73cb97c6d3de9ca9530af3 100644 (file)
@@ -27,9 +27,9 @@
 #include <linux/list.h>
 #include <linux/smp.h>
 #include <linux/cpumask.h>
+#include <linux/io.h>
 
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/mach/irq.h>
 #include <asm/hardware/gic.h>
 
index 283051eaf931c7b1f02b58690ec7239d25eed9d7..534b23d95864d3c3e492b9f6074a5d5d9c570e62 100644 (file)
@@ -24,9 +24,9 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/irq.h>
 
index ec8a5471bf06df84b2c54441619724631fc54b4c..fb86f248aab84c2aa73f5d8c383f745c2d5e3e15 100644 (file)
 #include <linux/spinlock.h>
 #include <linux/dma-mapping.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/irq.h>
 #include <asm/sizes.h>
index ae39553589ddbf34b37f37e0d2c3c3d67a1b4e9c..697c64913990f8682362bc325a795ca752afce4c 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <asm/gpio.h>
 #include <asm/hardware/scoop.h>
 
index df0983aafe694b6e58cab75da60e2eeff5ddb673..deeed561b168267564ffa41309e230678156a3c4 100644 (file)
@@ -17,9 +17,9 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/hardware/ioc.h>
 
 #include <asm/mach/time.h>
index 7ecd3c0ab011a2c1196c9c61bdd0c34296c4b659..b520e56216a9517d520b4da35d71ff88525d114a 100644 (file)
@@ -16,9 +16,9 @@
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/string.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/hardware/uengine.h>
-#include <asm/io.h>
 
 #if defined(CONFIG_ARCH_IXP2000)
 #define IXP_UENGINE_CSR_VIRT_BASE      IXP2000_UENGINE_CSR_VIRT_BASE
index 79a8206e62ac3f01a214a242036dc5ebadd9dc36..8421d39109b3a6ba28c16b3ccbd4efa4af4fb44a 100644 (file)
@@ -4,8 +4,8 @@
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/system.h>
 
 #include <asm/mach/pci.h>
index c026fa2214a3f5000b28eaf206e2275d001f5c5f..f1e4b8f60cab026e773514e61d3ee682f478fc01 100644 (file)
@@ -20,8 +20,8 @@
  */
 #include <linux/init.h>
 #include <linux/list.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/mach/irq.h>
 #include <asm/hardware/vic.h>
 
index 7b62351f097d2f49ff6fcfb7ea0e0c43e11d012f..4d88425a41693e3778a62250bf09eac6446b1d3d 100644 (file)
@@ -12,7 +12,7 @@ extern void __bug(const char *file, int line) __attribute__((noreturn));
 #else
 
 /* this just causes an oops */
-#define BUG()          (*(int *)0 = 0)
+#define BUG()          do { *(int *)0 = 0; } while (1)
 
 #endif
 
index 9073d9c6567e7c8b8065534563bee01ce83c9e37..de6c59f814a1f4511457d548dc268702a3a1b94c 100644 (file)
@@ -444,94 +444,4 @@ static inline void flush_ioremap_region(unsigned long phys, void __iomem *virt,
        dmac_inv_range(start, start + size);
 }
 
-#define __cacheid_present(val)                 (val != read_cpuid(CPUID_ID))
-#define __cacheid_type_v7(val)                 ((val & (7 << 29)) == (4 << 29))
-
-#define __cacheid_vivt_prev7(val)              ((val & (15 << 25)) != (14 << 25))
-#define __cacheid_vipt_prev7(val)              ((val & (15 << 25)) == (14 << 25))
-#define __cacheid_vipt_nonaliasing_prev7(val)  ((val & (15 << 25 | 1 << 23)) == (14 << 25))
-#define __cacheid_vipt_aliasing_prev7(val)     ((val & (15 << 25 | 1 << 23)) == (14 << 25 | 1 << 23))
-
-#define __cacheid_vivt(val)                    (__cacheid_type_v7(val) ? 0 : __cacheid_vivt_prev7(val))
-#define __cacheid_vipt(val)                    (__cacheid_type_v7(val) ? 1 : __cacheid_vipt_prev7(val))
-#define __cacheid_vipt_nonaliasing(val)                (__cacheid_type_v7(val) ? 1 : __cacheid_vipt_nonaliasing_prev7(val))
-#define __cacheid_vipt_aliasing(val)           (__cacheid_type_v7(val) ? 0 : __cacheid_vipt_aliasing_prev7(val))
-#define __cacheid_vivt_asid_tagged_instr(val)  (__cacheid_type_v7(val) ? ((val & (3 << 14)) == (1 << 14)) : 0)
-
-#if defined(CONFIG_CPU_CACHE_VIVT) && !defined(CONFIG_CPU_CACHE_VIPT)
-/*
- * VIVT caches only
- */
-#define cache_is_vivt()                        1
-#define cache_is_vipt()                        0
-#define cache_is_vipt_nonaliasing()    0
-#define cache_is_vipt_aliasing()       0
-#define icache_is_vivt_asid_tagged()   0
-
-#elif !defined(CONFIG_CPU_CACHE_VIVT) && defined(CONFIG_CPU_CACHE_VIPT)
-/*
- * VIPT caches only
- */
-#define cache_is_vivt()                        0
-#define cache_is_vipt()                        1
-#define cache_is_vipt_nonaliasing()                                    \
-       ({                                                              \
-               unsigned int __val = read_cpuid(CPUID_CACHETYPE);       \
-               __cacheid_vipt_nonaliasing(__val);                      \
-       })
-
-#define cache_is_vipt_aliasing()                                       \
-       ({                                                              \
-               unsigned int __val = read_cpuid(CPUID_CACHETYPE);       \
-               __cacheid_vipt_aliasing(__val);                         \
-       })
-
-#define icache_is_vivt_asid_tagged()                                   \
-       ({                                                              \
-               unsigned int __val = read_cpuid(CPUID_CACHETYPE);       \
-               __cacheid_vivt_asid_tagged_instr(__val);                \
-       })
-
-#else
-/*
- * VIVT or VIPT caches.  Note that this is unreliable since ARM926
- * and V6 CPUs satisfy the "(val & (15 << 25)) == (14 << 25)" test.
- * There's no way to tell from the CacheType register what type (!)
- * the cache is.
- */
-#define cache_is_vivt()                                                        \
-       ({                                                              \
-               unsigned int __val = read_cpuid(CPUID_CACHETYPE);       \
-               (!__cacheid_present(__val)) || __cacheid_vivt(__val);   \
-       })
-               
-#define cache_is_vipt()                                                        \
-       ({                                                              \
-               unsigned int __val = read_cpuid(CPUID_CACHETYPE);       \
-               __cacheid_present(__val) && __cacheid_vipt(__val);      \
-       })
-
-#define cache_is_vipt_nonaliasing()                                    \
-       ({                                                              \
-               unsigned int __val = read_cpuid(CPUID_CACHETYPE);       \
-               __cacheid_present(__val) &&                             \
-                __cacheid_vipt_nonaliasing(__val);                     \
-       })
-
-#define cache_is_vipt_aliasing()                                       \
-       ({                                                              \
-               unsigned int __val = read_cpuid(CPUID_CACHETYPE);       \
-               __cacheid_present(__val) &&                             \
-                __cacheid_vipt_aliasing(__val);                        \
-       })
-
-#define icache_is_vivt_asid_tagged()                                   \
-       ({                                                              \
-               unsigned int __val = read_cpuid(CPUID_CACHETYPE);       \
-               __cacheid_present(__val) &&                             \
-                __cacheid_vivt_asid_tagged_instr(__val);               \
-       })
-
-#endif
-
 #endif
diff --git a/arch/arm/include/asm/cachetype.h b/arch/arm/include/asm/cachetype.h
new file mode 100644 (file)
index 0000000..d3a4c2c
--- /dev/null
@@ -0,0 +1,52 @@
+#ifndef __ASM_ARM_CACHETYPE_H
+#define __ASM_ARM_CACHETYPE_H
+
+#define CACHEID_VIVT                   (1 << 0)
+#define CACHEID_VIPT_NONALIASING       (1 << 1)
+#define CACHEID_VIPT_ALIASING          (1 << 2)
+#define CACHEID_VIPT                   (CACHEID_VIPT_ALIASING|CACHEID_VIPT_NONALIASING)
+#define CACHEID_ASID_TAGGED            (1 << 3)
+
+extern unsigned int cacheid;
+
+#define cache_is_vivt()                        cacheid_is(CACHEID_VIVT)
+#define cache_is_vipt()                        cacheid_is(CACHEID_VIPT)
+#define cache_is_vipt_nonaliasing()    cacheid_is(CACHEID_VIPT_NONALIASING)
+#define cache_is_vipt_aliasing()       cacheid_is(CACHEID_VIPT_ALIASING)
+#define icache_is_vivt_asid_tagged()   cacheid_is(CACHEID_ASID_TAGGED)
+
+/*
+ * __LINUX_ARM_ARCH__ is the minimum supported CPU architecture
+ * Mask out support which will never be present on newer CPUs.
+ * - v6+ is never VIVT
+ * - v7+ VIPT never aliases
+ */
+#if __LINUX_ARM_ARCH__ >= 7
+#define __CACHEID_ARCH_MIN     (CACHEID_VIPT_NONALIASING | CACHEID_ASID_TAGGED)
+#elif __LINUX_ARM_ARCH__ >= 6
+#define        __CACHEID_ARCH_MIN      (~CACHEID_VIVT)
+#else
+#define __CACHEID_ARCH_MIN     (~0)
+#endif
+
+/*
+ * Mask out support which isn't configured
+ */
+#if defined(CONFIG_CPU_CACHE_VIVT) && !defined(CONFIG_CPU_CACHE_VIPT)
+#define __CACHEID_ALWAYS       (CACHEID_VIVT)
+#define __CACHEID_NEVER                (~CACHEID_VIVT)
+#elif !defined(CONFIG_CPU_CACHE_VIVT) && defined(CONFIG_CPU_CACHE_VIPT)
+#define __CACHEID_ALWAYS       (0)
+#define __CACHEID_NEVER                (CACHEID_VIVT)
+#else
+#define __CACHEID_ALWAYS       (0)
+#define __CACHEID_NEVER                (0)
+#endif
+
+static inline unsigned int __attribute__((pure)) cacheid_is(unsigned int mask)
+{
+       return (__CACHEID_ALWAYS & mask) |
+              (~__CACHEID_NEVER & __CACHEID_ARCH_MIN & mask & cacheid);
+}
+
+#endif
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
new file mode 100644 (file)
index 0000000..7b9d27e
--- /dev/null
@@ -0,0 +1,64 @@
+#ifndef __ASM_ARM_CPUTYPE_H
+#define __ASM_ARM_CPUTYPE_H
+
+#include <linux/stringify.h>
+
+#define CPUID_ID       0
+#define CPUID_CACHETYPE        1
+#define CPUID_TCM      2
+#define CPUID_TLBTYPE  3
+
+#ifdef CONFIG_CPU_CP15
+#define read_cpuid(reg)                                                        \
+       ({                                                              \
+               unsigned int __val;                                     \
+               asm("mrc        p15, 0, %0, c0, c0, " __stringify(reg)  \
+                   : "=r" (__val)                                      \
+                   :                                                   \
+                   : "cc");                                            \
+               __val;                                                  \
+       })
+#else
+extern unsigned int processor_id;
+#define read_cpuid(reg) (processor_id)
+#endif
+
+/*
+ * The CPU ID never changes at run time, so we might as well tell the
+ * compiler that it's constant.  Use this function to read the CPU ID
+ * rather than directly reading processor_id or read_cpuid() directly.
+ */
+static inline unsigned int __attribute_const__ read_cpuid_id(void)
+{
+       return read_cpuid(CPUID_ID);
+}
+
+static inline unsigned int __attribute_const__ read_cpuid_cachetype(void)
+{
+       return read_cpuid(CPUID_CACHETYPE);
+}
+
+/*
+ * Intel's XScale3 core supports some v6 features (supersections, L2)
+ * but advertises itself as v5 as it does not support the v6 ISA.  For
+ * this reason, we need a way to explicitly test for this type of CPU.
+ */
+#ifndef CONFIG_CPU_XSC3
+#define cpu_is_xsc3()  0
+#else
+static inline int cpu_is_xsc3(void)
+{
+       if ((read_cpuid_id() & 0xffffe000) == 0x69056000)
+               return 1;
+
+       return 0;
+}
+#endif
+
+#if !defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_CPU_XSC3)
+#define        cpu_is_xscale() 0
+#else
+#define        cpu_is_xscale() 1
+#endif
+
+#endif
index 7b95d205839588a4afa6ba9e1783fede3cb27b7a..1cb8602dd9d5f5b0a29c56b3c8ac80c35f874e85 100644 (file)
@@ -104,15 +104,14 @@ static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
  * Dummy noncoherent implementation.  We don't provide a dma_cache_sync
  * function so drivers using this API are highlighted with build warnings.
  */
-static inline void *
-dma_alloc_noncoherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp)
+static inline void *dma_alloc_noncoherent(struct device *dev, size_t size,
+               dma_addr_t *handle, gfp_t gfp)
 {
        return NULL;
 }
 
-static inline void
-dma_free_noncoherent(struct device *dev, size_t size, void *cpu_addr,
-                    dma_addr_t handle)
+static inline void dma_free_noncoherent(struct device *dev, size_t size,
+               void *cpu_addr, dma_addr_t handle)
 {
 }
 
@@ -127,8 +126,7 @@ dma_free_noncoherent(struct device *dev, size_t size, void *cpu_addr,
  * return the CPU-viewed address, and sets @handle to be the
  * device-viewed address.
  */
-extern void *
-dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp);
+extern void *dma_alloc_coherent(struct device *, size_t, dma_addr_t *, gfp_t);
 
 /**
  * dma_free_coherent - free memory allocated by dma_alloc_coherent
@@ -143,9 +141,7 @@ dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gf
  * References to memory and mappings associated with cpu_addr/handle
  * during and after this call executing are illegal.
  */
-extern void
-dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
-                 dma_addr_t handle);
+extern void dma_free_coherent(struct device *, size_t, void *, dma_addr_t);
 
 /**
  * dma_mmap_coherent - map a coherent DMA allocation into user space
@@ -159,8 +155,8 @@ dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
  * into user space.  The coherent DMA buffer must not be freed by the
  * driver until the user space mapping has been released.
  */
-int dma_mmap_coherent(struct device *dev, struct vm_area_struct *vma,
-                     void *cpu_addr, dma_addr_t handle, size_t size);
+int dma_mmap_coherent(struct device *, struct vm_area_struct *,
+               void *, dma_addr_t, size_t);
 
 
 /**
@@ -174,14 +170,94 @@ int dma_mmap_coherent(struct device *dev, struct vm_area_struct *vma,
  * return the CPU-viewed address, and sets @handle to be the
  * device-viewed address.
  */
-extern void *
-dma_alloc_writecombine(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp);
+extern void *dma_alloc_writecombine(struct device *, size_t, dma_addr_t *,
+               gfp_t);
 
 #define dma_free_writecombine(dev,size,cpu_addr,handle) \
        dma_free_coherent(dev,size,cpu_addr,handle)
 
-int dma_mmap_writecombine(struct device *dev, struct vm_area_struct *vma,
-                         void *cpu_addr, dma_addr_t handle, size_t size);
+int dma_mmap_writecombine(struct device *, struct vm_area_struct *,
+               void *, dma_addr_t, size_t);
+
+
+#ifdef CONFIG_DMABOUNCE
+/*
+ * For SA-1111, IXP425, and ADI systems  the dma-mapping functions are "magic"
+ * and utilize bounce buffers as needed to work around limited DMA windows.
+ *
+ * On the SA-1111, a bug limits DMA to only certain regions of RAM.
+ * On the IXP425, the PCI inbound window is 64MB (256MB total RAM)
+ * On some ADI engineering systems, PCI inbound window is 32MB (12MB total RAM)
+ *
+ * The following are helper functions used by the dmabounce subystem
+ *
+ */
+
+/**
+ * dmabounce_register_dev
+ *
+ * @dev: valid struct device pointer
+ * @small_buf_size: size of buffers to use with small buffer pool
+ * @large_buf_size: size of buffers to use with large buffer pool (can be 0)
+ *
+ * This function should be called by low-level platform code to register
+ * a device as requireing DMA buffer bouncing. The function will allocate
+ * appropriate DMA pools for the device.
+ *
+ */
+extern int dmabounce_register_dev(struct device *, unsigned long,
+               unsigned long);
+
+/**
+ * dmabounce_unregister_dev
+ *
+ * @dev: valid struct device pointer
+ *
+ * This function should be called by low-level platform code when device
+ * that was previously registered with dmabounce_register_dev is removed
+ * from the system.
+ *
+ */
+extern void dmabounce_unregister_dev(struct device *);
+
+/**
+ * dma_needs_bounce
+ *
+ * @dev: valid struct device pointer
+ * @dma_handle: dma_handle of unbounced buffer
+ * @size: size of region being mapped
+ *
+ * Platforms that utilize the dmabounce mechanism must implement
+ * this function.
+ *
+ * The dmabounce routines call this function whenever a dma-mapping
+ * is requested to determine whether a given buffer needs to be bounced
+ * or not. The function must return 0 if the buffer is OK for
+ * DMA access and 1 if the buffer needs to be bounced.
+ *
+ */
+extern int dma_needs_bounce(struct device*, dma_addr_t, size_t);
+
+/*
+ * The DMA API, implemented by dmabounce.c.  See below for descriptions.
+ */
+extern dma_addr_t dma_map_single(struct device *, void *, size_t,
+               enum dma_data_direction);
+extern dma_addr_t dma_map_page(struct device *, struct page *,
+               unsigned long, size_t, enum dma_data_direction);
+extern void dma_unmap_single(struct device *, dma_addr_t, size_t,
+               enum dma_data_direction);
+
+/*
+ * Private functions
+ */
+int dmabounce_sync_for_cpu(struct device *, dma_addr_t, unsigned long,
+               size_t, enum dma_data_direction);
+int dmabounce_sync_for_device(struct device *, dma_addr_t, unsigned long,
+               size_t, enum dma_data_direction);
+#else
+#define dmabounce_sync_for_cpu(dev,dma,off,sz,dir)     (1)
+#define dmabounce_sync_for_device(dev,dma,off,sz,dir)  (1)
 
 
 /**
@@ -198,19 +274,16 @@ int dma_mmap_writecombine(struct device *dev, struct vm_area_struct *vma,
  * can regain ownership by calling dma_unmap_single() or
  * dma_sync_single_for_cpu().
  */
-#ifndef CONFIG_DMABOUNCE
-static inline dma_addr_t
-dma_map_single(struct device *dev, void *cpu_addr, size_t size,
-              enum dma_data_direction dir)
+static inline dma_addr_t dma_map_single(struct device *dev, void *cpu_addr,
+               size_t size, enum dma_data_direction dir)
 {
+       BUG_ON(!valid_dma_direction(dir));
+
        if (!arch_is_coherent())
                dma_cache_maint(cpu_addr, size, dir);
 
        return virt_to_dma(dev, cpu_addr);
 }
-#else
-extern dma_addr_t dma_map_single(struct device *,void *, size_t, enum dma_data_direction);
-#endif
 
 /**
  * dma_map_page - map a portion of a page for streaming DMA
@@ -224,23 +297,25 @@ extern dma_addr_t dma_map_single(struct device *,void *, size_t, enum dma_data_d
  * or written back.
  *
  * The device owns this memory once this call has completed.  The CPU
- * can regain ownership by calling dma_unmap_page() or
- * dma_sync_single_for_cpu().
+ * can regain ownership by calling dma_unmap_page().
  */
-static inline dma_addr_t
-dma_map_page(struct device *dev, struct page *page,
-            unsigned long offset, size_t size,
-            enum dma_data_direction dir)
+static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
+            unsigned long offset, size_t size, enum dma_data_direction dir)
 {
-       return dma_map_single(dev, page_address(page) + offset, size, dir);
+       BUG_ON(!valid_dma_direction(dir));
+
+       if (!arch_is_coherent())
+               dma_cache_maint(page_address(page) + offset, size, dir);
+
+       return page_to_dma(dev, page) + offset;
 }
 
 /**
  * dma_unmap_single - unmap a single buffer previously mapped
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
  * @handle: DMA address of buffer
- * @size: size of buffer to map
- * @dir: DMA transfer direction
+ * @size: size of buffer (same as passed to dma_map_single)
+ * @dir: DMA transfer direction (same as passed to dma_map_single)
  *
  * Unmap a single streaming mode DMA translation.  The handle and size
  * must match what was provided in the previous dma_map_single() call.
@@ -249,107 +324,33 @@ dma_map_page(struct device *dev, struct page *page,
  * After this call, reads by the CPU to the buffer are guaranteed to see
  * whatever the device wrote there.
  */
-#ifndef CONFIG_DMABOUNCE
-static inline void
-dma_unmap_single(struct device *dev, dma_addr_t handle, size_t size,
-                enum dma_data_direction dir)
+static inline void dma_unmap_single(struct device *dev, dma_addr_t handle,
+               size_t size, enum dma_data_direction dir)
 {
        /* nothing to do */
 }
-#else
-extern void dma_unmap_single(struct device *, dma_addr_t, size_t, enum dma_data_direction);
-#endif
+#endif /* CONFIG_DMABOUNCE */
 
 /**
  * dma_unmap_page - unmap a buffer previously mapped through dma_map_page()
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
  * @handle: DMA address of buffer
- * @size: size of buffer to map
- * @dir: DMA transfer direction
+ * @size: size of buffer (same as passed to dma_map_page)
+ * @dir: DMA transfer direction (same as passed to dma_map_page)
  *
- * Unmap a single streaming mode DMA translation.  The handle and size
- * must match what was provided in the previous dma_map_single() call.
+ * Unmap a page streaming mode DMA translation.  The handle and size
+ * must match what was provided in the previous dma_map_page() call.
  * All other usages are undefined.
  *
  * After this call, reads by the CPU to the buffer are guaranteed to see
  * whatever the device wrote there.
  */
-static inline void
-dma_unmap_page(struct device *dev, dma_addr_t handle, size_t size,
-              enum dma_data_direction dir)
+static inline void dma_unmap_page(struct device *dev, dma_addr_t handle,
+               size_t size, enum dma_data_direction dir)
 {
        dma_unmap_single(dev, handle, size, dir);
 }
 
-/**
- * dma_map_sg - map a set of SG buffers for streaming mode DMA
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @sg: list of buffers
- * @nents: number of buffers to map
- * @dir: DMA transfer direction
- *
- * Map a set of buffers described by scatterlist in streaming
- * mode for DMA.  This is the scatter-gather version of the
- * above dma_map_single interface.  Here the scatter gather list
- * elements are each tagged with the appropriate dma address
- * and length.  They are obtained via sg_dma_{address,length}(SG).
- *
- * NOTE: An implementation may be able to use a smaller number of
- *       DMA address/length pairs than there are SG table elements.
- *       (for example via virtual mapping capabilities)
- *       The routine returns the number of addr/length pairs actually
- *       used, at most nents.
- *
- * Device ownership issues as mentioned above for dma_map_single are
- * the same here.
- */
-#ifndef CONFIG_DMABOUNCE
-static inline int
-dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
-          enum dma_data_direction dir)
-{
-       int i;
-
-       for (i = 0; i < nents; i++, sg++) {
-               char *virt;
-
-               sg->dma_address = page_to_dma(dev, sg_page(sg)) + sg->offset;
-               virt = sg_virt(sg);
-
-               if (!arch_is_coherent())
-                       dma_cache_maint(virt, sg->length, dir);
-       }
-
-       return nents;
-}
-#else
-extern int dma_map_sg(struct device *, struct scatterlist *, int, enum dma_data_direction);
-#endif
-
-/**
- * dma_unmap_sg - unmap a set of SG buffers mapped by dma_map_sg
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @sg: list of buffers
- * @nents: number of buffers to map
- * @dir: DMA transfer direction
- *
- * Unmap a set of streaming mode DMA translations.
- * Again, CPU read rules concerning calls here are the same as for
- * dma_unmap_single() above.
- */
-#ifndef CONFIG_DMABOUNCE
-static inline void
-dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
-            enum dma_data_direction dir)
-{
-
-       /* nothing to do */
-}
-#else
-extern void dma_unmap_sg(struct device *, struct scatterlist *, int, enum dma_data_direction);
-#endif
-
-
 /**
  * dma_sync_single_range_for_cpu
  * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
@@ -368,145 +369,52 @@ extern void dma_unmap_sg(struct device *, struct scatterlist *, int, enum dma_da
  * must first the perform a dma_sync_for_device, and then the
  * device again owns the buffer.
  */
-#ifndef CONFIG_DMABOUNCE
-static inline void
-dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t handle,
-                             unsigned long offset, size_t size,
-                             enum dma_data_direction dir)
+static inline void dma_sync_single_range_for_cpu(struct device *dev,
+               dma_addr_t handle, unsigned long offset, size_t size,
+               enum dma_data_direction dir)
 {
-       if (!arch_is_coherent())
-               dma_cache_maint(dma_to_virt(dev, handle) + offset, size, dir);
+       BUG_ON(!valid_dma_direction(dir));
+
+       dmabounce_sync_for_cpu(dev, handle, offset, size, dir);
 }
 
-static inline void
-dma_sync_single_range_for_device(struct device *dev, dma_addr_t handle,
-                                unsigned long offset, size_t size,
-                                enum dma_data_direction dir)
+static inline void dma_sync_single_range_for_device(struct device *dev,
+               dma_addr_t handle, unsigned long offset, size_t size,
+               enum dma_data_direction dir)
 {
+       BUG_ON(!valid_dma_direction(dir));
+
+       if (!dmabounce_sync_for_device(dev, handle, offset, size, dir))
+               return;
+
        if (!arch_is_coherent())
                dma_cache_maint(dma_to_virt(dev, handle) + offset, size, dir);
 }
-#else
-extern void dma_sync_single_range_for_cpu(struct device *, dma_addr_t, unsigned long, size_t, enum dma_data_direction);
-extern void dma_sync_single_range_for_device(struct device *, dma_addr_t, unsigned long, size_t, enum dma_data_direction);
-#endif
 
-static inline void
-dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, size_t size,
-                       enum dma_data_direction dir)
+static inline void dma_sync_single_for_cpu(struct device *dev,
+               dma_addr_t handle, size_t size, enum dma_data_direction dir)
 {
        dma_sync_single_range_for_cpu(dev, handle, 0, size, dir);
 }
 
-static inline void
-dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size,
-                          enum dma_data_direction dir)
+static inline void dma_sync_single_for_device(struct device *dev,
+               dma_addr_t handle, size_t size, enum dma_data_direction dir)
 {
        dma_sync_single_range_for_device(dev, handle, 0, size, dir);
 }
 
-
-/**
- * dma_sync_sg_for_cpu
- * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
- * @sg: list of buffers
- * @nents: number of buffers to map
- * @dir: DMA transfer direction
- *
- * Make physical memory consistent for a set of streaming
- * mode DMA translations after a transfer.
- *
- * The same as dma_sync_single_for_* but for a scatter-gather list,
- * same rules and usage.
- */
-#ifndef CONFIG_DMABOUNCE
-static inline void
-dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents,
-                   enum dma_data_direction dir)
-{
-       int i;
-
-       for (i = 0; i < nents; i++, sg++) {
-               char *virt = sg_virt(sg);
-               if (!arch_is_coherent())
-                       dma_cache_maint(virt, sg->length, dir);
-       }
-}
-
-static inline void
-dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
-                      enum dma_data_direction dir)
-{
-       int i;
-
-       for (i = 0; i < nents; i++, sg++) {
-               char *virt = sg_virt(sg);
-               if (!arch_is_coherent())
-                       dma_cache_maint(virt, sg->length, dir);
-       }
-}
-#else
-extern void dma_sync_sg_for_cpu(struct device*, struct scatterlist*, int, enum dma_data_direction);
-extern void dma_sync_sg_for_device(struct device*, struct scatterlist*, int, enum dma_data_direction);
-#endif
-
-#ifdef CONFIG_DMABOUNCE
 /*
- * For SA-1111, IXP425, and ADI systems  the dma-mapping functions are "magic"
- * and utilize bounce buffers as needed to work around limited DMA windows.
- *
- * On the SA-1111, a bug limits DMA to only certain regions of RAM.
- * On the IXP425, the PCI inbound window is 64MB (256MB total RAM)
- * On some ADI engineering systems, PCI inbound window is 32MB (12MB total RAM)
- *
- * The following are helper functions used by the dmabounce subystem
- *
- */
-
-/**
- * dmabounce_register_dev
- *
- * @dev: valid struct device pointer
- * @small_buf_size: size of buffers to use with small buffer pool
- * @large_buf_size: size of buffers to use with large buffer pool (can be 0)
- *
- * This function should be called by low-level platform code to register
- * a device as requireing DMA buffer bouncing. The function will allocate
- * appropriate DMA pools for the device.
- *
- */
-extern int dmabounce_register_dev(struct device *, unsigned long, unsigned long);
-
-/**
- * dmabounce_unregister_dev
- *
- * @dev: valid struct device pointer
- *
- * This function should be called by low-level platform code when device
- * that was previously registered with dmabounce_register_dev is removed
- * from the system.
- *
+ * The scatter list versions of the above methods.
  */
-extern void dmabounce_unregister_dev(struct device *);
+extern int dma_map_sg(struct device *, struct scatterlist *, int,
+               enum dma_data_direction);
+extern void dma_unmap_sg(struct device *, struct scatterlist *, int,
+               enum dma_data_direction);
+extern void dma_sync_sg_for_cpu(struct device *, struct scatterlist *, int,
+               enum dma_data_direction);
+extern void dma_sync_sg_for_device(struct device *, struct scatterlist *, int,
+               enum dma_data_direction);
 
-/**
- * dma_needs_bounce
- *
- * @dev: valid struct device pointer
- * @dma_handle: dma_handle of unbounced buffer
- * @size: size of region being mapped
- *
- * Platforms that utilize the dmabounce mechanism must implement
- * this function.
- *
- * The dmabounce routines call this function whenever a dma-mapping
- * is requested to determine whether a given buffer needs to be bounced
- * or not. The function must return 0 if the buffer is OK for
- * DMA access and 1 if the buffer needs to be bounced.
- *
- */
-extern int dma_needs_bounce(struct device*, dma_addr_t, size_t);
-#endif /* CONFIG_DMABOUNCE */
 
 #endif /* __KERNEL__ */
 #endif
index 6a332a9f099c2eafbf78ee5f79056a349d41a775..9ee743b95de830e4db2d364e0209d0e282a97c9c 100644 (file)
@@ -1,6 +1,124 @@
-#ifndef _ASM_FUTEX_H
-#define _ASM_FUTEX_H
+#ifndef _ASM_ARM_FUTEX_H
+#define _ASM_ARM_FUTEX_H
+
+#ifdef __KERNEL__
+
+#ifdef CONFIG_SMP
 
 #include <asm-generic/futex.h>
 
-#endif
+#else /* !SMP, we can work around lack of atomic ops by disabling preemption */
+
+#include <linux/futex.h>
+#include <linux/preempt.h>
+#include <linux/uaccess.h>
+#include <asm/errno.h>
+
+#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)     \
+       __asm__ __volatile__(                                   \
+       "1:     ldrt    %1, [%2]\n"                             \
+       "       " insn "\n"                                     \
+       "2:     strt    %0, [%2]\n"                             \
+       "       mov     %0, #0\n"                               \
+       "3:\n"                                                  \
+       "       .section __ex_table,\"a\"\n"                    \
+       "       .align  3\n"                                    \
+       "       .long   1b, 4f, 2b, 4f\n"                       \
+       "       .previous\n"                                    \
+       "       .section .fixup,\"ax\"\n"                       \
+       "4:     mov     %0, %4\n"                               \
+       "       b       3b\n"                                   \
+       "       .previous"                                      \
+       : "=&r" (ret), "=&r" (oldval)                           \
+       : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT)              \
+       : "cc", "memory")
+
+static inline int
+futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
+{
+       int op = (encoded_op >> 28) & 7;
+       int cmp = (encoded_op >> 24) & 15;
+       int oparg = (encoded_op << 8) >> 20;
+       int cmparg = (encoded_op << 20) >> 20;
+       int oldval = 0, ret;
+
+       if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
+               oparg = 1 << oparg;
+
+       if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
+               return -EFAULT;
+
+       pagefault_disable();    /* implies preempt_disable() */
+
+       switch (op) {
+       case FUTEX_OP_SET:
+               __futex_atomic_op("mov  %0, %3", ret, oldval, uaddr, oparg);
+               break;
+       case FUTEX_OP_ADD:
+               __futex_atomic_op("add  %0, %1, %3", ret, oldval, uaddr, oparg);
+               break;
+       case FUTEX_OP_OR:
+               __futex_atomic_op("orr  %0, %1, %3", ret, oldval, uaddr, oparg);
+               break;
+       case FUTEX_OP_ANDN:
+               __futex_atomic_op("and  %0, %1, %3", ret, oldval, uaddr, ~oparg);
+               break;
+       case FUTEX_OP_XOR:
+               __futex_atomic_op("eor  %0, %1, %3", ret, oldval, uaddr, oparg);
+               break;
+       default:
+               ret = -ENOSYS;
+       }
+
+       pagefault_enable();     /* subsumes preempt_enable() */
+
+       if (!ret) {
+               switch (cmp) {
+               case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
+               case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
+               case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
+               case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
+               case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
+               case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
+               default: ret = -ENOSYS;
+               }
+       }
+       return ret;
+}
+
+static inline int
+futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
+{
+       int val;
+
+       if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
+               return -EFAULT;
+
+       pagefault_disable();    /* implies preempt_disable() */
+
+       __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n"
+       "1:     ldrt    %0, [%3]\n"
+       "       teq     %0, %1\n"
+       "2:     streqt  %2, [%3]\n"
+       "3:\n"
+       "       .section __ex_table,\"a\"\n"
+       "       .align  3\n"
+       "       .long   1b, 4f, 2b, 4f\n"
+       "       .previous\n"
+       "       .section .fixup,\"ax\"\n"
+       "4:     mov     %0, %4\n"
+       "       b       3b\n"
+       "       .previous"
+       : "=&r" (val)
+       : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT)
+       : "cc", "memory");
+
+       pagefault_enable();     /* subsumes preempt_enable() */
+
+       return val;
+}
+
+#endif /* !SMP */
+
+#endif /* __KERNEL__ */
+#endif /* _ASM_ARM_FUTEX_H */
index d6786090d02caf5e4d7f0ab8b2c59121d86d46b7..a0009aa5d157686f151bbc726ae59da1ddafd4e0 100644 (file)
 #ifndef __ASSEMBLY__
 struct irqaction;
 extern void migrate_irqs(void);
+
+extern void asm_do_IRQ(unsigned int, struct pt_regs *);
+void init_IRQ(void);
+
 #endif
 
 #endif
index a5d0d99ad38705b42e24735e5835de9c33663746..bb8a19bd58225a3ce39bf39443cfd5b74b6409fd 100644 (file)
@@ -61,7 +61,6 @@ struct kprobe_ctlblk {
 void arch_remove_kprobe(struct kprobe *);
 void kretprobe_trampoline(void);
 
-int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr);
 int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
 int kprobe_exceptions_notify(struct notifier_block *self,
                             unsigned long val, void *data);
index e1ca48a9e973442aaeff9333990a457c155be394..6b884d2b0b69eaf0395040d9d440b93cf0f274d1 100644 (file)
@@ -4,8 +4,8 @@
 #ifndef _ASM_MC146818RTC_H
 #define _ASM_MC146818RTC_H
 
+#include <linux/io.h>
 #include <mach/irqs.h>
-#include <asm/io.h>
 
 #ifndef RTC_PORT
 #define RTC_PORT(x)    (0x70 + (x))
index bf7c737c92267c7de8b38c0b6347816a0bdb3328..809ff9ab853a5979c0da8fc35a30c6208533d07b 100644 (file)
 #ifndef __ASM_ARM_MEMORY_H
 #define __ASM_ARM_MEMORY_H
 
+#include <linux/compiler.h>
+#include <linux/const.h>
+#include <mach/memory.h>
+#include <asm/sizes.h>
+
 /*
  * Allow for constants defined here to be used from assembly code
  * by prepending the UL suffix only with actual C code compilation.
  */
-#ifndef __ASSEMBLY__
-#define UL(x) (x##UL)
-#else
-#define UL(x) (x)
-#endif
-
-#include <linux/compiler.h>
-#include <mach/memory.h>
-#include <asm/sizes.h>
+#define UL(x) _AC(x, UL)
 
 #ifdef CONFIG_MMU
 
-#ifndef TASK_SIZE
 /*
+ * PAGE_OFFSET - the virtual address of the start of the kernel image
  * TASK_SIZE - the maximum size of a user space task.
  * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area
  */
-#define TASK_SIZE              UL(0xbf000000)
-#define TASK_UNMAPPED_BASE     UL(0x40000000)
-#endif
+#define PAGE_OFFSET            UL(CONFIG_PAGE_OFFSET)
+#define TASK_SIZE              (UL(CONFIG_PAGE_OFFSET) - UL(0x01000000))
+#define TASK_UNMAPPED_BASE     (UL(CONFIG_PAGE_OFFSET) / 3)
 
 /*
  * The maximum size of a 26-bit user space task.
  */
 #define TASK_SIZE_26           UL(0x04000000)
 
-/*
- * Page offset: 3GB
- */
-#ifndef PAGE_OFFSET
-#define PAGE_OFFSET            UL(0xc0000000)
-#endif
-
 /*
  * The module space lives between the addresses given by TASK_SIZE
  * and PAGE_OFFSET - it must be within 32MB of the kernel text.
 
 #ifndef arch_adjust_zones
 #define arch_adjust_zones(node,size,holes) do { } while (0)
+#elif !defined(CONFIG_ZONE_DMA)
+#error "custom arch_adjust_zones() requires CONFIG_ZONE_DMA"
 #endif
 
-/*
- * Amount of memory reserved for the vmalloc() area, and minimum
- * address for vmalloc mappings.
- */
-extern unsigned long vmalloc_reserve;
-
-#define VMALLOC_MIN            (void *)(VMALLOC_END - vmalloc_reserve)
-
 /*
  * PFNs are used to describe any physical page; this means
  * PFN 0 == physical address 0.
index a301e446007f541826a33d6f45d330f365222bec..0559f37c2a27c09d11a378b2c8a2527ad2895d71 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <linux/compiler.h>
 #include <asm/cacheflush.h>
+#include <asm/cachetype.h>
 #include <asm/proc-fns.h>
 #include <asm-generic/mm_hooks.h>
 
index 8e21ef15bd743b9fb3b019bd7c9cc559c3c2ab61..ec630109a8c75aa642ebc786762f470ddbf22598 100644 (file)
@@ -319,11 +319,6 @@ static inline pte_t *pmd_page_vaddr(pmd_t pmd)
 
 #define pmd_page(pmd) virt_to_page(__va(pmd_val(pmd)))
 
-/*
- * Permanent address of a page. We never have highmem, so this is trivial.
- */
-#define pages_to_mb(x)         ((x) >> (20 - PAGE_SHIFT))
-
 /*
  * Conversion functions: convert a page and protection to a page entry,
  * and a page entry and page directory to the page they refer to.
index b415c0e85458952899b2ba910aeccfd053952584..73192618f1c2d8d0816f274a71cb626ee26d8223 100644 (file)
@@ -54,7 +54,6 @@
 #define PSR_C_BIT      0x20000000
 #define PSR_Z_BIT      0x40000000
 #define PSR_N_BIT      0x80000000
-#define PCMASK         0
 
 /*
  * Groups of PSR bits
@@ -139,11 +138,7 @@ static inline int valid_user_regs(struct pt_regs *regs)
        return 0;
 }
 
-#define pc_pointer(v) \
-       ((v) & ~PCMASK)
-
-#define instruction_pointer(regs) \
-       (pc_pointer((regs)->ARM_pc))
+#define instruction_pointer(regs)      (regs)->ARM_pc
 
 #ifdef CONFIG_SMP
 extern unsigned long profile_pc(struct pt_regs *regs);
index 7bbf105463f1adf8fd9cdaf68283cc87f3cb8c97..a65413ba121de131eca860b555cab65071b83a61 100644 (file)
@@ -209,6 +209,17 @@ struct meminfo {
        struct membank bank[NR_BANKS];
 };
 
+#define for_each_nodebank(iter,mi,no)                  \
+       for (iter = 0; iter < mi->nr_banks; iter++)     \
+               if (mi->bank[iter].node == no)
+
+#define bank_pfn_start(bank)   __phys_to_pfn((bank)->start)
+#define bank_pfn_end(bank)     __phys_to_pfn((bank)->start + (bank)->size)
+#define bank_pfn_size(bank)    ((bank)->size >> PAGE_SHIFT)
+#define bank_phys_start(bank)  (bank)->start
+#define bank_phys_end(bank)    ((bank)->start + (bank)->size)
+#define bank_phys_size(bank)   (bank)->size
+
 /*
  * Early command line parameters.
  */
index 277158191a0d2c0a5a0fc3858d6ba54a7d8539c5..00098615c6f0c35506f9628bb08dc81c39dca7a7 100644 (file)
@@ -3,8 +3,22 @@
 
 #include <asm/memory.h>
 
-#define MAX_PHYSADDR_BITS      32
-#define MAX_PHYSMEM_BITS       32
-#define SECTION_SIZE_BITS      NODE_MEM_SIZE_BITS
+/*
+ * Two definitions are required for sparsemem:
+ *
+ * MAX_PHYSMEM_BITS: The number of physical address bits required
+ *   to address the last byte of memory.
+ *
+ * SECTION_SIZE_BITS: The number of physical address bits to cover
+ *   the maximum amount of memory in a section.
+ *
+ * Eg, if you have 2 banks of up to 64MB at 0x80000000, 0x84000000,
+ * then MAX_PHYSMEM_BITS is 32, SECTION_SIZE_BITS is 26.
+ *
+ * Define these in your mach/memory.h.
+ */
+#if !defined(SECTION_SIZE_BITS) || !defined(MAX_PHYSMEM_BITS)
+#error Sparsemem is not supported on this platform
+#endif
 
 #endif
index 514af792a5980bd384dc158124df7e9036bdc926..7aad78420f18df6b9e375d2023a8ccb998d528e0 100644 (file)
 #define CR_XP  (1 << 23)       /* Extended page tables                 */
 #define CR_VE  (1 << 24)       /* Vectored interrupts                  */
 
-#define CPUID_ID       0
-#define CPUID_CACHETYPE        1
-#define CPUID_TCM      2
-#define CPUID_TLBTYPE  3
-
 /*
  * This is used to ensure the compiler did actually allocate the register we
  * asked it for some inline assembly sequences.  Apparently we can't trust
 #ifndef __ASSEMBLY__
 
 #include <linux/linkage.h>
-#include <linux/stringify.h>
 #include <linux/irqflags.h>
 
-#ifdef CONFIG_CPU_CP15
-#define read_cpuid(reg)                                                        \
-       ({                                                              \
-               unsigned int __val;                                     \
-               asm("mrc        p15, 0, %0, c0, c0, " __stringify(reg)  \
-                   : "=r" (__val)                                      \
-                   :                                                   \
-                   : "cc");                                            \
-               __val;                                                  \
-       })
-#else
-extern unsigned int processor_id;
-#define read_cpuid(reg) (processor_id)
-#endif
-
-/*
- * The CPU ID never changes at run time, so we might as well tell the
- * compiler that it's constant.  Use this function to read the CPU ID
- * rather than directly reading processor_id or read_cpuid() directly.
- */
-static inline unsigned int read_cpuid_id(void) __attribute_const__;
-
-static inline unsigned int read_cpuid_id(void)
-{
-       return read_cpuid(CPUID_ID);
-}
-
 #define __exception    __attribute__((section(".exception.text")))
 
 struct thread_info;
@@ -131,31 +98,6 @@ extern void cpu_init(void);
 void arm_machine_restart(char mode);
 extern void (*arm_pm_restart)(char str);
 
-/*
- * Intel's XScale3 core supports some v6 features (supersections, L2)
- * but advertises itself as v5 as it does not support the v6 ISA.  For
- * this reason, we need a way to explicitly test for this type of CPU.
- */
-#ifndef CONFIG_CPU_XSC3
-#define cpu_is_xsc3()  0
-#else
-static inline int cpu_is_xsc3(void)
-{
-       extern unsigned int processor_id;
-
-       if ((processor_id & 0xffffe000) == 0x69056000)
-               return 1;
-
-       return 0;
-}
-#endif
-
-#if !defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_CPU_XSC3)
-#define        cpu_is_xscale() 0
-#else
-#define        cpu_is_xscale() 1
-#endif
-
 #define UDBG_UNDEFINED (1 << 0)
 #define UDBG_SYSCALL   (1 << 1)
 #define UDBG_BADABORT  (1 << 2)
index e56fa48e4ae7843436021e19fb067233c67e6a02..68b9ec82a37ffa1e77e2836e955663ff83b675fc 100644 (file)
@@ -98,7 +98,7 @@ static inline struct thread_info *current_thread_info(void)
 }
 
 #define thread_saved_pc(tsk)   \
-       ((unsigned long)(pc_pointer(task_thread_info(tsk)->cpu_context.pc)))
+       ((unsigned long)(task_thread_info(tsk)->cpu_context.pc))
 #define thread_saved_fp(tsk)   \
        ((unsigned long)(task_thread_info(tsk)->cpu_context.fp))
 
index d0f51ff900b5d029e278b9b9480c6b90cd6226b7..e98ec60b34002b4f2457982c8312600efd7216be 100644 (file)
@@ -225,7 +225,7 @@ do {                                                                        \
 
 #define __get_user_asm_byte(x,addr,err)                                \
        __asm__ __volatile__(                                   \
-       "1:     ldrbt   %1,[%2],#0\n"                           \
+       "1:     ldrbt   %1,[%2]\n"                              \
        "2:\n"                                                  \
        "       .section .fixup,\"ax\"\n"                       \
        "       .align  2\n"                                    \
@@ -261,7 +261,7 @@ do {                                                                        \
 
 #define __get_user_asm_word(x,addr,err)                                \
        __asm__ __volatile__(                                   \
-       "1:     ldrt    %1,[%2],#0\n"                           \
+       "1:     ldrt    %1,[%2]\n"                              \
        "2:\n"                                                  \
        "       .section .fixup,\"ax\"\n"                       \
        "       .align  2\n"                                    \
@@ -306,7 +306,7 @@ do {                                                                        \
 
 #define __put_user_asm_byte(x,__pu_addr,err)                   \
        __asm__ __volatile__(                                   \
-       "1:     strbt   %1,[%2],#0\n"                           \
+       "1:     strbt   %1,[%2]\n"                              \
        "2:\n"                                                  \
        "       .section .fixup,\"ax\"\n"                       \
        "       .align  2\n"                                    \
@@ -339,7 +339,7 @@ do {                                                                        \
 
 #define __put_user_asm_word(x,__pu_addr,err)                   \
        __asm__ __volatile__(                                   \
-       "1:     strt    %1,[%2],#0\n"                           \
+       "1:     strt    %1,[%2]\n"                              \
        "2:\n"                                                  \
        "       .section .fixup,\"ax\"\n"                       \
        "       .align  2\n"                                    \
@@ -365,7 +365,7 @@ do {                                                                        \
 #define __put_user_asm_dword(x,__pu_addr,err)                  \
        __asm__ __volatile__(                                   \
        "1:     strt    " __reg_oper1 ", [%1], #4\n"            \
-       "2:     strt    " __reg_oper0 ", [%1], #0\n"            \
+       "2:     strt    " __reg_oper0 ", [%1]\n"                \
        "3:\n"                                                  \
        "       .section .fixup,\"ax\"\n"                       \
        "       .align  2\n"                                    \
index 6a3cd2a2f6700d386a5cc82921eb9e6b6f76258e..250a4dd00630f135c09e3fb474092ed4b9ba1b04 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef ASMARM_VGA_H
 #define ASMARM_VGA_H
 
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #define VGA_MAP_MEM(x,s)       (PCIMEM_BASE + (x))
 
index cc7b246e9652033d9593006f2821f99aad102fe3..2357b1cf1cf9381c0e368ddd92725b749ae7f355 100644 (file)
 #include <linux/delay.h>
 #include <linux/in6.h>
 #include <linux/syscalls.h>
+#include <linux/uaccess.h>
+#include <linux/io.h>
 
 #include <asm/checksum.h>
-#include <asm/io.h>
 #include <asm/system.h>
-#include <asm/uaccess.h>
 #include <asm/ftrace.h>
 
 /*
index e5747547b44c1cfc8213aed6f8c0c72f149b0bfd..17a59b6e521f84ec983ab90918952409389d5eaf 100644 (file)
@@ -10,8 +10,8 @@
 #include <linux/pci.h>
 #include <linux/slab.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/mach/pci.h>
 
index 3b6a1c293ee49cb03825a860a5edc0866133cf17..99995c2b2312551917f19492194f0b2966425425 100644 (file)
@@ -15,9 +15,9 @@
 #include <linux/signal.h>
 #include <linux/sched.h>
 #include <linux/init.h>
+#include <linux/io.h>
 #include <mach/ep93xx-regs.h>
 #include <asm/thread_notify.h>
-#include <asm/io.h>
 
 struct crunch_state *crunch_owner;
 
index 9550ff0ddde4f57393a3ccf1350c032e5115db2b..f53c582905430af58b91341e952e1fe180a022c8 100644 (file)
 ENTRY(printhex8)
                mov     r1, #8
                b       printhex
+ENDPROC(printhex8)
 
 ENTRY(printhex4)
                mov     r1, #4
                b       printhex
+ENDPROC(printhex4)
 
 ENTRY(printhex2)
                mov     r1, #2
@@ -110,6 +112,7 @@ printhex:   adr     r2, hexbuf
                bne     1b
                mov     r0, r2
                b       printascii
+ENDPROC(printhex2)
 
                .ltorg
 
@@ -127,11 +130,13 @@ ENTRY(printascii)
                teqne   r1, #0
                bne     1b
                mov     pc, lr
+ENDPROC(printascii)
 
 ENTRY(printch)
                addruart r3
                mov     r1, r0
                mov     r0, #0
                b       1b
+ENDPROC(printch)
 
 hexbuf:                .space 16
index 2f080a35a2d9240181a6edd745394e0942a128e2..4a3a50495c60778c813acbf192b1fa16475a995d 100644 (file)
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/dma-mapping.h>
+#include <linux/io.h>
 
 #include <asm/dma.h>
-#include <asm/io.h>
-
 #include <asm/mach/dma.h>
 
 #define ISA_DMA_MODE_READ      0x44
index 617e509d60dfd1bdc148467d473e3c8596b2bb89..77b047475539b9683ef9671caf738adf8ad22a9a 100644 (file)
 __pabt_invalid:
        inv_entry BAD_PREFETCH
        b       common_invalid
+ENDPROC(__pabt_invalid)
 
 __dabt_invalid:
        inv_entry BAD_DATA
        b       common_invalid
+ENDPROC(__dabt_invalid)
 
 __irq_invalid:
        inv_entry BAD_IRQ
        b       common_invalid
+ENDPROC(__irq_invalid)
 
 __und_invalid:
        inv_entry BAD_UNDEFINSTR
@@ -107,6 +110,7 @@ common_invalid:
 
        mov     r0, sp
        b       bad_mode
+ENDPROC(__und_invalid)
 
 /*
  * SVC mode handlers
@@ -192,6 +196,7 @@ __dabt_svc:
        ldr     r0, [sp, #S_PSR]
        msr     spsr_cxsf, r0
        ldmia   sp, {r0 - pc}^                  @ load r0 - pc, cpsr
+ENDPROC(__dabt_svc)
 
        .align  5
 __irq_svc:
@@ -223,6 +228,7 @@ __irq_svc:
        bleq    trace_hardirqs_on
 #endif
        ldmia   sp, {r0 - pc}^                  @ load r0 - pc, cpsr
+ENDPROC(__irq_svc)
 
        .ltorg
 
@@ -272,6 +278,7 @@ __und_svc:
        ldr     lr, [sp, #S_PSR]                @ Get SVC cpsr
        msr     spsr_cxsf, lr
        ldmia   sp, {r0 - pc}^                  @ Restore SVC registers
+ENDPROC(__und_svc)
 
        .align  5
 __pabt_svc:
@@ -313,6 +320,7 @@ __pabt_svc:
        ldr     r0, [sp, #S_PSR]
        msr     spsr_cxsf, r0
        ldmia   sp, {r0 - pc}^                  @ load r0 - pc, cpsr
+ENDPROC(__pabt_svc)
 
        .align  5
 .LCcralign:
@@ -412,6 +420,7 @@ __dabt_usr:
        mov     r2, sp
        adr     lr, ret_from_exception
        b       do_DataAbort
+ENDPROC(__dabt_usr)
 
        .align  5
 __irq_usr:
@@ -441,6 +450,7 @@ __irq_usr:
 
        mov     why, #0
        b       ret_to_user
+ENDPROC(__irq_usr)
 
        .ltorg
 
@@ -474,6 +484,7 @@ __und_usr:
 #else
        b       __und_usr_unknown
 #endif
+ENDPROC(__und_usr)
 
        @
        @ fallthrough to call_fpe
@@ -642,6 +653,7 @@ __und_usr_unknown:
        mov     r0, sp
        adr     lr, ret_from_exception
        b       do_undefinstr
+ENDPROC(__und_usr_unknown)
 
        .align  5
 __pabt_usr:
@@ -666,6 +678,8 @@ ENTRY(ret_from_exception)
        get_thread_info tsk
        mov     why, #0
        b       ret_to_user
+ENDPROC(__pabt_usr)
+ENDPROC(ret_from_exception)
 
 /*
  * Register switch for ARMv3 and ARMv4 processors
@@ -702,6 +716,7 @@ ENTRY(__switch_to)
        bl      atomic_notifier_call_chain
        mov     r0, r5
        ldmia   r4, {r4 - sl, fp, sp, pc}       @ Load all regs saved previously
+ENDPROC(__switch_to)
 
        __INIT
 
@@ -1029,6 +1044,7 @@ vector_\name:
        mov     r0, sp
        ldr     lr, [pc, lr, lsl #2]
        movs    pc, lr                  @ branch to handler in SVC mode
+ENDPROC(vector_\name)
        .endm
 
        .globl  __stubs_start
index 060d7e2e9f6408c1aaf647af4eba7b5858a8aa31..3aa14dcc5babd0a1cec85996fa9bc271e4eae51a 100644 (file)
@@ -77,6 +77,7 @@ no_work_pending:
        mov     r0, r0
        add     sp, sp, #S_FRAME_SIZE - S_PC
        movs    pc, lr                          @ return & move spsr_svc into cpsr
+ENDPROC(ret_to_user)
 
 /*
  * This is how we return from a fork.
@@ -92,7 +93,7 @@ ENTRY(ret_from_fork)
        mov     r0, #1                          @ trace exit [IP = 1]
        bl      syscall_trace
        b       ret_slow_syscall
-       
+ENDPROC(ret_from_fork)
 
        .equ NR_syscalls,0
 #define CALL(x) .equ NR_syscalls,NR_syscalls+1
@@ -269,6 +270,7 @@ ENTRY(vector_swi)
        eor     r0, scno, #__NR_SYSCALL_BASE    @ put OS number back
        bcs     arm_syscall     
        b       sys_ni_syscall                  @ not private func
+ENDPROC(vector_swi)
 
        /*
         * This is the really slow path.  We're going to be doing
@@ -326,7 +328,6 @@ ENTRY(sys_call_table)
  */
 @ r0 = syscall number
 @ r8 = syscall table
-               .type   sys_syscall, #function
 sys_syscall:
                bic     scno, r0, #__NR_OABI_SYSCALL_BASE
                cmp     scno, #__NR_syscall - __NR_SYSCALL_BASE
@@ -338,53 +339,65 @@ sys_syscall:
                movlo   r3, r4
                ldrlo   pc, [tbl, scno, lsl #2]
                b       sys_ni_syscall
+ENDPROC(sys_syscall)
 
 sys_fork_wrapper:
                add     r0, sp, #S_OFF
                b       sys_fork
+ENDPROC(sys_fork_wrapper)
 
 sys_vfork_wrapper:
                add     r0, sp, #S_OFF
                b       sys_vfork
+ENDPROC(sys_vfork_wrapper)
 
 sys_execve_wrapper:
                add     r3, sp, #S_OFF
                b       sys_execve
+ENDPROC(sys_execve_wrapper)
 
 sys_clone_wrapper:
                add     ip, sp, #S_OFF
                str     ip, [sp, #4]
                b       sys_clone
+ENDPROC(sys_clone_wrapper)
 
 sys_sigsuspend_wrapper:
                add     r3, sp, #S_OFF
                b       sys_sigsuspend
+ENDPROC(sys_sigsuspend_wrapper)
 
 sys_rt_sigsuspend_wrapper:
                add     r2, sp, #S_OFF
                b       sys_rt_sigsuspend
+ENDPROC(sys_rt_sigsuspend_wrapper)
 
 sys_sigreturn_wrapper:
                add     r0, sp, #S_OFF
                b       sys_sigreturn
+ENDPROC(sys_sigreturn_wrapper)
 
 sys_rt_sigreturn_wrapper:
                add     r0, sp, #S_OFF
                b       sys_rt_sigreturn
+ENDPROC(sys_rt_sigreturn_wrapper)
 
 sys_sigaltstack_wrapper:
                ldr     r2, [sp, #S_OFF + S_SP]
                b       do_sigaltstack
+ENDPROC(sys_sigaltstack_wrapper)
 
 sys_statfs64_wrapper:
                teq     r1, #88
                moveq   r1, #84
                b       sys_statfs64
+ENDPROC(sys_statfs64_wrapper)
 
 sys_fstatfs64_wrapper:
                teq     r1, #88
                moveq   r1, #84
                b       sys_fstatfs64
+ENDPROC(sys_fstatfs64_wrapper)
 
 /*
  * Note: off_4k (r5) is always units of 4K.  If we can't do the requested
@@ -402,11 +415,14 @@ sys_mmap2:
                str     r5, [sp, #4]
                b       do_mmap2
 #endif
+ENDPROC(sys_mmap2)
 
 ENTRY(pabort_ifar)
                mrc     p15, 0, r0, cr6, cr0, 2
 ENTRY(pabort_noifar)
                mov     pc, lr
+ENDPROC(pabort_ifar)
+ENDPROC(pabort_noifar)
 
 #ifdef CONFIG_OABI_COMPAT
 
@@ -417,26 +433,31 @@ ENTRY(pabort_noifar)
 sys_oabi_pread64:
                stmia   sp, {r3, r4}
                b       sys_pread64
+ENDPROC(sys_oabi_pread64)
 
 sys_oabi_pwrite64:
                stmia   sp, {r3, r4}
                b       sys_pwrite64
+ENDPROC(sys_oabi_pwrite64)
 
 sys_oabi_truncate64:
                mov     r3, r2
                mov     r2, r1
                b       sys_truncate64
+ENDPROC(sys_oabi_truncate64)
 
 sys_oabi_ftruncate64:
                mov     r3, r2
                mov     r2, r1
                b       sys_ftruncate64
+ENDPROC(sys_oabi_ftruncate64)
 
 sys_oabi_readahead:
                str     r3, [sp]
                mov     r3, r2
                mov     r2, r1
                b       sys_readahead
+ENDPROC(sys_oabi_readahead)
 
 /*
  * Let's declare a second syscall table for old ABI binaries
index e8e90346f11c10702857a04adeb4fd2f935e1336..36f81d967979c0ce62b78912e7d6e3874d9fc06d 100644 (file)
@@ -45,7 +45,6 @@
 #include <asm/fiq.h>
 #include <asm/irq.h>
 #include <asm/system.h>
-#include <asm/uaccess.h>
 
 static unsigned long no_fiq_insn;
 
index 1c3c6ea5f9e7e3bb7b7ce5a880a039489200d200..bde52df1c668e994c3d8c4d6c53ff01f01cacad3 100644 (file)
@@ -36,7 +36,6 @@ __switch_data:
  *  r2  = atags pointer
  *  r9  = processor ID
  */
-       .type   __mmap_switched, %function
 __mmap_switched:
        adr     r3, __switch_data + 4
 
@@ -59,6 +58,7 @@ __mmap_switched:
        bic     r4, r0, #CR_A                   @ Clear 'A' bit
        stmia   r7, {r0, r4}                    @ Save control register values
        b       start_kernel
+ENDPROC(__mmap_switched)
 
 /*
  * Exception handling.  Something went wrong and we can't proceed.  We
@@ -69,8 +69,6 @@ __mmap_switched:
  * and hope for the best (useful if bootloader fails to pass a proper
  * machine ID for example).
  */
-
-       .type   __error_p, %function
 __error_p:
 #ifdef CONFIG_DEBUG_LL
        adr     r0, str_p1
@@ -84,8 +82,8 @@ str_p1:       .asciz  "\nError: unrecognized/unsupported processor variant (0x"
 str_p2:        .asciz  ").\n"
        .align
 #endif
+ENDPROC(__error_p)
 
-       .type   __error_a, %function
 __error_a:
 #ifdef CONFIG_DEBUG_LL
        mov     r4, r1                          @ preserve machine ID
@@ -115,13 +113,14 @@ __error_a:
        adr     r0, str_a3
        bl      printascii
        b       __error
+ENDPROC(__error_a)
+
 str_a1:        .asciz  "\nError: unrecognized/unsupported machine ID (r1 = 0x"
 str_a2:        .asciz  ").\n\nAvailable machine support:\n\nID (hex)\tNAME\n"
 str_a3:        .asciz  "\nPlease check your kernel config and/or bootloader.\n"
        .align
 #endif
 
-       .type   __error, %function
 __error:
 #ifdef CONFIG_ARCH_RPC
 /*
@@ -138,6 +137,7 @@ __error:
 #endif
 1:     mov     r0, r0
        b       1b
+ENDPROC(__error)
 
 
 /*
@@ -153,7 +153,6 @@ __error:
  *     r5 = proc_info pointer in physical address space
  *     r9 = cpuid (preserved)
  */
-       .type   __lookup_processor_type, %function
 __lookup_processor_type:
        adr     r3, 3f
        ldmda   r3, {r5 - r7}
@@ -169,6 +168,7 @@ __lookup_processor_type:
        blo     1b
        mov     r5, #0                          @ unknown processor
 2:     mov     pc, lr
+ENDPROC(__lookup_processor_type)
 
 /*
  * This provides a C-API version of the above function.
@@ -179,6 +179,7 @@ ENTRY(lookup_processor_type)
        bl      __lookup_processor_type
        mov     r0, r5
        ldmfd   sp!, {r4 - r7, r9, pc}
+ENDPROC(lookup_processor_type)
 
 /*
  * Look in <asm/procinfo.h> and arch/arm/kernel/arch.[ch] for
@@ -201,7 +202,6 @@ ENTRY(lookup_processor_type)
  *  r3, r4, r6 corrupted
  *  r5 = mach_info pointer in physical address space
  */
-       .type   __lookup_machine_type, %function
 __lookup_machine_type:
        adr     r3, 3b
        ldmia   r3, {r4, r5, r6}
@@ -216,6 +216,7 @@ __lookup_machine_type:
        blo     1b
        mov     r5, #0                          @ unknown machine
 2:     mov     pc, lr
+ENDPROC(__lookup_machine_type)
 
 /*
  * This provides a C-API version of the above function.
@@ -226,6 +227,7 @@ ENTRY(lookup_machine_type)
        bl      __lookup_machine_type
        mov     r0, r5
        ldmfd   sp!, {r4 - r6, pc}
+ENDPROC(lookup_machine_type)
 
 /* Determine validity of the r2 atags pointer.  The heuristic requires
  * that the pointer be aligned, in the first 16k of physical RAM and
@@ -239,8 +241,6 @@ ENTRY(lookup_machine_type)
  *  r2 either valid atags pointer, or zero
  *  r5, r6 corrupted
  */
-
-       .type   __vet_atags, %function
 __vet_atags:
        tst     r2, #0x3                        @ aligned?
        bne     1f
@@ -257,3 +257,4 @@ __vet_atags:
 
 1:     mov     r2, #0
        mov     pc, lr
+ENDPROC(__vet_atags)
index 27329bd32037a714070535ae1677e30271881ee1..cc87e1765ed24183f9e77d6ce2172d3828e5996b 100644 (file)
@@ -33,7 +33,6 @@
  *
  */
        .section ".text.head", "ax"
-       .type   stext, %function
 ENTRY(stext)
        msr     cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode
                                                @ and irqs disabled
@@ -53,11 +52,11 @@ ENTRY(stext)
                                                @ the initialization is done
        adr     lr, __after_proc_init           @ return (PIC) address
        add     pc, r10, #PROCINFO_INITFUNC
+ENDPROC(stext)
 
 /*
  * Set the Control Register and Read the process ID.
  */
-       .type   __after_proc_init, %function
 __after_proc_init:
 #ifdef CONFIG_CPU_CP15
        mrc     p15, 0, r0, c1, c0, 0           @ read control reg
@@ -85,6 +84,7 @@ __after_proc_init:
 
        mov     pc, r13                         @ clear the BSS and jump
                                                @ to start_kernel
+ENDPROC(__after_proc_init)
        .ltorg
 
 #include "head-common.S"
index bff4c6e90dd5458f1f71d2d70a5703ea394017c5..21e17dc94cb56757f6f25f05b61ba4c2d6e095ca 100644 (file)
@@ -75,7 +75,6 @@
  * circumstances, zImage) is for.
  */
        .section ".text.head", "ax"
-       .type   stext, %function
 ENTRY(stext)
        msr     cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode
                                                @ and irqs disabled
@@ -100,9 +99,9 @@ ENTRY(stext)
                                                @ mmu has been enabled
        adr     lr, __enable_mmu                @ return (PIC) address
        add     pc, r10, #PROCINFO_INITFUNC
+ENDPROC(stext)
 
 #if defined(CONFIG_SMP)
-       .type   secondary_startup, #function
 ENTRY(secondary_startup)
        /*
         * Common entry point for secondary CPUs.
@@ -128,6 +127,7 @@ ENTRY(secondary_startup)
        adr     lr, __enable_mmu                @ return address
        add     pc, r10, #PROCINFO_INITFUNC     @ initialise processor
                                                @ (return control reg)
+ENDPROC(secondary_startup)
 
        /*
         * r6  = &secondary_data
@@ -136,6 +136,7 @@ ENTRY(__secondary_switched)
        ldr     sp, [r7, #4]                    @ get secondary_data.stack
        mov     fp, #0
        b       secondary_start_kernel
+ENDPROC(__secondary_switched)
 
        .type   __secondary_data, %object
 __secondary_data:
@@ -151,7 +152,6 @@ __secondary_data:
  * this is just loading the page table pointer and domain access
  * registers.
  */
-       .type   __enable_mmu, %function
 __enable_mmu:
 #ifdef CONFIG_ALIGNMENT_TRAP
        orr     r0, r0, #CR_A
@@ -174,6 +174,7 @@ __enable_mmu:
        mcr     p15, 0, r5, c3, c0, 0           @ load domain access register
        mcr     p15, 0, r4, c2, c0, 0           @ load page table pointer
        b       __turn_mmu_on
+ENDPROC(__enable_mmu)
 
 /*
  * Enable the MMU.  This completely changes the structure of the visible
@@ -187,7 +188,6 @@ __enable_mmu:
  * other registers depend on the function called upon completion
  */
        .align  5
-       .type   __turn_mmu_on, %function
 __turn_mmu_on:
        mov     r0, r0
        mcr     p15, 0, r0, c1, c0, 0           @ write control reg
@@ -195,7 +195,7 @@ __turn_mmu_on:
        mov     r3, r3
        mov     r3, r3
        mov     pc, r13
-
+ENDPROC(__turn_mmu_on)
 
 
 /*
@@ -211,7 +211,6 @@ __turn_mmu_on:
  *  r0, r3, r6, r7 corrupted
  *  r4 = physical page table address
  */
-       .type   __create_page_tables, %function
 __create_page_tables:
        pgtbl   r4                              @ page table address
 
@@ -325,6 +324,7 @@ __create_page_tables:
 #endif
 #endif
        mov     pc, lr
+ENDPROC(__create_page_tables)
        .ltorg
 
 #include "head-common.S"
index 8b8c9d38a7611daaad9ddd2af7de18ec2176e374..0bbf806253954c1ac42c9f8fd634f1b7e5cfe63c 100644 (file)
@@ -8,8 +8,8 @@
 #include <linux/init.h>
 #include <linux/init_task.h>
 #include <linux/mqueue.h>
+#include <linux/uaccess.h>
 
-#include <asm/uaccess.h>
 #include <asm/pgtable.h>
 
 static struct fs_struct init_fs = INIT_FS;
index 1f6822dfae7404fd57218537f1d67e1252351ffe..f4470307edb8f4a9a3327e700d620de1f9124616 100644 (file)
@@ -1,7 +1,6 @@
 #include <linux/module.h>
 #include <linux/types.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 /*
  * Copy data from IO memory space to "real" memory space.
index b4565bb133c1ebeadd6c3a8d3b3a1afdd9015a7e..da1f94906a4e2a35881bde99510760180bdba9e2 100644 (file)
@@ -488,7 +488,7 @@ static void __kprobes simulate_ldm1stm1(struct kprobe *p, struct pt_regs *regs)
 
        if (!ubit)
                addr -= reg_count;
-       addr += (!pbit ^ !ubit);
+       addr += (!pbit == !ubit);
 
        reg_bit_vector = insn & 0xffff;
        while (reg_bit_vector) {
@@ -503,7 +503,7 @@ static void __kprobes simulate_ldm1stm1(struct kprobe *p, struct pt_regs *regs)
        if (wbit) {
                if (!ubit)
                        addr -= reg_count;
-               addr -= (!pbit ^ !ubit);
+               addr -= (!pbit == !ubit);
                regs->uregs[rn] = (long)addr;
        }
 }
index d28513f14d05906cec08a849128f76edaaf5ad16..3f9abe0e9aff7e124fd399ce4fd9c4a47380c044 100644 (file)
@@ -200,9 +200,12 @@ void __kprobes kprobe_handler(struct pt_regs *regs)
        }
 }
 
-int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr)
+static int __kprobes kprobe_trap_handler(struct pt_regs *regs, unsigned int instr)
 {
+       unsigned long flags;
+       local_irq_save(flags);
        kprobe_handler(regs);
+       local_irq_restore(flags);
        return 0;
 }
 
index fae5beb3c3d607086c4cffa48b34e825bc9a5664..440dc62cdc3a137ef0cdf554918c7a348d63511d 100644 (file)
@@ -6,10 +6,10 @@
 #include <linux/kexec.h>
 #include <linux/delay.h>
 #include <linux/reboot.h>
+#include <linux/io.h>
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
 #include <asm/mmu_context.h>
-#include <asm/io.h>
 #include <asm/cacheflush.h>
 #include <asm/mach-types.h>
 
index 3fd88233706413d09198bb6a69780415a9b5eb5e..d3ea6fa895212fae625b2c5982ededbd896340fc 100644 (file)
 #include <linux/pm.h>
 #include <linux/tick.h>
 #include <linux/utsname.h>
+#include <linux/uaccess.h>
 
 #include <asm/leds.h>
 #include <asm/processor.h>
 #include <asm/system.h>
 #include <asm/thread_notify.h>
-#include <asm/uaccess.h>
 #include <asm/mach/time.h>
 
 static const char *processor_modes[] = {
@@ -267,35 +267,6 @@ void show_regs(struct pt_regs * regs)
        __backtrace();
 }
 
-void show_fpregs(struct user_fp *regs)
-{
-       int i;
-
-       for (i = 0; i < 8; i++) {
-               unsigned long *p;
-               char type;
-
-               p = (unsigned long *)(regs->fpregs + i);
-
-               switch (regs->ftype[i]) {
-                       case 1: type = 'f'; break;
-                       case 2: type = 'd'; break;
-                       case 3: type = 'e'; break;
-                       default: type = '?'; break;
-               }
-               if (regs->init_flag)
-                       type = '?';
-
-               printk("  f%d(%c): %08lx %08lx %08lx%c",
-                       i, type, p[0], p[1], p[2], i & 1 ? '\n' : ' ');
-       }
-                       
-
-       printk("FPSR: %08lx FPCR: %08lx\n",
-               (unsigned long)regs->fpsr,
-               (unsigned long)regs->fpcr);
-}
-
 /*
  * Free current thread data structures etc..
  */
@@ -414,7 +385,7 @@ unsigned long get_wchan(struct task_struct *p)
        do {
                if (fp < stack_start || fp > stack_end)
                        return 0;
-               lr = pc_pointer (((unsigned long *)fp)[-1]);
+               lr = ((unsigned long *)fp)[-1];
                if (!in_sched_functions(lr))
                        return lr;
                fp = *(unsigned long *) (fp - 12);
index 4b05dc5c1023666ce6efaa1c684776de98587875..df653ea59250a3152a5e16f4634d10e93251a9dd 100644 (file)
@@ -18,8 +18,8 @@
 #include <linux/security.h>
 #include <linux/init.h>
 #include <linux/signal.h>
+#include <linux/uaccess.h>
 
-#include <asm/uaccess.h>
 #include <asm/pgtable.h>
 #include <asm/system.h>
 #include <asm/traps.h>
@@ -126,7 +126,7 @@ ptrace_getrn(struct task_struct *child, unsigned long insn)
 
        val = get_user_reg(child, reg);
        if (reg == 15)
-               val = pc_pointer(val + 8);
+               val += 8;
 
        return val;
 }
@@ -278,8 +278,7 @@ get_branch_address(struct task_struct *child, unsigned long pc, unsigned long in
                                else
                                        base -= aluop2;
                        }
-                       if (read_u32(child, base, &alt) == 0)
-                               alt = pc_pointer(alt);
+                       read_u32(child, base, &alt);
                }
                break;
 
@@ -305,8 +304,7 @@ get_branch_address(struct task_struct *child, unsigned long pc, unsigned long in
 
                        base = ptrace_getrn(child, insn);
 
-                       if (read_u32(child, base + nr_regs, &alt) == 0)
-                               alt = pc_pointer(alt);
+                       read_u32(child, base + nr_regs, &alt);
                        break;
                }
                break;
index 2ca7038b67a7bf105df3529491e0f9858220ca76..1f1eecca7f55a4ef2ff3b502c360309da00d3010 100644 (file)
 #include <linux/fs.h>
 
 #include <asm/cpu.h>
+#include <asm/cputype.h>
 #include <asm/elf.h>
 #include <asm/procinfo.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/cacheflush.h>
+#include <asm/cachetype.h>
 #include <asm/tlbflush.h>
 
 #include <asm/mach/arch.h>
@@ -59,13 +61,14 @@ __setup("fpe=", fpe_setup);
 
 extern void paging_init(struct meminfo *, struct machine_desc *desc);
 extern void reboot_setup(char *str);
-extern int root_mountflags;
-extern void _stext, _text, _etext, __data_start, _edata, _end;
+extern void _text, _etext, __data_start, _edata, _end;
 
 unsigned int processor_id;
 EXPORT_SYMBOL(processor_id);
 unsigned int __machine_arch_type;
 EXPORT_SYMBOL(__machine_arch_type);
+unsigned int cacheid;
+EXPORT_SYMBOL(cacheid);
 
 unsigned int __atags_pointer __initdata;
 
@@ -81,8 +84,6 @@ EXPORT_SYMBOL(system_serial_high);
 unsigned int elf_hwcap;
 EXPORT_SYMBOL(elf_hwcap);
 
-unsigned long __initdata vmalloc_reserve = 128 << 20;
-
 
 #ifdef MULTI_CPU
 struct processor processor;
@@ -111,9 +112,6 @@ static struct stack stacks[NR_CPUS];
 char elf_platform[ELF_PLATFORM_SIZE];
 EXPORT_SYMBOL(elf_platform);
 
-unsigned long phys_initrd_start __initdata = 0;
-unsigned long phys_initrd_size __initdata = 0;
-
 static struct meminfo meminfo __initdata = { 0, };
 static const char *cpu_name;
 static const char *machine_name;
@@ -178,63 +176,6 @@ static struct resource io_res[] = {
 #define lp1 io_res[1]
 #define lp2 io_res[2]
 
-static const char *cache_types[16] = {
-       "write-through",
-       "write-back",
-       "write-back",
-       "undefined 3",
-       "undefined 4",
-       "undefined 5",
-       "write-back",
-       "write-back",
-       "undefined 8",
-       "undefined 9",
-       "undefined 10",
-       "undefined 11",
-       "undefined 12",
-       "undefined 13",
-       "write-back",
-       "undefined 15",
-};
-
-static const char *cache_clean[16] = {
-       "not required",
-       "read-block",
-       "cp15 c7 ops",
-       "undefined 3",
-       "undefined 4",
-       "undefined 5",
-       "cp15 c7 ops",
-       "cp15 c7 ops",
-       "undefined 8",
-       "undefined 9",
-       "undefined 10",
-       "undefined 11",
-       "undefined 12",
-       "undefined 13",
-       "cp15 c7 ops",
-       "undefined 15",
-};
-
-static const char *cache_lockdown[16] = {
-       "not supported",
-       "not supported",
-       "not supported",
-       "undefined 3",
-       "undefined 4",
-       "undefined 5",
-       "format A",
-       "format B",
-       "undefined 8",
-       "undefined 9",
-       "undefined 10",
-       "undefined 11",
-       "undefined 12",
-       "undefined 13",
-       "format C",
-       "undefined 15",
-};
-
 static const char *proc_arch[] = {
        "undefined/unknown",
        "3",
@@ -255,61 +196,19 @@ static const char *proc_arch[] = {
        "?(17)",
 };
 
-#define CACHE_TYPE(x)  (((x) >> 25) & 15)
-#define CACHE_S(x)     ((x) & (1 << 24))
-#define CACHE_DSIZE(x) (((x) >> 12) & 4095)    /* only if S=1 */
-#define CACHE_ISIZE(x) ((x) & 4095)
-
-#define CACHE_SIZE(y)  (((y) >> 6) & 7)
-#define CACHE_ASSOC(y) (((y) >> 3) & 7)
-#define CACHE_M(y)     ((y) & (1 << 2))
-#define CACHE_LINE(y)  ((y) & 3)
-
-static inline void dump_cache(const char *prefix, int cpu, unsigned int cache)
-{
-       unsigned int mult = 2 + (CACHE_M(cache) ? 1 : 0);
-
-       printk("CPU%u: %s: %d bytes, associativity %d, %d byte lines, %d sets\n",
-               cpu, prefix,
-               mult << (8 + CACHE_SIZE(cache)),
-               (mult << CACHE_ASSOC(cache)) >> 1,
-               8 << CACHE_LINE(cache),
-               1 << (6 + CACHE_SIZE(cache) - CACHE_ASSOC(cache) -
-                       CACHE_LINE(cache)));
-}
-
-static void __init dump_cpu_info(int cpu)
-{
-       unsigned int info = read_cpuid(CPUID_CACHETYPE);
-
-       if (info != processor_id) {
-               printk("CPU%u: D %s %s cache\n", cpu, cache_is_vivt() ? "VIVT" : "VIPT",
-                      cache_types[CACHE_TYPE(info)]);
-               if (CACHE_S(info)) {
-                       dump_cache("I cache", cpu, CACHE_ISIZE(info));
-                       dump_cache("D cache", cpu, CACHE_DSIZE(info));
-               } else {
-                       dump_cache("cache", cpu, CACHE_ISIZE(info));
-               }
-       }
-
-       if (arch_is_coherent())
-               printk("Cache coherency enabled\n");
-}
-
 int cpu_architecture(void)
 {
        int cpu_arch;
 
-       if ((processor_id & 0x0008f000) == 0) {
+       if ((read_cpuid_id() & 0x0008f000) == 0) {
                cpu_arch = CPU_ARCH_UNKNOWN;
-       } else if ((processor_id & 0x0008f000) == 0x00007000) {
-               cpu_arch = (processor_id & (1 << 23)) ? CPU_ARCH_ARMv4T : CPU_ARCH_ARMv3;
-       } else if ((processor_id & 0x00080000) == 0x00000000) {
-               cpu_arch = (processor_id >> 16) & 7;
+       } else if ((read_cpuid_id() & 0x0008f000) == 0x00007000) {
+               cpu_arch = (read_cpuid_id() & (1 << 23)) ? CPU_ARCH_ARMv4T : CPU_ARCH_ARMv3;
+       } else if ((read_cpuid_id() & 0x00080000) == 0x00000000) {
+               cpu_arch = (read_cpuid_id() >> 16) & 7;
                if (cpu_arch)
                        cpu_arch += CPU_ARCH_ARMv3;
-       } else if ((processor_id & 0x000f0000) == 0x000f0000) {
+       } else if ((read_cpuid_id() & 0x000f0000) == 0x000f0000) {
                unsigned int mmfr0;
 
                /* Revised CPUID format. Read the Memory Model Feature
@@ -330,6 +229,34 @@ int cpu_architecture(void)
        return cpu_arch;
 }
 
+static void __init cacheid_init(void)
+{
+       unsigned int cachetype = read_cpuid_cachetype();
+       unsigned int arch = cpu_architecture();
+
+       if (arch >= CPU_ARCH_ARMv7) {
+               cacheid = CACHEID_VIPT_NONALIASING;
+               if ((cachetype & (3 << 14)) == 1 << 14)
+                       cacheid |= CACHEID_ASID_TAGGED;
+       } else if (arch >= CPU_ARCH_ARMv6) {
+               if (cachetype & (1 << 23))
+                       cacheid = CACHEID_VIPT_ALIASING;
+               else
+                       cacheid = CACHEID_VIPT_NONALIASING;
+       } else {
+               cacheid = CACHEID_VIVT;
+       }
+
+       printk("CPU: %s data cache, %s instruction cache\n",
+               cache_is_vivt() ? "VIVT" :
+               cache_is_vipt_aliasing() ? "VIPT aliasing" :
+               cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown",
+               cache_is_vivt() ? "VIVT" :
+               icache_is_vivt_asid_tagged() ? "VIVT ASID tagged" :
+               cache_is_vipt_aliasing() ? "VIPT aliasing" :
+               cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown");
+}
+
 /*
  * These functions re-use the assembly code in head.S, which
  * already provide the required functionality.
@@ -346,10 +273,10 @@ static void __init setup_processor(void)
         * types.  The linker builds this table for us from the
         * entries in arch/arm/mm/proc-*.S
         */
-       list = lookup_processor_type(processor_id);
+       list = lookup_processor_type(read_cpuid_id());
        if (!list) {
                printk("CPU configuration botched (ID %08x), unable "
-                      "to continue.\n", processor_id);
+                      "to continue.\n", read_cpuid_id());
                while (1);
        }
 
@@ -369,7 +296,7 @@ static void __init setup_processor(void)
 #endif
 
        printk("CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n",
-              cpu_name, processor_id, (int)processor_id & 15,
+              cpu_name, read_cpuid_id(), read_cpuid_id() & 15,
               proc_arch[cpu_architecture()], cr_alignment);
 
        sprintf(init_utsname()->machine, "%s%c", list->arch_name, ENDIANNESS);
@@ -379,14 +306,14 @@ static void __init setup_processor(void)
        elf_hwcap &= ~HWCAP_THUMB;
 #endif
 
+       cacheid_init();
        cpu_proc_init();
 }
 
 /*
  * cpu_init - initialise one CPU.
  *
- * cpu_init dumps the cache information, initialises SMP specific
- * information, and sets up the per-CPU stacks.
+ * cpu_init sets up the per-CPU stacks.
  */
 void cpu_init(void)
 {
@@ -398,9 +325,6 @@ void cpu_init(void)
                BUG();
        }
 
-       if (system_state == SYSTEM_BOOTING)
-               dump_cpu_info(cpu);
-
        /*
         * setup stacks for re-entrant exception handlers
         */
@@ -443,20 +367,6 @@ static struct machine_desc * __init setup_machine(unsigned int nr)
        return list;
 }
 
-static void __init early_initrd(char **p)
-{
-       unsigned long start, size;
-
-       start = memparse(*p, p);
-       if (**p == ',') {
-               size = memparse((*p) + 1, p);
-
-               phys_initrd_start = start;
-               phys_initrd_size = size;
-       }
-}
-__early_param("initrd=", early_initrd);
-
 static void __init arm_add_memory(unsigned long start, unsigned long size)
 {
        struct membank *bank;
@@ -502,17 +412,6 @@ static void __init early_mem(char **p)
 }
 __early_param("mem=", early_mem);
 
-/*
- * vmalloc=size forces the vmalloc area to be exactly 'size'
- * bytes. This can be used to increase (or decrease) the vmalloc
- * area - the default is 128m.
- */
-static void __init early_vmalloc(char **arg)
-{
-       vmalloc_reserve = memparse(*arg, arg);
-}
-__early_param("vmalloc=", early_vmalloc);
-
 /*
  * Initial parsing of the command line.
  */
@@ -527,12 +426,12 @@ static void __init parse_cmdline(char **cmdline_p, char *from)
                        struct early_params *p;
 
                        for (p = &__early_begin; p < &__early_end; p++) {
-                               int len = strlen(p->arg);
+                               int arglen = strlen(p->arg);
 
-                               if (memcmp(from, p->arg, len) == 0) {
+                               if (memcmp(from, p->arg, arglen) == 0) {
                                        if (to != command_line)
                                                to -= 1;
-                                       from += len;
+                                       from += arglen;
                                        p->fn(&from);
 
                                        while (*from != ' ' && *from != '\0')
@@ -579,18 +478,13 @@ request_standard_resources(struct meminfo *mi, struct machine_desc *mdesc)
        kernel_data.end     = virt_to_phys(&_end - 1);
 
        for (i = 0; i < mi->nr_banks; i++) {
-               unsigned long virt_start, virt_end;
-
                if (mi->bank[i].size == 0)
                        continue;
 
-               virt_start = __phys_to_virt(mi->bank[i].start);
-               virt_end   = virt_start + mi->bank[i].size - 1;
-
                res = alloc_bootmem_low(sizeof(*res));
                res->name  = "System RAM";
-               res->start = __virt_to_phys(virt_start);
-               res->end   = __virt_to_phys(virt_end);
+               res->start = mi->bank[i].start;
+               res->end   = mi->bank[i].start + mi->bank[i].size - 1;
                res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
 
                request_resource(&iomem_resource, res);
@@ -694,26 +588,6 @@ static int __init parse_tag_ramdisk(const struct tag *tag)
 
 __tagtable(ATAG_RAMDISK, parse_tag_ramdisk);
 
-static int __init parse_tag_initrd(const struct tag *tag)
-{
-       printk(KERN_WARNING "ATAG_INITRD is deprecated; "
-               "please update your bootloader.\n");
-       phys_initrd_start = __virt_to_phys(tag->u.initrd.start);
-       phys_initrd_size = tag->u.initrd.size;
-       return 0;
-}
-
-__tagtable(ATAG_INITRD, parse_tag_initrd);
-
-static int __init parse_tag_initrd2(const struct tag *tag)
-{
-       phys_initrd_start = tag->u.initrd.start;
-       phys_initrd_size = tag->u.initrd.size;
-       return 0;
-}
-
-__tagtable(ATAG_INITRD2, parse_tag_initrd2);
-
 static int __init parse_tag_serialnr(const struct tag *tag)
 {
        system_serial_low = tag->u.serialnr.low;
@@ -901,28 +775,12 @@ static const char *hwcap_str[] = {
        NULL
 };
 
-static void
-c_show_cache(struct seq_file *m, const char *type, unsigned int cache)
-{
-       unsigned int mult = 2 + (CACHE_M(cache) ? 1 : 0);
-
-       seq_printf(m, "%s size\t\t: %d\n"
-                     "%s assoc\t\t: %d\n"
-                     "%s line length\t: %d\n"
-                     "%s sets\t\t: %d\n",
-               type, mult << (8 + CACHE_SIZE(cache)),
-               type, (mult << CACHE_ASSOC(cache)) >> 1,
-               type, 8 << CACHE_LINE(cache),
-               type, 1 << (6 + CACHE_SIZE(cache) - CACHE_ASSOC(cache) -
-                           CACHE_LINE(cache)));
-}
-
 static int c_show(struct seq_file *m, void *v)
 {
        int i;
 
        seq_printf(m, "Processor\t: %s rev %d (%s)\n",
-                  cpu_name, (int)processor_id & 15, elf_platform);
+                  cpu_name, read_cpuid_id() & 15, elf_platform);
 
 #if defined(CONFIG_SMP)
        for_each_online_cpu(i) {
@@ -949,47 +807,26 @@ static int c_show(struct seq_file *m, void *v)
                if (elf_hwcap & (1 << i))
                        seq_printf(m, "%s ", hwcap_str[i]);
 
-       seq_printf(m, "\nCPU implementer\t: 0x%02x\n", processor_id >> 24);
+       seq_printf(m, "\nCPU implementer\t: 0x%02x\n", read_cpuid_id() >> 24);
        seq_printf(m, "CPU architecture: %s\n", proc_arch[cpu_architecture()]);
 
-       if ((processor_id & 0x0008f000) == 0x00000000) {
+       if ((read_cpuid_id() & 0x0008f000) == 0x00000000) {
                /* pre-ARM7 */
-               seq_printf(m, "CPU part\t: %07x\n", processor_id >> 4);
+               seq_printf(m, "CPU part\t: %07x\n", read_cpuid_id() >> 4);
        } else {
-               if ((processor_id & 0x0008f000) == 0x00007000) {
+               if ((read_cpuid_id() & 0x0008f000) == 0x00007000) {
                        /* ARM7 */
                        seq_printf(m, "CPU variant\t: 0x%02x\n",
-                                  (processor_id >> 16) & 127);
+                                  (read_cpuid_id() >> 16) & 127);
                } else {
                        /* post-ARM7 */
                        seq_printf(m, "CPU variant\t: 0x%x\n",
-                                  (processor_id >> 20) & 15);
+                                  (read_cpuid_id() >> 20) & 15);
                }
                seq_printf(m, "CPU part\t: 0x%03x\n",
-                          (processor_id >> 4) & 0xfff);
-       }
-       seq_printf(m, "CPU revision\t: %d\n", processor_id & 15);
-
-       {
-               unsigned int cache_info = read_cpuid(CPUID_CACHETYPE);
-               if (cache_info != processor_id) {
-                       seq_printf(m, "Cache type\t: %s\n"
-                                     "Cache clean\t: %s\n"
-                                     "Cache lockdown\t: %s\n"
-                                     "Cache format\t: %s\n",
-                                  cache_types[CACHE_TYPE(cache_info)],
-                                  cache_clean[CACHE_TYPE(cache_info)],
-                                  cache_lockdown[CACHE_TYPE(cache_info)],
-                                  CACHE_S(cache_info) ? "Harvard" : "Unified");
-
-                       if (CACHE_S(cache_info)) {
-                               c_show_cache(m, "I", CACHE_ISIZE(cache_info));
-                               c_show_cache(m, "D", CACHE_DSIZE(cache_info));
-                       } else {
-                               c_show_cache(m, "Cache", CACHE_ISIZE(cache_info));
-                       }
-               }
+                          (read_cpuid_id() >> 4) & 0xfff);
        }
+       seq_printf(m, "CPU revision\t: %d\n", read_cpuid_id() & 15);
 
        seq_puts(m, "\n");
 
index ef2f86a5e78a2965e0de4c9b9815c23a8e0baf63..80b8b5c7e07a1a472b1b18458c41d32412e642e6 100644 (file)
 #include <linux/signal.h>
 #include <linux/personality.h>
 #include <linux/freezer.h>
+#include <linux/uaccess.h>
 
 #include <asm/elf.h>
 #include <asm/cacheflush.h>
 #include <asm/ucontext.h>
-#include <asm/uaccess.h>
 #include <asm/unistd.h>
 
 #include "ptrace.h"
index 0128687ba0f71ac8c65598a108bc6278f6e60c68..b3ec641b5cf8a1b8cf7cce2d932315e42235e03d 100644 (file)
@@ -27,8 +27,7 @@
 #include <linux/file.h>
 #include <linux/utsname.h>
 #include <linux/ipc.h>
-
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 
 extern unsigned long do_mremap(unsigned long addr, unsigned long old_len,
                               unsigned long new_len, unsigned long flags,
index 96ab5f52949c99d145aea4be30f077e5ea34ef9f..42623db7f8706ae1528ec666976685b15764845c 100644 (file)
@@ -82,7 +82,7 @@
 #include <linux/socket.h>
 #include <linux/net.h>
 #include <linux/ipc.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 
 struct oldabi_stat64 {
        unsigned long long st_dev;
index 368d171754cf309acfabb1714f4b4dd915790086..c68b44aa88d27247a8e78685349e3535d96c21c7 100644 (file)
@@ -59,7 +59,7 @@ unsigned long profile_pc(struct pt_regs *regs)
 
        if (in_lock_functions(pc)) {
                fp = regs->ARM_fp;
-               pc = pc_pointer(((unsigned long *)fp)[-1]);
+               pc = ((unsigned long *)fp)[-1];
        }
 
        return pc;
index 872f1f8fbb57841c08a5f4755599c8e761081d64..57e6874d0b809a21a27afe21d436fa8dca9046e9 100644 (file)
 #include <linux/kallsyms.h>
 #include <linux/delay.h>
 #include <linux/init.h>
-#include <linux/kprobes.h>
+#include <linux/uaccess.h>
 
 #include <asm/atomic.h>
 #include <asm/cacheflush.h>
 #include <asm/system.h>
-#include <asm/uaccess.h>
 #include <asm/unistd.h>
 #include <asm/traps.h>
-#include <asm/io.h>
 
 #include "ptrace.h"
 #include "signal.h"
@@ -69,7 +67,8 @@ void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long
  */
 static int verify_stack(unsigned long sp)
 {
-       if (sp < PAGE_OFFSET || (sp > (unsigned long)high_memory && high_memory != 0))
+       if (sp < PAGE_OFFSET ||
+           (sp > (unsigned long)high_memory && high_memory != NULL))
                return -EFAULT;
 
        return 0;
@@ -328,17 +327,6 @@ asmlinkage void __exception do_undefinstr(struct pt_regs *regs)
                get_user(instr, (u32 __user *)pc);
        }
 
-#ifdef CONFIG_KPROBES
-       /*
-        * It is possible to have recursive kprobes, so we can't call
-        * the kprobe trap handler with the undef_lock held.
-        */
-       if (instr == KPROBE_BREAKPOINT_INSTRUCTION && !user_mode(regs)) {
-               kprobe_trap_handler(regs, instr);
-               return;
-       }
-#endif
-
        if (call_undef_hook(regs, instr) == 0)
                return;
 
index 180000bfdc8fcd0e5f1ec6c54a2995e8126f3b6e..17127db906faf331cd21bd6d33c47dceaa8a6e65 100644 (file)
@@ -14,8 +14,8 @@
 #include <linux/signal.h>
 #include <linux/sched.h>
 #include <linux/init.h>
+#include <linux/io.h>
 #include <asm/thread_notify.h>
-#include <asm/io.h>
 
 static inline void dsp_save_state(u32 *state)
 {
index 55e57a1c2e6ddb756e2e73ba7098f7f5d6fa74e8..1154d924080ba8353ef0eb1caee8c748125b7ffc 100644 (file)
@@ -47,3 +47,5 @@ ENTRY(__aeabi_llsl)
        mov     al, al, lsl r2
        mov     pc, lr
 
+ENDPROC(__ashldi3)
+ENDPROC(__aeabi_llsl)
index 0b31398f89b2ebf7b61549daa9b3befa10cc35cd..9f8b35572f8c6f34da74ca793319756cf743e77a 100644 (file)
@@ -47,3 +47,5 @@ ENTRY(__aeabi_lasr)
        mov     ah, ah, asr r2
        mov     pc, lr
 
+ENDPROC(__ashrdi3)
+ENDPROC(__aeabi_lasr)
index 84dc890d2bf380cf248d8d9bd90acd02fdc91c56..b0951d0e8b2ca61e68b9ff976a5bc96b5eca696c 100644 (file)
@@ -30,6 +30,8 @@ ENTRY(c_backtrace)
 
 #if !defined(CONFIG_FRAME_POINTER) || !defined(CONFIG_PRINTK)
                mov     pc, lr
+ENDPROC(__backtrace)
+ENDPROC(c_backtrace)
 #else
                stmfd   sp!, {r4 - r8, lr}      @ Save an extra register so we have a location...
                movs    frame, r0               @ if frame pointer is zero
@@ -103,6 +105,8 @@ for_each_frame:     tst     frame, mask             @ Check for address exceptions
                mov     r1, frame
                bl      printk
 no_frame:      ldmfd   sp!, {r4 - r8, pc}
+ENDPROC(__backtrace)
+ENDPROC(c_backtrace)
                
                .section __ex_table,"a"
                .align  3
index 389567c2409026d7d1096e4edf53229241203cb2..80f3115cbee2db546efd6bb7238264943278caf4 100644 (file)
@@ -19,3 +19,5 @@ ENTRY(_change_bit_be)
                eor     r0, r0, #0x18           @ big endian byte ordering
 ENTRY(_change_bit_le)
        bitop   eor
+ENDPROC(_change_bit_be)
+ENDPROC(_change_bit_le)
index ecb28dcdaf7b00704533a9241d64e3d65b9bde49..4d6bc71231f3a2da61bc2f88a6860ba18e074e59 100644 (file)
@@ -41,9 +41,10 @@ USER(                strplt  r2, [r0], #4)
 USER(          strnebt r2, [r0], #1)
 USER(          strnebt r2, [r0], #1)
                tst     r1, #1                  @ x1 x0 x1 x0 x1 x0 x1
-USER(          strnebt r2, [r0], #1)
+USER(          strnebt r2, [r0])
                mov     r0, #0
                ldmfd   sp!, {r1, pc}
+ENDPROC(__clear_user)
 
                .section .fixup,"ax"
                .align  0
index 34751653302559abba02cd82290a2c2f255322d9..1a63e43a1df0a52e2e6c723e7e0ac4191238b7b3 100644 (file)
@@ -20,3 +20,5 @@ ENTRY(_clear_bit_be)
                eor     r0, r0, #0x18           @ big endian byte ordering
 ENTRY(_clear_bit_le)
        bitop   bic
+ENDPROC(_clear_bit_be)
+ENDPROC(_clear_bit_le)
index 6b7363ce749cd80a451315e3ba8b7e94e53f9eee..56799a165cc4f4cd7c3cfe4cfe15bd6db8922b7d 100644 (file)
@@ -87,6 +87,8 @@ ENTRY(__copy_from_user)
 
 #include "copy_template.S"
 
+ENDPROC(__copy_from_user)
+
        .section .fixup,"ax"
        .align 0
        copy_abort_preamble
index 666c99cc0744709ec48c68aca472d7559faf2b50..6ae04db1ca4f2eb6b65732fd560798c3c8b63417 100644 (file)
@@ -44,3 +44,4 @@ ENTRY(copy_page)
        PLD(    ldmeqia r1!, {r3, r4, ip, lr}   )
        PLD(    beq     2b                      )
                ldmfd   sp!, {r4, pc}                   @       3
+ENDPROC(copy_page)
index 5224d94688d907caca22efec0794a9daee2a2211..22f968bbdffda4172b783ea7cf4c91899b2f02b6 100644 (file)
@@ -90,6 +90,8 @@ ENTRY(__copy_to_user)
 
 #include "copy_template.S"
 
+ENDPROC(__copy_to_user)
+
        .section .fixup,"ax"
        .align 0
        copy_abort_preamble
index 9621469beec1d59011fd8c438173e54a664e27d5..3ac6ef01bc43a4cc13465822ead08f18eb88ea0c 100644 (file)
@@ -29,4 +29,5 @@ ENTRY(__csum_ipv6_magic)
                adcs    r0, r0, r2
                adcs    r0, r0, #0
                ldmfd   sp!, {pc}
+ENDPROC(__csum_ipv6_magic)
 
index a78dae5a7b28d2b55fd9acb6c5347beb4675b6e8..31d3cb34740d6a135506a723980be083f103dbc7 100644 (file)
@@ -139,3 +139,4 @@ ENTRY(csum_partial)
                tst     len, #0x1c
                bne     4b
                b       .Lless4
+ENDPROC(csum_partial)
index 21effe0dbf97e2b2f15ad1c3f6a2ab96a0ed9d43..d03fc71fc88c9d5167290ee0d2228f5efca820ec 100644 (file)
  */
 
                .macro  save_regs
-               mov     ip, sp
-               stmfd   sp!, {r1, r4 - r8, fp, ip, lr, pc}
-               sub     fp, ip, #4
+               stmfd   sp!, {r1, r4 - r8, lr}
                .endm
 
                .macro  load_regs
-               ldmfd   sp, {r1, r4 - r8, fp, sp, pc}
+               ldmfd   sp!, {r1, r4 - r8, pc}
                .endm
 
                .macro  load1b, reg1
@@ -50,5 +48,6 @@
                .endm
 
 #define FN_ENTRY       ENTRY(csum_partial_copy_nocheck)
+#define FN_EXIT                ENDPROC(csum_partial_copy_nocheck)
 
 #include "csumpartialcopygeneric.S"
index c50e8f5285d17e7851de9d03c5c7e7e25f3b86cd..d620a5f22a09d4a683b884d9d6836171ded4d5f1 100644 (file)
@@ -329,3 +329,4 @@ FN_ENTRY
                adcs    sum, sum, r4, push #24
                mov     r5, r4, get_byte_1
                b       .Lexit
+FN_EXIT
index c3b93e22ea25a05d80654016bb13e1c4f27879f5..14677fb4b0c4f504bc09ba19e2dcc5acd3362393 100644 (file)
                .text
 
                .macro  save_regs
-               mov     ip, sp
-               stmfd   sp!, {r1 - r2, r4 - r8, fp, ip, lr, pc}
-               sub     fp, ip, #4
+               stmfd   sp!, {r1, r2, r4 - r8, lr}
                .endm
 
                .macro  load_regs
-               ldmfd   sp, {r1, r2, r4-r8, fp, sp, pc}
+               ldmfd   sp!, {r1, r2, r4 - r8, pc}
                .endm
 
                .macro  load1b, reg1
@@ -82,6 +80,7 @@
  */
 
 #define FN_ENTRY       ENTRY(csum_partial_copy_from_user)
+#define FN_EXIT                ENDPROC(csum_partial_copy_from_user)
 
 #include "csumpartialcopygeneric.S"
 
index 930a7025922077a0b1da5cb048bdc4041bbceed0..8d6a8762ab889fdc1d2ef165c9733a92393e7c9a 100644 (file)
@@ -60,3 +60,6 @@ ENTRY(__delay)
 #endif
                bhi     __delay
                mov     pc, lr
+ENDPROC(__udelay)
+ENDPROC(__const_udelay)
+ENDPROC(__delay)
index 58eef66076293a923d00a81e03370bcc1c734f83..1425e789ba86168b87858ad36474c3c6588c3905 100644 (file)
@@ -198,3 +198,4 @@ ENTRY(__do_div64)
        mov     xh, #0
        ldr     pc, [sp], #8
 
+ENDPROC(__do_div64)
index a5ca0248aa4e01a1e11ec1de7a935dba9f5a64ec..8c4defc4f3c482bf598f7dad0c519798b80f66ef 100644 (file)
@@ -33,6 +33,7 @@ ENTRY(_find_first_zero_bit_le)
                blo     1b
 3:             mov     r0, r1                  @ no free bits
                mov     pc, lr
+ENDPROC(_find_first_zero_bit_le)
 
 /*
  * Purpose  : Find next 'zero' bit
@@ -50,6 +51,7 @@ ENTRY(_find_next_zero_bit_le)
                orr     r2, r2, #7              @ if zero, then no bits here
                add     r2, r2, #1              @ align bit pointer
                b       2b                      @ loop for next bit
+ENDPROC(_find_next_zero_bit_le)
 
 /*
  * Purpose  : Find a 'one' bit
@@ -67,6 +69,7 @@ ENTRY(_find_first_bit_le)
                blo     1b
 3:             mov     r0, r1                  @ no free bits
                mov     pc, lr
+ENDPROC(_find_first_bit_le)
 
 /*
  * Purpose  : Find next 'one' bit
@@ -83,6 +86,7 @@ ENTRY(_find_next_bit_le)
                orr     r2, r2, #7              @ if zero, then no bits here
                add     r2, r2, #1              @ align bit pointer
                b       2b                      @ loop for next bit
+ENDPROC(_find_next_bit_le)
 
 #ifdef __ARMEB__
 
@@ -99,6 +103,7 @@ ENTRY(_find_first_zero_bit_be)
                blo     1b
 3:             mov     r0, r1                  @ no free bits
                mov     pc, lr
+ENDPROC(_find_first_zero_bit_be)
 
 ENTRY(_find_next_zero_bit_be)
                teq     r1, #0
@@ -113,6 +118,7 @@ ENTRY(_find_next_zero_bit_be)
                orr     r2, r2, #7              @ if zero, then no bits here
                add     r2, r2, #1              @ align bit pointer
                b       2b                      @ loop for next bit
+ENDPROC(_find_next_zero_bit_be)
 
 ENTRY(_find_first_bit_be)
                teq     r1, #0
@@ -127,6 +133,7 @@ ENTRY(_find_first_bit_be)
                blo     1b
 3:             mov     r0, r1                  @ no free bits
                mov     pc, lr
+ENDPROC(_find_first_bit_be)
 
 ENTRY(_find_next_bit_be)
                teq     r1, #0
@@ -140,6 +147,7 @@ ENTRY(_find_next_bit_be)
                orr     r2, r2, #7              @ if zero, then no bits here
                add     r2, r2, #1              @ align bit pointer
                b       2b                      @ loop for next bit
+ENDPROC(_find_next_bit_be)
 
 #endif
 
index 2034d4dbe6ad3a3cddf20c8e9f75516021e93c92..6763088b7607c13ea4609108416ce2e8f3aedaec 100644 (file)
  * Note that ADDR_LIMIT is either 0 or 0xc0000000.
  * Note also that it is intended that __get_user_bad is not global.
  */
+#include <linux/linkage.h>
 #include <asm/errno.h>
 
-       .global __get_user_1
-__get_user_1:
+ENTRY(__get_user_1)
 1:     ldrbt   r2, [r0]
        mov     r0, #0
        mov     pc, lr
+ENDPROC(__get_user_1)
 
-       .global __get_user_2
-__get_user_2:
+ENTRY(__get_user_2)
 2:     ldrbt   r2, [r0], #1
 3:     ldrbt   r3, [r0]
 #ifndef __ARMEB__
@@ -45,17 +45,19 @@ __get_user_2:
 #endif
        mov     r0, #0
        mov     pc, lr
+ENDPROC(__get_user_2)
 
-       .global __get_user_4
-__get_user_4:
+ENTRY(__get_user_4)
 4:     ldrt    r2, [r0]
        mov     r0, #0
        mov     pc, lr
+ENDPROC(__get_user_4)
 
 __get_user_bad:
        mov     r2, #0
        mov     r0, #-EFAULT
        mov     pc, lr
+ENDPROC(__get_user_bad)
 
 .section __ex_table, "a"
        .long   1b, __get_user_bad
index fb966ad0276f48ab7a24db8edcaf1e978eb89cf0..9f4238987fe9050dba88c94c4c0eb4b730c62c6d 100644 (file)
@@ -120,3 +120,4 @@ ENTRY(__raw_readsb)
                strgtb  r3, [r1]
 
                ldmfd   sp!, {r4 - r6, pc}
+ENDPROC(__raw_readsb)
index 75a9121cb23f69f13d5cb1a389daa46d511c5ee3..5fb97e7f9f4bd9a8cbc2e40ee6ebaea3d273e732 100644 (file)
@@ -76,3 +76,4 @@ ENTRY(__raw_readsl)
 8:             mov     r3, ip, get_byte_0
                strb    r3, [r1, #0]
                mov     pc, lr
+ENDPROC(__raw_readsl)
index 4db1c5f0b219c7b85022971a701b4fa7d7d1f04e..1f393d42593d21c1beb13eff254acd60eaa0bd95 100644 (file)
@@ -128,3 +128,4 @@ ENTRY(__raw_readsw)
    _BE_ONLY_(  movne   ip, ip, lsr #24         )
                strneb  ip, [r1]
                ldmfd   sp!, {r4, pc}
+ENDPROC(__raw_readsw)
index 7eba2b6cc69f951ffeb54013e1108ed08346ac77..68b92f4acaeb3e6f2dbfce4285a8cc9a91deac10 100644 (file)
@@ -91,3 +91,4 @@ ENTRY(__raw_writesb)
                strgtb  r3, [r0]
 
                ldmfd   sp!, {r4, r5, pc}
+ENDPROC(__raw_writesb)
index f8f14dd227ca7c1ac26fc9ffeaa9d514f7b9370e..8d3b7813725cde5b877a896f4ad4780fff663781 100644 (file)
@@ -64,3 +64,4 @@ ENTRY(__raw_writesl)
                str     ip, [r0]
                bne     6b
                mov     pc, lr
+ENDPROC(__raw_writesl)
index c8e85bd653b7aaa7b7cb8c30b0a90615390fd1ea..d6585612c86b5676d8fc9213426ab2a348e467c3 100644 (file)
@@ -94,3 +94,4 @@ ENTRY(__raw_writesw)
 3:             movne   ip, r3, lsr #8
                strneh  ip, [r0]
                mov     pc, lr
+ENDPROC(__raw_writesw)
index 4e492f4b3f0e48cf1ca14229fc318627a6edc8c2..67964bcfc854fde5fc46ed33294a189c4bb1f371 100644 (file)
@@ -230,6 +230,8 @@ ENTRY(__aeabi_uidiv)
        mov     r0, r0, lsr r2
        mov     pc, lr
 
+ENDPROC(__udivsi3)
+ENDPROC(__aeabi_uidiv)
 
 ENTRY(__umodsi3)
 
@@ -245,6 +247,7 @@ ENTRY(__umodsi3)
 
        mov     pc, lr
 
+ENDPROC(__umodsi3)
 
 ENTRY(__divsi3)
 ENTRY(__aeabi_idiv)
@@ -284,6 +287,8 @@ ENTRY(__aeabi_idiv)
        rsbmi   r0, r0, #0
        mov     pc, lr
 
+ENDPROC(__divsi3)
+ENDPROC(__aeabi_idiv)
 
 ENTRY(__modsi3)
 
@@ -305,6 +310,8 @@ ENTRY(__modsi3)
        rsbmi   r0, r0, #0
        mov     pc, lr
 
+ENDPROC(__modsi3)
+
 #ifdef CONFIG_AEABI
 
 ENTRY(__aeabi_uidivmod)
@@ -316,6 +323,8 @@ ENTRY(__aeabi_uidivmod)
        sub     r1, r1, r3
        mov     pc, lr
 
+ENDPROC(__aeabi_uidivmod)
+
 ENTRY(__aeabi_idivmod)
 
        stmfd   sp!, {r0, r1, ip, lr}
@@ -325,6 +334,8 @@ ENTRY(__aeabi_idivmod)
        sub     r1, r1, r3
        mov     pc, lr
 
+ENDPROC(__aeabi_idivmod)
+
 #endif
 
 Ldiv0:
index a86dbdd59cc4414bbd2a8abaf1f4eab7c3a58237..99ea338bf87ce9cbd51a134a585e4ee15dc30507 100644 (file)
@@ -47,3 +47,5 @@ ENTRY(__aeabi_llsr)
        mov     ah, ah, lsr r2
        mov     pc, lr
 
+ENDPROC(__lshrdi3)
+ENDPROC(__aeabi_llsr)
index e7ab1ea8ebaa5aa5bf5a213c2cefedfe3410b5b1..1da86991d7003ad958b843a0508aa10dd334e8e6 100644 (file)
@@ -23,3 +23,4 @@ ENTRY(memchr)
        sub     r0, r0, #1
 2:     movne   r0, #0
        mov     pc, lr
+ENDPROC(memchr)
index 7e71d6708a8d668142fba5f12b932eb5cb1ac626..e0d002641d3f785944aaf787fa9ac85a37cabce3 100644 (file)
@@ -57,3 +57,4 @@ ENTRY(memcpy)
 
 #include "copy_template.S"
 
+ENDPROC(memcpy)
index 2e301b7bd8f13d13243761049353be4ef8f72e10..12549187088c03de84a77c4150bcc001ffe31793 100644 (file)
@@ -196,3 +196,4 @@ ENTRY(memmove)
 
 18:            backward_copy_shift     push=24 pull=8
 
+ENDPROC(memmove)
index b477d4ac88eff4aadab356766dafb83c2c20fe47..761eefa762437de156387da70fbe006004c950cb 100644 (file)
@@ -124,3 +124,4 @@ ENTRY(memset)
        tst     r2, #1
        strneb  r1, [r0], #1
        mov     pc, lr
+ENDPROC(memset)
index b8f79d80ee9bf703d7554c15d2a22ceb1fe9ef1e..3fbdef5f802aa8a251a1eeb756aee910bb9d471e 100644 (file)
@@ -122,3 +122,4 @@ ENTRY(__memzero)
        tst     r1, #1                  @ 1 a byte left over
        strneb  r2, [r0], #1            @ 1
        mov     pc, lr                  @ 1
+ENDPROC(__memzero)
index d89c60615794e7a72c4f5614837939ed0735d62d..36c91b4957e2da0d9bdc006bcf3644dbab001d72 100644 (file)
@@ -43,3 +43,5 @@ ENTRY(__aeabi_lmul)
        adc     xh, xh, ip, lsr #16
        mov     pc, lr
 
+ENDPROC(__muldi3)
+ENDPROC(__aeabi_lmul)
index 08ec7dffa52e44cf5d15b720891b0717547ad7f7..864f3c1c4f185fb54352d2659c83abb42cc5e79d 100644 (file)
  * Note that ADDR_LIMIT is either 0 or 0xc0000000
  * Note also that it is intended that __put_user_bad is not global.
  */
+#include <linux/linkage.h>
 #include <asm/errno.h>
 
-       .global __put_user_1
-__put_user_1:
+ENTRY(__put_user_1)
 1:     strbt   r2, [r0]
        mov     r0, #0
        mov     pc, lr
+ENDPROC(__put_user_1)
 
-       .global __put_user_2
-__put_user_2:
+ENTRY(__put_user_2)
        mov     ip, r2, lsr #8
 #ifndef __ARMEB__
 2:     strbt   r2, [r0], #1
@@ -46,23 +46,25 @@ __put_user_2:
 #endif
        mov     r0, #0
        mov     pc, lr
+ENDPROC(__put_user_2)
 
-       .global __put_user_4
-__put_user_4:
+ENTRY(__put_user_4)
 4:     strt    r2, [r0]
        mov     r0, #0
        mov     pc, lr
+ENDPROC(__put_user_4)
 
-       .global __put_user_8
-__put_user_8:
+ENTRY(__put_user_8)
 5:     strt    r2, [r0], #4
 6:     strt    r3, [r0]
        mov     r0, #0
        mov     pc, lr
+ENDPROC(__put_user_8)
 
 __put_user_bad:
        mov     r0, #-EFAULT
        mov     pc, lr
+ENDPROC(__put_user_bad)
 
 .section __ex_table, "a"
        .long   1b, __put_user_bad
index 83bc23d5b0374dd377772aefee4b47cf7841cc85..1dd7176c4b2bf7827decef898f503c302ec3af91 100644 (file)
@@ -20,3 +20,5 @@ ENTRY(_set_bit_be)
                eor     r0, r0, #0x18           @ big endian byte ordering
 ENTRY(_set_bit_le)
        bitop   orr
+ENDPROC(_set_bit_be)
+ENDPROC(_set_bit_le)
index ff6ece487ffc714354c8ff37a3f7b6a7334a49a5..8a1c67fe0544d5a586fa4f7891dfe7e0dcd8c5b5 100644 (file)
@@ -185,6 +185,8 @@ ENTRY(sha_transform)
 
        ldmfd   sp!, {r4 - r8, pc}
 
+ENDPROC(sha_transform)
+
 .L_sha_K:
        .word   0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6
 
@@ -204,3 +206,4 @@ ENTRY(sha_init)
        stmia   r0, {r1, r2, r3, ip, lr}
        ldr     pc, [sp], #4
 
+ENDPROC(sha_init)
index 9f18d6fdee6a9fddfd376e2637c82541747539ec..d8f2a1c1aea4bf15372595ab57e0a9abcacb2b4b 100644 (file)
@@ -24,3 +24,4 @@ ENTRY(strchr)
                movne   r0, #0
                subeq   r0, r0, #1
                mov     pc, lr
+ENDPROC(strchr)
index 36e3741a37729a59f8eb30e5d66ba3ab5e67fcbc..330373c26dd94ce4c1a31c822f05d39dce63627c 100644 (file)
@@ -31,6 +31,7 @@ USER( ldrplbt r3, [r1], #1)
        sub     r1, r1, #1      @ take NUL character out of count
 2:     sub     r0, r1, ip
        mov     pc, lr
+ENDPROC(__strncpy_from_user)
 
        .section .fixup,"ax"
        .align  0
index 18d8fa4f925a92c397006d7105d9fa8b7bc8c4d0..90bb9d020836428050db83a2a614528a428f31d6 100644 (file)
@@ -31,6 +31,7 @@ USER( ldrbt   r3, [r0], #1)
        add     r0, r0, #1
 2:     sub     r0, r0, r2
        mov     pc, lr
+ENDPROC(__strnlen_user)
 
        .section .fixup,"ax"
        .align  0
index 538df220aa48e5b827263b68034f433f7cd970d1..302f20cd24237634889ff86218f531d2b30394b1 100644 (file)
@@ -23,3 +23,4 @@ ENTRY(strrchr)
                bne     1b
                mov     r0, r3
                mov     pc, lr
+ENDPROC(strrchr)
index b25dcd2be53ec6fc2cba40329890899d35c5a051..5c98dc567f0fc7b3ecad15acefd58538d983c124 100644 (file)
@@ -16,3 +16,5 @@ ENTRY(_test_and_change_bit_be)
                eor     r0, r0, #0x18           @ big endian byte ordering
 ENTRY(_test_and_change_bit_le)
        testop  eor, strb
+ENDPROC(_test_and_change_bit_be)
+ENDPROC(_test_and_change_bit_le)
index 2dcc4b16b68ea734da457145ab0718998759d441..543d7094d18e4eb236fef7b15d9108e55e2e3935 100644 (file)
@@ -16,3 +16,5 @@ ENTRY(_test_and_clear_bit_be)
                eor     r0, r0, #0x18           @ big endian byte ordering
 ENTRY(_test_and_clear_bit_le)
        testop  bicne, strneb
+ENDPROC(_test_and_clear_bit_be)
+ENDPROC(_test_and_clear_bit_le)
index 9011c969761aa61fec07ccf5298909c85345664c..0b3f390401ce0b86c796a83f3ae8914b8bc4137b 100644 (file)
@@ -16,3 +16,5 @@ ENTRY(_test_and_set_bit_be)
                eor     r0, r0, #0x18           @ big endian byte ordering
 ENTRY(_test_and_set_bit_le)
        testop  orreq, streqb
+ENDPROC(_test_and_set_bit_be)
+ENDPROC(_test_and_set_bit_le)
index b48bd6d5fd83144ca4705becef558faadb33f725..ffdd27498ceef69471f230317725ecea1951f111 100644 (file)
@@ -277,6 +277,7 @@ USER(               strgebt r3, [r0], #1)                   @ May fault
                ldrgtb  r3, [r1], #0
 USER(          strgtbt r3, [r0], #1)                   @ May fault
                b       .Lc2u_finished
+ENDPROC(__copy_to_user)
 
                .section .fixup,"ax"
                .align  0
@@ -542,6 +543,7 @@ USER(               ldrgebt r3, [r1], #1)                   @ May fault
 USER(          ldrgtbt r3, [r1], #1)                   @ May fault
                strgtb  r3, [r0], #1
                b       .Lcfu_finished
+ENDPROC(__copy_from_user)
 
                .section .fixup,"ax"
                .align  0
index f76de07ac1825f77ec045ff6c01c1179bd3c2378..f0df6a91db041b7d73c2583e4441af121e898143 100644 (file)
@@ -33,6 +33,8 @@ ENTRY(__ucmpdi2)
        movhi   r0, #2
        mov     pc, lr
 
+ENDPROC(__ucmpdi2)
+
 #ifdef CONFIG_AEABI
 
 ENTRY(__aeabi_ulcmp)
@@ -44,5 +46,7 @@ ENTRY(__aeabi_ulcmp)
        movhi   r0, #1
        mov     pc, lr
 
+ENDPROC(__aeabi_ulcmp)
+
 #endif
 
index 869b5e28d1959395332f139874d5ab7cb97b2062..dfff2895f4b286c4134a2a9f6425c90ce27e76ca 100644 (file)
@@ -23,8 +23,8 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/time.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach/time.h>
 #include <mach/at91_tc.h>
 
index f5c2847161f582906f21bd686e03da07ed9bff0c..e4345106ee57ea1da11416c1a6abbc9a1baed94a 100644 (file)
@@ -22,8 +22,7 @@
 #include <linux/spinlock.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <mach/at91_pmc.h>
index 8392d5b517f15bc5dad300565188e4dafcccfe46..93e0614f2afbf824e1ce0af6658883a9784786e8 100644 (file)
@@ -18,8 +18,8 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/module.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <mach/at91_pio.h>
 #include <mach/gpio.h>
index bda29ccbcd9484a11c6b15210856beae2ff1ee80..36bd55f3fc6ef1957f444431cdd5edbc44032717 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef __ASM_ARCH_IRQS_H
 #define __ASM_ARCH_IRQS_H
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/at91_aic.h>
 
 #define NR_AIC_IRQS 32
index 0410d548e9b1fa4426f6cfb192d5fbf08e1fc0a4..18bdcdeb474fb74713d9bcb7bd6a75bd6a2dd7c9 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef __ASM_ARCH_UNCOMPRESS_H
 #define __ASM_ARCH_UNCOMPRESS_H
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/atmel_serial.h>
 
 #if defined(CONFIG_AT91_EARLY_DBGU)
index ec2fe4ca1e270e3aec4fddd84b5f71019ee7117a..9bb4f043aa22beb3fd08d0750cb75c155097b113 100644 (file)
@@ -17,8 +17,8 @@
 #include <linux/sysfs.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/atomic.h>
 #include <asm/mach/time.h>
index 474616dcd7a688a92cb39b813b58d822f5eb2041..5f18eccdc7252a767c2c4e0bcf4a6167a8b0775a 100644 (file)
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/mm.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/sizes.h>
-#include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
index aa02aa5a01f4a61c42ae3bf5832da36cf446d509..71a80b5b8ad6135eba4821251138c5e730c5ecf8 100644 (file)
@@ -22,9 +22,9 @@
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/mm.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
 #include <asm/setup.h>
index a8eade40317f007e932aed39320fa90e3b844e1e..24e96159e3e7590a008ab8cfbcdda830d3eb782b 100644 (file)
@@ -20,9 +20,9 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/hardware/clps7111.h>
-#include <asm/io.h>
 
 static inline void arch_idle(void)
 {
index 38623cfcac5a0a0d43094b9d09bc09533c2fb06e..9a12d8562284968a7ffe2b33a40806ce4a4f2a2b 100644 (file)
  */
 #include <linux/init.h>
 #include <linux/list.h>
+#include <linux/io.h>
 
 #include <asm/mach/irq.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <asm/hardware/clps7111.h>
index 262c3c361453adaa74dbd7b9dddbce6292a614f0..15121446efc870ad2e083e14ba2862a948421492 100644 (file)
@@ -21,9 +21,9 @@
  */
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include <asm/system.h>
 #include <asm/mach-types.h>
index f51f97d4f212b9c0b1e628da53cbd83a9603c396..0d94a30fd6fc84745555fc4daabdb5617db728a0 100644 (file)
@@ -22,9 +22,9 @@
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/mm.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
 #include <asm/setup.h>
index ef1fcd17189e16bd43538da60e53ea0103d351b0..d581ef0bcd24d68626f55e44cb7a6b5191ff1d5d 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/sched.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/leds.h>
-#include <asm/io.h>
 #include <asm/hardware/clps7111.h>
 
 #include <asm/mach/time.h>
index cc1b82179e83c03c3a8a46bc29127dc201829c28..c3a33b8a5aacc8406d3bcb7279e824cc7500513f 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/serial_8250.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -23,7 +24,6 @@
 
 #include <mach/hardware.h>
 #include <asm/hardware/iomd.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index e8da3c58df76074da487c1fbc6c49a4fb6ac78ad..d02fcf28ee05358077132678bd12b397d4a2e824 100644 (file)
@@ -10,8 +10,8 @@
  *   11-08-1999        PJB     Created ARM7500 version, derived from RiscPC code
  */
 
+#include <linux/io.h>
 #include <asm/hardware/iomd.h>
-#include <asm/io.h>
 
 static inline int fixup_irq(unsigned int irq)
 {
index 3326aa99d3eceda08e3ca78288e11ca110da6e82..87b32db470c812a10bd48563bb3c2cd71263cfa0 100644 (file)
 #define FLUSH_BASE_PHYS                0x00000000
 #define FLUSH_BASE             0xdf000000
 
+/*
+ * Sparsemem support.  Each section is a maximum of 64MB.  The sections
+ * are offset by 128MB and can cover 128MB, so that gives us a maximum
+ * of 29 physmem bits.
+ */
+#define MAX_PHYSMEM_BITS       29
+#define SECTION_SIZE_BITS      26
+
 #endif
index 624fc2830ae0b34ec7ae576bd417b81985ede221..6d325fbe8b08a63dde1c8d70445737b5cab5a2a9 100644 (file)
@@ -6,8 +6,8 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
+#include <linux/io.h>
 #include <asm/hardware/iomd.h>
-#include <asm/io.h>
 
 static inline void arch_idle(void)
 {
index 1343557878143def00bd7254d284e0f6841f8e24..41f3cc4ac4afd73d726864b977530a990b30ba21 100644 (file)
@@ -16,9 +16,9 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/physmap.h>
+#include <linux/io.h>
 
 #include <asm/setup.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
 
index d46c69b55aaab73f6afffcd282bcecae74e1510e..28f6dbc95bd7afe8303abf89d4efb479a71c488f 100644 (file)
@@ -16,9 +16,9 @@
 #include <linux/err.h>
 #include <linux/mutex.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <mach/psc.h>
 #include "clock.h"
index 70608f76aed85c519b9ffa8d9a6f98b730300b3e..bf067d60491819735f0c8cdbe5c9b8e141f190f7 100644 (file)
@@ -13,8 +13,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #define JTAG_ID_BASE           0x01c40028
 
index 84ff77aeb7383b4284a8bd61e02ea26d0925e2da..17ca41dc2c5363b2ae8bf9fb625688b437aa718f 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 
 extern void davinci_watchdog_reset(void);
index 5bb66b61c1a32214d7dee09102ee1cad203f9996..299515f70b8b05611e920404773a533dfb54ed4d 100644 (file)
@@ -11,9 +11,9 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/tlb.h>
-#include <asm/io.h>
 #include <asm/memory.h>
 
 #include <asm/mach/map.h>
index 12ca9f29f84735267a478abd7b8baa7a6c621f7f..38021af8359aaf2d9bc3f5623ac679fc5c568d1c 100644 (file)
@@ -22,9 +22,9 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach/irq.h>
 
 #define IRQ_BIT(irq)           ((irq) & 0x1f)
index 720c48b9ee0404257cd218a3fe26b66a035a653d..42b976e8a7e991d664ba4ffd4052aeb0c6a1d665 100644 (file)
@@ -21,8 +21,8 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <mach/psc.h>
 #include <mach/mux.h>
index caf101e2cc62ba027715b8f37f03384e08da227a..3010f9971255da6fc0480e9b9b106b1f5246a995 100644 (file)
@@ -26,8 +26,8 @@
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <mach/hardware.h>
 #include <mach/serial.h>
index 206e80d41717b79fb6c647e14e463c1217c0f16e..3b9a296b5c4ba43ee703b7ccafce24fdd6067d44 100644 (file)
@@ -15,8 +15,8 @@
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
 #include <linux/spinlock.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <asm/system.h>
 #include <asm/irq.h>
index 65cc7c2719175e3eec4a948f5f52e8a3e771179f..c7bc7fbb11a647800ee6b4fa032c14539eb3f70c 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/serial_8250.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/pgtable.h>
index 53748f5462e9844250638af78a094a557fc07fb6..c52e3047a7eb7ccc32a4094c1a1de8498ad37cbd 100644 (file)
@@ -23,9 +23,9 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/page.h>
 
 static void __iomem *__isamem_convert_addr(const volatile void __iomem *addr)
index ea8549bfbef2fa69b9f94fc54428671df988fdeb..5a1b8c05c9584af2850076060d387ee18682b4db 100644 (file)
@@ -88,6 +88,20 @@ config MACH_TS72XX
          Say 'Y' here if you want your kernel to support the
          Technologic Systems TS-72xx board.
 
+choice
+       prompt "Select a UART for early kernel messages"
+
+config EP93XX_EARLY_UART1
+       bool "UART1"
+
+config EP93XX_EARLY_UART2
+       bool "UART2"
+
+config EP93XX_EARLY_UART3
+       bool "UART3"
+
+endchoice
+
 endmenu
 
 endif
index aa1fb352fb8f6fb1c64cc0f216e3d3e62568f90c..561db73ec1ae1c559fc0c2c2528c308f495b5c5f 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -47,36 +47,12 @@ static struct ep93xx_eth_data adssphere_eth_data = {
        .phy_id         = 1,
 };
 
-static struct resource adssphere_eth_resource[] = {
-       {
-               .start  = EP93XX_ETHERNET_PHYS_BASE,
-               .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-               .flags  = IORESOURCE_MEM,
-       }, {
-               .start  = IRQ_EP93XX_ETHERNET,
-               .end    = IRQ_EP93XX_ETHERNET,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device adssphere_eth_device = {
-       .name           = "ep93xx-eth",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &adssphere_eth_data,
-       },
-       .num_resources  = 2,
-       .resource       = adssphere_eth_resource,
-};
-
 static void __init adssphere_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&adssphere_flash);
 
-       memcpy(adssphere_eth_data.dev_addr,
-               (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-       platform_device_register(&adssphere_eth_device);
+       ep93xx_register_eth(&adssphere_eth_data, 1);
 }
 
 MACHINE_START(ADSSPHERE, "ADS Sphere board")
index 6062e47f204322b211ad6a0080294c1a32532f2a..8c9f2491dccc545f5abb614663c1c34aa1d5098e 100644 (file)
@@ -15,9 +15,9 @@
 #include <linux/err.h>
 #include <linux/module.h>
 #include <linux/string.h>
+#include <linux/io.h>
 #include <asm/div64.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 struct clk {
        char            *name;
index f99f436693928d36adf25aad1cbac3a9e7e35e60..7e65d23e14b59d47c13ad1a4b12279766d436699 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/termios.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/serial.h>
+#include <linux/io.h>
 
 #include <asm/types.h>
 #include <asm/setup.h>
@@ -41,7 +42,6 @@
 #include <asm/system.h>
 #include <asm/tlbflush.h>
 #include <asm/pgtable.h>
-#include <asm/io.h>
 
 #include <asm/mach/map.h>
 #include <asm/mach/time.h>
@@ -157,7 +157,7 @@ static unsigned char gpio_int_type2[3];
 static const u8 int_type1_register_offset[3]   = { 0x90, 0xac, 0x4c };
 static const u8 int_type2_register_offset[3]   = { 0x94, 0xb0, 0x50 };
 static const u8 eoi_register_offset[3]         = { 0x98, 0xb4, 0x54 };
-static const u8 int_en_register_offset[3]      = { 0x9c, 0xb8, 0x5c };
+static const u8 int_en_register_offset[3]      = { 0x9c, 0xb8, 0x58 };
 
 void ep93xx_gpio_update_int_params(unsigned port)
 {
@@ -461,6 +461,41 @@ static struct platform_device ep93xx_ohci_device = {
        .resource       = ep93xx_ohci_resources,
 };
 
+static struct ep93xx_eth_data ep93xx_eth_data;
+
+static struct resource ep93xx_eth_resource[] = {
+       {
+               .start  = EP93XX_ETHERNET_PHYS_BASE,
+               .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
+               .flags  = IORESOURCE_MEM,
+       }, {
+               .start  = IRQ_EP93XX_ETHERNET,
+               .end    = IRQ_EP93XX_ETHERNET,
+               .flags  = IORESOURCE_IRQ,
+       }
+};
+
+static struct platform_device ep93xx_eth_device = {
+       .name           = "ep93xx-eth",
+       .id             = -1,
+       .dev            = {
+               .platform_data  = &ep93xx_eth_data,
+       },
+       .num_resources  = ARRAY_SIZE(ep93xx_eth_resource),
+       .resource       = ep93xx_eth_resource,
+};
+
+void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr)
+{
+       if (copy_addr) {
+               memcpy(data->dev_addr,
+                       (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
+       }
+
+       ep93xx_eth_data = *data;
+       platform_device_register(&ep93xx_eth_device);
+}
+
 extern void ep93xx_gpio_init(void);
 
 void __init ep93xx_init_devices(void)
index 97550c0ad7b045adc41a513895687a590d0d75a2..e4add5bdccfd71532c1c5b26b2a02fd09aca3d06 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -43,10 +43,16 @@ static struct platform_device edb9302_flash = {
        .resource       = &edb9302_flash_resource,
 };
 
+static struct ep93xx_eth_data edb9302_eth_data = {
+       .phy_id         = 1,
+};
+
 static void __init edb9302_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&edb9302_flash);
+
+       ep93xx_register_eth(&edb9302_eth_data, 1);
 }
 
 MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
index 99b01d44bf1cf09fe1577f1d577025301e7e813c..02c4405afed7969fbf372f2be5d83f3788f7e61e 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -47,36 +47,12 @@ static struct ep93xx_eth_data edb9302a_eth_data = {
        .phy_id                 = 1,
 };
 
-static struct resource edb9302a_eth_resource[] = {
-       {
-               .start  = EP93XX_ETHERNET_PHYS_BASE,
-               .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-               .flags  = IORESOURCE_MEM,
-       }, {
-               .start  = IRQ_EP93XX_ETHERNET,
-               .end    = IRQ_EP93XX_ETHERNET,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device edb9302a_eth_device = {
-       .name           = "ep93xx-eth",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &edb9302a_eth_data,
-       },
-       .num_resources  = 2,
-       .resource       = edb9302a_eth_resource,
-};
-
 static void __init edb9302a_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&edb9302a_flash);
 
-       memcpy(edb9302a_eth_data.dev_addr,
-               (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-       platform_device_register(&edb9302a_eth_device);
+       ep93xx_register_eth(&edb9302a_eth_data, 1);
 }
 
 MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
index 9fb72d01a36c2a9dd868f06536fb962491e9b0a9..040edbd2ea053d92437e42129bcea91b9b684123 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -47,36 +47,12 @@ static struct ep93xx_eth_data edb9307_eth_data = {
        .phy_id                 = 1,
 };
 
-static struct resource edb9307_eth_resource[] = {
-       {
-               .start  = EP93XX_ETHERNET_PHYS_BASE,
-               .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-               .flags  = IORESOURCE_MEM,
-       }, {
-               .start  = IRQ_EP93XX_ETHERNET,
-               .end    = IRQ_EP93XX_ETHERNET,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device edb9307_eth_device = {
-       .name           = "ep93xx-eth",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &edb9307_eth_data,
-       },
-       .num_resources  = 2,
-       .resource       = edb9307_eth_resource,
-};
-
 static void __init edb9307_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&edb9307_flash);
 
-       memcpy(edb9307_eth_data.dev_addr,
-               (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-       platform_device_register(&edb9307_eth_device);
+       ep93xx_register_eth(&edb9307_eth_data, 1);
 }
 
 MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
index 87267a574f5ea5f5813943f4408cfca5823a5fb1..6853e302bc3a8f8bad7362a94b8ac0ebd07a1e86 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/ioport.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -44,10 +44,16 @@ static struct platform_device edb9312_flash = {
        .resource       = &edb9312_flash_resource,
 };
 
+static struct ep93xx_eth_data edb9312_eth_data = {
+       .phy_id                 = 1,
+};
+
 static void __init edb9312_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&edb9312_flash);
+
+       ep93xx_register_eth(&edb9312_eth_data, 1);
 }
 
 MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
index 7e373950be4d386fe3cdfe33fce1e8d47413b55a..9469b350d253ba6c291b3b7cc15c1c847e8e8e76 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -43,10 +43,16 @@ static struct platform_device edb9315_flash = {
        .resource       = &edb9315_flash_resource,
 };
 
+static struct ep93xx_eth_data edb9315_eth_data = {
+       .phy_id                 = 1,
+};
+
 static void __init edb9315_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&edb9315_flash);
+
+       ep93xx_register_eth(&edb9315_eth_data, 1);
 }
 
 MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
index 08a7c9bfb689bc6473052e21b0aeaee9df9b33d2..584457ce7c80f410e71b8323de5a94d668722569 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -47,36 +47,12 @@ static struct ep93xx_eth_data edb9315a_eth_data = {
        .phy_id                 = 1,
 };
 
-static struct resource edb9315a_eth_resource[] = {
-       {
-               .start  = EP93XX_ETHERNET_PHYS_BASE,
-               .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-               .flags  = IORESOURCE_MEM,
-       }, {
-               .start  = IRQ_EP93XX_ETHERNET,
-               .end    = IRQ_EP93XX_ETHERNET,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device edb9315a_eth_device = {
-       .name           = "ep93xx-eth",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &edb9315a_eth_data,
-       },
-       .num_resources  = 2,
-       .resource       = edb9315a_eth_resource,
-};
-
 static void __init edb9315a_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&edb9315a_flash);
 
-       memcpy(edb9315a_eth_data.dev_addr,
-               (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-       platform_device_register(&edb9315a_eth_device);
+       ep93xx_register_eth(&edb9315a_eth_data, 1);
 }
 
 MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
index 9b41ec1f089e78201f05191f94dc1389ec9f06a9..035b24e31b64a99f0264a7c3ab460299a89f8976 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/ioport.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -44,36 +44,15 @@ static struct platform_device gesbc9312_flash = {
 };
 
 static struct ep93xx_eth_data gesbc9312_eth_data = {
-       .phy_id                 = 1,
-};
-
-static struct resource gesbc9312_eth_resource[] = {
-       {
-               .start  = EP93XX_ETHERNET_PHYS_BASE,
-               .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-               .flags  = IORESOURCE_MEM,
-       }, {
-               .start  = IRQ_EP93XX_ETHERNET,
-               .end    = IRQ_EP93XX_ETHERNET,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device gesbc9312_eth_device = {
-       .name           = "ep93xx-eth",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &gesbc9312_eth_data,
-       },
-       .num_resources  = 2,
-       .resource       = gesbc9312_eth_resource,
+       .phy_id         = 1,
 };
 
 static void __init gesbc9312_init_machine(void)
 {
        ep93xx_init_devices();
        platform_device_register(&gesbc9312_flash);
-       platform_device_register(&gesbc9312_eth_device);
+
+       ep93xx_register_eth(&gesbc9312_eth_data, 0);
 }
 
 MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
index 0f3fb87ca4be778f33b2b8e48848c6761b0ecd92..482cf3d2fbcd5de4c6e841590c200bb4d5d9df8c 100644 (file)
@@ -16,9 +16,9 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/seq_file.h>
+#include <linux/io.h>
 
 #include <mach/ep93xx-regs.h>
-#include <asm/io.h>
 #include <asm/gpio.h>
 
 struct ep93xx_gpio_chip {
@@ -141,10 +141,10 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
 static struct ep93xx_gpio_chip ep93xx_gpio_banks[] = {
        EP93XX_GPIO_BANK("A", 0x00, 0x10, 0),
        EP93XX_GPIO_BANK("B", 0x04, 0x14, 8),
-       EP93XX_GPIO_BANK("C", 0x30, 0x34, 40),
+       EP93XX_GPIO_BANK("C", 0x08, 0x18, 40),
        EP93XX_GPIO_BANK("D", 0x0c, 0x1c, 24),
        EP93XX_GPIO_BANK("E", 0x20, 0x24, 32),
-       EP93XX_GPIO_BANK("F", 0x08, 0x18, 16),
+       EP93XX_GPIO_BANK("F", 0x30, 0x34, 16),
        EP93XX_GPIO_BANK("G", 0x38, 0x3c, 48),
        EP93XX_GPIO_BANK("H", 0x40, 0x44, 56),
 };
index 9f4458c8e07041658c0d6a9452b435104572cdd3..22d6c9a6e4cadc565f1adba45503b54451b59386 100644 (file)
@@ -5,6 +5,40 @@
 #ifndef __ASM_ARCH_EP93XX_REGS_H
 #define __ASM_ARCH_EP93XX_REGS_H
 
+/*
+ * EP93xx Physical Memory Map:
+ *
+ * The ASDO pin is sampled at system reset to select a synchronous or
+ * asynchronous boot configuration.  When ASDO is "1" (i.e. pulled-up)
+ * the synchronous boot mode is selected.  When ASDO is "0" (i.e
+ * pulled-down) the asynchronous boot mode is selected.
+ *
+ * In synchronous boot mode nSDCE3 is decoded starting at physical address
+ * 0x00000000 and nCS0 is decoded starting at 0xf0000000.  For asynchronous
+ * boot mode they are swapped with nCS0 decoded at 0x00000000 ann nSDCE3
+ * decoded at 0xf0000000.
+ *
+ * There is known errata for the EP93xx dealing with External Memory
+ * Configurations.  Please refer to "AN273: EP93xx Silicon Rev E Design
+ * Guidelines" for more information.  This document can be found at:
+ *
+ *     http://www.cirrus.com/en/pubs/appNote/AN273REV4.pdf
+ */
+
+#define EP93XX_CS0_PHYS_BASE_ASYNC     0x00000000      /* ASDO Pin = 0 */
+#define EP93XX_SDCE3_PHYS_BASE_SYNC    0x00000000      /* ASDO Pin = 1 */
+#define EP93XX_CS1_PHYS_BASE           0x10000000
+#define EP93XX_CS2_PHYS_BASE           0x20000000
+#define EP93XX_CS3_PHYS_BASE           0x30000000
+#define EP93XX_PCMCIA_PHYS_BASE                0x40000000
+#define EP93XX_CS6_PHYS_BASE           0x60000000
+#define EP93XX_CS7_PHYS_BASE           0x70000000
+#define EP93XX_SDCE0_PHYS_BASE         0xc0000000
+#define EP93XX_SDCE1_PHYS_BASE         0xd0000000
+#define EP93XX_SDCE2_PHYS_BASE         0xe0000000
+#define EP93XX_SDCE3_PHYS_BASE_ASYNC   0xf0000000      /* ASDO Pin = 0 */
+#define EP93XX_CS0_PHYS_BASE_SYNC      0xf0000000      /* ASDO Pin = 1 */
+
 /*
  * EP93xx linux memory map:
  *
index b5c182473f5db271fa9a9abbe32a2ae5f38c7580..db2489d3bda74abe02b6af72223e8b9042ffc7b1 100644 (file)
@@ -4,17 +4,17 @@
 
 #ifndef __ASSEMBLY__
 
-void ep93xx_map_io(void);
-void ep93xx_init_irq(void);
-void ep93xx_init_time(unsigned long);
-void ep93xx_init_devices(void);
-extern struct sys_timer ep93xx_timer;
-
 struct ep93xx_eth_data
 {
        unsigned char   dev_addr[6];
        unsigned char   phy_id;
 };
 
+void ep93xx_map_io(void);
+void ep93xx_init_irq(void);
+void ep93xx_init_time(unsigned long);
+void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr);
+void ep93xx_init_devices(void);
+extern struct sys_timer ep93xx_timer;
 
 #endif
index 30b318aa1a1f09627f69ec63a7d8c99d20507b93..34ddec081c40dd817b6ca4741a020e0f3880cab4 100644 (file)
@@ -70,7 +70,7 @@
 
 
 #ifndef __ASSEMBLY__
-#include <asm/io.h>
+#include <linux/io.h>
 
 static inline int board_is_ts7200(void)
 {
index 1fd2f17de3255b21ed8eec3f45db7298a38f2819..16026c2b1c8c0f36843baf6378e0114a22b0fa03 100644 (file)
@@ -31,10 +31,19 @@ static void __raw_writel(unsigned int value, unsigned int ptr)
        *((volatile unsigned int *)ptr) = value;
 }
 
-
-#define PHYS_UART1_DATA                0x808c0000
-#define PHYS_UART1_FLAG                0x808c0018
-#define UART1_FLAG_TXFF                0x20
+#if defined(CONFIG_EP93XX_EARLY_UART1)
+#define UART_BASE              EP93XX_UART1_PHYS_BASE
+#elif defined(CONFIG_EP93XX_EARLY_UART2)
+#define UART_BASE              EP93XX_UART2_PHYS_BASE
+#elif defined(CONFIG_EP93XX_EARLY_UART3)
+#define UART_BASE              EP93XX_UART3_PHYS_BASE
+#else
+#define UART_BASE              EP93XX_UART1_PHYS_BASE
+#endif
+
+#define PHYS_UART_DATA         (UART_BASE + 0x00)
+#define PHYS_UART_FLAG         (UART_BASE + 0x18)
+#define UART_FLAG_TXFF         0x20
 
 static inline void putc(int c)
 {
@@ -42,11 +51,11 @@ static inline void putc(int c)
 
        for (i = 0; i < 1000; i++) {
                /* Transmit fifo not full?  */
-               if (!(__raw_readb(PHYS_UART1_FLAG) & UART1_FLAG_TXFF))
+               if (!(__raw_readb(PHYS_UART_FLAG) & UART_FLAG_TXFF))
                        break;
        }
 
-       __raw_writeb(c, PHYS_UART1_DATA);
+       __raw_writeb(c, PHYS_UART_DATA);
 }
 
 static inline void flush(void)
index de047a5c811256a4b50835cc7ab06220cfece58a..c2197236b63285190d99bcd0fa80225b84e67eac 100644 (file)
 #include <linux/mm.h>
 #include <linux/platform_device.h>
 #include <linux/sched.h>
-
+#include <linux/io.h>
 #include <linux/mtd/physmap.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 
 #include <asm/mach/arch.h>
@@ -29,38 +28,9 @@ static struct ep93xx_eth_data micro9_eth_data = {
        .phy_id                 = 0x1f,
 };
 
-static struct resource micro9_eth_resource[] = {
-       {
-               .start  = EP93XX_ETHERNET_PHYS_BASE,
-               .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-               .flags  = IORESOURCE_MEM,
-       }, {
-               .start  = IRQ_EP93XX_ETHERNET,
-               .end    = IRQ_EP93XX_ETHERNET,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device micro9_eth_device = {
-       .name           = "ep93xx-eth",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &micro9_eth_data,
-       },
-       .num_resources = ARRAY_SIZE(micro9_eth_resource),
-       .resource       = micro9_eth_resource,
-};
-
-static void __init micro9_eth_init(void)
-{
-       memcpy(micro9_eth_data.dev_addr,
-               (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-       platform_device_register(&micro9_eth_device);
-}
-
 static void __init micro9_init(void)
 {
-       micro9_eth_init();
+       ep93xx_register_eth(&micro9_eth_data, 1);
 }
 
 /*
index c3cbff126d0caa0e32b519fb30de5c0923d0140f..b4aa4c0542769ebe4fd4409a938c98c315f7cc58 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
 #include <linux/m48t86.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -161,28 +161,6 @@ static struct ep93xx_eth_data ts72xx_eth_data = {
        .phy_id                 = 1,
 };
 
-static struct resource ts72xx_eth_resource[] = {
-       {
-               .start  = EP93XX_ETHERNET_PHYS_BASE,
-               .end    = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
-               .flags  = IORESOURCE_MEM,
-       }, {
-               .start  = IRQ_EP93XX_ETHERNET,
-               .end    = IRQ_EP93XX_ETHERNET,
-               .flags  = IORESOURCE_IRQ,
-       }
-};
-
-static struct platform_device ts72xx_eth_device = {
-       .name           = "ep93xx-eth",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &ts72xx_eth_data,
-       },
-       .num_resources  = 2,
-       .resource       = ts72xx_eth_resource,
-};
-
 static void __init ts72xx_init_machine(void)
 {
        ep93xx_init_devices();
@@ -190,9 +168,7 @@ static void __init ts72xx_init_machine(void)
                platform_device_register(&ts72xx_flash);
        platform_device_register(&ts72xx_rtc_device);
 
-       memcpy(ts72xx_eth_data.dev_addr,
-               (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-       platform_device_register(&ts72xx_eth_device);
+       ep93xx_register_eth(&ts72xx_eth_data, 1);
 }
 
 MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
index c261472208cb17b1cc5bce8c0fd8c14556dae2f4..6a5b437ab86ffdfd03c66527ea2331bfa4f4c7d9 100644 (file)
@@ -9,9 +9,9 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/screen_info.h>
+#include <linux/io.h>
 
 #include <asm/hardware/dec21285.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/setup.h>
 
index b08ab507c0524630bf412f214632e3f9a119ddf6..818014e09f4a6e8cb0b679a9ea5aef4fd4928ea9 100644 (file)
 #include <linux/ioport.h>
 #include <linux/list.h>
 #include <linux/init.h>
+#include <linux/io.h>
  
 #include <asm/pgtable.h>
 #include <asm/page.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/setup.h>
 #include <asm/hardware/dec21285.h>
index d0dc51e813384f7ba02312efd249b49637ecfbb6..d4c1e526f59c4cd8071f78e17e06258f42e4cd79 100644 (file)
@@ -16,8 +16,8 @@
 #include <linux/init.h>
 #include <linux/ioport.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/system.h>
 #include <asm/mach/pci.h>
index 1f9b09b8ed88478746155d2291981e49a4f481d3..b653e9cfa3f7761ee9d988a213223c71470eb706 100644 (file)
@@ -11,9 +11,9 @@
  *                     ISA DMA controllers.
  */
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/dma.h>
-#include <asm/io.h>
 #include <asm/scatterlist.h>
 
 #include <asm/mach/dma.h>
index e9cae99dd1f9881e1acdc5913ed2495efb49131a..6ae2f1a07ab90b585e122ee8596cbd4f3f7b4b6a 100644 (file)
@@ -42,10 +42,6 @@ extern unsigned long __bus_to_virt(unsigned long);
 
 #endif
 
-/* Task size and page offset at 3GB */
-#define TASK_SIZE              UL(0xbf000000)
-#define PAGE_OFFSET            UL(0xc0000000)
-
 /*
  * Cache flushing area.
  */
@@ -56,12 +52,6 @@ extern unsigned long __bus_to_virt(unsigned long);
  */
 #define PHYS_OFFSET            UL(0x00000000)
 
-/*
- * This decides where the kernel will search for a free chunk of vm
- * space during mmap's.
- */
-#define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3)
-
 #define FLUSH_BASE_PHYS                0x50000000
 
 #endif
index 01c9f407f49833934b7dc11a95302bccee1d5840..2db7f36bd6ca44ed09381f0fddd932fc224afa9c 100644 (file)
@@ -7,8 +7,8 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/io.h>
 #include <asm/hardware/dec21285.h>
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
index 7132e522c3663ecd2e505a4f1c1ce410c093ba37..62bb38f1369d65ec65af61262f7b59fbcc3659b8 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/list.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
 #include <asm/hardware/dec21285.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 
 static void isa_mask_pic_lo_irq(unsigned int irq)
index a764e01d3573991010db8e629e03b7952d0d67ad..0c8390082fa8a49ef23c02071d7373c3d299c7d0 100644 (file)
@@ -7,8 +7,8 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <asm/mach/time.h>
index a1f381c64a30e108d1077a843ad4afb90c1b371d..00b0ddcac28347107cb932f18b0e7d4bb03236af 100644 (file)
@@ -10,9 +10,9 @@
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/hardware/dec21285.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
 #include <asm/setup.h>
index fd9a7c11d62d543c76c39cbde5af4880105a1c2a..216ed5c7404d33889e5f0ead9722fcfc41a180ee 100644 (file)
@@ -22,9 +22,9 @@
 #include <linux/sched.h>
 #include <linux/mc146818rtc.h>
 #include <linux/bcd.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <asm/mach/time.h>
 #include "common.h"
index b5f9741ae13cd66220f28742924e2bd15b29502b..3a410e3f1e5fe674a409c2ee16d9ee4d7f7c6371 100644 (file)
 #include <linux/mman.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/io.h>
 
 #include <asm/page.h>
 #include <asm/pgtable.h>
 #include <asm/dma.h>
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach/irq.h>
index 4b4230db37653ab3e1d6c3368490ee2014de48cd..7ec60fc91565f481e207d368421eef00354d6b00 100644 (file)
@@ -21,8 +21,8 @@
 #include <linux/list.h>
 #include <linux/math64.h>
 #include <linux/err.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/imx-regs.h>
 
 /*
index 798f221eb3b7033e4f2aab147e8797fe270e944f..2ce75625b4173a23e7fb30fc8c7cf5c3dfb29e1b 100644 (file)
 #include <linux/init.h>
 #include <linux/list.h>
 #include <linux/timer.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/mach/irq.h>
 
index af81621f689bbe5992ba0e7ce77b9cbc1fd27cdc..1d48f2762cbc5e9967cef755530c9fbdf341adc9 100644 (file)
@@ -13,9 +13,9 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/system.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include "leds.h"
 
index 08be3875c59ea8d741ddf072169a2ec8444f58f2..a11765f5f23b111c1f21a1a4edb3f498462c1a16 100644 (file)
@@ -18,9 +18,9 @@
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include <asm/irq.h>
 #include <asm/mach/time.h>
index 8bacf6d4d0974eb4a3265e8ebab0ee11529d3022..595b7392ee4eb9bfdad41ba8b9cc69243d49cf6c 100644 (file)
 #include <linux/termios.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/serial.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/hardware/arm_timer.h>
 #include <mach/cm.h>
 #include <asm/system.h>
index 7c49d55e6b27d61d8d76e1682e96c00799f3cc5d..e4f72d202cc04acc6b9e3e60261457052434871f 100644 (file)
@@ -17,9 +17,9 @@
 #include <linux/sched.h>
 #include <linux/smp.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/hardware/icst525.h>
 
index 3c8383dbe9e6fac52652215dba190667a610ad4b..172299a783021395f778c9a46eb771f7a152dafb 100644 (file)
@@ -20,8 +20,8 @@
 #include <linux/mm.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/clcd.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/hardware/icst525.h>
 #include <mach/lm.h>
 #include <mach/impd1.h>
index 6e472b5f8f26b73a38837c0d31134d29b48b3d19..8138a7e245623cf352909bf080c98d31d315f475 100644 (file)
@@ -27,9 +27,9 @@
 #include <linux/sysdev.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/kmi.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/setup.h>
 #include <asm/param.h>         /* HZ */
index 6b99e9c258bdcc71ae47d9b928d6ff83c1bccfa8..c0eaf0a6f4538d37c4329c5f77a98abc152f75ee 100644 (file)
@@ -19,9 +19,9 @@
 #include <linux/amba/bus.h>
 #include <linux/amba/kmi.h>
 #include <linux/amba/clcd.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
index 7bc6881434ecf4bfd9d21c35db216a9fef548ed8..8dcc823f41353baa1c1a27db44f86ee4a819bc49 100644 (file)
@@ -24,9 +24,9 @@
 #include <linux/init.h>
 #include <linux/smp.h>
 #include <linux/spinlock.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include <asm/system.h>
 #include <asm/mach-types.h>
index 9f2b1ea8fb209f27ce6058f4d005fef1db14d983..f1d72b225450951022aada4f49a50a46fb13d6cc 100644 (file)
@@ -27,9 +27,9 @@
 #include <linux/interrupt.h>
 #include <linux/spinlock.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/system.h>
 #include <asm/mach/pci.h>
index e8b59d8f1bb985f1e4fde351e677f48e4688f679..b82602d529bfb4e76ec26fee1800517f0efe36dc 100644 (file)
@@ -7,9 +7,6 @@
  * Physical DRAM offset.
  */
 #define PHYS_OFFSET    UL(0x00000000)
-#define TASK_SIZE      UL(0x3f000000)
-#define PAGE_OFFSET    UL(0x40000000)
-#define TASK_UNMAPPED_BASE ((TASK_SIZE + 0x01000000) / 3)
 
 #ifndef __ASSEMBLY__
 
 
 /* RAM has 1:1 mapping on the PCIe/x Busses */
 #define __virt_to_bus(x)       (__virt_to_phys(x))
-#define __bus_to_virt(x)    (__phys_to_virt(x))
+#define __bus_to_virt(x)       (__phys_to_virt(x))
 
-#define virt_to_lbus(x)                                           \
-(( ((void*)(x) >= (void*)IOP13XX_PMMR_V_START) &&                 \
-((void*)(x) < (void*)IOP13XX_PMMR_V_END) ) ?                      \
-((x) - IOP13XX_PMMR_VIRT_MEM_BASE + IOP13XX_PMMR_PHYS_MEM_BASE) : \
-((x) - PAGE_OFFSET + PHYS_OFFSET))
+static inline dma_addr_t __virt_to_lbus(unsigned long x)
+{
+       return x + IOP13XX_PMMR_PHYS_MEM_BASE - IOP13XX_PMMR_VIRT_MEM_BASE;
+}
 
-#define lbus_to_virt(x)                                            \
-(( ((x) >= IOP13XX_PMMR_P_START) && ((x) < IOP13XX_PMMR_P_END) ) ? \
-((x) - IOP13XX_PMMR_PHYS_MEM_BASE + IOP13XX_PMMR_VIRT_MEM_BASE ) : \
-((x) - PHYS_OFFSET + PAGE_OFFSET))
+static inline unsigned long __lbus_to_virt(dma_addr_t x)
+{
+       return x + IOP13XX_PMMR_VIRT_MEM_BASE - IOP13XX_PMMR_PHYS_MEM_BASE;
+}
+
+#define __is_lbus_dma(a)                               \
+       ((a) >= IOP13XX_PMMR_P_START && (a) < IOP13XX_PMMR_P_END)
+
+#define __is_lbus_virt(a)                              \
+       ((a) >= IOP13XX_PMMR_V_START && (a) < IOP13XX_PMMR_V_END)
 
 /* Device is an lbus device if it is on the platform bus of the IOP13XX */
-#define is_lbus_device(dev) (dev &&\
-                            (strncmp(dev->bus->name, "platform", 8) == 0))
+#define is_lbus_device(dev)                            \
+       (dev && strncmp(dev->bus->name, "platform", 8) == 0)
 
-#define __arch_page_to_dma(dev, page)                                  \
-({is_lbus_device(dev) ? (dma_addr_t)virt_to_lbus(page_address(page)) : \
-(dma_addr_t)__virt_to_bus(page_address(page));})
+#define __arch_dma_to_virt(dev, addr)                                  \
+       ({                                                              \
+               unsigned long __virt;                                   \
+               dma_addr_t __dma = addr;                                \
+               if (is_lbus_device(dev) && __is_lbus_dma(__dma))        \
+                       __virt = __lbus_to_virt(__dma);                 \
+               else                                                    \
+                       __virt = __bus_to_virt(__dma);                  \
+               (void *)__virt;                                         \
+       })
 
-#define __arch_dma_to_virt(dev, addr) \
-({is_lbus_device(dev) ? lbus_to_virt(addr) : __bus_to_virt(addr);})
+#define __arch_virt_to_dma(dev, addr)                                  \
+       ({                                                              \
+               unsigned long __virt = (unsigned long)addr;             \
+               dma_addr_t __dma;                                       \
+               if (is_lbus_device(dev) && __is_lbus_virt(__virt))      \
+                       __dma = __virt_to_lbus(__virt);                 \
+               else                                                    \
+                       __dma = __virt_to_bus(__virt);                  \
+               __dma;                                                  \
+       })
 
-#define __arch_virt_to_dma(dev, addr) \
-({is_lbus_device(dev) ? virt_to_lbus(addr) : __virt_to_bus(addr);})
+#define __arch_page_to_dma(dev, page)                                  \
+       __arch_virt_to_dma(dev, page_address(page))
 
 #endif /* CONFIG_ARCH_IOP13XX */
 #endif /* !ASSEMBLY */
index 17b5515af8b1c6a73f064aef27b6fdd83fd794a3..59f42b535572d5cc0612e671ba9dd5bdee4d7b5d 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef _IOP13XX_PCI_H_
 #define _IOP13XX_PCI_H_
+#include <linux/io.h>
 #include <mach/irqs.h>
-#include <asm/io.h>
 
 struct pci_sys_data;
 struct hw_pci;
index 26cfa318142cdefe5d0bb5a529041eddaef075cb..52958099781400702fa380324148c842eefaa823 100644 (file)
@@ -18,8 +18,8 @@
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 void * __iomem __iop13xx_io(unsigned long io_addr)
 {
index b17ccc8cb471f206ac8044f614d5df8be19e3c71..cfd4d2e6dacd6d1f7fb235c84c98552c99347a0e 100644 (file)
  */
 
 #include <linux/serial_8250.h>
+#include <linux/io.h>
 #ifdef CONFIG_MTD_PHYSMAP
 #include <linux/mtd/physmap.h>
 #endif
 #include <asm/mach/map.h>
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/hardware/iop_adma.h>
 
 #define IOP13XX_UART_XTAL 33334000
index 2476347ea62f13b5119a28e1fd6f185d76a8ad8f..c6af1e1bee32e5a844d13686eabf02ade6f10c57 100644 (file)
@@ -21,7 +21,7 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <asm/irq.h>
 #include <asm/sizes.h>
 
index 45d61276d2332acb6b312157a07248e69afac0a8..a9c2dfdb2507c0648e611b8fdbff0b0b83dae5fc 100644 (file)
@@ -25,8 +25,8 @@
 #include <linux/mtd/physmap.h>
 #include <linux/i2c.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
index 082818aaa2056fe8cd0ee452d0f75f03ca4d2965..dd1cd990451820ffde2bef6cd1ca4aa77b3d3f2f 100644 (file)
@@ -26,8 +26,9 @@
 #include <linux/serial_8250.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
+#include <asm/cputype.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -49,8 +50,7 @@ static int force_ep80219;
 
 static int is_80219(void)
 {
-       extern int processor_id;
-       return !!((processor_id & 0xffffffe0) == 0x69052e20);
+       return !!((read_cpuid_id() & 0xffffffe0) == 0x69052e20);
 }
 
 static int is_ep80219(void)
index d735539808b4ab2f891bb909e98f3ee0a35059f8..fbe27798759d8449c60a1d245db2375d06c352e1 100644 (file)
@@ -23,8 +23,8 @@
 #include <linux/serial_8250.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
index 3173f9c5835d948ff884e7ae0ff2362579d35036..d2e427899729d19531d7236d1151d6b040f68730 100644 (file)
@@ -30,8 +30,8 @@
 #include <linux/i2c.h>
 #include <linux/platform_device.h>
 #include <linux/reboot.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
index c7d99f9fafed254c9e3d640375dbbeccf2cad246..d51e10cddf20773f3d2bc5ed87c0106cbbeecd03 100644 (file)
@@ -22,8 +22,8 @@
 #include <linux/serial_8250.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
index af616c5f4fb26f6e476799fc37c0d2b4c7cba987..92fb44cdbcadf440bdd30048765eee11dd176e71 100644 (file)
@@ -22,8 +22,8 @@
 #include <linux/serial_8250.h>
 #include <linux/mtd/physmap.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
index 8c21870fa8082c2f0ebd60bc551110758dd6855d..cdae24e46eeae784398f3674973157ece4b6a434 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/serial.h>
 #include <linux/tty.h>
 #include <linux/serial_8250.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
 #include <asm/mach/map.h>
index c62ed655c1a781dc2e6e40c17a2737644bb8ccb5..279e431e0379beb5e5a3d2ef08780e5fb26bab34 100644 (file)
@@ -32,8 +32,8 @@
 #include <linux/tty.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
index c673b9ef9f69e071beebf04fa089325d035f1428..4467c4224d73f23723d9e43530ae822f663b7a13 100644 (file)
@@ -25,8 +25,8 @@
 #include <linux/ioport.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
index 6715b50829a605c7f1ca09830ace1e75c9705538..94f68ba9ea50905ba0023f52fd35bbb3b1b9ad79 100644 (file)
@@ -25,8 +25,8 @@
 #include <linux/ioport.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
index 5a781fd9757a1089c829cad9b1c5da3300de15fc..4debb9ff056c26726bd145ff57c831076e39dfa7 100644 (file)
@@ -25,8 +25,8 @@
 #include <linux/ioport.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
index 78a2341dee2c31fff2495d7dd7b1e1f361b22af9..c7042725dc80965df75a379ea2a82cfcdd72c428 100644 (file)
@@ -30,8 +30,8 @@
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
 #include <linux/serial_8250.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
index 03d916fbe531efbdbe613736f9b1620f04d4f112..60e9fd08ab803036c6655d6153a8c4b20aadf197 100644 (file)
@@ -24,8 +24,8 @@
 #include <linux/ioport.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/system.h>
 #include <mach/hardware.h>
index 701d60aa0efd42c6ea88c37bb363d2dab65507da..59022becb134c93526eab0c350ffef3efdcc4ff4 100644 (file)
@@ -25,8 +25,8 @@
 #include <linux/ioport.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/sizes.h>
 #include <asm/system.h>
index 192538a045753e437df60c3054dd8212ab3257ed..d816c51320c7c3206c7734adfce4f1bab3fadae8 100644 (file)
 #include <linux/slab.h>
 #include <linux/delay.h>
 #include <linux/device.h>
+#include <linux/io.h>
 #include <asm/dma-mapping.h>
 
-#include <asm/io.h>
+#include <asm/cputype.h>
 #include <asm/irq.h>
 #include <asm/sizes.h>
 #include <asm/system.h>
@@ -366,15 +367,13 @@ void __init ixp4xx_adjust_zones(int node, unsigned long *zone_size,
 
 void __init ixp4xx_pci_preinit(void)
 {  
-       unsigned long processor_id;
-
-       asm("mrc p15, 0, %0, cr0, cr0, 0;" : "=r"(processor_id) :);
+       unsigned long cpuid = read_cpuid_id();
 
        /*
         * Determine which PCI read method to use.
         * Rev 0 IXP425 requires workaround.
         */
-       if (!(processor_id & 0xf) && cpu_is_ixp42x()) {
+       if (!(cpuid & 0xf) && cpu_is_ixp42x()) {
                printk("PCI: IXP42x A0 silicon detected - "
                        "PCI Non-Prefetch Workaround Enabled\n");
                ixp4xx_pci_read = ixp4xx_pci_read_errata;
index 58bd2842a6f12f516ec9b5e340335a2620e342b3..7766f469456be0025ea8bc353dd45ad61c530e31 100644 (file)
 #include <linux/timex.h>
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
+#include <linux/io.h>
 
 #include <mach/udc.h>
 #include <mach/hardware.h>
 #include <asm/uaccess.h>
-#include <asm/io.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
 #include <asm/irq.h>
index 501dfdcc39fe996c86bc87ffb2289c3ae14f4925..e7c6386782ede189976cb4cb6b59fa2b7af97497 100644 (file)
 #include <linux/reboot.h>
 #include <linux/i2c.h>
 #include <linux/i2c-gpio.h>
+#include <linux/io.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
-#include <asm/io.h>
 #include <asm/gpio.h>
 
 static struct flash_platform_data fsg_flash_data = {
index ff8aa2393bf94abd41bef12956686bedeecaa4de..51bd69c46d9433971932ce4244eb4e42d1fa7ce3 100644 (file)
 #ifndef __ASM_ARCH_CPU_H__
 #define __ASM_ARCH_CPU_H__
 
-extern unsigned int processor_id;
+#include <asm/cputype.h>
+
 /* Processor id value in CP15 Register 0 */
 #define IXP425_PROCESSOR_ID_VALUE      0x690541c0
 #define IXP435_PROCESSOR_ID_VALUE      0x69054040
 #define IXP465_PROCESSOR_ID_VALUE      0x69054200
 #define IXP4XX_PROCESSOR_ID_MASK       0xfffffff0
 
-#define cpu_is_ixp42x()        ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \
+#define cpu_is_ixp42x()        ((read_cpuid_id() & IXP4XX_PROCESSOR_ID_MASK) == \
                          IXP425_PROCESSOR_ID_VALUE)
-#define cpu_is_ixp43x()        ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \
+#define cpu_is_ixp43x()        ((read_cpuid_id() & IXP4XX_PROCESSOR_ID_MASK) == \
                          IXP435_PROCESSOR_ID_VALUE)
-#define cpu_is_ixp46x()        ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \
+#define cpu_is_ixp46x()        ((read_cpuid_id() & IXP4XX_PROCESSOR_ID_MASK) == \
                          IXP465_PROCESSOR_ID_VALUE)
 
 static inline u32 ixp4xx_read_feature_bits(void)
index 9b2d2ec14c8067153ae7e2741f8af05cf590e42c..f4a0c1bc133111e7674f240546734803085a2d99 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
+#include <linux/delay.h>
 
 #include <asm/types.h>
 #include <asm/setup.h>
@@ -29,7 +30,6 @@
 #include <asm/irq.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
-#include <asm/delay.h>
 
 static struct flash_platform_data ixdp425_flash_data = {
        .map_name       = "cfi_probe",
index 84b5e62a9c0ab8a6f9defe0d9c59f0c9e8f4bc6b..0acd95ecf27ef39e716a2c27cf470e30c666c640 100644 (file)
 #include <linux/reboot.h>
 #include <linux/i2c.h>
 #include <linux/i2c-gpio.h>
+#include <linux/io.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
-#include <asm/io.h>
 #include <asm/gpio.h>
 
 static struct flash_platform_data nas100d_flash_data = {
index a48a6655b887ef7fe535db996f08617a8b27e9af..bc9d920ae54f0f28a58597682abcc0e9c0c99c5e 100644 (file)
 #include <linux/reboot.h>
 #include <linux/i2c.h>
 #include <linux/i2c-gpio.h>
+#include <linux/io.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/time.h>
-#include <asm/io.h>
 #include <asm/gpio.h>
 
 static struct flash_platform_data nslu2_flash_data = {
index c6c08e800233c90f0d85010e54e54a18840c51a5..7f3f24053a00978b06014e3592a4685f33bbfc0d 100644 (file)
@@ -24,9 +24,9 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
index 3624e65cd89b8752622802799e2fc343324cb303..9aecf0c4b8b1e47b8c65e0655c3eaa0774e38554 100644 (file)
@@ -23,8 +23,8 @@
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
 #include <linux/module.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <asm/mach/irq.h>
 
@@ -72,7 +72,7 @@ int __init_or_module ks8695_gpio_interrupt(unsigned int pin, unsigned int type)
 
        /* set pin as input */
        x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM);
-       x &= ~IOPM_(pin);
+       x &= ~IOPM(pin);
        __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM);
 
        local_irq_restore(flags);
@@ -108,7 +108,7 @@ int __init_or_module gpio_direction_input(unsigned int pin)
 
        /* set pin as input */
        x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM);
-       x &= ~IOPM_(pin);
+       x &= ~IOPM(pin);
        __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM);
 
        local_irq_restore(flags);
@@ -136,14 +136,14 @@ int __init_or_module gpio_direction_output(unsigned int pin, unsigned int state)
        /* set line state */
        x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD);
        if (state)
-               x |= (1 << pin);
+               x |= IOPD(pin);
        else
-               x &= ~(1 << pin);
+               x &= ~IOPD(pin);
        __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPD);
 
        /* set pin as output */
        x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPM);
-       x |= IOPM_(pin);
+       x |= IOPM(pin);
        __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPM);
 
        local_irq_restore(flags);
@@ -168,9 +168,9 @@ void gpio_set_value(unsigned int pin, unsigned int state)
        /* set output line state */
        x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD);
        if (state)
-               x |= (1 << pin);
+               x |= IOPD(pin);
        else
-               x &= ~(1 << pin);
+               x &= ~IOPD(pin);
        __raw_writel(x, KS8695_GPIO_VA + KS8695_IOPD);
 
        local_irq_restore(flags);
@@ -189,7 +189,7 @@ int gpio_get_value(unsigned int pin)
                return -EINVAL;
 
        x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD);
-       return (x & (1 << pin)) != 0;
+       return (x & IOPD(pin)) != 0;
 }
 EXPORT_SYMBOL(gpio_get_value);
 
@@ -240,7 +240,7 @@ static int ks8695_gpio_show(struct seq_file *s, void *unused)
        for (i = KS8695_GPIO_0; i <= KS8695_GPIO_15 ; i++) {
                seq_printf(s, "%i:\t", i);
 
-               seq_printf(s, "%s\t", (mode & IOPM_(i)) ? "Output" : "Input");
+               seq_printf(s, "%s\t", (mode & IOPM(i)) ? "Output" : "Input");
 
                if (i <= KS8695_GPIO_3) {
                        if (ctrl & enable[i]) {
@@ -273,7 +273,7 @@ static int ks8695_gpio_show(struct seq_file *s, void *unused)
 
                seq_printf(s, "\t");
 
-               seq_printf(s, "%i\n", (data & IOPD_(i)) ? 1 : 0);
+               seq_printf(s, "%i\n", (data & IOPD(i)) ? 1 : 0);
        }
        return 0;
 }
index dadbe66cb75c42b2364436ba2bc8736096d7c28a..8fbc4c76c38b6485000476d8809154e01f009873 100644 (file)
@@ -31,8 +31,8 @@
 /* Platform-bus mapping */
 extern struct bus_type platform_bus_type;
 #define is_lbus_device(dev)            (dev && dev->bus == &platform_bus_type)
-#define __arch_dma_to_virt(dev, x)     ({ is_lbus_device(dev) ? \
-                                       __phys_to_virt(x) : __bus_to_virt(x); })
+#define __arch_dma_to_virt(dev, x)     ({ (void *) (is_lbus_device(dev) ? \
+                                       __phys_to_virt(x) : __bus_to_virt(x)); })
 #define __arch_virt_to_dma(dev, x)     ({ is_lbus_device(dev) ? \
                                        (dma_addr_t)__virt_to_phys(x) : (dma_addr_t)__virt_to_bus(x); })
 #define __arch_page_to_dma(dev, x)     __arch_virt_to_dma(dev, page_address(x))
index 0df6fe61d1ce59afe761183b5c073551f5c71bd3..90614a7d05486a1e7fb785c5622041a24147446c 100644 (file)
@@ -24,7 +24,7 @@
 
 
 /* Port Mode Register */
-#define IOPM_(x)               (1 << (x))      /* Mode for GPIO Pin x */
+#define IOPM(x)                        (1 << (x))      /* Mode for GPIO Pin x */
 
 /* Port Control Register */
 #define IOPC_IOTIM1EN          (1 << 17)       /* GPIO Pin for Timer1 Enable */
@@ -50,6 +50,6 @@
 #define IOPC_TM_EDGE           (6)             /* Both Edge Detection */
 
 /* Port Data Register */
-#define IOPD_(x)               (1 << (x))      /* Signal Level of GPIO Pin x */
+#define IOPD(x)                        (1 << (x))      /* Signal Level of GPIO Pin x */
 
 #endif
index 9ef409901e764247f88efbe7041b01250b093d20..82c5f3791afbc38dca37ce46056c1358ee2055d5 100644 (file)
@@ -29,8 +29,8 @@
 #define KS8695_LRDLB           (0x14)          /* Receive Descriptor List Base Address */
 #define KS8695_LMAL            (0x18)          /* MAC Station Address Low */
 #define KS8695_LMAH            (0x1c)          /* MAC Station Address High */
-#define KS8695_LMAAL_(n)       (0x80 + ((n)*8))        /* MAC Additional Station Address (0..15) Low */
-#define KS8695_LMAAH_(n)       (0x84 + ((n)*8))        /* MAC Additional Station Address (0..15) High */
+#define KS8695_LMAAL(n)                (0x80 + ((n)*8))        /* MAC Additional Station Address (0..15) Low */
+#define KS8695_LMAAH(n)                (0x84 + ((n)*8))        /* MAC Additional Station Address (0..15) High */
 
 
 /* DMA Transmit Control Register */
index eb494ec6e95690fb28f8c3fb44559d29c983a8ce..c475bed22b8ebceeaad05ebaf0de41cbf6547924 100644 (file)
@@ -29,8 +29,8 @@
 #define KS8695_WRDLB           (0x14)          /* Receive Descriptor List Base Address */
 #define KS8695_WMAL            (0x18)          /* MAC Station Address Low */
 #define KS8695_WMAH            (0x1c)          /* MAC Station Address High */
-#define KS8695_WMAAL_(n)       (0x80 + ((n)*8))        /* MAC Additional Station Address (0..15) Low */
-#define KS8695_WMAAH_(n)       (0x84 + ((n)*8))        /* MAC Additional Station Address (0..15) High */
+#define KS8695_WMAAL(n)                (0x80 + ((n)*8))        /* MAC Additional Station Address (0..15) Low */
+#define KS8695_WMAAH(n)                (0x84 + ((n)*8))        /* MAC Additional Station Address (0..15) High */
 
 
 /* DMA Transmit Control Register */
index 2a6f91869056357607f7bc81eceda2ace4077378..5a9b032bdbeb5a95318291faa426f9f12aeb42ed 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/regs-timer.h>
 
 static void arch_idle(void)
index 0eee37a690756b6c3ce2acdc0a032db35e42d408..9495cb4d701a074e81a1194b8dbe63e315c4222d 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef __ASM_ARCH_UNCOMPRESS_H
 #define __ASM_ARCH_UNCOMPRESS_H
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/regs-uart.h>
 
 static void putc(char c)
index e5e71f4dbb8481aa6bdd959c62883cb223c751f7..e375c1d53f8149e8a56bc532d7789ef2a09f89e7 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/mach/irq.h>
 
index 1746c67af1762f71ba42045088784fdc778cc68c..f5ebcc0fcab9f9c36eaaf5dcbcc6b350393fbb2a 100644 (file)
@@ -27,8 +27,8 @@
 #include <linux/init.h>
 #include <linux/irq.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/signal.h>
 #include <asm/mach/pci.h>
 #include <mach/hardware.h>
@@ -141,7 +141,7 @@ static struct pci_ops ks8695_pci_ops = {
        .write  = ks8695_pci_writeconfig,
 };
 
-static struct pci_bus *ks8695_pci_scan_bus(int nr, struct pci_sys_data *sys)
+static struct pci_bus* __init ks8695_pci_scan_bus(int nr, struct pci_sys_data *sys)
 {
        return pci_scan_bus(sys->busnr, &ks8695_pci_ops, sys);
 }
index 940888dffc16898f7177e4a1957016bed85062eb..69c072c2c0f9a28c1fc466a786216f4ad62b24e8 100644 (file)
@@ -24,8 +24,8 @@
 #include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/mach/time.h>
 
 #include <mach/regs-timer.h>
index 6f4c6a1798c13ace0388cdef77df2427a17134c6..9be7466e346cdf152e13767242023e8a53c4c0c1 100644 (file)
@@ -40,23 +40,22 @@ config LPD7A40X_CPLD_SSP
        bool
 
 config LH7A40X_CONTIGMEM
-       bool "Disable NUMA Support"
-       depends on ARCH_LH7A40X
+       bool "Disable NUMA/SparseMEM Support"
        help
          Say Y here if your bootloader sets the SROMLL bit(s) in
          the SDRAM controller, organizing memory as a contiguous
-         array.  This option will disable CONFIG_DISCONTIGMEM and
-          force the kernel to manage all memory in one node.
+         array.  This option will disable sparse memory support
+          and force the kernel to manage all memory in one node.
 
-         Setting this option incorrectly may prevent the kernel from
-         booting.  It is OK to leave it N.
+         Setting this option incorrectly may prevent the kernel
+         from booting.  It is OK to leave it N.
 
          For more information, consult
            <file:Documentation/arm/Sharp-LH/SDRAM>.
 
 config LH7A40X_ONE_BANK_PER_NODE
        bool "Optimize NUMA Node Tables for Size"
-       depends on ARCH_LH7A40X && !LH7A40X_CONTIGMEM
+       depends on !LH7A40X_CONTIGMEM
        help
          Say Y here to produce compact memory node tables.  By
          default pairs of adjacent physical RAM banks are managed
index f7107b4c197a7ad4d143730138eea1d831f47371..1da14ff66c93e035dc448997d2d280104af5ebfc 100644 (file)
 
 #endif
 
+/*
+ * Sparsemem version of the above
+ */
+#define MAX_PHYSMEM_BITS       32
+#define SECTION_SIZE_BITS      24
+
 #endif
index 51fbef9601b954dd512fed71bc7b83bcde3bc4bf..2901d49d14847a43b3368dac8a7140c61568e420 100644 (file)
@@ -43,8 +43,8 @@
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/spinlock.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <mach/hardware.h>
 
index 7fe9e06cf662f31113b5dd40bde63052f8675933..4601e425bae3484f0caa87a7445a44121867853d 100644 (file)
@@ -13,9 +13,9 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/time.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/leds.h>
 
index 70ca56bb6f330bc0eb85da19f0a46abdc454962b..0332d8f5c18cf86036ffff55562790930832ea18 100644 (file)
@@ -11,8 +11,8 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/mbus.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include "common.h"
 
 /*
index 5a487930cb2f92427946ea09f8f3a9bba0e1b4a3..e1f97338d5b77b7eea1855aa0da6d7926148282b 100644 (file)
@@ -11,7 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/irq.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <plat/irq.h>
 #include "common.h"
 
index 995afc4ade4be14c70577ec82b793c1b7f2de154..a24259133e070258de7aa83236159d681fc4e276 100644 (file)
@@ -18,6 +18,8 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/input.h>
+#include <linux/io.h>
+#include <linux/delay.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -28,9 +30,6 @@
 #include <mach/board.h>
 #include <mach/msm_iomap.h>
 
-#include <asm/io.h>
-#include <asm/delay.h>
-
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 
index 3a511368a5d8b25d5e8a9a257f21f9f3382da71d..604f8ade9587948244a7390da3a8263c0c2f5859 100644 (file)
@@ -19,9 +19,9 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/flash.h>
-#include <asm/io.h>
 
 #include <asm/setup.h>
 
index 9de08265d97411d492fc16dc3d59ed1ac9fe1a29..0c8f252637e15a31486887c15dd28818829691eb 100644 (file)
@@ -13,7 +13,7 @@
  *
  */
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/interrupt.h>
 #include <mach/dma.h>
 
index 5976200de99b7df1e963c9983c57501aeceec78b..7999e4ba8e200c4325f4df99d296262453aa1eaf 100644 (file)
@@ -18,9 +18,9 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/page.h>
 #include <mach/msm_iomap.h>
 #include <asm/mach/map.h>
index 66901baf8c8e33d240c32d43af23fd485a1f5110..04b8d182ff8aa72a33af684d79bc1f9ba7094f86 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/ptrace.h>
 #include <linux/timer.h>
-
 #include <linux/irq.h>
-#include <mach/hardware.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
+#include <mach/hardware.h>
 
 #include <mach/msm_iomap.h>
 
index 9f02d7dca9851f1bc2902d455706e4a6e46cc4b8..2bffe9b7e9fe4e726b1b2814675390a03de4629c 100644 (file)
 #include <linux/clk.h>
 #include <linux/clockchips.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
 #include <asm/mach/time.h>
 #include <mach/msm_iomap.h>
 
-#include <asm/io.h>
-
 #define MSM_DGT_BASE (MSM_GPT_BASE + 0x10)
 #define MSM_DGT_SHIFT (5)
 
index 4004b672a2eb780894492afe632766d9b431577b..311d5b0e9bc7b20cb691dcaa417400472fc088b3 100644 (file)
@@ -11,7 +11,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/mbus.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include "common.h"
 
 /*
index 1b40483ea753a5af55ff8ec94d5572b004fcddab..e60c4061dc4061fff9f36ae3fb9d0033b4cf0eac 100644 (file)
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach/map.h>
 #include <asm/hardware/vic.h>
-#include <asm/io.h>
 #include <mach/netx-regs.h>
 #include <asm/mach/irq.h>
 
index 27d8ef8e8e29f0d8f091b467da91f6322cd7c087..6c1023b8a9ab73a63848b684809a4e4ccebcad37 100644 (file)
@@ -19,7 +19,7 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include "netx-regs.h"
 
index 19ae0a72bea391cd22c9d7689a7832dc4e4351da..03984943e16d4d15771a6248d3f3176ca72afc8a 100644 (file)
@@ -20,8 +20,8 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <mach/netx-regs.h>
 #include <mach/pfifo.h>
index ac8e5bfed691e0fa43cceb4620567ec99f946cf6..7c540c1f01fab84a1fb797522649ca14427c1b4c 100644 (file)
@@ -21,9 +21,9 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/clocksource.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach/time.h>
 #include <mach/netx-regs.h>
 
index 04c34e82fe6d7d172fdfb8754204932fc6cc8fbe..32eabf5dfa4fcd736ec332087963b6a1be6552eb 100644 (file)
@@ -21,8 +21,8 @@
 #include <linux/device.h>
 #include <linux/firmware.h>
 #include <linux/mutex.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <mach/netx-regs.h>
 
index 804c300759604db5dacfacf5ab4f17c9d12be330..5241e6a286cc83fc70a7281c82712137ac9e747c 100644 (file)
 #include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/module.h>
+#include <linux/bitops.h>
 
 #include <mach/gpio.h>
 #include <mach/processor.h>
 #include <mach/processor-ns9360.h>
 #include <asm/bug.h>
 #include <asm/types.h>
-#include <asm/bitops.h>
 
 #include "gpio-ns9360.h"
 
index 5dbc3c5167c89e1539a4f2b44672a9a0d9279f1e..1b12d324b087d1528c87d828bebec3308be1dbaa 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef __ASM_ARCH_UNCOMPRESS_H
 #define __ASM_ARCH_UNCOMPRESS_H
 
-#include <asm/io.h>
+#include <linux/io.h>
 
 #define __REG(x)       ((void __iomem __force *)(x))
 
index 38260d5f849b3e482935e27e615d7364c909ff22..22e0eb6e9ec405416dd88d18ba0787794c2619fc 100644 (file)
@@ -10,7 +10,7 @@
  */
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <asm/mach/irq.h>
 #include <mach/regs-sys-common.h>
 #include <mach/irqs.h>
index 5965cf09f8c4ab57b875fec102752c1779cad1b1..478c2c9a22cb02cfda5bb3472f6b911f0790483b 100644 (file)
@@ -17,8 +17,8 @@
 #include <linux/errno.h>
 #include <linux/err.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/mach-types.h>
 
 #include <mach/cpu.h>
index ab708d4c597e85e3aa0e1ac844995ac1c7d87bc8..99982d3380c96d27f522a7b970d463e6cc53f454 100644 (file)
@@ -13,9 +13,9 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach/map.h>
 
 #include <mach/tc.h>
index 4449d86095f673f554749cd22da2ccc876ded894..0d9f48f780ad4a441d55ce169e09539616c6bf77 100644 (file)
@@ -21,9 +21,9 @@
 #include <linux/kernel.h>
 #include <linux/device.h>
 #include <linux/errno.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/irq.h>
 
index da13c3e82850e46e274a78acc4e0d3aed803ddc1..13083d7e692d5b32bd3d36c5bedea570aace62df 100644 (file)
@@ -14,8 +14,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #define OMAP_DIE_ID_0          0xfffe1800
 #define OMAP_DIE_ID_1          0xfffe1804
index 2b9750b200ce9068a1fa069cc677da9284e2f78b..b3bd8ca85118babd632c353c20cfec92fa811108 100644 (file)
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/tlb.h>
 #include <asm/mach/map.h>
-#include <asm/io.h>
 #include <mach/mux.h>
 #include <mach/tc.h>
 
index 0ec6c1ec42507300166b158bcafba69f6d6dd0a7..9ad5197075ffbaa20ce8158efa90a484c6709b85 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/interrupt.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
@@ -47,8 +48,6 @@
 #include <mach/gpio.h>
 #include <mach/cpu.h>
 
-#include <asm/io.h>
-
 #define IRQ_BANK(irq) ((irq) >> 5)
 #define IRQ_BIT(irq)  ((irq) & 0x1f)
 
index 610f51f18741935598ef5aa7a92e7c8415c0ee01..71fe2cc7f7cf536e28725214c979339369086c9c 100644 (file)
@@ -12,8 +12,8 @@
 #include <linux/init.h>
 #include <linux/kernel_stat.h>
 #include <linux/sched.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <asm/leds.h>
 #include <asm/system.h>
index af44eab1ed24ac1e77791d85d387485cfe5db7d9..59abbf331a96b886ab8b4bbde9b84386dbe210b0 100644 (file)
@@ -13,9 +13,9 @@
 #include <linux/resource.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 #include <mach/mailbox.h>
 #include <mach/irqs.h>
-#include <asm/io.h>
 
 #define MAILBOX_ARM2DSP1               0x00
 #define MAILBOX_ARM2DSP1b              0x04
index 898516e362e7716e5a15f3a8d669812de294225b..062c905c2ba6704eda8e5248b58318e525acc975 100644 (file)
  */
 #include <linux/module.h>
 #include <linux/init.h>
-#include <asm/system.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/spinlock.h>
 
+#include <asm/system.h>
+
 #include <mach/mux.h>
 
 #ifdef CONFIG_OMAP_MUX
index 63c4ea18b1ca20de07559cd5370120da72cc5fc6..770d256c790b337f169d32d0dd6d512b2a3e849c 100644 (file)
@@ -41,8 +41,8 @@
 #include <linux/interrupt.h>
 #include <linux/sysfs.h>
 #include <linux/module.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/atomic.h>
 #include <asm/mach/time.h>
index 0e25a996bb4c17d65d02231bdb996647e56634f1..aefc967fc003fe2e19e1244fb9fb40ef70589ae0 100644 (file)
@@ -18,8 +18,8 @@
 #include <linux/serial_8250.h>
 #include <linux/serial_reg.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/mach-types.h>
 
 #include <mach/board.h>
index e54708595ecf4db14187579560a2b5476c9866ce..2cf7e32bd293796e216a81794c2ecc785bba1297 100644 (file)
 #include <linux/err.h>
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
+#include <linux/io.h>
 
 #include <asm/system.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include <asm/irq.h>
 #include <asm/mach/irq.h>
index e67760189d14c10120f693f0fb341dfb28b7bdab..705367ece1741b539f6838454d9cf2d14aa61bad 100644 (file)
 #include <linux/clk.h>
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
+#include <linux/io.h>
 
 #include <asm/system.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include <asm/irq.h>
 #include <asm/mach/irq.h>
index d4d6385cad7c7e3275370f8f67138c1a9398b1a5..cbb921ded7f9c384112679eca2f604953502afd9 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -34,8 +35,6 @@
 #include <mach/common.h>
 #include <mach/gpmc.h>
 
-#include <asm/io.h>
-
 
 #define        SDP2430_FLASH_CS        0
 #define        SDP2430_SMC91X_CS       5
index 9e2624ca70a2493cb0320d0373d446e91d1526da..d4e3b6fc4705fe9335835911a13828ecc5fbfae7 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/input.h>
 #include <linux/err.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -41,8 +42,6 @@
 #include <mach/dma.h>
 #include <mach/gpmc.h>
 
-#include <asm/io.h>
-
 #define H4_FLASH_CS    0
 #define H4_SMC91X_CS   1
 
index 1d891e4a69337d76aba8a75cb931e58477935161..97cde3d3611dede6c2f67b0091f8a0c4ce76db55 100644 (file)
@@ -21,9 +21,8 @@
 #include <linux/errno.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
-#include <asm/bitops.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
+#include <linux/bitops.h>
 
 #include <mach/clock.h>
 #include <mach/sram.h>
index 295e671e9cfdbcb397560cac97d881960077c07c..d382eb0184ac445dab16b835cca3d80eda0a66fc 100644 (file)
 #include <linux/errno.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
-
 #include <linux/io.h>
 #include <linux/cpufreq.h>
+#include <linux/bitops.h>
 
 #include <mach/clock.h>
 #include <mach/sram.h>
 #include <asm/div64.h>
-#include <asm/bitops.h>
 
 #include "memory.h"
 #include "clock.h"
index 3ff74952f8354658d310654fa32c894f3e6c2475..e5b475f21081d8848741114a61200a177787e6d7 100644 (file)
 #include <linux/clk.h>
 #include <linux/io.h>
 #include <linux/limits.h>
+#include <linux/bitops.h>
 
 #include <mach/clock.h>
 #include <mach/sram.h>
 #include <asm/div64.h>
-#include <asm/bitops.h>
 
 #include "memory.h"
 #include "clock.h"
index 7a7f02559075fc9ce8538c5f64d26c538ef03bc3..2ee954a0bc7c23733fc186b27ece2dc8e755e64d 100644 (file)
@@ -13,9 +13,9 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 
index f51d69bc457dac2be97ff36c81ed4e037155c67c..af1081a0b27c9549b0dedecaac107991afb553b2 100644 (file)
@@ -15,8 +15,8 @@
 #include <linux/clk.h>
 #include <linux/ioport.h>
 #include <linux/spinlock.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <mach/gpmc.h>
 
index a5d4526ac4d6debdb1f0a0e0393bc37443e00bac..209177c7f22fe434a442359dd8f54f68d243348e 100644 (file)
@@ -14,8 +14,9 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
+#include <asm/cputype.h>
 
 #include <mach/control.h>
 #include <mach/cpu.h>
index 987351f07d7b618bb0a10ea12a2d18001a9415e4..7c3d6289c05ff50412b2e4ad75b50ba1ff8c4212 100644 (file)
@@ -15,9 +15,9 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/tlb.h>
-#include <asm/io.h>
 
 #include <asm/mach/map.h>
 
index 9ef15b31d8fcc4f8c0b62167ef889685905fcbd1..196a9565a8dc206ddcbd567673ba1a5323244b42 100644 (file)
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/mach/irq.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #define INTC_REVISION  0x0000
 #define INTC_SYSCONFIG 0x0010
index a480b96948e48ad66b50a1ba6798983c2890d2eb..32b7af3c610b6bad518bccc2caae5b4a9d647afb 100644 (file)
@@ -14,9 +14,9 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 #include <mach/mailbox.h>
 #include <mach/irqs.h>
-#include <asm/io.h>
 
 #define MAILBOX_REVISION               0x00
 #define MAILBOX_SYSCONFIG              0x10
index 6b49cc9cbdcbcb31a03e674524cd27eb26e4139e..ab1462b02e6e97f9ce306bc878a5b7782ebf38f0 100644 (file)
@@ -21,8 +21,7 @@
 #include <linux/errno.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #include <mach/common.h>
 #include <mach/clock.h>
index 443d07fef7f3155ee06b9e877d17d7286cd3b43c..6b7d672058b9b360ff1b4034c070f3ab64091e00 100644 (file)
  */
 #include <linux/module.h>
 #include <linux/init.h>
-#include <asm/system.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/spinlock.h>
 
+#include <asm/system.h>
+
 #include <mach/control.h>
 #include <mach/mux.h>
 
index 8671e1079ab54c7764adfe729294e793e9504d17..55361c16c9d9e3a0451c11f89a9eb7bfcdfba118 100644 (file)
@@ -24,8 +24,8 @@
 #include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/atomic.h>
 #include <asm/mach/time.h>
index adc8a26a8fb01757ee6f18ced5104ac9db1edaa8..7d9444adc5df6c94deb0189cb35fbba2d74d9512 100644 (file)
@@ -17,8 +17,7 @@
 #include <linux/serial_8250.h>
 #include <linux/serial_reg.h>
 #include <linux/clk.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #include <mach/common.h>
 #include <mach/board.h>
index bea37972120a9187a61d93bd5c29b94bd5e584e6..719957e05d9e6ed7f7d39364ac8c97419fe1f235 100644 (file)
@@ -13,8 +13,8 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/mbus.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include "common.h"
 
 /*
index cd8a16f67d2be6540daac0e2cc86206ad229791b..fc419868e39fae9670401c652e5d86b4191ae5e0 100644 (file)
@@ -15,8 +15,8 @@
 #include <linux/module.h>
 #include <linux/spinlock.h>
 #include <linux/bitops.h>
+#include <linux/io.h>
 #include <asm/gpio.h>
-#include <asm/io.h>
 #include <mach/orion5x.h>
 #include "common.h"
 
index 2545ff9e5830fc3f888c30b8ca2e28ee5c343371..02ceeb3c673727c246967f9d92e0c583862c4ee1 100644 (file)
@@ -13,8 +13,8 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 #include <asm/gpio.h>
-#include <asm/io.h>
 #include <mach/orion5x.h>
 #include <plat/irq.h>
 #include "common.h"
index c04ab0e16ea1e8b66d1a3678de2e7a200fbdb194..640ea2a3fc6cf758b774877b639e64c12853fec1 100644 (file)
@@ -11,8 +11,8 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/mbus.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include "common.h"
 #include "mpp.h"
 
index 24d036a24a72b7f8c9ce37749d4434881497c6ea..898c0e88acbc30ade69d561e5493e936e23bebdb 100644 (file)
@@ -20,9 +20,9 @@
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <mach/clock.h>
 #include "clock.h"
index 3ba46ede9bbd45eec322bc5d7ddae8798638e85e..45734bb880a88477d7221760291f4c6f399883f8 100644 (file)
@@ -25,9 +25,9 @@
 #include <linux/serial_8250.h>
 #include <linux/device.h>
 #include <linux/spi/spi.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/pgtable.h>
index 833c56be73449766b601e541a893d12af28f0de3..ac2f70eddb9e8e49034bf53257893e63be3de5f1 100644 (file)
 #include <linux/err.h>
 #include <linux/dma-mapping.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <asm/system.h>
 #include <mach/hardware.h>
 #include <asm/dma.h>
 #include <asm/dma-mapping.h>
-#include <asm/io.h>
 #include <asm/mach/dma.h>
 #include <mach/clock.h>
 
index fb51f7279e951ae3f5ff5b6cfeb5ba6c113876eb..015cc21d5f55ff382e3f28cf58afda8e04851529 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/platform.h>
 #include <mach/gpio.h>
 
index 8985a4622b8c45d8cc7ba61db56946555469027a..e12e7abfcbcf34a7316a3d41808475a51769e600 100644 (file)
@@ -21,8 +21,8 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <mach/platform.h>
 
 static void arch_idle(void)
index 956fbd8e977cb4a849b28e5e2ec17f8804bebb99..5ff0196c0f167dd8a72c9443b0353e926123ed83 100644 (file)
@@ -14,8 +14,8 @@
 #ifndef __PNX4008_TIMEX_H
 #define __PNX4008_TIMEX_H
 
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #define CLOCK_TICK_RATE                1000000
 
index 5c4f55af5d4bd55bbac3eb49629665c3c89ce2d9..a9ce02b4bf17fcd2a770070198532a8d6be61458 100644 (file)
@@ -23,8 +23,8 @@
 #include <linux/ioport.h>
 #include <linux/device.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
index f970906d884881ad64b6f59454d158d1ff39dc24..b3d8d53e32ef8cd5733d0de3dac98bfffe9a9aef 100644 (file)
@@ -18,8 +18,8 @@
 #include <linux/suspend.h>
 #include <linux/delay.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/cacheflush.h>
 #include <mach/pm.h>
 #include <mach/clock.h>
index 9be84bbb30e8d0692b985265d0ec8f174057f79a..f40961e519146d88ea39f92ca352dd9799a97211 100644 (file)
@@ -12,8 +12,7 @@
 
 #include <linux/kernel.h>
 #include <linux/types.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #include <mach/platform.h>
 #include <mach/hardware.h>
index 180975244f96ece792c2f21ffc21ecc13da5fe39..fc0ba183fe1233dcd9165502281928e98b56775e 100644 (file)
 #include <linux/time.h>
 #include <linux/timex.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 
 #include <asm/system.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include <asm/mach/time.h>
 #include <asm/errno.h>
index e8ee7ec9ff6dda45d0a0793c9887b37b2592769a..e484f609feda8b1da86ffaeecf3f9243e822bcb8 100644 (file)
@@ -210,6 +210,7 @@ config MACH_ARMCORE
        bool "CompuLab CM-X270 modules"
        select PXA27x
        select IWMMXT
+       select ZONE_DMA if PCI
 
 config MACH_MAGICIAN
        bool "Enable HTC Magician Support"
index 123a950db4661704d6ac7acf5b8fcceecc4a226c..fe5f1ba6c34b8bfbb53a274605540db4d445eb53 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/mmc/host.h>
 #include <linux/pm.h>
 #include <linux/backlight.h>
+#include <linux/io.h>
 #include <video/w100fb.h>
 
 #include <asm/setup.h>
@@ -28,7 +29,6 @@
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/system.h>
 
 #include <asm/mach/arch.h>
index 07acc1b2385795e71aaae6d007482a499a044388..418d4dfd44ab88ff50ac206e90f11dcb96cc6ae5 100644 (file)
 #include <linux/module.h>
 #include <linux/irq.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <asm/gpio.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <mach/pxa-regs.h>
 #include <mach/pxa2xx-gpio.h>
 
index e89df4d0d23999278dfdab688ed76aa3ecfc07d9..a1a0a2ffd642299bcbf1cb498aa721a72b16ebe9 100644 (file)
@@ -62,6 +62,8 @@
 
 #ifndef __ASSEMBLY__
 
+#include <asm/cputype.h>
+
 #ifdef CONFIG_PXA25x
 #define __cpu_is_pxa21x(id)                            \
        ({                                              \
index 9996c612c3d685d2ed749578f118b93262bfb6cc..31d78855aac8824b637130a0e56248d08c4a50ec 100644 (file)
@@ -7,7 +7,7 @@
 #include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/gpio.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <asm/proc-fns.h>
 
 #include <mach/pxa-regs.h>
index cd39005c98ff2279124a2b23d00b4fb79eae41a3..73a2da0065f510a074f90fe97e35ae839ca661bb 100644 (file)
 #include <linux/mmc/host.h>
 #include <linux/pm.h>
 #include <linux/backlight.h>
+#include <linux/io.h>
 
 #include <asm/setup.h>
 #include <asm/memory.h>
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/system.h>
 
 #include <asm/mach/arch.h>
index 9bd93c5f28b2eb81d9947510c85f463a29c378b7..2c31ec72568856019be0482d9dc4fa2a730dcb01 100644 (file)
@@ -28,8 +28,8 @@
 #include <linux/clk.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <mach/hardware.h>
 #include <mach/ssp.h>
index 4f9c84ab781c35ecf74fe5022ea5e1555fae4a80..2f04d54711e7b86ad204a0916ba012e5234d91fd 100644 (file)
 #include <linux/amba/clcd.h>
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
+#include <linux/io.h>
 
 #include <asm/system.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/leds.h>
 #include <asm/hardware/arm_timer.h>
index 33dbbb41a6638b23c141fb4598c7b1a59bf0004f..3cea92c70d8f1df407e3b7f10da4d0470ab5ee0d 100644 (file)
@@ -23,9 +23,9 @@
 #define __ASM_ARCH_REALVIEW_H
 
 #include <linux/amba/bus.h>
+#include <linux/io.h>
 
 #include <asm/leds.h>
-#include <asm/io.h>
 
 #define AMBA_DEVICE(name,busid,base,plat)                      \
 static struct amba_device name##_device = {                    \
index 4d3c8f3f80537d99888f77660e9c7b32d7408743..a2f61c78adbf26cadb3ce184c4eb927edba53b32 100644 (file)
@@ -21,8 +21,8 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <mach/platform.h>
 
 static inline void arch_idle(void)
index 82fa1f26e026299d4c75c3365aeff9441c9955c9..44d178cd573342b5cc3578353c18b724e9b4f1e8 100644 (file)
 #include <linux/percpu.h>
 #include <linux/clockchips.h>
 #include <linux/irq.h>
+#include <linux/io.h>
 
 #include <asm/hardware/arm_twd.h>
 #include <asm/hardware/gic.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 static DEFINE_PER_CPU(struct clock_event_device, local_clockevent);
index 1907d22f4fed55f069320c43b8624f72bb54d149..e102aeb0f76e8d6abdd69e8458b12a11d597a3ce 100644 (file)
 #include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/smp.h>
+#include <linux/io.h>
 
 #include <asm/cacheflush.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 
 #include <mach/board-eb.h>
index 19a9968fc5b9bc5671035e71557e7aa324370ccf..eb829eb1ebe29dceb394952205fae68e52575c47 100644 (file)
@@ -23,9 +23,9 @@
 #include <linux/platform_device.h>
 #include <linux/sysdev.h>
 #include <linux/amba/bus.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
index 0986cbd1594358cdfe5679c0bec93481d17c6d53..cccdb3eb90fe94e0a41ffb6e30171759a6a3fe53 100644 (file)
@@ -23,9 +23,9 @@
 #include <linux/platform_device.h>
 #include <linux/sysdev.h>
 #include <linux/amba/bus.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
index f4e7135e3eb581d80a9f393074e16e39157e4761..8b863148ec18b2b55f3571aa713d3bb787630ed5 100644 (file)
@@ -23,9 +23,9 @@
 #include <linux/platform_device.h>
 #include <linux/sysdev.h>
 #include <linux/amba/bus.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
index 4b19fe48419086c35584616b3af78459180d9500..7958a30f8932a5a418149ccd857f805b1f56af47 100644 (file)
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/dma-mapping.h>
+#include <linux/io.h>
 
 #include <asm/page.h>
 #include <asm/dma.h>
 #include <asm/fiq.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <mach/hardware.h>
 #include <asm/uaccess.h>
index 05425d558ee794518be2bc4508fd48fd20c59d84..9bf7e43e286337f8847a59c79c96303a022d9f45 100644 (file)
 #define FLUSH_BASE_PHYS                0x00000000
 #define FLUSH_BASE             0xdf000000
 
+/*
+ * Sparsemem support.  Each section is a maximum of 64MB.  The sections
+ * are offset by 128MB and can cover 128MB, so that gives us a maximum
+ * of 29 physmem bits.
+ */
+#define MAX_PHYSMEM_BITS       29
+#define SECTION_SIZE_BITS      26
+
 #endif
index 54d6e3f2d3193133616eb3b547a6647ecafb5a82..bd7268ba17e2345dc0cba728523f063810bff637 100644 (file)
@@ -7,9 +7,9 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <asm/hardware/iomd.h>
-#include <asm/io.h>
 
 static inline void arch_idle(void)
 {
index baa9c866d7bf6cb137e7b249b84dcdabb88fa872..d5862368c4f20853a8b333d8ca1ab68bf2771ac0 100644 (file)
@@ -9,8 +9,8 @@
  */
 #define VIDMEM ((char *)SCREEN_START)
  
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/page.h>
 
index 7a029621db433a8199a9ccb33513057aa4566505..9dd15d679c5dd8b1833aae625a7a3fd218870364 100644 (file)
@@ -1,10 +1,10 @@
 #include <linux/init.h>
 #include <linux/list.h>
+#include <linux/io.h>
 
 #include <asm/mach/irq.h>
 #include <asm/hardware/iomd.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 static void iomd_ack_irq_a(unsigned int irq)
 {
index ce8470fea8873c4dd14fc262479779ff08b01a31..e88d417736af1225cdadca8825ff43e000958712 100644 (file)
@@ -18,9 +18,9 @@
 #include <linux/device.h>
 #include <linux/serial_8250.h>
 #include <linux/ata_platform.h>
+#include <linux/io.h>
 
 #include <asm/elf.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
 #include <asm/page.h>
index 148d0ddef3e87843134200e39d74fc6208f23619..7a7ed4174c8c8c3f65608c206b37974a4c87dbe4 100644 (file)
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <mach/regs-gpio.h>
 
index c66021b5fa4d055a76ce2a7c5afb7960d0964a98..604224a2d9a6136eb295d9dd86aa13e8eca87fd9 100644 (file)
 #include <linux/module.h>
 #include <linux/ioport.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <asm/mach-types.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/mach/irq.h>
 
index 1322851d1acb031bd441e2f4a433de6d68dad8db..fef646c36b540600576e83f4e982e2983302099b 100644 (file)
 #include <linux/mutex.h>
 #include <linux/delay.h>
 #include <linux/serial_core.h>
+#include <linux/io.h>
 
 #include <asm/mach/map.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <asm/plat-s3c/regs-serial.h>
 #include <mach/regs-clock.h>
index c6eefb1d590c3028022bcecbf378cb0b3244f35f..36a3132f39e72367d7a372c0c11d642bc57b4e3f 100644 (file)
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <mach/regs-gpio.h>
 
index ec2defebf0d51c63909e799ccf75fb85f7bb6086..43535a0e718699ca063b648ce37443fd68e6d5aa 100644 (file)
@@ -11,7 +11,7 @@
 */
 
 #include <mach/hardware.h>
-#include <asm/io.h>
+#include <linux/io.h>
 
 #include <asm/plat-s3c/regs-watchdog.h>
 #include <mach/regs-clock.h>
index e9f676bc01167c233e7c82688baf2a745519c4d8..a8cbca6701e54faf00e940b5db0c1ed1fbc8fd21 100644 (file)
@@ -10,8 +10,8 @@
  * published by the Free Software Foundation.
 */
 
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <mach/map.h>
 #include <mach/idle.h>
index f0de3c23ce782e2ac024880ebff29dd33a43cacc..527f88a288ec4ea094ffb4dc63e2a27e5c606b46 100644 (file)
@@ -36,6 +36,7 @@
 #include <linux/platform_device.h>
 #include <linux/proc_fs.h>
 #include <linux/serial_core.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -43,7 +44,6 @@
 #include <asm/mach/flash.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 #include <mach/fb.h>
index 24c6334fac89f05118f2c7969a84921b0abb3c50..e4368e6e7e6c9ac6b70c735c770bb747b2f65b2b 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/dm9000.h>
 #include <linux/ata_platform.h>
 #include <linux/i2c.h>
+#include <linux/io.h>
 
 #include <net/ax88796.h>
 
@@ -34,7 +35,6 @@
 #include <mach/bast-cpld.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index e35933a46d10690c1f8da015fdaba208bca2ea55..85e710f2863b37ec9a3edf21df100741f96c1f4a 100644 (file)
 #include <linux/sysdev.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 80fe2ed0775c86513141af4ed8d2a5d953809beb..3ece2d04934e20ce90ec6c2b4ac7bc67846e03fa 100644 (file)
@@ -25,9 +25,9 @@
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
 #include <linux/timer.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 606ee15911b6e5d1cb20bff427fb19e58108e17c..c4dfe3eabe1d87a21e0bc741284a707e0495b031 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -25,7 +26,6 @@
 #include <mach/otom-map.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 7d34844debded6fbc865b77bbb463a0d147b74dd..97c13192315ba8ae60140250e7648ab8b66ef0be 100644 (file)
@@ -32,7 +32,7 @@
 #include <linux/serial_core.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/spi_bitbang.h>
-
+#include <linux/io.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/nand_ecc.h>
@@ -43,7 +43,6 @@
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index b88939d72282bfb6ed53ea89d397de096ef94e8d..d49e58acb03b033eaaacaf15accb8bd75c88ee14 100644 (file)
 #include <linux/init.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index ec87306a8c247b406dd74f7196eb06f5826cfa60..cc2e79fe4f9f6a3e7abca47fccd91f8ae6c6c4cb 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/device.h>
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -40,7 +41,6 @@
 #include <asm/mach/flash.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index fbc0213d5485eb8cc9ce32f328a9647d639f82ec..ed3acb05c8553253a1598ef52c50c5907cb043a7 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/tty.h>
 #include <linux/serial_8250.h>
 #include <linux/serial_reg.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -36,7 +37,6 @@
 #include <mach/vr1000-cpld.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index ba43ff9e81646616acac13ce2de1e5a9d48e9414..733f8a22777536c43339cf9cb2d3ae2b0ccf42c9 100644 (file)
@@ -25,9 +25,9 @@
 #include <linux/errno.h>
 #include <linux/time.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <asm/mach-types.h>
 
index 5d977f9c88acf3cb462df6bdd0cac4bf3899653c..b1e658c917a07840171c85601a120a420bb0a941 100644 (file)
 #include <linux/sysdev.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <mach/regs-clock.h>
index 4dacf8a1750d3dd45acc503263b3ef1fa90f8efc..eb6fc0bfd47ecd8f1e28f7b4e49fc0d31dedcb86 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -32,7 +33,6 @@
 #include <mach/regs-gpio.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <asm/plat-s3c24xx/devs.h>
index af4b2ce516f99777340f5fe70afd91692bac6a93..5fbaac6054f8a0ce3fb9f94163308a42074f9d4a 100644 (file)
 #include <linux/mutex.h>
 #include <linux/delay.h>
 #include <linux/serial_core.h>
+#include <linux/io.h>
 
 #include <asm/mach/map.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <asm/plat-s3c/regs-serial.h>
 #include <mach/regs-clock.h>
index 22fc04a3b5339b4ffa9a06fb5820395663250697..dcfff6b8b95854c173211b70d2babfb740cc75ea 100644 (file)
 #include <linux/init.h>
 #include <linux/sysdev.h>
 #include <linux/serial_core.h>
+#include <linux/io.h>
 
 #include <asm/dma.h>
 #include <mach/dma.h>
-#include <asm/io.h>
 
 #include <asm/plat-s3c24xx/dma.h>
 #include <asm/plat-s3c24xx/cpu.h>
index ac62b79044f4a06b83a2ad115942c2dd54ed04d6..1686950fa557cdecee49802630be838a30fee4d4 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/mach/irq.h>
 
index 80affb1ee4cd4c07471a29396dbed844b5c1fbe8..8f8d9117b968d0d77635da2e4a563783c001d5dc 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/init.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -27,7 +28,6 @@
 #include <mach/hardware.h>
 #include <asm/hardware/iomd.h>
 #include <asm/setup.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 7a08b37899150d736d22d214b629ab6083b7e7cc..bb9bf63b2e02d0564fffbbe2cf86a15cb52ee60f 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/init.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
-
+#include <linux/io.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/nand_ecc.h>
@@ -29,7 +29,6 @@
 
 #include <mach/hardware.h>
 #include <asm/setup.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 737523a4e037dba09ab6bebb6f2116c7b823158b..9540ef752f73c2da727a7b74b096981d4b450031 100644 (file)
@@ -18,9 +18,9 @@
 #include <linux/init.h>
 #include <linux/sysdev.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <mach/regs-power.h>
index d278010b9f60ffdbf5250e4a1dbf79665dd4ffb8..42440fc5568192e225a8a5aa46b8d7e6c260251a 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/sysdev.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -27,7 +28,6 @@
 
 #include <mach/hardware.h>
 #include <asm/proc-fns.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <mach/reset.h>
index 95567e6daea122be7af71b81624249e4750e576e..40503a65bacfffa51b5199a14eac13868f31ef9e 100644 (file)
 #include <linux/ioport.h>
 #include <linux/mutex.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/atomic.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <mach/regs-clock.h>
 
index c0c67438d0a432c72197477cf4d35b3eaacea4b5..4f7d06baf0d377a7c1427820c413c6cb574dc6e0 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <mach/regs-gpio.h>
index 276b823f4e27f0130b3a141ec16f8e603fe46932..93fff75220cfa06287e11d39fd1df51a694916bd 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/mach/irq.h>
 
index 441f4bc094729a8a04d82cdf699a74007dec7163..19eb0e5269ac3bf7e458563a1fe92ae2decd3c02 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/platform_device.h>
 #include <linux/ata_platform.h>
 #include <linux/i2c.h>
-
+#include <linux/io.h>
 #include <linux/sm501.h>
 #include <linux/sm501-regs.h>
 
@@ -32,7 +32,6 @@
 #include <mach/anubis-cpld.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 1a5e7027b41b96b1cdd12fe0bda7721a6ccb3a28..49e828d1d4d852e33a425424481938e572b08975 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/string.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <linux/mtd/map.h>
 
@@ -30,7 +31,6 @@
 
 #include <asm/setup.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 8b83f93b6102ae7aa0cbe7b703a4096cd4ee3284..85144aa52c276e7449dee5266e48a4fc36170a27 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/serial_core.h>
 #include <linux/clk.h>
 #include <linux/i2c.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -29,7 +30,6 @@
 #include <mach/osiris-cpld.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index e0b07e6a0a18507d9df8768acdd9068966d816fd..a4c690456d19a40f3ffcb72a08905f2292cb429c 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/platform_device.h>
 #include <linux/serial_core.h>
 #include <linux/serial.h>
-
+#include <linux/io.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/nand_ecc.h>
@@ -34,7 +34,6 @@
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 327c8f371984b8eedd9a0cdeee4e54543e380106..7ac60b869e7fde7dfe708b1972072102b9359ee6 100644 (file)
 #include <linux/init.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index d6b9a92d284ed09dbfdfae8475e75693ac9c2d05..c81cdb330712cdb3bc16ac708fe4fba4b6b255cd 100644 (file)
 #include <linux/serial_core.h>
 #include <linux/sysdev.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <asm/plat-s3c24xx/s3c2440.h>
index 569b5c3d334aebf20c465b2139812433baf2b3d2..18f2ce4d7b23b7667b6748627fe0daa1cf25092a 100644 (file)
 #include <linux/ioport.h>
 #include <linux/mutex.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/atomic.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <mach/regs-clock.h>
 
index 6a8d7cced4a26c6244e62d45736996fc1c12af14..603b5ea1deab4b96b0a267a816ccfc7c89f6953a 100644 (file)
 #include <linux/mutex.h>
 #include <linux/delay.h>
 #include <linux/serial_core.h>
+#include <linux/io.h>
 
 #include <asm/mach/map.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <mach/regs-s3c2443-clock.h>
 
index c1ff03aebfda5f4b6be68dab3bddc7daa43e699f..5d9ee772659bd73ca696415d205522e6a31fac1c 100644 (file)
 #include <linux/init.h>
 #include <linux/sysdev.h>
 #include <linux/serial_core.h>
+#include <linux/io.h>
 
 #include <asm/dma.h>
 #include <mach/dma.h>
-#include <asm/io.h>
 
 #include <asm/plat-s3c24xx/dma.h>
 #include <asm/plat-s3c24xx/cpu.h>
index 9674de7223fdba311aad83f499064f4f6575dc41..bd89c8361b3c0abb6a0328941265daa8150c293e 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/mach/irq.h>
 
index e3c0d587bd10c20eeee945094d96b28a5e918637..f0d119dc040906838fadedcc73d940e2946450da 100644 (file)
 #include <linux/init.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 37793f924b5e34f8a6318a08c670225c2b9a3996..c973b68cc7358c4c01f57b18ad41bd063ae2947b 100644 (file)
 #include <linux/serial_core.h>
 #include <linux/sysdev.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <mach/regs-s3c2443-clock.h>
index da3a898a6d66e70c115a7e904efe7cede6ae8a39..f7fa03478efd9e7c203c72363696e8651209499d 100644 (file)
@@ -88,6 +88,8 @@
 #include <linux/init.h>
 #include <linux/cpufreq.h>
 
+#include <asm/cputype.h>
+
 #include <mach/hardware.h>
 
 #include "generic.h"
@@ -240,7 +242,7 @@ static struct cpufreq_driver sa1100_driver = {
 
 static int __init sa1100_dram_init(void)
 {
-       if ((processor_id & CPU_SA1100_MASK) == CPU_SA1100_ID)
+       if (cpu_is_sa1100())
                return cpufreq_register_driver(&sa1100_driver);
        else
                return -ENODEV;
index 029dbfbbafcf6e6d2ead0e6aa9ddb4b26a9ed22e..3e4fb214eada2d541cf148468f8951de2be457b5 100644 (file)
 #include <linux/cpufreq.h>
 #include <linux/delay.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
+#include <asm/cputype.h>
 #include <asm/mach-types.h>
-#include <asm/io.h>
 #include <asm/system.h>
 
 #include "generic.h"
index 62aaf04a390674b477c6d063165641ef428d3c53..4f7ea012e1e57e3f676db5f832579d9ed98e3f81 100644 (file)
                                        /* active display mode)            */
 #define LCCR3_OutEnH   (LCCR3_OEP*0)   /*  Output Enable active High      */
 #define LCCR3_OutEnL   (LCCR3_OEP*1)   /*  Output Enable active Low       */
-
-#ifndef __ASSEMBLY__
-extern unsigned int processor_id;
-#endif
-
-#define CPU_REVISION   (processor_id & 15)
-#define CPU_SA1110_A0  (0)
-#define CPU_SA1110_B0  (4)
-#define CPU_SA1110_B1  (5)
-#define CPU_SA1110_B2  (6)
-#define CPU_SA1110_B4  (8)
-
-#define CPU_SA1100_ID  (0x4401a110)
-#define CPU_SA1100_MASK        (0xfffffff0)
-#define CPU_SA1110_ID  (0x6901b110)
-#define CPU_SA1110_MASK        (0xfffffff0)
index 5976435f42c294c008d25d10518577371476b55d..b70846c096aa0f1755290fa1b5cdb2b4f837e5e4 100644 (file)
 #define io_v2p( x )             \
    ( (((x)&0x00ffffff) | (((x)&(0x30000000>>VIO_SHIFT))<<VIO_SHIFT)) + PIO_START )
 
+#define CPU_SA1110_A0  (0)
+#define CPU_SA1110_B0  (4)
+#define CPU_SA1110_B1  (5)
+#define CPU_SA1110_B2  (6)
+#define CPU_SA1110_B4  (8)
+
+#define CPU_SA1100_ID  (0x4401a110)
+#define CPU_SA1100_MASK        (0xfffffff0)
+#define CPU_SA1110_ID  (0x6901b110)
+#define CPU_SA1110_MASK        (0xfffffff0)
+
 #ifndef __ASSEMBLY__
 
+#include <asm/cputype.h>
+
+#define CPU_REVISION   (read_cpuid_id() & 15)
+
+#define cpu_is_sa1100()        ((read_cpuid_id() & CPU_SA1100_MASK) == CPU_SA1100_ID)
+#define cpu_is_sa1110()        ((read_cpuid_id() & CPU_SA1110_MASK) == CPU_SA1110_ID)
+
 # define __REG(x)      (*((volatile unsigned long *)io_p2v(x)))
 # define __PREG(x)     (io_v2p((unsigned long)&(x)))
 
index 29f639e2afc6a1180004e115fd2e3eaa58170372..1c127b68581d6e2ef2ec2be79792d0f4e63a1785 100644 (file)
@@ -40,23 +40,21 @@ void sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes);
 #define __bus_to_virt(x)        __phys_to_virt(x)
 
 /*
- * Because of the wide memory address space between physical RAM banks on the 
- * SA1100, it's much convenient to use Linux's NUMA support to implement our 
- * memory map representation.  Assuming all memory nodes have equal access 
+ * Because of the wide memory address space between physical RAM banks on the
+ * SA1100, it's much convenient to use Linux's SparseMEM support to implement
+ * our memory map representation.  Assuming all memory nodes have equal access
  * characteristics, we then have generic discontiguous memory support.
  *
- * Of course, all this isn't mandatory for SA1100 implementations with only
- * one used memory bank.  For those, simply undefine CONFIG_DISCONTIGMEM.
- *
- * The nodes are matched with the physical memory bank addresses which are 
- * incidentally the same as virtual addresses.
+ * The sparsemem banks are matched with the physical memory bank addresses
+ * which are incidentally the same as virtual addresses.
  * 
  *     node 0:  0xc0000000 - 0xc7ffffff
  *     node 1:  0xc8000000 - 0xcfffffff
  *     node 2:  0xd0000000 - 0xd7ffffff
  *     node 3:  0xd8000000 - 0xdfffffff
  */
-#define NODE_MEM_SIZE_BITS     27
+#define MAX_PHYSMEM_BITS       32
+#define SECTION_SIZE_BITS      27
 
 /*
  * Cache flushing area - SA1100 zero bank
index ec519ecfef1bcc6429146d3b779bdc80b04a21b5..e45d3a1890bcee7faaf6d23f406aa055726e4c10 100644 (file)
@@ -8,11 +8,10 @@
 #include <linux/ioport.h>
 #include <linux/platform_device.h>
 #include <linux/irq.h>
-
+#include <linux/io.h>
 #include <linux/mtd/partitions.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 
index 8dd63531795928d394db43f96fe24e004c983136..3c74534f7fee427221f38733d3aee96dcbddc134 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/platform_device.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
+#include <linux/io.h>
 
 #include <asm/irq.h>
 #include <mach/hardware.h>
@@ -27,7 +28,6 @@
 
 #include <linux/serial_core.h>
 #include <linux/ioport.h>
-#include <asm/io.h>
 
 #include "generic.h"
 
index 641f361c56f4858e15763a240e70909e80a08e7a..b20ff93b84a5a48d26e0e3cc858c803d23cdfdc1 100644 (file)
@@ -17,8 +17,8 @@
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <mach/hardware.h>
 #include <asm/hardware/ssp.h>
index 09d9f33d4072fb591c8f4b1c2f2b90894ef86c70..a9400d98445160e9f6b61f9d6efd852373cfe404 100644 (file)
@@ -9,10 +9,10 @@
 #include <linux/irq.h>
 #include <linux/sched.h>
 #include <linux/serial_8250.h>
+#include <linux/io.h>
 
 #include <asm/setup.h>
 #include <asm/mach-types.h>
-#include <asm/io.h>
 #include <asm/leds.h>
 #include <asm/param.h>
 
index 85aceef6f87459bc7e75c7983bbe7c091f56b5ab..e45bd734a03e2e02475d1c9c29eb488e7c85b682 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
-#include <asm/io.h>
+#include <linux/io.h>
 
 static void arch_reset(char mode)
 {
index 44b0811b400cc2a89a3f6ad08e2534b137a1973f..c04eb6a1e2be1762c627d250c2ab6c8d3762ce70 100644 (file)
@@ -11,9 +11,9 @@
 #include <linux/init.h>
 #include <linux/fs.h>
 #include <linux/interrupt.h>
+#include <linux/io.h>
 
 #include <asm/irq.h>
-#include <asm/io.h>
 #include <asm/mach/irq.h>
 
 /*
index b1896471aa3c88f39887f7584ff98f00bd834679..8bd8d6bb4d922d77f7db4202cb9471c64b4131de 100644 (file)
 #include <linux/init.h>
 #include <linux/spinlock.h>
 #include <linux/ioport.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/leds.h>
-#include <asm/io.h>
 #include <asm/system.h>
 
 #define LED_STATE_ENABLED      1
index d75e795c893e494b725f4ad177350651e32a60e6..534f93282177034145f05c4f3549b1f894ab40cd 100644 (file)
 #include <linux/amba/clcd.h>
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
+#include <linux/io.h>
 
 #include <asm/cnt32_to_63.h>
 #include <asm/system.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/leds.h>
 #include <asm/hardware/arm_timer.h>
index 91fa559c7cca3e6097369a47391e4d276e5f9a6d..c59e6100c7e377744ede2095f67220a27ba84e90 100644 (file)
@@ -21,8 +21,8 @@
 #ifndef __ASM_ARCH_SYSTEM_H
 #define __ASM_ARCH_SYSTEM_H
 
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <mach/platform.h>
 
 static inline void arch_idle(void)
index 36f23f8965034a50ea3a4fd2de3c38c71f9fe13a..7161ba23b58a6e2776852abf7eb5a8b857993cd5 100644 (file)
@@ -21,9 +21,9 @@
 #include <linux/interrupt.h>
 #include <linux/spinlock.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/system.h>
 #include <asm/mach/pci.h>
index 76375c64413ac010175cbf43381055f775878752..bb8ec7724f79b3cc27a3dc40bf2b6efb5d11736c 100644 (file)
@@ -23,9 +23,9 @@
 #include <linux/device.h>
 #include <linux/sysdev.h>
 #include <linux/amba/bus.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 1725f019fc8581bec6332efecdc1d0933cdd5fa9..aa051c0884f8372f88c0a62fec88ef481032bfde 100644 (file)
@@ -23,9 +23,9 @@
 #include <linux/device.h>
 #include <linux/sysdev.h>
 #include <linux/amba/bus.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
index 2e27a8c8372b0ffb3227cb8a3ceb9a5f67514693..480f78a3611a0f96813cc0acf75a884c3c85caad 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile for the linux arm-specific parts of the memory manager.
 #
 
-obj-y                          := consistent.o extable.o fault.o init.o \
+obj-y                          := dma-mapping.o extable.o fault.o init.o \
                                   iomap.o
 
 obj-$(CONFIG_MMU)              += fault-armv.o flush.o ioremap.o mmap.o \
index eb90bce38e1411fea3cf4034593b1931faf7f8e1..2e6dc040c6543aad4728d27cbd96a033afe80951 100644 (file)
@@ -30,3 +30,4 @@ ENTRY(v7_early_abort)
         * New designs should not need to patch up faults.
         */
        mov     pc, lr
+ENDPROC(v7_early_abort)
index a7cc7f9ee45df02c28caa48d64eb447f1f8eefd3..625e580945b51580af02a3663cd2666ff74893db 100644 (file)
@@ -17,3 +17,4 @@ ENTRY(nommu_early_abort)
        mov     r0, #0                          @ clear r0, r1 (no FSR/FAR)
        mov     r1, #0
        mov     pc, lr
+ENDPROC(nommu_early_abort)
index e162cca5917fb21c72e29ae127da355c36e7cd27..133e65d166b315b0e54aba959846a162643bc927 100644 (file)
@@ -17,8 +17,8 @@
 #include <linux/string.h>
 #include <linux/proc_fs.h>
 #include <linux/init.h>
+#include <linux/uaccess.h>
 
-#include <asm/uaccess.h>
 #include <asm/unaligned.h>
 
 #include "fault.h"
index 76b800a951917d96b7aad433c344562f484743df..b480f1d3591f9b2263a74d12e1aa4fafdd1c464e 100644 (file)
@@ -18,9 +18,9 @@
  */
 #include <linux/init.h>
 #include <linux/spinlock.h>
+#include <linux/io.h>
 
 #include <asm/cacheflush.h>
-#include <asm/io.h>
 #include <asm/hardware/cache-l2x0.h>
 
 #define CACHE_LINE_SIZE                32
index 35ffc4d95997114d0f61003ca8bb669648899f93..d19c2bec2b1fe55da9ea7b114a67a2e942a24fa4 100644 (file)
@@ -66,6 +66,7 @@ finished:
        mcr     p15, 2, r10, c0, c0, 0          @ select current cache level in cssr
        isb
        mov     pc, lr
+ENDPROC(v7_flush_dcache_all)
 
 /*
  *     v7_flush_cache_all()
@@ -85,6 +86,7 @@ ENTRY(v7_flush_kern_cache_all)
        mcr     p15, 0, r0, c7, c5, 0           @ I+BTB cache invalidate
        ldmfd   sp!, {r4-r5, r7, r9-r11, lr}
        mov     pc, lr
+ENDPROC(v7_flush_kern_cache_all)
 
 /*
  *     v7_flush_cache_all()
@@ -110,6 +112,8 @@ ENTRY(v7_flush_user_cache_all)
  */
 ENTRY(v7_flush_user_cache_range)
        mov     pc, lr
+ENDPROC(v7_flush_user_cache_all)
+ENDPROC(v7_flush_user_cache_range)
 
 /*
  *     v7_coherent_kern_range(start,end)
@@ -155,6 +159,8 @@ ENTRY(v7_coherent_user_range)
        dsb
        isb
        mov     pc, lr
+ENDPROC(v7_coherent_kern_range)
+ENDPROC(v7_coherent_user_range)
 
 /*
  *     v7_flush_kern_dcache_page(kaddr)
@@ -174,6 +180,7 @@ ENTRY(v7_flush_kern_dcache_page)
        blo     1b
        dsb
        mov     pc, lr
+ENDPROC(v7_flush_kern_dcache_page)
 
 /*
  *     v7_dma_inv_range(start,end)
@@ -202,6 +209,7 @@ ENTRY(v7_dma_inv_range)
        blo     1b
        dsb
        mov     pc, lr
+ENDPROC(v7_dma_inv_range)
 
 /*
  *     v7_dma_clean_range(start,end)
@@ -219,6 +227,7 @@ ENTRY(v7_dma_clean_range)
        blo     1b
        dsb
        mov     pc, lr
+ENDPROC(v7_dma_clean_range)
 
 /*
  *     v7_dma_flush_range(start,end)
@@ -236,6 +245,7 @@ ENTRY(v7_dma_flush_range)
        blo     1b
        dsb
        mov     pc, lr
+ENDPROC(v7_dma_flush_range)
 
        __INITDATA
 
index 158bd96763d31bb5fe07792c0288e7c3fb6378bf..10b1bae1a258f782f0aaf67e128f8a8aef514672 100644 (file)
  */
 #include <linux/init.h>
 #include <linux/spinlock.h>
+#include <linux/io.h>
 
 #include <asm/system.h>
+#include <asm/cputype.h>
 #include <asm/cacheflush.h>
-#include <asm/io.h>
 
 #define CR_L2  (1 << 26)
 
index 3adb79257f43527339b9c891974d3f2a58e84ece..0e21c07675806a8be16db392e7568686205ccb1f 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/shmparam.h>
 #include <asm/tlbflush.h>
 #include <asm/cacheflush.h>
+#include <asm/cachetype.h>
 
 #include "mm.h"
 
similarity index 79%
rename from arch/arm/mm/consistent.c
rename to arch/arm/mm/dma-mapping.c
index db7b3e38ef1d1410287f8ca7a84cd435e73f5c2c..67960017dc8f1f79c40bd083205f3409cdf0fbd1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/mm/consistent.c
+ *  linux/arch/arm/mm/dma-mapping.c
  *
  *  Copyright (C) 2000-2004 Russell King
  *
@@ -512,3 +512,105 @@ void dma_cache_maint(const void *start, size_t size, int direction)
        }
 }
 EXPORT_SYMBOL(dma_cache_maint);
+
+/**
+ * dma_map_sg - map a set of SG buffers for streaming mode DMA
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @sg: list of buffers
+ * @nents: number of buffers to map
+ * @dir: DMA transfer direction
+ *
+ * Map a set of buffers described by scatterlist in streaming mode for DMA.
+ * This is the scatter-gather version of the dma_map_single interface.
+ * Here the scatter gather list elements are each tagged with the
+ * appropriate dma address and length.  They are obtained via
+ * sg_dma_{address,length}.
+ *
+ * Device ownership issues as mentioned for dma_map_single are the same
+ * here.
+ */
+int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
+               enum dma_data_direction dir)
+{
+       struct scatterlist *s;
+       int i, j;
+
+       for_each_sg(sg, s, nents, i) {
+               s->dma_address = dma_map_page(dev, sg_page(s), s->offset,
+                                               s->length, dir);
+               if (dma_mapping_error(dev, s->dma_address))
+                       goto bad_mapping;
+       }
+       return nents;
+
+ bad_mapping:
+       for_each_sg(sg, s, i, j)
+               dma_unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir);
+       return 0;
+}
+EXPORT_SYMBOL(dma_map_sg);
+
+/**
+ * dma_unmap_sg - unmap a set of SG buffers mapped by dma_map_sg
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @sg: list of buffers
+ * @nents: number of buffers to unmap (returned from dma_map_sg)
+ * @dir: DMA transfer direction (same as was passed to dma_map_sg)
+ *
+ * Unmap a set of streaming mode DMA translations.  Again, CPU access
+ * rules concerning calls here are the same as for dma_unmap_single().
+ */
+void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
+               enum dma_data_direction dir)
+{
+       struct scatterlist *s;
+       int i;
+
+       for_each_sg(sg, s, nents, i)
+               dma_unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir);
+}
+EXPORT_SYMBOL(dma_unmap_sg);
+
+/**
+ * dma_sync_sg_for_cpu
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @sg: list of buffers
+ * @nents: number of buffers to map (returned from dma_map_sg)
+ * @dir: DMA transfer direction (same as was passed to dma_map_sg)
+ */
+void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
+                       int nents, enum dma_data_direction dir)
+{
+       struct scatterlist *s;
+       int i;
+
+       for_each_sg(sg, s, nents, i) {
+               dmabounce_sync_for_cpu(dev, sg_dma_address(s), 0,
+                                       sg_dma_len(s), dir);
+       }
+}
+EXPORT_SYMBOL(dma_sync_sg_for_cpu);
+
+/**
+ * dma_sync_sg_for_device
+ * @dev: valid struct device pointer, or NULL for ISA and EISA-like devices
+ * @sg: list of buffers
+ * @nents: number of buffers to map (returned from dma_map_sg)
+ * @dir: DMA transfer direction (same as was passed to dma_map_sg)
+ */
+void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
+                       int nents, enum dma_data_direction dir)
+{
+       struct scatterlist *s;
+       int i;
+
+       for_each_sg(sg, s, nents, i) {
+               if (!dmabounce_sync_for_device(dev, sg_dma_address(s), 0,
+                                       sg_dma_len(s), dir))
+                       continue;
+
+               if (!arch_is_coherent())
+                       dma_cache_maint(sg_virt(s), s->length, dir);
+       }
+}
+EXPORT_SYMBOL(dma_sync_sg_for_device);
index 9592c3ee4cb2543002eef58f3a3298fc3606dca6..9d285626bc7da4fe3e2be2e952c38923c05f5204 100644 (file)
@@ -2,7 +2,7 @@
  *  linux/arch/arm/mm/extable.c
  */
 #include <linux/module.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 
 int fixup_exception(struct pt_regs *regs)
 {
index a8ec97b4752e129afcecbded471388af85d6ccb8..af6ed6ef9a81d3aeb654fccd8f3cf72ad9b8ab4f 100644 (file)
@@ -17,7 +17,9 @@
 #include <linux/init.h>
 #include <linux/pagemap.h>
 
+#include <asm/bugs.h>
 #include <asm/cacheflush.h>
+#include <asm/cachetype.h>
 #include <asm/pgtable.h>
 #include <asm/tlbflush.h>
 
index 28ad7ab1c0cd9cfc506623ec1dbcc91082bc9c14..2df8d9facf5741c060bb9f028c93b7c3bbe33a6e 100644 (file)
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/kprobes.h>
+#include <linux/uaccess.h>
 
 #include <asm/system.h>
 #include <asm/pgtable.h>
 #include <asm/tlbflush.h>
-#include <asm/uaccess.h>
 
 #include "fault.h"
 
@@ -72,9 +72,8 @@ void show_pte(struct mm_struct *mm, unsigned long addr)
                }
 
                pmd = pmd_offset(pgd, addr);
-#if PTRS_PER_PMD != 1
-               printk(", *pmd=%08lx", pmd_val(*pmd));
-#endif
+               if (PTRS_PER_PMD != 1)
+                       printk(", *pmd=%08lx", pmd_val(*pmd));
 
                if (pmd_none(*pmd))
                        break;
index 029ee65fda2b29ce832481fcadd36c83b475d344..0fa9bf388f0b07d504c1faaadbb9dc953e6a2e91 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/pagemap.h>
 
 #include <asm/cacheflush.h>
+#include <asm/cachetype.h>
 #include <asm/system.h>
 #include <asm/tlbflush.h>
 
index 30a69d67d673ed80f122900223249e94ec6a4890..82c4b4217989b1587a06a7acccd93ba5fc7b0c0e 100644 (file)
 
 #include "mm.h"
 
-extern void _text, _etext, __data_start, _end, __init_begin, __init_end;
-extern unsigned long phys_initrd_start;
-extern unsigned long phys_initrd_size;
+static unsigned long phys_initrd_start __initdata = 0;
+static unsigned long phys_initrd_size __initdata = 0;
+
+static void __init early_initrd(char **p)
+{
+       unsigned long start, size;
+
+       start = memparse(*p, p);
+       if (**p == ',') {
+               size = memparse((*p) + 1, p);
+
+               phys_initrd_start = start;
+               phys_initrd_size = size;
+       }
+}
+__early_param("initrd=", early_initrd);
+
+static int __init parse_tag_initrd(const struct tag *tag)
+{
+       printk(KERN_WARNING "ATAG_INITRD is deprecated; "
+               "please update your bootloader.\n");
+       phys_initrd_start = __virt_to_phys(tag->u.initrd.start);
+       phys_initrd_size = tag->u.initrd.size;
+       return 0;
+}
+
+__tagtable(ATAG_INITRD, parse_tag_initrd);
+
+static int __init parse_tag_initrd2(const struct tag *tag)
+{
+       phys_initrd_start = tag->u.initrd.start;
+       phys_initrd_size = tag->u.initrd.size;
+       return 0;
+}
+
+__tagtable(ATAG_INITRD2, parse_tag_initrd2);
 
 /*
  * This is used to pass memory configuration data from paging_init
@@ -36,10 +69,6 @@ extern unsigned long phys_initrd_size;
  */
 static struct meminfo meminfo = { 0, };
 
-#define for_each_nodebank(iter,mi,no)                  \
-       for (iter = 0; iter < mi->nr_banks; iter++)     \
-               if (mi->bank[iter].node == no)
-
 void show_mem(void)
 {
        int free = 0, total = 0, reserved = 0;
@@ -50,14 +79,15 @@ void show_mem(void)
        show_free_areas();
        for_each_online_node(node) {
                pg_data_t *n = NODE_DATA(node);
-               struct page *map = n->node_mem_map - n->node_start_pfn;
+               struct page *map = pgdat_page_nr(n, 0) - n->node_start_pfn;
 
                for_each_nodebank (i,mi,node) {
+                       struct membank *bank = &mi->bank[i];
                        unsigned int pfn1, pfn2;
                        struct page *page, *end;
 
-                       pfn1 = __phys_to_pfn(mi->bank[i].start);
-                       pfn2 = __phys_to_pfn(mi->bank[i].size + mi->bank[i].start);
+                       pfn1 = bank_pfn_start(bank);
+                       pfn2 = bank_pfn_end(bank);
 
                        page = map + pfn1;
                        end  = map + pfn2;
@@ -96,17 +126,17 @@ void show_mem(void)
 static unsigned int __init
 find_bootmap_pfn(int node, struct meminfo *mi, unsigned int bootmap_pages)
 {
-       unsigned int start_pfn, bank, bootmap_pfn;
+       unsigned int start_pfn, i, bootmap_pfn;
 
        start_pfn   = PAGE_ALIGN(__pa(&_end)) >> PAGE_SHIFT;
        bootmap_pfn = 0;
 
-       for_each_nodebank(bank, mi, node) {
+       for_each_nodebank(i, mi, node) {
+               struct membank *bank = &mi->bank[i];
                unsigned int start, end;
 
-               start = mi->bank[bank].start >> PAGE_SHIFT;
-               end   = (mi->bank[bank].size +
-                        mi->bank[bank].start) >> PAGE_SHIFT;
+               start = bank_pfn_start(bank);
+               end   = bank_pfn_end(bank);
 
                if (end < start_pfn)
                        continue;
@@ -145,13 +175,10 @@ static int __init check_initrd(struct meminfo *mi)
                initrd_node = -1;
 
                for (i = 0; i < mi->nr_banks; i++) {
-                       unsigned long bank_end;
-
-                       bank_end = mi->bank[i].start + mi->bank[i].size;
-
-                       if (mi->bank[i].start <= phys_initrd_start &&
-                           end <= bank_end)
-                               initrd_node = mi->bank[i].node;
+                       struct membank *bank = &mi->bank[i];
+                       if (bank_phys_start(bank) <= phys_initrd_start &&
+                           end <= bank_phys_end(bank))
+                               initrd_node = bank->node;
                }
        }
 
@@ -171,19 +198,17 @@ static inline void map_memory_bank(struct membank *bank)
 #ifdef CONFIG_MMU
        struct map_desc map;
 
-       map.pfn = __phys_to_pfn(bank->start);
-       map.virtual = __phys_to_virt(bank->start);
-       map.length = bank->size;
+       map.pfn = bank_pfn_start(bank);
+       map.virtual = __phys_to_virt(bank_phys_start(bank));
+       map.length = bank_phys_size(bank);
        map.type = MT_MEMORY;
 
        create_mapping(&map);
 #endif
 }
 
-static unsigned long __init
-bootmem_init_node(int node, int initrd_node, struct meminfo *mi)
+static unsigned long __init bootmem_init_node(int node, struct meminfo *mi)
 {
-       unsigned long zone_size[MAX_NR_ZONES], zhole_size[MAX_NR_ZONES];
        unsigned long start_pfn, end_pfn, boot_pfn;
        unsigned int boot_pages;
        pg_data_t *pgdat;
@@ -199,8 +224,8 @@ bootmem_init_node(int node, int initrd_node, struct meminfo *mi)
                struct membank *bank = &mi->bank[i];
                unsigned long start, end;
 
-               start = bank->start >> PAGE_SHIFT;
-               end = (bank->start + bank->size) >> PAGE_SHIFT;
+               start = bank_pfn_start(bank);
+               end = bank_pfn_end(bank);
 
                if (start_pfn > start)
                        start_pfn = start;
@@ -230,8 +255,11 @@ bootmem_init_node(int node, int initrd_node, struct meminfo *mi)
        pgdat = NODE_DATA(node);
        init_bootmem_node(pgdat, boot_pfn, start_pfn, end_pfn);
 
-       for_each_nodebank(i, mi, node)
-               free_bootmem_node(pgdat, mi->bank[i].start, mi->bank[i].size);
+       for_each_nodebank(i, mi, node) {
+               struct membank *bank = &mi->bank[i];
+               free_bootmem_node(pgdat, bank_phys_start(bank), bank_phys_size(bank));
+               memory_present(node, bank_pfn_start(bank), bank_pfn_end(bank));
+       }
 
        /*
         * Reserve the bootmem bitmap for this node.
@@ -239,31 +267,39 @@ bootmem_init_node(int node, int initrd_node, struct meminfo *mi)
        reserve_bootmem_node(pgdat, boot_pfn << PAGE_SHIFT,
                             boot_pages << PAGE_SHIFT, BOOTMEM_DEFAULT);
 
-       /*
-        * Reserve any special node zero regions.
-        */
-       if (node == 0)
-               reserve_node_zero(pgdat);
+       return end_pfn;
+}
 
+static void __init bootmem_reserve_initrd(int node)
+{
 #ifdef CONFIG_BLK_DEV_INITRD
-       /*
-        * If the initrd is in this node, reserve its memory.
-        */
-       if (node == initrd_node) {
-               int res = reserve_bootmem_node(pgdat, phys_initrd_start,
-                                    phys_initrd_size, BOOTMEM_EXCLUSIVE);
-
-               if (res == 0) {
-                       initrd_start = __phys_to_virt(phys_initrd_start);
-                       initrd_end = initrd_start + phys_initrd_size;
-               } else {
-                       printk(KERN_ERR
-                               "INITRD: 0x%08lx+0x%08lx overlaps in-use "
-                               "memory region - disabling initrd\n",
-                               phys_initrd_start, phys_initrd_size);
-               }
+       pg_data_t *pgdat = NODE_DATA(node);
+       int res;
+
+       res = reserve_bootmem_node(pgdat, phys_initrd_start,
+                            phys_initrd_size, BOOTMEM_EXCLUSIVE);
+
+       if (res == 0) {
+               initrd_start = __phys_to_virt(phys_initrd_start);
+               initrd_end = initrd_start + phys_initrd_size;
+       } else {
+               printk(KERN_ERR
+                       "INITRD: 0x%08lx+0x%08lx overlaps in-use "
+                       "memory region - disabling initrd\n",
+                       phys_initrd_start, phys_initrd_size);
        }
 #endif
+}
+
+static void __init bootmem_free_node(int node, struct meminfo *mi)
+{
+       unsigned long zone_size[MAX_NR_ZONES], zhole_size[MAX_NR_ZONES];
+       unsigned long start_pfn, end_pfn;
+       pg_data_t *pgdat = NODE_DATA(node);
+       int i;
+
+       start_pfn = pgdat->bdata->node_min_pfn;
+       end_pfn = pgdat->bdata->node_low_pfn;
 
        /*
         * initialise the zones within this node.
@@ -284,7 +320,7 @@ bootmem_init_node(int node, int initrd_node, struct meminfo *mi)
         */
        zhole_size[0] = zone_size[0];
        for_each_nodebank(i, mi, node)
-               zhole_size[0] -= mi->bank[i].size >> PAGE_SHIFT;
+               zhole_size[0] -= bank_pfn_size(&mi->bank[i]);
 
        /*
         * Adjust the sizes according to any special requirements for
@@ -293,21 +329,12 @@ bootmem_init_node(int node, int initrd_node, struct meminfo *mi)
        arch_adjust_zones(node, zone_size, zhole_size);
 
        free_area_init_node(node, zone_size, start_pfn, zhole_size);
-
-       return end_pfn;
 }
 
 void __init bootmem_init(struct meminfo *mi)
 {
        unsigned long memend_pfn = 0;
-       int node, initrd_node, i;
-
-       /*
-        * Invalidate the node number for empty or invalid memory banks
-        */
-       for (i = 0; i < mi->nr_banks; i++)
-               if (mi->bank[i].size == 0 || mi->bank[i].node >= MAX_NUMNODES)
-                       mi->bank[i].node = -1;
+       int node, initrd_node;
 
        memcpy(&meminfo, mi, sizeof(meminfo));
 
@@ -320,9 +347,19 @@ void __init bootmem_init(struct meminfo *mi)
         * Run through each node initialising the bootmem allocator.
         */
        for_each_node(node) {
-               unsigned long end_pfn;
+               unsigned long end_pfn = bootmem_init_node(node, mi);
 
-               end_pfn = bootmem_init_node(node, initrd_node, mi);
+               /*
+                * Reserve any special node zero regions.
+                */
+               if (node == 0)
+                       reserve_node_zero(NODE_DATA(node));
+
+               /*
+                * If the initrd is in this node, reserve its memory.
+                */
+               if (node == initrd_node)
+                       bootmem_reserve_initrd(node);
 
                /*
                 * Remember the highest memory PFN.
@@ -331,6 +368,19 @@ void __init bootmem_init(struct meminfo *mi)
                        memend_pfn = end_pfn;
        }
 
+       /*
+        * sparse_init() needs the bootmem allocator up and running.
+        */
+       sparse_init();
+
+       /*
+        * Now free memory in each node - free_area_init_node needs
+        * the sparse mem_map arrays initialized by sparse_init()
+        * for memmap_init_zone(), otherwise all PFNs are invalid.
+        */
+       for_each_node(node)
+               bootmem_free_node(node, mi);
+
        high_memory = __va(memend_pfn << PAGE_SHIFT);
 
        /*
@@ -401,7 +451,9 @@ static void __init free_unused_memmap_node(int node, struct meminfo *mi)
         * information on the command line.
         */
        for_each_nodebank(i, mi, node) {
-               bank_start = mi->bank[i].start >> PAGE_SHIFT;
+               struct membank *bank = &mi->bank[i];
+
+               bank_start = bank_pfn_start(bank);
                if (bank_start < prev_bank_end) {
                        printk(KERN_ERR "MEM: unordered memory banks.  "
                                "Not freeing memmap.\n");
@@ -415,8 +467,7 @@ static void __init free_unused_memmap_node(int node, struct meminfo *mi)
                if (prev_bank_end && prev_bank_end != bank_start)
                        free_memmap(node, prev_bank_end, bank_start);
 
-               prev_bank_end = (mi->bank[i].start +
-                                mi->bank[i].size) >> PAGE_SHIFT;
+               prev_bank_end = bank_pfn_end(bank);
        }
 }
 
@@ -461,8 +512,8 @@ void __init mem_init(void)
 
        num_physpages = 0;
        for (i = 0; i < meminfo.nr_banks; i++) {
-               num_physpages += meminfo.bank[i].size >> PAGE_SHIFT;
-               printk(" %ldMB", meminfo.bank[i].size >> 20);
+               num_physpages += bank_pfn_size(&meminfo.bank[i]);
+               printk(" %ldMB", bank_phys_size(&meminfo.bank[i]) >> 20);
        }
 
        printk(" = %luMB total\n", num_physpages >> (20 - PAGE_SHIFT));
index 7429f8c01015ffaff33372c67057f78aeba25e1d..ffad039cbb73fe69853a651e41ca3b7733a4256a 100644 (file)
@@ -7,8 +7,7 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/ioport.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #ifdef __io
 void __iomem *ioport_map(unsigned long port, unsigned int nr)
index b81dbf9ffb77b3f28a9b0ad872341fdad3656ca6..8a41912ec7c525c4bd185356b89261091595f7bb 100644 (file)
 #include <linux/errno.h>
 #include <linux/mm.h>
 #include <linux/vmalloc.h>
+#include <linux/io.h>
 
+#include <asm/cputype.h>
 #include <asm/cacheflush.h>
-#include <asm/io.h>
 #include <asm/mmu_context.h>
 #include <asm/pgalloc.h>
 #include <asm/tlbflush.h>
@@ -332,15 +333,14 @@ __arm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
 }
 EXPORT_SYMBOL(__arm_ioremap);
 
-void __iounmap(volatile void __iomem *addr)
+void __iounmap(volatile void __iomem *io_addr)
 {
+       void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr);
 #ifndef CONFIG_SMP
        struct vm_struct **p, *tmp;
 #endif
        unsigned int section_mapping = 0;
 
-       addr = (volatile void __iomem *)(PAGE_MASK & (unsigned long)addr);
-
 #ifndef CONFIG_SMP
        /*
         * If this is a section based mapping we need to handle it
@@ -351,7 +351,7 @@ void __iounmap(volatile void __iomem *addr)
         */
        write_lock(&vmlist_lock);
        for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) {
-               if((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) {
+               if ((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) {
                        if (tmp->flags & VM_ARM_SECTION_MAPPING) {
                                *p = tmp->next;
                                unmap_area_sections((unsigned long)tmp->addr,
@@ -366,6 +366,6 @@ void __iounmap(volatile void __iomem *addr)
 #endif
 
        if (!section_mapping)
-               vunmap((void __force *)addr);
+               vunmap(addr);
 }
 EXPORT_SYMBOL(__iounmap);
index 7647c597fc597ce82b5c08c587ca4b1f1c7b9724..96590104ba0f3abb331706701de947e0ad0b421f 100644 (file)
@@ -35,3 +35,5 @@ struct pglist_data;
 void __init create_mapping(struct map_desc *md);
 void __init bootmem_init(struct meminfo *mi);
 void reserve_node_zero(struct pglist_data *pgdat);
+
+extern void _text, _stext, _etext, __data_start, _end, __init_begin, __init_end;
index 3f6dc40b835321fd469a23ce8ffa49089377e74b..5358fcc7f61ef8a112834fd839162a438df5ff22 100644 (file)
@@ -6,6 +6,8 @@
 #include <linux/mman.h>
 #include <linux/shm.h>
 #include <linux/sched.h>
+#include <linux/io.h>
+#include <asm/cputype.h>
 #include <asm/system.h>
 
 #define COLOUR_ALIGN(addr,pgoff)               \
@@ -37,8 +39,8 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
         * caches alias.  This is indicated by bits 9 and 21 of the
         * cache type register.
         */
-       cache_type = read_cpuid(CPUID_CACHETYPE);
-       if (cache_type != read_cpuid(CPUID_ID)) {
+       cache_type = read_cpuid_cachetype();
+       if (cache_type != read_cpuid_id()) {
                aliasing = (cache_type | cache_type >> 12) & (1 << 11);
                if (aliasing)
                        do_align = filp || flags & MAP_SHARED;
index 25d9a11eb61750ade3ba77abd7771068ebe668ee..e7af83e569d7a85c9e3afa30c76a5c7ee2aaa100 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/mman.h>
 #include <linux/nodemask.h>
 
+#include <asm/cputype.h>
 #include <asm/mach-types.h>
 #include <asm/setup.h>
 #include <asm/sizes.h>
@@ -27,9 +28,6 @@
 
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 
-extern void _stext, _etext, __data_start, _end;
-extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
-
 /*
  * empty_zero_page is a special page that is used for
  * zero-initialized data and COW.
@@ -568,12 +566,35 @@ void __init iotable_init(struct map_desc *io_desc, int nr)
                create_mapping(io_desc + i);
 }
 
+static unsigned long __initdata vmalloc_reserve = SZ_128M;
+
+/*
+ * vmalloc=size forces the vmalloc area to be exactly 'size'
+ * bytes. This can be used to increase (or decrease) the vmalloc
+ * area - the default is 128m.
+ */
+static void __init early_vmalloc(char **arg)
+{
+       vmalloc_reserve = memparse(*arg, arg);
+
+       if (vmalloc_reserve < SZ_16M) {
+               vmalloc_reserve = SZ_16M;
+               printk(KERN_WARNING
+                       "vmalloc area too small, limiting to %luMB\n",
+                       vmalloc_reserve >> 20);
+       }
+}
+__early_param("vmalloc=", early_vmalloc);
+
+#define VMALLOC_MIN    (void *)(VMALLOC_END - vmalloc_reserve)
+
 static int __init check_membank_valid(struct membank *mb)
 {
        /*
-        * Check whether this memory region has non-zero size.
+        * Check whether this memory region has non-zero size or
+        * invalid node number.
         */
-       if (mb->size == 0)
+       if (mb->size == 0 || mb->node >= MAX_NUMNODES)
                return 0;
 
        /*
@@ -607,8 +628,7 @@ static int __init check_membank_valid(struct membank *mb)
 
 static void __init sanity_check_meminfo(struct meminfo *mi)
 {
-       int i;
-       int j;
+       int i, j;
 
        for (i = 0, j = 0; i < mi->nr_banks; i++) {
                if (check_membank_valid(&mi->bank[i]))
index 63c62fdea52115e168751c5efa5eec96c7602341..07b62b23897909bca58218aec816e41e7608ab3f 100644 (file)
@@ -7,16 +7,14 @@
 #include <linux/mm.h>
 #include <linux/pagemap.h>
 #include <linux/bootmem.h>
+#include <linux/io.h>
 
 #include <asm/cacheflush.h>
-#include <asm/io.h>
 #include <asm/page.h>
 #include <asm/mach/arch.h>
 
 #include "mm.h"
 
-extern void _stext, __data_start, _end;
-
 /*
  * Reserve the various regions of node 0
  */
@@ -43,12 +41,26 @@ void __init reserve_node_zero(pg_data_t *pgdat)
                        BOOTMEM_DEFAULT);
 }
 
+static void __init sanity_check_meminfo(struct meminfo *mi)
+{
+       int i, j;
+
+       for (i = 0, j = 0; i < mi->nr_banks; i++) {
+               struct membank *mb = &mi->bank[i];
+
+               if (mb->size != 0 && mb->node < MAX_NUMNODES)
+                       mi->bank[j++] = mi->bank[i];
+       }
+       mi->nr_banks = j;
+}
+
 /*
  * paging_init() sets up the page tables, initialises the zone memory
  * maps, and sets up the zero page, bad page and bad page tables.
  */
 void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc)
 {
+       sanity_check_meminfo(mi);
        bootmem_init(mi);
 }
 
index b49f9a4c82c8e4375f8449bfed5f2527b36598c2..a67e26f3dce2a87ad9edaa7cf45dba2449cff3f1 100644 (file)
 
 ENTRY(cpu_v7_proc_init)
        mov     pc, lr
+ENDPROC(cpu_v7_proc_init)
 
 ENTRY(cpu_v7_proc_fin)
        mov     pc, lr
+ENDPROC(cpu_v7_proc_fin)
 
 /*
  *     cpu_v7_reset(loc)
@@ -43,6 +45,7 @@ ENTRY(cpu_v7_proc_fin)
        .align  5
 ENTRY(cpu_v7_reset)
        mov     pc, r0
+ENDPROC(cpu_v7_reset)
 
 /*
  *     cpu_v7_do_idle()
@@ -52,8 +55,9 @@ ENTRY(cpu_v7_reset)
  *     IRQs are already disabled.
  */
 ENTRY(cpu_v7_do_idle)
-       .long   0xe320f003                      @ ARM V7 WFI instruction
+       wfi
        mov     pc, lr
+ENDPROC(cpu_v7_do_idle)
 
 ENTRY(cpu_v7_dcache_clean_area)
 #ifndef TLB_CAN_READ_FROM_L1_CACHE
@@ -65,6 +69,7 @@ ENTRY(cpu_v7_dcache_clean_area)
        dsb
 #endif
        mov     pc, lr
+ENDPROC(cpu_v7_dcache_clean_area)
 
 /*
  *     cpu_v7_switch_mm(pgd_phys, tsk)
@@ -89,6 +94,7 @@ ENTRY(cpu_v7_switch_mm)
        isb
 #endif
        mov     pc, lr
+ENDPROC(cpu_v7_switch_mm)
 
 /*
  *     cpu_v7_set_pte_ext(ptep, pte)
@@ -141,6 +147,7 @@ ENTRY(cpu_v7_set_pte_ext)
        mcr     p15, 0, r0, c7, c10, 1          @ flush_pte
 #endif
        mov     pc, lr
+ENDPROC(cpu_v7_set_pte_ext)
 
 cpu_v7_name:
        .ascii  "ARMv7 Processor"
@@ -188,6 +195,7 @@ __v7_setup:
        bic     r0, r0, r5                      @ clear bits them
        orr     r0, r0, r6                      @ set them
        mov     pc, lr                          @ return to head.S:__ret
+ENDPROC(__v7_setup)
 
        /*
         *         V X F   I D LR
index b56dda8052f78152d5b2a5a1ed6a69a46706c763..24ba5109f2e7000e773ed28fce82c2f8b9b49936 100644 (file)
@@ -51,6 +51,7 @@ ENTRY(v7wbi_flush_user_tlb_range)
        mcr     p15, 0, ip, c7, c5, 6           @ flush BTAC/BTB
        dsb
        mov     pc, lr
+ENDPROC(v7wbi_flush_user_tlb_range)
 
 /*
  *     v7wbi_flush_kern_tlb_range(start,end)
@@ -77,6 +78,7 @@ ENTRY(v7wbi_flush_kern_tlb_range)
        dsb
        isb
        mov     pc, lr
+ENDPROC(v7wbi_flush_kern_tlb_range)
 
        .section ".text.init", #alloc, #execinstr
 
index 79f8e67cc6c18a42a51ee7aff19695a6e1fc6bf2..d31c49f953b1c60b988579336a6e1734b12242a8 100644 (file)
@@ -26,7 +26,7 @@
 #include "fpmodule.h"
 #include "fpmodule.inl"
 
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 
 static inline void loadSingle(const unsigned int Fn, const unsigned int __user *pMem)
 {
index e61d0cc520b76a72419a17244d4a970579bac210..88e31f549f50538a5af2af92df76935bf878cf25 100644 (file)
@@ -11,3 +11,4 @@ oprofile-$(CONFIG_CPU_XSCALE)         += op_model_xscale.o
 oprofile-$(CONFIG_OPROFILE_ARM11_CORE) += op_model_arm11_core.o
 oprofile-$(CONFIG_OPROFILE_ARMV6)      += op_model_v6.o
 oprofile-$(CONFIG_OPROFILE_MPCORE)     += op_model_mpcore.o
+oprofile-$(CONFIG_OPROFILE_ARMV7)      += op_model_v7.o
index f5ebf30151fa9f22b7311e59ed20b0773d8dda21..cefc21c2eee4967827f1f2e1becf80193a054c07 100644 (file)
@@ -16,8 +16,8 @@
 #include <linux/oprofile.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
+#include <linux/uaccess.h>
 #include <asm/ptrace.h>
-#include <asm/uaccess.h>
 
 #include "../kernel/stacktrace.h"
 
index 0a5cf3a6438be268f792ae0cb1ec9d7c6a66692c..3fcd752d6146d205860e00464ff23ca8008a7cd0 100644 (file)
@@ -145,6 +145,10 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
        spec = &op_mpcore_spec;
 #endif
 
+#ifdef CONFIG_OPROFILE_ARMV7
+       spec = &op_armv7_spec;
+#endif
+
        if (spec) {
                ret = spec->init();
                if (ret < 0)
index 4899c629aa03473fe4a7d7fe1ad67b77b15ce9d2..8c4e4f6a1de3346037651c343f320be7e8481279 100644 (file)
@@ -26,6 +26,7 @@ extern struct op_arm_model_spec op_xscale_spec;
 
 extern struct op_arm_model_spec op_armv6_spec;
 extern struct op_arm_model_spec op_mpcore_spec;
+extern struct op_arm_model_spec op_armv7_spec;
 
 extern void arm_backtrace(struct pt_regs * const regs, unsigned int depth);
 
index 92db6e035c65ddaa1731a0f51ba1a39d10064b0e..4de366e8b4c5f7fdaa900343e218c6e2cd49fcc1 100644 (file)
@@ -36,8 +36,8 @@
 #include <linux/oprofile.h>
 #include <linux/interrupt.h>
 #include <linux/smp.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/mach/irq.h>
 #include <mach/hardware.h>
diff --git a/arch/arm/oprofile/op_model_v7.c b/arch/arm/oprofile/op_model_v7.c
new file mode 100644 (file)
index 0000000..f20295f
--- /dev/null
@@ -0,0 +1,411 @@
+/**
+ * op_model_v7.c
+ * ARM V7 (Cortex A8) Event Monitor Driver
+ *
+ * Copyright 2008 Jean Pihet <jpihet@mvista.com>
+ * Copyright 2004 ARM SMP Development Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/oprofile.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+#include <linux/smp.h>
+
+#include "op_counter.h"
+#include "op_arm_model.h"
+#include "op_model_v7.h"
+
+/* #define DEBUG */
+
+
+/*
+ * ARM V7 PMNC support
+ */
+
+static u32 cnt_en[CNTMAX];
+
+static inline void armv7_pmnc_write(u32 val)
+{
+       val &= PMNC_MASK;
+       asm volatile("mcr p15, 0, %0, c9, c12, 0" : : "r" (val));
+}
+
+static inline u32 armv7_pmnc_read(void)
+{
+       u32 val;
+
+       asm volatile("mrc p15, 0, %0, c9, c12, 0" : "=r" (val));
+       return val;
+}
+
+static inline u32 armv7_pmnc_enable_counter(unsigned int cnt)
+{
+       u32 val;
+
+       if (cnt >= CNTMAX) {
+               printk(KERN_ERR "oprofile: CPU%u enabling wrong PMNC counter"
+                       " %d\n", smp_processor_id(), cnt);
+               return -1;
+       }
+
+       if (cnt == CCNT)
+               val = CNTENS_C;
+       else
+               val = (1 << (cnt - CNT0));
+
+       val &= CNTENS_MASK;
+       asm volatile("mcr p15, 0, %0, c9, c12, 1" : : "r" (val));
+
+       return cnt;
+}
+
+static inline u32 armv7_pmnc_disable_counter(unsigned int cnt)
+{
+       u32 val;
+
+       if (cnt >= CNTMAX) {
+               printk(KERN_ERR "oprofile: CPU%u disabling wrong PMNC counter"
+                       " %d\n", smp_processor_id(), cnt);
+               return -1;
+       }
+
+       if (cnt == CCNT)
+               val = CNTENC_C;
+       else
+               val = (1 << (cnt - CNT0));
+
+       val &= CNTENC_MASK;
+       asm volatile("mcr p15, 0, %0, c9, c12, 2" : : "r" (val));
+
+       return cnt;
+}
+
+static inline u32 armv7_pmnc_enable_intens(unsigned int cnt)
+{
+       u32 val;
+
+       if (cnt >= CNTMAX) {
+               printk(KERN_ERR "oprofile: CPU%u enabling wrong PMNC counter"
+                       " interrupt enable %d\n", smp_processor_id(), cnt);
+               return -1;
+       }
+
+       if (cnt == CCNT)
+               val = INTENS_C;
+       else
+               val = (1 << (cnt - CNT0));
+
+       val &= INTENS_MASK;
+       asm volatile("mcr p15, 0, %0, c9, c14, 1" : : "r" (val));
+
+       return cnt;
+}
+
+static inline u32 armv7_pmnc_getreset_flags(void)
+{
+       u32 val;
+
+       /* Read */
+       asm volatile("mrc p15, 0, %0, c9, c12, 3" : "=r" (val));
+
+       /* Write to clear flags */
+       val &= FLAG_MASK;
+       asm volatile("mcr p15, 0, %0, c9, c12, 3" : : "r" (val));
+
+       return val;
+}
+
+static inline int armv7_pmnc_select_counter(unsigned int cnt)
+{
+       u32 val;
+
+       if ((cnt == CCNT) || (cnt >= CNTMAX)) {
+               printk(KERN_ERR "oprofile: CPU%u selecting wrong PMNC counteri"
+                       " %d\n", smp_processor_id(), cnt);
+               return -1;
+       }
+
+       val = (cnt - CNT0) & SELECT_MASK;
+       asm volatile("mcr p15, 0, %0, c9, c12, 5" : : "r" (val));
+
+       return cnt;
+}
+
+static inline void armv7_pmnc_write_evtsel(unsigned int cnt, u32 val)
+{
+       if (armv7_pmnc_select_counter(cnt) == cnt) {
+               val &= EVTSEL_MASK;
+               asm volatile("mcr p15, 0, %0, c9, c13, 1" : : "r" (val));
+       }
+}
+
+static void armv7_pmnc_reset_counter(unsigned int cnt)
+{
+       u32 cpu_cnt = CPU_COUNTER(smp_processor_id(), cnt);
+       u32 val = -(u32)counter_config[cpu_cnt].count;
+
+       switch (cnt) {
+       case CCNT:
+               armv7_pmnc_disable_counter(cnt);
+
+               asm volatile("mcr p15, 0, %0, c9, c13, 0" : : "r" (val));
+
+               if (cnt_en[cnt] != 0)
+                   armv7_pmnc_enable_counter(cnt);
+
+               break;
+
+       case CNT0:
+       case CNT1:
+       case CNT2:
+       case CNT3:
+               armv7_pmnc_disable_counter(cnt);
+
+               if (armv7_pmnc_select_counter(cnt) == cnt)
+                   asm volatile("mcr p15, 0, %0, c9, c13, 2" : : "r" (val));
+
+               if (cnt_en[cnt] != 0)
+                   armv7_pmnc_enable_counter(cnt);
+
+               break;
+
+       default:
+               printk(KERN_ERR "oprofile: CPU%u resetting wrong PMNC counter"
+                       " %d\n", smp_processor_id(), cnt);
+               break;
+       }
+}
+
+int armv7_setup_pmnc(void)
+{
+       unsigned int cnt;
+
+       if (armv7_pmnc_read() & PMNC_E) {
+               printk(KERN_ERR "oprofile: CPU%u PMNC still enabled when setup"
+                       " new event counter.\n", smp_processor_id());
+               return -EBUSY;
+       }
+
+       /*
+        * Initialize & Reset PMNC: C bit, D bit and P bit.
+        *  Note: Using a slower count for CCNT (D bit: divide by 64) results
+        *   in a more stable system
+        */
+       armv7_pmnc_write(PMNC_P | PMNC_C | PMNC_D);
+
+
+       for (cnt = CCNT; cnt < CNTMAX; cnt++) {
+               unsigned long event;
+               u32 cpu_cnt = CPU_COUNTER(smp_processor_id(), cnt);
+
+               /*
+                * Disable counter
+                */
+               armv7_pmnc_disable_counter(cnt);
+               cnt_en[cnt] = 0;
+
+               if (!counter_config[cpu_cnt].enabled)
+                       continue;
+
+               event = counter_config[cpu_cnt].event & 255;
+
+               /*
+                * Set event (if destined for PMNx counters)
+                * We don't need to set the event if it's a cycle count
+                */
+               if (cnt != CCNT)
+                       armv7_pmnc_write_evtsel(cnt, event);
+
+               /*
+                * Enable interrupt for this counter
+                */
+               armv7_pmnc_enable_intens(cnt);
+
+               /*
+                * Reset counter
+                */
+               armv7_pmnc_reset_counter(cnt);
+
+               /*
+                * Enable counter
+                */
+               armv7_pmnc_enable_counter(cnt);
+               cnt_en[cnt] = 1;
+       }
+
+       return 0;
+}
+
+static inline void armv7_start_pmnc(void)
+{
+       armv7_pmnc_write(armv7_pmnc_read() | PMNC_E);
+}
+
+static inline void armv7_stop_pmnc(void)
+{
+       armv7_pmnc_write(armv7_pmnc_read() & ~PMNC_E);
+}
+
+/*
+ * CPU counters' IRQ handler (one IRQ per CPU)
+ */
+static irqreturn_t armv7_pmnc_interrupt(int irq, void *arg)
+{
+       struct pt_regs *regs = get_irq_regs();
+       unsigned int cnt;
+       u32 flags;
+
+
+       /*
+        * Stop IRQ generation
+        */
+       armv7_stop_pmnc();
+
+       /*
+        * Get and reset overflow status flags
+        */
+       flags = armv7_pmnc_getreset_flags();
+
+       /*
+        * Cycle counter
+        */
+       if (flags & FLAG_C) {
+               u32 cpu_cnt = CPU_COUNTER(smp_processor_id(), CCNT);
+               armv7_pmnc_reset_counter(CCNT);
+               oprofile_add_sample(regs, cpu_cnt);
+       }
+
+       /*
+        * PMNC counters 0:3
+        */
+       for (cnt = CNT0; cnt < CNTMAX; cnt++) {
+               if (flags & (1 << (cnt - CNT0))) {
+                       u32 cpu_cnt = CPU_COUNTER(smp_processor_id(), cnt);
+                       armv7_pmnc_reset_counter(cnt);
+                       oprofile_add_sample(regs, cpu_cnt);
+               }
+       }
+
+       /*
+        * Allow IRQ generation
+        */
+       armv7_start_pmnc();
+
+       return IRQ_HANDLED;
+}
+
+int armv7_request_interrupts(int *irqs, int nr)
+{
+       unsigned int i;
+       int ret = 0;
+
+       for (i = 0; i < nr; i++) {
+               ret = request_irq(irqs[i], armv7_pmnc_interrupt,
+                               IRQF_DISABLED, "CP15 PMNC", NULL);
+               if (ret != 0) {
+                       printk(KERN_ERR "oprofile: unable to request IRQ%u"
+                               " for ARMv7\n",
+                              irqs[i]);
+                       break;
+               }
+       }
+
+       if (i != nr)
+               while (i-- != 0)
+                       free_irq(irqs[i], NULL);
+
+       return ret;
+}
+
+void armv7_release_interrupts(int *irqs, int nr)
+{
+       unsigned int i;
+
+       for (i = 0; i < nr; i++)
+               free_irq(irqs[i], NULL);
+}
+
+#ifdef DEBUG
+static void armv7_pmnc_dump_regs(void)
+{
+       u32 val;
+       unsigned int cnt;
+
+       printk(KERN_INFO "PMNC registers dump:\n");
+
+       asm volatile("mrc p15, 0, %0, c9, c12, 0" : "=r" (val));
+       printk(KERN_INFO "PMNC  =0x%08x\n", val);
+
+       asm volatile("mrc p15, 0, %0, c9, c12, 1" : "=r" (val));
+       printk(KERN_INFO "CNTENS=0x%08x\n", val);
+
+       asm volatile("mrc p15, 0, %0, c9, c14, 1" : "=r" (val));
+       printk(KERN_INFO "INTENS=0x%08x\n", val);
+
+       asm volatile("mrc p15, 0, %0, c9, c12, 3" : "=r" (val));
+       printk(KERN_INFO "FLAGS =0x%08x\n", val);
+
+       asm volatile("mrc p15, 0, %0, c9, c12, 5" : "=r" (val));
+       printk(KERN_INFO "SELECT=0x%08x\n", val);
+
+       asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r" (val));
+       printk(KERN_INFO "CCNT  =0x%08x\n", val);
+
+       for (cnt = CNT0; cnt < CNTMAX; cnt++) {
+               armv7_pmnc_select_counter(cnt);
+               asm volatile("mrc p15, 0, %0, c9, c13, 2" : "=r" (val));
+               printk(KERN_INFO "CNT[%d] count =0x%08x\n", cnt-CNT0, val);
+               asm volatile("mrc p15, 0, %0, c9, c13, 1" : "=r" (val));
+               printk(KERN_INFO "CNT[%d] evtsel=0x%08x\n", cnt-CNT0, val);
+       }
+}
+#endif
+
+
+static int irqs[] = {
+#ifdef CONFIG_ARCH_OMAP3
+       INT_34XX_BENCH_MPU_EMUL,
+#endif
+};
+
+static void armv7_pmnc_stop(void)
+{
+#ifdef DEBUG
+       armv7_pmnc_dump_regs();
+#endif
+       armv7_stop_pmnc();
+       armv7_release_interrupts(irqs, ARRAY_SIZE(irqs));
+}
+
+static int armv7_pmnc_start(void)
+{
+       int ret;
+
+#ifdef DEBUG
+       armv7_pmnc_dump_regs();
+#endif
+       ret = armv7_request_interrupts(irqs, ARRAY_SIZE(irqs));
+       if (ret >= 0)
+               armv7_start_pmnc();
+
+       return ret;
+}
+
+static int armv7_detect_pmnc(void)
+{
+       return 0;
+}
+
+struct op_arm_model_spec op_armv7_spec = {
+       .init           = armv7_detect_pmnc,
+       .num_counters   = 5,
+       .setup_ctrs     = armv7_setup_pmnc,
+       .start          = armv7_pmnc_start,
+       .stop           = armv7_pmnc_stop,
+       .name           = "arm/armv7",
+};
diff --git a/arch/arm/oprofile/op_model_v7.h b/arch/arm/oprofile/op_model_v7.h
new file mode 100644 (file)
index 0000000..0e19bcc
--- /dev/null
@@ -0,0 +1,103 @@
+/**
+ * op_model_v7.h
+ * ARM v7 (Cortex A8) Event Monitor Driver
+ *
+ * Copyright 2008 Jean Pihet <jpihet@mvista.com>
+ * Copyright 2004 ARM SMP Development Team
+ * Copyright 2000-2004 Deepak Saxena <dsaxena@mvista.com>
+ * Copyright 2000-2004 MontaVista Software Inc
+ * Copyright 2004 Dave Jiang <dave.jiang@intel.com>
+ * Copyright 2004 Intel Corporation
+ * Copyright 2004 Zwane Mwaikambo <zwane@arm.linux.org.uk>
+ * Copyright 2004 Oprofile Authors
+ *
+ * Read the file COPYING
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef OP_MODEL_V7_H
+#define OP_MODEL_V7_H
+
+/*
+ * Per-CPU PMNC: config reg
+ */
+#define PMNC_E         (1 << 0)        /* Enable all counters */
+#define PMNC_P         (1 << 1)        /* Reset all counters */
+#define PMNC_C         (1 << 2)        /* Cycle counter reset */
+#define PMNC_D         (1 << 3)        /* CCNT counts every 64th cpu cycle */
+#define PMNC_X         (1 << 4)        /* Export to ETM */
+#define PMNC_DP                (1 << 5)        /* Disable CCNT if non-invasive debug*/
+#define        PMNC_MASK       0x3f            /* Mask for writable bits */
+
+/*
+ * Available counters
+ */
+#define CCNT           0
+#define CNT0           1
+#define CNT1           2
+#define CNT2           3
+#define CNT3           4
+#define CNTMAX                 5
+
+#define CPU_COUNTER(cpu, counter)      ((cpu) * CNTMAX + (counter))
+
+/*
+ * CNTENS: counters enable reg
+ */
+#define CNTENS_P0      (1 << 0)
+#define CNTENS_P1      (1 << 1)
+#define CNTENS_P2      (1 << 2)
+#define CNTENS_P3      (1 << 3)
+#define CNTENS_C       (1 << 31)
+#define        CNTENS_MASK     0x8000000f      /* Mask for writable bits */
+
+/*
+ * CNTENC: counters disable reg
+ */
+#define CNTENC_P0      (1 << 0)
+#define CNTENC_P1      (1 << 1)
+#define CNTENC_P2      (1 << 2)
+#define CNTENC_P3      (1 << 3)
+#define CNTENC_C       (1 << 31)
+#define        CNTENC_MASK     0x8000000f      /* Mask for writable bits */
+
+/*
+ * INTENS: counters overflow interrupt enable reg
+ */
+#define INTENS_P0      (1 << 0)
+#define INTENS_P1      (1 << 1)
+#define INTENS_P2      (1 << 2)
+#define INTENS_P3      (1 << 3)
+#define INTENS_C       (1 << 31)
+#define        INTENS_MASK     0x8000000f      /* Mask for writable bits */
+
+/*
+ * EVTSEL: Event selection reg
+ */
+#define        EVTSEL_MASK     0x7f            /* Mask for writable bits */
+
+/*
+ * SELECT: Counter selection reg
+ */
+#define        SELECT_MASK     0x1f            /* Mask for writable bits */
+
+/*
+ * FLAG: counters overflow flag status reg
+ */
+#define FLAG_P0                (1 << 0)
+#define FLAG_P1                (1 << 1)
+#define FLAG_P2                (1 << 2)
+#define FLAG_P3                (1 << 3)
+#define FLAG_C         (1 << 31)
+#define        FLAG_MASK       0x8000000f      /* Mask for writable bits */
+
+
+int armv7_setup_pmu(void);
+int armv7_start_pmu(void);
+int armv7_stop_pmu(void);
+int armv7_request_interrupts(int *, int);
+void armv7_release_interrupts(int *, int);
+
+#endif
index 7c3289c2acd7d4b2add8364c502b368ac9e88d9e..724ab9ce252674ff02d0e319cc25cd2a7b22da01 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 
-#include <asm/system.h>
+#include <asm/cputype.h>
 
 #include "op_counter.h"
 #include "op_arm_model.h"
index 6dcbcc4ad4196068a85d81e4f6c140734c86f7f4..4efe392859ee943ba31f1ae0450fb9669a8cea47 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/serial.h>
 #include <linux/tty.h>
 #include <linux/serial_core.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <asm/pgtable.h>
 #include <asm/page.h>
 #include <asm/mach/map.h>
index 39dcfb4bdc716f09e7fe70b180917991b93537d7..ed0bbece0d6164d7613a4908cd0f9972986990c5 100644 (file)
@@ -18,8 +18,8 @@
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 void * __iomem __iop3xx_ioremap(unsigned long cookie, size_t size,
        unsigned int mtype)
index 54708bf9cb155c2b4a2589f92387c6ea63185268..77fa7cc7d162dc28b903211ff5c3691e7e613e2e 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <asm/irq.h>
 #include <asm/signal.h>
 #include <asm/system.h>
index c53fefb6aac4c5cf521d4ba44c8210469204cdcc..3695bbe3ee280960599532b013b9c33c30d3bc69 100644 (file)
@@ -18,8 +18,8 @@
 #include <linux/time.h>
 #include <linux/init.h>
 #include <linux/timex.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/uaccess.h>
 #include <asm/mach/irq.h>
index 1053b666c676fd5217226fd3301ca90d23ca6e3f..c6b837893d87b876ee8842abc365f2ec734dc671 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #include <linux/irq.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/common.h>
 
 #define AVIC_BASE              IO_ADDRESS(AVIC_BASE_ADDR)
index 197974defbe4f4b0e41ffebf2aae1f2c96dc6c00..bf6a10c5fc4ffdfd5f9abb74bec8da1c1140e57e 100644 (file)
@@ -22,8 +22,7 @@
 #include <linux/platform_device.h>
 #include <linux/cpufreq.h>
 #include <linux/debugfs.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #include <mach/clock.h>
 
index f4dff423ae7c19569adf3302f7851a527b595360..8bdf0ead0cf36ec58316a5a49bc26813a92450ae 100644 (file)
 #include <linux/serial_8250.h>
 #include <linux/serial_reg.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/system.h>
 #include <asm/pgtable.h>
 #include <asm/mach/map.h>
-#include <asm/io.h>
 #include <asm/setup.h>
 
 #include <mach/common.h>
index ae1de308aaad2e5c9db136e8c9ed3d4841db976d..b2690242a3902c0ec43374c1837b2842c65c4e19 100644 (file)
@@ -20,9 +20,9 @@
 #include <linux/init.h>
 #include <linux/err.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/system.h>
 
 #define VERY_HI_RATE   900000000
index 5b73bb274452b9b55b4567082bbd16a208044033..e31154b15d9ec1bfec395891709558694272fdeb 100644 (file)
@@ -12,9 +12,9 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <mach/board.h>
 #include <mach/gpio.h>
index 9422dee7de84e778739d61fdb6dad2d2c984f847..2f4c0cabfd341fbaa2d54e0fba2673c8d0ec383b 100644 (file)
@@ -11,8 +11,8 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/leds.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 #include <asm/leds.h>
 #include <asm/system.h>
index 187e3d8bfdfe89512a454c128b0de4d8cb97a3b6..d4779c8ec51c1391269659ec9c1e505ab58dd1b8 100644 (file)
@@ -13,9 +13,9 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 
index 743a4abcd85d99f6a23bb897be2315b57012fc6f..606fcffdcefcc98cd69f02c0f4f6225e72df8929 100644 (file)
@@ -32,9 +32,9 @@
 #include <linux/list.h>
 #include <linux/clk.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 #include <mach/hardware.h>
 #include <mach/dmtimer.h>
-#include <asm/io.h>
 #include <mach/irqs.h>
 
 /* register offsets */
index 17a92a31e74670213ce0196d8e17107f2589f3bd..ce6b4baeedec416aa48d64f17872e799079cd328 100644 (file)
@@ -27,9 +27,9 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/bootmem.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/mach/map.h>
 
 #include <mach/board.h>
index 3e76ee2bc731dfd91d7e6fb00461a9a43e9b6c55..e622fa2825b548dfa70078acdd6c5498e92d454a 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/sysdev.h>
 #include <linux/err.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
@@ -24,8 +25,6 @@
 #include <mach/gpio.h>
 #include <asm/mach/irq.h>
 
-#include <asm/io.h>
-
 /*
  * OMAP1510 GPIO registers
  */
index 94ce2780e8ee88090b23b62351498cdcb7c323c6..8c71e288860fcec75a16f98ff0d0bbcc3b8fde34 100644 (file)
@@ -26,8 +26,8 @@
 #ifndef __ASM_ARCH_OMAP_GPIO_H
 #define __ASM_ARCH_OMAP_GPIO_H
 
+#include <linux/io.h>
 #include <mach/irqs.h>
-#include <asm/io.h>
 
 #define OMAP_MPUIO_BASE                        (void __iomem *)0xfffb5000
 
index 17248bbf3f27e5bbfe3dfc0d54bf260183f80bfa..62aa7dfb9464c9ef375acc6d2ac1283413f4486e 100644 (file)
 #define INT_24XX_USB_IRQ_OTG   80
 #define INT_24XX_MMC_IRQ       83
 
+#define        INT_34XX_BENCH_MPU_EMUL 3
+
 /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and
  * 16 MPUIO lines */
 #define OMAP_MAX_GPIO_LINES    192
index 1d7aec1a691a67b27d7b0f9a0875ada1da7c632f..b52ce053e6f25e5612f79efa442141fcf9e2c153 100644 (file)
@@ -30,7 +30,7 @@
 #include <linux/blkdev.h>
 #include <linux/err.h>
 #include <linux/delay.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/mailbox.h>
 #include "mailbox.h"
 
index 847df208c46ca78db749fd0aad8605ab53a9aa5d..80b040fd5ca79fc55cb8ba42111596be48ce10bc 100644 (file)
@@ -25,8 +25,8 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/io.h>
 #include <asm/system.h>
-#include <asm/io.h>
 #include <linux/spinlock.h>
 #include <mach/mux.h>
 
index 8bdbf979a2573fd17d587bed84435f1d79d61ff3..ebe0c73c89018b783cf8107892e27f1dfe3471de 100644 (file)
@@ -31,8 +31,8 @@
 #include <linux/spinlock.h>
 #include <linux/err.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <mach/hardware.h>
 
 #define OCPI_BASE              0xfffec320
index ac67eeb6ca6a6266428ad8c74a906af7df4469b9..e0003e0746e748076c47ca95e0bf9ec775b1d87d 100644 (file)
@@ -15,9 +15,9 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/io.h>
 
 #include <asm/tlb.h>
-#include <asm/io.h>
 #include <asm/cacheflush.h>
 
 #include <asm/mach/map.h>
index 777485e0636becdd9975f7c6045abce0eefe9492..67ca1e216df7a1e4cfdc5ef29bf520bc16ec760c 100644 (file)
@@ -27,8 +27,8 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/usb/otg.h>
+#include <linux/io.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/system.h>
 #include <mach/hardware.h>
index 54d4b8e2263cb9ab3e35dc0c5b696f2ae925d97f..400541359bfbc617d0b569c8197c6fdfc2e76b90 100644 (file)
 #include <linux/clk.h>
 #include <linux/mutex.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <mach/regs-clock.h>
 #include <mach/regs-gpio.h>
index 1863a1b1bc4995b05e7a0b46e2b7d3cdcedc0f47..d528f460f6bc48027a6155a4084adb9d079ff63e 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/mtd/nand.h>
 #include <linux/mtd/nand_ecc.h>
 #include <linux/mtd/partitions.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
@@ -32,7 +33,6 @@
 
 #include <asm/mach-types.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <mach/regs-gpio.h>
index 89ce60eabd5bd6d68304608bdad6521b2a6acd6e..9c607bbc9343bc34712536a66cd2a30b9d4ce556 100644 (file)
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
+#include <linux/io.h>
+#include <linux/delay.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
-#include <asm/delay.h>
 #include <asm/cacheflush.h>
 
 #include <asm/mach/arch.h>
index d6fb76578b112f392a5e840857b56cefb6633bd2..6b13b5455dfc6b32935da3d3bcac491a9e284f2e 100644 (file)
 #include <linux/init.h>
 #include <linux/serial_core.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 #include <mach/fb.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <asm/plat-s3c/regs-serial.h>
index 08c2aaf14c41d56e0438cefd6e493cefbafe3d7f..d6344461a83bb13494e41c72f9667de66ee3a47b 100644 (file)
 #include <linux/slab.h>
 #include <linux/errno.h>
 #include <linux/delay.h>
+#include <linux/io.h>
 
 #include <asm/system.h>
 #include <asm/irq.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/dma.h>
 
 #include <asm/mach/dma.h>
index dd27334e3d7e384ed7afcac9ad5c9592b074d308..4a899c279eb547ca5578936b95df5b9ae5d5d910 100644 (file)
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <mach/regs-gpio.h>
 
index 36cefe17683566e8a657a923f6261146aab5e473..fa70d34eb4a5911713be517b1fe8cda6eed4e3a7 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/mach/irq.h>
 
index e6705014b2a0efd5a77e23b9c3da2c85c389af89..0a074d35890aa5eebc76eb9d1bf6fea4ef537700 100644 (file)
 #include <linux/init.h>
 #include <linux/sysdev.h>
 #include <linux/device.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <mach/map.h>
 #include <mach/regs-gpio.h>
index fc4b731a949cdd05907a8556384d7390ca9327c1..d3934b1119a9e0c855f3e16153c6bad696f26144 100644 (file)
 #include <linux/ioport.h>
 #include <linux/delay.h>
 #include <linux/serial_core.h>
+#include <linux/io.h>
 
 #include <asm/cacheflush.h>
 #include <mach/hardware.h>
-#include <asm/io.h>
 
 #include <asm/plat-s3c/regs-serial.h>
 #include <mach/regs-clock.h>
index 8a5fffde663194d9b2dc7c387ed2527f92fcb582..119647a5eaa63e8db78eff5c8f2a2dccf9ddd99d 100644 (file)
 #include <linux/ioport.h>
 #include <linux/mutex.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/atomic.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <mach/regs-clock.h>
 
index f3dc38cf1de4a66ea8f53dc8951481e321338153..13bc655e1b6e03ccc7ea5776dd8c9074e887694c 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/sysdev.h>
+#include <linux/io.h>
 
 #include <mach/hardware.h>
 #include <asm/irq.h>
-#include <asm/io.h>
 
 #include <asm/mach/irq.h>
 
index 281b4804ed3865564a07e9ee3256f8649670bd98..146863a69aeb3fae4a611c2abbfc1ab6d43aa96d 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/sysdev.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
 #include <mach/hardware.h>
-#include <asm/io.h>
 #include <asm/irq.h>
 
 #include <mach/regs-clock.h>
index b471a21ae2e4ee3e5f23341d7d0bd9420a881b69..64bfa19ae951c1444d8741835ef49d12f1f27432 100644 (file)
 #include <linux/irq.h>
 #include <linux/err.h>
 #include <linux/clk.h>
+#include <linux/io.h>
 
 #include <asm/system.h>
 #include <asm/leds.h>
 #include <asm/mach-types.h>
 
-#include <asm/io.h>
 #include <asm/irq.h>
 #include <mach/map.h>
 #include <asm/plat-s3c/regs-timer.h>
index 56281c030a7bb4ab5eebef4d36dfc3cd440b0e41..43aa2020f85c9ac200c0db73a8c987e92051b56c 100644 (file)
@@ -12,7 +12,7 @@
 #
 #   http://www.arm.linux.org.uk/developer/machines/?action=new
 #
-# Last update: Wed Aug 13 21:56:02 2008
+# Last update: Thu Sep 25 10:10:50 2008
 #
 # machine_is_xxx       CONFIG_xxxx             MACH_TYPE_xxx           number
 #
@@ -1810,7 +1810,7 @@ kriss_sensor              MACH_KRISS_SENSOR       KRISS_SENSOR            1819
 pilz_pmi5              MACH_PILZ_PMI5          PILZ_PMI5               1820
 jade                   MACH_JADE               JADE                    1821
 ks8695_softplc         MACH_KS8695_SOFTPLC     KS8695_SOFTPLC          1822
-gprisc3                        MACH_GPRISC4            GPRISC4                 1823
+gprisc3                        MACH_GPRISC3            GPRISC3                 1823
 stamp9260              MACH_STAMP9260          STAMP9260               1824
 smdk6430               MACH_SMDK6430           SMDK6430                1825
 smdkc100               MACH_SMDKC100           SMDKC100                1826
@@ -1859,5 +1859,43 @@ kbio9260         MACH_KBIO9260           KBIO9260                1868
 ginza                  MACH_GINZA              GINZA                   1869
 a636n                  MACH_A636N              A636N                   1870
 imx27ipcam             MACH_IMX27IPCAM         IMX27IPCAM              1871
-nenoc                  MACH_NEMOC              NEMOC                   1872
+nemoc                  MACH_NEMOC              NEMOC                   1872
 geneva                 MACH_GENEVA             GENEVA                  1873
+htcpharos              MACH_HTCPHAROS          HTCPHAROS               1874
+neonc                  MACH_NEONC              NEONC                   1875
+nas7100                        MACH_NAS7100            NAS7100                 1876
+teuphone               MACH_TEUPHONE           TEUPHONE                1877
+annax_eth2             MACH_ANNAX_ETH2         ANNAX_ETH2              1878
+csb733                 MACH_CSB733             CSB733                  1879
+bk3                    MACH_BK3                BK3                     1880
+omap_em32              MACH_OMAP_EM32          OMAP_EM32               1881
+et9261cp               MACH_ET9261CP           ET9261CP                1882
+jasperc                        MACH_JASPERC            JASPERC                 1883
+issi_arm9              MACH_ISSI_ARM9          ISSI_ARM9               1884
+ued                    MACH_UED                UED                     1885
+esiblade               MACH_ESIBLADE           ESIBLADE                1886
+eye02                  MACH_EYE02              EYE02                   1887
+imx27kbd               MACH_IMX27KBD           IMX27KBD                1888
+sst61vc010_fpga                MACH_SST61VC010_FPGA    SST61VC010_FPGA         1889
+kixvp435               MACH_KIXVP435           KIXVP435                1890
+kixnp435               MACH_KIXNP435           KIXNP435                1891
+africa                 MACH_AFRICA             AFRICA                  1892
+nh233                  MACH_NH233              NH233                   1893
+rd88f6183ap_ge         MACH_RD88F6183AP_GE     RD88F6183AP_GE          1894
+bcm4760                        MACH_BCM4760            BCM4760                 1895
+eddy_v2                        MACH_EDDY_V2            EDDY_V2                 1896
+realview_pba8          MACH_REALVIEW_PBA8      REALVIEW_PBA8           1897
+hid_a7                 MACH_HID_A7             HID_A7                  1898
+hero                   MACH_HERO               HERO                    1899
+omap_poseidon          MACH_OMAP_POSEIDON      OMAP_POSEIDON           1900
+realview_pbx           MACH_REALVIEW_PBX       REALVIEW_PBX            1901
+micro9s                        MACH_MICRO9S            MICRO9S                 1902
+mako                   MACH_MAKO               MAKO                    1903
+xdaflame               MACH_XDAFLAME           XDAFLAME                1904
+phidget_sbc2           MACH_PHIDGET_SBC2       PHIDGET_SBC2            1905
+limestone              MACH_LIMESTONE          LIMESTONE               1906
+iprobe_c32             MACH_IPROBE_C32         IPROBE_C32              1907
+rut100                 MACH_RUT100             RUT100                  1908
+asusp535               MACH_ASUSP535           ASUSP535                1909
+htcraphael             MACH_HTCRAPHAEL         HTCRAPHAEL              1910
+sygdg1                 MACH_SYGDG1             SYGDG1                  1911
index 806ce26d524324dedd9c45d7ec1f5fcc8b35cc92..ba592a9e6fb36cfa868c2b4a8ade37248c0743b8 100644 (file)
 #include <asm/assembler.h>
 #include <asm/vfpmacros.h>
 
-       .globl  do_vfp
-do_vfp:
+ENTRY(do_vfp)
        enable_irq
        ldr     r4, .LCvfp
        ldr     r11, [r10, #TI_CPU]     @ CPU number
        add     r10, r10, #TI_VFPSTATE  @ r10 = workspace
        ldr     pc, [r4]                @ call VFP entry point
+ENDPROC(do_vfp)
 
 ENTRY(vfp_null_entry)
        mov     pc, lr
@@ -40,11 +40,11 @@ ENDPROC(vfp_null_entry)
 @ failure to the VFP initialisation code.
 
        __INIT
-       .globl  vfp_testing_entry
-vfp_testing_entry:
+ENTRY(vfp_testing_entry)
        ldr     r0, VFP_arch_address
        str     r5, [r0]                @ known non-zero value
        mov     pc, r9                  @ we have handled the fault
+ENDPROC(vfp_testing_entry)
 
 VFP_arch_address:
        .word   VFP_arch
index 353f9e5c7919196134e4323c86cb028c0b12eac4..a62dcf7098bad660ee65c22cbcf76a0a24677c05 100644 (file)
@@ -68,8 +68,7 @@
 @  r11 = CPU number
 @  lr  = failure return
 
-       .globl  vfp_support_entry
-vfp_support_entry:
+ENTRY(vfp_support_entry)
        DBGSTR3 "instr %08x pc %08x state %p", r0, r2, r10
 
        VFPFMRX r1, FPEXC               @ Is the VFP enabled?
@@ -165,11 +164,10 @@ process_exception:
                                        @ code will raise an exception if
                                        @ required. If not, the user code will
                                        @ retry the faulted instruction
+ENDPROC(vfp_support_entry)
 
 #ifdef CONFIG_SMP
-       .globl  vfp_save_state
-       .type   vfp_save_state, %function
-vfp_save_state:
+ENTRY(vfp_save_state)
        @ Save the current VFP state
        @ r0 - save location
        @ r1 - FPEXC
@@ -182,13 +180,13 @@ vfp_save_state:
        VFPFMRX r12, FPINST2, NE        @ FPINST2 if needed (and present)
        stmia   r0, {r1, r2, r3, r12}   @ save FPEXC, FPSCR, FPINST, FPINST2
        mov     pc, lr
+ENDPROC(vfp_save_state)
 #endif
 
 last_VFP_context_address:
        .word   last_VFP_context
 
-       .globl  vfp_get_float
-vfp_get_float:
+ENTRY(vfp_get_float)
        add     pc, pc, r0, lsl #3
        mov     r0, r0
        .irp    dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
@@ -197,9 +195,9 @@ vfp_get_float:
        mrc     p10, 0, r0, c\dr, c0, 4 @ fmrs  r0, s1
        mov     pc, lr
        .endr
+ENDPROC(vfp_get_float)
 
-       .globl  vfp_put_float
-vfp_put_float:
+ENTRY(vfp_put_float)
        add     pc, pc, r1, lsl #3
        mov     r0, r0
        .irp    dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
@@ -208,9 +206,9 @@ vfp_put_float:
        mcr     p10, 0, r0, c\dr, c0, 4 @ fmsr  r0, s1
        mov     pc, lr
        .endr
+ENDPROC(vfp_put_float)
 
-       .globl  vfp_get_double
-vfp_get_double:
+ENTRY(vfp_get_double)
        add     pc, pc, r0, lsl #3
        mov     r0, r0
        .irp    dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
@@ -229,9 +227,9 @@ vfp_get_double:
        mov     r0, #0
        mov     r1, #0
        mov     pc, lr
+ENDPROC(vfp_get_double)
 
-       .globl  vfp_put_double
-vfp_put_double:
+ENTRY(vfp_put_double)
        add     pc, pc, r2, lsl #3
        mov     r0, r0
        .irp    dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
@@ -245,3 +243,4 @@ vfp_put_double:
        mov     pc, lr
        .endr
 #endif
+ENDPROC(vfp_put_double)
index a5c141cecd4edf0aca3a89900d6c5927d03cd92f..ad26f1fdf273e14129e2ec0bff60d0210919a7c6 100644 (file)
@@ -1386,7 +1386,8 @@ config FORCEDETH_NAPI
 
 config CS89x0
        tristate "CS89x0 support"
-       depends on NET_PCI && (ISA || MACH_IXDP2351 || ARCH_IXDP2X01 || ARCH_PNX010X)
+       depends on NET_ETHERNET && (ISA || EISA || MACH_IXDP2351 \
+               || ARCH_IXDP2X01 || ARCH_PNX010X || MACH_MX31ADS)
        ---help---
          Support for CS89x0 chipset based Ethernet cards. If you have a
          network (Ethernet) card of this type, say Y and read the
@@ -1397,6 +1398,11 @@ config CS89x0
          To compile this driver as a module, choose M here. The module
          will be called cs89x0.
 
+config CS89x0_NONISA_IRQ
+       def_bool y
+       depends on CS89x0 != n
+       depends on MACH_IXDP2351 || ARCH_IXDP2X01 || ARCH_PNX010X || MACH_MX31ADS
+
 config TC35815
        tristate "TOSHIBA TC35815 Ethernet support"
        depends on NET_PCI && PCI && MIPS
index ea6144a9565e571665db792b7686a31ff991c823..5890a917a628b2155ff88e6ad44ed130a166b5fc 100644 (file)
@@ -194,6 +194,12 @@ static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0};
 #define CIRRUS_DEFAULT_IRQ     VH_INTC_INT_NUM_CASCADED_INTERRUPT_1 /* Event inputs bank 1 - ID 35/bit 3 */
 static unsigned int netcard_portlist[] __used __initdata = {CIRRUS_DEFAULT_BASE, 0};
 static unsigned int cs8900_irq_map[] = {CIRRUS_DEFAULT_IRQ, 0, 0, 0};
+#elif defined(CONFIG_MACH_MX31ADS)
+#include <mach/board-mx31ads.h>
+static unsigned int netcard_portlist[] __used __initdata = {
+       PBC_BASE_ADDRESS + PBC_CS8900A_IOBASE + 0x300, 0
+};
+static unsigned cs8900_irq_map[] = {EXPIO_INT_ENET_INT, 0, 0, 0};
 #else
 static unsigned int netcard_portlist[] __used __initdata =
    { 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0};
@@ -802,7 +808,7 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
        } else {
                i = lp->isa_config & INT_NO_MASK;
                if (lp->chip_type == CS8900) {
-#if defined(CONFIG_MACH_IXDP2351) || defined(CONFIG_ARCH_IXDP2X01) || defined(CONFIG_ARCH_PNX010X)
+#ifdef CONFIG_CS89x0_NONISA_IRQ
                        i = cs8900_irq_map[0];
 #else
                        /* Translate the IRQ using the IRQ mapping table. */
@@ -1029,6 +1035,7 @@ skip_this_frame:
 
 void  __init reset_chip(struct net_device *dev)
 {
+#if !defined(CONFIG_MACH_MX31ADS)
 #if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01)
        struct net_local *lp = netdev_priv(dev);
        int ioaddr = dev->base_addr;
@@ -1057,6 +1064,7 @@ void  __init reset_chip(struct net_device *dev)
        reset_start_time = jiffies;
        while( (readreg(dev, PP_SelfST) & INIT_DONE) == 0 && jiffies - reset_start_time < 2)
                ;
+#endif /* !CONFIG_MACH_MX31ADS */
 }
 
 
@@ -1304,7 +1312,7 @@ net_open(struct net_device *dev)
        else
 #endif
        {
-#if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX010X)
+#ifndef CONFIG_CS89x0_NONISA_IRQ
                if (((1 << dev->irq) & lp->irq_map) == 0) {
                        printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n",
                                dev->name, dev->irq, lp->irq_map);
index 2040965d7724bc29fd0cc92532ca9e65dded071c..ceed2f69216a8b70a0c3bd9c6c0964b1ef1af3a2 100644 (file)
@@ -1520,7 +1520,9 @@ smc_open(struct net_device *dev)
        /* Setup the default Register Modes */
        lp->tcr_cur_mode = TCR_DEFAULT;
        lp->rcr_cur_mode = RCR_DEFAULT;
-       lp->rpc_cur_mode = RPC_DEFAULT;
+       lp->rpc_cur_mode = RPC_DEFAULT |
+                               lp->cfg.leda << RPC_LSXA_SHFT |
+                               lp->cfg.ledb << RPC_LSXB_SHFT;
 
        /*
         * If we are not using a MII interface, we need to
@@ -2157,6 +2159,11 @@ static int smc_drv_probe(struct platform_device *pdev)
                lp->cfg.flags |= (nowait) ? SMC91X_NOWAIT : 0;
        }
 
+       if (!lp->cfg.leda && !lp->cfg.ledb) {
+               lp->cfg.leda = RPC_LSA_DEFAULT;
+               lp->cfg.ledb = RPC_LSB_DEFAULT;
+       }
+
        ndev->dma = (unsigned char)-1;
 
        res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs");
index 997e7f1d5c6e496b42bd602baf473f16acfd45e2..8322e7f37af5c870092b5f2fae94bfe3e0fc3be5 100644 (file)
@@ -794,7 +794,7 @@ smc_pxa_dma_irq(int dma, void *dummy)
 #define RPC_LSB_DEFAULT RPC_LED_FD
 #endif
 
-#define RPC_DEFAULT (RPC_ANEG | (RPC_LSA_DEFAULT << RPC_LSXA_SHFT) | (RPC_LSB_DEFAULT << RPC_LSXB_SHFT) | RPC_SPEED | RPC_DPLX)
+#define RPC_DEFAULT (RPC_ANEG | RPC_SPEED | RPC_DPLX)
 
 
 /* Bank 0 0x0C is reserved */
index b9cbfc87f616adee61d6c687c69413bc386bb3e6..998e89dc5aaf2db56eda9f18c1060ea8c9189555 100644 (file)
 #define UART_DUMMY_LSR_RX      0x100
 #define UART_PORT_SIZE         (KS8695_USR - KS8695_URRB + 4)
 
-#define tx_enabled(port) ((port)->unused[0])
-#define rx_enabled(port) ((port)->unused[1])
+static inline int tx_enabled(struct uart_port *port)
+{
+       return port->unused[0] & 1;
+}
+
+static inline int rx_enabled(struct uart_port *port)
+{
+       return port->unused[0] & 2;
+}
+
+static inline int ms_enabled(struct uart_port *port)
+{
+       return port->unused[0] & 4;
+}
+
+static inline void ms_enable(struct uart_port *port, int enabled)
+{
+       if(enabled)
+               port->unused[0] |= 4;
+       else
+               port->unused[0] &= ~4;
+}
+
+static inline void rx_enable(struct uart_port *port, int enabled)
+{
+       if(enabled)
+               port->unused[0] |= 2;
+       else
+               port->unused[0] &= ~2;
+}
+
+static inline void tx_enable(struct uart_port *port, int enabled)
+{
+       if(enabled)
+               port->unused[0] |= 1;
+       else
+               port->unused[0] &= ~1;
+}
 
 
 #ifdef SUPPORT_SYSRQ
@@ -75,7 +111,7 @@ static void ks8695uart_stop_tx(struct uart_port *port)
 {
        if (tx_enabled(port)) {
                disable_irq(KS8695_IRQ_UART_TX);
-               tx_enabled(port) = 0;
+               tx_enable(port, 0);
        }
 }
 
@@ -83,7 +119,7 @@ static void ks8695uart_start_tx(struct uart_port *port)
 {
        if (!tx_enabled(port)) {
                enable_irq(KS8695_IRQ_UART_TX);
-               tx_enabled(port) = 1;
+               tx_enable(port, 1);
        }
 }
 
@@ -91,18 +127,24 @@ static void ks8695uart_stop_rx(struct uart_port *port)
 {
        if (rx_enabled(port)) {
                disable_irq(KS8695_IRQ_UART_RX);
-               rx_enabled(port) = 0;
+               rx_enable(port, 0);
        }
 }
 
 static void ks8695uart_enable_ms(struct uart_port *port)
 {
-       enable_irq(KS8695_IRQ_UART_MODEM_STATUS);
+       if (!ms_enabled(port)) {
+               enable_irq(KS8695_IRQ_UART_MODEM_STATUS);
+               ms_enable(port,1);
+       }
 }
 
 static void ks8695uart_disable_ms(struct uart_port *port)
 {
-       disable_irq(KS8695_IRQ_UART_MODEM_STATUS);
+       if (ms_enabled(port)) {
+               disable_irq(KS8695_IRQ_UART_MODEM_STATUS);
+               ms_enable(port,0);
+       }
 }
 
 static irqreturn_t ks8695uart_rx_chars(int irq, void *dev_id)
@@ -285,8 +327,9 @@ static int ks8695uart_startup(struct uart_port *port)
        int retval;
 
        set_irq_flags(KS8695_IRQ_UART_TX, IRQF_VALID | IRQF_NOAUTOEN);
-       tx_enabled(port) = 0;
-       rx_enabled(port) = 1;
+       tx_enable(port, 0);
+       rx_enable(port, 1);
+       ms_enable(port, 1);
 
        /*
         * Allocate the IRQ
index 8302ef005be7fac9d04814f3f572deb261031277..147b4d5c63b3bc85a1a5dbc08404bc62c96e8f6b 100644 (file)
@@ -174,10 +174,8 @@ static struct miscdevice ixp4xx_wdt_miscdev = {
 static int __init ixp4xx_wdt_init(void)
 {
        int ret;
-       unsigned long processor_id;
 
-       asm("mrc p15, 0, %0, cr0, cr0, 0;" : "=r"(processor_id) :);
-       if (!(processor_id & 0xf) && !cpu_is_ixp46x()) {
+       if (!(read_cpuid_id() & 0xf) && !cpu_is_ixp46x()) {
                printk(KERN_ERR "IXP4XXX Watchdog: Rev. A0 IXP42x CPU detected"
                        " - watchdog disabled\n");
 
index 3827b922ba1f8b2d9f688cac0e3095c747793690..ed25483d25d90e7608f2e9cf9b0c47a34f8fef0f 100644 (file)
@@ -18,6 +18,8 @@
 
 struct smc91x_platdata {
        unsigned long flags;
+       unsigned char leda;
+       unsigned char ledb;
 };
 
 #endif /* __SMC91X_H__ */