aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Kconfig18
-rw-r--r--arch/arm/Kconfig.debug184
-rw-r--r--arch/arm/include/asm/hardware/it8152.h3
-rw-r--r--arch/arm/include/asm/irq.h8
-rw-r--r--arch/arm/include/asm/mc146818rtc.h4
-rw-r--r--arch/arm/include/asm/system.h1
-rw-r--r--arch/arm/kernel/Makefile5
-rw-r--r--arch/arm/kernel/process.c27
-rw-r--r--arch/arm/kernel/time.c4
-rw-r--r--arch/arm/mach-at91/at91cap9.c8
-rw-r--r--arch/arm/mach-at91/at91rm9200.c10
-rw-r--r--arch/arm/mach-at91/at91sam9260.c8
-rw-r--r--arch/arm/mach-at91/at91sam9261.c8
-rw-r--r--arch/arm/mach-at91/at91sam9263.c8
-rw-r--r--arch/arm/mach-at91/at91sam9g45.c7
-rw-r--r--arch/arm/mach-at91/at91sam9rl.c8
-rw-r--r--arch/arm/mach-at91/at91x40.c12
-rw-r--r--arch/arm/mach-at91/include/mach/system.h50
-rw-r--r--arch/arm/mach-bcmring/core.c23
-rw-r--r--arch/arm/mach-bcmring/include/mach/system.h28
-rw-r--r--arch/arm/mach-clps711x/common.c16
-rw-r--r--arch/arm/mach-clps711x/include/mach/system.h35
-rw-r--r--arch/arm/mach-cns3xxx/include/mach/system.h25
-rw-r--r--arch/arm/mach-davinci/include/mach/system.h21
-rw-r--r--arch/arm/mach-davinci/time.c28
-rw-r--r--arch/arm/mach-dove/include/mach/system.h17
-rw-r--r--arch/arm/mach-ebsa110/core.c25
-rw-r--r--arch/arm/mach-ebsa110/include/mach/system.h37
-rw-r--r--arch/arm/mach-ep93xx/core.c46
-rw-r--r--arch/arm/mach-ep93xx/include/mach/system.h7
-rw-r--r--arch/arm/mach-exynos/common.c12
-rw-r--r--arch/arm/mach-exynos/dma.c38
-rw-r--r--arch/arm/mach-exynos/include/mach/system.h20
-rw-r--r--arch/arm/mach-footbridge/include/mach/system.h13
-rw-r--r--arch/arm/mach-gemini/Makefile2
-rw-r--r--arch/arm/mach-gemini/idle.c29
-rw-r--r--arch/arm/mach-gemini/include/mach/system.h14
-rw-r--r--arch/arm/mach-gemini/irq.c4
-rw-r--r--arch/arm/mach-h720x/common.c18
-rw-r--r--arch/arm/mach-h720x/include/mach/system.h27
-rw-r--r--arch/arm/mach-highbank/highbank.c1
-rw-r--r--arch/arm/mach-highbank/include/mach/irqs.h6
-rw-r--r--arch/arm/mach-highbank/include/mach/system.h24
-rw-r--r--arch/arm/mach-imx/mm-imx3.c52
-rw-r--r--arch/arm/mach-imx/pm-imx27.c3
-rw-r--r--arch/arm/mach-integrator/Kconfig1
-rw-r--r--arch/arm/mach-integrator/core.c70
-rw-r--r--arch/arm/mach-integrator/impd1.c9
-rw-r--r--arch/arm/mach-integrator/include/mach/system.h33
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c49
-rw-r--r--arch/arm/mach-iop13xx/include/mach/system.h13
-rw-r--r--arch/arm/mach-iop32x/include/mach/system.h13
-rw-r--r--arch/arm/mach-iop33x/include/mach/system.h13
-rw-r--r--arch/arm/mach-ixp2000/include/mach/system.h14
-rw-r--r--arch/arm/mach-ixp23xx/core.c3
-rw-r--r--arch/arm/mach-ixp23xx/include/mach/system.h16
-rw-r--r--arch/arm/mach-ixp4xx/common.c6
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/system.h19
-rw-r--r--arch/arm/mach-kirkwood/include/mach/system.h17
-rw-r--r--arch/arm/mach-ks8695/include/mach/system.h27
-rw-r--r--arch/arm/mach-lpc32xx/include/mach/system.h27
-rw-r--r--arch/arm/mach-lpc32xx/phy3250.c32
-rw-r--r--arch/arm/mach-mmp/aspenite.c5
-rw-r--r--arch/arm/mach-mmp/avengers_lite.c1
-rw-r--r--arch/arm/mach-mmp/brownstone.c4
-rw-r--r--arch/arm/mach-mmp/flint.c3
-rw-r--r--arch/arm/mach-mmp/gplugd.c2
-rw-r--r--arch/arm/mach-mmp/include/mach/irqs.h3
-rw-r--r--arch/arm/mach-mmp/include/mach/system.h16
-rw-r--r--arch/arm/mach-mmp/irq-mmp2.c1
-rw-r--r--arch/arm/mach-mmp/jasper.c5
-rw-r--r--arch/arm/mach-mmp/tavorevb.c1
-rw-r--r--arch/arm/mach-mmp/teton_bga.c3
-rw-r--r--arch/arm/mach-mmp/ttc_dkb.c4
-rw-r--r--arch/arm/mach-msm/idle.S36
-rw-r--r--arch/arm/mach-msm/idle.c49
-rw-r--r--arch/arm/mach-msm/include/mach/system.h1
-rw-r--r--arch/arm/mach-msm/timer.c12
-rw-r--r--arch/arm/mach-mv78xx0/include/mach/system.h17
-rw-r--r--arch/arm/mach-mx5/mm.c28
-rw-r--r--arch/arm/mach-mxs/devices.c8
-rw-r--r--arch/arm/mach-mxs/devices/amba-duart.c2
-rw-r--r--arch/arm/mach-mxs/include/mach/system.h25
-rw-r--r--arch/arm/mach-mxs/pm.c3
-rw-r--r--arch/arm/mach-netx/fb.c13
-rw-r--r--arch/arm/mach-netx/include/mach/system.h28
-rw-r--r--arch/arm/mach-nomadik/board-nhk8815.c17
-rw-r--r--arch/arm/mach-nomadik/cpu-8815.c9
-rw-r--r--arch/arm/mach-nomadik/include/mach/system.h32
-rw-r--r--arch/arm/mach-omap1/include/mach/system.h5
-rw-r--r--arch/arm/mach-omap1/pm.c19
-rw-r--r--arch/arm/mach-omap2/emu.c26
-rw-r--r--arch/arm/mach-omap2/include/mach/system.h5
-rw-r--r--arch/arm/mach-omap2/pm24xx.c4
-rw-r--r--arch/arm/mach-omap2/pm34xx.c6
-rw-r--r--arch/arm/mach-omap2/pm44xx.c8
-rw-r--r--arch/arm/mach-omap2/prm_common.c1
-rw-r--r--arch/arm/mach-orion5x/include/mach/system.h19
-rw-r--r--arch/arm/mach-picoxcell/include/mach/irqs.h20
-rw-r--r--arch/arm/mach-picoxcell/include/mach/system.h26
-rw-r--r--arch/arm/mach-pnx4008/include/mach/system.h29
-rw-r--r--arch/arm/mach-prima2/include/mach/system.h17
-rw-r--r--arch/arm/mach-prima2/timer.c21
-rw-r--r--arch/arm/mach-pxa/capc7117.c1
-rw-r--r--arch/arm/mach-pxa/cm-x300.c1
-rw-r--r--arch/arm/mach-pxa/colibri-pxa270.c2
-rw-r--r--arch/arm/mach-pxa/colibri-pxa300.c1
-rw-r--r--arch/arm/mach-pxa/colibri-pxa320.c1
-rw-r--r--arch/arm/mach-pxa/corgi.c3
-rw-r--r--arch/arm/mach-pxa/csb726.c1
-rw-r--r--arch/arm/mach-pxa/devices.c1
-rw-r--r--arch/arm/mach-pxa/em-x270.c2
-rw-r--r--arch/arm/mach-pxa/gumstix.c1
-rw-r--r--arch/arm/mach-pxa/h5000.c1
-rw-r--r--arch/arm/mach-pxa/himalaya.c1
-rw-r--r--arch/arm/mach-pxa/icontrol.c1
-rw-r--r--arch/arm/mach-pxa/idp.c1
-rw-r--r--arch/arm/mach-pxa/include/mach/irqs.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/mainstone.h2
-rw-r--r--arch/arm/mach-pxa/include/mach/system.h15
-rw-r--r--arch/arm/mach-pxa/mioa701.c1
-rw-r--r--arch/arm/mach-pxa/mp900.c1
-rw-r--r--arch/arm/mach-pxa/palmld.c1
-rw-r--r--arch/arm/mach-pxa/palmt5.c1
-rw-r--r--arch/arm/mach-pxa/palmtc.c1
-rw-r--r--arch/arm/mach-pxa/palmte2.c1
-rw-r--r--arch/arm/mach-pxa/palmtreo.c2
-rw-r--r--arch/arm/mach-pxa/palmtx.c1
-rw-r--r--arch/arm/mach-pxa/palmz72.c1
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c1
-rw-r--r--arch/arm/mach-pxa/raumfeld.c3
-rw-r--r--arch/arm/mach-pxa/saar.c1
-rw-r--r--arch/arm/mach-pxa/spitz.c3
-rw-r--r--arch/arm/mach-pxa/stargate2.c1
-rw-r--r--arch/arm/mach-pxa/tavorevb.c1
-rw-r--r--arch/arm/mach-pxa/time.c1
-rw-r--r--arch/arm/mach-pxa/trizeps4.c2
-rw-r--r--arch/arm/mach-pxa/viper.c1
-rw-r--r--arch/arm/mach-pxa/vpac270.c1
-rw-r--r--arch/arm/mach-pxa/xcep.c1
-rw-r--r--arch/arm/mach-pxa/z2.c1
-rw-r--r--arch/arm/mach-realview/core.h20
-rw-r--r--arch/arm/mach-realview/include/mach/irqs-pb1176.h2
-rw-r--r--arch/arm/mach-realview/include/mach/system.h33
-rw-r--r--arch/arm/mach-realview/realview_eb.c78
-rw-r--r--arch/arm/mach-realview/realview_pb1176.c78
-rw-r--r--arch/arm/mach-realview/realview_pb11mp.c78
-rw-r--r--arch/arm/mach-realview/realview_pba8.c78
-rw-r--r--arch/arm/mach-realview/realview_pbx.c78
-rw-r--r--arch/arm/mach-rpc/include/mach/system.h13
-rw-r--r--arch/arm/mach-s3c2410/include/mach/system.h54
-rw-r--r--arch/arm/mach-s3c2412/s3c2412.c4
-rw-r--r--arch/arm/mach-s3c2416/s3c2416.c3
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/system.h19
-rw-r--r--arch/arm/mach-s5p64x0/common.c15
-rw-r--r--arch/arm/mach-s5p64x0/dma.c22
-rw-r--r--arch/arm/mach-s5p64x0/include/mach/system.h21
-rw-r--r--arch/arm/mach-s5pc100/common.c12
-rw-r--r--arch/arm/mach-s5pc100/dma.c38
-rw-r--r--arch/arm/mach-s5pc100/include/mach/system.h19
-rw-r--r--arch/arm/mach-s5pv210/common.c12
-rw-r--r--arch/arm/mach-s5pv210/dma.c38
-rw-r--r--arch/arm/mach-s5pv210/include/mach/system.h21
-rw-r--r--arch/arm/mach-sa1100/include/mach/system.h9
-rw-r--r--arch/arm/mach-shark/core.c6
-rw-r--r--arch/arm/mach-shark/include/mach/system.h13
-rw-r--r--arch/arm/mach-shmobile/Kconfig4
-rw-r--r--arch/arm/mach-shmobile/board-ag5evm.c1
-rw-r--r--arch/arm/mach-shmobile/board-bonito.c1
-rw-r--r--arch/arm/mach-shmobile/board-g3evm.c1
-rw-r--r--arch/arm/mach-shmobile/board-g4evm.c1
-rw-r--r--arch/arm/mach-shmobile/board-kota2.c1
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c1
-rw-r--r--arch/arm/mach-shmobile/board-marzen.c1
-rw-r--r--arch/arm/mach-shmobile/include/mach/irqs.h6
-rw-r--r--arch/arm/mach-shmobile/include/mach/system.h5
-rw-r--r--arch/arm/mach-shmobile/intc-r8a7740.c1
-rw-r--r--arch/arm/mach-shmobile/intc-sh7367.c1
-rw-r--r--arch/arm/mach-shmobile/intc-sh7372.c1
-rw-r--r--arch/arm/mach-shmobile/intc-sh7377.c1
-rw-r--r--arch/arm/mach-shmobile/intc-sh73a0.c1
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7740.c1
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7779.c1
-rw-r--r--arch/arm/mach-shmobile/setup-sh7367.c1
-rw-r--r--arch/arm/mach-shmobile/setup-sh7372.c1
-rw-r--r--arch/arm/mach-shmobile/setup-sh7377.c1
-rw-r--r--arch/arm/mach-shmobile/setup-sh73a0.c1
-rw-r--r--arch/arm/mach-spear3xx/include/mach/system.h19
-rw-r--r--arch/arm/mach-spear3xx/spear300.c14
-rw-r--r--arch/arm/mach-spear3xx/spear3xx.c27
-rw-r--r--arch/arm/mach-spear6xx/include/mach/system.h19
-rw-r--r--arch/arm/mach-spear6xx/spear6xx.c10
-rw-r--r--arch/arm/mach-tegra/common.c3
-rw-r--r--arch/arm/mach-tegra/include/mach/system.h28
-rw-r--r--arch/arm/mach-u300/core.c85
-rw-r--r--arch/arm/mach-u300/include/mach/system.h14
-rw-r--r--arch/arm/mach-ux500/devices-common.c13
-rw-r--r--arch/arm/mach-ux500/include/mach/system.h20
-rw-r--r--arch/arm/mach-versatile/core.c70
-rw-r--r--arch/arm/mach-versatile/core.h20
-rw-r--r--arch/arm/mach-versatile/include/mach/system.h33
-rw-r--r--arch/arm/mach-versatile/versatile_pb.c18
-rw-r--r--arch/arm/mach-vexpress/core.h17
-rw-r--r--arch/arm/mach-vexpress/ct-ca9x4.c8
-rw-r--r--arch/arm/mach-vexpress/include/mach/ct-ca9x4.h2
-rw-r--r--arch/arm/mach-vexpress/include/mach/system.h33
-rw-r--r--arch/arm/mach-vexpress/v2m.c20
-rw-r--r--arch/arm/mach-vt8500/include/mach/system.h5
-rw-r--r--arch/arm/mach-w90x900/dev.c1
-rw-r--r--arch/arm/mach-w90x900/include/mach/system.h19
-rw-r--r--arch/arm/mach-zynq/include/mach/system.h23
-rw-r--r--arch/arm/plat-mxc/include/mach/system.h25
-rw-r--r--arch/arm/plat-nomadik/Kconfig1
-rw-r--r--arch/arm/plat-omap/include/plat/system.h15
-rw-r--r--arch/arm/plat-s3c24xx/cpu.c27
-rw-r--r--arch/arm/plat-spear/include/plat/system.h26
-rw-r--r--arch/arm/plat-versatile/Kconfig1
217 files changed, 920 insertions, 2397 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index be8f634f001..1c0a6bb6f92 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -30,7 +30,6 @@ config ARM
30 select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)) 30 select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7))
31 select HAVE_C_RECORDMCOUNT 31 select HAVE_C_RECORDMCOUNT
32 select HAVE_GENERIC_HARDIRQS 32 select HAVE_GENERIC_HARDIRQS
33 select HAVE_SPARSE_IRQ
34 select GENERIC_IRQ_SHOW 33 select GENERIC_IRQ_SHOW
35 select CPU_PM if (SUSPEND || CPU_IDLE) 34 select CPU_PM if (SUSPEND || CPU_IDLE)
36 select GENERIC_PCI_IOMAP 35 select GENERIC_PCI_IOMAP
@@ -55,9 +54,6 @@ config MIGHT_HAVE_PCI
55config SYS_SUPPORTS_APM_EMULATION 54config SYS_SUPPORTS_APM_EMULATION
56 bool 55 bool
57 56
58config HAVE_SCHED_CLOCK
59 bool
60
61config GENERIC_GPIO 57config GENERIC_GPIO
62 bool 58 bool
63 59
@@ -355,6 +351,7 @@ config ARCH_HIGHBANK
355 select GENERIC_CLOCKEVENTS 351 select GENERIC_CLOCKEVENTS
356 select HAVE_ARM_SCU 352 select HAVE_ARM_SCU
357 select HAVE_SMP 353 select HAVE_SMP
354 select SPARSE_IRQ
358 select USE_OF 355 select USE_OF
359 help 356 help
360 Support for the Calxeda Highbank SoC based boards. 357 Support for the Calxeda Highbank SoC based boards.
@@ -443,7 +440,6 @@ config ARCH_MXC
443 select CLKDEV_LOOKUP 440 select CLKDEV_LOOKUP
444 select CLKSRC_MMIO 441 select CLKSRC_MMIO
445 select GENERIC_IRQ_CHIP 442 select GENERIC_IRQ_CHIP
446 select HAVE_SCHED_CLOCK
447 select MULTI_IRQ_HANDLER 443 select MULTI_IRQ_HANDLER
448 help 444 help
449 Support for Freescale MXC/iMX-based family of processors 445 Support for Freescale MXC/iMX-based family of processors
@@ -535,7 +531,6 @@ config ARCH_IXP4XX
535 select CPU_XSCALE 531 select CPU_XSCALE
536 select GENERIC_GPIO 532 select GENERIC_GPIO
537 select GENERIC_CLOCKEVENTS 533 select GENERIC_CLOCKEVENTS
538 select HAVE_SCHED_CLOCK
539 select MIGHT_HAVE_PCI 534 select MIGHT_HAVE_PCI
540 select DMABOUNCE if PCI 535 select DMABOUNCE if PCI
541 help 536 help
@@ -606,7 +601,6 @@ config ARCH_MMP
606 select CLKDEV_LOOKUP 601 select CLKDEV_LOOKUP
607 select GENERIC_CLOCKEVENTS 602 select GENERIC_CLOCKEVENTS
608 select GPIO_PXA 603 select GPIO_PXA
609 select HAVE_SCHED_CLOCK
610 select TICK_ONESHOT 604 select TICK_ONESHOT
611 select PLAT_PXA 605 select PLAT_PXA
612 select SPARSE_IRQ 606 select SPARSE_IRQ
@@ -647,7 +641,6 @@ config ARCH_TEGRA
647 select GENERIC_CLOCKEVENTS 641 select GENERIC_CLOCKEVENTS
648 select GENERIC_GPIO 642 select GENERIC_GPIO
649 select HAVE_CLK 643 select HAVE_CLK
650 select HAVE_SCHED_CLOCK
651 select HAVE_SMP 644 select HAVE_SMP
652 select MIGHT_HAVE_CACHE_L2X0 645 select MIGHT_HAVE_CACHE_L2X0
653 select ARCH_HAS_CPUFREQ 646 select ARCH_HAS_CPUFREQ
@@ -664,7 +657,6 @@ config ARCH_PICOXCELL
664 select DW_APB_TIMER 657 select DW_APB_TIMER
665 select GENERIC_CLOCKEVENTS 658 select GENERIC_CLOCKEVENTS
666 select GENERIC_GPIO 659 select GENERIC_GPIO
667 select HAVE_SCHED_CLOCK
668 select HAVE_TCM 660 select HAVE_TCM
669 select NO_IOPORT 661 select NO_IOPORT
670 select SPARSE_IRQ 662 select SPARSE_IRQ
@@ -692,7 +684,6 @@ config ARCH_PXA
692 select ARCH_REQUIRE_GPIOLIB 684 select ARCH_REQUIRE_GPIOLIB
693 select GENERIC_CLOCKEVENTS 685 select GENERIC_CLOCKEVENTS
694 select GPIO_PXA 686 select GPIO_PXA
695 select HAVE_SCHED_CLOCK
696 select TICK_ONESHOT 687 select TICK_ONESHOT
697 select PLAT_PXA 688 select PLAT_PXA
698 select SPARSE_IRQ 689 select SPARSE_IRQ
@@ -760,7 +751,6 @@ config ARCH_SA1100
760 select CPU_FREQ 751 select CPU_FREQ
761 select GENERIC_CLOCKEVENTS 752 select GENERIC_CLOCKEVENTS
762 select CLKDEV_LOOKUP 753 select CLKDEV_LOOKUP
763 select HAVE_SCHED_CLOCK
764 select TICK_ONESHOT 754 select TICK_ONESHOT
765 select ARCH_REQUIRE_GPIOLIB 755 select ARCH_REQUIRE_GPIOLIB
766 select HAVE_IDE 756 select HAVE_IDE
@@ -817,7 +807,6 @@ config ARCH_S5P64X0
817 select CLKSRC_MMIO 807 select CLKSRC_MMIO
818 select HAVE_S3C2410_WATCHDOG if WATCHDOG 808 select HAVE_S3C2410_WATCHDOG if WATCHDOG
819 select GENERIC_CLOCKEVENTS 809 select GENERIC_CLOCKEVENTS
820 select HAVE_SCHED_CLOCK
821 select HAVE_S3C2410_I2C if I2C 810 select HAVE_S3C2410_I2C if I2C
822 select HAVE_S3C_RTC if RTC_CLASS 811 select HAVE_S3C_RTC if RTC_CLASS
823 help 812 help
@@ -850,7 +839,6 @@ config ARCH_S5PV210
850 select ARM_L1_CACHE_SHIFT_6 839 select ARM_L1_CACHE_SHIFT_6
851 select ARCH_HAS_CPUFREQ 840 select ARCH_HAS_CPUFREQ
852 select GENERIC_CLOCKEVENTS 841 select GENERIC_CLOCKEVENTS
853 select HAVE_SCHED_CLOCK
854 select HAVE_S3C2410_I2C if I2C 842 select HAVE_S3C2410_I2C if I2C
855 select HAVE_S3C_RTC if RTC_CLASS 843 select HAVE_S3C_RTC if RTC_CLASS
856 select HAVE_S3C2410_WATCHDOG if WATCHDOG 844 select HAVE_S3C2410_WATCHDOG if WATCHDOG
@@ -893,7 +881,6 @@ config ARCH_U300
893 depends on MMU 881 depends on MMU
894 select CLKSRC_MMIO 882 select CLKSRC_MMIO
895 select CPU_ARM926T 883 select CPU_ARM926T
896 select HAVE_SCHED_CLOCK
897 select HAVE_TCM 884 select HAVE_TCM
898 select ARM_AMBA 885 select ARM_AMBA
899 select ARM_PATCH_PHYS_VIRT 886 select ARM_PATCH_PHYS_VIRT
@@ -951,7 +938,6 @@ config ARCH_OMAP
951 select ARCH_HAS_CPUFREQ 938 select ARCH_HAS_CPUFREQ
952 select CLKSRC_MMIO 939 select CLKSRC_MMIO
953 select GENERIC_CLOCKEVENTS 940 select GENERIC_CLOCKEVENTS
954 select HAVE_SCHED_CLOCK
955 select ARCH_HAS_HOLES_MEMORYMODEL 941 select ARCH_HAS_HOLES_MEMORYMODEL
956 help 942 help
957 Support for TI's OMAP platform (OMAP1/2/3/4). 943 Support for TI's OMAP platform (OMAP1/2/3/4).
@@ -1117,13 +1103,11 @@ config ARCH_ACORN
1117config PLAT_IOP 1103config PLAT_IOP
1118 bool 1104 bool
1119 select GENERIC_CLOCKEVENTS 1105 select GENERIC_CLOCKEVENTS
1120 select HAVE_SCHED_CLOCK
1121 1106
1122config PLAT_ORION 1107config PLAT_ORION
1123 bool 1108 bool
1124 select CLKSRC_MMIO 1109 select CLKSRC_MMIO
1125 select GENERIC_IRQ_CHIP 1110 select GENERIC_IRQ_CHIP
1126 select HAVE_SCHED_CLOCK
1127 1111
1128config PLAT_PXA 1112config PLAT_PXA
1129 bool 1113 bool
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 755d9fbe323..f279ba9acfd 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -81,41 +81,6 @@ choice
81 prompt "Kernel low-level debugging port" 81 prompt "Kernel low-level debugging port"
82 depends on DEBUG_LL 82 depends on DEBUG_LL
83 83
84 config DEBUG_LL_UART_NONE
85 bool "No low-level debugging UART"
86 help
87 Say Y here if your platform doesn't provide a UART option
88 below. This relies on your platform choosing the right UART
89 definition internally in order for low-level debugging to
90 work.
91
92 config DEBUG_ICEDCC
93 bool "Kernel low-level debugging via EmbeddedICE DCC channel"
94 help
95 Say Y here if you want the debug print routines to direct
96 their output to the EmbeddedICE macrocell's DCC channel using
97 co-processor 14. This is known to work on the ARM9 style ICE
98 channel and on the XScale with the PEEDI.
99
100 Note that the system will appear to hang during boot if there
101 is nothing connected to read from the DCC.
102
103 config DEBUG_SEMIHOSTING
104 bool "Kernel low-level debug output via semihosting I"
105 help
106 Semihosting enables code running on an ARM target to use
107 the I/O facilities on a host debugger/emulator through a
108 simple SVC calls. The host debugger or emulator must have
109 semihosting enabled for the special svc call to be trapped
110 otherwise the kernel will crash.
111
112 This is known to work with OpenOCD, as wellas
113 ARM's Fast Models, or any other controlling environment
114 that implements semihosting.
115
116 For more details about semihosting, please see
117 chapter 8 of DUI0203I_rvct_developer_guide.pdf from ARM Ltd.
118
119 config AT91_DEBUG_LL_DBGU0 84 config AT91_DEBUG_LL_DBGU0
120 bool "Kernel low-level debugging on rm9200, 9260/9g20, 9261/9g10 and 9rl" 85 bool "Kernel low-level debugging on rm9200, 9260/9g20, 9261/9g10 and 9rl"
121 depends on HAVE_AT91_DBGU0 86 depends on HAVE_AT91_DBGU0
@@ -124,20 +89,6 @@ choice
124 bool "Kernel low-level debugging on 9263, 9g45 and cap9" 89 bool "Kernel low-level debugging on 9263, 9g45 and cap9"
125 depends on HAVE_AT91_DBGU1 90 depends on HAVE_AT91_DBGU1
126 91
127 config DEBUG_FOOTBRIDGE_COM1
128 bool "Kernel low-level debugging messages via footbridge 8250 at PCI COM1"
129 depends on FOOTBRIDGE
130 help
131 Say Y here if you want the debug print routines to direct
132 their output to the 8250 at PCI COM1.
133
134 config DEBUG_DC21285_PORT
135 bool "Kernel low-level debugging messages via footbridge serial port"
136 depends on FOOTBRIDGE
137 help
138 Say Y here if you want the debug print routines to direct
139 their output to the serial port in the DC21285 (Footbridge).
140
141 config DEBUG_CLPS711X_UART1 92 config DEBUG_CLPS711X_UART1
142 bool "Kernel low-level debugging messages via UART1" 93 bool "Kernel low-level debugging messages via UART1"
143 depends on ARCH_CLPS711X 94 depends on ARCH_CLPS711X
@@ -152,6 +103,20 @@ choice
152 Say Y here if you want the debug print routines to direct 103 Say Y here if you want the debug print routines to direct
153 their output to the second serial port on these devices. 104 their output to the second serial port on these devices.
154 105
106 config DEBUG_DC21285_PORT
107 bool "Kernel low-level debugging messages via footbridge serial port"
108 depends on FOOTBRIDGE
109 help
110 Say Y here if you want the debug print routines to direct
111 their output to the serial port in the DC21285 (Footbridge).
112
113 config DEBUG_FOOTBRIDGE_COM1
114 bool "Kernel low-level debugging messages via footbridge 8250 at PCI COM1"
115 depends on FOOTBRIDGE
116 help
117 Say Y here if you want the debug print routines to direct
118 their output to the 8250 at PCI COM1.
119
155 config DEBUG_HIGHBANK_UART 120 config DEBUG_HIGHBANK_UART
156 bool "Kernel low-level debugging messages via Highbank UART" 121 bool "Kernel low-level debugging messages via Highbank UART"
157 depends on ARCH_HIGHBANK 122 depends on ARCH_HIGHBANK
@@ -222,6 +187,59 @@ choice
222 Say Y here if you want kernel low-level debugging support 187 Say Y here if you want kernel low-level debugging support
223 on i.MX6Q. 188 on i.MX6Q.
224 189
190 config DEBUG_MSM_UART1
191 bool "Kernel low-level debugging messages via MSM UART1"
192 depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
193 help
194 Say Y here if you want the debug print routines to direct
195 their output to the first serial port on MSM devices.
196
197 config DEBUG_MSM_UART2
198 bool "Kernel low-level debugging messages via MSM UART2"
199 depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
200 help
201 Say Y here if you want the debug print routines to direct
202 their output to the second serial port on MSM devices.
203
204 config DEBUG_MSM_UART3
205 bool "Kernel low-level debugging messages via MSM UART3"
206 depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
207 help
208 Say Y here if you want the debug print routines to direct
209 their output to the third serial port on MSM devices.
210
211 config DEBUG_MSM8660_UART
212 bool "Kernel low-level debugging messages via MSM 8660 UART"
213 depends on ARCH_MSM8X60
214 select MSM_HAS_DEBUG_UART_HS
215 help
216 Say Y here if you want the debug print routines to direct
217 their output to the serial port on MSM 8660 devices.
218
219 config DEBUG_MSM8960_UART
220 bool "Kernel low-level debugging messages via MSM 8960 UART"
221 depends on ARCH_MSM8960
222 select MSM_HAS_DEBUG_UART_HS
223 help
224 Say Y here if you want the debug print routines to direct
225 their output to the serial port on MSM 8960 devices.
226
227 config DEBUG_REALVIEW_STD_PORT
228 bool "RealView Default UART"
229 depends on ARCH_REALVIEW
230 help
231 Say Y here if you want the debug print routines to direct
232 their output to the serial port on RealView EB, PB11MP, PBA8
233 and PBX platforms.
234
235 config DEBUG_REALVIEW_PB1176_PORT
236 bool "RealView PB1176 UART"
237 depends on MACH_REALVIEW_PB1176
238 help
239 Say Y here if you want the debug print routines to direct
240 their output to the standard serial port on the RealView
241 PB1176 platform.
242
225 config DEBUG_S3C_UART0 243 config DEBUG_S3C_UART0
226 depends on PLAT_SAMSUNG 244 depends on PLAT_SAMSUNG
227 bool "Use S3C UART 0 for low-level debug" 245 bool "Use S3C UART 0 for low-level debug"
@@ -255,58 +273,40 @@ choice
255 The uncompressor code port configuration is now handled 273 The uncompressor code port configuration is now handled
256 by CONFIG_S3C_LOWLEVEL_UART_PORT. 274 by CONFIG_S3C_LOWLEVEL_UART_PORT.
257 275
258 config DEBUG_REALVIEW_STD_PORT 276 config DEBUG_LL_UART_NONE
259 bool "RealView Default UART" 277 bool "No low-level debugging UART"
260 depends on ARCH_REALVIEW
261 help
262 Say Y here if you want the debug print routines to direct
263 their output to the serial port on RealView EB, PB11MP, PBA8
264 and PBX platforms.
265
266 config DEBUG_REALVIEW_PB1176_PORT
267 bool "RealView PB1176 UART"
268 depends on MACH_REALVIEW_PB1176
269 help 278 help
270 Say Y here if you want the debug print routines to direct 279 Say Y here if your platform doesn't provide a UART option
271 their output to the standard serial port on the RealView 280 below. This relies on your platform choosing the right UART
272 PB1176 platform. 281 definition internally in order for low-level debugging to
282 work.
273 283
274 config DEBUG_MSM_UART1 284 config DEBUG_ICEDCC
275 bool "Kernel low-level debugging messages via MSM UART1" 285 bool "Kernel low-level debugging via EmbeddedICE DCC channel"
276 depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
277 help 286 help
278 Say Y here if you want the debug print routines to direct 287 Say Y here if you want the debug print routines to direct
279 their output to the first serial port on MSM devices. 288 their output to the EmbeddedICE macrocell's DCC channel using
289 co-processor 14. This is known to work on the ARM9 style ICE
290 channel and on the XScale with the PEEDI.
280 291
281 config DEBUG_MSM_UART2 292 Note that the system will appear to hang during boot if there
282 bool "Kernel low-level debugging messages via MSM UART2" 293 is nothing connected to read from the DCC.
283 depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
284 help
285 Say Y here if you want the debug print routines to direct
286 their output to the second serial port on MSM devices.
287 294
288 config DEBUG_MSM_UART3 295 config DEBUG_SEMIHOSTING
289 bool "Kernel low-level debugging messages via MSM UART3" 296 bool "Kernel low-level debug output via semihosting I"
290 depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
291 help 297 help
292 Say Y here if you want the debug print routines to direct 298 Semihosting enables code running on an ARM target to use
293 their output to the third serial port on MSM devices. 299 the I/O facilities on a host debugger/emulator through a
300 simple SVC calls. The host debugger or emulator must have
301 semihosting enabled for the special svc call to be trapped
302 otherwise the kernel will crash.
294 303
295 config DEBUG_MSM8660_UART 304 This is known to work with OpenOCD, as wellas
296 bool "Kernel low-level debugging messages via MSM 8660 UART" 305 ARM's Fast Models, or any other controlling environment
297 depends on ARCH_MSM8X60 306 that implements semihosting.
298 select MSM_HAS_DEBUG_UART_HS
299 help
300 Say Y here if you want the debug print routines to direct
301 their output to the serial port on MSM 8660 devices.
302 307
303 config DEBUG_MSM8960_UART 308 For more details about semihosting, please see
304 bool "Kernel low-level debugging messages via MSM 8960 UART" 309 chapter 8 of DUI0203I_rvct_developer_guide.pdf from ARM Ltd.
305 depends on ARCH_MSM8960
306 select MSM_HAS_DEBUG_UART_HS
307 help
308 Say Y here if you want the debug print routines to direct
309 their output to the serial port on MSM 8960 devices.
310 310
311endchoice 311endchoice
312 312
diff --git a/arch/arm/include/asm/hardware/it8152.h b/arch/arm/include/asm/hardware/it8152.h
index 43cab498bc2..73f84fa4f36 100644
--- a/arch/arm/include/asm/hardware/it8152.h
+++ b/arch/arm/include/asm/hardware/it8152.h
@@ -9,6 +9,9 @@
9 9
10#ifndef __ASM_HARDWARE_IT8152_H 10#ifndef __ASM_HARDWARE_IT8152_H
11#define __ASM_HARDWARE_IT8152_H 11#define __ASM_HARDWARE_IT8152_H
12
13#include <mach/irqs.h>
14
12extern void __iomem *it8152_base_address; 15extern void __iomem *it8152_base_address;
13 16
14#define IT8152_IO_BASE (it8152_base_address + 0x03e00000) 17#define IT8152_IO_BASE (it8152_base_address + 0x03e00000)
diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h
index 5a526afb5f1..35c21c375d8 100644
--- a/arch/arm/include/asm/irq.h
+++ b/arch/arm/include/asm/irq.h
@@ -1,14 +1,18 @@
1#ifndef __ASM_ARM_IRQ_H 1#ifndef __ASM_ARM_IRQ_H
2#define __ASM_ARM_IRQ_H 2#define __ASM_ARM_IRQ_H
3 3
4#define NR_IRQS_LEGACY 16
5
6#ifndef CONFIG_SPARSE_IRQ
4#include <mach/irqs.h> 7#include <mach/irqs.h>
8#else
9#define NR_IRQS NR_IRQS_LEGACY
10#endif
5 11
6#ifndef irq_canonicalize 12#ifndef irq_canonicalize
7#define irq_canonicalize(i) (i) 13#define irq_canonicalize(i) (i)
8#endif 14#endif
9 15
10#define NR_IRQS_LEGACY 16
11
12/* 16/*
13 * Use this value to indicate lack of interrupt 17 * Use this value to indicate lack of interrupt
14 * capability 18 * capability
diff --git a/arch/arm/include/asm/mc146818rtc.h b/arch/arm/include/asm/mc146818rtc.h
index 6b884d2b0b6..e8567bb99df 100644
--- a/arch/arm/include/asm/mc146818rtc.h
+++ b/arch/arm/include/asm/mc146818rtc.h
@@ -5,7 +5,9 @@
5#define _ASM_MC146818RTC_H 5#define _ASM_MC146818RTC_H
6 6
7#include <linux/io.h> 7#include <linux/io.h>
8#include <mach/irqs.h> 8#include <linux/kernel.h>
9
10#define RTC_IRQ BUILD_BUG_ON(1)
9 11
10#ifndef RTC_PORT 12#ifndef RTC_PORT
11#define RTC_PORT(x) (0x70 + (x)) 13#define RTC_PORT(x) (0x70 + (x))
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 774c41e8add..f7263652d2d 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -79,6 +79,7 @@ extern void cpu_init(void);
79 79
80void soft_restart(unsigned long); 80void soft_restart(unsigned long);
81extern void (*arm_pm_restart)(char str, const char *cmd); 81extern void (*arm_pm_restart)(char str, const char *cmd);
82extern void (*arm_pm_idle)(void);
82 83
83#define UDBG_UNDEFINED (1 << 0) 84#define UDBG_UNDEFINED (1 << 0)
84#define UDBG_SYSCALL (1 << 1) 85#define UDBG_SYSCALL (1 << 1)
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 1b7d9a39097..3c1593050eb 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -16,8 +16,8 @@ CFLAGS_REMOVE_return_address.o = -pg
16# Object file lists. 16# Object file lists.
17 17
18obj-y := elf.o entry-armv.o entry-common.o irq.o opcodes.o \ 18obj-y := elf.o entry-armv.o entry-common.o irq.o opcodes.o \
19 process.o ptrace.o return_address.o setup.o signal.o \ 19 process.o ptrace.o return_address.o sched_clock.o \
20 sys_arm.o stacktrace.o time.o traps.o 20 setup.o signal.o stacktrace.o sys_arm.o time.o traps.o
21 21
22obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += compat.o 22obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += compat.o
23 23
@@ -32,7 +32,6 @@ obj-$(CONFIG_ARTHUR) += arthur.o
32obj-$(CONFIG_ISA_DMA) += dma-isa.o 32obj-$(CONFIG_ISA_DMA) += dma-isa.o
33obj-$(CONFIG_PCI) += bios32.o isa.o 33obj-$(CONFIG_PCI) += bios32.o isa.o
34obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o suspend.o 34obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o suspend.o
35obj-$(CONFIG_HAVE_SCHED_CLOCK) += sched_clock.o
36obj-$(CONFIG_SMP) += smp.o smp_tlb.o 35obj-$(CONFIG_SMP) += smp.o smp_tlb.o
37obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o 36obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o
38obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o 37obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index e11b523db33..1531480aab4 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -61,8 +61,6 @@ extern void setup_mm_for_reboot(void);
61 61
62static volatile int hlt_counter; 62static volatile int hlt_counter;
63 63
64#include <mach/system.h>
65
66void disable_hlt(void) 64void disable_hlt(void)
67{ 65{
68 hlt_counter++; 66 hlt_counter++;
@@ -181,13 +179,17 @@ void cpu_idle_wait(void)
181EXPORT_SYMBOL_GPL(cpu_idle_wait); 179EXPORT_SYMBOL_GPL(cpu_idle_wait);
182 180
183/* 181/*
184 * This is our default idle handler. We need to disable 182 * This is our default idle handler.
185 * interrupts here to ensure we don't miss a wakeup call.
186 */ 183 */
184
185void (*arm_pm_idle)(void);
186
187static void default_idle(void) 187static void default_idle(void)
188{ 188{
189 if (!need_resched()) 189 if (arm_pm_idle)
190 arch_idle(); 190 arm_pm_idle();
191 else
192 cpu_do_idle();
191 local_irq_enable(); 193 local_irq_enable();
192} 194}
193 195
@@ -215,6 +217,10 @@ void cpu_idle(void)
215 cpu_die(); 217 cpu_die();
216#endif 218#endif
217 219
220 /*
221 * We need to disable interrupts here
222 * to ensure we don't miss a wakeup call.
223 */
218 local_irq_disable(); 224 local_irq_disable();
219#ifdef CONFIG_PL310_ERRATA_769419 225#ifdef CONFIG_PL310_ERRATA_769419
220 wmb(); 226 wmb();
@@ -222,19 +228,18 @@ void cpu_idle(void)
222 if (hlt_counter) { 228 if (hlt_counter) {
223 local_irq_enable(); 229 local_irq_enable();
224 cpu_relax(); 230 cpu_relax();
225 } else { 231 } else if (!need_resched()) {
226 stop_critical_timings(); 232 stop_critical_timings();
227 if (cpuidle_idle_call()) 233 if (cpuidle_idle_call())
228 pm_idle(); 234 pm_idle();
229 start_critical_timings(); 235 start_critical_timings();
230 /* 236 /*
231 * This will eventually be removed - pm_idle 237 * pm_idle functions must always
232 * functions should always return with IRQs 238 * return with IRQs enabled.
233 * enabled.
234 */ 239 */
235 WARN_ON(irqs_disabled()); 240 WARN_ON(irqs_disabled());
241 } else
236 local_irq_enable(); 242 local_irq_enable();
237 }
238 } 243 }
239 leds_event(led_idle_end); 244 leds_event(led_idle_end);
240 rcu_idle_exit(); 245 rcu_idle_exit();
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index 8c57dd3680e..fe31b22f18f 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -25,8 +25,6 @@
25#include <linux/timer.h> 25#include <linux/timer.h>
26#include <linux/irq.h> 26#include <linux/irq.h>
27 27
28#include <linux/mc146818rtc.h>
29
30#include <asm/leds.h> 28#include <asm/leds.h>
31#include <asm/thread_info.h> 29#include <asm/thread_info.h>
32#include <asm/sched_clock.h> 30#include <asm/sched_clock.h>
@@ -149,8 +147,6 @@ void __init time_init(void)
149{ 147{
150 system_timer = machine_desc->timer; 148 system_timer = machine_desc->timer;
151 system_timer->init(); 149 system_timer->init();
152#ifdef CONFIG_HAVE_SCHED_CLOCK
153 sched_clock_postinit(); 150 sched_clock_postinit();
154#endif
155} 151}
156 152
diff --git a/arch/arm/mach-at91/at91cap9.c b/arch/arm/mach-at91/at91cap9.c
index edb879ac04c..1d29a6cbbae 100644
--- a/arch/arm/mach-at91/at91cap9.c
+++ b/arch/arm/mach-at91/at91cap9.c
@@ -14,6 +14,7 @@
14 14
15#include <linux/module.h> 15#include <linux/module.h>
16 16
17#include <asm/proc-fns.h>
17#include <asm/irq.h> 18#include <asm/irq.h>
18#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
19#include <asm/mach/map.h> 20#include <asm/mach/map.h>
@@ -314,6 +315,12 @@ static struct at91_gpio_bank at91cap9_gpio[] __initdata = {
314 } 315 }
315}; 316};
316 317
318static void at91cap9_idle(void)
319{
320 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
321 cpu_do_idle();
322}
323
317static void at91cap9_restart(char mode, const char *cmd) 324static void at91cap9_restart(char mode, const char *cmd)
318{ 325{
319 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST); 326 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
@@ -337,6 +344,7 @@ static void __init at91cap9_ioremap_registers(void)
337 344
338static void __init at91cap9_initialize(void) 345static void __init at91cap9_initialize(void)
339{ 346{
347 arm_pm_idle = at91cap9_idle;
340 arm_pm_restart = at91cap9_restart; 348 arm_pm_restart = at91cap9_restart;
341 at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1); 349 at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1);
342 350
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index 99c3174e24a..dd6e2de1342 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -289,6 +289,15 @@ static struct at91_gpio_bank at91rm9200_gpio[] __initdata = {
289 } 289 }
290}; 290};
291 291
292static void at91rm9200_idle(void)
293{
294 /*
295 * Disable the processor clock. The processor will be automatically
296 * re-enabled by an interrupt or by a reset.
297 */
298 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
299}
300
292static void at91rm9200_restart(char mode, const char *cmd) 301static void at91rm9200_restart(char mode, const char *cmd)
293{ 302{
294 /* 303 /*
@@ -314,6 +323,7 @@ static void __init at91rm9200_ioremap_registers(void)
314 323
315static void __init at91rm9200_initialize(void) 324static void __init at91rm9200_initialize(void)
316{ 325{
326 arm_pm_idle = at91rm9200_idle;
317 arm_pm_restart = at91rm9200_restart; 327 arm_pm_restart = at91rm9200_restart;
318 at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1) 328 at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1)
319 | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3) 329 | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3)
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index 5e46e4a9643..cfe6dd747cc 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -12,6 +12,7 @@
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14 14
15#include <asm/proc-fns.h>
15#include <asm/irq.h> 16#include <asm/irq.h>
16#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
17#include <asm/mach/map.h> 18#include <asm/mach/map.h>
@@ -327,8 +328,15 @@ static void __init at91sam9260_ioremap_registers(void)
327 at91sam9_ioremap_smc(0, AT91SAM9260_BASE_SMC); 328 at91sam9_ioremap_smc(0, AT91SAM9260_BASE_SMC);
328} 329}
329 330
331static void at91sam9260_idle(void)
332{
333 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
334 cpu_do_idle();
335}
336
330static void __init at91sam9260_initialize(void) 337static void __init at91sam9260_initialize(void)
331{ 338{
339 arm_pm_idle = at91sam9260_idle;
332 arm_pm_restart = at91sam9_alt_restart; 340 arm_pm_restart = at91sam9_alt_restart;
333 at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1) 341 at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1)
334 | (1 << AT91SAM9260_ID_IRQ2); 342 | (1 << AT91SAM9260_ID_IRQ2);
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index b85b9ea6017..76ffbe67fff 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -12,6 +12,7 @@
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14 14
15#include <asm/proc-fns.h>
15#include <asm/irq.h> 16#include <asm/irq.h>
16#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
17#include <asm/mach/map.h> 18#include <asm/mach/map.h>
@@ -285,8 +286,15 @@ static void __init at91sam9261_ioremap_registers(void)
285 at91sam9_ioremap_smc(0, AT91SAM9261_BASE_SMC); 286 at91sam9_ioremap_smc(0, AT91SAM9261_BASE_SMC);
286} 287}
287 288
289static void at91sam9261_idle(void)
290{
291 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
292 cpu_do_idle();
293}
294
288static void __init at91sam9261_initialize(void) 295static void __init at91sam9261_initialize(void)
289{ 296{
297 arm_pm_idle = at91sam9261_idle;
290 arm_pm_restart = at91sam9_alt_restart; 298 arm_pm_restart = at91sam9_alt_restart;
291 at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) 299 at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1)
292 | (1 << AT91SAM9261_ID_IRQ2); 300 | (1 << AT91SAM9261_ID_IRQ2);
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c
index 79e3669b111..bcce7e2ca2f 100644
--- a/arch/arm/mach-at91/at91sam9263.c
+++ b/arch/arm/mach-at91/at91sam9263.c
@@ -12,6 +12,7 @@
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14 14
15#include <asm/proc-fns.h>
15#include <asm/irq.h> 16#include <asm/irq.h>
16#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
17#include <asm/mach/map.h> 18#include <asm/mach/map.h>
@@ -306,8 +307,15 @@ static void __init at91sam9263_ioremap_registers(void)
306 at91sam9_ioremap_smc(1, AT91SAM9263_BASE_SMC1); 307 at91sam9_ioremap_smc(1, AT91SAM9263_BASE_SMC1);
307} 308}
308 309
310static void at91sam9263_idle(void)
311{
312 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
313 cpu_do_idle();
314}
315
309static void __init at91sam9263_initialize(void) 316static void __init at91sam9263_initialize(void)
310{ 317{
318 arm_pm_idle = at91sam9263_idle;
311 arm_pm_restart = at91sam9_alt_restart; 319 arm_pm_restart = at91sam9_alt_restart;
312 at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1); 320 at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1);
313 321
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c
index 7032dd32cdf..0e80b395214 100644
--- a/arch/arm/mach-at91/at91sam9g45.c
+++ b/arch/arm/mach-at91/at91sam9g45.c
@@ -318,6 +318,12 @@ static struct at91_gpio_bank at91sam9g45_gpio[] __initdata = {
318 } 318 }
319}; 319};
320 320
321static void at91sam9g45_idle(void)
322{
323 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
324 cpu_do_idle();
325}
326
321static void at91sam9g45_restart(char mode, const char *cmd) 327static void at91sam9g45_restart(char mode, const char *cmd)
322{ 328{
323 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST); 329 at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_PROCRST | AT91_RSTC_PERRST);
@@ -342,6 +348,7 @@ static void __init at91sam9g45_ioremap_registers(void)
342 348
343static void __init at91sam9g45_initialize(void) 349static void __init at91sam9g45_initialize(void)
344{ 350{
351 arm_pm_idle = at91sam9g45_idle;
345 arm_pm_restart = at91sam9g45_restart; 352 arm_pm_restart = at91sam9g45_restart;
346 at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0); 353 at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0);
347 354
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c
index d6bcb1da11d..e0093942040 100644
--- a/arch/arm/mach-at91/at91sam9rl.c
+++ b/arch/arm/mach-at91/at91sam9rl.c
@@ -11,6 +11,7 @@
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13 13
14#include <asm/proc-fns.h>
14#include <asm/irq.h> 15#include <asm/irq.h>
15#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
16#include <asm/mach/map.h> 17#include <asm/mach/map.h>
@@ -290,8 +291,15 @@ static void __init at91sam9rl_ioremap_registers(void)
290 at91sam9_ioremap_smc(0, AT91SAM9RL_BASE_SMC); 291 at91sam9_ioremap_smc(0, AT91SAM9RL_BASE_SMC);
291} 292}
292 293
294static void at91sam9rl_idle(void)
295{
296 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
297 cpu_do_idle();
298}
299
293static void __init at91sam9rl_initialize(void) 300static void __init at91sam9rl_initialize(void)
294{ 301{
302 arm_pm_idle = at91sam9rl_idle;
295 arm_pm_restart = at91sam9_alt_restart; 303 arm_pm_restart = at91sam9_alt_restart;
296 at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0); 304 at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0);
297 305
diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c
index 56ba3bd035a..0154b7f44ff 100644
--- a/arch/arm/mach-at91/at91x40.c
+++ b/arch/arm/mach-at91/at91x40.c
@@ -13,6 +13,7 @@
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/irq.h> 15#include <linux/irq.h>
16#include <asm/proc-fns.h>
16#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
17#include <mach/at91x40.h> 18#include <mach/at91x40.h>
18#include <mach/at91_st.h> 19#include <mach/at91_st.h>
@@ -37,8 +38,19 @@ unsigned long clk_get_rate(struct clk *clk)
37 return AT91X40_MASTER_CLOCK; 38 return AT91X40_MASTER_CLOCK;
38} 39}
39 40
41static void at91x40_idle(void)
42{
43 /*
44 * Disable the processor clock. The processor will be automatically
45 * re-enabled by an interrupt or by a reset.
46 */
47 at91_sys_write(AT91_PS_CR, AT91_PS_CR_CPU);
48 cpu_do_idle();
49}
50
40void __init at91x40_initialize(unsigned long main_clock) 51void __init at91x40_initialize(unsigned long main_clock)
41{ 52{
53 arm_pm_idle = at91x40_idle;
42 at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1) 54 at91_extern_irq = (1 << AT91X40_ID_IRQ0) | (1 << AT91X40_ID_IRQ1)
43 | (1 << AT91X40_ID_IRQ2); 55 | (1 << AT91X40_ID_IRQ2);
44} 56}
diff --git a/arch/arm/mach-at91/include/mach/system.h b/arch/arm/mach-at91/include/mach/system.h
deleted file mode 100644
index cbd64f3bcec..00000000000
--- a/arch/arm/mach-at91/include/mach/system.h
+++ /dev/null
@@ -1,50 +0,0 @@
1/*
2 * arch/arm/mach-at91/include/mach/system.h
3 *
4 * Copyright (C) 2003 SAN People
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24#include <mach/hardware.h>
25#include <mach/at91_st.h>
26#include <mach/at91_dbgu.h>
27#include <mach/at91_pmc.h>
28
29static inline void arch_idle(void)
30{
31 /*
32 * Disable the processor clock. The processor will be automatically
33 * re-enabled by an interrupt or by a reset.
34 */
35#ifdef AT91_PS
36 at91_sys_write(AT91_PS_CR, AT91_PS_CR_CPU);
37#else
38 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK);
39#endif
40#ifndef CONFIG_CPU_ARM920T
41 /*
42 * Set the processor (CP15) into 'Wait for Interrupt' mode.
43 * Post-RM9200 processors need this in conjunction with the above
44 * to save power when idle.
45 */
46 cpu_do_idle();
47#endif
48}
49
50#endif
diff --git a/arch/arm/mach-bcmring/core.c b/arch/arm/mach-bcmring/core.c
index 6b67b7e8426..22e4e0a28ad 100644
--- a/arch/arm/mach-bcmring/core.c
+++ b/arch/arm/mach-bcmring/core.c
@@ -52,27 +52,8 @@
52#include <mach/csp/chipcHw_inline.h> 52#include <mach/csp/chipcHw_inline.h>
53#include <mach/csp/tmrHw_reg.h> 53#include <mach/csp/tmrHw_reg.h>
54 54
55#define AMBA_DEVICE(name, initname, base, plat, size) \ 55static AMBA_APB_DEVICE(uartA, "uarta", MM_ADDR_IO_UARTA, { IRQ_UARTA }, NULL);
56static struct amba_device name##_device = { \ 56static AMBA_APB_DEVICE(uartB, "uartb", MM_ADDR_IO_UARTB, { IRQ_UARTB }, NULL);
57 .dev = { \
58 .coherent_dma_mask = ~0, \
59 .init_name = initname, \
60 .platform_data = plat \
61 }, \
62 .res = { \
63 .start = MM_ADDR_IO_##base, \
64 .end = MM_ADDR_IO_##base + (size) - 1, \
65 .flags = IORESOURCE_MEM \
66 }, \
67 .dma_mask = ~0, \
68 .irq = { \
69 IRQ_##base \
70 } \
71}
72
73
74AMBA_DEVICE(uartA, "uarta", UARTA, NULL, SZ_4K);
75AMBA_DEVICE(uartB, "uartb", UARTB, NULL, SZ_4K);
76 57
77static struct clk pll1_clk = { 58static struct clk pll1_clk = {
78 .name = "PLL1", 59 .name = "PLL1",
diff --git a/arch/arm/mach-bcmring/include/mach/system.h b/arch/arm/mach-bcmring/include/mach/system.h
deleted file mode 100644
index cb78250db64..00000000000
--- a/arch/arm/mach-bcmring/include/mach/system.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 *
3 * Copyright (C) 1999 ARM Limited
4 * Copyright (C) 2000 Deep Blue Solutions Ltd
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_SYSTEM_H
21#define __ASM_ARCH_SYSTEM_H
22
23static inline void arch_idle(void)
24{
25 cpu_do_idle();
26}
27
28#endif
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c
index ab1711b9b4d..8736c1acc16 100644
--- a/arch/arm/mach-clps711x/common.c
+++ b/arch/arm/mach-clps711x/common.c
@@ -225,3 +225,19 @@ void clps711x_restart(char mode, const char *cmd)
225{ 225{
226 soft_restart(0); 226 soft_restart(0);
227} 227}
228
229static void clps711x_idle(void)
230{
231 clps_writel(1, HALT);
232 __asm__ __volatile__(
233 "mov r0, r0\n\
234 mov r0, r0");
235}
236
237static int __init clps711x_idle_init(void)
238{
239 arm_pm_idle = clps711x_idle;
240 return 0;
241}
242
243arch_initcall(clps711x_idle_init);
diff --git a/arch/arm/mach-clps711x/include/mach/system.h b/arch/arm/mach-clps711x/include/mach/system.h
deleted file mode 100644
index 23d6ef8c84d..00000000000
--- a/arch/arm/mach-clps711x/include/mach/system.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * arch/arm/mach-clps711x/include/mach/system.h
3 *
4 * Copyright (C) 2000 Deep Blue Solutions Ltd
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_SYSTEM_H
21#define __ASM_ARCH_SYSTEM_H
22
23#include <linux/io.h>
24#include <mach/hardware.h>
25#include <asm/hardware/clps7111.h>
26
27static inline void arch_idle(void)
28{
29 clps_writel(1, HALT);
30 __asm__ __volatile__(
31 "mov r0, r0\n\
32 mov r0, r0");
33}
34
35#endif
diff --git a/arch/arm/mach-cns3xxx/include/mach/system.h b/arch/arm/mach-cns3xxx/include/mach/system.h
deleted file mode 100644
index 9e56b7dc133..00000000000
--- a/arch/arm/mach-cns3xxx/include/mach/system.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * Copyright 2000 Deep Blue Solutions Ltd
3 * Copyright 2003 ARM Limited
4 * Copyright 2008 Cavium Networks
5 *
6 * This file is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License, Version 2, as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __MACH_SYSTEM_H
12#define __MACH_SYSTEM_H
13
14#include <asm/proc-fns.h>
15
16static inline void arch_idle(void)
17{
18 /*
19 * This should do all the clock switching
20 * and wait for interrupt tricks
21 */
22 cpu_do_idle();
23}
24
25#endif
diff --git a/arch/arm/mach-davinci/include/mach/system.h b/arch/arm/mach-davinci/include/mach/system.h
deleted file mode 100644
index fcb7a015aba..00000000000
--- a/arch/arm/mach-davinci/include/mach/system.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * DaVinci system defines
3 *
4 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
5 *
6 * 2007 (c) MontaVista Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11#ifndef __ASM_ARCH_SYSTEM_H
12#define __ASM_ARCH_SYSTEM_H
13
14#include <mach/common.h>
15
16static inline void arch_idle(void)
17{
18 cpu_do_idle();
19}
20
21#endif /* __ASM_ARCH_SYSTEM_H */
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index e1969ce904d..75da315b658 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -19,11 +19,14 @@
19#include <linux/err.h> 19#include <linux/err.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21 21
22#include <mach/hardware.h> 22#include <asm/sched_clock.h>
23#include <asm/mach/irq.h> 23#include <asm/mach/irq.h>
24#include <asm/mach/time.h> 24#include <asm/mach/time.h>
25
25#include <mach/cputype.h> 26#include <mach/cputype.h>
27#include <mach/hardware.h>
26#include <mach/time.h> 28#include <mach/time.h>
29
27#include "clock.h" 30#include "clock.h"
28 31
29static struct clock_event_device clockevent_davinci; 32static struct clock_event_device clockevent_davinci;
@@ -272,19 +275,9 @@ static cycle_t read_cycles(struct clocksource *cs)
272 return (cycles_t)timer32_read(t); 275 return (cycles_t)timer32_read(t);
273} 276}
274 277
275/*
276 * Kernel assumes that sched_clock can be called early but may not have
277 * things ready yet.
278 */
279static cycle_t read_dummy(struct clocksource *cs)
280{
281 return 0;
282}
283
284
285static struct clocksource clocksource_davinci = { 278static struct clocksource clocksource_davinci = {
286 .rating = 300, 279 .rating = 300,
287 .read = read_dummy, 280 .read = read_cycles,
288 .mask = CLOCKSOURCE_MASK(32), 281 .mask = CLOCKSOURCE_MASK(32),
289 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 282 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
290}; 283};
@@ -292,12 +285,9 @@ static struct clocksource clocksource_davinci = {
292/* 285/*
293 * Overwrite weak default sched_clock with something more precise 286 * Overwrite weak default sched_clock with something more precise
294 */ 287 */
295unsigned long long notrace sched_clock(void) 288static u32 notrace davinci_read_sched_clock(void)
296{ 289{
297 const cycle_t cyc = clocksource_davinci.read(&clocksource_davinci); 290 return timer32_read(&timers[TID_CLOCKSOURCE]);
298
299 return clocksource_cyc2ns(cyc, clocksource_davinci.mult,
300 clocksource_davinci.shift);
301} 291}
302 292
303/* 293/*
@@ -397,12 +387,14 @@ static void __init davinci_timer_init(void)
397 davinci_clock_tick_rate = clk_get_rate(timer_clk); 387 davinci_clock_tick_rate = clk_get_rate(timer_clk);
398 388
399 /* setup clocksource */ 389 /* setup clocksource */
400 clocksource_davinci.read = read_cycles;
401 clocksource_davinci.name = id_to_name[clocksource_id]; 390 clocksource_davinci.name = id_to_name[clocksource_id];
402 if (clocksource_register_hz(&clocksource_davinci, 391 if (clocksource_register_hz(&clocksource_davinci,
403 davinci_clock_tick_rate)) 392 davinci_clock_tick_rate))
404 printk(err, clocksource_davinci.name); 393 printk(err, clocksource_davinci.name);
405 394
395 setup_sched_clock(davinci_read_sched_clock, 32,
396 davinci_clock_tick_rate);
397
406 /* setup clockevent */ 398 /* setup clockevent */
407 clockevent_davinci.name = id_to_name[timers[TID_CLOCKEVENT].id]; 399 clockevent_davinci.name = id_to_name[timers[TID_CLOCKEVENT].id];
408 clockevent_davinci.mult = div_sc(davinci_clock_tick_rate, NSEC_PER_SEC, 400 clockevent_davinci.mult = div_sc(davinci_clock_tick_rate, NSEC_PER_SEC,
diff --git a/arch/arm/mach-dove/include/mach/system.h b/arch/arm/mach-dove/include/mach/system.h
deleted file mode 100644
index 3027954f616..00000000000
--- a/arch/arm/mach-dove/include/mach/system.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * arch/arm/mach-dove/include/mach/system.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_SYSTEM_H
10#define __ASM_ARCH_SYSTEM_H
11
12static inline void arch_idle(void)
13{
14 cpu_do_idle();
15}
16
17#endif
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index 294aad07f7a..804c9122b7b 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -271,8 +271,33 @@ static struct platform_device *ebsa110_devices[] = {
271 &am79c961_device, 271 &am79c961_device,
272}; 272};
273 273
274/*
275 * EBSA110 idling methodology:
276 *
277 * We can not execute the "wait for interrupt" instruction since that
278 * will stop our MCLK signal (which provides the clock for the glue
279 * logic, and therefore the timer interrupt).
280 *
281 * Instead, we spin, polling the IRQ_STAT register for the occurrence
282 * of any interrupt with core clock down to the memory clock.
283 */
284static void ebsa110_idle(void)
285{
286 const char *irq_stat = (char *)0xff000000;
287
288 /* disable clock switching */
289 asm volatile ("mcr p15, 0, ip, c15, c2, 2" : : : "cc");
290
291 /* wait for an interrupt to occur */
292 while (!*irq_stat);
293
294 /* enable clock switching */
295 asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
296}
297
274static int __init ebsa110_init(void) 298static int __init ebsa110_init(void)
275{ 299{
300 arm_pm_idle = ebsa110_idle;
276 return platform_add_devices(ebsa110_devices, ARRAY_SIZE(ebsa110_devices)); 301 return platform_add_devices(ebsa110_devices, ARRAY_SIZE(ebsa110_devices));
277} 302}
278 303
diff --git a/arch/arm/mach-ebsa110/include/mach/system.h b/arch/arm/mach-ebsa110/include/mach/system.h
deleted file mode 100644
index 2e4af65edb6..00000000000
--- a/arch/arm/mach-ebsa110/include/mach/system.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * arch/arm/mach-ebsa110/include/mach/system.h
3 *
4 * Copyright (C) 1996-2000 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_ARCH_SYSTEM_H
11#define __ASM_ARCH_SYSTEM_H
12
13/*
14 * EBSA110 idling methodology:
15 *
16 * We can not execute the "wait for interrupt" instruction since that
17 * will stop our MCLK signal (which provides the clock for the glue
18 * logic, and therefore the timer interrupt).
19 *
20 * Instead, we spin, polling the IRQ_STAT register for the occurrence
21 * of any interrupt with core clock down to the memory clock.
22 */
23static inline void arch_idle(void)
24{
25 const char *irq_stat = (char *)0xff000000;
26
27 /* disable clock switching */
28 asm volatile ("mcr p15, 0, ip, c15, c2, 2" : : : "cc");
29
30 /* wait for an interrupt to occur */
31 while (!*irq_stat);
32
33 /* enable clock switching */
34 asm volatile ("mcr p15, 0, ip, c15, c1, 2" : : : "cc");
35}
36
37#endif
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 24203f9a679..903edb02fe4 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -279,48 +279,14 @@ static struct amba_pl010_data ep93xx_uart_data = {
279 .set_mctrl = ep93xx_uart_set_mctrl, 279 .set_mctrl = ep93xx_uart_set_mctrl,
280}; 280};
281 281
282static struct amba_device uart1_device = { 282static AMBA_APB_DEVICE(uart1, "apb:uart1", 0x00041010, EP93XX_UART1_PHYS_BASE,
283 .dev = { 283 { IRQ_EP93XX_UART1 }, &ep93xx_uart_data);
284 .init_name = "apb:uart1",
285 .platform_data = &ep93xx_uart_data,
286 },
287 .res = {
288 .start = EP93XX_UART1_PHYS_BASE,
289 .end = EP93XX_UART1_PHYS_BASE + 0x0fff,
290 .flags = IORESOURCE_MEM,
291 },
292 .irq = { IRQ_EP93XX_UART1, NO_IRQ },
293 .periphid = 0x00041010,
294};
295
296static struct amba_device uart2_device = {
297 .dev = {
298 .init_name = "apb:uart2",
299 .platform_data = &ep93xx_uart_data,
300 },
301 .res = {
302 .start = EP93XX_UART2_PHYS_BASE,
303 .end = EP93XX_UART2_PHYS_BASE + 0x0fff,
304 .flags = IORESOURCE_MEM,
305 },
306 .irq = { IRQ_EP93XX_UART2, NO_IRQ },
307 .periphid = 0x00041010,
308};
309 284
310static struct amba_device uart3_device = { 285static AMBA_APB_DEVICE(uart2, "apb:uart2", 0x00041010, EP93XX_UART2_PHYS_BASE,
311 .dev = { 286 { IRQ_EP93XX_UART2 }, &ep93xx_uart_data);
312 .init_name = "apb:uart3",
313 .platform_data = &ep93xx_uart_data,
314 },
315 .res = {
316 .start = EP93XX_UART3_PHYS_BASE,
317 .end = EP93XX_UART3_PHYS_BASE + 0x0fff,
318 .flags = IORESOURCE_MEM,
319 },
320 .irq = { IRQ_EP93XX_UART3, NO_IRQ },
321 .periphid = 0x00041010,
322};
323 287
288static AMBA_APB_DEVICE(uart3, "apb:uart3", 0x00041010, EP93XX_UART3_PHYS_BASE,
289 { IRQ_EP93XX_UART3 }, &ep93xx_uart_data);
324 290
325static struct resource ep93xx_rtc_resource[] = { 291static struct resource ep93xx_rtc_resource[] = {
326 { 292 {
diff --git a/arch/arm/mach-ep93xx/include/mach/system.h b/arch/arm/mach-ep93xx/include/mach/system.h
deleted file mode 100644
index b5bec7cb9b5..00000000000
--- a/arch/arm/mach-ep93xx/include/mach/system.h
+++ /dev/null
@@ -1,7 +0,0 @@
1/*
2 * arch/arm/mach-ep93xx/include/mach/system.h
3 */
4static inline void arch_idle(void)
5{
6 cpu_do_idle();
7}
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index c59e1887100..031c1e5b3df 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -201,14 +201,6 @@ static struct map_desc exynos4_iodesc1[] __initdata = {
201 }, 201 },
202}; 202};
203 203
204static void exynos_idle(void)
205{
206 if (!need_resched())
207 cpu_do_idle();
208
209 local_irq_enable();
210}
211
212void exynos4_restart(char mode, const char *cmd) 204void exynos4_restart(char mode, const char *cmd)
213{ 205{
214 __raw_writel(0x1, S5P_SWRESET); 206 __raw_writel(0x1, S5P_SWRESET);
@@ -467,10 +459,6 @@ early_initcall(exynos4_l2x0_cache_init);
467int __init exynos_init(void) 459int __init exynos_init(void)
468{ 460{
469 printk(KERN_INFO "EXYNOS: Initializing architecture\n"); 461 printk(KERN_INFO "EXYNOS: Initializing architecture\n");
470
471 /* set idle function */
472 pm_idle = exynos_idle;
473
474 return device_register(&exynos4_dev); 462 return device_register(&exynos4_dev);
475} 463}
476 464
diff --git a/arch/arm/mach-exynos/dma.c b/arch/arm/mach-exynos/dma.c
index b10fcd270f0..91370def4a7 100644
--- a/arch/arm/mach-exynos/dma.c
+++ b/arch/arm/mach-exynos/dma.c
@@ -74,21 +74,8 @@ struct dma_pl330_platdata exynos4_pdma0_pdata = {
74 .peri_id = pdma0_peri, 74 .peri_id = pdma0_peri,
75}; 75};
76 76
77struct amba_device exynos4_device_pdma0 = { 77AMBA_AHB_DEVICE(exynos4_pdma0, "dma-pl330.0", 0x00041330, EXYNOS4_PA_PDMA0,
78 .dev = { 78 {IRQ_PDMA0}, &exynos4_pdma0_pdata);
79 .init_name = "dma-pl330.0",
80 .dma_mask = &dma_dmamask,
81 .coherent_dma_mask = DMA_BIT_MASK(32),
82 .platform_data = &exynos4_pdma0_pdata,
83 },
84 .res = {
85 .start = EXYNOS4_PA_PDMA0,
86 .end = EXYNOS4_PA_PDMA0 + SZ_4K,
87 .flags = IORESOURCE_MEM,
88 },
89 .irq = {IRQ_PDMA0, NO_IRQ},
90 .periphid = 0x00041330,
91};
92 79
93u8 pdma1_peri[] = { 80u8 pdma1_peri[] = {
94 DMACH_PCM0_RX, 81 DMACH_PCM0_RX,
@@ -123,21 +110,8 @@ struct dma_pl330_platdata exynos4_pdma1_pdata = {
123 .peri_id = pdma1_peri, 110 .peri_id = pdma1_peri,
124}; 111};
125 112
126struct amba_device exynos4_device_pdma1 = { 113AMBA_AHB_DEVICE(exynos4_pdma1, "dma-pl330.1", 0x00041330, EXYNOS4_PA_PDMA1,
127 .dev = { 114 {IRQ_PDMA1}, &exynos4_pdma1_pdata);
128 .init_name = "dma-pl330.1",
129 .dma_mask = &dma_dmamask,
130 .coherent_dma_mask = DMA_BIT_MASK(32),
131 .platform_data = &exynos4_pdma1_pdata,
132 },
133 .res = {
134 .start = EXYNOS4_PA_PDMA1,
135 .end = EXYNOS4_PA_PDMA1 + SZ_4K,
136 .flags = IORESOURCE_MEM,
137 },
138 .irq = {IRQ_PDMA1, NO_IRQ},
139 .periphid = 0x00041330,
140};
141 115
142static int __init exynos4_dma_init(void) 116static int __init exynos4_dma_init(void)
143{ 117{
@@ -146,11 +120,11 @@ static int __init exynos4_dma_init(void)
146 120
147 dma_cap_set(DMA_SLAVE, exynos4_pdma0_pdata.cap_mask); 121 dma_cap_set(DMA_SLAVE, exynos4_pdma0_pdata.cap_mask);
148 dma_cap_set(DMA_CYCLIC, exynos4_pdma0_pdata.cap_mask); 122 dma_cap_set(DMA_CYCLIC, exynos4_pdma0_pdata.cap_mask);
149 amba_device_register(&exynos4_device_pdma0, &iomem_resource); 123 amba_device_register(&exynos4_pdma0_device, &iomem_resource);
150 124
151 dma_cap_set(DMA_SLAVE, exynos4_pdma1_pdata.cap_mask); 125 dma_cap_set(DMA_SLAVE, exynos4_pdma1_pdata.cap_mask);
152 dma_cap_set(DMA_CYCLIC, exynos4_pdma1_pdata.cap_mask); 126 dma_cap_set(DMA_CYCLIC, exynos4_pdma1_pdata.cap_mask);
153 amba_device_register(&exynos4_device_pdma1, &iomem_resource); 127 amba_device_register(&exynos4_pdma1_device, &iomem_resource);
154 128
155 return 0; 129 return 0;
156} 130}
diff --git a/arch/arm/mach-exynos/include/mach/system.h b/arch/arm/mach-exynos/include/mach/system.h
deleted file mode 100644
index 0063a6de3dc..00000000000
--- a/arch/arm/mach-exynos/include/mach/system.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/* linux/arch/arm/mach-exynos4/include/mach/system.h
2 *
3 * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * EXYNOS4 - system support header
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_SYSTEM_H
14#define __ASM_ARCH_SYSTEM_H __FILE__
15
16static void arch_idle(void)
17{
18 /* nothing here yet */
19}
20#endif /* __ASM_ARCH_SYSTEM_H */
diff --git a/arch/arm/mach-footbridge/include/mach/system.h b/arch/arm/mach-footbridge/include/mach/system.h
deleted file mode 100644
index a174a5841bc..00000000000
--- a/arch/arm/mach-footbridge/include/mach/system.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * arch/arm/mach-footbridge/include/mach/system.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10static inline void arch_idle(void)
11{
12 cpu_do_idle();
13}
diff --git a/arch/arm/mach-gemini/Makefile b/arch/arm/mach-gemini/Makefile
index c5b24b95a76..7355c0bbcb5 100644
--- a/arch/arm/mach-gemini/Makefile
+++ b/arch/arm/mach-gemini/Makefile
@@ -4,7 +4,7 @@
4 4
5# Object file lists. 5# Object file lists.
6 6
7obj-y := irq.o mm.o time.o devices.o gpio.o 7obj-y := irq.o mm.o time.o devices.o gpio.o idle.o
8 8
9# Board-specific support 9# Board-specific support
10obj-$(CONFIG_MACH_NAS4220B) += board-nas4220b.o 10obj-$(CONFIG_MACH_NAS4220B) += board-nas4220b.o
diff --git a/arch/arm/mach-gemini/idle.c b/arch/arm/mach-gemini/idle.c
new file mode 100644
index 00000000000..92bbd6bb600
--- /dev/null
+++ b/arch/arm/mach-gemini/idle.c
@@ -0,0 +1,29 @@
1/*
2 * arch/arm/mach-gemini/idle.c
3 */
4
5#include <linux/init.h>
6#include <asm/system.h>
7#include <asm/proc-fns.h>
8
9static void gemini_idle(void)
10{
11 /*
12 * Because of broken hardware we have to enable interrupts or the CPU
13 * will never wakeup... Acctualy it is not very good to enable
14 * interrupts first since scheduler can miss a tick, but there is
15 * no other way around this. Platforms that needs it for power saving
16 * should call enable_hlt() in init code, since by default it is
17 * disabled.
18 */
19 local_irq_enable();
20 cpu_do_idle();
21}
22
23static int __init gemini_idle_init(void)
24{
25 arm_pm_idle = gemini_idle;
26 return 0;
27}
28
29arch_initcall(gemini_idle_init);
diff --git a/arch/arm/mach-gemini/include/mach/system.h b/arch/arm/mach-gemini/include/mach/system.h
index 4d9c1f87247..a33b5a1f8ab 100644
--- a/arch/arm/mach-gemini/include/mach/system.h
+++ b/arch/arm/mach-gemini/include/mach/system.h
@@ -14,20 +14,6 @@
14#include <mach/hardware.h> 14#include <mach/hardware.h>
15#include <mach/global_reg.h> 15#include <mach/global_reg.h>
16 16
17static inline void arch_idle(void)
18{
19 /*
20 * Because of broken hardware we have to enable interrupts or the CPU
21 * will never wakeup... Acctualy it is not very good to enable
22 * interrupts here since scheduler can miss a tick, but there is
23 * no other way around this. Platforms that needs it for power saving
24 * should call enable_hlt() in init code, since by default it is
25 * disabled.
26 */
27 local_irq_enable();
28 cpu_do_idle();
29}
30
31static inline void arch_reset(char mode, const char *cmd) 17static inline void arch_reset(char mode, const char *cmd)
32{ 18{
33 __raw_writel(RESET_GLOBAL | RESET_CPU1, 19 __raw_writel(RESET_GLOBAL | RESET_CPU1,
diff --git a/arch/arm/mach-gemini/irq.c b/arch/arm/mach-gemini/irq.c
index 9485a8fdf85..ca70e5fcc7a 100644
--- a/arch/arm/mach-gemini/irq.c
+++ b/arch/arm/mach-gemini/irq.c
@@ -73,8 +73,8 @@ void __init gemini_init_irq(void)
73 unsigned int i, mode = 0, level = 0; 73 unsigned int i, mode = 0, level = 0;
74 74
75 /* 75 /*
76 * Disable arch_idle() by default since it is buggy 76 * Disable the idle handler by default since it is buggy
77 * For more info see arch/arm/mach-gemini/include/mach/system.h 77 * For more info see arch/arm/mach-gemini/idle.c
78 */ 78 */
79 disable_hlt(); 79 disable_hlt();
80 80
diff --git a/arch/arm/mach-h720x/common.c b/arch/arm/mach-h720x/common.c
index f8a2f6bb548..e756d1ac00c 100644
--- a/arch/arm/mach-h720x/common.c
+++ b/arch/arm/mach-h720x/common.c
@@ -247,3 +247,21 @@ void h720x_restart(char mode, const char *cmd)
247{ 247{
248 CPU_REG (PMU_BASE, PMU_STAT) |= PMU_WARMRESET; 248 CPU_REG (PMU_BASE, PMU_STAT) |= PMU_WARMRESET;
249} 249}
250
251static void h720x__idle(void)
252{
253 CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_IDLE;
254 nop();
255 nop();
256 CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_RUN;
257 nop();
258 nop();
259}
260
261static int __init h720x_idle_init(void)
262{
263 arm_pm_idle = h720x__idle;
264 return 0;
265}
266
267arch_initcall(h720x_idle_init);
diff --git a/arch/arm/mach-h720x/include/mach/system.h b/arch/arm/mach-h720x/include/mach/system.h
deleted file mode 100644
index 16ac46e239a..00000000000
--- a/arch/arm/mach-h720x/include/mach/system.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * arch/arm/mach-h720x/include/mach/system.h
3 *
4 * Copyright (C) 2001-2002 Jungjun Kim, Hynix Semiconductor Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 * arch/arm/mach-h720x/include/mach/system.h
10 *
11 */
12
13#ifndef __ASM_ARCH_SYSTEM_H
14#define __ASM_ARCH_SYSTEM_H
15#include <mach/hardware.h>
16
17static void arch_idle(void)
18{
19 CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_IDLE;
20 nop();
21 nop();
22 CPU_REG (PMU_BASE, PMU_MODE) = PMU_MODE_RUN;
23 nop();
24 nop();
25}
26
27#endif
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index 7afbe1e55be..ee228ef3d27 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -33,7 +33,6 @@
33#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35#include <asm/mach/time.h> 35#include <asm/mach/time.h>
36#include <mach/irqs.h>
37 36
38#include "core.h" 37#include "core.h"
39#include "sysregs.h" 38#include "sysregs.h"
diff --git a/arch/arm/mach-highbank/include/mach/irqs.h b/arch/arm/mach-highbank/include/mach/irqs.h
deleted file mode 100644
index 9746aab14e9..00000000000
--- a/arch/arm/mach-highbank/include/mach/irqs.h
+++ /dev/null
@@ -1,6 +0,0 @@
1#ifndef __MACH_IRQS_H
2#define __MACH_IRQS_H
3
4#define NR_IRQS 192
5
6#endif
diff --git a/arch/arm/mach-highbank/include/mach/system.h b/arch/arm/mach-highbank/include/mach/system.h
deleted file mode 100644
index b1d8b5fbe37..00000000000
--- a/arch/arm/mach-highbank/include/mach/system.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/*
2 * Copyright 2010-2011 Calxeda, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License along with
14 * this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#ifndef __MACH_SYSTEM_H
17#define __MACH_SYSTEM_H
18
19static inline void arch_idle(void)
20{
21 cpu_do_idle();
22}
23
24#endif
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index 31807d2a8b7..8404ee72555 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
@@ -34,31 +34,29 @@ static void imx3_idle(void)
34{ 34{
35 unsigned long reg = 0; 35 unsigned long reg = 0;
36 36
37 if (!need_resched()) 37 __asm__ __volatile__(
38 __asm__ __volatile__( 38 /* disable I and D cache */
39 /* disable I and D cache */ 39 "mrc p15, 0, %0, c1, c0, 0\n"
40 "mrc p15, 0, %0, c1, c0, 0\n" 40 "bic %0, %0, #0x00001000\n"
41 "bic %0, %0, #0x00001000\n" 41 "bic %0, %0, #0x00000004\n"
42 "bic %0, %0, #0x00000004\n" 42 "mcr p15, 0, %0, c1, c0, 0\n"
43 "mcr p15, 0, %0, c1, c0, 0\n" 43 /* invalidate I cache */
44 /* invalidate I cache */ 44 "mov %0, #0\n"
45 "mov %0, #0\n" 45 "mcr p15, 0, %0, c7, c5, 0\n"
46 "mcr p15, 0, %0, c7, c5, 0\n" 46 /* clear and invalidate D cache */
47 /* clear and invalidate D cache */ 47 "mov %0, #0\n"
48 "mov %0, #0\n" 48 "mcr p15, 0, %0, c7, c14, 0\n"
49 "mcr p15, 0, %0, c7, c14, 0\n" 49 /* WFI */
50 /* WFI */ 50 "mov %0, #0\n"
51 "mov %0, #0\n" 51 "mcr p15, 0, %0, c7, c0, 4\n"
52 "mcr p15, 0, %0, c7, c0, 4\n" 52 "nop\n" "nop\n" "nop\n" "nop\n"
53 "nop\n" "nop\n" "nop\n" "nop\n" 53 "nop\n" "nop\n" "nop\n"
54 "nop\n" "nop\n" "nop\n" 54 /* enable I and D cache */
55 /* enable I and D cache */ 55 "mrc p15, 0, %0, c1, c0, 0\n"
56 "mrc p15, 0, %0, c1, c0, 0\n" 56 "orr %0, %0, #0x00001000\n"
57 "orr %0, %0, #0x00001000\n" 57 "orr %0, %0, #0x00000004\n"
58 "orr %0, %0, #0x00000004\n" 58 "mcr p15, 0, %0, c1, c0, 0\n"
59 "mcr p15, 0, %0, c1, c0, 0\n" 59 : "=r" (reg));
60 : "=r" (reg));
61 local_irq_enable();
62} 60}
63 61
64static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size, 62static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size,
@@ -134,8 +132,8 @@ void __init imx31_init_early(void)
134{ 132{
135 mxc_set_cpu_type(MXC_CPU_MX31); 133 mxc_set_cpu_type(MXC_CPU_MX31);
136 mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR)); 134 mxc_arch_reset_init(MX31_IO_ADDRESS(MX31_WDOG_BASE_ADDR));
137 pm_idle = imx3_idle;
138 imx_ioremap = imx3_ioremap; 135 imx_ioremap = imx3_ioremap;
136 arm_pm_idle = imx3_idle;
139} 137}
140 138
141void __init mx31_init_irq(void) 139void __init mx31_init_irq(void)
@@ -197,7 +195,7 @@ void __init imx35_init_early(void)
197 mxc_set_cpu_type(MXC_CPU_MX35); 195 mxc_set_cpu_type(MXC_CPU_MX35);
198 mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR)); 196 mxc_iomux_v3_init(MX35_IO_ADDRESS(MX35_IOMUXC_BASE_ADDR));
199 mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR)); 197 mxc_arch_reset_init(MX35_IO_ADDRESS(MX35_WDOG_BASE_ADDR));
200 pm_idle = imx3_idle; 198 arm_pm_idle = imx3_idle;
201 imx_ioremap = imx3_ioremap; 199 imx_ioremap = imx3_ioremap;
202} 200}
203 201
diff --git a/arch/arm/mach-imx/pm-imx27.c b/arch/arm/mach-imx/pm-imx27.c
index e455d2f855b..6fcffa7db97 100644
--- a/arch/arm/mach-imx/pm-imx27.c
+++ b/arch/arm/mach-imx/pm-imx27.c
@@ -10,7 +10,6 @@
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/suspend.h> 11#include <linux/suspend.h>
12#include <linux/io.h> 12#include <linux/io.h>
13#include <mach/system.h>
14#include <mach/hardware.h> 13#include <mach/hardware.h>
15 14
16static int mx27_suspend_enter(suspend_state_t state) 15static int mx27_suspend_enter(suspend_state_t state)
@@ -23,7 +22,7 @@ static int mx27_suspend_enter(suspend_state_t state)
23 cscr &= 0xFFFFFFFC; 22 cscr &= 0xFFFFFFFC;
24 __raw_writel(cscr, MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR)); 23 __raw_writel(cscr, MX27_IO_ADDRESS(MX27_CCM_BASE_ADDR));
25 /* Executes WFI */ 24 /* Executes WFI */
26 arch_idle(); 25 cpu_do_idle();
27 break; 26 break;
28 27
29 default: 28 default:
diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig
index 5a6148ab6da..350e26636a0 100644
--- a/arch/arm/mach-integrator/Kconfig
+++ b/arch/arm/mach-integrator/Kconfig
@@ -5,7 +5,6 @@ menu "Integrator Options"
5config ARCH_INTEGRATOR_AP 5config ARCH_INTEGRATOR_AP
6 bool "Support Integrator/AP and Integrator/PP2 platforms" 6 bool "Support Integrator/AP and Integrator/PP2 platforms"
7 select CLKSRC_MMIO 7 select CLKSRC_MMIO
8 select HAVE_SCHED_CLOCK
9 select MIGHT_HAVE_PCI 8 select MIGHT_HAVE_PCI
10 select SERIAL_AMBA_PL010 9 select SERIAL_AMBA_PL010
11 select SERIAL_AMBA_PL010_CONSOLE 10 select SERIAL_AMBA_PL010_CONSOLE
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c
index cba1907c2e1..304dfb2b346 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-integrator/core.c
@@ -36,67 +36,23 @@
36 36
37static struct amba_pl010_data integrator_uart_data; 37static struct amba_pl010_data integrator_uart_data;
38 38
39static struct amba_device rtc_device = { 39#define INTEGRATOR_RTC_IRQ { IRQ_RTCINT }
40 .dev = { 40#define INTEGRATOR_UART0_IRQ { IRQ_UARTINT0 }
41 .init_name = "mb:15", 41#define INTEGRATOR_UART1_IRQ { IRQ_UARTINT1 }
42 }, 42#define KMI0_IRQ { IRQ_KMIINT0 }
43 .res = { 43#define KMI1_IRQ { IRQ_KMIINT1 }
44 .start = INTEGRATOR_RTC_BASE,
45 .end = INTEGRATOR_RTC_BASE + SZ_4K - 1,
46 .flags = IORESOURCE_MEM,
47 },
48 .irq = { IRQ_RTCINT, NO_IRQ },
49};
50 44
51static struct amba_device uart0_device = { 45static AMBA_APB_DEVICE(rtc, "mb:15", 0,
52 .dev = { 46 INTEGRATOR_RTC_BASE, INTEGRATOR_RTC_IRQ, NULL);
53 .init_name = "mb:16",
54 .platform_data = &integrator_uart_data,
55 },
56 .res = {
57 .start = INTEGRATOR_UART0_BASE,
58 .end = INTEGRATOR_UART0_BASE + SZ_4K - 1,
59 .flags = IORESOURCE_MEM,
60 },
61 .irq = { IRQ_UARTINT0, NO_IRQ },
62};
63 47
64static struct amba_device uart1_device = { 48static AMBA_APB_DEVICE(uart0, "mb:16", 0,
65 .dev = { 49 INTEGRATOR_UART0_BASE, INTEGRATOR_UART0_IRQ, &integrator_uart_data);
66 .init_name = "mb:17",
67 .platform_data = &integrator_uart_data,
68 },
69 .res = {
70 .start = INTEGRATOR_UART1_BASE,
71 .end = INTEGRATOR_UART1_BASE + SZ_4K - 1,
72 .flags = IORESOURCE_MEM,
73 },
74 .irq = { IRQ_UARTINT1, NO_IRQ },
75};
76 50
77static struct amba_device kmi0_device = { 51static AMBA_APB_DEVICE(uart1, "mb:17", 0,
78 .dev = { 52 INTEGRATOR_UART1_BASE, INTEGRATOR_UART1_IRQ, &integrator_uart_data);
79 .init_name = "mb:18",
80 },
81 .res = {
82 .start = KMI0_BASE,
83 .end = KMI0_BASE + SZ_4K - 1,
84 .flags = IORESOURCE_MEM,
85 },
86 .irq = { IRQ_KMIINT0, NO_IRQ },
87};
88 53
89static struct amba_device kmi1_device = { 54static AMBA_APB_DEVICE(kmi0, "mb:18", 0, KMI0_BASE, KMI0_IRQ, NULL);
90 .dev = { 55static AMBA_APB_DEVICE(kmi1, "mb:19", 0, KMI1_BASE, KMI1_IRQ, NULL);
91 .init_name = "mb:19",
92 },
93 .res = {
94 .start = KMI1_BASE,
95 .end = KMI1_BASE + SZ_4K - 1,
96 .flags = IORESOURCE_MEM,
97 },
98 .irq = { IRQ_KMIINT1, NO_IRQ },
99};
100 56
101static struct amba_device *amba_devs[] __initdata = { 57static struct amba_device *amba_devs[] __initdata = {
102 &rtc_device, 58 &rtc_device,
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c
index 8cbb75a96bd..3e538da6cb1 100644
--- a/arch/arm/mach-integrator/impd1.c
+++ b/arch/arm/mach-integrator/impd1.c
@@ -401,24 +401,21 @@ static int impd1_probe(struct lm_device *dev)
401 401
402 pc_base = dev->resource.start + idev->offset; 402 pc_base = dev->resource.start + idev->offset;
403 403
404 d = kzalloc(sizeof(struct amba_device), GFP_KERNEL); 404 d = amba_device_alloc(NULL, pc_base, SZ_4K);
405 if (!d) 405 if (!d)
406 continue; 406 continue;
407 407
408 dev_set_name(&d->dev, "lm%x:%5.5lx", dev->id, idev->offset >> 12); 408 dev_set_name(&d->dev, "lm%x:%5.5lx", dev->id, idev->offset >> 12);
409 d->dev.parent = &dev->dev; 409 d->dev.parent = &dev->dev;
410 d->res.start = dev->resource.start + idev->offset;
411 d->res.end = d->res.start + SZ_4K - 1;
412 d->res.flags = IORESOURCE_MEM;
413 d->irq[0] = dev->irq; 410 d->irq[0] = dev->irq;
414 d->irq[1] = dev->irq; 411 d->irq[1] = dev->irq;
415 d->periphid = idev->id; 412 d->periphid = idev->id;
416 d->dev.platform_data = idev->platform_data; 413 d->dev.platform_data = idev->platform_data;
417 414
418 ret = amba_device_register(d, &dev->resource); 415 ret = amba_device_add(d, &dev->resource);
419 if (ret) { 416 if (ret) {
420 dev_err(&d->dev, "unable to register device: %d\n", ret); 417 dev_err(&d->dev, "unable to register device: %d\n", ret);
421 kfree(d); 418 amba_device_put(d);
422 } 419 }
423 } 420 }
424 421
diff --git a/arch/arm/mach-integrator/include/mach/system.h b/arch/arm/mach-integrator/include/mach/system.h
deleted file mode 100644
index 901514eba4a..00000000000
--- a/arch/arm/mach-integrator/include/mach/system.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * arch/arm/mach-integrator/include/mach/system.h
3 *
4 * Copyright (C) 1999 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24static inline void arch_idle(void)
25{
26 /*
27 * This should do all the clock switching
28 * and wait for interrupt tricks
29 */
30 cpu_do_idle();
31}
32
33#endif
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 38d997dc96f..48a115a91d9 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -347,32 +347,14 @@ static struct mmci_platform_data mmc_data = {
347 .gpio_cd = -1, 347 .gpio_cd = -1,
348}; 348};
349 349
350static struct amba_device mmc_device = { 350#define INTEGRATOR_CP_MMC_IRQS { IRQ_CP_MMCIINT0, IRQ_CP_MMCIINT1 }
351 .dev = { 351#define INTEGRATOR_CP_AACI_IRQS { IRQ_CP_AACIINT }
352 .init_name = "mb:1c",
353 .platform_data = &mmc_data,
354 },
355 .res = {
356 .start = INTEGRATOR_CP_MMC_BASE,
357 .end = INTEGRATOR_CP_MMC_BASE + SZ_4K - 1,
358 .flags = IORESOURCE_MEM,
359 },
360 .irq = { IRQ_CP_MMCIINT0, IRQ_CP_MMCIINT1 },
361 .periphid = 0,
362};
363 352
364static struct amba_device aaci_device = { 353static AMBA_APB_DEVICE(mmc, "mb:1c", 0, INTEGRATOR_CP_MMC_BASE,
365 .dev = { 354 INTEGRATOR_CP_MMC_IRQS, &mmc_data);
366 .init_name = "mb:1d", 355
367 }, 356static AMBA_APB_DEVICE(aaci, "mb:1d", 0, INTEGRATOR_CP_AACI_BASE,
368 .res = { 357 INTEGRATOR_CP_AACI_IRQS, NULL);
369 .start = INTEGRATOR_CP_AACI_BASE,
370 .end = INTEGRATOR_CP_AACI_BASE + SZ_4K - 1,
371 .flags = IORESOURCE_MEM,
372 },
373 .irq = { IRQ_CP_AACIINT, NO_IRQ },
374 .periphid = 0,
375};
376 358
377 359
378/* 360/*
@@ -425,21 +407,8 @@ static struct clcd_board clcd_data = {
425 .remove = versatile_clcd_remove_dma, 407 .remove = versatile_clcd_remove_dma,
426}; 408};
427 409
428static struct amba_device clcd_device = { 410static AMBA_AHB_DEVICE(clcd, "mb:c0", 0, INTCP_PA_CLCD_BASE,
429 .dev = { 411 { IRQ_CP_CLCDCINT }, &clcd_data);
430 .init_name = "mb:c0",
431 .coherent_dma_mask = ~0,
432 .platform_data = &clcd_data,
433 },
434 .res = {
435 .start = INTCP_PA_CLCD_BASE,
436 .end = INTCP_PA_CLCD_BASE + SZ_4K - 1,
437 .flags = IORESOURCE_MEM,
438 },
439 .dma_mask = ~0,
440 .irq = { IRQ_CP_CLCDCINT, NO_IRQ },
441 .periphid = 0,
442};
443 412
444static struct amba_device *amba_devs[] __initdata = { 413static struct amba_device *amba_devs[] __initdata = {
445 &mmc_device, 414 &mmc_device,
diff --git a/arch/arm/mach-iop13xx/include/mach/system.h b/arch/arm/mach-iop13xx/include/mach/system.h
deleted file mode 100644
index 1f31ed3f8ae..00000000000
--- a/arch/arm/mach-iop13xx/include/mach/system.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * arch/arm/mach-iop13xx/include/mach/system.h
3 *
4 * Copyright (C) 2004 Intel Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10static inline void arch_idle(void)
11{
12 cpu_do_idle();
13}
diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h
deleted file mode 100644
index 4a88727bca9..00000000000
--- a/arch/arm/mach-iop32x/include/mach/system.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * arch/arm/mach-iop32x/include/mach/system.h
3 *
4 * Copyright (C) 2001 MontaVista Software, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10static inline void arch_idle(void)
11{
12 cpu_do_idle();
13}
diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-iop33x/include/mach/system.h
deleted file mode 100644
index 4f98e765397..00000000000
--- a/arch/arm/mach-iop33x/include/mach/system.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * arch/arm/mach-iop33x/include/mach/system.h
3 *
4 * Copyright (C) 2001 MontaVista Software, Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10static inline void arch_idle(void)
11{
12 cpu_do_idle();
13}
diff --git a/arch/arm/mach-ixp2000/include/mach/system.h b/arch/arm/mach-ixp2000/include/mach/system.h
deleted file mode 100644
index a7fb08b2b8e..00000000000
--- a/arch/arm/mach-ixp2000/include/mach/system.h
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 * arch/arm/mach-ixp2000/include/mach/system.h
3 *
4 * Copyright (C) 2002 Intel Corp.
5 * Copyricht (C) 2003-2005 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11static inline void arch_idle(void)
12{
13 cpu_do_idle();
14}
diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c
index 0923bb905cc..7c1495e4fe7 100644
--- a/arch/arm/mach-ixp23xx/core.c
+++ b/arch/arm/mach-ixp23xx/core.c
@@ -441,6 +441,9 @@ static struct platform_device *ixp23xx_devices[] __initdata = {
441 441
442void __init ixp23xx_sys_init(void) 442void __init ixp23xx_sys_init(void)
443{ 443{
444 /* by default, the idle code is disabled */
445 disable_hlt();
446
444 *IXP23XX_EXP_UNIT_FUSE |= 0xf; 447 *IXP23XX_EXP_UNIT_FUSE |= 0xf;
445 platform_add_devices(ixp23xx_devices, ARRAY_SIZE(ixp23xx_devices)); 448 platform_add_devices(ixp23xx_devices, ARRAY_SIZE(ixp23xx_devices));
446} 449}
diff --git a/arch/arm/mach-ixp23xx/include/mach/system.h b/arch/arm/mach-ixp23xx/include/mach/system.h
deleted file mode 100644
index 277dda7334b..00000000000
--- a/arch/arm/mach-ixp23xx/include/mach/system.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * arch/arm/mach-ixp23xx/include/mach/system.h
3 *
4 * Copyright (C) 2003 Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10static inline void arch_idle(void)
11{
12#if 0
13 if (!hlt_counter)
14 cpu_do_idle();
15#endif
16}
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 3841ab4146b..a6329a0a8ec 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -236,6 +236,12 @@ void __init ixp4xx_init_irq(void)
236{ 236{
237 int i = 0; 237 int i = 0;
238 238
239 /*
240 * ixp4xx does not implement the XScale PWRMODE register
241 * so it must not call cpu_do_idle().
242 */
243 disable_hlt();
244
239 /* Route all sources to IRQ instead of FIQ */ 245 /* Route all sources to IRQ instead of FIQ */
240 *IXP4XX_ICLR = 0x0; 246 *IXP4XX_ICLR = 0x0;
241 247
diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h
deleted file mode 100644
index 140a9bef446..00000000000
--- a/arch/arm/mach-ixp4xx/include/mach/system.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/mach-ixp4xx/include/mach/system.h
3 *
4 * Copyright (C) 2002 Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11static inline void arch_idle(void)
12{
13 /* ixp4xx does not implement the XScale PWRMODE register,
14 * so it must not call cpu_do_idle() here.
15 */
16#if 0
17 cpu_do_idle();
18#endif
19}
diff --git a/arch/arm/mach-kirkwood/include/mach/system.h b/arch/arm/mach-kirkwood/include/mach/system.h
deleted file mode 100644
index 5fddde002b5..00000000000
--- a/arch/arm/mach-kirkwood/include/mach/system.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * arch/arm/mach-kirkwood/include/mach/system.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_SYSTEM_H
10#define __ASM_ARCH_SYSTEM_H
11
12static inline void arch_idle(void)
13{
14 cpu_do_idle();
15}
16
17#endif
diff --git a/arch/arm/mach-ks8695/include/mach/system.h b/arch/arm/mach-ks8695/include/mach/system.h
deleted file mode 100644
index 59fe992395b..00000000000
--- a/arch/arm/mach-ks8695/include/mach/system.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * arch/arm/mach-s3c2410/include/mach/system.h
3 *
4 * Copyright (C) 2006 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * KS8695 - System function defines and includes
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ASM_ARCH_SYSTEM_H
15#define __ASM_ARCH_SYSTEM_H
16
17static void arch_idle(void)
18{
19 /*
20 * This should do all the clock switching
21 * and wait for interrupt tricks,
22 */
23 cpu_do_idle();
24
25}
26
27#endif
diff --git a/arch/arm/mach-lpc32xx/include/mach/system.h b/arch/arm/mach-lpc32xx/include/mach/system.h
deleted file mode 100644
index bf176c99152..00000000000
--- a/arch/arm/mach-lpc32xx/include/mach/system.h
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * arch/arm/mach-lpc32xx/include/mach/system.h
3 *
4 * Author: Kevin Wells <kevin.wells@nxp.com>
5 *
6 * Copyright (C) 2010 NXP Semiconductors
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 */
18
19#ifndef __ASM_ARCH_SYSTEM_H
20#define __ASM_ARCH_SYSTEM_H
21
22static void arch_idle(void)
23{
24 cpu_do_idle();
25}
26
27#endif
diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c
index bfee5b45510..5d51c102c25 100644
--- a/arch/arm/mach-lpc32xx/phy3250.c
+++ b/arch/arm/mach-lpc32xx/phy3250.c
@@ -149,20 +149,8 @@ static struct clcd_board lpc32xx_clcd_data = {
149 .remove = lpc32xx_clcd_remove, 149 .remove = lpc32xx_clcd_remove,
150}; 150};
151 151
152static struct amba_device lpc32xx_clcd_device = { 152static AMBA_AHB_DEVICE(lpc32xx_clcd, "dev:clcd", 0,
153 .dev = { 153 LPC32XX_LCD_BASE, { IRQ_LPC32XX_LCD }, &lpc32xx_clcd_data);
154 .coherent_dma_mask = ~0,
155 .init_name = "dev:clcd",
156 .platform_data = &lpc32xx_clcd_data,
157 },
158 .res = {
159 .start = LPC32XX_LCD_BASE,
160 .end = (LPC32XX_LCD_BASE + SZ_4K - 1),
161 .flags = IORESOURCE_MEM,
162 },
163 .dma_mask = ~0,
164 .irq = {IRQ_LPC32XX_LCD, NO_IRQ},
165};
166 154
167/* 155/*
168 * AMBA SSP (SPI) 156 * AMBA SSP (SPI)
@@ -191,20 +179,8 @@ static struct pl022_ssp_controller lpc32xx_ssp0_data = {
191 .enable_dma = 0, 179 .enable_dma = 0,
192}; 180};
193 181
194static struct amba_device lpc32xx_ssp0_device = { 182static AMBA_APB_DEVICE(lpc32xx_ssp0, "dev:ssp0", 0,
195 .dev = { 183 LPC32XX_SSP0_BASE, { IRQ_LPC32XX_SSP0 }, &lpc32xx_ssp0_data);
196 .coherent_dma_mask = ~0,
197 .init_name = "dev:ssp0",
198 .platform_data = &lpc32xx_ssp0_data,
199 },
200 .res = {
201 .start = LPC32XX_SSP0_BASE,
202 .end = (LPC32XX_SSP0_BASE + SZ_4K - 1),
203 .flags = IORESOURCE_MEM,
204 },
205 .dma_mask = ~0,
206 .irq = {IRQ_LPC32XX_SSP0, NO_IRQ},
207};
208 184
209/* AT25 driver registration */ 185/* AT25 driver registration */
210static int __init phy3250_spi_board_register(void) 186static int __init phy3250_spi_board_register(void)
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c
index 17cb7606012..5483d6f5c6d 100644
--- a/arch/arm/mach-mmp/aspenite.c
+++ b/arch/arm/mach-mmp/aspenite.c
@@ -24,6 +24,7 @@
24#include <mach/addr-map.h> 24#include <mach/addr-map.h>
25#include <mach/mfp-pxa168.h> 25#include <mach/mfp-pxa168.h>
26#include <mach/pxa168.h> 26#include <mach/pxa168.h>
27#include <mach/irqs.h>
27#include <video/pxa168fb.h> 28#include <video/pxa168fb.h>
28#include <linux/input.h> 29#include <linux/input.h>
29#include <plat/pxa27x_keypad.h> 30#include <plat/pxa27x_keypad.h>
@@ -240,7 +241,7 @@ static void __init common_init(void)
240 241
241MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform") 242MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform")
242 .map_io = mmp_map_io, 243 .map_io = mmp_map_io,
243 .nr_irqs = IRQ_BOARD_START, 244 .nr_irqs = MMP_NR_IRQS,
244 .init_irq = pxa168_init_irq, 245 .init_irq = pxa168_init_irq,
245 .timer = &pxa168_timer, 246 .timer = &pxa168_timer,
246 .init_machine = common_init, 247 .init_machine = common_init,
@@ -249,7 +250,7 @@ MACHINE_END
249 250
250MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform") 251MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform")
251 .map_io = mmp_map_io, 252 .map_io = mmp_map_io,
252 .nr_irqs = IRQ_BOARD_START, 253 .nr_irqs = MMP_NR_IRQS,
253 .init_irq = pxa168_init_irq, 254 .init_irq = pxa168_init_irq,
254 .timer = &pxa168_timer, 255 .timer = &pxa168_timer,
255 .init_machine = common_init, 256 .init_machine = common_init,
diff --git a/arch/arm/mach-mmp/avengers_lite.c b/arch/arm/mach-mmp/avengers_lite.c
index b148a9dc5a4..603542ae6fb 100644
--- a/arch/arm/mach-mmp/avengers_lite.c
+++ b/arch/arm/mach-mmp/avengers_lite.c
@@ -43,6 +43,7 @@ static void __init avengers_lite_init(void)
43 43
44MACHINE_START(AVENGERS_LITE, "PXA168 Avengers lite Development Platform") 44MACHINE_START(AVENGERS_LITE, "PXA168 Avengers lite Development Platform")
45 .map_io = mmp_map_io, 45 .map_io = mmp_map_io,
46 .nr_irqs = MMP_NR_IRQS,
46 .init_irq = pxa168_init_irq, 47 .init_irq = pxa168_init_irq,
47 .timer = &pxa168_timer, 48 .timer = &pxa168_timer,
48 .init_machine = avengers_lite_init, 49 .init_machine = avengers_lite_init,
diff --git a/arch/arm/mach-mmp/brownstone.c b/arch/arm/mach-mmp/brownstone.c
index d839fe6421e..5cb769cd26d 100644
--- a/arch/arm/mach-mmp/brownstone.c
+++ b/arch/arm/mach-mmp/brownstone.c
@@ -28,7 +28,7 @@
28 28
29#include "common.h" 29#include "common.h"
30 30
31#define BROWNSTONE_NR_IRQS (IRQ_BOARD_START + 40) 31#define BROWNSTONE_NR_IRQS (MMP_NR_IRQS + 40)
32 32
33#define GPIO_5V_ENABLE (89) 33#define GPIO_5V_ENABLE (89)
34 34
@@ -158,7 +158,7 @@ static struct platform_device brownstone_v_5vp_device = {
158}; 158};
159 159
160static struct max8925_platform_data brownstone_max8925_info = { 160static struct max8925_platform_data brownstone_max8925_info = {
161 .irq_base = IRQ_BOARD_START, 161 .irq_base = MMP_NR_IRQS,
162}; 162};
163 163
164static struct i2c_board_info brownstone_twsi1_info[] = { 164static struct i2c_board_info brownstone_twsi1_info[] = {
diff --git a/arch/arm/mach-mmp/flint.c b/arch/arm/mach-mmp/flint.c
index 2ee8cd7829d..8059cc0905c 100644
--- a/arch/arm/mach-mmp/flint.c
+++ b/arch/arm/mach-mmp/flint.c
@@ -23,10 +23,11 @@
23#include <mach/addr-map.h> 23#include <mach/addr-map.h>
24#include <mach/mfp-mmp2.h> 24#include <mach/mfp-mmp2.h>
25#include <mach/mmp2.h> 25#include <mach/mmp2.h>
26#include <mach/irqs.h>
26 27
27#include "common.h" 28#include "common.h"
28 29
29#define FLINT_NR_IRQS (IRQ_BOARD_START + 48) 30#define FLINT_NR_IRQS (MMP_NR_IRQS + 48)
30 31
31static unsigned long flint_pin_config[] __initdata = { 32static unsigned long flint_pin_config[] __initdata = {
32 /* UART1 */ 33 /* UART1 */
diff --git a/arch/arm/mach-mmp/gplugd.c b/arch/arm/mach-mmp/gplugd.c
index 87765467de6..f516e74ce0d 100644
--- a/arch/arm/mach-mmp/gplugd.c
+++ b/arch/arm/mach-mmp/gplugd.c
@@ -191,7 +191,7 @@ static void __init gplugd_init(void)
191 191
192MACHINE_START(GPLUGD, "PXA168-based GuruPlug Display (gplugD) Platform") 192MACHINE_START(GPLUGD, "PXA168-based GuruPlug Display (gplugD) Platform")
193 .map_io = mmp_map_io, 193 .map_io = mmp_map_io,
194 .nr_irqs = IRQ_BOARD_START, 194 .nr_irqs = MMP_NR_IRQS,
195 .init_irq = pxa168_init_irq, 195 .init_irq = pxa168_init_irq,
196 .timer = &pxa168_timer, 196 .timer = &pxa168_timer,
197 .init_machine = gplugd_init, 197 .init_machine = gplugd_init,
diff --git a/arch/arm/mach-mmp/include/mach/irqs.h b/arch/arm/mach-mmp/include/mach/irqs.h
index 34635a0bbb5..d0e746626a3 100644
--- a/arch/arm/mach-mmp/include/mach/irqs.h
+++ b/arch/arm/mach-mmp/include/mach/irqs.h
@@ -223,7 +223,6 @@
223#define MMP_GPIO_TO_IRQ(gpio) (IRQ_GPIO_START + (gpio)) 223#define MMP_GPIO_TO_IRQ(gpio) (IRQ_GPIO_START + (gpio))
224 224
225#define IRQ_BOARD_START (IRQ_GPIO_START + MMP_NR_BUILTIN_GPIO) 225#define IRQ_BOARD_START (IRQ_GPIO_START + MMP_NR_BUILTIN_GPIO)
226 226#define MMP_NR_IRQS IRQ_BOARD_START
227#define NR_IRQS (IRQ_BOARD_START)
228 227
229#endif /* __ASM_MACH_IRQS_H */ 228#endif /* __ASM_MACH_IRQS_H */
diff --git a/arch/arm/mach-mmp/include/mach/system.h b/arch/arm/mach-mmp/include/mach/system.h
deleted file mode 100644
index 1d001eab81e..00000000000
--- a/arch/arm/mach-mmp/include/mach/system.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * linux/arch/arm/mach-mmp/include/mach/system.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef __ASM_MACH_SYSTEM_H
10#define __ASM_MACH_SYSTEM_H
11
12static inline void arch_idle(void)
13{
14 cpu_do_idle();
15}
16#endif /* __ASM_MACH_SYSTEM_H */
diff --git a/arch/arm/mach-mmp/irq-mmp2.c b/arch/arm/mach-mmp/irq-mmp2.c
index d21c5441a3d..7895d277421 100644
--- a/arch/arm/mach-mmp/irq-mmp2.c
+++ b/arch/arm/mach-mmp/irq-mmp2.c
@@ -15,6 +15,7 @@
15#include <linux/irq.h> 15#include <linux/irq.h>
16#include <linux/io.h> 16#include <linux/io.h>
17 17
18#include <mach/irqs.h>
18#include <mach/regs-icu.h> 19#include <mach/regs-icu.h>
19#include <mach/mmp2.h> 20#include <mach/mmp2.h>
20 21
diff --git a/arch/arm/mach-mmp/jasper.c b/arch/arm/mach-mmp/jasper.c
index 96cf5c8fe47..ff73249884d 100644
--- a/arch/arm/mach-mmp/jasper.c
+++ b/arch/arm/mach-mmp/jasper.c
@@ -19,6 +19,7 @@
19#include <linux/mfd/max8925.h> 19#include <linux/mfd/max8925.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21 21
22#include <mach/irqs.h>
22#include <asm/mach-types.h> 23#include <asm/mach-types.h>
23#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
24#include <mach/addr-map.h> 25#include <mach/addr-map.h>
@@ -27,7 +28,7 @@
27 28
28#include "common.h" 29#include "common.h"
29 30
30#define JASPER_NR_IRQS (IRQ_BOARD_START + 48) 31#define JASPER_NR_IRQS (MMP_NR_IRQS + 48)
31 32
32static unsigned long jasper_pin_config[] __initdata = { 33static unsigned long jasper_pin_config[] __initdata = {
33 /* UART1 */ 34 /* UART1 */
@@ -135,7 +136,7 @@ static struct max8925_power_pdata jasper_power_data = {
135static struct max8925_platform_data jasper_max8925_info = { 136static struct max8925_platform_data jasper_max8925_info = {
136 .backlight = &jasper_backlight_data, 137 .backlight = &jasper_backlight_data,
137 .power = &jasper_power_data, 138 .power = &jasper_power_data,
138 .irq_base = IRQ_BOARD_START, 139 .irq_base = MMP_NR_IRQS,
139}; 140};
140 141
141static struct i2c_board_info jasper_twsi1_info[] = { 142static struct i2c_board_info jasper_twsi1_info[] = {
diff --git a/arch/arm/mach-mmp/tavorevb.c b/arch/arm/mach-mmp/tavorevb.c
index 8e3b5af04a5..507e6c0e34f 100644
--- a/arch/arm/mach-mmp/tavorevb.c
+++ b/arch/arm/mach-mmp/tavorevb.c
@@ -102,6 +102,7 @@ static void __init tavorevb_init(void)
102 102
103MACHINE_START(TAVOREVB, "PXA910 Evaluation Board (aka TavorEVB)") 103MACHINE_START(TAVOREVB, "PXA910 Evaluation Board (aka TavorEVB)")
104 .map_io = mmp_map_io, 104 .map_io = mmp_map_io,
105 .nr_irqs = MMP_NR_IRQS,
105 .init_irq = pxa910_init_irq, 106 .init_irq = pxa910_init_irq,
106 .timer = &pxa910_timer, 107 .timer = &pxa910_timer,
107 .init_machine = tavorevb_init, 108 .init_machine = tavorevb_init,
diff --git a/arch/arm/mach-mmp/teton_bga.c b/arch/arm/mach-mmp/teton_bga.c
index 0523e422990..42bef6674ec 100644
--- a/arch/arm/mach-mmp/teton_bga.c
+++ b/arch/arm/mach-mmp/teton_bga.c
@@ -26,6 +26,7 @@
26#include <mach/mfp-pxa168.h> 26#include <mach/mfp-pxa168.h>
27#include <mach/pxa168.h> 27#include <mach/pxa168.h>
28#include <mach/teton_bga.h> 28#include <mach/teton_bga.h>
29#include <mach/irqs.h>
29 30
30#include "common.h" 31#include "common.h"
31 32
@@ -83,7 +84,7 @@ static void __init teton_bga_init(void)
83 84
84MACHINE_START(TETON_BGA, "PXA168-based Teton BGA Development Platform") 85MACHINE_START(TETON_BGA, "PXA168-based Teton BGA Development Platform")
85 .map_io = mmp_map_io, 86 .map_io = mmp_map_io,
86 .nr_irqs = IRQ_BOARD_START, 87 .nr_irqs = MMP_NR_IRQS,
87 .init_irq = pxa168_init_irq, 88 .init_irq = pxa168_init_irq,
88 .timer = &pxa168_timer, 89 .timer = &pxa168_timer,
89 .init_machine = teton_bga_init, 90 .init_machine = teton_bga_init,
diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c
index 5ac5d5832e4..4c5fd5bb0c9 100644
--- a/arch/arm/mach-mmp/ttc_dkb.c
+++ b/arch/arm/mach-mmp/ttc_dkb.c
@@ -38,7 +38,7 @@
38 * 16 board interrupts -- PCA9575 GPIO expander 38 * 16 board interrupts -- PCA9575 GPIO expander
39 * 24 board interrupts -- 88PM860x PMIC 39 * 24 board interrupts -- 88PM860x PMIC
40 */ 40 */
41#define TTCDKB_NR_IRQS (IRQ_BOARD_START + 16 + 16 + 24) 41#define TTCDKB_NR_IRQS (MMP_NR_IRQS + 16 + 16 + 24)
42 42
43static unsigned long ttc_dkb_pin_config[] __initdata = { 43static unsigned long ttc_dkb_pin_config[] __initdata = {
44 /* UART2 */ 44 /* UART2 */
@@ -130,7 +130,7 @@ static struct platform_device *ttc_dkb_devices[] = {
130static struct pca953x_platform_data max7312_data[] = { 130static struct pca953x_platform_data max7312_data[] = {
131 { 131 {
132 .gpio_base = TTCDKB_GPIO_EXT0(0), 132 .gpio_base = TTCDKB_GPIO_EXT0(0),
133 .irq_base = IRQ_BOARD_START, 133 .irq_base = MMP_NR_IRQS,
134 }, 134 },
135}; 135};
136 136
diff --git a/arch/arm/mach-msm/idle.S b/arch/arm/mach-msm/idle.S
deleted file mode 100644
index 6a94f052713..00000000000
--- a/arch/arm/mach-msm/idle.S
+++ /dev/null
@@ -1,36 +0,0 @@
1/* arch/arm/mach-msm/include/mach/idle.S
2 *
3 * Idle processing for MSM7K - work around bugs with SWFI.
4 *
5 * Copyright (c) 2007 QUALCOMM Incorporated.
6 * Copyright (C) 2007 Google, Inc.
7 *
8 * This software is licensed under the terms of the GNU General Public
9 * License version 2, as published by the Free Software Foundation, and
10 * may be copied, distributed, and modified under those terms.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 */
18
19#include <linux/linkage.h>
20#include <asm/assembler.h>
21
22ENTRY(arch_idle)
23#ifdef CONFIG_MSM7X00A_IDLE
24 mrc p15, 0, r1, c1, c0, 0 /* read current CR */
25 bic r0, r1, #(1 << 2) /* clear dcache bit */
26 bic r0, r0, #(1 << 12) /* clear icache bit */
27 mcr p15, 0, r0, c1, c0, 0 /* disable d/i cache */
28
29 mov r0, #0 /* prepare wfi value */
30 mcr p15, 0, r0, c7, c10, 0 /* flush the cache */
31 mcr p15, 0, r0, c7, c10, 4 /* memory barrier */
32 mcr p15, 0, r0, c7, c0, 4 /* wait for interrupt */
33
34 mcr p15, 0, r1, c1, c0, 0 /* restore d/i cache */
35#endif
36 mov pc, lr
diff --git a/arch/arm/mach-msm/idle.c b/arch/arm/mach-msm/idle.c
new file mode 100644
index 00000000000..0c9e13c6574
--- /dev/null
+++ b/arch/arm/mach-msm/idle.c
@@ -0,0 +1,49 @@
1/* arch/arm/mach-msm/idle.c
2 *
3 * Idle processing for MSM7K - work around bugs with SWFI.
4 *
5 * Copyright (c) 2007 QUALCOMM Incorporated.
6 * Copyright (C) 2007 Google, Inc.
7 *
8 * This software is licensed under the terms of the GNU General Public
9 * License version 2, as published by the Free Software Foundation, and
10 * may be copied, distributed, and modified under those terms.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 */
18
19#include <linux/init.h>
20#include <asm/system.h>
21
22static void msm_idle(void)
23{
24#ifdef CONFIG_MSM7X00A_IDLE
25 asm volatile (
26
27 "mrc p15, 0, r1, c1, c0, 0 /* read current CR */ \n\t"
28 "bic r0, r1, #(1 << 2) /* clear dcache bit */ \n\t"
29 "bic r0, r0, #(1 << 12) /* clear icache bit */ \n\t"
30 "mcr p15, 0, r0, c1, c0, 0 /* disable d/i cache */ \n\t"
31
32 "mov r0, #0 /* prepare wfi value */ \n\t"
33 "mcr p15, 0, r0, c7, c10, 0 /* flush the cache */ \n\t"
34 "mcr p15, 0, r0, c7, c10, 4 /* memory barrier */ \n\t"
35 "mcr p15, 0, r0, c7, c0, 4 /* wait for interrupt */ \n\t"
36
37 "mcr p15, 0, r1, c1, c0, 0 /* restore d/i cache */ \n\t"
38
39 : : : "r0","r1" );
40#endif
41}
42
43static int __init msm_idle_init(void)
44{
45 arm_pm_idle = msm_idle;
46 return 0;
47}
48
49arch_initcall(msm_idle_init);
diff --git a/arch/arm/mach-msm/include/mach/system.h b/arch/arm/mach-msm/include/mach/system.h
index 311db2b35da..f5fb2ec87ff 100644
--- a/arch/arm/mach-msm/include/mach/system.h
+++ b/arch/arm/mach-msm/include/mach/system.h
@@ -12,7 +12,6 @@
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 */ 14 */
15void arch_idle(void);
16 15
17/* low level hardware reset hook -- for example, hitting the 16/* low level hardware reset hook -- for example, hitting the
18 * PSHOLD line on the PMIC to hard reset the system 17 * PSHOLD line on the PMIC to hard reset the system
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
index 11d0d8f2656..61983daa7bb 100644
--- a/arch/arm/mach-msm/timer.c
+++ b/arch/arm/mach-msm/timer.c
@@ -24,6 +24,7 @@
24#include <asm/mach/time.h> 24#include <asm/mach/time.h>
25#include <asm/hardware/gic.h> 25#include <asm/hardware/gic.h>
26#include <asm/localtimer.h> 26#include <asm/localtimer.h>
27#include <asm/sched_clock.h>
27 28
28#include <mach/msm_iomap.h> 29#include <mach/msm_iomap.h>
29#include <mach/cpu.h> 30#include <mach/cpu.h>
@@ -105,12 +106,12 @@ static union {
105 106
106static void __iomem *source_base; 107static void __iomem *source_base;
107 108
108static cycle_t msm_read_timer_count(struct clocksource *cs) 109static notrace cycle_t msm_read_timer_count(struct clocksource *cs)
109{ 110{
110 return readl_relaxed(source_base + TIMER_COUNT_VAL); 111 return readl_relaxed(source_base + TIMER_COUNT_VAL);
111} 112}
112 113
113static cycle_t msm_read_timer_count_shift(struct clocksource *cs) 114static notrace cycle_t msm_read_timer_count_shift(struct clocksource *cs)
114{ 115{
115 /* 116 /*
116 * Shift timer count down by a constant due to unreliable lower bits 117 * Shift timer count down by a constant due to unreliable lower bits
@@ -127,6 +128,11 @@ static struct clocksource msm_clocksource = {
127 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 128 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
128}; 129};
129 130
131static notrace u32 msm_sched_clock_read(void)
132{
133 return msm_clocksource.read(&msm_clocksource);
134}
135
130static void __init msm_timer_init(void) 136static void __init msm_timer_init(void)
131{ 137{
132 struct clock_event_device *ce = &msm_clockevent; 138 struct clock_event_device *ce = &msm_clockevent;
@@ -189,6 +195,8 @@ err:
189 res = clocksource_register_hz(cs, dgt_hz); 195 res = clocksource_register_hz(cs, dgt_hz);
190 if (res) 196 if (res)
191 pr_err("clocksource_register failed\n"); 197 pr_err("clocksource_register failed\n");
198 setup_sched_clock(msm_sched_clock_read,
199 cpu_is_msm7x01() ? 32 - MSM_DGT_SHIFT : 32, dgt_hz);
192} 200}
193 201
194#ifdef CONFIG_LOCAL_TIMERS 202#ifdef CONFIG_LOCAL_TIMERS
diff --git a/arch/arm/mach-mv78xx0/include/mach/system.h b/arch/arm/mach-mv78xx0/include/mach/system.h
deleted file mode 100644
index 8c3a5387cec..00000000000
--- a/arch/arm/mach-mv78xx0/include/mach/system.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * arch/arm/mach-mv78xx0/include/mach/system.h
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8
9#ifndef __ASM_ARCH_SYSTEM_H
10#define __ASM_ARCH_SYSTEM_H
11
12static inline void arch_idle(void)
13{
14 cpu_do_idle();
15}
16
17#endif
diff --git a/arch/arm/mach-mx5/mm.c b/arch/arm/mach-mx5/mm.c
index bc17dfea381..49549a72dc7 100644
--- a/arch/arm/mach-mx5/mm.c
+++ b/arch/arm/mach-mx5/mm.c
@@ -26,23 +26,17 @@ static struct clk *gpc_dvfs_clk;
26 26
27static void imx5_idle(void) 27static void imx5_idle(void)
28{ 28{
29 if (!need_resched()) { 29 /* gpc clock is needed for SRPG */
30 /* gpc clock is needed for SRPG */ 30 if (gpc_dvfs_clk == NULL) {
31 if (gpc_dvfs_clk == NULL) { 31 gpc_dvfs_clk = clk_get(NULL, "gpc_dvfs");
32 gpc_dvfs_clk = clk_get(NULL, "gpc_dvfs"); 32 if (IS_ERR(gpc_dvfs_clk))
33 if (IS_ERR(gpc_dvfs_clk)) 33 return;
34 goto err0;
35 }
36 clk_enable(gpc_dvfs_clk);
37 mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
38 if (tzic_enable_wake())
39 goto err1;
40 cpu_do_idle();
41err1:
42 clk_disable(gpc_dvfs_clk);
43 } 34 }
44err0: 35 clk_enable(gpc_dvfs_clk);
45 local_irq_enable(); 36 mx5_cpu_lp_set(WAIT_UNCLOCKED_POWER_OFF);
37 if (tzic_enable_wake() != 0)
38 cpu_do_idle();
39 clk_disable(gpc_dvfs_clk);
46} 40}
47 41
48/* 42/*
@@ -108,7 +102,7 @@ void __init imx51_init_early(void)
108 mxc_set_cpu_type(MXC_CPU_MX51); 102 mxc_set_cpu_type(MXC_CPU_MX51);
109 mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR)); 103 mxc_iomux_v3_init(MX51_IO_ADDRESS(MX51_IOMUXC_BASE_ADDR));
110 mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR)); 104 mxc_arch_reset_init(MX51_IO_ADDRESS(MX51_WDOG1_BASE_ADDR));
111 pm_idle = imx5_idle; 105 arm_pm_idle = imx5_idle;
112} 106}
113 107
114void __init imx53_init_early(void) 108void __init imx53_init_early(void)
diff --git a/arch/arm/mach-mxs/devices.c b/arch/arm/mach-mxs/devices.c
index fe3e847930c..01faffec306 100644
--- a/arch/arm/mach-mxs/devices.c
+++ b/arch/arm/mach-mxs/devices.c
@@ -77,16 +77,18 @@ err:
77 77
78int __init mxs_add_amba_device(const struct amba_device *dev) 78int __init mxs_add_amba_device(const struct amba_device *dev)
79{ 79{
80 struct amba_device *adev = kmalloc(sizeof(*adev), GFP_KERNEL); 80 struct amba_device *adev = amba_device_alloc(dev->dev.init_name,
81 dev->res.start, resource_size(&dev->res));
81 82
82 if (!adev) { 83 if (!adev) {
83 pr_err("%s: failed to allocate memory", __func__); 84 pr_err("%s: failed to allocate memory", __func__);
84 return -ENOMEM; 85 return -ENOMEM;
85 } 86 }
86 87
87 *adev = *dev; 88 adev->irq[0] = dev->irq[0];
89 adev->irq[1] = dev->irq[1];
88 90
89 return amba_device_register(adev, &iomem_resource); 91 return amba_device_add(adev, &iomem_resource);
90} 92}
91 93
92struct device mxs_apbh_bus = { 94struct device mxs_apbh_bus = {
diff --git a/arch/arm/mach-mxs/devices/amba-duart.c b/arch/arm/mach-mxs/devices/amba-duart.c
index a559db09b49..a5479f76604 100644
--- a/arch/arm/mach-mxs/devices/amba-duart.c
+++ b/arch/arm/mach-mxs/devices/amba-duart.c
@@ -23,7 +23,7 @@ const struct amba_device name##_device __initconst = { \
23 .end = (soc ## _DUART_BASE_ADDR) + SZ_8K - 1, \ 23 .end = (soc ## _DUART_BASE_ADDR) + SZ_8K - 1, \
24 .flags = IORESOURCE_MEM, \ 24 .flags = IORESOURCE_MEM, \
25 }, \ 25 }, \
26 .irq = {soc ## _INT_DUART, NO_IRQ}, \ 26 .irq = {soc ## _INT_DUART}, \
27} 27}
28 28
29#ifdef CONFIG_SOC_IMX23 29#ifdef CONFIG_SOC_IMX23
diff --git a/arch/arm/mach-mxs/include/mach/system.h b/arch/arm/mach-mxs/include/mach/system.h
deleted file mode 100644
index e7ad1bb2942..00000000000
--- a/arch/arm/mach-mxs/include/mach/system.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * Copyright (C) 1999 ARM Limited
3 * Copyright (C) 2000 Deep Blue Solutions Ltd
4 * Copyright 2004-2008 Freescale Semiconductor, Inc. All Rights Reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#ifndef __MACH_MXS_SYSTEM_H__
18#define __MACH_MXS_SYSTEM_H__
19
20static inline void arch_idle(void)
21{
22 cpu_do_idle();
23}
24
25#endif /* __MACH_MXS_SYSTEM_H__ */
diff --git a/arch/arm/mach-mxs/pm.c b/arch/arm/mach-mxs/pm.c
index fb042da29bd..a9b4bbcdafb 100644
--- a/arch/arm/mach-mxs/pm.c
+++ b/arch/arm/mach-mxs/pm.c
@@ -15,13 +15,12 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/suspend.h> 16#include <linux/suspend.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <mach/system.h>
19 18
20static int mxs_suspend_enter(suspend_state_t state) 19static int mxs_suspend_enter(suspend_state_t state)
21{ 20{
22 switch (state) { 21 switch (state) {
23 case PM_SUSPEND_MEM: 22 case PM_SUSPEND_MEM:
24 arch_idle(); 23 cpu_do_idle();
25 break; 24 break;
26 25
27 default: 26 default:
diff --git a/arch/arm/mach-netx/fb.c b/arch/arm/mach-netx/fb.c
index b9913234bbf..2cdf6ef69be 100644
--- a/arch/arm/mach-netx/fb.c
+++ b/arch/arm/mach-netx/fb.c
@@ -92,18 +92,7 @@ void clk_put(struct clk *clk)
92{ 92{
93} 93}
94 94
95static struct amba_device fb_device = { 95static AMBA_AHB_DEVICE(fb, "fb", 0, 0x00104000, { NETX_IRQ_LCD }, NULL);
96 .dev = {
97 .init_name = "fb",
98 .coherent_dma_mask = ~0,
99 },
100 .res = {
101 .start = 0x00104000,
102 .end = 0x00104fff,
103 .flags = IORESOURCE_MEM,
104 },
105 .irq = { NETX_IRQ_LCD, NO_IRQ },
106};
107 96
108int netx_fb_init(struct clcd_board *board, struct clcd_panel *panel) 97int netx_fb_init(struct clcd_board *board, struct clcd_panel *panel)
109{ 98{
diff --git a/arch/arm/mach-netx/include/mach/system.h b/arch/arm/mach-netx/include/mach/system.h
deleted file mode 100644
index b38fa36d58c..00000000000
--- a/arch/arm/mach-netx/include/mach/system.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * arch/arm/mach-netx/include/mach/system.h
3 *
4 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#ifndef __ASM_ARCH_SYSTEM_H
20#define __ASM_ARCH_SYSTEM_H
21
22static inline void arch_idle(void)
23{
24 cpu_do_idle();
25}
26
27#endif
28
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c
index 7c878bf0034..f6f74adbe8c 100644
--- a/arch/arm/mach-nomadik/board-nhk8815.c
+++ b/arch/arm/mach-nomadik/board-nhk8815.c
@@ -185,20 +185,11 @@ static void __init nhk8815_onenand_init(void)
185#endif 185#endif
186} 186}
187 187
188#define __MEM_4K_RESOURCE(x) \ 188static AMBA_APB_DEVICE(uart0, "uart0", 0, NOMADIK_UART0_BASE,
189 .res = {.start = (x), .end = (x) + SZ_4K - 1, .flags = IORESOURCE_MEM} 189 { IRQ_UART0 }, NULL);
190 190
191static struct amba_device uart0_device = { 191static AMBA_APB_DEVICE(uart1, "uart1", 0, NOMADIK_UART1_BASE,
192 .dev = { .init_name = "uart0" }, 192 { IRQ_UART1 }, NULL);
193 __MEM_4K_RESOURCE(NOMADIK_UART0_BASE),
194 .irq = {IRQ_UART0, NO_IRQ},
195};
196
197static struct amba_device uart1_device = {
198 .dev = { .init_name = "uart1" },
199 __MEM_4K_RESOURCE(NOMADIK_UART1_BASE),
200 .irq = {IRQ_UART1, NO_IRQ},
201};
202 193
203static struct amba_device *amba_devs[] __initdata = { 194static struct amba_device *amba_devs[] __initdata = {
204 &uart0_device, 195 &uart0_device,
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index 65df7b4fdd3..27f43a46985 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -97,12 +97,7 @@ static struct platform_device cpu8815_platform_gpio[] = {
97 GPIO_DEVICE(3), 97 GPIO_DEVICE(3),
98}; 98};
99 99
100static struct amba_device cpu8815_amba_rng = { 100static AMBA_APB_DEVICE(cpu8815_amba_rng, "rng", 0, NOMADIK_RNG_BASE, { }, NULL);
101 .dev = {
102 .init_name = "rng",
103 },
104 __MEM_4K_RESOURCE(NOMADIK_RNG_BASE),
105};
106 101
107static struct platform_device *platform_devs[] __initdata = { 102static struct platform_device *platform_devs[] __initdata = {
108 cpu8815_platform_gpio + 0, 103 cpu8815_platform_gpio + 0,
@@ -112,7 +107,7 @@ static struct platform_device *platform_devs[] __initdata = {
112}; 107};
113 108
114static struct amba_device *amba_devs[] __initdata = { 109static struct amba_device *amba_devs[] __initdata = {
115 &cpu8815_amba_rng 110 &cpu8815_amba_rng_device
116}; 111};
117 112
118static int __init cpu8815_init(void) 113static int __init cpu8815_init(void)
diff --git a/arch/arm/mach-nomadik/include/mach/system.h b/arch/arm/mach-nomadik/include/mach/system.h
deleted file mode 100644
index 25e198b8976..00000000000
--- a/arch/arm/mach-nomadik/include/mach/system.h
+++ /dev/null
@@ -1,32 +0,0 @@
1/*
2 * mach-nomadik/include/mach/system.h
3 *
4 * Copyright (C) 2008 STMicroelectronics
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARCH_SYSTEM_H
21#define __ASM_ARCH_SYSTEM_H
22
23static inline void arch_idle(void)
24{
25 /*
26 * This should do all the clock switching
27 * and wait for interrupt tricks
28 */
29 cpu_do_idle();
30}
31
32#endif
diff --git a/arch/arm/mach-omap1/include/mach/system.h b/arch/arm/mach-omap1/include/mach/system.h
deleted file mode 100644
index a6c1b3a16df..00000000000
--- a/arch/arm/mach-omap1/include/mach/system.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * arch/arm/mach-omap1/include/mach/system.h
3 */
4
5#include <plat/system.h>
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index 89ea20ca0cc..0c2c3669d59 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -42,9 +42,9 @@
42#include <linux/sysfs.h> 42#include <linux/sysfs.h>
43#include <linux/module.h> 43#include <linux/module.h>
44#include <linux/io.h> 44#include <linux/io.h>
45#include <linux/atomic.h>
45 46
46#include <asm/irq.h> 47#include <asm/irq.h>
47#include <linux/atomic.h>
48#include <asm/mach/time.h> 48#include <asm/mach/time.h>
49#include <asm/mach/irq.h> 49#include <asm/mach/irq.h>
50 50
@@ -108,13 +108,7 @@ void omap1_pm_idle(void)
108 __u32 use_idlect1 = arm_idlect1_mask; 108 __u32 use_idlect1 = arm_idlect1_mask;
109 int do_sleep = 0; 109 int do_sleep = 0;
110 110
111 local_irq_disable();
112 local_fiq_disable(); 111 local_fiq_disable();
113 if (need_resched()) {
114 local_fiq_enable();
115 local_irq_enable();
116 return;
117 }
118 112
119#if defined(CONFIG_OMAP_MPU_TIMER) && !defined(CONFIG_OMAP_DM_TIMER) 113#if defined(CONFIG_OMAP_MPU_TIMER) && !defined(CONFIG_OMAP_DM_TIMER)
120#warning Enable 32kHz OS timer in order to allow sleep states in idle 114#warning Enable 32kHz OS timer in order to allow sleep states in idle
@@ -157,14 +151,12 @@ void omap1_pm_idle(void)
157 omap_writel(saved_idlect1, ARM_IDLECT1); 151 omap_writel(saved_idlect1, ARM_IDLECT1);
158 152
159 local_fiq_enable(); 153 local_fiq_enable();
160 local_irq_enable();
161 return; 154 return;
162 } 155 }
163 omap_sram_suspend(omap_readl(ARM_IDLECT1), 156 omap_sram_suspend(omap_readl(ARM_IDLECT1),
164 omap_readl(ARM_IDLECT2)); 157 omap_readl(ARM_IDLECT2));
165 158
166 local_fiq_enable(); 159 local_fiq_enable();
167 local_irq_enable();
168} 160}
169 161
170/* 162/*
@@ -583,8 +575,6 @@ static void omap_pm_init_proc(void)
583 575
584#endif /* DEBUG && CONFIG_PROC_FS */ 576#endif /* DEBUG && CONFIG_PROC_FS */
585 577
586static void (*saved_idle)(void) = NULL;
587
588/* 578/*
589 * omap_pm_prepare - Do preliminary suspend work. 579 * omap_pm_prepare - Do preliminary suspend work.
590 * 580 *
@@ -592,8 +582,7 @@ static void (*saved_idle)(void) = NULL;
592static int omap_pm_prepare(void) 582static int omap_pm_prepare(void)
593{ 583{
594 /* We cannot sleep in idle until we have resumed */ 584 /* We cannot sleep in idle until we have resumed */
595 saved_idle = pm_idle; 585 disable_hlt();
596 pm_idle = NULL;
597 586
598 return 0; 587 return 0;
599} 588}
@@ -630,7 +619,7 @@ static int omap_pm_enter(suspend_state_t state)
630 619
631static void omap_pm_finish(void) 620static void omap_pm_finish(void)
632{ 621{
633 pm_idle = saved_idle; 622 enable_hlt();
634} 623}
635 624
636 625
@@ -687,7 +676,7 @@ static int __init omap_pm_init(void)
687 return -ENODEV; 676 return -ENODEV;
688 } 677 }
689 678
690 pm_idle = omap1_pm_idle; 679 arm_pm_idle = omap1_pm_idle;
691 680
692 if (cpu_is_omap7xx()) 681 if (cpu_is_omap7xx())
693 setup_irq(INT_7XX_WAKE_UP_REQ, &omap_wakeup_irq); 682 setup_irq(INT_7XX_WAKE_UP_REQ, &omap_wakeup_irq);
diff --git a/arch/arm/mach-omap2/emu.c b/arch/arm/mach-omap2/emu.c
index 9c442e290cc..ce91aad4cda 100644
--- a/arch/arm/mach-omap2/emu.c
+++ b/arch/arm/mach-omap2/emu.c
@@ -30,29 +30,8 @@ MODULE_AUTHOR("Alexander Shishkin");
30#define ETB_BASE (L4_EMU_34XX_PHYS + 0x1b000) 30#define ETB_BASE (L4_EMU_34XX_PHYS + 0x1b000)
31#define DAPCTL (L4_EMU_34XX_PHYS + 0x1d000) 31#define DAPCTL (L4_EMU_34XX_PHYS + 0x1d000)
32 32
33static struct amba_device omap3_etb_device = { 33static AMBA_APB_DEVICE(omap3_etb, "etb", 0x000bb907, ETB_BASE, { }, NULL);
34 .dev = { 34static AMBA_APB_DEVICE(omap3_etm, "etm", 0x102bb921, ETM_BASE, { }, NULL);
35 .init_name = "etb",
36 },
37 .res = {
38 .start = ETB_BASE,
39 .end = ETB_BASE + SZ_4K - 1,
40 .flags = IORESOURCE_MEM,
41 },
42 .periphid = 0x000bb907,
43};
44
45static struct amba_device omap3_etm_device = {
46 .dev = {
47 .init_name = "etm",
48 },
49 .res = {
50 .start = ETM_BASE,
51 .end = ETM_BASE + SZ_4K - 1,
52 .flags = IORESOURCE_MEM,
53 },
54 .periphid = 0x102bb921,
55};
56 35
57static int __init emu_init(void) 36static int __init emu_init(void)
58{ 37{
@@ -66,4 +45,3 @@ static int __init emu_init(void)
66} 45}
67 46
68subsys_initcall(emu_init); 47subsys_initcall(emu_init);
69
diff --git a/arch/arm/mach-omap2/include/mach/system.h b/arch/arm/mach-omap2/include/mach/system.h
deleted file mode 100644
index d488721ab90..00000000000
--- a/arch/arm/mach-omap2/include/mach/system.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * arch/arm/mach-omap2/include/mach/system.h
3 */
4
5#include <plat/system.h>
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index b8822f8b289..1f736222a62 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -232,7 +232,6 @@ static int omap2_can_sleep(void)
232 232
233static void omap2_pm_idle(void) 233static void omap2_pm_idle(void)
234{ 234{
235 local_irq_disable();
236 local_fiq_disable(); 235 local_fiq_disable();
237 236
238 if (!omap2_can_sleep()) { 237 if (!omap2_can_sleep()) {
@@ -249,7 +248,6 @@ static void omap2_pm_idle(void)
249 248
250out: 249out:
251 local_fiq_enable(); 250 local_fiq_enable();
252 local_irq_enable();
253} 251}
254 252
255#ifdef CONFIG_SUSPEND 253#ifdef CONFIG_SUSPEND
@@ -468,7 +466,7 @@ static int __init omap2_pm_init(void)
468 } 466 }
469 467
470 suspend_set_ops(&omap_pm_ops); 468 suspend_set_ops(&omap_pm_ops);
471 pm_idle = omap2_pm_idle; 469 arm_pm_idle = omap2_pm_idle;
472 470
473 return 0; 471 return 0;
474} 472}
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index fc698757892..b77df735fa6 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -418,10 +418,9 @@ void omap_sram_idle(void)
418 418
419static void omap3_pm_idle(void) 419static void omap3_pm_idle(void)
420{ 420{
421 local_irq_disable();
422 local_fiq_disable(); 421 local_fiq_disable();
423 422
424 if (omap_irq_pending() || need_resched()) 423 if (omap_irq_pending())
425 goto out; 424 goto out;
426 425
427 trace_power_start(POWER_CSTATE, 1, smp_processor_id()); 426 trace_power_start(POWER_CSTATE, 1, smp_processor_id());
@@ -434,7 +433,6 @@ static void omap3_pm_idle(void)
434 433
435out: 434out:
436 local_fiq_enable(); 435 local_fiq_enable();
437 local_irq_enable();
438} 436}
439 437
440#ifdef CONFIG_SUSPEND 438#ifdef CONFIG_SUSPEND
@@ -848,7 +846,7 @@ static int __init omap3_pm_init(void)
848 suspend_set_ops(&omap_pm_ops); 846 suspend_set_ops(&omap_pm_ops);
849#endif /* CONFIG_SUSPEND */ 847#endif /* CONFIG_SUSPEND */
850 848
851 pm_idle = omap3_pm_idle; 849 arm_pm_idle = omap3_pm_idle;
852 omap3_idle_init(); 850 omap3_idle_init();
853 851
854 /* 852 /*
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index c264ef7219c..c840689df24 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -173,18 +173,16 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
173 * omap_default_idle - OMAP4 default ilde routine.' 173 * omap_default_idle - OMAP4 default ilde routine.'
174 * 174 *
175 * Implements OMAP4 memory, IO ordering requirements which can't be addressed 175 * Implements OMAP4 memory, IO ordering requirements which can't be addressed
176 * with default arch_idle() hook. Used by all CPUs with !CONFIG_CPUIDLE and 176 * with default cpu_do_idle() hook. Used by all CPUs with !CONFIG_CPUIDLE and
177 * by secondary CPU with CONFIG_CPUIDLE. 177 * by secondary CPU with CONFIG_CPUIDLE.
178 */ 178 */
179static void omap_default_idle(void) 179static void omap_default_idle(void)
180{ 180{
181 local_irq_disable();
182 local_fiq_disable(); 181 local_fiq_disable();
183 182
184 omap_do_wfi(); 183 omap_do_wfi();
185 184
186 local_fiq_enable(); 185 local_fiq_enable();
187 local_irq_enable();
188} 186}
189 187
190/** 188/**
@@ -255,8 +253,8 @@ static int __init omap4_pm_init(void)
255 suspend_set_ops(&omap_pm_ops); 253 suspend_set_ops(&omap_pm_ops);
256#endif /* CONFIG_SUSPEND */ 254#endif /* CONFIG_SUSPEND */
257 255
258 /* Overwrite the default arch_idle() */ 256 /* Overwrite the default cpu_do_idle() */
259 pm_idle = omap_default_idle; 257 arm_pm_idle = omap_default_idle;
260 258
261 omap4_idle_init(); 259 omap4_idle_init();
262 260
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c
index 860118ab43e..873b51d494e 100644
--- a/arch/arm/mach-omap2/prm_common.c
+++ b/arch/arm/mach-omap2/prm_common.c
@@ -24,7 +24,6 @@
24#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <linux/slab.h> 25#include <linux/slab.h>
26 26
27#include <mach/system.h>
28#include <plat/common.h> 27#include <plat/common.h>
29#include <plat/prcm.h> 28#include <plat/prcm.h>
30#include <plat/irqs.h> 29#include <plat/irqs.h>
diff --git a/arch/arm/mach-orion5x/include/mach/system.h b/arch/arm/mach-orion5x/include/mach/system.h
deleted file mode 100644
index 825a2650cef..00000000000
--- a/arch/arm/mach-orion5x/include/mach/system.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/mach-orion5x/include/mach/system.h
3 *
4 * Tzachi Perelstein <tzachi@marvell.com>
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#ifndef __ASM_ARCH_SYSTEM_H
12#define __ASM_ARCH_SYSTEM_H
13
14static inline void arch_idle(void)
15{
16 cpu_do_idle();
17}
18
19#endif
diff --git a/arch/arm/mach-picoxcell/include/mach/irqs.h b/arch/arm/mach-picoxcell/include/mach/irqs.h
deleted file mode 100644
index 59eac1ee282..00000000000
--- a/arch/arm/mach-picoxcell/include/mach/irqs.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * Copyright (c) 2011 Picochip Ltd., Jamie Iles
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14#ifndef __MACH_IRQS_H
15#define __MACH_IRQS_H
16
17/* We dynamically allocate our irq_desc's. */
18#define NR_IRQS 0
19
20#endif /* __MACH_IRQS_H */
diff --git a/arch/arm/mach-picoxcell/include/mach/system.h b/arch/arm/mach-picoxcell/include/mach/system.h
deleted file mode 100644
index 1a5d8cb57df..00000000000
--- a/arch/arm/mach-picoxcell/include/mach/system.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * Copyright (c) 2011 Picochip Ltd., Jamie Iles
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14#ifndef __ASM_ARCH_SYSTEM_H
15#define __ASM_ARCH_SYSTEM_H
16
17static inline void arch_idle(void)
18{
19 /*
20 * This should do all the clock switching and wait for interrupt
21 * tricks.
22 */
23 cpu_do_idle();
24}
25
26#endif /* __ASM_ARCH_SYSTEM_H */
diff --git a/arch/arm/mach-pnx4008/include/mach/system.h b/arch/arm/mach-pnx4008/include/mach/system.h
deleted file mode 100644
index 60cfe718809..00000000000
--- a/arch/arm/mach-pnx4008/include/mach/system.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * arch/arm/mach-pnx4008/include/mach/system.h
3 *
4 * Copyright (C) 2003 Philips Semiconductors
5 * Copyright (C) 2005 MontaVista Software, Inc.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24static void arch_idle(void)
25{
26 cpu_do_idle();
27}
28
29#endif
diff --git a/arch/arm/mach-prima2/include/mach/system.h b/arch/arm/mach-prima2/include/mach/system.h
deleted file mode 100644
index 2c7d2a9d0c9..00000000000
--- a/arch/arm/mach-prima2/include/mach/system.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/*
2 * arch/arm/mach-prima2/include/mach/system.h
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#ifndef __MACH_SYSTEM_H__
10#define __MACH_SYSTEM_H__
11
12static inline void arch_idle(void)
13{
14 cpu_do_idle();
15}
16
17#endif
diff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-prima2/timer.c
index b7a6091ce79..0d024b1e916 100644
--- a/arch/arm/mach-prima2/timer.c
+++ b/arch/arm/mach-prima2/timer.c
@@ -18,6 +18,7 @@
18#include <linux/of.h> 18#include <linux/of.h>
19#include <linux/of_address.h> 19#include <linux/of_address.h>
20#include <mach/map.h> 20#include <mach/map.h>
21#include <asm/sched_clock.h>
21#include <asm/mach/time.h> 22#include <asm/mach/time.h>
22 23
23#define SIRFSOC_TIMER_COUNTER_LO 0x0000 24#define SIRFSOC_TIMER_COUNTER_LO 0x0000
@@ -165,21 +166,9 @@ static struct irqaction sirfsoc_timer_irq = {
165}; 166};
166 167
167/* Overwrite weak default sched_clock with more precise one */ 168/* Overwrite weak default sched_clock with more precise one */
168unsigned long long notrace sched_clock(void) 169static u32 notrace sirfsoc_read_sched_clock(void)
169{ 170{
170 static int is_mapped; 171 return (u32)(sirfsoc_timer_read(NULL) & 0xffffffff);
171
172 /*
173 * sched_clock is called earlier than .init of sys_timer
174 * if we map timer memory in .init of sys_timer, system
175 * will panic due to illegal memory access
176 */
177 if (!is_mapped) {
178 sirfsoc_of_timer_map();
179 is_mapped = 1;
180 }
181
182 return sirfsoc_timer_read(NULL) * (NSEC_PER_SEC / CLOCK_TICK_RATE);
183} 172}
184 173
185static void __init sirfsoc_clockevent_init(void) 174static void __init sirfsoc_clockevent_init(void)
@@ -210,6 +199,8 @@ static void __init sirfsoc_timer_init(void)
210 BUG_ON(rate < CLOCK_TICK_RATE); 199 BUG_ON(rate < CLOCK_TICK_RATE);
211 BUG_ON(rate % CLOCK_TICK_RATE); 200 BUG_ON(rate % CLOCK_TICK_RATE);
212 201
202 sirfsoc_of_timer_map();
203
213 writel_relaxed(rate / CLOCK_TICK_RATE / 2 - 1, sirfsoc_timer_base + SIRFSOC_TIMER_DIV); 204 writel_relaxed(rate / CLOCK_TICK_RATE / 2 - 1, sirfsoc_timer_base + SIRFSOC_TIMER_DIV);
214 writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_LO); 205 writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_LO);
215 writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_HI); 206 writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_HI);
@@ -217,6 +208,8 @@ static void __init sirfsoc_timer_init(void)
217 208
218 BUG_ON(clocksource_register_hz(&sirfsoc_clocksource, CLOCK_TICK_RATE)); 209 BUG_ON(clocksource_register_hz(&sirfsoc_clocksource, CLOCK_TICK_RATE));
219 210
211 setup_sched_clock(sirfsoc_read_sched_clock, 32, CLOCK_TICK_RATE);
212
220 BUG_ON(setup_irq(sirfsoc_timer_irq.irq, &sirfsoc_timer_irq)); 213 BUG_ON(setup_irq(sirfsoc_timer_irq.irq, &sirfsoc_timer_irq));
221 214
222 sirfsoc_clockevent_init(); 215 sirfsoc_clockevent_init();
diff --git a/arch/arm/mach-pxa/capc7117.c b/arch/arm/mach-pxa/capc7117.c
index c91727d1fe0..9a8760b7291 100644
--- a/arch/arm/mach-pxa/capc7117.c
+++ b/arch/arm/mach-pxa/capc7117.c
@@ -150,6 +150,7 @@ MACHINE_START(CAPC7117,
150 "Embedian CAPC-7117 evaluation kit based on the MXM-8x10 CoM") 150 "Embedian CAPC-7117 evaluation kit based on the MXM-8x10 CoM")
151 .atag_offset = 0x100, 151 .atag_offset = 0x100,
152 .map_io = pxa3xx_map_io, 152 .map_io = pxa3xx_map_io,
153 .nr_irqs = PXA_NR_IRQS,
153 .init_irq = pxa3xx_init_irq, 154 .init_irq = pxa3xx_init_irq,
154 .handle_irq = pxa3xx_handle_irq, 155 .handle_irq = pxa3xx_handle_irq,
155 .timer = &pxa_timer, 156 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index 4b981b82d2a..133cceefd2a 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -853,6 +853,7 @@ static void __init cm_x300_fixup(struct tag *tags, char **cmdline,
853MACHINE_START(CM_X300, "CM-X300 module") 853MACHINE_START(CM_X300, "CM-X300 module")
854 .atag_offset = 0x100, 854 .atag_offset = 0x100,
855 .map_io = pxa3xx_map_io, 855 .map_io = pxa3xx_map_io,
856 .nr_irqs = PXA_NR_IRQS,
856 .init_irq = pxa3xx_init_irq, 857 .init_irq = pxa3xx_init_irq,
857 .handle_irq = pxa3xx_handle_irq, 858 .handle_irq = pxa3xx_handle_irq,
858 .timer = &pxa_timer, 859 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
index 29d5d541f60..b2f227d3612 100644
--- a/arch/arm/mach-pxa/colibri-pxa270.c
+++ b/arch/arm/mach-pxa/colibri-pxa270.c
@@ -310,6 +310,7 @@ MACHINE_START(COLIBRI, "Toradex Colibri PXA270")
310 .atag_offset = 0x100, 310 .atag_offset = 0x100,
311 .init_machine = colibri_pxa270_init, 311 .init_machine = colibri_pxa270_init,
312 .map_io = pxa27x_map_io, 312 .map_io = pxa27x_map_io,
313 .nr_irqs = PXA_NR_IRQS,
313 .init_irq = pxa27x_init_irq, 314 .init_irq = pxa27x_init_irq,
314 .handle_irq = pxa27x_handle_irq, 315 .handle_irq = pxa27x_handle_irq,
315 .timer = &pxa_timer, 316 .timer = &pxa_timer,
@@ -320,6 +321,7 @@ MACHINE_START(INCOME, "Income s.r.o. SH-Dmaster PXA270 SBC")
320 .atag_offset = 0x100, 321 .atag_offset = 0x100,
321 .init_machine = colibri_pxa270_income_init, 322 .init_machine = colibri_pxa270_income_init,
322 .map_io = pxa27x_map_io, 323 .map_io = pxa27x_map_io,
324 .nr_irqs = PXA_NR_IRQS,
323 .init_irq = pxa27x_init_irq, 325 .init_irq = pxa27x_init_irq,
324 .handle_irq = pxa27x_handle_irq, 326 .handle_irq = pxa27x_handle_irq,
325 .timer = &pxa_timer, 327 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c
index 0846d210cb0..bb6def8ec97 100644
--- a/arch/arm/mach-pxa/colibri-pxa300.c
+++ b/arch/arm/mach-pxa/colibri-pxa300.c
@@ -186,6 +186,7 @@ MACHINE_START(COLIBRI300, "Toradex Colibri PXA300")
186 .atag_offset = 0x100, 186 .atag_offset = 0x100,
187 .init_machine = colibri_pxa300_init, 187 .init_machine = colibri_pxa300_init,
188 .map_io = pxa3xx_map_io, 188 .map_io = pxa3xx_map_io,
189 .nr_irqs = PXA_NR_IRQS,
189 .init_irq = pxa3xx_init_irq, 190 .init_irq = pxa3xx_init_irq,
190 .handle_irq = pxa3xx_handle_irq, 191 .handle_irq = pxa3xx_handle_irq,
191 .timer = &pxa_timer, 192 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
index 6ad3359063a..d88e7b37f1d 100644
--- a/arch/arm/mach-pxa/colibri-pxa320.c
+++ b/arch/arm/mach-pxa/colibri-pxa320.c
@@ -256,6 +256,7 @@ MACHINE_START(COLIBRI320, "Toradex Colibri PXA320")
256 .atag_offset = 0x100, 256 .atag_offset = 0x100,
257 .init_machine = colibri_pxa320_init, 257 .init_machine = colibri_pxa320_init,
258 .map_io = pxa3xx_map_io, 258 .map_io = pxa3xx_map_io,
259 .nr_irqs = PXA_NR_IRQS,
259 .init_irq = pxa3xx_init_irq, 260 .init_irq = pxa3xx_init_irq,
260 .handle_irq = pxa3xx_handle_irq, 261 .handle_irq = pxa3xx_handle_irq,
261 .timer = &pxa_timer, 262 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index 11f1e735966..039aafa455c 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -730,6 +730,7 @@ static void __init fixup_corgi(struct tag *tags, char **cmdline,
730MACHINE_START(CORGI, "SHARP Corgi") 730MACHINE_START(CORGI, "SHARP Corgi")
731 .fixup = fixup_corgi, 731 .fixup = fixup_corgi,
732 .map_io = pxa25x_map_io, 732 .map_io = pxa25x_map_io,
733 .nr_irqs = PXA_NR_IRQS,
733 .init_irq = pxa25x_init_irq, 734 .init_irq = pxa25x_init_irq,
734 .handle_irq = pxa25x_handle_irq, 735 .handle_irq = pxa25x_handle_irq,
735 .init_machine = corgi_init, 736 .init_machine = corgi_init,
@@ -742,6 +743,7 @@ MACHINE_END
742MACHINE_START(SHEPHERD, "SHARP Shepherd") 743MACHINE_START(SHEPHERD, "SHARP Shepherd")
743 .fixup = fixup_corgi, 744 .fixup = fixup_corgi,
744 .map_io = pxa25x_map_io, 745 .map_io = pxa25x_map_io,
746 .nr_irqs = PXA_NR_IRQS,
745 .init_irq = pxa25x_init_irq, 747 .init_irq = pxa25x_init_irq,
746 .handle_irq = pxa25x_handle_irq, 748 .handle_irq = pxa25x_handle_irq,
747 .init_machine = corgi_init, 749 .init_machine = corgi_init,
@@ -754,6 +756,7 @@ MACHINE_END
754MACHINE_START(HUSKY, "SHARP Husky") 756MACHINE_START(HUSKY, "SHARP Husky")
755 .fixup = fixup_corgi, 757 .fixup = fixup_corgi,
756 .map_io = pxa25x_map_io, 758 .map_io = pxa25x_map_io,
759 .nr_irqs = PXA_NR_IRQS,
757 .init_irq = pxa25x_init_irq, 760 .init_irq = pxa25x_init_irq,
758 .handle_irq = pxa25x_handle_irq, 761 .handle_irq = pxa25x_handle_irq,
759 .init_machine = corgi_init, 762 .init_machine = corgi_init,
diff --git a/arch/arm/mach-pxa/csb726.c b/arch/arm/mach-pxa/csb726.c
index fb5a51d834e..67f0de37f46 100644
--- a/arch/arm/mach-pxa/csb726.c
+++ b/arch/arm/mach-pxa/csb726.c
@@ -274,6 +274,7 @@ static void __init csb726_init(void)
274MACHINE_START(CSB726, "Cogent CSB726") 274MACHINE_START(CSB726, "Cogent CSB726")
275 .atag_offset = 0x100, 275 .atag_offset = 0x100,
276 .map_io = pxa27x_map_io, 276 .map_io = pxa27x_map_io,
277 .nr_irqs = PXA_NR_IRQS,
277 .init_irq = pxa27x_init_irq, 278 .init_irq = pxa27x_init_irq,
278 .handle_irq = pxa27x_handle_irq, 279 .handle_irq = pxa27x_handle_irq,
279 .init_machine = csb726_init, 280 .init_machine = csb726_init,
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index 18fd177073f..72a15a62ab0 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -12,6 +12,7 @@
12#include <mach/pxafb.h> 12#include <mach/pxafb.h>
13#include <mach/mmc.h> 13#include <mach/mmc.h>
14#include <mach/irda.h> 14#include <mach/irda.h>
15#include <mach/irqs.h>
15#include <mach/ohci.h> 16#include <mach/ohci.h>
16#include <plat/pxa27x_keypad.h> 17#include <plat/pxa27x_keypad.h>
17#include <mach/camera.h> 18#include <mach/camera.h>
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index d80c0ba9a09..c1b65da2633 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -1301,6 +1301,7 @@ static void __init em_x270_init(void)
1301MACHINE_START(EM_X270, "Compulab EM-X270") 1301MACHINE_START(EM_X270, "Compulab EM-X270")
1302 .atag_offset = 0x100, 1302 .atag_offset = 0x100,
1303 .map_io = pxa27x_map_io, 1303 .map_io = pxa27x_map_io,
1304 .nr_irqs = PXA_NR_IRQS,
1304 .init_irq = pxa27x_init_irq, 1305 .init_irq = pxa27x_init_irq,
1305 .handle_irq = pxa27x_handle_irq, 1306 .handle_irq = pxa27x_handle_irq,
1306 .timer = &pxa_timer, 1307 .timer = &pxa_timer,
@@ -1311,6 +1312,7 @@ MACHINE_END
1311MACHINE_START(EXEDA, "Compulab eXeda") 1312MACHINE_START(EXEDA, "Compulab eXeda")
1312 .atag_offset = 0x100, 1313 .atag_offset = 0x100,
1313 .map_io = pxa27x_map_io, 1314 .map_io = pxa27x_map_io,
1315 .nr_irqs = PXA_NR_IRQS,
1314 .init_irq = pxa27x_init_irq, 1316 .init_irq = pxa27x_init_irq,
1315 .handle_irq = pxa27x_handle_irq, 1317 .handle_irq = pxa27x_handle_irq,
1316 .timer = &pxa_timer, 1318 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c
index ac3b1cef475..e529a35a44c 100644
--- a/arch/arm/mach-pxa/gumstix.c
+++ b/arch/arm/mach-pxa/gumstix.c
@@ -235,6 +235,7 @@ static void __init gumstix_init(void)
235MACHINE_START(GUMSTIX, "Gumstix") 235MACHINE_START(GUMSTIX, "Gumstix")
236 .atag_offset = 0x100, /* match u-boot bi_boot_params */ 236 .atag_offset = 0x100, /* match u-boot bi_boot_params */
237 .map_io = pxa25x_map_io, 237 .map_io = pxa25x_map_io,
238 .nr_irqs = PXA_NR_IRQS,
238 .init_irq = pxa25x_init_irq, 239 .init_irq = pxa25x_init_irq,
239 .handle_irq = pxa25x_handle_irq, 240 .handle_irq = pxa25x_handle_irq,
240 .timer = &pxa_timer, 241 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/h5000.c b/arch/arm/mach-pxa/h5000.c
index fde6b4c873c..e7dec589f01 100644
--- a/arch/arm/mach-pxa/h5000.c
+++ b/arch/arm/mach-pxa/h5000.c
@@ -205,6 +205,7 @@ static void __init h5000_init(void)
205MACHINE_START(H5400, "HP iPAQ H5000") 205MACHINE_START(H5400, "HP iPAQ H5000")
206 .atag_offset = 0x100, 206 .atag_offset = 0x100,
207 .map_io = pxa25x_map_io, 207 .map_io = pxa25x_map_io,
208 .nr_irqs = PXA_NR_IRQS,
208 .init_irq = pxa25x_init_irq, 209 .init_irq = pxa25x_init_irq,
209 .handle_irq = pxa25x_handle_irq, 210 .handle_irq = pxa25x_handle_irq,
210 .timer = &pxa_timer, 211 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/himalaya.c b/arch/arm/mach-pxa/himalaya.c
index 26d069a9f90..2962de898da 100644
--- a/arch/arm/mach-pxa/himalaya.c
+++ b/arch/arm/mach-pxa/himalaya.c
@@ -160,6 +160,7 @@ static void __init himalaya_init(void)
160MACHINE_START(HIMALAYA, "HTC Himalaya") 160MACHINE_START(HIMALAYA, "HTC Himalaya")
161 .atag_offset = 0x100, 161 .atag_offset = 0x100,
162 .map_io = pxa25x_map_io, 162 .map_io = pxa25x_map_io,
163 .nr_irqs = PXA_NR_IRQS,
163 .init_irq = pxa25x_init_irq, 164 .init_irq = pxa25x_init_irq,
164 .handle_irq = pxa25x_handle_irq, 165 .handle_irq = pxa25x_handle_irq,
165 .init_machine = himalaya_init, 166 .init_machine = himalaya_init,
diff --git a/arch/arm/mach-pxa/icontrol.c b/arch/arm/mach-pxa/icontrol.c
index 67400192ed3..1d02eabc9c6 100644
--- a/arch/arm/mach-pxa/icontrol.c
+++ b/arch/arm/mach-pxa/icontrol.c
@@ -193,6 +193,7 @@ static void __init icontrol_init(void)
193MACHINE_START(ICONTROL, "iControl/SafeTcam boards using Embedian MXM-8x10 CoM") 193MACHINE_START(ICONTROL, "iControl/SafeTcam boards using Embedian MXM-8x10 CoM")
194 .atag_offset = 0x100, 194 .atag_offset = 0x100,
195 .map_io = pxa3xx_map_io, 195 .map_io = pxa3xx_map_io,
196 .nr_irqs = PXA_NR_IRQS,
196 .init_irq = pxa3xx_init_irq, 197 .init_irq = pxa3xx_init_irq,
197 .handle_irq = pxa3xx_handle_irq, 198 .handle_irq = pxa3xx_handle_irq,
198 .timer = &pxa_timer, 199 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index 8af1840e12c..6ff466bd43e 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -195,6 +195,7 @@ static void __init idp_map_io(void)
195MACHINE_START(PXA_IDP, "Vibren PXA255 IDP") 195MACHINE_START(PXA_IDP, "Vibren PXA255 IDP")
196 /* Maintainer: Vibren Technologies */ 196 /* Maintainer: Vibren Technologies */
197 .map_io = idp_map_io, 197 .map_io = idp_map_io,
198 .nr_irqs = PXA_NR_IRQS,
198 .init_irq = pxa25x_init_irq, 199 .init_irq = pxa25x_init_irq,
199 .handle_irq = pxa25x_handle_irq, 200 .handle_irq = pxa25x_handle_irq,
200 .timer = &pxa_timer, 201 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/include/mach/irqs.h b/arch/arm/mach-pxa/include/mach/irqs.h
index 32975adf3ca..8765782dd95 100644
--- a/arch/arm/mach-pxa/include/mach/irqs.h
+++ b/arch/arm/mach-pxa/include/mach/irqs.h
@@ -100,7 +100,7 @@
100 */ 100 */
101#define IRQ_BOARD_START (PXA_GPIO_IRQ_BASE + PXA_NR_BUILTIN_GPIO) 101#define IRQ_BOARD_START (PXA_GPIO_IRQ_BASE + PXA_NR_BUILTIN_GPIO)
102 102
103#define NR_IRQS (IRQ_BOARD_START) 103#define PXA_NR_IRQS (IRQ_BOARD_START)
104 104
105#ifndef __ASSEMBLY__ 105#ifndef __ASSEMBLY__
106struct irq_data; 106struct irq_data;
diff --git a/arch/arm/mach-pxa/include/mach/mainstone.h b/arch/arm/mach-pxa/include/mach/mainstone.h
index 4c2d11cd824..1bfc4e822a4 100644
--- a/arch/arm/mach-pxa/include/mach/mainstone.h
+++ b/arch/arm/mach-pxa/include/mach/mainstone.h
@@ -13,6 +13,8 @@
13#ifndef ASM_ARCH_MAINSTONE_H 13#ifndef ASM_ARCH_MAINSTONE_H
14#define ASM_ARCH_MAINSTONE_H 14#define ASM_ARCH_MAINSTONE_H
15 15
16#include <mach/irqs.h>
17
16#define MST_ETH_PHYS PXA_CS4_PHYS 18#define MST_ETH_PHYS PXA_CS4_PHYS
17 19
18#define MST_FPGA_PHYS PXA_CS2_PHYS 20#define MST_FPGA_PHYS PXA_CS2_PHYS
diff --git a/arch/arm/mach-pxa/include/mach/system.h b/arch/arm/mach-pxa/include/mach/system.h
deleted file mode 100644
index c5afacd3cc0..00000000000
--- a/arch/arm/mach-pxa/include/mach/system.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/*
2 * arch/arm/mach-pxa/include/mach/system.h
3 *
4 * Author: Nicolas Pitre
5 * Created: Jun 15, 2001
6 * Copyright: MontaVista Software Inc.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12static inline void arch_idle(void)
13{
14 cpu_do_idle();
15}
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index e80a3db735c..061d57009ce 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -758,6 +758,7 @@ MACHINE_START(MIOA701, "MIO A701")
758 .atag_offset = 0x100, 758 .atag_offset = 0x100,
759 .restart_mode = 's', 759 .restart_mode = 's',
760 .map_io = &pxa27x_map_io, 760 .map_io = &pxa27x_map_io,
761 .nr_irqs = PXA_NR_IRQS,
761 .init_irq = &pxa27x_init_irq, 762 .init_irq = &pxa27x_init_irq,
762 .handle_irq = &pxa27x_handle_irq, 763 .handle_irq = &pxa27x_handle_irq,
763 .init_machine = mioa701_machine_init, 764 .init_machine = mioa701_machine_init,
diff --git a/arch/arm/mach-pxa/mp900.c b/arch/arm/mach-pxa/mp900.c
index 169bf8f97af..152efbf093f 100644
--- a/arch/arm/mach-pxa/mp900.c
+++ b/arch/arm/mach-pxa/mp900.c
@@ -95,6 +95,7 @@ MACHINE_START(NEC_MP900, "MobilePro900/C")
95 .atag_offset = 0x220100, 95 .atag_offset = 0x220100,
96 .timer = &pxa_timer, 96 .timer = &pxa_timer,
97 .map_io = pxa25x_map_io, 97 .map_io = pxa25x_map_io,
98 .nr_irqs = PXA_NR_IRQS,
98 .init_irq = pxa25x_init_irq, 99 .init_irq = pxa25x_init_irq,
99 .handle_irq = pxa25x_handle_irq, 100 .handle_irq = pxa25x_handle_irq,
100 .init_machine = mp900c_init, 101 .init_machine = mp900c_init,
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
index 1fa80f4f80c..31e0433d83b 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -344,6 +344,7 @@ static void __init palmld_init(void)
344MACHINE_START(PALMLD, "Palm LifeDrive") 344MACHINE_START(PALMLD, "Palm LifeDrive")
345 .atag_offset = 0x100, 345 .atag_offset = 0x100,
346 .map_io = palmld_map_io, 346 .map_io = palmld_map_io,
347 .nr_irqs = PXA_NR_IRQS,
347 .init_irq = pxa27x_init_irq, 348 .init_irq = pxa27x_init_irq,
348 .handle_irq = pxa27x_handle_irq, 349 .handle_irq = pxa27x_handle_irq,
349 .timer = &pxa_timer, 350 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
index 5ba14316bd9..0f6bd4fcfa3 100644
--- a/arch/arm/mach-pxa/palmt5.c
+++ b/arch/arm/mach-pxa/palmt5.c
@@ -205,6 +205,7 @@ MACHINE_START(PALMT5, "Palm Tungsten|T5")
205 .atag_offset = 0x100, 205 .atag_offset = 0x100,
206 .map_io = pxa27x_map_io, 206 .map_io = pxa27x_map_io,
207 .reserve = palmt5_reserve, 207 .reserve = palmt5_reserve,
208 .nr_irqs = PXA_NR_IRQS,
208 .init_irq = pxa27x_init_irq, 209 .init_irq = pxa27x_init_irq,
209 .handle_irq = pxa27x_handle_irq, 210 .handle_irq = pxa27x_handle_irq,
210 .timer = &pxa_timer, 211 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
index 29b51b40f09..e2d97eed07a 100644
--- a/arch/arm/mach-pxa/palmtc.c
+++ b/arch/arm/mach-pxa/palmtc.c
@@ -539,6 +539,7 @@ static void __init palmtc_init(void)
539MACHINE_START(PALMTC, "Palm Tungsten|C") 539MACHINE_START(PALMTC, "Palm Tungsten|C")
540 .atag_offset = 0x100, 540 .atag_offset = 0x100,
541 .map_io = pxa25x_map_io, 541 .map_io = pxa25x_map_io,
542 .nr_irqs = PXA_NR_IRQS,
542 .init_irq = pxa25x_init_irq, 543 .init_irq = pxa25x_init_irq,
543 .handle_irq = pxa25x_handle_irq, 544 .handle_irq = pxa25x_handle_irq,
544 .timer = &pxa_timer, 545 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c
index 5ebf49acb82..c054827c567 100644
--- a/arch/arm/mach-pxa/palmte2.c
+++ b/arch/arm/mach-pxa/palmte2.c
@@ -358,6 +358,7 @@ static void __init palmte2_init(void)
358MACHINE_START(PALMTE2, "Palm Tungsten|E2") 358MACHINE_START(PALMTE2, "Palm Tungsten|E2")
359 .atag_offset = 0x100, 359 .atag_offset = 0x100,
360 .map_io = pxa25x_map_io, 360 .map_io = pxa25x_map_io,
361 .nr_irqs = PXA_NR_IRQS,
361 .init_irq = pxa25x_init_irq, 362 .init_irq = pxa25x_init_irq,
362 .handle_irq = pxa25x_handle_irq, 363 .handle_irq = pxa25x_handle_irq,
363 .timer = &pxa_timer, 364 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c
index ec8249156c0..fbdebee39a5 100644
--- a/arch/arm/mach-pxa/palmtreo.c
+++ b/arch/arm/mach-pxa/palmtreo.c
@@ -448,6 +448,7 @@ MACHINE_START(TREO680, "Palm Treo 680")
448 .atag_offset = 0x100, 448 .atag_offset = 0x100,
449 .map_io = pxa27x_map_io, 449 .map_io = pxa27x_map_io,
450 .reserve = treo_reserve, 450 .reserve = treo_reserve,
451 .nr_irqs = PXA_NR_IRQS,
451 .init_irq = pxa27x_init_irq, 452 .init_irq = pxa27x_init_irq,
452 .handle_irq = pxa27x_handle_irq, 453 .handle_irq = pxa27x_handle_irq,
453 .timer = &pxa_timer, 454 .timer = &pxa_timer,
@@ -461,6 +462,7 @@ MACHINE_START(CENTRO, "Palm Centro 685")
461 .atag_offset = 0x100, 462 .atag_offset = 0x100,
462 .map_io = pxa27x_map_io, 463 .map_io = pxa27x_map_io,
463 .reserve = treo_reserve, 464 .reserve = treo_reserve,
465 .nr_irqs = PXA_NR_IRQS,
464 .init_irq = pxa27x_init_irq, 466 .init_irq = pxa27x_init_irq,
465 .handle_irq = pxa27x_handle_irq, 467 .handle_irq = pxa27x_handle_irq,
466 .timer = &pxa_timer, 468 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
index 6170d76dfba..9507605ed54 100644
--- a/arch/arm/mach-pxa/palmtx.c
+++ b/arch/arm/mach-pxa/palmtx.c
@@ -366,6 +366,7 @@ static void __init palmtx_init(void)
366MACHINE_START(PALMTX, "Palm T|X") 366MACHINE_START(PALMTX, "Palm T|X")
367 .atag_offset = 0x100, 367 .atag_offset = 0x100,
368 .map_io = palmtx_map_io, 368 .map_io = palmtx_map_io,
369 .nr_irqs = PXA_NR_IRQS,
369 .init_irq = pxa27x_init_irq, 370 .init_irq = pxa27x_init_irq,
370 .handle_irq = pxa27x_handle_irq, 371 .handle_irq = pxa27x_handle_irq,
371 .timer = &pxa_timer, 372 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c
index b2dff9d415e..a97b59965bb 100644
--- a/arch/arm/mach-pxa/palmz72.c
+++ b/arch/arm/mach-pxa/palmz72.c
@@ -401,6 +401,7 @@ static void __init palmz72_init(void)
401MACHINE_START(PALMZ72, "Palm Zire72") 401MACHINE_START(PALMZ72, "Palm Zire72")
402 .atag_offset = 0x100, 402 .atag_offset = 0x100,
403 .map_io = pxa27x_map_io, 403 .map_io = pxa27x_map_io,
404 .nr_irqs = PXA_NR_IRQS,
404 .init_irq = pxa27x_init_irq, 405 .init_irq = pxa27x_init_irq,
405 .handle_irq = pxa27x_handle_irq, 406 .handle_irq = pxa27x_handle_irq,
406 .timer = &pxa_timer, 407 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index f107c71c758..d2e562d62cf 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -31,6 +31,7 @@
31#include <mach/pm.h> 31#include <mach/pm.h>
32#include <mach/dma.h> 32#include <mach/dma.h>
33#include <mach/smemc.h> 33#include <mach/smemc.h>
34#include <mach/irqs.h>
34 35
35#include "generic.h" 36#include "generic.h"
36#include "devices.h" 37#include "devices.h"
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 22818c7694a..7d691e51cb5 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -1090,6 +1090,7 @@ MACHINE_START(RAUMFELD_RC, "Raumfeld Controller")
1090 .atag_offset = 0x100, 1090 .atag_offset = 0x100,
1091 .init_machine = raumfeld_controller_init, 1091 .init_machine = raumfeld_controller_init,
1092 .map_io = pxa3xx_map_io, 1092 .map_io = pxa3xx_map_io,
1093 .nr_irqs = PXA_NR_IRQS,
1093 .init_irq = pxa3xx_init_irq, 1094 .init_irq = pxa3xx_init_irq,
1094 .handle_irq = pxa3xx_handle_irq, 1095 .handle_irq = pxa3xx_handle_irq,
1095 .timer = &pxa_timer, 1096 .timer = &pxa_timer,
@@ -1102,6 +1103,7 @@ MACHINE_START(RAUMFELD_CONNECTOR, "Raumfeld Connector")
1102 .atag_offset = 0x100, 1103 .atag_offset = 0x100,
1103 .init_machine = raumfeld_connector_init, 1104 .init_machine = raumfeld_connector_init,
1104 .map_io = pxa3xx_map_io, 1105 .map_io = pxa3xx_map_io,
1106 .nr_irqs = PXA_NR_IRQS,
1105 .init_irq = pxa3xx_init_irq, 1107 .init_irq = pxa3xx_init_irq,
1106 .handle_irq = pxa3xx_handle_irq, 1108 .handle_irq = pxa3xx_handle_irq,
1107 .timer = &pxa_timer, 1109 .timer = &pxa_timer,
@@ -1114,6 +1116,7 @@ MACHINE_START(RAUMFELD_SPEAKER, "Raumfeld Speaker")
1114 .atag_offset = 0x100, 1116 .atag_offset = 0x100,
1115 .init_machine = raumfeld_speaker_init, 1117 .init_machine = raumfeld_speaker_init,
1116 .map_io = pxa3xx_map_io, 1118 .map_io = pxa3xx_map_io,
1119 .nr_irqs = PXA_NR_IRQS,
1117 .init_irq = pxa3xx_init_irq, 1120 .init_irq = pxa3xx_init_irq,
1118 .handle_irq = pxa3xx_handle_irq, 1121 .handle_irq = pxa3xx_handle_irq,
1119 .timer = &pxa_timer, 1122 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c
index 0fe354efb93..86c95a5d853 100644
--- a/arch/arm/mach-pxa/saar.c
+++ b/arch/arm/mach-pxa/saar.c
@@ -598,6 +598,7 @@ MACHINE_START(SAAR, "PXA930 Handheld Platform (aka SAAR)")
598 /* Maintainer: Eric Miao <eric.miao@marvell.com> */ 598 /* Maintainer: Eric Miao <eric.miao@marvell.com> */
599 .atag_offset = 0x100, 599 .atag_offset = 0x100,
600 .map_io = pxa3xx_map_io, 600 .map_io = pxa3xx_map_io,
601 .nr_irqs = PXA_NR_IRQS,
601 .init_irq = pxa3xx_init_irq, 602 .init_irq = pxa3xx_init_irq,
602 .handle_irq = pxa3xx_handle_irq, 603 .handle_irq = pxa3xx_handle_irq,
603 .timer = &pxa_timer, 604 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index abf355d0c92..df2ab0fb2ac 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -984,6 +984,7 @@ MACHINE_START(SPITZ, "SHARP Spitz")
984 .restart_mode = 'g', 984 .restart_mode = 'g',
985 .fixup = spitz_fixup, 985 .fixup = spitz_fixup,
986 .map_io = pxa27x_map_io, 986 .map_io = pxa27x_map_io,
987 .nr_irqs = PXA_NR_IRQS,
987 .init_irq = pxa27x_init_irq, 988 .init_irq = pxa27x_init_irq,
988 .handle_irq = pxa27x_handle_irq, 989 .handle_irq = pxa27x_handle_irq,
989 .init_machine = spitz_init, 990 .init_machine = spitz_init,
@@ -997,6 +998,7 @@ MACHINE_START(BORZOI, "SHARP Borzoi")
997 .restart_mode = 'g', 998 .restart_mode = 'g',
998 .fixup = spitz_fixup, 999 .fixup = spitz_fixup,
999 .map_io = pxa27x_map_io, 1000 .map_io = pxa27x_map_io,
1001 .nr_irqs = PXA_NR_IRQS,
1000 .init_irq = pxa27x_init_irq, 1002 .init_irq = pxa27x_init_irq,
1001 .handle_irq = pxa27x_handle_irq, 1003 .handle_irq = pxa27x_handle_irq,
1002 .init_machine = spitz_init, 1004 .init_machine = spitz_init,
@@ -1010,6 +1012,7 @@ MACHINE_START(AKITA, "SHARP Akita")
1010 .restart_mode = 'g', 1012 .restart_mode = 'g',
1011 .fixup = spitz_fixup, 1013 .fixup = spitz_fixup,
1012 .map_io = pxa27x_map_io, 1014 .map_io = pxa27x_map_io,
1015 .nr_irqs = PXA_NR_IRQS,
1013 .init_irq = pxa27x_init_irq, 1016 .init_irq = pxa27x_init_irq,
1014 .handle_irq = pxa27x_handle_irq, 1017 .handle_irq = pxa27x_handle_irq,
1015 .init_machine = spitz_init, 1018 .init_machine = spitz_init,
diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c
index b0656e158d9..adb601a3762 100644
--- a/arch/arm/mach-pxa/stargate2.c
+++ b/arch/arm/mach-pxa/stargate2.c
@@ -1006,6 +1006,7 @@ static void __init stargate2_init(void)
1006#ifdef CONFIG_MACH_INTELMOTE2 1006#ifdef CONFIG_MACH_INTELMOTE2
1007MACHINE_START(INTELMOTE2, "IMOTE 2") 1007MACHINE_START(INTELMOTE2, "IMOTE 2")
1008 .map_io = pxa27x_map_io, 1008 .map_io = pxa27x_map_io,
1009 .nr_irqs = PXA_NR_IRQS,
1009 .init_irq = pxa27x_init_irq, 1010 .init_irq = pxa27x_init_irq,
1010 .handle_irq = pxa27x_handle_irq, 1011 .handle_irq = pxa27x_handle_irq,
1011 .timer = &pxa_timer, 1012 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c
index 9fb38e80e07..736bfdc50ee 100644
--- a/arch/arm/mach-pxa/tavorevb.c
+++ b/arch/arm/mach-pxa/tavorevb.c
@@ -491,6 +491,7 @@ MACHINE_START(TAVOREVB, "PXA930 Evaluation Board (aka TavorEVB)")
491 /* Maintainer: Eric Miao <eric.miao@marvell.com> */ 491 /* Maintainer: Eric Miao <eric.miao@marvell.com> */
492 .atag_offset = 0x100, 492 .atag_offset = 0x100,
493 .map_io = pxa3xx_map_io, 493 .map_io = pxa3xx_map_io,
494 .nr_irqs = PXA_NR_IRQS,
494 .init_irq = pxa3xx_init_irq, 495 .init_irq = pxa3xx_init_irq,
495 .handle_irq = pxa3xx_handle_irq, 496 .handle_irq = pxa3xx_handle_irq,
496 .timer = &pxa_timer, 497 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index b503049d6d2..3d6c9bd90de 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -22,6 +22,7 @@
22#include <asm/mach/time.h> 22#include <asm/mach/time.h>
23#include <asm/sched_clock.h> 23#include <asm/sched_clock.h>
24#include <mach/regs-ost.h> 24#include <mach/regs-ost.h>
25#include <mach/irqs.h>
25 26
26/* 27/*
27 * This is PXA's sched_clock implementation. This has a resolution 28 * This is PXA's sched_clock implementation. This has a resolution
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index 0f30af617d8..2b6ac00b2cd 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -558,6 +558,7 @@ MACHINE_START(TRIZEPS4, "Keith und Koep Trizeps IV module")
558 .atag_offset = 0x100, 558 .atag_offset = 0x100,
559 .init_machine = trizeps4_init, 559 .init_machine = trizeps4_init,
560 .map_io = trizeps4_map_io, 560 .map_io = trizeps4_map_io,
561 .nr_irqs = PXA_NR_IRQS,
561 .init_irq = pxa27x_init_irq, 562 .init_irq = pxa27x_init_irq,
562 .handle_irq = pxa27x_handle_irq, 563 .handle_irq = pxa27x_handle_irq,
563 .timer = &pxa_timer, 564 .timer = &pxa_timer,
@@ -569,6 +570,7 @@ MACHINE_START(TRIZEPS4WL, "Keith und Koep Trizeps IV-WL module")
569 .atag_offset = 0x100, 570 .atag_offset = 0x100,
570 .init_machine = trizeps4_init, 571 .init_machine = trizeps4_init,
571 .map_io = trizeps4_map_io, 572 .map_io = trizeps4_map_io,
573 .nr_irqs = PXA_NR_IRQS,
572 .init_irq = pxa27x_init_irq, 574 .init_irq = pxa27x_init_irq,
573 .handle_irq = pxa27x_handle_irq, 575 .handle_irq = pxa27x_handle_irq,
574 .timer = &pxa_timer, 576 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
index 023d6ca789d..3143c3910c7 100644
--- a/arch/arm/mach-pxa/viper.c
+++ b/arch/arm/mach-pxa/viper.c
@@ -994,6 +994,7 @@ MACHINE_START(VIPER, "Arcom/Eurotech VIPER SBC")
994 /* Maintainer: Marc Zyngier <maz@misterjones.org> */ 994 /* Maintainer: Marc Zyngier <maz@misterjones.org> */
995 .atag_offset = 0x100, 995 .atag_offset = 0x100,
996 .map_io = viper_map_io, 996 .map_io = viper_map_io,
997 .nr_irqs = PXA_NR_IRQS,
997 .init_irq = viper_init_irq, 998 .init_irq = viper_init_irq,
998 .handle_irq = pxa25x_handle_irq, 999 .handle_irq = pxa25x_handle_irq,
999 .timer = &pxa_timer, 1000 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c
index 1f5cfa96f6d..c57ab636ea9 100644
--- a/arch/arm/mach-pxa/vpac270.c
+++ b/arch/arm/mach-pxa/vpac270.c
@@ -718,6 +718,7 @@ static void __init vpac270_init(void)
718MACHINE_START(VPAC270, "Voipac PXA270") 718MACHINE_START(VPAC270, "Voipac PXA270")
719 .atag_offset = 0x100, 719 .atag_offset = 0x100,
720 .map_io = pxa27x_map_io, 720 .map_io = pxa27x_map_io,
721 .nr_irqs = PXA_NR_IRQS,
721 .init_irq = pxa27x_init_irq, 722 .init_irq = pxa27x_init_irq,
722 .handle_irq = pxa27x_handle_irq, 723 .handle_irq = pxa27x_handle_irq,
723 .timer = &pxa_timer, 724 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/xcep.c b/arch/arm/mach-pxa/xcep.c
index 4bbe9a36fe7..4275713ccd1 100644
--- a/arch/arm/mach-pxa/xcep.c
+++ b/arch/arm/mach-pxa/xcep.c
@@ -182,6 +182,7 @@ MACHINE_START(XCEP, "Iskratel XCEP")
182 .atag_offset = 0x100, 182 .atag_offset = 0x100,
183 .init_machine = xcep_init, 183 .init_machine = xcep_init,
184 .map_io = pxa25x_map_io, 184 .map_io = pxa25x_map_io,
185 .nr_irqs = PXA_NR_IRQS,
185 .init_irq = pxa25x_init_irq, 186 .init_irq = pxa25x_init_irq,
186 .handle_irq = pxa25x_handle_irq, 187 .handle_irq = pxa25x_handle_irq,
187 .timer = &pxa_timer, 188 .timer = &pxa_timer,
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c
index b6476848b56..fa861997084 100644
--- a/arch/arm/mach-pxa/z2.c
+++ b/arch/arm/mach-pxa/z2.c
@@ -721,6 +721,7 @@ static void __init z2_init(void)
721MACHINE_START(ZIPIT2, "Zipit Z2") 721MACHINE_START(ZIPIT2, "Zipit Z2")
722 .atag_offset = 0x100, 722 .atag_offset = 0x100,
723 .map_io = pxa27x_map_io, 723 .map_io = pxa27x_map_io,
724 .nr_irqs = PXA_NR_IRQS,
724 .init_irq = pxa27x_init_irq, 725 .init_irq = pxa27x_init_irq,
725 .handle_irq = pxa27x_handle_irq, 726 .handle_irq = pxa27x_handle_irq,
726 .timer = &pxa_timer, 727 .timer = &pxa_timer,
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h
index 735b57aaf2d..f8f2c0ac4c0 100644
--- a/arch/arm/mach-realview/core.h
+++ b/arch/arm/mach-realview/core.h
@@ -28,21 +28,11 @@
28#include <asm/setup.h> 28#include <asm/setup.h>
29#include <asm/leds.h> 29#include <asm/leds.h>
30 30
31#define AMBA_DEVICE(name,busid,base,plat) \ 31#define APB_DEVICE(name, busid, base, plat) \
32static struct amba_device name##_device = { \ 32static AMBA_APB_DEVICE(name, busid, 0, REALVIEW_##base##_BASE, base##_IRQ, plat)
33 .dev = { \ 33
34 .coherent_dma_mask = ~0, \ 34#define AHB_DEVICE(name, busid, base, plat) \
35 .init_name = busid, \ 35static AMBA_AHB_DEVICE(name, busid, 0, REALVIEW_##base##_BASE, base##_IRQ, plat)
36 .platform_data = plat, \
37 }, \
38 .res = { \
39 .start = REALVIEW_##base##_BASE, \
40 .end = (REALVIEW_##base##_BASE) + SZ_4K - 1, \
41 .flags = IORESOURCE_MEM, \
42 }, \
43 .dma_mask = ~0, \
44 .irq = base##_IRQ, \
45}
46 36
47struct machine_desc; 37struct machine_desc;
48 38
diff --git a/arch/arm/mach-realview/include/mach/irqs-pb1176.h b/arch/arm/mach-realview/include/mach/irqs-pb1176.h
index 5c3c625e3e0..708f84156f2 100644
--- a/arch/arm/mach-realview/include/mach/irqs-pb1176.h
+++ b/arch/arm/mach-realview/include/mach/irqs-pb1176.h
@@ -40,6 +40,7 @@
40#define IRQ_DC1176_L2CC (IRQ_DC1176_GIC_START + 13) 40#define IRQ_DC1176_L2CC (IRQ_DC1176_GIC_START + 13)
41#define IRQ_DC1176_RTC (IRQ_DC1176_GIC_START + 14) 41#define IRQ_DC1176_RTC (IRQ_DC1176_GIC_START + 14)
42#define IRQ_DC1176_CLCD (IRQ_DC1176_GIC_START + 15) /* CLCD controller */ 42#define IRQ_DC1176_CLCD (IRQ_DC1176_GIC_START + 15) /* CLCD controller */
43#define IRQ_DC1176_GPIO0 (IRQ_DC1176_GIC_START + 16)
43#define IRQ_DC1176_SSP (IRQ_DC1176_GIC_START + 17) /* SSP port */ 44#define IRQ_DC1176_SSP (IRQ_DC1176_GIC_START + 17) /* SSP port */
44#define IRQ_DC1176_UART0 (IRQ_DC1176_GIC_START + 18) /* UART 0 on development chip */ 45#define IRQ_DC1176_UART0 (IRQ_DC1176_GIC_START + 18) /* UART 0 on development chip */
45#define IRQ_DC1176_UART1 (IRQ_DC1176_GIC_START + 19) /* UART 1 on development chip */ 46#define IRQ_DC1176_UART1 (IRQ_DC1176_GIC_START + 19) /* UART 1 on development chip */
@@ -73,7 +74,6 @@
73#define IRQ_PB1176_DMAC (IRQ_PB1176_GIC_START + 24) /* DMA controller */ 74#define IRQ_PB1176_DMAC (IRQ_PB1176_GIC_START + 24) /* DMA controller */
74#define IRQ_PB1176_RTC (IRQ_PB1176_GIC_START + 25) /* Real Time Clock */ 75#define IRQ_PB1176_RTC (IRQ_PB1176_GIC_START + 25) /* Real Time Clock */
75 76
76#define IRQ_PB1176_GPIO0 -1
77#define IRQ_PB1176_SCTL -1 77#define IRQ_PB1176_SCTL -1
78 78
79#define NR_GIC_PB1176 2 79#define NR_GIC_PB1176 2
diff --git a/arch/arm/mach-realview/include/mach/system.h b/arch/arm/mach-realview/include/mach/system.h
deleted file mode 100644
index 471b671159c..00000000000
--- a/arch/arm/mach-realview/include/mach/system.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * arch/arm/mach-realview/include/mach/system.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24static inline void arch_idle(void)
25{
26 /*
27 * This should do all the clock switching
28 * and wait for interrupt tricks
29 */
30 cpu_do_idle();
31}
32
33#endif
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index e6296211776..fbca43cf77e 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -140,63 +140,63 @@ static struct pl022_ssp_controller ssp0_plat_data = {
140/* 140/*
141 * These devices are connected via the core APB bridge 141 * These devices are connected via the core APB bridge
142 */ 142 */
143#define GPIO2_IRQ { IRQ_EB_GPIO2, NO_IRQ } 143#define GPIO2_IRQ { IRQ_EB_GPIO2 }
144#define GPIO3_IRQ { IRQ_EB_GPIO3, NO_IRQ } 144#define GPIO3_IRQ { IRQ_EB_GPIO3 }
145 145
146#define AACI_IRQ { IRQ_EB_AACI, NO_IRQ } 146#define AACI_IRQ { IRQ_EB_AACI }
147#define MMCI0_IRQ { IRQ_EB_MMCI0A, IRQ_EB_MMCI0B } 147#define MMCI0_IRQ { IRQ_EB_MMCI0A, IRQ_EB_MMCI0B }
148#define KMI0_IRQ { IRQ_EB_KMI0, NO_IRQ } 148#define KMI0_IRQ { IRQ_EB_KMI0 }
149#define KMI1_IRQ { IRQ_EB_KMI1, NO_IRQ } 149#define KMI1_IRQ { IRQ_EB_KMI1 }
150 150
151/* 151/*
152 * These devices are connected directly to the multi-layer AHB switch 152 * These devices are connected directly to the multi-layer AHB switch
153 */ 153 */
154#define EB_SMC_IRQ { NO_IRQ, NO_IRQ } 154#define EB_SMC_IRQ { }
155#define MPMC_IRQ { NO_IRQ, NO_IRQ } 155#define MPMC_IRQ { }
156#define EB_CLCD_IRQ { IRQ_EB_CLCD, NO_IRQ } 156#define EB_CLCD_IRQ { IRQ_EB_CLCD }
157#define DMAC_IRQ { IRQ_EB_DMA, NO_IRQ } 157#define DMAC_IRQ { IRQ_EB_DMA }
158 158
159/* 159/*
160 * These devices are connected via the core APB bridge 160 * These devices are connected via the core APB bridge
161 */ 161 */
162#define SCTL_IRQ { NO_IRQ, NO_IRQ } 162#define SCTL_IRQ { }
163#define EB_WATCHDOG_IRQ { IRQ_EB_WDOG, NO_IRQ } 163#define EB_WATCHDOG_IRQ { IRQ_EB_WDOG }
164#define EB_GPIO0_IRQ { IRQ_EB_GPIO0, NO_IRQ } 164#define EB_GPIO0_IRQ { IRQ_EB_GPIO0 }
165#define GPIO1_IRQ { IRQ_EB_GPIO1, NO_IRQ } 165#define GPIO1_IRQ { IRQ_EB_GPIO1 }
166#define EB_RTC_IRQ { IRQ_EB_RTC, NO_IRQ } 166#define EB_RTC_IRQ { IRQ_EB_RTC }
167 167
168/* 168/*
169 * These devices are connected via the DMA APB bridge 169 * These devices are connected via the DMA APB bridge
170 */ 170 */
171#define SCI_IRQ { IRQ_EB_SCI, NO_IRQ } 171#define SCI_IRQ { IRQ_EB_SCI }
172#define EB_UART0_IRQ { IRQ_EB_UART0, NO_IRQ } 172#define EB_UART0_IRQ { IRQ_EB_UART0 }
173#define EB_UART1_IRQ { IRQ_EB_UART1, NO_IRQ } 173#define EB_UART1_IRQ { IRQ_EB_UART1 }
174#define EB_UART2_IRQ { IRQ_EB_UART2, NO_IRQ } 174#define EB_UART2_IRQ { IRQ_EB_UART2 }
175#define EB_UART3_IRQ { IRQ_EB_UART3, NO_IRQ } 175#define EB_UART3_IRQ { IRQ_EB_UART3 }
176#define EB_SSP_IRQ { IRQ_EB_SSP, NO_IRQ } 176#define EB_SSP_IRQ { IRQ_EB_SSP }
177 177
178/* FPGA Primecells */ 178/* FPGA Primecells */
179AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); 179APB_DEVICE(aaci, "fpga:aaci", AACI, NULL);
180AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data); 180APB_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data);
181AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL); 181APB_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL);
182AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL); 182APB_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL);
183AMBA_DEVICE(uart3, "fpga:uart3", EB_UART3, NULL); 183APB_DEVICE(uart3, "fpga:uart3", EB_UART3, NULL);
184 184
185/* DevChip Primecells */ 185/* DevChip Primecells */
186AMBA_DEVICE(smc, "dev:smc", EB_SMC, NULL); 186AHB_DEVICE(smc, "dev:smc", EB_SMC, NULL);
187AMBA_DEVICE(clcd, "dev:clcd", EB_CLCD, &clcd_plat_data); 187AHB_DEVICE(clcd, "dev:clcd", EB_CLCD, &clcd_plat_data);
188AMBA_DEVICE(dmac, "dev:dmac", DMAC, NULL); 188AHB_DEVICE(dmac, "dev:dmac", DMAC, NULL);
189AMBA_DEVICE(sctl, "dev:sctl", SCTL, NULL); 189AHB_DEVICE(sctl, "dev:sctl", SCTL, NULL);
190AMBA_DEVICE(wdog, "dev:wdog", EB_WATCHDOG, NULL); 190APB_DEVICE(wdog, "dev:wdog", EB_WATCHDOG, NULL);
191AMBA_DEVICE(gpio0, "dev:gpio0", EB_GPIO0, &gpio0_plat_data); 191APB_DEVICE(gpio0, "dev:gpio0", EB_GPIO0, &gpio0_plat_data);
192AMBA_DEVICE(gpio1, "dev:gpio1", GPIO1, &gpio1_plat_data); 192APB_DEVICE(gpio1, "dev:gpio1", GPIO1, &gpio1_plat_data);
193AMBA_DEVICE(gpio2, "dev:gpio2", GPIO2, &gpio2_plat_data); 193APB_DEVICE(gpio2, "dev:gpio2", GPIO2, &gpio2_plat_data);
194AMBA_DEVICE(rtc, "dev:rtc", EB_RTC, NULL); 194APB_DEVICE(rtc, "dev:rtc", EB_RTC, NULL);
195AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL); 195APB_DEVICE(sci0, "dev:sci0", SCI, NULL);
196AMBA_DEVICE(uart0, "dev:uart0", EB_UART0, NULL); 196APB_DEVICE(uart0, "dev:uart0", EB_UART0, NULL);
197AMBA_DEVICE(uart1, "dev:uart1", EB_UART1, NULL); 197APB_DEVICE(uart1, "dev:uart1", EB_UART1, NULL);
198AMBA_DEVICE(uart2, "dev:uart2", EB_UART2, NULL); 198APB_DEVICE(uart2, "dev:uart2", EB_UART2, NULL);
199AMBA_DEVICE(ssp0, "dev:ssp0", EB_SSP, &ssp0_plat_data); 199APB_DEVICE(ssp0, "dev:ssp0", EB_SSP, &ssp0_plat_data);
200 200
201static struct amba_device *amba_devs[] __initdata = { 201static struct amba_device *amba_devs[] __initdata = {
202 &dmac_device, 202 &dmac_device,
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
index e4abe94fb11..b1d7cafa1a6 100644
--- a/arch/arm/mach-realview/realview_pb1176.c
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -132,50 +132,50 @@ static struct pl022_ssp_controller ssp0_plat_data = {
132/* 132/*
133 * RealView PB1176 AMBA devices 133 * RealView PB1176 AMBA devices
134 */ 134 */
135#define GPIO2_IRQ { IRQ_PB1176_GPIO2, NO_IRQ } 135#define GPIO2_IRQ { IRQ_PB1176_GPIO2 }
136#define GPIO3_IRQ { IRQ_PB1176_GPIO3, NO_IRQ } 136#define GPIO3_IRQ { IRQ_PB1176_GPIO3 }
137#define AACI_IRQ { IRQ_PB1176_AACI, NO_IRQ } 137#define AACI_IRQ { IRQ_PB1176_AACI }
138#define MMCI0_IRQ { IRQ_PB1176_MMCI0A, IRQ_PB1176_MMCI0B } 138#define MMCI0_IRQ { IRQ_PB1176_MMCI0A, IRQ_PB1176_MMCI0B }
139#define KMI0_IRQ { IRQ_PB1176_KMI0, NO_IRQ } 139#define KMI0_IRQ { IRQ_PB1176_KMI0 }
140#define KMI1_IRQ { IRQ_PB1176_KMI1, NO_IRQ } 140#define KMI1_IRQ { IRQ_PB1176_KMI1 }
141#define PB1176_SMC_IRQ { NO_IRQ, NO_IRQ } 141#define PB1176_SMC_IRQ { }
142#define MPMC_IRQ { NO_IRQ, NO_IRQ } 142#define MPMC_IRQ { }
143#define PB1176_CLCD_IRQ { IRQ_DC1176_CLCD, NO_IRQ } 143#define PB1176_CLCD_IRQ { IRQ_DC1176_CLCD }
144#define SCTL_IRQ { NO_IRQ, NO_IRQ } 144#define SCTL_IRQ { }
145#define PB1176_WATCHDOG_IRQ { IRQ_DC1176_WATCHDOG, NO_IRQ } 145#define PB1176_WATCHDOG_IRQ { IRQ_DC1176_WATCHDOG }
146#define PB1176_GPIO0_IRQ { IRQ_PB1176_GPIO0, NO_IRQ } 146#define PB1176_GPIO0_IRQ { IRQ_DC1176_GPIO0 }
147#define GPIO1_IRQ { IRQ_PB1176_GPIO1, NO_IRQ } 147#define GPIO1_IRQ { IRQ_PB1176_GPIO1 }
148#define PB1176_RTC_IRQ { IRQ_DC1176_RTC, NO_IRQ } 148#define PB1176_RTC_IRQ { IRQ_DC1176_RTC }
149#define SCI_IRQ { IRQ_PB1176_SCI, NO_IRQ } 149#define SCI_IRQ { IRQ_PB1176_SCI }
150#define PB1176_UART0_IRQ { IRQ_DC1176_UART0, NO_IRQ } 150#define PB1176_UART0_IRQ { IRQ_DC1176_UART0 }
151#define PB1176_UART1_IRQ { IRQ_DC1176_UART1, NO_IRQ } 151#define PB1176_UART1_IRQ { IRQ_DC1176_UART1 }
152#define PB1176_UART2_IRQ { IRQ_DC1176_UART2, NO_IRQ } 152#define PB1176_UART2_IRQ { IRQ_DC1176_UART2 }
153#define PB1176_UART3_IRQ { IRQ_DC1176_UART3, NO_IRQ } 153#define PB1176_UART3_IRQ { IRQ_DC1176_UART3 }
154#define PB1176_UART4_IRQ { IRQ_PB1176_UART4, NO_IRQ } 154#define PB1176_UART4_IRQ { IRQ_PB1176_UART4 }
155#define PB1176_SSP_IRQ { IRQ_DC1176_SSP, NO_IRQ } 155#define PB1176_SSP_IRQ { IRQ_DC1176_SSP }
156 156
157/* FPGA Primecells */ 157/* FPGA Primecells */
158AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); 158APB_DEVICE(aaci, "fpga:aaci", AACI, NULL);
159AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data); 159APB_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data);
160AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL); 160APB_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL);
161AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL); 161APB_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL);
162AMBA_DEVICE(uart4, "fpga:uart4", PB1176_UART4, NULL); 162APB_DEVICE(uart4, "fpga:uart4", PB1176_UART4, NULL);
163 163
164/* DevChip Primecells */ 164/* DevChip Primecells */
165AMBA_DEVICE(smc, "dev:smc", PB1176_SMC, NULL); 165AHB_DEVICE(smc, "dev:smc", PB1176_SMC, NULL);
166AMBA_DEVICE(sctl, "dev:sctl", SCTL, NULL); 166AHB_DEVICE(sctl, "dev:sctl", SCTL, NULL);
167AMBA_DEVICE(wdog, "dev:wdog", PB1176_WATCHDOG, NULL); 167APB_DEVICE(wdog, "dev:wdog", PB1176_WATCHDOG, NULL);
168AMBA_DEVICE(gpio0, "dev:gpio0", PB1176_GPIO0, &gpio0_plat_data); 168APB_DEVICE(gpio0, "dev:gpio0", PB1176_GPIO0, &gpio0_plat_data);
169AMBA_DEVICE(gpio1, "dev:gpio1", GPIO1, &gpio1_plat_data); 169APB_DEVICE(gpio1, "dev:gpio1", GPIO1, &gpio1_plat_data);
170AMBA_DEVICE(gpio2, "dev:gpio2", GPIO2, &gpio2_plat_data); 170APB_DEVICE(gpio2, "dev:gpio2", GPIO2, &gpio2_plat_data);
171AMBA_DEVICE(rtc, "dev:rtc", PB1176_RTC, NULL); 171APB_DEVICE(rtc, "dev:rtc", PB1176_RTC, NULL);
172AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL); 172APB_DEVICE(sci0, "dev:sci0", SCI, NULL);
173AMBA_DEVICE(uart0, "dev:uart0", PB1176_UART0, NULL); 173APB_DEVICE(uart0, "dev:uart0", PB1176_UART0, NULL);
174AMBA_DEVICE(uart1, "dev:uart1", PB1176_UART1, NULL); 174APB_DEVICE(uart1, "dev:uart1", PB1176_UART1, NULL);
175AMBA_DEVICE(uart2, "dev:uart2", PB1176_UART2, NULL); 175APB_DEVICE(uart2, "dev:uart2", PB1176_UART2, NULL);
176AMBA_DEVICE(uart3, "dev:uart3", PB1176_UART3, NULL); 176APB_DEVICE(uart3, "dev:uart3", PB1176_UART3, NULL);
177AMBA_DEVICE(ssp0, "dev:ssp0", PB1176_SSP, &ssp0_plat_data); 177APB_DEVICE(ssp0, "dev:ssp0", PB1176_SSP, &ssp0_plat_data);
178AMBA_DEVICE(clcd, "dev:clcd", PB1176_CLCD, &clcd_plat_data); 178AHB_DEVICE(clcd, "dev:clcd", PB1176_CLCD, &clcd_plat_data);
179 179
180static struct amba_device *amba_devs[] __initdata = { 180static struct amba_device *amba_devs[] __initdata = {
181 &uart0_device, 181 &uart0_device,
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index 127a3fd42ab..43b82bc9ca8 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -132,52 +132,52 @@ static struct pl022_ssp_controller ssp0_plat_data = {
132 * RealView PB11MPCore AMBA devices 132 * RealView PB11MPCore AMBA devices
133 */ 133 */
134 134
135#define GPIO2_IRQ { IRQ_PB11MP_GPIO2, NO_IRQ } 135#define GPIO2_IRQ { IRQ_PB11MP_GPIO2 }
136#define GPIO3_IRQ { IRQ_PB11MP_GPIO3, NO_IRQ } 136#define GPIO3_IRQ { IRQ_PB11MP_GPIO3 }
137#define AACI_IRQ { IRQ_TC11MP_AACI, NO_IRQ } 137#define AACI_IRQ { IRQ_TC11MP_AACI }
138#define MMCI0_IRQ { IRQ_TC11MP_MMCI0A, IRQ_TC11MP_MMCI0B } 138#define MMCI0_IRQ { IRQ_TC11MP_MMCI0A, IRQ_TC11MP_MMCI0B }
139#define KMI0_IRQ { IRQ_TC11MP_KMI0, NO_IRQ } 139#define KMI0_IRQ { IRQ_TC11MP_KMI0 }
140#define KMI1_IRQ { IRQ_TC11MP_KMI1, NO_IRQ } 140#define KMI1_IRQ { IRQ_TC11MP_KMI1 }
141#define PB11MP_SMC_IRQ { NO_IRQ, NO_IRQ } 141#define PB11MP_SMC_IRQ { }
142#define MPMC_IRQ { NO_IRQ, NO_IRQ } 142#define MPMC_IRQ { }
143#define PB11MP_CLCD_IRQ { IRQ_PB11MP_CLCD, NO_IRQ } 143#define PB11MP_CLCD_IRQ { IRQ_PB11MP_CLCD }
144#define DMAC_IRQ { IRQ_PB11MP_DMAC, NO_IRQ } 144#define DMAC_IRQ { IRQ_PB11MP_DMAC }
145#define SCTL_IRQ { NO_IRQ, NO_IRQ } 145#define SCTL_IRQ { }
146#define PB11MP_WATCHDOG_IRQ { IRQ_PB11MP_WATCHDOG, NO_IRQ } 146#define PB11MP_WATCHDOG_IRQ { IRQ_PB11MP_WATCHDOG }
147#define PB11MP_GPIO0_IRQ { IRQ_PB11MP_GPIO0, NO_IRQ } 147#define PB11MP_GPIO0_IRQ { IRQ_PB11MP_GPIO0 }
148#define GPIO1_IRQ { IRQ_PB11MP_GPIO1, NO_IRQ } 148#define GPIO1_IRQ { IRQ_PB11MP_GPIO1 }
149#define PB11MP_RTC_IRQ { IRQ_TC11MP_RTC, NO_IRQ } 149#define PB11MP_RTC_IRQ { IRQ_TC11MP_RTC }
150#define SCI_IRQ { IRQ_PB11MP_SCI, NO_IRQ } 150#define SCI_IRQ { IRQ_PB11MP_SCI }
151#define PB11MP_UART0_IRQ { IRQ_TC11MP_UART0, NO_IRQ } 151#define PB11MP_UART0_IRQ { IRQ_TC11MP_UART0 }
152#define PB11MP_UART1_IRQ { IRQ_TC11MP_UART1, NO_IRQ } 152#define PB11MP_UART1_IRQ { IRQ_TC11MP_UART1 }
153#define PB11MP_UART2_IRQ { IRQ_PB11MP_UART2, NO_IRQ } 153#define PB11MP_UART2_IRQ { IRQ_PB11MP_UART2 }
154#define PB11MP_UART3_IRQ { IRQ_PB11MP_UART3, NO_IRQ } 154#define PB11MP_UART3_IRQ { IRQ_PB11MP_UART3 }
155#define PB11MP_SSP_IRQ { IRQ_PB11MP_SSP, NO_IRQ } 155#define PB11MP_SSP_IRQ { IRQ_PB11MP_SSP }
156 156
157/* FPGA Primecells */ 157/* FPGA Primecells */
158AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); 158APB_DEVICE(aaci, "fpga:aaci", AACI, NULL);
159AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data); 159APB_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data);
160AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL); 160APB_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL);
161AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL); 161APB_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL);
162AMBA_DEVICE(uart3, "fpga:uart3", PB11MP_UART3, NULL); 162APB_DEVICE(uart3, "fpga:uart3", PB11MP_UART3, NULL);
163 163
164/* DevChip Primecells */ 164/* DevChip Primecells */
165AMBA_DEVICE(smc, "dev:smc", PB11MP_SMC, NULL); 165AHB_DEVICE(smc, "dev:smc", PB11MP_SMC, NULL);
166AMBA_DEVICE(sctl, "dev:sctl", SCTL, NULL); 166AHB_DEVICE(sctl, "dev:sctl", SCTL, NULL);
167AMBA_DEVICE(wdog, "dev:wdog", PB11MP_WATCHDOG, NULL); 167APB_DEVICE(wdog, "dev:wdog", PB11MP_WATCHDOG, NULL);
168AMBA_DEVICE(gpio0, "dev:gpio0", PB11MP_GPIO0, &gpio0_plat_data); 168APB_DEVICE(gpio0, "dev:gpio0", PB11MP_GPIO0, &gpio0_plat_data);
169AMBA_DEVICE(gpio1, "dev:gpio1", GPIO1, &gpio1_plat_data); 169APB_DEVICE(gpio1, "dev:gpio1", GPIO1, &gpio1_plat_data);
170AMBA_DEVICE(gpio2, "dev:gpio2", GPIO2, &gpio2_plat_data); 170APB_DEVICE(gpio2, "dev:gpio2", GPIO2, &gpio2_plat_data);
171AMBA_DEVICE(rtc, "dev:rtc", PB11MP_RTC, NULL); 171APB_DEVICE(rtc, "dev:rtc", PB11MP_RTC, NULL);
172AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL); 172APB_DEVICE(sci0, "dev:sci0", SCI, NULL);
173AMBA_DEVICE(uart0, "dev:uart0", PB11MP_UART0, NULL); 173APB_DEVICE(uart0, "dev:uart0", PB11MP_UART0, NULL);
174AMBA_DEVICE(uart1, "dev:uart1", PB11MP_UART1, NULL); 174APB_DEVICE(uart1, "dev:uart1", PB11MP_UART1, NULL);
175AMBA_DEVICE(uart2, "dev:uart2", PB11MP_UART2, NULL); 175APB_DEVICE(uart2, "dev:uart2", PB11MP_UART2, NULL);
176AMBA_DEVICE(ssp0, "dev:ssp0", PB11MP_SSP, &ssp0_plat_data); 176APB_DEVICE(ssp0, "dev:ssp0", PB11MP_SSP, &ssp0_plat_data);
177 177
178/* Primecells on the NEC ISSP chip */ 178/* Primecells on the NEC ISSP chip */
179AMBA_DEVICE(clcd, "issp:clcd", PB11MP_CLCD, &clcd_plat_data); 179AHB_DEVICE(clcd, "issp:clcd", PB11MP_CLCD, &clcd_plat_data);
180AMBA_DEVICE(dmac, "issp:dmac", DMAC, NULL); 180AHB_DEVICE(dmac, "issp:dmac", DMAC, NULL);
181 181
182static struct amba_device *amba_devs[] __initdata = { 182static struct amba_device *amba_devs[] __initdata = {
183 &dmac_device, 183 &dmac_device,
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c
index 25b2e59296f..59650174e6e 100644
--- a/arch/arm/mach-realview/realview_pba8.c
+++ b/arch/arm/mach-realview/realview_pba8.c
@@ -122,52 +122,52 @@ static struct pl022_ssp_controller ssp0_plat_data = {
122 * RealView PBA8Core AMBA devices 122 * RealView PBA8Core AMBA devices
123 */ 123 */
124 124
125#define GPIO2_IRQ { IRQ_PBA8_GPIO2, NO_IRQ } 125#define GPIO2_IRQ { IRQ_PBA8_GPIO2 }
126#define GPIO3_IRQ { IRQ_PBA8_GPIO3, NO_IRQ } 126#define GPIO3_IRQ { IRQ_PBA8_GPIO3 }
127#define AACI_IRQ { IRQ_PBA8_AACI, NO_IRQ } 127#define AACI_IRQ { IRQ_PBA8_AACI }
128#define MMCI0_IRQ { IRQ_PBA8_MMCI0A, IRQ_PBA8_MMCI0B } 128#define MMCI0_IRQ { IRQ_PBA8_MMCI0A, IRQ_PBA8_MMCI0B }
129#define KMI0_IRQ { IRQ_PBA8_KMI0, NO_IRQ } 129#define KMI0_IRQ { IRQ_PBA8_KMI0 }
130#define KMI1_IRQ { IRQ_PBA8_KMI1, NO_IRQ } 130#define KMI1_IRQ { IRQ_PBA8_KMI1 }
131#define PBA8_SMC_IRQ { NO_IRQ, NO_IRQ } 131#define PBA8_SMC_IRQ { }
132#define MPMC_IRQ { NO_IRQ, NO_IRQ } 132#define MPMC_IRQ { }
133#define PBA8_CLCD_IRQ { IRQ_PBA8_CLCD, NO_IRQ } 133#define PBA8_CLCD_IRQ { IRQ_PBA8_CLCD }
134#define DMAC_IRQ { IRQ_PBA8_DMAC, NO_IRQ } 134#define DMAC_IRQ { IRQ_PBA8_DMAC }
135#define SCTL_IRQ { NO_IRQ, NO_IRQ } 135#define SCTL_IRQ { }
136#define PBA8_WATCHDOG_IRQ { IRQ_PBA8_WATCHDOG, NO_IRQ } 136#define PBA8_WATCHDOG_IRQ { IRQ_PBA8_WATCHDOG }
137#define PBA8_GPIO0_IRQ { IRQ_PBA8_GPIO0, NO_IRQ } 137#define PBA8_GPIO0_IRQ { IRQ_PBA8_GPIO0 }
138#define GPIO1_IRQ { IRQ_PBA8_GPIO1, NO_IRQ } 138#define GPIO1_IRQ { IRQ_PBA8_GPIO1 }
139#define PBA8_RTC_IRQ { IRQ_PBA8_RTC, NO_IRQ } 139#define PBA8_RTC_IRQ { IRQ_PBA8_RTC }
140#define SCI_IRQ { IRQ_PBA8_SCI, NO_IRQ } 140#define SCI_IRQ { IRQ_PBA8_SCI }
141#define PBA8_UART0_IRQ { IRQ_PBA8_UART0, NO_IRQ } 141#define PBA8_UART0_IRQ { IRQ_PBA8_UART0 }
142#define PBA8_UART1_IRQ { IRQ_PBA8_UART1, NO_IRQ } 142#define PBA8_UART1_IRQ { IRQ_PBA8_UART1 }
143#define PBA8_UART2_IRQ { IRQ_PBA8_UART2, NO_IRQ } 143#define PBA8_UART2_IRQ { IRQ_PBA8_UART2 }
144#define PBA8_UART3_IRQ { IRQ_PBA8_UART3, NO_IRQ } 144#define PBA8_UART3_IRQ { IRQ_PBA8_UART3 }
145#define PBA8_SSP_IRQ { IRQ_PBA8_SSP, NO_IRQ } 145#define PBA8_SSP_IRQ { IRQ_PBA8_SSP }
146 146
147/* FPGA Primecells */ 147/* FPGA Primecells */
148AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); 148APB_DEVICE(aaci, "fpga:aaci", AACI, NULL);
149AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data); 149APB_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data);
150AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL); 150APB_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL);
151AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL); 151APB_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL);
152AMBA_DEVICE(uart3, "fpga:uart3", PBA8_UART3, NULL); 152APB_DEVICE(uart3, "fpga:uart3", PBA8_UART3, NULL);
153 153
154/* DevChip Primecells */ 154/* DevChip Primecells */
155AMBA_DEVICE(smc, "dev:smc", PBA8_SMC, NULL); 155AHB_DEVICE(smc, "dev:smc", PBA8_SMC, NULL);
156AMBA_DEVICE(sctl, "dev:sctl", SCTL, NULL); 156AHB_DEVICE(sctl, "dev:sctl", SCTL, NULL);
157AMBA_DEVICE(wdog, "dev:wdog", PBA8_WATCHDOG, NULL); 157APB_DEVICE(wdog, "dev:wdog", PBA8_WATCHDOG, NULL);
158AMBA_DEVICE(gpio0, "dev:gpio0", PBA8_GPIO0, &gpio0_plat_data); 158APB_DEVICE(gpio0, "dev:gpio0", PBA8_GPIO0, &gpio0_plat_data);
159AMBA_DEVICE(gpio1, "dev:gpio1", GPIO1, &gpio1_plat_data); 159APB_DEVICE(gpio1, "dev:gpio1", GPIO1, &gpio1_plat_data);
160AMBA_DEVICE(gpio2, "dev:gpio2", GPIO2, &gpio2_plat_data); 160APB_DEVICE(gpio2, "dev:gpio2", GPIO2, &gpio2_plat_data);
161AMBA_DEVICE(rtc, "dev:rtc", PBA8_RTC, NULL); 161APB_DEVICE(rtc, "dev:rtc", PBA8_RTC, NULL);
162AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL); 162APB_DEVICE(sci0, "dev:sci0", SCI, NULL);
163AMBA_DEVICE(uart0, "dev:uart0", PBA8_UART0, NULL); 163APB_DEVICE(uart0, "dev:uart0", PBA8_UART0, NULL);
164AMBA_DEVICE(uart1, "dev:uart1", PBA8_UART1, NULL); 164APB_DEVICE(uart1, "dev:uart1", PBA8_UART1, NULL);
165AMBA_DEVICE(uart2, "dev:uart2", PBA8_UART2, NULL); 165APB_DEVICE(uart2, "dev:uart2", PBA8_UART2, NULL);
166AMBA_DEVICE(ssp0, "dev:ssp0", PBA8_SSP, &ssp0_plat_data); 166APB_DEVICE(ssp0, "dev:ssp0", PBA8_SSP, &ssp0_plat_data);
167 167
168/* Primecells on the NEC ISSP chip */ 168/* Primecells on the NEC ISSP chip */
169AMBA_DEVICE(clcd, "issp:clcd", PBA8_CLCD, &clcd_plat_data); 169AHB_DEVICE(clcd, "issp:clcd", PBA8_CLCD, &clcd_plat_data);
170AMBA_DEVICE(dmac, "issp:dmac", DMAC, NULL); 170AHB_DEVICE(dmac, "issp:dmac", DMAC, NULL);
171 171
172static struct amba_device *amba_devs[] __initdata = { 172static struct amba_device *amba_devs[] __initdata = {
173 &dmac_device, 173 &dmac_device,
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index ac715645b86..1cd9956f587 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -144,52 +144,52 @@ static struct pl022_ssp_controller ssp0_plat_data = {
144 * RealView PBXCore AMBA devices 144 * RealView PBXCore AMBA devices
145 */ 145 */
146 146
147#define GPIO2_IRQ { IRQ_PBX_GPIO2, NO_IRQ } 147#define GPIO2_IRQ { IRQ_PBX_GPIO2 }
148#define GPIO3_IRQ { IRQ_PBX_GPIO3, NO_IRQ } 148#define GPIO3_IRQ { IRQ_PBX_GPIO3 }
149#define AACI_IRQ { IRQ_PBX_AACI, NO_IRQ } 149#define AACI_IRQ { IRQ_PBX_AACI }
150#define MMCI0_IRQ { IRQ_PBX_MMCI0A, IRQ_PBX_MMCI0B } 150#define MMCI0_IRQ { IRQ_PBX_MMCI0A, IRQ_PBX_MMCI0B }
151#define KMI0_IRQ { IRQ_PBX_KMI0, NO_IRQ } 151#define KMI0_IRQ { IRQ_PBX_KMI0 }
152#define KMI1_IRQ { IRQ_PBX_KMI1, NO_IRQ } 152#define KMI1_IRQ { IRQ_PBX_KMI1 }
153#define PBX_SMC_IRQ { NO_IRQ, NO_IRQ } 153#define PBX_SMC_IRQ { }
154#define MPMC_IRQ { NO_IRQ, NO_IRQ } 154#define MPMC_IRQ { }
155#define PBX_CLCD_IRQ { IRQ_PBX_CLCD, NO_IRQ } 155#define PBX_CLCD_IRQ { IRQ_PBX_CLCD }
156#define DMAC_IRQ { IRQ_PBX_DMAC, NO_IRQ } 156#define DMAC_IRQ { IRQ_PBX_DMAC }
157#define SCTL_IRQ { NO_IRQ, NO_IRQ } 157#define SCTL_IRQ { }
158#define PBX_WATCHDOG_IRQ { IRQ_PBX_WATCHDOG, NO_IRQ } 158#define PBX_WATCHDOG_IRQ { IRQ_PBX_WATCHDOG }
159#define PBX_GPIO0_IRQ { IRQ_PBX_GPIO0, NO_IRQ } 159#define PBX_GPIO0_IRQ { IRQ_PBX_GPIO0 }
160#define GPIO1_IRQ { IRQ_PBX_GPIO1, NO_IRQ } 160#define GPIO1_IRQ { IRQ_PBX_GPIO1 }
161#define PBX_RTC_IRQ { IRQ_PBX_RTC, NO_IRQ } 161#define PBX_RTC_IRQ { IRQ_PBX_RTC }
162#define SCI_IRQ { IRQ_PBX_SCI, NO_IRQ } 162#define SCI_IRQ { IRQ_PBX_SCI }
163#define PBX_UART0_IRQ { IRQ_PBX_UART0, NO_IRQ } 163#define PBX_UART0_IRQ { IRQ_PBX_UART0 }
164#define PBX_UART1_IRQ { IRQ_PBX_UART1, NO_IRQ } 164#define PBX_UART1_IRQ { IRQ_PBX_UART1 }
165#define PBX_UART2_IRQ { IRQ_PBX_UART2, NO_IRQ } 165#define PBX_UART2_IRQ { IRQ_PBX_UART2 }
166#define PBX_UART3_IRQ { IRQ_PBX_UART3, NO_IRQ } 166#define PBX_UART3_IRQ { IRQ_PBX_UART3 }
167#define PBX_SSP_IRQ { IRQ_PBX_SSP, NO_IRQ } 167#define PBX_SSP_IRQ { IRQ_PBX_SSP }
168 168
169/* FPGA Primecells */ 169/* FPGA Primecells */
170AMBA_DEVICE(aaci, "fpga:aaci", AACI, NULL); 170APB_DEVICE(aaci, "fpga:aaci", AACI, NULL);
171AMBA_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data); 171APB_DEVICE(mmc0, "fpga:mmc0", MMCI0, &realview_mmc0_plat_data);
172AMBA_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL); 172APB_DEVICE(kmi0, "fpga:kmi0", KMI0, NULL);
173AMBA_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL); 173APB_DEVICE(kmi1, "fpga:kmi1", KMI1, NULL);
174AMBA_DEVICE(uart3, "fpga:uart3", PBX_UART3, NULL); 174APB_DEVICE(uart3, "fpga:uart3", PBX_UART3, NULL);
175 175
176/* DevChip Primecells */ 176/* DevChip Primecells */
177AMBA_DEVICE(smc, "dev:smc", PBX_SMC, NULL); 177AHB_DEVICE(smc, "dev:smc", PBX_SMC, NULL);
178AMBA_DEVICE(sctl, "dev:sctl", SCTL, NULL); 178AHB_DEVICE(sctl, "dev:sctl", SCTL, NULL);
179AMBA_DEVICE(wdog, "dev:wdog", PBX_WATCHDOG, NULL); 179APB_DEVICE(wdog, "dev:wdog", PBX_WATCHDOG, NULL);
180AMBA_DEVICE(gpio0, "dev:gpio0", PBX_GPIO0, &gpio0_plat_data); 180APB_DEVICE(gpio0, "dev:gpio0", PBX_GPIO0, &gpio0_plat_data);
181AMBA_DEVICE(gpio1, "dev:gpio1", GPIO1, &gpio1_plat_data); 181APB_DEVICE(gpio1, "dev:gpio1", GPIO1, &gpio1_plat_data);
182AMBA_DEVICE(gpio2, "dev:gpio2", GPIO2, &gpio2_plat_data); 182APB_DEVICE(gpio2, "dev:gpio2", GPIO2, &gpio2_plat_data);
183AMBA_DEVICE(rtc, "dev:rtc", PBX_RTC, NULL); 183APB_DEVICE(rtc, "dev:rtc", PBX_RTC, NULL);
184AMBA_DEVICE(sci0, "dev:sci0", SCI, NULL); 184APB_DEVICE(sci0, "dev:sci0", SCI, NULL);
185AMBA_DEVICE(uart0, "dev:uart0", PBX_UART0, NULL); 185APB_DEVICE(uart0, "dev:uart0", PBX_UART0, NULL);
186AMBA_DEVICE(uart1, "dev:uart1", PBX_UART1, NULL); 186APB_DEVICE(uart1, "dev:uart1", PBX_UART1, NULL);
187AMBA_DEVICE(uart2, "dev:uart2", PBX_UART2, NULL); 187APB_DEVICE(uart2, "dev:uart2", PBX_UART2, NULL);
188AMBA_DEVICE(ssp0, "dev:ssp0", PBX_SSP, &ssp0_plat_data); 188APB_DEVICE(ssp0, "dev:ssp0", PBX_SSP, &ssp0_plat_data);
189 189
190/* Primecells on the NEC ISSP chip */ 190/* Primecells on the NEC ISSP chip */
191AMBA_DEVICE(clcd, "issp:clcd", PBX_CLCD, &clcd_plat_data); 191AHB_DEVICE(clcd, "issp:clcd", PBX_CLCD, &clcd_plat_data);
192AMBA_DEVICE(dmac, "issp:dmac", DMAC, NULL); 192AHB_DEVICE(dmac, "issp:dmac", DMAC, NULL);
193 193
194static struct amba_device *amba_devs[] __initdata = { 194static struct amba_device *amba_devs[] __initdata = {
195 &dmac_device, 195 &dmac_device,
diff --git a/arch/arm/mach-rpc/include/mach/system.h b/arch/arm/mach-rpc/include/mach/system.h
deleted file mode 100644
index 359bab94b6a..00000000000
--- a/arch/arm/mach-rpc/include/mach/system.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * arch/arm/mach-rpc/include/mach/system.h
3 *
4 * Copyright (C) 1996-1999 Russell King.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10static inline void arch_idle(void)
11{
12 cpu_do_idle();
13}
diff --git a/arch/arm/mach-s3c2410/include/mach/system.h b/arch/arm/mach-s3c2410/include/mach/system.h
deleted file mode 100644
index 5e215c1a5c8..00000000000
--- a/arch/arm/mach-s3c2410/include/mach/system.h
+++ /dev/null
@@ -1,54 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/system.h
2 *
3 * Copyright (c) 2003 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * S3C2410 - System function defines and includes
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#include <linux/io.h>
14#include <mach/hardware.h>
15
16#include <mach/map.h>
17#include <mach/idle.h>
18
19#include <mach/regs-clock.h>
20
21void (*s3c24xx_idle)(void);
22
23void s3c24xx_default_idle(void)
24{
25 unsigned long tmp;
26 int i;
27
28 /* idle the system by using the idle mode which will wait for an
29 * interrupt to happen before restarting the system.
30 */
31
32 /* Warning: going into idle state upsets jtag scanning */
33
34 __raw_writel(__raw_readl(S3C2410_CLKCON) | S3C2410_CLKCON_IDLE,
35 S3C2410_CLKCON);
36
37 /* the samsung port seems to do a loop and then unset idle.. */
38 for (i = 0; i < 50; i++) {
39 tmp += __raw_readl(S3C2410_CLKCON); /* ensure loop not optimised out */
40 }
41
42 /* this bit is not cleared on re-start... */
43
44 __raw_writel(__raw_readl(S3C2410_CLKCON) & ~S3C2410_CLKCON_IDLE,
45 S3C2410_CLKCON);
46}
47
48static void arch_idle(void)
49{
50 if (s3c24xx_idle != NULL)
51 (s3c24xx_idle)();
52 else
53 s3c24xx_default_idle();
54}
diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c
index aff6e85a97c..c6eac987109 100644
--- a/arch/arm/mach-s3c2412/s3c2412.c
+++ b/arch/arm/mach-s3c2412/s3c2412.c
@@ -32,8 +32,6 @@
32#include <asm/proc-fns.h> 32#include <asm/proc-fns.h>
33#include <asm/irq.h> 33#include <asm/irq.h>
34 34
35#include <mach/idle.h>
36
37#include <plat/cpu-freq.h> 35#include <plat/cpu-freq.h>
38 36
39#include <mach/regs-clock.h> 37#include <mach/regs-clock.h>
@@ -164,7 +162,7 @@ void __init s3c2412_map_io(void)
164 162
165 /* set our idle function */ 163 /* set our idle function */
166 164
167 s3c24xx_idle = s3c2412_idle; 165 arm_pm_idle = s3c2412_idle;
168 166
169 /* register our io-tables */ 167 /* register our io-tables */
170 168
diff --git a/arch/arm/mach-s3c2416/s3c2416.c b/arch/arm/mach-s3c2416/s3c2416.c
index 5287d2808d3..08bb0355159 100644
--- a/arch/arm/mach-s3c2416/s3c2416.c
+++ b/arch/arm/mach-s3c2416/s3c2416.c
@@ -44,7 +44,6 @@
44#include <asm/proc-fns.h> 44#include <asm/proc-fns.h>
45#include <asm/irq.h> 45#include <asm/irq.h>
46 46
47#include <mach/idle.h>
48#include <mach/regs-s3c2443-clock.h> 47#include <mach/regs-s3c2443-clock.h>
49 48
50#include <plat/gpio-core.h> 49#include <plat/gpio-core.h>
@@ -88,8 +87,6 @@ int __init s3c2416_init(void)
88{ 87{
89 printk(KERN_INFO "S3C2416: Initializing architecture\n"); 88 printk(KERN_INFO "S3C2416: Initializing architecture\n");
90 89
91 /* s3c24xx_idle = s3c2416_idle; */
92
93 /* change WDT IRQ number */ 90 /* change WDT IRQ number */
94 s3c_device_wdt.resource[1].start = IRQ_S3C2443_WDT; 91 s3c_device_wdt.resource[1].start = IRQ_S3C2443_WDT;
95 s3c_device_wdt.resource[1].end = IRQ_S3C2443_WDT; 92 s3c_device_wdt.resource[1].end = IRQ_S3C2443_WDT;
diff --git a/arch/arm/mach-s3c64xx/include/mach/system.h b/arch/arm/mach-s3c64xx/include/mach/system.h
deleted file mode 100644
index 353ed4389ae..00000000000
--- a/arch/arm/mach-s3c64xx/include/mach/system.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/* linux/arch/arm/mach-s3c6400/include/mach/system.h
2 *
3 * Copyright 2008 Openmoko, Inc.
4 * Copyright 2008 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 * http://armlinux.simtec.co.uk/
7 *
8 * S3C6400 - system implementation
9 */
10
11#ifndef __ASM_ARCH_SYSTEM_H
12#define __ASM_ARCH_SYSTEM_H __FILE__
13
14static void arch_idle(void)
15{
16 /* nothing here yet */
17}
18
19#endif /* __ASM_ARCH_IRQ_H */
diff --git a/arch/arm/mach-s5p64x0/common.c b/arch/arm/mach-s5p64x0/common.c
index 52b89a37644..9143f8b1996 100644
--- a/arch/arm/mach-s5p64x0/common.c
+++ b/arch/arm/mach-s5p64x0/common.c
@@ -146,15 +146,12 @@ static void s5p64x0_idle(void)
146{ 146{
147 unsigned long val; 147 unsigned long val;
148 148
149 if (!need_resched()) { 149 val = __raw_readl(S5P64X0_PWR_CFG);
150 val = __raw_readl(S5P64X0_PWR_CFG); 150 val &= ~(0x3 << 5);
151 val &= ~(0x3 << 5); 151 val |= (0x1 << 5);
152 val |= (0x1 << 5); 152 __raw_writel(val, S5P64X0_PWR_CFG);
153 __raw_writel(val, S5P64X0_PWR_CFG);
154 153
155 cpu_do_idle(); 154 cpu_do_idle();
156 }
157 local_irq_enable();
158} 155}
159 156
160/* 157/*
@@ -286,7 +283,7 @@ int __init s5p64x0_init(void)
286 printk(KERN_INFO "S5P64X0(S5P6440/S5P6450): Initializing architecture\n"); 283 printk(KERN_INFO "S5P64X0(S5P6440/S5P6450): Initializing architecture\n");
287 284
288 /* set idle function */ 285 /* set idle function */
289 pm_idle = s5p64x0_idle; 286 arm_pm_idle = s5p64x0_idle;
290 287
291 return device_register(&s5p64x0_dev); 288 return device_register(&s5p64x0_dev);
292} 289}
diff --git a/arch/arm/mach-s5p64x0/dma.c b/arch/arm/mach-s5p64x0/dma.c
index f820c074440..f7f68ad7791 100644
--- a/arch/arm/mach-s5p64x0/dma.c
+++ b/arch/arm/mach-s5p64x0/dma.c
@@ -108,34 +108,22 @@ struct dma_pl330_platdata s5p6450_pdma_pdata = {
108 .peri_id = s5p6450_pdma_peri, 108 .peri_id = s5p6450_pdma_peri,
109}; 109};
110 110
111struct amba_device s5p64x0_device_pdma = { 111AMBA_AHB_DEVICE(s5p64x0_pdma, "dma-pl330", 0x00041330, S5P64X0_PA_PDMA,
112 .dev = { 112 {IRQ_DMA0}, NULL);
113 .init_name = "dma-pl330",
114 .dma_mask = &dma_dmamask,
115 .coherent_dma_mask = DMA_BIT_MASK(32),
116 },
117 .res = {
118 .start = S5P64X0_PA_PDMA,
119 .end = S5P64X0_PA_PDMA + SZ_4K,
120 .flags = IORESOURCE_MEM,
121 },
122 .irq = {IRQ_DMA0, NO_IRQ},
123 .periphid = 0x00041330,
124};
125 113
126static int __init s5p64x0_dma_init(void) 114static int __init s5p64x0_dma_init(void)
127{ 115{
128 if (soc_is_s5p6450()) { 116 if (soc_is_s5p6450()) {
129 dma_cap_set(DMA_SLAVE, s5p6450_pdma_pdata.cap_mask); 117 dma_cap_set(DMA_SLAVE, s5p6450_pdma_pdata.cap_mask);
130 dma_cap_set(DMA_CYCLIC, s5p6450_pdma_pdata.cap_mask); 118 dma_cap_set(DMA_CYCLIC, s5p6450_pdma_pdata.cap_mask);
131 s5p64x0_device_pdma.dev.platform_data = &s5p6450_pdma_pdata; 119 s5p64x0_pdma_device.dev.platform_data = &s5p6450_pdma_pdata;
132 } else { 120 } else {
133 dma_cap_set(DMA_SLAVE, s5p6440_pdma_pdata.cap_mask); 121 dma_cap_set(DMA_SLAVE, s5p6440_pdma_pdata.cap_mask);
134 dma_cap_set(DMA_CYCLIC, s5p6440_pdma_pdata.cap_mask); 122 dma_cap_set(DMA_CYCLIC, s5p6440_pdma_pdata.cap_mask);
135 s5p64x0_device_pdma.dev.platform_data = &s5p6440_pdma_pdata; 123 s5p64x0_pdma_device.dev.platform_data = &s5p6440_pdma_pdata;
136 } 124 }
137 125
138 amba_device_register(&s5p64x0_device_pdma, &iomem_resource); 126 amba_device_register(&s5p64x0_pdma_device, &iomem_resource);
139 127
140 return 0; 128 return 0;
141} 129}
diff --git a/arch/arm/mach-s5p64x0/include/mach/system.h b/arch/arm/mach-s5p64x0/include/mach/system.h
deleted file mode 100644
index cf26e0954a2..00000000000
--- a/arch/arm/mach-s5p64x0/include/mach/system.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/* linux/arch/arm/mach-s5p64x0/include/mach/system.h
2 *
3 * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * S5P64X0 - system support header
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_SYSTEM_H
14#define __ASM_ARCH_SYSTEM_H __FILE__
15
16static void arch_idle(void)
17{
18 /* nothing here yet */
19}
20
21#endif /* __ASM_ARCH_SYSTEM_H */
diff --git a/arch/arm/mach-s5pc100/common.c b/arch/arm/mach-s5pc100/common.c
index c9095730a7f..ff71e2d467c 100644
--- a/arch/arm/mach-s5pc100/common.c
+++ b/arch/arm/mach-s5pc100/common.c
@@ -129,14 +129,6 @@ static struct map_desc s5pc100_iodesc[] __initdata = {
129 } 129 }
130}; 130};
131 131
132static void s5pc100_idle(void)
133{
134 if (!need_resched())
135 cpu_do_idle();
136
137 local_irq_enable();
138}
139
140/* 132/*
141 * s5pc100_map_io 133 * s5pc100_map_io
142 * 134 *
@@ -210,10 +202,6 @@ core_initcall(s5pc100_core_init);
210int __init s5pc100_init(void) 202int __init s5pc100_init(void)
211{ 203{
212 printk(KERN_INFO "S5PC100: Initializing architecture\n"); 204 printk(KERN_INFO "S5PC100: Initializing architecture\n");
213
214 /* set idle function */
215 pm_idle = s5pc100_idle;
216
217 return device_register(&s5pc100_dev); 205 return device_register(&s5pc100_dev);
218} 206}
219 207
diff --git a/arch/arm/mach-s5pc100/dma.c b/arch/arm/mach-s5pc100/dma.c
index c841f4d313f..96b1ab3dcd4 100644
--- a/arch/arm/mach-s5pc100/dma.c
+++ b/arch/arm/mach-s5pc100/dma.c
@@ -73,21 +73,8 @@ struct dma_pl330_platdata s5pc100_pdma0_pdata = {
73 .peri_id = pdma0_peri, 73 .peri_id = pdma0_peri,
74}; 74};
75 75
76struct amba_device s5pc100_device_pdma0 = { 76AMBA_AHB_DEVICE(s5pc100_pdma0, "dma-pl330.0", 0x00041330, S5PC100_PA_PDMA0,
77 .dev = { 77 {IRQ_PDMA0}, &s5pc100_pdma0_pdata);
78 .init_name = "dma-pl330.0",
79 .dma_mask = &dma_dmamask,
80 .coherent_dma_mask = DMA_BIT_MASK(32),
81 .platform_data = &s5pc100_pdma0_pdata,
82 },
83 .res = {
84 .start = S5PC100_PA_PDMA0,
85 .end = S5PC100_PA_PDMA0 + SZ_4K,
86 .flags = IORESOURCE_MEM,
87 },
88 .irq = {IRQ_PDMA0, NO_IRQ},
89 .periphid = 0x00041330,
90};
91 78
92u8 pdma1_peri[] = { 79u8 pdma1_peri[] = {
93 DMACH_UART0_RX, 80 DMACH_UART0_RX,
@@ -127,31 +114,18 @@ struct dma_pl330_platdata s5pc100_pdma1_pdata = {
127 .peri_id = pdma1_peri, 114 .peri_id = pdma1_peri,
128}; 115};
129 116
130struct amba_device s5pc100_device_pdma1 = { 117AMBA_AHB_DEVICE(s5pc100_pdma1, "dma-pl330.1", 0x00041330, S5PC100_PA_PDMA1,
131 .dev = { 118 {IRQ_PDMA1}, &s5pc100_pdma1_pdata);
132 .init_name = "dma-pl330.1",
133 .dma_mask = &dma_dmamask,
134 .coherent_dma_mask = DMA_BIT_MASK(32),
135 .platform_data = &s5pc100_pdma1_pdata,
136 },
137 .res = {
138 .start = S5PC100_PA_PDMA1,
139 .end = S5PC100_PA_PDMA1 + SZ_4K,
140 .flags = IORESOURCE_MEM,
141 },
142 .irq = {IRQ_PDMA1, NO_IRQ},
143 .periphid = 0x00041330,
144};
145 119
146static int __init s5pc100_dma_init(void) 120static int __init s5pc100_dma_init(void)
147{ 121{
148 dma_cap_set(DMA_SLAVE, s5pc100_pdma0_pdata.cap_mask); 122 dma_cap_set(DMA_SLAVE, s5pc100_pdma0_pdata.cap_mask);
149 dma_cap_set(DMA_CYCLIC, s5pc100_pdma0_pdata.cap_mask); 123 dma_cap_set(DMA_CYCLIC, s5pc100_pdma0_pdata.cap_mask);
150 amba_device_register(&s5pc100_device_pdma0, &iomem_resource); 124 amba_device_register(&s5pc100_pdma0_device, &iomem_resource);
151 125
152 dma_cap_set(DMA_SLAVE, s5pc100_pdma1_pdata.cap_mask); 126 dma_cap_set(DMA_SLAVE, s5pc100_pdma1_pdata.cap_mask);
153 dma_cap_set(DMA_CYCLIC, s5pc100_pdma1_pdata.cap_mask); 127 dma_cap_set(DMA_CYCLIC, s5pc100_pdma1_pdata.cap_mask);
154 amba_device_register(&s5pc100_device_pdma1, &iomem_resource); 128 amba_device_register(&s5pc100_pdma1_device, &iomem_resource);
155 129
156 return 0; 130 return 0;
157} 131}
diff --git a/arch/arm/mach-s5pc100/include/mach/system.h b/arch/arm/mach-s5pc100/include/mach/system.h
deleted file mode 100644
index afc96c29851..00000000000
--- a/arch/arm/mach-s5pc100/include/mach/system.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/* linux/arch/arm/mach-s5pc100/include/mach/system.h
2 *
3 * Copyright 2009 Samsung Electronics Co.
4 * Byungho Min <bhmin@samsung.com>
5 *
6 * S5PC100 - system implementation
7 *
8 * Based on mach-s3c6400/include/mach/system.h
9 */
10
11#ifndef __ASM_ARCH_SYSTEM_H
12#define __ASM_ARCH_SYSTEM_H __FILE__
13
14static void arch_idle(void)
15{
16 /* nothing here yet */
17}
18
19#endif /* __ASM_ARCH_IRQ_H */
diff --git a/arch/arm/mach-s5pv210/common.c b/arch/arm/mach-s5pv210/common.c
index 9c1bcdcc12c..4c9e9027df9 100644
--- a/arch/arm/mach-s5pv210/common.c
+++ b/arch/arm/mach-s5pv210/common.c
@@ -142,14 +142,6 @@ static struct map_desc s5pv210_iodesc[] __initdata = {
142 } 142 }
143}; 143};
144 144
145static void s5pv210_idle(void)
146{
147 if (!need_resched())
148 cpu_do_idle();
149
150 local_irq_enable();
151}
152
153void s5pv210_restart(char mode, const char *cmd) 145void s5pv210_restart(char mode, const char *cmd)
154{ 146{
155 __raw_writel(0x1, S5P_SWRESET); 147 __raw_writel(0x1, S5P_SWRESET);
@@ -247,10 +239,6 @@ core_initcall(s5pv210_core_init);
247int __init s5pv210_init(void) 239int __init s5pv210_init(void)
248{ 240{
249 printk(KERN_INFO "S5PV210: Initializing architecture\n"); 241 printk(KERN_INFO "S5PV210: Initializing architecture\n");
250
251 /* set idle function */
252 pm_idle = s5pv210_idle;
253
254 return device_register(&s5pv210_dev); 242 return device_register(&s5pv210_dev);
255} 243}
256 244
diff --git a/arch/arm/mach-s5pv210/dma.c b/arch/arm/mach-s5pv210/dma.c
index a6113e0267f..f6885d247d1 100644
--- a/arch/arm/mach-s5pv210/dma.c
+++ b/arch/arm/mach-s5pv210/dma.c
@@ -71,21 +71,8 @@ struct dma_pl330_platdata s5pv210_pdma0_pdata = {
71 .peri_id = pdma0_peri, 71 .peri_id = pdma0_peri,
72}; 72};
73 73
74struct amba_device s5pv210_device_pdma0 = { 74AMBA_AHB_DEVICE(s5pv210_pdma0, "dma-pl330.0", 0x00041330, S5PV210_PA_PDMA0,
75 .dev = { 75 {IRQ_PDMA0}, &s5pv210_pdma0_pdata);
76 .init_name = "dma-pl330.0",
77 .dma_mask = &dma_dmamask,
78 .coherent_dma_mask = DMA_BIT_MASK(32),
79 .platform_data = &s5pv210_pdma0_pdata,
80 },
81 .res = {
82 .start = S5PV210_PA_PDMA0,
83 .end = S5PV210_PA_PDMA0 + SZ_4K,
84 .flags = IORESOURCE_MEM,
85 },
86 .irq = {IRQ_PDMA0, NO_IRQ},
87 .periphid = 0x00041330,
88};
89 76
90u8 pdma1_peri[] = { 77u8 pdma1_peri[] = {
91 DMACH_UART0_RX, 78 DMACH_UART0_RX,
@@ -127,31 +114,18 @@ struct dma_pl330_platdata s5pv210_pdma1_pdata = {
127 .peri_id = pdma1_peri, 114 .peri_id = pdma1_peri,
128}; 115};
129 116
130struct amba_device s5pv210_device_pdma1 = { 117AMBA_AHB_DEVICE(s5pv210_pdma1, "dma-pl330.1", 0x00041330, S5PV210_PA_PDMA1,
131 .dev = { 118 {IRQ_PDMA1}, &s5pv210_pdma1_pdata);
132 .init_name = "dma-pl330.1",
133 .dma_mask = &dma_dmamask,
134 .coherent_dma_mask = DMA_BIT_MASK(32),
135 .platform_data = &s5pv210_pdma1_pdata,
136 },
137 .res = {
138 .start = S5PV210_PA_PDMA1,
139 .end = S5PV210_PA_PDMA1 + SZ_4K,
140 .flags = IORESOURCE_MEM,
141 },
142 .irq = {IRQ_PDMA1, NO_IRQ},
143 .periphid = 0x00041330,
144};
145 119
146static int __init s5pv210_dma_init(void) 120static int __init s5pv210_dma_init(void)
147{ 121{
148 dma_cap_set(DMA_SLAVE, s5pv210_pdma0_pdata.cap_mask); 122 dma_cap_set(DMA_SLAVE, s5pv210_pdma0_pdata.cap_mask);
149 dma_cap_set(DMA_CYCLIC, s5pv210_pdma0_pdata.cap_mask); 123 dma_cap_set(DMA_CYCLIC, s5pv210_pdma0_pdata.cap_mask);
150 amba_device_register(&s5pv210_device_pdma0, &iomem_resource); 124 amba_device_register(&s5pv210_pdma0_device, &iomem_resource);
151 125
152 dma_cap_set(DMA_SLAVE, s5pv210_pdma1_pdata.cap_mask); 126 dma_cap_set(DMA_SLAVE, s5pv210_pdma1_pdata.cap_mask);
153 dma_cap_set(DMA_CYCLIC, s5pv210_pdma1_pdata.cap_mask); 127 dma_cap_set(DMA_CYCLIC, s5pv210_pdma1_pdata.cap_mask);
154 amba_device_register(&s5pv210_device_pdma1, &iomem_resource); 128 amba_device_register(&s5pv210_pdma1_device, &iomem_resource);
155 129
156 return 0; 130 return 0;
157} 131}
diff --git a/arch/arm/mach-s5pv210/include/mach/system.h b/arch/arm/mach-s5pv210/include/mach/system.h
deleted file mode 100644
index bf288ced860..00000000000
--- a/arch/arm/mach-s5pv210/include/mach/system.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/* linux/arch/arm/mach-s5pv210/include/mach/system.h
2 *
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
5 *
6 * S5PV210 - system support header
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_SYSTEM_H
14#define __ASM_ARCH_SYSTEM_H __FILE__
15
16static void arch_idle(void)
17{
18 /* nothing here yet */
19}
20
21#endif /* __ASM_ARCH_SYSTEM_H */
diff --git a/arch/arm/mach-sa1100/include/mach/system.h b/arch/arm/mach-sa1100/include/mach/system.h
deleted file mode 100644
index e17b208f76d..00000000000
--- a/arch/arm/mach-sa1100/include/mach/system.h
+++ /dev/null
@@ -1,9 +0,0 @@
1/*
2 * arch/arm/mach-sa1100/include/mach/system.h
3 *
4 * Copyright (c) 1999 Nicolas Pitre <nico@fluxnic.net>
5 */
6static inline void arch_idle(void)
7{
8 cpu_do_idle();
9}
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c
index a851c254ad6..6a2a7f2c255 100644
--- a/arch/arm/mach-shark/core.c
+++ b/arch/arm/mach-shark/core.c
@@ -149,10 +149,16 @@ static struct sys_timer shark_timer = {
149 .init = shark_timer_init, 149 .init = shark_timer_init,
150}; 150};
151 151
152static void shark_init_early(void)
153{
154 disable_hlt();
155}
156
152MACHINE_START(SHARK, "Shark") 157MACHINE_START(SHARK, "Shark")
153 /* Maintainer: Alexander Schulz */ 158 /* Maintainer: Alexander Schulz */
154 .atag_offset = 0x3000, 159 .atag_offset = 0x3000,
155 .map_io = shark_map_io, 160 .map_io = shark_map_io,
161 .init_early = shark_init_early,
156 .init_irq = shark_init_irq, 162 .init_irq = shark_init_irq,
157 .timer = &shark_timer, 163 .timer = &shark_timer,
158 .dma_zone_size = SZ_4M, 164 .dma_zone_size = SZ_4M,
diff --git a/arch/arm/mach-shark/include/mach/system.h b/arch/arm/mach-shark/include/mach/system.h
deleted file mode 100644
index 1b2f2c5050a..00000000000
--- a/arch/arm/mach-shark/include/mach/system.h
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * arch/arm/mach-shark/include/mach/system.h
3 *
4 * by Alexander Schulz
5 */
6#ifndef __ASM_ARCH_SYSTEM_H
7#define __ASM_ARCH_SYSTEM_H
8
9static inline void arch_idle(void)
10{
11}
12
13#endif
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
index 060e5644c49..34560cab45d 100644
--- a/arch/arm/mach-shmobile/Kconfig
+++ b/arch/arm/mach-shmobile/Kconfig
@@ -100,6 +100,10 @@ config MACH_MARZEN
100 100
101comment "SH-Mobile System Configuration" 101comment "SH-Mobile System Configuration"
102 102
103config CPU_HAS_INTEVT
104 bool
105 default y
106
103menu "Memory configuration" 107menu "Memory configuration"
104 108
105config MEMORY_START 109config MEMORY_START
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index eff8a96c75e..e922e92111c 100644
--- a/arch/arm/mach-shmobile/board-ag5evm.c
+++ b/arch/arm/mach-shmobile/board-ag5evm.c
@@ -42,6 +42,7 @@
42#include <video/sh_mipi_dsi.h> 42#include <video/sh_mipi_dsi.h>
43#include <sound/sh_fsi.h> 43#include <sound/sh_fsi.h>
44#include <mach/hardware.h> 44#include <mach/hardware.h>
45#include <mach/irqs.h>
45#include <mach/sh73a0.h> 46#include <mach/sh73a0.h>
46#include <mach/common.h> 47#include <mach/common.h>
47#include <asm/mach-types.h> 48#include <asm/mach-types.h>
diff --git a/arch/arm/mach-shmobile/board-bonito.c b/arch/arm/mach-shmobile/board-bonito.c
index 4d220162232..df9a6538244 100644
--- a/arch/arm/mach-shmobile/board-bonito.c
+++ b/arch/arm/mach-shmobile/board-bonito.c
@@ -34,6 +34,7 @@
34#include <asm/mach/time.h> 34#include <asm/mach/time.h>
35#include <asm/hardware/cache-l2x0.h> 35#include <asm/hardware/cache-l2x0.h>
36#include <mach/r8a7740.h> 36#include <mach/r8a7740.h>
37#include <mach/irqs.h>
37#include <video/sh_mobile_lcdc.h> 38#include <video/sh_mobile_lcdc.h>
38 39
39/* 40/*
diff --git a/arch/arm/mach-shmobile/board-g3evm.c b/arch/arm/mach-shmobile/board-g3evm.c
index 72d557281b1..6dbdc428c24 100644
--- a/arch/arm/mach-shmobile/board-g3evm.c
+++ b/arch/arm/mach-shmobile/board-g3evm.c
@@ -33,6 +33,7 @@
33#include <linux/input.h> 33#include <linux/input.h>
34#include <linux/input/sh_keysc.h> 34#include <linux/input/sh_keysc.h>
35#include <linux/dma-mapping.h> 35#include <linux/dma-mapping.h>
36#include <mach/irqs.h>
36#include <mach/sh7367.h> 37#include <mach/sh7367.h>
37#include <mach/common.h> 38#include <mach/common.h>
38#include <asm/mach-types.h> 39#include <asm/mach-types.h>
diff --git a/arch/arm/mach-shmobile/board-g4evm.c b/arch/arm/mach-shmobile/board-g4evm.c
index 2220b885cff..2936ccc9595 100644
--- a/arch/arm/mach-shmobile/board-g4evm.c
+++ b/arch/arm/mach-shmobile/board-g4evm.c
@@ -34,6 +34,7 @@
34#include <linux/mmc/sh_mobile_sdhi.h> 34#include <linux/mmc/sh_mobile_sdhi.h>
35#include <linux/gpio.h> 35#include <linux/gpio.h>
36#include <linux/dma-mapping.h> 36#include <linux/dma-mapping.h>
37#include <mach/irqs.h>
37#include <mach/sh7377.h> 38#include <mach/sh7377.h>
38#include <mach/common.h> 39#include <mach/common.h>
39#include <asm/mach-types.h> 40#include <asm/mach-types.h>
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c
index 857ceeec1bb..c71780b2232 100644
--- a/arch/arm/mach-shmobile/board-kota2.c
+++ b/arch/arm/mach-shmobile/board-kota2.c
@@ -39,6 +39,7 @@
39#include <linux/mfd/tmio.h> 39#include <linux/mfd/tmio.h>
40#include <linux/mmc/sh_mobile_sdhi.h> 40#include <linux/mmc/sh_mobile_sdhi.h>
41#include <mach/hardware.h> 41#include <mach/hardware.h>
42#include <mach/irqs.h>
42#include <mach/sh73a0.h> 43#include <mach/sh73a0.h>
43#include <mach/common.h> 44#include <mach/common.h>
44#include <asm/mach-types.h> 45#include <asm/mach-types.h>
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 9b42fbd10f8..73f00971d0d 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -55,6 +55,7 @@
55#include <sound/sh_fsi.h> 55#include <sound/sh_fsi.h>
56 56
57#include <mach/common.h> 57#include <mach/common.h>
58#include <mach/irqs.h>
58#include <mach/sh7372.h> 59#include <mach/sh7372.h>
59 60
60#include <asm/mach/arch.h> 61#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index f0e02c0ce99..3b2e88ae26b 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -31,6 +31,7 @@
31#include <mach/hardware.h> 31#include <mach/hardware.h>
32#include <mach/r8a7779.h> 32#include <mach/r8a7779.h>
33#include <mach/common.h> 33#include <mach/common.h>
34#include <mach/irqs.h>
34#include <asm/mach-types.h> 35#include <asm/mach-types.h>
35#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
36#include <asm/mach/map.h> 37#include <asm/mach/map.h>
diff --git a/arch/arm/mach-shmobile/include/mach/irqs.h b/arch/arm/mach-shmobile/include/mach/irqs.h
index dcb714f4d75..4e686cc201f 100644
--- a/arch/arm/mach-shmobile/include/mach/irqs.h
+++ b/arch/arm/mach-shmobile/include/mach/irqs.h
@@ -1,15 +1,11 @@
1#ifndef __ASM_MACH_IRQS_H 1#ifndef __ASM_MACH_IRQS_H
2#define __ASM_MACH_IRQS_H 2#define __ASM_MACH_IRQS_H
3 3
4#define NR_IRQS 1024 4#include <linux/sh_intc.h>
5 5
6/* GIC */ 6/* GIC */
7#define gic_spi(nr) ((nr) + 32) 7#define gic_spi(nr) ((nr) + 32)
8 8
9/* INTCA */
10#define evt2irq(evt) (((evt) >> 5) - 16)
11#define irq2evt(irq) (((irq) + 16) << 5)
12
13/* INTCS */ 9/* INTCS */
14#define INTCS_VECT_BASE 0x2200 10#define INTCS_VECT_BASE 0x2200
15#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect)) 11#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect))
diff --git a/arch/arm/mach-shmobile/include/mach/system.h b/arch/arm/mach-shmobile/include/mach/system.h
index 956ac18ddbf..3bbcb3fa077 100644
--- a/arch/arm/mach-shmobile/include/mach/system.h
+++ b/arch/arm/mach-shmobile/include/mach/system.h
@@ -1,11 +1,6 @@
1#ifndef __ASM_ARCH_SYSTEM_H 1#ifndef __ASM_ARCH_SYSTEM_H
2#define __ASM_ARCH_SYSTEM_H 2#define __ASM_ARCH_SYSTEM_H
3 3
4static inline void arch_idle(void)
5{
6 cpu_do_idle();
7}
8
9static inline void arch_reset(char mode, const char *cmd) 4static inline void arch_reset(char mode, const char *cmd)
10{ 5{
11 soft_restart(0); 6 soft_restart(0);
diff --git a/arch/arm/mach-shmobile/intc-r8a7740.c b/arch/arm/mach-shmobile/intc-r8a7740.c
index 272c84c20c8..09c42afcb22 100644
--- a/arch/arm/mach-shmobile/intc-r8a7740.c
+++ b/arch/arm/mach-shmobile/intc-r8a7740.c
@@ -25,6 +25,7 @@
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/sh_intc.h> 26#include <linux/sh_intc.h>
27#include <mach/intc.h> 27#include <mach/intc.h>
28#include <mach/irqs.h>
28#include <asm/mach-types.h> 29#include <asm/mach-types.h>
29#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
30 31
diff --git a/arch/arm/mach-shmobile/intc-sh7367.c b/arch/arm/mach-shmobile/intc-sh7367.c
index cfde9bfc366..5bf776495b7 100644
--- a/arch/arm/mach-shmobile/intc-sh7367.c
+++ b/arch/arm/mach-shmobile/intc-sh7367.c
@@ -23,6 +23,7 @@
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/sh_intc.h> 24#include <linux/sh_intc.h>
25#include <mach/intc.h> 25#include <mach/intc.h>
26#include <mach/irqs.h>
26#include <asm/mach-types.h> 27#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
28 29
diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c
index 89afcaba99a..6447e0af52d 100644
--- a/arch/arm/mach-shmobile/intc-sh7372.c
+++ b/arch/arm/mach-shmobile/intc-sh7372.c
@@ -23,6 +23,7 @@
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/sh_intc.h> 24#include <linux/sh_intc.h>
25#include <mach/intc.h> 25#include <mach/intc.h>
26#include <mach/irqs.h>
26#include <asm/mach-types.h> 27#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
28 29
diff --git a/arch/arm/mach-shmobile/intc-sh7377.c b/arch/arm/mach-shmobile/intc-sh7377.c
index 2af4e6e9bc5..b84a460a340 100644
--- a/arch/arm/mach-shmobile/intc-sh7377.c
+++ b/arch/arm/mach-shmobile/intc-sh7377.c
@@ -23,6 +23,7 @@
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/sh_intc.h> 24#include <linux/sh_intc.h>
25#include <mach/intc.h> 25#include <mach/intc.h>
26#include <mach/irqs.h>
26#include <asm/mach-types.h> 27#include <asm/mach-types.h>
27#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
28 29
diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c
index 1eda6b0b69e..9a8207c6d31 100644
--- a/arch/arm/mach-shmobile/intc-sh73a0.c
+++ b/arch/arm/mach-shmobile/intc-sh73a0.c
@@ -23,6 +23,7 @@
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/sh_intc.h> 24#include <linux/sh_intc.h>
25#include <mach/intc.h> 25#include <mach/intc.h>
26#include <mach/irqs.h>
26#include <mach/sh73a0.h> 27#include <mach/sh73a0.h>
27#include <asm/hardware/gic.h> 28#include <asm/hardware/gic.h>
28#include <asm/mach-types.h> 29#include <asm/mach-types.h>
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 986dca6b3fa..fa15d81267e 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -25,6 +25,7 @@
25#include <linux/serial_sci.h> 25#include <linux/serial_sci.h>
26#include <linux/sh_timer.h> 26#include <linux/sh_timer.h>
27#include <mach/r8a7740.h> 27#include <mach/r8a7740.h>
28#include <mach/irqs.h>
28#include <asm/mach-types.h> 29#include <asm/mach-types.h>
29#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
30 31
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 4725663bd03..55df21add2d 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -29,6 +29,7 @@
29#include <linux/sh_intc.h> 29#include <linux/sh_intc.h>
30#include <linux/sh_timer.h> 30#include <linux/sh_timer.h>
31#include <mach/hardware.h> 31#include <mach/hardware.h>
32#include <mach/irqs.h>
32#include <mach/r8a7779.h> 33#include <mach/r8a7779.h>
33#include <mach/common.h> 34#include <mach/common.h>
34#include <asm/mach-types.h> 35#include <asm/mach-types.h>
diff --git a/arch/arm/mach-shmobile/setup-sh7367.c b/arch/arm/mach-shmobile/setup-sh7367.c
index e546017f15d..8e84819833a 100644
--- a/arch/arm/mach-shmobile/setup-sh7367.c
+++ b/arch/arm/mach-shmobile/setup-sh7367.c
@@ -29,6 +29,7 @@
29#include <linux/serial_sci.h> 29#include <linux/serial_sci.h>
30#include <linux/sh_timer.h> 30#include <linux/sh_timer.h>
31#include <mach/hardware.h> 31#include <mach/hardware.h>
32#include <mach/irqs.h>
32#include <asm/mach-types.h> 33#include <asm/mach-types.h>
33#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
34 35
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index 6fcf304d3cd..420d25c0d74 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -32,6 +32,7 @@
32#include <linux/sh_timer.h> 32#include <linux/sh_timer.h>
33#include <linux/pm_domain.h> 33#include <linux/pm_domain.h>
34#include <mach/hardware.h> 34#include <mach/hardware.h>
35#include <mach/irqs.h>
35#include <mach/sh7372.h> 36#include <mach/sh7372.h>
36#include <asm/mach-types.h> 37#include <asm/mach-types.h>
37#include <asm/mach/arch.h> 38#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-shmobile/setup-sh7377.c b/arch/arm/mach-shmobile/setup-sh7377.c
index bb405b8e459..747ed8ef84e 100644
--- a/arch/arm/mach-shmobile/setup-sh7377.c
+++ b/arch/arm/mach-shmobile/setup-sh7377.c
@@ -30,6 +30,7 @@
30#include <linux/sh_intc.h> 30#include <linux/sh_intc.h>
31#include <linux/sh_timer.h> 31#include <linux/sh_timer.h>
32#include <mach/hardware.h> 32#include <mach/hardware.h>
33#include <mach/irqs.h>
33#include <asm/mach-types.h> 34#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 35#include <asm/mach/arch.h>
35 36
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index 20e71e5cace..7bf740e29a3 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -31,6 +31,7 @@
31#include <linux/sh_intc.h> 31#include <linux/sh_intc.h>
32#include <linux/sh_timer.h> 32#include <linux/sh_timer.h>
33#include <mach/hardware.h> 33#include <mach/hardware.h>
34#include <mach/irqs.h>
34#include <mach/sh73a0.h> 35#include <mach/sh73a0.h>
35#include <asm/mach-types.h> 36#include <asm/mach-types.h>
36#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-spear3xx/include/mach/system.h b/arch/arm/mach-spear3xx/include/mach/system.h
deleted file mode 100644
index 92cee6335c9..00000000000
--- a/arch/arm/mach-spear3xx/include/mach/system.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/mach-spear3xx/include/mach/system.h
3 *
4 * SPEAr3xx Machine family specific architecture functions
5 *
6 * Copyright (C) 2009 ST Microelectronics
7 * Viresh Kumar<viresh.kumar@st.com>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef __MACH_SYSTEM_H
15#define __MACH_SYSTEM_H
16
17#include <plat/system.h>
18
19#endif /* __MACH_SYSTEM_H */
diff --git a/arch/arm/mach-spear3xx/spear300.c b/arch/arm/mach-spear3xx/spear300.c
index a5e46b4ade2..9da50e281e9 100644
--- a/arch/arm/mach-spear3xx/spear300.c
+++ b/arch/arm/mach-spear3xx/spear300.c
@@ -430,18 +430,8 @@ static struct pl061_platform_data gpio1_plat_data = {
430 .irq_base = SPEAR300_GPIO1_INT_BASE, 430 .irq_base = SPEAR300_GPIO1_INT_BASE,
431}; 431};
432 432
433struct amba_device spear300_gpio1_device = { 433AMBA_APB_DEVICE(spear300_gpio1, "gpio1", 0, SPEAR300_GPIO_BASE,
434 .dev = { 434 {SPEAR300_VIRQ_GPIO1}, &gpio1_plat_data);
435 .init_name = "gpio1",
436 .platform_data = &gpio1_plat_data,
437 },
438 .res = {
439 .start = SPEAR300_GPIO_BASE,
440 .end = SPEAR300_GPIO_BASE + SZ_4K - 1,
441 .flags = IORESOURCE_MEM,
442 },
443 .irq = {SPEAR300_VIRQ_GPIO1, NO_IRQ},
444};
445 435
446/* spear300 routines */ 436/* spear300 routines */
447void __init spear300_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs, 437void __init spear300_init(struct pmx_mode *pmx_mode, struct pmx_dev **pmx_devs,
diff --git a/arch/arm/mach-spear3xx/spear3xx.c b/arch/arm/mach-spear3xx/spear3xx.c
index 10af45da86a..b1733c37f20 100644
--- a/arch/arm/mach-spear3xx/spear3xx.c
+++ b/arch/arm/mach-spear3xx/spear3xx.c
@@ -28,31 +28,12 @@ static struct pl061_platform_data gpio_plat_data = {
28 .irq_base = SPEAR3XX_GPIO_INT_BASE, 28 .irq_base = SPEAR3XX_GPIO_INT_BASE,
29}; 29};
30 30
31struct amba_device spear3xx_gpio_device = { 31AMBA_APB_DEVICE(spear3xx_gpio, "gpio", 0, SPEAR3XX_ICM3_GPIO_BASE,
32 .dev = { 32 {SPEAR3XX_IRQ_BASIC_GPIO}, &gpio_plat_data);
33 .init_name = "gpio",
34 .platform_data = &gpio_plat_data,
35 },
36 .res = {
37 .start = SPEAR3XX_ICM3_GPIO_BASE,
38 .end = SPEAR3XX_ICM3_GPIO_BASE + SZ_4K - 1,
39 .flags = IORESOURCE_MEM,
40 },
41 .irq = {SPEAR3XX_IRQ_BASIC_GPIO, NO_IRQ},
42};
43 33
44/* uart device registration */ 34/* uart device registration */
45struct amba_device spear3xx_uart_device = { 35AMBA_APB_DEVICE(spear3xx_uart, "uart", 0, SPEAR3XX_ICM1_UART_BASE,
46 .dev = { 36 {SPEAR3XX_IRQ_UART}, NULL);
47 .init_name = "uart",
48 },
49 .res = {
50 .start = SPEAR3XX_ICM1_UART_BASE,
51 .end = SPEAR3XX_ICM1_UART_BASE + SZ_4K - 1,
52 .flags = IORESOURCE_MEM,
53 },
54 .irq = {SPEAR3XX_IRQ_UART, NO_IRQ},
55};
56 37
57/* Do spear3xx familiy common initialization part here */ 38/* Do spear3xx familiy common initialization part here */
58void __init spear3xx_init(void) 39void __init spear3xx_init(void)
diff --git a/arch/arm/mach-spear6xx/include/mach/system.h b/arch/arm/mach-spear6xx/include/mach/system.h
deleted file mode 100644
index 0b1d2be81cf..00000000000
--- a/arch/arm/mach-spear6xx/include/mach/system.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/mach-spear6xx/include/mach/system.h
3 *
4 * SPEAr6xx Machine family specific architecture functions
5 *
6 * Copyright (C) 2009 ST Microelectronics
7 * Rajeev Kumar<rajeev-dlh.kumar@st.com>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef __MACH_SYSTEM_H
15#define __MACH_SYSTEM_H
16
17#include <plat/system.h>
18
19#endif /* __MACH_SYSTEM_H */
diff --git a/arch/arm/mach-spear6xx/spear6xx.c b/arch/arm/mach-spear6xx/spear6xx.c
index e0f6628c8b2..b997b1b10ba 100644
--- a/arch/arm/mach-spear6xx/spear6xx.c
+++ b/arch/arm/mach-spear6xx/spear6xx.c
@@ -34,7 +34,7 @@ struct amba_device uart_device[] = {
34 .end = SPEAR6XX_ICM1_UART0_BASE + SZ_4K - 1, 34 .end = SPEAR6XX_ICM1_UART0_BASE + SZ_4K - 1,
35 .flags = IORESOURCE_MEM, 35 .flags = IORESOURCE_MEM,
36 }, 36 },
37 .irq = {IRQ_UART_0, NO_IRQ}, 37 .irq = {IRQ_UART_0},
38 }, { 38 }, {
39 .dev = { 39 .dev = {
40 .init_name = "uart1", 40 .init_name = "uart1",
@@ -44,7 +44,7 @@ struct amba_device uart_device[] = {
44 .end = SPEAR6XX_ICM1_UART1_BASE + SZ_4K - 1, 44 .end = SPEAR6XX_ICM1_UART1_BASE + SZ_4K - 1,
45 .flags = IORESOURCE_MEM, 45 .flags = IORESOURCE_MEM,
46 }, 46 },
47 .irq = {IRQ_UART_1, NO_IRQ}, 47 .irq = {IRQ_UART_1},
48 } 48 }
49}; 49};
50 50
@@ -73,7 +73,7 @@ struct amba_device gpio_device[] = {
73 .end = SPEAR6XX_CPU_GPIO_BASE + SZ_4K - 1, 73 .end = SPEAR6XX_CPU_GPIO_BASE + SZ_4K - 1,
74 .flags = IORESOURCE_MEM, 74 .flags = IORESOURCE_MEM,
75 }, 75 },
76 .irq = {IRQ_LOCAL_GPIO, NO_IRQ}, 76 .irq = {IRQ_LOCAL_GPIO},
77 }, { 77 }, {
78 .dev = { 78 .dev = {
79 .init_name = "gpio1", 79 .init_name = "gpio1",
@@ -84,7 +84,7 @@ struct amba_device gpio_device[] = {
84 .end = SPEAR6XX_ICM3_GPIO_BASE + SZ_4K - 1, 84 .end = SPEAR6XX_ICM3_GPIO_BASE + SZ_4K - 1,
85 .flags = IORESOURCE_MEM, 85 .flags = IORESOURCE_MEM,
86 }, 86 },
87 .irq = {IRQ_BASIC_GPIO, NO_IRQ}, 87 .irq = {IRQ_BASIC_GPIO},
88 }, { 88 }, {
89 .dev = { 89 .dev = {
90 .init_name = "gpio2", 90 .init_name = "gpio2",
@@ -95,7 +95,7 @@ struct amba_device gpio_device[] = {
95 .end = SPEAR6XX_ICM2_GPIO_BASE + SZ_4K - 1, 95 .end = SPEAR6XX_ICM2_GPIO_BASE + SZ_4K - 1,
96 .flags = IORESOURCE_MEM, 96 .flags = IORESOURCE_MEM,
97 }, 97 },
98 .irq = {IRQ_APPL_GPIO, NO_IRQ}, 98 .irq = {IRQ_APPL_GPIO},
99 } 99 }
100}; 100};
101 101
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index a2eb90169ae..2db20da1d58 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -27,7 +27,6 @@
27#include <asm/hardware/gic.h> 27#include <asm/hardware/gic.h>
28 28
29#include <mach/iomap.h> 29#include <mach/iomap.h>
30#include <mach/system.h>
31 30
32#include "board.h" 31#include "board.h"
33#include "clock.h" 32#include "clock.h"
@@ -96,6 +95,8 @@ static void __init tegra_init_cache(u32 tag_latency, u32 data_latency)
96#ifdef CONFIG_ARCH_TEGRA_2x_SOC 95#ifdef CONFIG_ARCH_TEGRA_2x_SOC
97void __init tegra20_init_early(void) 96void __init tegra20_init_early(void)
98{ 97{
98 disable_hlt(); /* idle WFI usage needs to be confirmed */
99
99 tegra_init_fuse(); 100 tegra_init_fuse();
100 tegra2_init_clocks(); 101 tegra2_init_clocks();
101 tegra_clk_init_from_table(tegra20_clk_init_table); 102 tegra_clk_init_from_table(tegra20_clk_init_table);
diff --git a/arch/arm/mach-tegra/include/mach/system.h b/arch/arm/mach-tegra/include/mach/system.h
deleted file mode 100644
index a312988bf6f..00000000000
--- a/arch/arm/mach-tegra/include/mach/system.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * arch/arm/mach-tegra/include/mach/system.h
3 *
4 * Copyright (C) 2010 Google, Inc.
5 *
6 * Author:
7 * Colin Cross <ccross@google.com>
8 * Erik Gilling <konkers@google.com>
9 *
10 * This software is licensed under the terms of the GNU General Public
11 * License version 2, as published by the Free Software Foundation, and
12 * may be copied, distributed, and modified under those terms.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 */
20
21#ifndef __MACH_TEGRA_SYSTEM_H
22#define __MACH_TEGRA_SYSTEM_H
23
24static inline void arch_idle(void)
25{
26}
27
28#endif
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index b4c6926a700..b9865605da0 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -94,19 +94,9 @@ static struct amba_pl011_data uart0_plat_data = {
94#endif 94#endif
95}; 95};
96 96
97static struct amba_device uart0_device = { 97/* Slow device at 0x3000 offset */
98 .dev = { 98static AMBA_APB_DEVICE(uart0, "uart0", 0, U300_UART0_BASE,
99 .coherent_dma_mask = ~0, 99 { IRQ_U300_UART0 }, &uart0_plat_data);
100 .init_name = "uart0", /* Slow device at 0x3000 offset */
101 .platform_data = &uart0_plat_data,
102 },
103 .res = {
104 .start = U300_UART0_BASE,
105 .end = U300_UART0_BASE + SZ_4K - 1,
106 .flags = IORESOURCE_MEM,
107 },
108 .irq = { IRQ_U300_UART0, NO_IRQ },
109};
110 100
111/* The U335 have an additional UART1 on the APP CPU */ 101/* The U335 have an additional UART1 on the APP CPU */
112#ifdef CONFIG_MACH_U300_BS335 102#ifdef CONFIG_MACH_U300_BS335
@@ -118,71 +108,28 @@ static struct amba_pl011_data uart1_plat_data = {
118#endif 108#endif
119}; 109};
120 110
121static struct amba_device uart1_device = { 111/* Fast device at 0x7000 offset */
122 .dev = { 112static AMBA_APB_DEVICE(uart1, "uart1", 0, U300_UART1_BASE,
123 .coherent_dma_mask = ~0, 113 { IRQ_U300_UART1 }, &uart1_plat_data);
124 .init_name = "uart1", /* Fast device at 0x7000 offset */
125 .platform_data = &uart1_plat_data,
126 },
127 .res = {
128 .start = U300_UART1_BASE,
129 .end = U300_UART1_BASE + SZ_4K - 1,
130 .flags = IORESOURCE_MEM,
131 },
132 .irq = { IRQ_U300_UART1, NO_IRQ },
133};
134#endif 114#endif
135 115
136static struct amba_device pl172_device = { 116/* AHB device at 0x4000 offset */
137 .dev = { 117static AMBA_APB_DEVICE(pl172, "pl172", 0, U300_EMIF_CFG_BASE, { }, NULL);
138 .init_name = "pl172", /* AHB device at 0x4000 offset */
139 .platform_data = NULL,
140 },
141 .res = {
142 .start = U300_EMIF_CFG_BASE,
143 .end = U300_EMIF_CFG_BASE + SZ_4K - 1,
144 .flags = IORESOURCE_MEM,
145 },
146};
147 118
148 119
149/* 120/*
150 * Everything within this next ifdef deals with external devices connected to 121 * Everything within this next ifdef deals with external devices connected to
151 * the APP SPI bus. 122 * the APP SPI bus.
152 */ 123 */
153static struct amba_device pl022_device = { 124/* Fast device at 0x6000 offset */
154 .dev = { 125static AMBA_APB_DEVICE(pl022, "pl022", 0, U300_SPI_BASE,
155 .coherent_dma_mask = ~0, 126 { IRQ_U300_SPI }, NULL);
156 .init_name = "pl022", /* Fast device at 0x6000 offset */
157 },
158 .res = {
159 .start = U300_SPI_BASE,
160 .end = U300_SPI_BASE + SZ_4K - 1,
161 .flags = IORESOURCE_MEM,
162 },
163 .irq = {IRQ_U300_SPI, NO_IRQ },
164 /*
165 * This device has a DMA channel but the Linux driver does not use
166 * it currently.
167 */
168};
169 127
170static struct amba_device mmcsd_device = { 128/* Fast device at 0x1000 offset */
171 .dev = { 129#define U300_MMCSD_IRQS { IRQ_U300_MMCSD_MCIINTR0, IRQ_U300_MMCSD_MCIINTR1 }
172 .init_name = "mmci", /* Fast device at 0x1000 offset */ 130
173 .platform_data = NULL, /* Added later */ 131static AMBA_APB_DEVICE(mmcsd, "mmci", 0, U300_MMCSD_BASE,
174 }, 132 U300_MMCSD_IRQS, NULL);
175 .res = {
176 .start = U300_MMCSD_BASE,
177 .end = U300_MMCSD_BASE + SZ_4K - 1,
178 .flags = IORESOURCE_MEM,
179 },
180 .irq = {IRQ_U300_MMCSD_MCIINTR0, IRQ_U300_MMCSD_MCIINTR1 },
181 /*
182 * This device has a DMA channel but the Linux driver does not use
183 * it currently.
184 */
185};
186 133
187/* 134/*
188 * The order of device declaration may be important, since some devices 135 * The order of device declaration may be important, since some devices
diff --git a/arch/arm/mach-u300/include/mach/system.h b/arch/arm/mach-u300/include/mach/system.h
deleted file mode 100644
index 574d46e3829..00000000000
--- a/arch/arm/mach-u300/include/mach/system.h
+++ /dev/null
@@ -1,14 +0,0 @@
1/*
2 *
3 * arch/arm/mach-u300/include/mach/system.h
4 *
5 *
6 * Copyright (C) 2007-2009 ST-Ericsson AB
7 * License terms: GNU General Public License (GPL) version 2
8 * System shutdown and reset functions.
9 * Author: Linus Walleij <linus.walleij@stericsson.com>
10 */
11static inline void arch_idle(void)
12{
13 cpu_do_idle();
14}
diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c
index c563e5418d8..898a64517b0 100644
--- a/arch/arm/mach-ux500/devices-common.c
+++ b/arch/arm/mach-ux500/devices-common.c
@@ -26,29 +26,22 @@ dbx500_add_amba_device(const char *name, resource_size_t base,
26 struct amba_device *dev; 26 struct amba_device *dev;
27 int ret; 27 int ret;
28 28
29 dev = kzalloc(sizeof *dev, GFP_KERNEL); 29 dev = amba_device_alloc(name, base, SZ_4K);
30 if (!dev) 30 if (!dev)
31 return ERR_PTR(-ENOMEM); 31 return ERR_PTR(-ENOMEM);
32 32
33 dev->dev.init_name = name;
34
35 dev->res.start = base;
36 dev->res.end = base + SZ_4K - 1;
37 dev->res.flags = IORESOURCE_MEM;
38
39 dev->dma_mask = DMA_BIT_MASK(32); 33 dev->dma_mask = DMA_BIT_MASK(32);
40 dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); 34 dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
41 35
42 dev->irq[0] = irq; 36 dev->irq[0] = irq;
43 dev->irq[1] = NO_IRQ;
44 37
45 dev->periphid = periphid; 38 dev->periphid = periphid;
46 39
47 dev->dev.platform_data = pdata; 40 dev->dev.platform_data = pdata;
48 41
49 ret = amba_device_register(dev, &iomem_resource); 42 ret = amba_device_add(dev, &iomem_resource);
50 if (ret) { 43 if (ret) {
51 kfree(dev); 44 amba_device_put(dev);
52 return ERR_PTR(ret); 45 return ERR_PTR(ret);
53 } 46 }
54 47
diff --git a/arch/arm/mach-ux500/include/mach/system.h b/arch/arm/mach-ux500/include/mach/system.h
deleted file mode 100644
index 258e5c919c2..00000000000
--- a/arch/arm/mach-ux500/include/mach/system.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2 * Copyright (C) 2009 ST-Ericsson.
3 *
4 * This file is licensed under the terms of the GNU General Public
5 * License version 2. This program is licensed "as is" without any
6 * warranty of any kind, whether express or implied.
7 */
8#ifndef __ASM_ARCH_SYSTEM_H
9#define __ASM_ARCH_SYSTEM_H
10
11static inline void arch_idle(void)
12{
13 /*
14 * This should do all the clock switching
15 * and wait for interrupt tricks
16 */
17 cpu_do_idle();
18}
19
20#endif
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 02b7b9303f3..4f352e45be0 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -582,58 +582,58 @@ static struct pl022_ssp_controller ssp0_plat_data = {
582 .num_chipselect = 1, 582 .num_chipselect = 1,
583}; 583};
584 584
585#define AACI_IRQ { IRQ_AACI, NO_IRQ } 585#define AACI_IRQ { IRQ_AACI }
586#define MMCI0_IRQ { IRQ_MMCI0A,IRQ_SIC_MMCI0B } 586#define MMCI0_IRQ { IRQ_MMCI0A,IRQ_SIC_MMCI0B }
587#define KMI0_IRQ { IRQ_SIC_KMI0, NO_IRQ } 587#define KMI0_IRQ { IRQ_SIC_KMI0 }
588#define KMI1_IRQ { IRQ_SIC_KMI1, NO_IRQ } 588#define KMI1_IRQ { IRQ_SIC_KMI1 }
589 589
590/* 590/*
591 * These devices are connected directly to the multi-layer AHB switch 591 * These devices are connected directly to the multi-layer AHB switch
592 */ 592 */
593#define SMC_IRQ { NO_IRQ, NO_IRQ } 593#define SMC_IRQ { }
594#define MPMC_IRQ { NO_IRQ, NO_IRQ } 594#define MPMC_IRQ { }
595#define CLCD_IRQ { IRQ_CLCDINT, NO_IRQ } 595#define CLCD_IRQ { IRQ_CLCDINT }
596#define DMAC_IRQ { IRQ_DMAINT, NO_IRQ } 596#define DMAC_IRQ { IRQ_DMAINT }
597 597
598/* 598/*
599 * These devices are connected via the core APB bridge 599 * These devices are connected via the core APB bridge
600 */ 600 */
601#define SCTL_IRQ { NO_IRQ, NO_IRQ } 601#define SCTL_IRQ { }
602#define WATCHDOG_IRQ { IRQ_WDOGINT, NO_IRQ } 602#define WATCHDOG_IRQ { IRQ_WDOGINT }
603#define GPIO0_IRQ { IRQ_GPIOINT0, NO_IRQ } 603#define GPIO0_IRQ { IRQ_GPIOINT0 }
604#define GPIO1_IRQ { IRQ_GPIOINT1, NO_IRQ } 604#define GPIO1_IRQ { IRQ_GPIOINT1 }
605#define RTC_IRQ { IRQ_RTCINT, NO_IRQ } 605#define RTC_IRQ { IRQ_RTCINT }
606 606
607/* 607/*
608 * These devices are connected via the DMA APB bridge 608 * These devices are connected via the DMA APB bridge
609 */ 609 */
610#define SCI_IRQ { IRQ_SCIINT, NO_IRQ } 610#define SCI_IRQ { IRQ_SCIINT }
611#define UART0_IRQ { IRQ_UARTINT0, NO_IRQ } 611#define UART0_IRQ { IRQ_UARTINT0 }
612#define UART1_IRQ { IRQ_UARTINT1, NO_IRQ } 612#define UART1_IRQ { IRQ_UARTINT1 }
613#define UART2_IRQ { IRQ_UARTINT2, NO_IRQ } 613#define UART2_IRQ { IRQ_UARTINT2 }
614#define SSP_IRQ { IRQ_SSPINT, NO_IRQ } 614#define SSP_IRQ { IRQ_SSPINT }
615 615
616/* FPGA Primecells */ 616/* FPGA Primecells */
617AMBA_DEVICE(aaci, "fpga:04", AACI, NULL); 617APB_DEVICE(aaci, "fpga:04", AACI, NULL);
618AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &mmc0_plat_data); 618APB_DEVICE(mmc0, "fpga:05", MMCI0, &mmc0_plat_data);
619AMBA_DEVICE(kmi0, "fpga:06", KMI0, NULL); 619APB_DEVICE(kmi0, "fpga:06", KMI0, NULL);
620AMBA_DEVICE(kmi1, "fpga:07", KMI1, NULL); 620APB_DEVICE(kmi1, "fpga:07", KMI1, NULL);
621 621
622/* DevChip Primecells */ 622/* DevChip Primecells */
623AMBA_DEVICE(smc, "dev:00", SMC, NULL); 623AHB_DEVICE(smc, "dev:00", SMC, NULL);
624AMBA_DEVICE(mpmc, "dev:10", MPMC, NULL); 624AHB_DEVICE(mpmc, "dev:10", MPMC, NULL);
625AMBA_DEVICE(clcd, "dev:20", CLCD, &clcd_plat_data); 625AHB_DEVICE(clcd, "dev:20", CLCD, &clcd_plat_data);
626AMBA_DEVICE(dmac, "dev:30", DMAC, NULL); 626AHB_DEVICE(dmac, "dev:30", DMAC, NULL);
627AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL); 627APB_DEVICE(sctl, "dev:e0", SCTL, NULL);
628AMBA_DEVICE(wdog, "dev:e1", WATCHDOG, NULL); 628APB_DEVICE(wdog, "dev:e1", WATCHDOG, NULL);
629AMBA_DEVICE(gpio0, "dev:e4", GPIO0, &gpio0_plat_data); 629APB_DEVICE(gpio0, "dev:e4", GPIO0, &gpio0_plat_data);
630AMBA_DEVICE(gpio1, "dev:e5", GPIO1, &gpio1_plat_data); 630APB_DEVICE(gpio1, "dev:e5", GPIO1, &gpio1_plat_data);
631AMBA_DEVICE(rtc, "dev:e8", RTC, NULL); 631APB_DEVICE(rtc, "dev:e8", RTC, NULL);
632AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); 632APB_DEVICE(sci0, "dev:f0", SCI, NULL);
633AMBA_DEVICE(uart0, "dev:f1", UART0, NULL); 633APB_DEVICE(uart0, "dev:f1", UART0, NULL);
634AMBA_DEVICE(uart1, "dev:f2", UART1, NULL); 634APB_DEVICE(uart1, "dev:f2", UART1, NULL);
635AMBA_DEVICE(uart2, "dev:f3", UART2, NULL); 635APB_DEVICE(uart2, "dev:f3", UART2, NULL);
636AMBA_DEVICE(ssp0, "dev:f4", SSP, &ssp0_plat_data); 636APB_DEVICE(ssp0, "dev:f4", SSP, &ssp0_plat_data);
637 637
638static struct amba_device *amba_devs[] __initdata = { 638static struct amba_device *amba_devs[] __initdata = {
639 &dmac_device, 639 &dmac_device,
diff --git a/arch/arm/mach-versatile/core.h b/arch/arm/mach-versatile/core.h
index 2ef2f555f31..683e60776a8 100644
--- a/arch/arm/mach-versatile/core.h
+++ b/arch/arm/mach-versatile/core.h
@@ -36,20 +36,10 @@ extern unsigned int mmc_status(struct device *dev);
36extern struct of_dev_auxdata versatile_auxdata_lookup[]; 36extern struct of_dev_auxdata versatile_auxdata_lookup[];
37#endif 37#endif
38 38
39#define AMBA_DEVICE(name,busid,base,plat) \ 39#define APB_DEVICE(name, busid, base, plat) \
40static struct amba_device name##_device = { \ 40static AMBA_APB_DEVICE(name, busid, 0, VERSATILE_##base##_BASE, base##_IRQ, plat)
41 .dev = { \ 41
42 .coherent_dma_mask = ~0, \ 42#define AHB_DEVICE(name, busid, base, plat) \
43 .init_name = busid, \ 43static AMBA_AHB_DEVICE(name, busid, 0, VERSATILE_##base##_BASE, base##_IRQ, plat)
44 .platform_data = plat, \
45 }, \
46 .res = { \
47 .start = VERSATILE_##base##_BASE, \
48 .end = (VERSATILE_##base##_BASE) + SZ_4K - 1,\
49 .flags = IORESOURCE_MEM, \
50 }, \
51 .dma_mask = ~0, \
52 .irq = base##_IRQ, \
53}
54 44
55#endif 45#endif
diff --git a/arch/arm/mach-versatile/include/mach/system.h b/arch/arm/mach-versatile/include/mach/system.h
deleted file mode 100644
index f3fa347895f..00000000000
--- a/arch/arm/mach-versatile/include/mach/system.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * arch/arm/mach-versatile/include/mach/system.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24static inline void arch_idle(void)
25{
26 /*
27 * This should do all the clock switching
28 * and wait for interrupt tricks
29 */
30 cpu_do_idle();
31}
32
33#endif
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c
index 9581c197500..19738331bd3 100644
--- a/arch/arm/mach-versatile/versatile_pb.c
+++ b/arch/arm/mach-versatile/versatile_pb.c
@@ -58,28 +58,28 @@ static struct pl061_platform_data gpio3_plat_data = {
58 .irq_base = IRQ_GPIO3_START, 58 .irq_base = IRQ_GPIO3_START,
59}; 59};
60 60
61#define UART3_IRQ { IRQ_SIC_UART3, NO_IRQ } 61#define UART3_IRQ { IRQ_SIC_UART3 }
62#define SCI1_IRQ { IRQ_SIC_SCI3, NO_IRQ } 62#define SCI1_IRQ { IRQ_SIC_SCI3 }
63#define MMCI1_IRQ { IRQ_MMCI1A, IRQ_SIC_MMCI1B } 63#define MMCI1_IRQ { IRQ_MMCI1A, IRQ_SIC_MMCI1B }
64 64
65/* 65/*
66 * These devices are connected via the core APB bridge 66 * These devices are connected via the core APB bridge
67 */ 67 */
68#define GPIO2_IRQ { IRQ_GPIOINT2, NO_IRQ } 68#define GPIO2_IRQ { IRQ_GPIOINT2 }
69#define GPIO3_IRQ { IRQ_GPIOINT3, NO_IRQ } 69#define GPIO3_IRQ { IRQ_GPIOINT3 }
70 70
71/* 71/*
72 * These devices are connected via the DMA APB bridge 72 * These devices are connected via the DMA APB bridge
73 */ 73 */
74 74
75/* FPGA Primecells */ 75/* FPGA Primecells */
76AMBA_DEVICE(uart3, "fpga:09", UART3, NULL); 76APB_DEVICE(uart3, "fpga:09", UART3, NULL);
77AMBA_DEVICE(sci1, "fpga:0a", SCI1, NULL); 77APB_DEVICE(sci1, "fpga:0a", SCI1, NULL);
78AMBA_DEVICE(mmc1, "fpga:0b", MMCI1, &mmc1_plat_data); 78APB_DEVICE(mmc1, "fpga:0b", MMCI1, &mmc1_plat_data);
79 79
80/* DevChip Primecells */ 80/* DevChip Primecells */
81AMBA_DEVICE(gpio2, "dev:e6", GPIO2, &gpio2_plat_data); 81APB_DEVICE(gpio2, "dev:e6", GPIO2, &gpio2_plat_data);
82AMBA_DEVICE(gpio3, "dev:e7", GPIO3, &gpio3_plat_data); 82APB_DEVICE(gpio3, "dev:e7", GPIO3, &gpio3_plat_data);
83 83
84static struct amba_device *amba_devs[] __initdata = { 84static struct amba_device *amba_devs[] __initdata = {
85 &uart3_device, 85 &uart3_device,
diff --git a/arch/arm/mach-vexpress/core.h b/arch/arm/mach-vexpress/core.h
index f4397159c17..9f0f2827c71 100644
--- a/arch/arm/mach-vexpress/core.h
+++ b/arch/arm/mach-vexpress/core.h
@@ -1,19 +1,2 @@
1#define __MMIO_P2V(x) (((x) & 0xfffff) | (((x) & 0x0f000000) >> 4) | 0xf8000000) 1#define __MMIO_P2V(x) (((x) & 0xfffff) | (((x) & 0x0f000000) >> 4) | 0xf8000000)
2#define MMIO_P2V(x) ((void __iomem *)__MMIO_P2V(x)) 2#define MMIO_P2V(x) ((void __iomem *)__MMIO_P2V(x))
3
4#define AMBA_DEVICE(name,busid,base,plat) \
5struct amba_device name##_device = { \
6 .dev = { \
7 .coherent_dma_mask = ~0UL, \
8 .init_name = busid, \
9 .platform_data = plat, \
10 }, \
11 .res = { \
12 .start = base, \
13 .end = base + SZ_4K - 1, \
14 .flags = IORESOURCE_MEM, \
15 }, \
16 .dma_mask = ~0UL, \
17 .irq = IRQ_##base, \
18 /* .dma = DMA_##base,*/ \
19}
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c
index 2b1e836a76e..3fde21c7b31 100644
--- a/arch/arm/mach-vexpress/ct-ca9x4.c
+++ b/arch/arm/mach-vexpress/ct-ca9x4.c
@@ -109,10 +109,10 @@ static struct clcd_board ct_ca9x4_clcd_data = {
109 .remove = versatile_clcd_remove_dma, 109 .remove = versatile_clcd_remove_dma,
110}; 110};
111 111
112static AMBA_DEVICE(clcd, "ct:clcd", CT_CA9X4_CLCDC, &ct_ca9x4_clcd_data); 112static AMBA_AHB_DEVICE(clcd, "ct:clcd", 0, CT_CA9X4_CLCDC, IRQ_CT_CA9X4_CLCDC, &ct_ca9x4_clcd_data);
113static AMBA_DEVICE(dmc, "ct:dmc", CT_CA9X4_DMC, NULL); 113static AMBA_APB_DEVICE(dmc, "ct:dmc", 0, CT_CA9X4_DMC, IRQ_CT_CA9X4_DMC, NULL);
114static AMBA_DEVICE(smc, "ct:smc", CT_CA9X4_SMC, NULL); 114static AMBA_APB_DEVICE(smc, "ct:smc", 0, CT_CA9X4_SMC, IRQ_CT_CA9X4_SMC, NULL);
115static AMBA_DEVICE(gpio, "ct:gpio", CT_CA9X4_GPIO, NULL); 115static AMBA_APB_DEVICE(gpio, "ct:gpio", 0, CT_CA9X4_GPIO, IRQ_CT_CA9X4_GPIO, NULL);
116 116
117static struct amba_device *ct_ca9x4_amba_devs[] __initdata = { 117static struct amba_device *ct_ca9x4_amba_devs[] __initdata = {
118 &clcd_device, 118 &clcd_device,
diff --git a/arch/arm/mach-vexpress/include/mach/ct-ca9x4.h b/arch/arm/mach-vexpress/include/mach/ct-ca9x4.h
index a34d3d4faae..a40468f3b93 100644
--- a/arch/arm/mach-vexpress/include/mach/ct-ca9x4.h
+++ b/arch/arm/mach-vexpress/include/mach/ct-ca9x4.h
@@ -35,7 +35,7 @@
35 * Interrupts. Those in {} are for AMBA devices 35 * Interrupts. Those in {} are for AMBA devices
36 */ 36 */
37#define IRQ_CT_CA9X4_CLCDC { 76 } 37#define IRQ_CT_CA9X4_CLCDC { 76 }
38#define IRQ_CT_CA9X4_DMC { -1 } 38#define IRQ_CT_CA9X4_DMC { 0 }
39#define IRQ_CT_CA9X4_SMC { 77, 78 } 39#define IRQ_CT_CA9X4_SMC { 77, 78 }
40#define IRQ_CT_CA9X4_TIMER0 80 40#define IRQ_CT_CA9X4_TIMER0 80
41#define IRQ_CT_CA9X4_TIMER1 81 41#define IRQ_CT_CA9X4_TIMER1 81
diff --git a/arch/arm/mach-vexpress/include/mach/system.h b/arch/arm/mach-vexpress/include/mach/system.h
deleted file mode 100644
index f653a8e265b..00000000000
--- a/arch/arm/mach-vexpress/include/mach/system.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * arch/arm/mach-vexpress/include/mach/system.h
3 *
4 * Copyright (C) 2003 ARM Limited
5 * Copyright (C) 2000 Deep Blue Solutions Ltd
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H
23
24static inline void arch_idle(void)
25{
26 /*
27 * This should do all the clock switching
28 * and wait for interrupt tricks
29 */
30 cpu_do_idle();
31}
32
33#endif
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index b4a28ca0e50..ad64f97a200 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -266,16 +266,16 @@ static struct mmci_platform_data v2m_mmci_data = {
266 .status = v2m_mmci_status, 266 .status = v2m_mmci_status,
267}; 267};
268 268
269static AMBA_DEVICE(aaci, "mb:aaci", V2M_AACI, NULL); 269static AMBA_APB_DEVICE(aaci, "mb:aaci", 0, V2M_AACI, IRQ_V2M_AACI, NULL);
270static AMBA_DEVICE(mmci, "mb:mmci", V2M_MMCI, &v2m_mmci_data); 270static AMBA_APB_DEVICE(mmci, "mb:mmci", 0, V2M_MMCI, IRQ_V2M_MMCI, &v2m_mmci_data);
271static AMBA_DEVICE(kmi0, "mb:kmi0", V2M_KMI0, NULL); 271static AMBA_APB_DEVICE(kmi0, "mb:kmi0", 0, V2M_KMI0, IRQ_V2M_KMI0, NULL);
272static AMBA_DEVICE(kmi1, "mb:kmi1", V2M_KMI1, NULL); 272static AMBA_APB_DEVICE(kmi1, "mb:kmi1", 0, V2M_KMI1, IRQ_V2M_KMI1, NULL);
273static AMBA_DEVICE(uart0, "mb:uart0", V2M_UART0, NULL); 273static AMBA_APB_DEVICE(uart0, "mb:uart0", 0, V2M_UART0, IRQ_V2M_UART0, NULL);
274static AMBA_DEVICE(uart1, "mb:uart1", V2M_UART1, NULL); 274static AMBA_APB_DEVICE(uart1, "mb:uart1", 0, V2M_UART1, IRQ_V2M_UART1, NULL);
275static AMBA_DEVICE(uart2, "mb:uart2", V2M_UART2, NULL); 275static AMBA_APB_DEVICE(uart2, "mb:uart2", 0, V2M_UART2, IRQ_V2M_UART2, NULL);
276static AMBA_DEVICE(uart3, "mb:uart3", V2M_UART3, NULL); 276static AMBA_APB_DEVICE(uart3, "mb:uart3", 0, V2M_UART3, IRQ_V2M_UART3, NULL);
277static AMBA_DEVICE(wdt, "mb:wdt", V2M_WDT, NULL); 277static AMBA_APB_DEVICE(wdt, "mb:wdt", 0, V2M_WDT, IRQ_V2M_WDT, NULL);
278static AMBA_DEVICE(rtc, "mb:rtc", V2M_RTC, NULL); 278static AMBA_APB_DEVICE(rtc, "mb:rtc", 0, V2M_RTC, IRQ_V2M_RTC, NULL);
279 279
280static struct amba_device *v2m_amba_devs[] __initdata = { 280static struct amba_device *v2m_amba_devs[] __initdata = {
281 &aaci_device, 281 &aaci_device,
diff --git a/arch/arm/mach-vt8500/include/mach/system.h b/arch/arm/mach-vt8500/include/mach/system.h
index d6c757eaf26..58fa8010ee6 100644
--- a/arch/arm/mach-vt8500/include/mach/system.h
+++ b/arch/arm/mach-vt8500/include/mach/system.h
@@ -7,11 +7,6 @@
7/* PM Software Reset request register */ 7/* PM Software Reset request register */
8#define VT8500_PMSR_VIRT 0xf8130060 8#define VT8500_PMSR_VIRT 0xf8130060
9 9
10static inline void arch_idle(void)
11{
12 cpu_do_idle();
13}
14
15static inline void arch_reset(char mode, const char *cmd) 10static inline void arch_reset(char mode, const char *cmd)
16{ 11{
17 writel(1, VT8500_PMSR_VIRT); 12 writel(1, VT8500_PMSR_VIRT);
diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c
index 78110befb7a..db82568a998 100644
--- a/arch/arm/mach-w90x900/dev.c
+++ b/arch/arm/mach-w90x900/dev.c
@@ -530,6 +530,7 @@ static struct platform_device *nuc900_public_dev[] __initdata = {
530 530
531void __init nuc900_board_init(struct platform_device **device, int size) 531void __init nuc900_board_init(struct platform_device **device, int size)
532{ 532{
533 disable_hlt();
533 platform_add_devices(device, size); 534 platform_add_devices(device, size);
534 platform_add_devices(nuc900_public_dev, ARRAY_SIZE(nuc900_public_dev)); 535 platform_add_devices(nuc900_public_dev, ARRAY_SIZE(nuc900_public_dev));
535 spi_register_board_info(nuc900_spi_board_info, 536 spi_register_board_info(nuc900_spi_board_info,
diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h
deleted file mode 100644
index 2aaeb931161..00000000000
--- a/arch/arm/mach-w90x900/include/mach/system.h
+++ /dev/null
@@ -1,19 +0,0 @@
1/*
2 * arch/arm/mach-w90x900/include/mach/system.h
3 *
4 * Copyright (c) 2008 Nuvoton technology corporation
5 * All rights reserved.
6 *
7 * Wan ZongShun <mcuos.com@gmail.com>
8 *
9 * Based on arch/arm/mach-s3c2410/include/mach/system.h
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 */
17static void arch_idle(void)
18{
19}
diff --git a/arch/arm/mach-zynq/include/mach/system.h b/arch/arm/mach-zynq/include/mach/system.h
deleted file mode 100644
index 8e88e0b8d2b..00000000000
--- a/arch/arm/mach-zynq/include/mach/system.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/* arch/arm/mach-zynq/include/mach/system.h
2 *
3 * Copyright (C) 2011 Xilinx
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 */
14
15#ifndef __MACH_SYSTEM_H__
16#define __MACH_SYSTEM_H__
17
18static inline void arch_idle(void)
19{
20 cpu_do_idle();
21}
22
23#endif
diff --git a/arch/arm/plat-mxc/include/mach/system.h b/arch/arm/plat-mxc/include/mach/system.h
deleted file mode 100644
index 13ad0df2e86..00000000000
--- a/arch/arm/plat-mxc/include/mach/system.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/*
2 * Copyright (C) 1999 ARM Limited
3 * Copyright (C) 2000 Deep Blue Solutions Ltd
4 * Copyright 2004-2008 Freescale Semiconductor, Inc. All Rights Reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#ifndef __ASM_ARCH_MXC_SYSTEM_H__
18#define __ASM_ARCH_MXC_SYSTEM_H__
19
20static inline void arch_idle(void)
21{
22 cpu_do_idle();
23}
24
25#endif /* __ASM_ARCH_MXC_SYSTEM_H__ */
diff --git a/arch/arm/plat-nomadik/Kconfig b/arch/arm/plat-nomadik/Kconfig
index bca4914b4b9..4c48c8b60b5 100644
--- a/arch/arm/plat-nomadik/Kconfig
+++ b/arch/arm/plat-nomadik/Kconfig
@@ -23,7 +23,6 @@ config HAS_MTU
23config NOMADIK_MTU_SCHED_CLOCK 23config NOMADIK_MTU_SCHED_CLOCK
24 bool 24 bool
25 depends on HAS_MTU 25 depends on HAS_MTU
26 select HAVE_SCHED_CLOCK
27 help 26 help
28 Use the Multi Timer Unit as the sched_clock. 27 Use the Multi Timer Unit as the sched_clock.
29 28
diff --git a/arch/arm/plat-omap/include/plat/system.h b/arch/arm/plat-omap/include/plat/system.h
deleted file mode 100644
index 8e5ebd74b12..00000000000
--- a/arch/arm/plat-omap/include/plat/system.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/*
2 * Copied from arch/arm/mach-sa1100/include/mach/system.h
3 * Copyright (c) 1999 Nicolas Pitre <nico@fluxnic.net>
4 */
5#ifndef __ASM_ARCH_SYSTEM_H
6#define __ASM_ARCH_SYSTEM_H
7
8#include <asm/proc-fns.h>
9
10static inline void arch_idle(void)
11{
12 cpu_do_idle();
13}
14
15#endif
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index 21f1fda8b66..32a09931350 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -32,6 +32,7 @@
32#include <linux/io.h> 32#include <linux/io.h>
33 33
34#include <mach/hardware.h> 34#include <mach/hardware.h>
35#include <mach/regs-clock.h>
35#include <asm/irq.h> 36#include <asm/irq.h>
36#include <asm/cacheflush.h> 37#include <asm/cacheflush.h>
37 38
@@ -190,8 +191,34 @@ static unsigned long s3c24xx_read_idcode_v4(void)
190 return __raw_readl(S3C2410_GSTATUS1); 191 return __raw_readl(S3C2410_GSTATUS1);
191} 192}
192 193
194static void s3c24xx_default_idle(void)
195{
196 unsigned long tmp;
197 int i;
198
199 /* idle the system by using the idle mode which will wait for an
200 * interrupt to happen before restarting the system.
201 */
202
203 /* Warning: going into idle state upsets jtag scanning */
204
205 __raw_writel(__raw_readl(S3C2410_CLKCON) | S3C2410_CLKCON_IDLE,
206 S3C2410_CLKCON);
207
208 /* the samsung port seems to do a loop and then unset idle.. */
209 for (i = 0; i < 50; i++)
210 tmp += __raw_readl(S3C2410_CLKCON); /* ensure loop not optimised out */
211
212 /* this bit is not cleared on re-start... */
213
214 __raw_writel(__raw_readl(S3C2410_CLKCON) & ~S3C2410_CLKCON_IDLE,
215 S3C2410_CLKCON);
216}
217
193void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) 218void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
194{ 219{
220 arm_pm_idle = s3c24xx_default_idle;
221
195 /* initialise the io descriptors we need for initialisation */ 222 /* initialise the io descriptors we need for initialisation */
196 iotable_init(mach_desc, size); 223 iotable_init(mach_desc, size);
197 iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); 224 iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
diff --git a/arch/arm/plat-spear/include/plat/system.h b/arch/arm/plat-spear/include/plat/system.h
deleted file mode 100644
index 86c6f83b44c..00000000000
--- a/arch/arm/plat-spear/include/plat/system.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * arch/arm/plat-spear/include/plat/system.h
3 *
4 * SPEAr platform specific architecture functions
5 *
6 * Copyright (C) 2009 ST Microelectronics
7 * Viresh Kumar<viresh.kumar@st.com>
8 *
9 * This file is licensed under the terms of the GNU General Public
10 * License version 2. This program is licensed "as is" without any
11 * warranty of any kind, whether express or implied.
12 */
13
14#ifndef __PLAT_SYSTEM_H
15#define __PLAT_SYSTEM_H
16
17static inline void arch_idle(void)
18{
19 /*
20 * This should do all the clock switching
21 * and wait for interrupt tricks
22 */
23 cpu_do_idle();
24}
25
26#endif /* __PLAT_SYSTEM_H */
diff --git a/arch/arm/plat-versatile/Kconfig b/arch/arm/plat-versatile/Kconfig
index aa63f38f284..043f7b02a9e 100644
--- a/arch/arm/plat-versatile/Kconfig
+++ b/arch/arm/plat-versatile/Kconfig
@@ -12,6 +12,5 @@ config PLAT_VERSATILE_LEDS
12 12
13config PLAT_VERSATILE_SCHED_CLOCK 13config PLAT_VERSATILE_SCHED_CLOCK
14 def_bool y 14 def_bool y
15 select HAVE_SCHED_CLOCK
16 15
17endif 16endif