aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/include/asm/parport.h4
-rw-r--r--arch/alpha/kernel/pci.c12
-rw-r--r--arch/alpha/kernel/smp.c6
-rw-r--r--arch/alpha/kernel/sys_titan.c2
-rw-r--r--arch/arm/Kconfig23
-rw-r--r--arch/arm/Kconfig.debug8
-rw-r--r--arch/arm/boot/dts/Makefile3
-rw-r--r--arch/arm/boot/dts/armada-370-xp.dtsi6
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78230.dtsi9
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78260.dtsi8
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78460.dtsi8
-rw-r--r--arch/arm/boot/dts/armada-xp.dtsi14
-rw-r--r--arch/arm/boot/dts/dbx5x0.dtsi4
-rw-r--r--arch/arm/boot/dts/dove.dtsi1
-rw-r--r--arch/arm/boot/dts/ecx-2000.dts4
-rw-r--r--arch/arm/boot/dts/exynos4210-smdkv310.dts2
-rw-r--r--arch/arm/boot/dts/exynos5250.dtsi2
-rw-r--r--arch/arm/boot/dts/exynos5440-ssdk5440.dts2
-rw-r--r--arch/arm/boot/dts/highbank.dts20
-rw-r--r--arch/arm/boot/dts/imx23-olinuxino.dts8
-rw-r--r--arch/arm/boot/dts/imx31-bug.dts2
-rw-r--r--arch/arm/boot/dts/imx53.dtsi2
-rw-r--r--arch/arm/boot/dts/kirkwood-6282.dtsi1
-rw-r--r--arch/arm/boot/dts/kirkwood-topkick.dts17
-rw-r--r--arch/arm/boot/dts/kirkwood.dtsi1
-rw-r--r--arch/arm/boot/dts/twl4030.dtsi4
-rw-r--r--arch/arm/boot/dts/wm8850-w70v2.dts47
-rw-r--r--arch/arm/boot/dts/wm8850.dtsi224
-rw-r--r--arch/arm/common/Kconfig23
-rw-r--r--arch/arm/common/Makefile2
-rw-r--r--arch/arm/common/gic.c811
-rw-r--r--arch/arm/common/sa1111.c5
-rw-r--r--arch/arm/common/scoop.c6
-rw-r--r--arch/arm/common/vic.c459
-rw-r--r--arch/arm/configs/multi_v7_defconfig1
-rw-r--r--arch/arm/configs/mvebu_defconfig4
-rw-r--r--arch/arm/configs/omap2plus_defconfig5
-rw-r--r--arch/arm/include/asm/hardware/gic.h57
-rw-r--r--arch/arm/include/asm/hardware/vic.h57
-rw-r--r--arch/arm/include/asm/mach/irq.h1
-rw-r--r--arch/arm/include/debug/vt8500.S (renamed from arch/arm/mach-vt8500/include/mach/debug-macro.S)24
-rw-r--r--arch/arm/kernel/bios32.c18
-rw-r--r--arch/arm/kernel/etm.c4
-rw-r--r--arch/arm/kernel/irq.c10
-rw-r--r--arch/arm/kernel/perf_event_cpu.c10
-rw-r--r--arch/arm/kernel/perf_event_v6.c4
-rw-r--r--arch/arm/kernel/perf_event_v7.c12
-rw-r--r--arch/arm/kernel/perf_event_xscale.c4
-rw-r--r--arch/arm/kernel/smp.c3
-rw-r--r--arch/arm/kernel/smp_twd.c1
-rw-r--r--arch/arm/mach-at91/at91rm9200_time.c7
-rw-r--r--arch/arm/mach-bcm/board_bcm.c16
-rw-r--r--arch/arm/mach-cns3xxx/cns3420vb.c2
-rw-r--r--arch/arm/mach-cns3xxx/core.c15
-rw-r--r--arch/arm/mach-davinci/board-dm646x-evm.c2
-rw-r--r--arch/arm/mach-davinci/cdce949.c4
-rw-r--r--arch/arm/mach-dove/pcie.c2
-rw-r--r--arch/arm/mach-ep93xx/adssphere.c2
-rw-r--r--arch/arm/mach-ep93xx/core.c3
-rw-r--r--arch/arm/mach-ep93xx/edb93xx.c9
-rw-r--r--arch/arm/mach-ep93xx/gesbc9312.c2
-rw-r--r--arch/arm/mach-ep93xx/micro9.c5
-rw-r--r--arch/arm/mach-ep93xx/simone.c2
-rw-r--r--arch/arm/mach-ep93xx/snappercl15.c2
-rw-r--r--arch/arm/mach-ep93xx/ts72xx.c2
-rw-r--r--arch/arm/mach-ep93xx/vision_ep9307.c2
-rw-r--r--arch/arm/mach-exynos/Kconfig2
-rw-r--r--arch/arm/mach-exynos/common.c17
-rw-r--r--arch/arm/mach-exynos/include/mach/regs-irq.h2
-rw-r--r--arch/arm/mach-exynos/mach-armlex4210.c2
-rw-r--r--arch/arm/mach-exynos/mach-exynos4-dt.c2
-rw-r--r--arch/arm/mach-exynos/mach-exynos5-dt.c2
-rw-r--r--arch/arm/mach-exynos/mach-nuri.c2
-rw-r--r--arch/arm/mach-exynos/mach-origen.c2
-rw-r--r--arch/arm/mach-exynos/mach-smdk4x12.c3
-rw-r--r--arch/arm/mach-exynos/mach-smdkv310.c3
-rw-r--r--arch/arm/mach-exynos/mach-universal_c210.c2
-rw-r--r--arch/arm/mach-exynos/mct.c19
-rw-r--r--arch/arm/mach-exynos/platsmp.c6
-rw-r--r--arch/arm/mach-footbridge/dc21285-timer.c6
-rw-r--r--arch/arm/mach-highbank/highbank.c13
-rw-r--r--arch/arm/mach-highbank/hotplug.c2
-rw-r--r--arch/arm/mach-highbank/platsmp.c18
-rw-r--r--arch/arm/mach-highbank/pm.c19
-rw-r--r--arch/arm/mach-highbank/sysregs.h23
-rw-r--r--arch/arm/mach-highbank/system.c4
-rw-r--r--arch/arm/mach-imx/Kconfig2
-rw-r--r--arch/arm/mach-imx/common.h1
-rw-r--r--arch/arm/mach-imx/cpufreq.c2
-rw-r--r--arch/arm/mach-imx/epit.c15
-rw-r--r--arch/arm/mach-imx/gpc.c2
-rw-r--r--arch/arm/mach-imx/mach-imx6q.c10
-rw-r--r--arch/arm/mach-imx/mmdc.c2
-rw-r--r--arch/arm/mach-imx/platsmp.c4
-rw-r--r--arch/arm/mach-imx/time.c15
-rw-r--r--arch/arm/mach-iop13xx/pci.c2
-rw-r--r--arch/arm/mach-ixp4xx/common.c11
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c4
-rw-r--r--arch/arm/mach-kirkwood/board-usi_topkick.c4
-rw-r--r--arch/arm/mach-kirkwood/pcie.c2
-rw-r--r--arch/arm/mach-ks8695/board-acs5k.c2
-rw-r--r--arch/arm/mach-lpc32xx/timer.c9
-rw-r--r--arch/arm/mach-mmp/sram.c4
-rw-r--r--arch/arm/mach-mmp/time.c7
-rw-r--r--arch/arm/mach-msm/board-dt-8660.c16
-rw-r--r--arch/arm/mach-msm/board-dt-8960.c16
-rw-r--r--arch/arm/mach-msm/platsmp.c6
-rw-r--r--arch/arm/mach-msm/proc_comm.c2
-rw-r--r--arch/arm/mach-msm/smd.c2
-rw-r--r--arch/arm/mach-msm/timer.c7
-rw-r--r--arch/arm/mach-mv78xx0/pcie.c2
-rw-r--r--arch/arm/mach-mxs/timer.c24
-rw-r--r--arch/arm/mach-netx/generic.c2
-rw-r--r--arch/arm/mach-netx/nxdb500.c2
-rw-r--r--arch/arm/mach-netx/nxdkn.c2
-rw-r--r--arch/arm/mach-netx/nxeb500hmi.c2
-rw-r--r--arch/arm/mach-netx/time.c10
-rw-r--r--arch/arm/mach-nomadik/board-nhk8815.c3
-rw-r--r--arch/arm/mach-nomadik/cpu-8815.c2
-rw-r--r--arch/arm/mach-nomadik/include/mach/irqs.h78
-rw-r--r--arch/arm/mach-omap1/Makefile2
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c2
-rw-r--r--arch/arm/mach-omap1/fb.c80
-rw-r--r--arch/arm/mach-omap1/mailbox.c6
-rw-r--r--arch/arm/mach-omap1/time.c11
-rw-r--r--arch/arm/mach-omap1/timer32k.c12
-rw-r--r--arch/arm/mach-omap1/usb.c8
-rw-r--r--arch/arm/mach-omap2/Makefile2
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c3
-rw-r--r--arch/arm/mach-omap2/board-generic.c3
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c3
-rw-r--r--arch/arm/mach-omap2/cclock3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/control.h2
-rw-r--r--arch/arm/mach-omap2/dpll3xxx.c3
-rw-r--r--arch/arm/mach-omap2/drm.c1
-rw-r--r--arch/arm/mach-omap2/dss-common.c3
-rw-r--r--arch/arm/mach-omap2/fb.c (renamed from arch/arm/plat-omap/fb.c)50
-rw-r--r--arch/arm/mach-omap2/gpmc.c12
-rw-r--r--arch/arm/mach-omap2/mailbox.c6
-rw-r--r--arch/arm/mach-omap2/omap-smp.c6
-rw-r--r--arch/arm/mach-omap2/omap-wakeupgen.c3
-rw-r--r--arch/arm/mach-omap2/omap4-common.c11
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_33xx_data.c6
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c1
-rw-r--r--arch/arm/mach-omap2/omap_twl.c8
-rw-r--r--arch/arm/mach-omap2/pmu.c2
-rw-r--r--arch/arm/mach-omap2/prm2xxx.c91
-rw-r--r--arch/arm/mach-omap2/prm2xxx_3xxx.c22
-rw-r--r--arch/arm/mach-omap2/prm3xxx.c31
-rw-r--r--arch/arm/mach-omap2/prm44xx.c6
-rw-r--r--arch/arm/mach-omap2/prm44xx.h4
-rw-r--r--arch/arm/mach-omap2/timer.c13
-rw-r--r--arch/arm/mach-orion5x/pci.c2
-rw-r--r--arch/arm/mach-picoxcell/common.c15
-rw-r--r--arch/arm/mach-prima2/pm.c2
-rw-r--r--arch/arm/mach-prima2/rtciobrg.c2
-rw-r--r--arch/arm/mach-prima2/timer-prima2.c10
-rw-r--r--arch/arm/mach-pxa/corgi_pm.c2
-rw-r--r--arch/arm/mach-pxa/sharpsl_pm.c4
-rw-r--r--arch/arm/mach-pxa/spitz_pm.c2
-rw-r--r--arch/arm/mach-pxa/time.c8
-rw-r--r--arch/arm/mach-pxa/tosa-bt.c4
-rw-r--r--arch/arm/mach-realview/core.c1
-rw-r--r--arch/arm/mach-realview/platsmp.c3
-rw-r--r--arch/arm/mach-realview/realview_eb.c3
-rw-r--r--arch/arm/mach-realview/realview_pb1176.c3
-rw-r--r--arch/arm/mach-realview/realview_pb11mp.c3
-rw-r--r--arch/arm/mach-realview/realview_pba8.c3
-rw-r--r--arch/arm/mach-realview/realview_pbx.c3
-rw-r--r--arch/arm/mach-s3c24xx/h1940-bluetooth.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-osiris-dvs.c6
-rw-r--r--arch/arm/mach-s3c64xx/common.c2
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/regs-irq.h1
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/tick.h2
-rw-r--r--arch/arm/mach-s3c64xx/mach-anw6410.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410-module.c6
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410.c70
-rw-r--r--arch/arm/mach-s3c64xx/mach-hmt.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-mini6410.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-ncp.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-real6410.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq5.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq7.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6400.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6410.c2
-rw-r--r--arch/arm/mach-s5p64x0/include/mach/regs-irq.h1
-rw-r--r--arch/arm/mach-s5p64x0/include/mach/tick.h29
-rw-r--r--arch/arm/mach-s5p64x0/mach-smdk6440.c2
-rw-r--r--arch/arm/mach-s5p64x0/mach-smdk6450.c2
-rw-r--r--arch/arm/mach-s5pc100/include/mach/regs-irq.h1
-rw-r--r--arch/arm/mach-s5pc100/include/mach/tick.h2
-rw-r--r--arch/arm/mach-s5pc100/mach-smdkc100.c2
-rw-r--r--arch/arm/mach-s5pv210/include/mach/regs-irq.h1
-rw-r--r--arch/arm/mach-s5pv210/include/mach/tick.h26
-rw-r--r--arch/arm/mach-s5pv210/mach-aquila.c2
-rw-r--r--arch/arm/mach-s5pv210/mach-goni.c2
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkc110.c2
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkv210.c2
-rw-r--r--arch/arm/mach-s5pv210/mach-torbreck.c2
-rw-r--r--arch/arm/mach-sa1100/jornada720_ssp.c2
-rw-r--r--arch/arm/mach-sa1100/neponset.c8
-rw-r--r--arch/arm/mach-sa1100/time.c8
-rw-r--r--arch/arm/mach-shmobile/board-ag5evm.c3
-rw-r--r--arch/arm/mach-shmobile/board-kota2.c3
-rw-r--r--arch/arm/mach-shmobile/board-kzm9d.c2
-rw-r--r--arch/arm/mach-shmobile/board-kzm9g.c3
-rw-r--r--arch/arm/mach-shmobile/board-marzen.c2
-rw-r--r--arch/arm/mach-shmobile/intc-r8a7779.c2
-rw-r--r--arch/arm/mach-shmobile/intc-sh73a0.c2
-rw-r--r--arch/arm/mach-shmobile/platsmp.c3
-rw-r--r--arch/arm/mach-shmobile/setup-emev2.c17
-rw-r--r--arch/arm/mach-shmobile/smp-emev2.c4
-rw-r--r--arch/arm/mach-shmobile/smp-r8a7779.c2
-rw-r--r--arch/arm/mach-shmobile/smp-sh73a0.c2
-rw-r--r--arch/arm/mach-socfpga/platsmp.c4
-rw-r--r--arch/arm/mach-socfpga/socfpga.c14
-rw-r--r--arch/arm/mach-spear13xx/include/mach/generic.h1
-rw-r--r--arch/arm/mach-spear13xx/platsmp.c4
-rw-r--r--arch/arm/mach-spear13xx/spear1310.c5
-rw-r--r--arch/arm/mach-spear13xx/spear1340.c5
-rw-r--r--arch/arm/mach-spear13xx/spear13xx.c13
-rw-r--r--arch/arm/mach-spear3xx/include/mach/generic.h1
-rw-r--r--arch/arm/mach-spear3xx/spear300.c5
-rw-r--r--arch/arm/mach-spear3xx/spear310.c5
-rw-r--r--arch/arm/mach-spear3xx/spear320.c5
-rw-r--r--arch/arm/mach-spear3xx/spear3xx.c16
-rw-r--r--arch/arm/mach-spear6xx/spear6xx.c16
-rw-r--r--arch/arm/mach-sunxi/sunxi.c6
-rw-r--r--arch/arm/mach-tegra/board-dt-tegra20.c3
-rw-r--r--arch/arm/mach-tegra/board-dt-tegra30.c2
-rw-r--r--arch/arm/mach-tegra/common.c10
-rw-r--r--arch/arm/mach-tegra/irq.c3
-rw-r--r--arch/arm/mach-tegra/pcie.c6
-rw-r--r--arch/arm/mach-tegra/platsmp.c4
-rw-r--r--arch/arm/mach-tegra/tegra2_emc.c6
-rw-r--r--arch/arm/mach-tegra/timer.c8
-rw-r--r--arch/arm/mach-u300/core.c3
-rw-r--r--arch/arm/mach-u300/dummyspichip.c6
-rw-r--r--arch/arm/mach-ux500/board-mop500.c5
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c5
-rw-r--r--arch/arm/mach-ux500/cpu.c10
-rw-r--r--arch/arm/mach-ux500/platsmp.c6
-rw-r--r--arch/arm/mach-versatile/core.c2
-rw-r--r--arch/arm/mach-versatile/include/mach/irqs.h6
-rw-r--r--arch/arm/mach-versatile/versatile_ab.c2
-rw-r--r--arch/arm/mach-versatile/versatile_dt.c2
-rw-r--r--arch/arm/mach-versatile/versatile_pb.c2
-rw-r--r--arch/arm/mach-vexpress/Kconfig1
-rw-r--r--arch/arm/mach-vexpress/ct-ca9x4.c4
-rw-r--r--arch/arm/mach-vexpress/platsmp.c3
-rw-r--r--arch/arm/mach-vexpress/v2m.c16
-rw-r--r--arch/arm/mach-vt8500/Kconfig28
-rw-r--r--arch/arm/mach-vt8500/Makefile2
-rw-r--r--arch/arm/mach-vt8500/common.h1
-rw-r--r--arch/arm/mach-vt8500/include/mach/timex.h26
-rw-r--r--arch/arm/mach-vt8500/include/mach/uncompress.h37
-rw-r--r--arch/arm/mach-vt8500/timer.c184
-rw-r--r--arch/arm/mach-vt8500/vt8500.c3
-rw-r--r--arch/arm/mach-w90x900/time.c10
-rw-r--r--arch/arm/mach-zynq/common.c17
-rw-r--r--arch/arm/mm/cache-l2x0.c34
-rw-r--r--arch/arm/mm/proc-v7.S4
-rw-r--r--arch/arm/plat-iop/time.c9
-rw-r--r--arch/arm/plat-omap/Makefile2
-rw-r--r--arch/arm/plat-omap/counter_32k.c2
-rw-r--r--arch/arm/plat-omap/dma.c6
-rw-r--r--arch/arm/plat-omap/dmtimer.c19
-rw-r--r--arch/arm/plat-omap/include/plat/cpu.h4
-rw-r--r--arch/arm/plat-omap/sram.c2
-rw-r--r--arch/arm/plat-orion/time.c6
-rw-r--r--arch/arm/plat-pxa/ssp.c6
-rw-r--r--arch/arm/plat-samsung/adc.c4
-rw-r--r--arch/arm/plat-samsung/include/plat/cpu.h2
-rw-r--r--arch/arm/plat-samsung/s5p-irq-eint.c3
-rw-r--r--arch/arm/plat-samsung/s5p-irq.c3
-rw-r--r--arch/arm/plat-samsung/s5p-time.c9
-rw-r--r--arch/arm/plat-spear/time.c8
-rw-r--r--arch/arm/plat-versatile/platsmp.c4
-rw-r--r--arch/arm64/Kconfig6
-rw-r--r--arch/arm64/include/asm/compat.h1
-rw-r--r--arch/arm64/kernel/perf_event.c2
-rw-r--r--arch/avr32/lib/delay.c2
-rw-r--r--arch/blackfin/mach-common/dpmc.c6
-rw-r--r--arch/cris/arch-v32/drivers/pci/bios.c2
-rw-r--r--arch/cris/arch-v32/kernel/smp.c2
-rw-r--r--arch/frv/kernel/setup.c2
-rw-r--r--arch/frv/mb93090-mb00/pci-vdk.c6
-rw-r--r--arch/ia64/include/asm/acpi.h2
-rw-r--r--arch/ia64/include/asm/iosapic.h11
-rw-r--r--arch/ia64/include/asm/parport.h5
-rw-r--r--arch/ia64/include/asm/smp.h2
-rw-r--r--arch/ia64/include/asm/unistd.h2
-rw-r--r--arch/ia64/include/uapi/asm/unistd.h1
-rw-r--r--arch/ia64/kernel/acpi.c6
-rw-r--r--arch/ia64/kernel/entry.S1
-rw-r--r--arch/ia64/kernel/iosapic.c19
-rw-r--r--arch/ia64/kernel/smpboot.c11
-rw-r--r--arch/ia64/kernel/time.c3
-rw-r--r--arch/ia64/mm/init.c5
-rw-r--r--arch/ia64/mm/tlb.c3
-rw-r--r--arch/ia64/pci/fixup.c2
-rw-r--r--arch/ia64/pci/pci.c31
-rw-r--r--arch/ia64/sn/kernel/io_common.c3
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_hwperf.c2
-rw-r--r--arch/ia64/xen/irq_xen.c5
-rw-r--r--arch/m32r/kernel/smpboot.c2
-rw-r--r--arch/m68k/emu/nfeth.c2
-rw-r--r--arch/m68k/include/asm/parport.h4
-rw-r--r--arch/m68k/kernel/pcibios.c4
-rw-r--r--arch/microblaze/configs/mmu_defconfig52
-rw-r--r--arch/microblaze/configs/nommu_defconfig73
-rw-r--r--arch/microblaze/include/asm/highmem.h2
-rw-r--r--arch/microblaze/include/asm/uaccess.h2
-rw-r--r--arch/microblaze/include/asm/unistd.h2
-rw-r--r--arch/microblaze/include/uapi/asm/unistd.h3
-rw-r--r--arch/microblaze/kernel/syscall_table.S1
-rw-r--r--arch/microblaze/pci/pci-common.c39
-rw-r--r--arch/mips/Kconfig4
-rw-r--r--arch/mips/alchemy/common/time.c25
-rw-r--r--arch/mips/cavium-octeon/serial.c2
-rw-r--r--arch/mips/include/asm/page.h9
-rw-r--r--arch/mips/include/asm/pci.h4
-rw-r--r--arch/mips/include/asm/thread_info.h9
-rw-r--r--arch/mips/include/uapi/asm/unistd.h15
-rw-r--r--arch/mips/kernel/asm-offsets.c3
-rw-r--r--arch/mips/kernel/genex.S5
-rw-r--r--arch/mips/kernel/head.S1
-rw-r--r--arch/mips/kernel/octeon_switch.S1
-rw-r--r--arch/mips/kernel/perf_event_mipsxx.c38
-rw-r--r--arch/mips/kernel/r2300_switch.S1
-rw-r--r--arch/mips/kernel/r4k_switch.S1
-rw-r--r--arch/mips/kernel/relocate_kernel.S3
-rw-r--r--arch/mips/kernel/scall32-o32.S1
-rw-r--r--arch/mips/kernel/scall64-64.S1
-rw-r--r--arch/mips/kernel/scall64-n32.S1
-rw-r--r--arch/mips/kernel/scall64-o32.S1
-rw-r--r--arch/mips/kernel/smp.c2
-rw-r--r--arch/mips/kernel/vmlinux.lds.S3
-rw-r--r--arch/mips/lantiq/xway/dma.c2
-rw-r--r--arch/mips/lantiq/xway/gptu.c2
-rw-r--r--arch/mips/lantiq/xway/xrx200_phy_fw.c2
-rw-r--r--arch/mips/mm/ioremap.c6
-rw-r--r--arch/mips/mm/tlbex-fault.S1
-rw-r--r--arch/mips/mm/tlbex.c16
-rw-r--r--arch/mips/mti-sead3/sead3-i2c-drv.c6
-rw-r--r--arch/mips/mti-sead3/sead3-pic32-i2c-drv.c8
-rw-r--r--arch/mips/pci/fixup-cobalt.c8
-rw-r--r--arch/mips/pci/fixup-emma2rh.c4
-rw-r--r--arch/mips/pci/fixup-fuloong2e.c12
-rw-r--r--arch/mips/pci/fixup-lemote2f.c12
-rw-r--r--arch/mips/pci/fixup-malta.c10
-rw-r--r--arch/mips/pci/fixup-rc32434.c6
-rw-r--r--arch/mips/pci/fixup-sb1250.c6
-rw-r--r--arch/mips/pci/ops-bcm63xx.c2
-rw-r--r--arch/mips/pci/ops-tx4927.c6
-rw-r--r--arch/mips/pci/pci-alchemy.c2
-rw-r--r--arch/mips/pci/pci-ip27.c4
-rw-r--r--arch/mips/pci/pci-lantiq.c4
-rw-r--r--arch/mips/pci/pci.c9
-rw-r--r--arch/mips/power/hibernate.S3
-rw-r--r--arch/mips/sni/setup.c2
-rw-r--r--arch/mips/txx9/generic/pci.c11
-rw-r--r--arch/mn10300/kernel/smp.c4
-rw-r--r--arch/mn10300/unit-asb2305/pci.c6
-rw-r--r--arch/openrisc/lib/delay.c2
-rw-r--r--arch/parisc/include/asm/parport.h2
-rw-r--r--arch/parisc/kernel/hardware.c7
-rw-r--r--arch/powerpc/include/asm/eeh.h6
-rw-r--r--arch/powerpc/include/asm/io-workarounds.h4
-rw-r--r--arch/powerpc/include/asm/parport.h2
-rw-r--r--arch/powerpc/include/asm/smp.h4
-rw-r--r--arch/powerpc/include/asm/vio.h2
-rw-r--r--arch/powerpc/kernel/io-workarounds.c9
-rw-r--r--arch/powerpc/kernel/isa-bridge.c12
-rw-r--r--arch/powerpc/kernel/of_platform.c2
-rw-r--r--arch/powerpc/kernel/pci-common.c28
-rw-r--r--arch/powerpc/kernel/pci_32.c2
-rw-r--r--arch/powerpc/kernel/pci_64.c6
-rw-r--r--arch/powerpc/kernel/pci_dn.c4
-rw-r--r--arch/powerpc/kernel/pci_of_scan.c12
-rw-r--r--arch/powerpc/kernel/rtas_pci.c4
-rw-r--r--arch/powerpc/kernel/smp-tbsync.c8
-rw-r--r--arch/powerpc/kernel/smp.c8
-rw-r--r--arch/powerpc/kernel/time.c5
-rw-r--r--arch/powerpc/kernel/vio.c4
-rw-r--r--arch/powerpc/mm/tlb_hash64.c4
-rw-r--r--arch/powerpc/platforms/40x/ppc40x_simple.c3
-rw-r--r--arch/powerpc/platforms/44x/currituck.c2
-rw-r--r--arch/powerpc/platforms/44x/virtex_ml510.c2
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_gpt.c6
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c8
-rw-r--r--arch/powerpc/platforms/82xx/ep8248e.c2
-rw-r--r--arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c9
-rw-r--r--arch/powerpc/platforms/85xx/corenet_ds.c2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c2
-rw-r--r--arch/powerpc/platforms/85xx/tqm85xx.c2
-rw-r--r--arch/powerpc/platforms/86xx/gef_ppc9a.c2
-rw-r--r--arch/powerpc/platforms/86xx/gef_sbc310.c2
-rw-r--r--arch/powerpc/platforms/86xx/gef_sbc610.c2
-rw-r--r--arch/powerpc/platforms/cell/setup.c2
-rw-r--r--arch/powerpc/platforms/cell/smp.c6
-rw-r--r--arch/powerpc/platforms/chrp/pci.c2
-rw-r--r--arch/powerpc/platforms/chrp/smp.c4
-rw-r--r--arch/powerpc/platforms/fsl_uli1575.c20
-rw-r--r--arch/powerpc/platforms/maple/pci.c4
-rw-r--r--arch/powerpc/platforms/pasemi/gpio_mdio.c2
-rw-r--r--arch/powerpc/platforms/pasemi/pasemi.h4
-rw-r--r--arch/powerpc/platforms/pasemi/setup.c4
-rw-r--r--arch/powerpc/platforms/powermac/pci.c6
-rw-r--r--arch/powerpc/platforms/powermac/smp.c8
-rw-r--r--arch/powerpc/platforms/powernv/pci-ioda.c48
-rw-r--r--arch/powerpc/platforms/powernv/pci-p5ioc2.c4
-rw-r--r--arch/powerpc/platforms/powernv/pci.c11
-rw-r--r--arch/powerpc/platforms/powernv/smp.c2
-rw-r--r--arch/powerpc/platforms/ps3/repository.c2
-rw-r--r--arch/powerpc/platforms/pseries/eeh_dev.c4
-rw-r--r--arch/powerpc/platforms/pseries/eeh_pe.c2
-rw-r--r--arch/powerpc/platforms/pseries/pci_dlpar.c2
-rw-r--r--arch/powerpc/platforms/pseries/smp.c6
-rw-r--r--arch/powerpc/platforms/wsp/scom_smp.c3
-rw-r--r--arch/powerpc/platforms/wsp/smp.c4
-rw-r--r--arch/powerpc/platforms/wsp/wsp.h2
-rw-r--r--arch/powerpc/platforms/wsp/wsp_pci.c2
-rw-r--r--arch/powerpc/sysdev/bestcomm/bestcomm.c7
-rw-r--r--arch/powerpc/sysdev/fsl_85xx_l2ctlr.c6
-rw-r--r--arch/powerpc/sysdev/fsl_ifc.c4
-rw-r--r--arch/powerpc/sysdev/fsl_lbc.c6
-rw-r--r--arch/powerpc/sysdev/fsl_msi.c7
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c4
-rw-r--r--arch/powerpc/sysdev/fsl_rio.c2
-rw-r--r--arch/powerpc/sysdev/mpic.c2
-rw-r--r--arch/powerpc/sysdev/mpic_msgr.c2
-rw-r--r--arch/powerpc/sysdev/mv64x60_pci.c2
-rw-r--r--arch/powerpc/sysdev/ppc4xx_msi.c2
-rw-r--r--arch/s390/kernel/smp.c7
-rw-r--r--arch/s390/pci/pci.c2
-rw-r--r--arch/score/mm/cache.c2
-rw-r--r--arch/sh/drivers/pci/fixups-dreamcast.c2
-rw-r--r--arch/sh/drivers/pci/pci.c6
-rw-r--r--arch/sh/drivers/pci/pcie-sh7786.c2
-rw-r--r--arch/sparc/include/asm/parport.h6
-rw-r--r--arch/sparc/include/asm/timer_64.h2
-rw-r--r--arch/sparc/kernel/apc.c4
-rw-r--r--arch/sparc/kernel/auxio_64.c2
-rw-r--r--arch/sparc/kernel/central.c6
-rw-r--r--arch/sparc/kernel/chmc.c34
-rw-r--r--arch/sparc/kernel/ds.c5
-rw-r--r--arch/sparc/kernel/ldc.c2
-rw-r--r--arch/sparc/kernel/leon_pci.c2
-rw-r--r--arch/sparc/kernel/leon_pci_grpci2.c2
-rw-r--r--arch/sparc/kernel/pci.c33
-rw-r--r--arch/sparc/kernel/pci_fire.c6
-rw-r--r--arch/sparc/kernel/pci_psycho.c11
-rw-r--r--arch/sparc/kernel/pci_sabre.c8
-rw-r--r--arch/sparc/kernel/pci_schizo.c15
-rw-r--r--arch/sparc/kernel/pci_sun4v.c15
-rw-r--r--arch/sparc/kernel/pcic.c5
-rw-r--r--arch/sparc/kernel/pmc.c2
-rw-r--r--arch/sparc/kernel/power.c4
-rw-r--r--arch/sparc/kernel/smp_64.c4
-rw-r--r--arch/sparc/kernel/time_32.c2
-rw-r--r--arch/sparc/kernel/time_64.c10
-rw-r--r--arch/sparc/mm/init_64.c6
-rw-r--r--arch/tile/include/asm/pci.h2
-rw-r--r--arch/tile/kernel/pci.c23
-rw-r--r--arch/tile/kernel/pci_gx.c33
-rw-r--r--arch/unicore32/kernel/pci.c2
-rw-r--r--arch/x86/include/asm/parport.h4
-rw-r--r--arch/x86/include/asm/pci_x86.h7
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel_uncore.c6
-rw-r--r--arch/x86/kernel/pci-dma.c2
-rw-r--r--arch/x86/kernel/quirks.c4
-rw-r--r--arch/x86/lib/delay.c2
-rw-r--r--arch/x86/pci/acpi.c11
-rw-r--r--arch/x86/pci/bus_numa.c4
-rw-r--r--arch/x86/pci/common.c29
-rw-r--r--arch/x86/pci/fixup.c30
-rw-r--r--arch/x86/pci/legacy.c4
-rw-r--r--arch/x86/pci/mmconfig-shared.c21
-rw-r--r--arch/x86/pci/mmconfig_32.c2
-rw-r--r--arch/x86/pci/mmconfig_64.c4
-rw-r--r--arch/x86/pci/mrst.c6
-rw-r--r--arch/x86/pci/numaq_32.c2
-rw-r--r--arch/x86/pci/pcbios.c4
-rw-r--r--arch/x86/platform/mrst/mrst.c2
-rw-r--r--arch/x86/platform/olpc/olpc-xo1-pm.c8
-rw-r--r--arch/x86/platform/olpc/olpc-xo1-sci.c18
-rw-r--r--arch/x86/platform/scx200/scx200_32.c6
488 files changed, 1746 insertions, 3535 deletions
diff --git a/arch/alpha/include/asm/parport.h b/arch/alpha/include/asm/parport.h
index c5ee7cbb2fcd..6abd0af11f13 100644
--- a/arch/alpha/include/asm/parport.h
+++ b/arch/alpha/include/asm/parport.h
@@ -9,8 +9,8 @@
9#ifndef _ASM_AXP_PARPORT_H 9#ifndef _ASM_AXP_PARPORT_H
10#define _ASM_AXP_PARPORT_H 1 10#define _ASM_AXP_PARPORT_H 1
11 11
12static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); 12static int parport_pc_find_isa_ports (int autoirq, int autodma);
13static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) 13static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
14{ 14{
15 return parport_pc_find_isa_ports (autoirq, autodma); 15 return parport_pc_find_isa_ports (autoirq, autodma);
16} 16}
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index ef757147cbf9..edb4e0097b75 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -59,13 +59,13 @@ struct pci_controller *pci_isa_hose;
59 * Quirks. 59 * Quirks.
60 */ 60 */
61 61
62static void __devinit quirk_isa_bridge(struct pci_dev *dev) 62static void quirk_isa_bridge(struct pci_dev *dev)
63{ 63{
64 dev->class = PCI_CLASS_BRIDGE_ISA << 8; 64 dev->class = PCI_CLASS_BRIDGE_ISA << 8;
65} 65}
66DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, quirk_isa_bridge); 66DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82378, quirk_isa_bridge);
67 67
68static void __devinit quirk_cypress(struct pci_dev *dev) 68static void quirk_cypress(struct pci_dev *dev)
69{ 69{
70 /* The Notorious Cy82C693 chip. */ 70 /* The Notorious Cy82C693 chip. */
71 71
@@ -104,7 +104,7 @@ static void __devinit quirk_cypress(struct pci_dev *dev)
104DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, quirk_cypress); 104DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, quirk_cypress);
105 105
106/* Called for each device after PCI setup is done. */ 106/* Called for each device after PCI setup is done. */
107static void __devinit pcibios_fixup_final(struct pci_dev *dev) 107static void pcibios_fixup_final(struct pci_dev *dev)
108{ 108{
109 unsigned int class = dev->class >> 8; 109 unsigned int class = dev->class >> 8;
110 110
@@ -198,8 +198,7 @@ subsys_initcall(pcibios_init);
198#ifdef ALPHA_RESTORE_SRM_SETUP 198#ifdef ALPHA_RESTORE_SRM_SETUP
199static struct pdev_srm_saved_conf *srm_saved_configs; 199static struct pdev_srm_saved_conf *srm_saved_configs;
200 200
201void __devinit 201void pdev_save_srm_config(struct pci_dev *dev)
202pdev_save_srm_config(struct pci_dev *dev)
203{ 202{
204 struct pdev_srm_saved_conf *tmp; 203 struct pdev_srm_saved_conf *tmp;
205 static int printed = 0; 204 static int printed = 0;
@@ -241,8 +240,7 @@ pci_restore_srm_config(void)
241} 240}
242#endif 241#endif
243 242
244void __devinit 243void pcibios_fixup_bus(struct pci_bus *bus)
245pcibios_fixup_bus(struct pci_bus *bus)
246{ 244{
247 struct pci_dev *dev = bus->self; 245 struct pci_dev *dev = bus->self;
248 246
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index a41ad90a97a6..9603bc234b47 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -68,7 +68,7 @@ enum ipi_message_type {
68}; 68};
69 69
70/* Set to a secondary's cpuid when it comes online. */ 70/* Set to a secondary's cpuid when it comes online. */
71static int smp_secondary_alive __devinitdata = 0; 71static int smp_secondary_alive = 0;
72 72
73int smp_num_probed; /* Internal processor count */ 73int smp_num_probed; /* Internal processor count */
74int smp_num_cpus = 1; /* Number that came online. */ 74int smp_num_cpus = 1; /* Number that came online. */
@@ -172,7 +172,7 @@ smp_callin(void)
172} 172}
173 173
174/* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */ 174/* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */
175static int __devinit 175static int
176wait_for_txrdy (unsigned long cpumask) 176wait_for_txrdy (unsigned long cpumask)
177{ 177{
178 unsigned long timeout; 178 unsigned long timeout;
@@ -468,7 +468,7 @@ smp_prepare_cpus(unsigned int max_cpus)
468 smp_num_cpus = smp_num_probed; 468 smp_num_cpus = smp_num_probed;
469} 469}
470 470
471void __devinit 471void
472smp_prepare_boot_cpu(void) 472smp_prepare_boot_cpu(void)
473{ 473{
474} 474}
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c
index 2533db280d9b..5cf4a481b8c5 100644
--- a/arch/alpha/kernel/sys_titan.c
+++ b/arch/alpha/kernel/sys_titan.c
@@ -303,7 +303,7 @@ titan_late_init(void)
303 303
304} 304}
305 305
306static int __devinit 306static int
307titan_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 307titan_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
308{ 308{
309 u8 intline; 309 u8 intline;
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 13f89a262fa8..a3ffd1a391a7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -371,7 +371,6 @@ config ARCH_CNS3XXX
371config ARCH_CLPS711X 371config ARCH_CLPS711X
372 bool "Cirrus Logic CLPS711x/EP721x/EP731x-based" 372 bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
373 select ARCH_REQUIRE_GPIOLIB 373 select ARCH_REQUIRE_GPIOLIB
374 select ARCH_USES_GETTIMEOFFSET
375 select AUTO_ZRELADDR 374 select AUTO_ZRELADDR
376 select CLKDEV_LOOKUP 375 select CLKDEV_LOOKUP
377 select COMMON_CLK 376 select COMMON_CLK
@@ -951,22 +950,6 @@ config ARCH_OMAP
951 help 950 help
952 Support for TI's OMAP platform (OMAP1/2/3/4). 951 Support for TI's OMAP platform (OMAP1/2/3/4).
953 952
954config ARCH_VT8500_SINGLE
955 bool "VIA/WonderMedia 85xx"
956 select ARCH_HAS_CPUFREQ
957 select ARCH_REQUIRE_GPIOLIB
958 select CLKDEV_LOOKUP
959 select COMMON_CLK
960 select CPU_ARM926T
961 select GENERIC_CLOCKEVENTS
962 select GENERIC_GPIO
963 select HAVE_CLK
964 select MULTI_IRQ_HANDLER
965 select SPARSE_IRQ
966 select USE_OF
967 help
968 Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip.
969
970endchoice 953endchoice
971 954
972menu "Multiple platform selection" 955menu "Multiple platform selection"
@@ -1231,6 +1214,7 @@ config ARM_ERRATA_430973
1231config ARM_ERRATA_458693 1214config ARM_ERRATA_458693
1232 bool "ARM errata: Processor deadlock when a false hazard is created" 1215 bool "ARM errata: Processor deadlock when a false hazard is created"
1233 depends on CPU_V7 1216 depends on CPU_V7
1217 depends on !ARCH_MULTIPLATFORM
1234 help 1218 help
1235 This option enables the workaround for the 458693 Cortex-A8 (r2p0) 1219 This option enables the workaround for the 458693 Cortex-A8 (r2p0)
1236 erratum. For very specific sequences of memory operations, it is 1220 erratum. For very specific sequences of memory operations, it is
@@ -1244,6 +1228,7 @@ config ARM_ERRATA_458693
1244config ARM_ERRATA_460075 1228config ARM_ERRATA_460075
1245 bool "ARM errata: Data written to the L2 cache can be overwritten with stale data" 1229 bool "ARM errata: Data written to the L2 cache can be overwritten with stale data"
1246 depends on CPU_V7 1230 depends on CPU_V7
1231 depends on !ARCH_MULTIPLATFORM
1247 help 1232 help
1248 This option enables the workaround for the 460075 Cortex-A8 (r2p0) 1233 This option enables the workaround for the 460075 Cortex-A8 (r2p0)
1249 erratum. Any asynchronous access to the L2 cache may encounter a 1234 erratum. Any asynchronous access to the L2 cache may encounter a
@@ -1256,6 +1241,7 @@ config ARM_ERRATA_460075
1256config ARM_ERRATA_742230 1241config ARM_ERRATA_742230
1257 bool "ARM errata: DMB operation may be faulty" 1242 bool "ARM errata: DMB operation may be faulty"
1258 depends on CPU_V7 && SMP 1243 depends on CPU_V7 && SMP
1244 depends on !ARCH_MULTIPLATFORM
1259 help 1245 help
1260 This option enables the workaround for the 742230 Cortex-A9 1246 This option enables the workaround for the 742230 Cortex-A9
1261 (r1p0..r2p2) erratum. Under rare circumstances, a DMB instruction 1247 (r1p0..r2p2) erratum. Under rare circumstances, a DMB instruction
@@ -1268,6 +1254,7 @@ config ARM_ERRATA_742230
1268config ARM_ERRATA_742231 1254config ARM_ERRATA_742231
1269 bool "ARM errata: Incorrect hazard handling in the SCU may lead to data corruption" 1255 bool "ARM errata: Incorrect hazard handling in the SCU may lead to data corruption"
1270 depends on CPU_V7 && SMP 1256 depends on CPU_V7 && SMP
1257 depends on !ARCH_MULTIPLATFORM
1271 help 1258 help
1272 This option enables the workaround for the 742231 Cortex-A9 1259 This option enables the workaround for the 742231 Cortex-A9
1273 (r2p0..r2p2) erratum. Under certain conditions, specific to the 1260 (r2p0..r2p2) erratum. Under certain conditions, specific to the
@@ -1318,6 +1305,7 @@ config PL310_ERRATA_727915
1318config ARM_ERRATA_743622 1305config ARM_ERRATA_743622
1319 bool "ARM errata: Faulty hazard checking in the Store Buffer may lead to data corruption" 1306 bool "ARM errata: Faulty hazard checking in the Store Buffer may lead to data corruption"
1320 depends on CPU_V7 1307 depends on CPU_V7
1308 depends on !ARCH_MULTIPLATFORM
1321 help 1309 help
1322 This option enables the workaround for the 743622 Cortex-A9 1310 This option enables the workaround for the 743622 Cortex-A9
1323 (r2p*) erratum. Under very rare conditions, a faulty 1311 (r2p*) erratum. Under very rare conditions, a faulty
@@ -1331,6 +1319,7 @@ config ARM_ERRATA_743622
1331config ARM_ERRATA_751472 1319config ARM_ERRATA_751472
1332 bool "ARM errata: Interrupted ICIALLUIS may prevent completion of broadcasted operation" 1320 bool "ARM errata: Interrupted ICIALLUIS may prevent completion of broadcasted operation"
1333 depends on CPU_V7 1321 depends on CPU_V7
1322 depends on !ARCH_MULTIPLATFORM
1334 help 1323 help
1335 This option enables the workaround for the 751472 Cortex-A9 (prior 1324 This option enables the workaround for the 751472 Cortex-A9 (prior
1336 to r3p0) erratum. An interrupted ICIALLUIS operation may prevent the 1325 to r3p0) erratum. An interrupted ICIALLUIS operation may prevent the
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 00ad1f895da2..af3987cb9e4d 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -426,6 +426,13 @@ choice
426 of the tiles using the RS1 memory map, including all new A-class 426 of the tiles using the RS1 memory map, including all new A-class
427 core tiles, FPGA-based SMMs and software models. 427 core tiles, FPGA-based SMMs and software models.
428 428
429 config DEBUG_VT8500_UART0
430 bool "Use UART0 on VIA/Wondermedia SoCs"
431 depends on ARCH_VT8500
432 help
433 This option selects UART0 on VIA/Wondermedia System-on-a-chip
434 devices, including VT8500, WM8505, WM8650 and WM8850.
435
429 config DEBUG_LL_UART_NONE 436 config DEBUG_LL_UART_NONE
430 bool "No low-level debugging UART" 437 bool "No low-level debugging UART"
431 depends on !ARCH_MULTIPLATFORM 438 depends on !ARCH_MULTIPLATFORM
@@ -520,6 +527,7 @@ config DEBUG_LL_INCLUDE
520 default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1 527 default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1
521 default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \ 528 default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \
522 DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1 529 DEBUG_VEXPRESS_UART0_CA9 || DEBUG_VEXPRESS_UART0_RS1
530 default "debug/vt8500.S" if DEBUG_VT8500_UART0
523 default "debug/tegra.S" if DEBUG_TEGRA_UART 531 default "debug/tegra.S" if DEBUG_TEGRA_UART
524 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1 532 default "debug/zynq.S" if DEBUG_ZYNQ_UART0 || DEBUG_ZYNQ_UART1
525 default "mach/debug-macro.S" 533 default "mach/debug-macro.S"
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 6af9901d3d2f..b34479014f9e 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -152,7 +152,8 @@ dtb-$(CONFIG_ARCH_VEXPRESS) += vexpress-v2p-ca5s.dtb \
152 xenvm-4.2.dtb 152 xenvm-4.2.dtb
153dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \ 153dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \
154 wm8505-ref.dtb \ 154 wm8505-ref.dtb \
155 wm8650-mid.dtb 155 wm8650-mid.dtb \
156 wm8850-w70v2.dtb
156dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb 157dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb
157 158
158targets += dtbs 159targets += dtbs
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
index cf6c48a09eac..4c0abe85405f 100644
--- a/arch/arm/boot/dts/armada-370-xp.dtsi
+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
@@ -50,17 +50,19 @@
50 ranges; 50 ranges;
51 51
52 serial@d0012000 { 52 serial@d0012000 {
53 compatible = "ns16550"; 53 compatible = "snps,dw-apb-uart";
54 reg = <0xd0012000 0x100>; 54 reg = <0xd0012000 0x100>;
55 reg-shift = <2>; 55 reg-shift = <2>;
56 interrupts = <41>; 56 interrupts = <41>;
57 reg-io-width = <4>;
57 status = "disabled"; 58 status = "disabled";
58 }; 59 };
59 serial@d0012100 { 60 serial@d0012100 {
60 compatible = "ns16550"; 61 compatible = "snps,dw-apb-uart";
61 reg = <0xd0012100 0x100>; 62 reg = <0xd0012100 0x100>;
62 reg-shift = <2>; 63 reg-shift = <2>;
63 interrupts = <42>; 64 interrupts = <42>;
65 reg-io-width = <4>;
64 status = "disabled"; 66 status = "disabled";
65 }; 67 };
66 68
diff --git a/arch/arm/boot/dts/armada-xp-mv78230.dtsi b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
index c45c7b4dc352..271855a6e224 100644
--- a/arch/arm/boot/dts/armada-xp-mv78230.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78230.dtsi
@@ -34,7 +34,14 @@
34 reg = <0>; 34 reg = <0>;
35 clocks = <&cpuclk 0>; 35 clocks = <&cpuclk 0>;
36 }; 36 };
37 } 37
38 cpu@1 {
39 device_type = "cpu";
40 compatible = "marvell,sheeva-v7";
41 reg = <1>;
42 clocks = <&cpuclk 1>;
43 };
44 };
38 45
39 soc { 46 soc {
40 pinctrl { 47 pinctrl {
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
index a2aee5707377..1c1937dbce73 100644
--- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
@@ -85,5 +85,13 @@
85 #interrupts-cells = <2>; 85 #interrupts-cells = <2>;
86 interrupts = <24>; 86 interrupts = <24>;
87 }; 87 };
88
89 ethernet@d0034000 {
90 compatible = "marvell,armada-370-neta";
91 reg = <0xd0034000 0x2500>;
92 interrupts = <14>;
93 clocks = <&gateclk 1>;
94 status = "disabled";
95 };
88 }; 96 };
89}; 97};
diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
index da03a129243a..4905cf3a5ef8 100644
--- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
@@ -100,5 +100,13 @@
100 #interrupts-cells = <2>; 100 #interrupts-cells = <2>;
101 interrupts = <24>; 101 interrupts = <24>;
102 }; 102 };
103
104 ethernet@d0034000 {
105 compatible = "marvell,armada-370-neta";
106 reg = <0xd0034000 0x2500>;
107 interrupts = <14>;
108 clocks = <&gateclk 1>;
109 status = "disabled";
110 };
103 }; 111 };
104 }; 112 };
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi
index 367aa3f94912..2e37ef101c90 100644
--- a/arch/arm/boot/dts/armada-xp.dtsi
+++ b/arch/arm/boot/dts/armada-xp.dtsi
@@ -42,17 +42,19 @@
42 42
43 soc { 43 soc {
44 serial@d0012200 { 44 serial@d0012200 {
45 compatible = "ns16550"; 45 compatible = "snps,dw-apb-uart";
46 reg = <0xd0012200 0x100>; 46 reg = <0xd0012200 0x100>;
47 reg-shift = <2>; 47 reg-shift = <2>;
48 interrupts = <43>; 48 interrupts = <43>;
49 reg-io-width = <4>;
49 status = "disabled"; 50 status = "disabled";
50 }; 51 };
51 serial@d0012300 { 52 serial@d0012300 {
52 compatible = "ns16550"; 53 compatible = "snps,dw-apb-uart";
53 reg = <0xd0012300 0x100>; 54 reg = <0xd0012300 0x100>;
54 reg-shift = <2>; 55 reg-shift = <2>;
55 interrupts = <44>; 56 interrupts = <44>;
57 reg-io-width = <4>;
56 status = "disabled"; 58 status = "disabled";
57 }; 59 };
58 60
@@ -93,14 +95,6 @@
93 status = "disabled"; 95 status = "disabled";
94 }; 96 };
95 97
96 ethernet@d0034000 {
97 compatible = "marvell,armada-370-neta";
98 reg = <0xd0034000 0x2500>;
99 interrupts = <14>;
100 clocks = <&gateclk 1>;
101 status = "disabled";
102 };
103
104 xor@d0060900 { 98 xor@d0060900 {
105 compatible = "marvell,orion-xor"; 99 compatible = "marvell,orion-xor";
106 reg = <0xd0060900 0x100 100 reg = <0xd0060900 0x100
diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi
index 2efd9c891bc9..63f2fbcfe819 100644
--- a/arch/arm/boot/dts/dbx5x0.dtsi
+++ b/arch/arm/boot/dts/dbx5x0.dtsi
@@ -170,7 +170,9 @@
170 gpio-bank = <8>; 170 gpio-bank = <8>;
171 }; 171 };
172 172
173 pinctrl { 173 pinctrl@80157000 {
174 // This is actually the PRCMU base address
175 reg = <0x80157000 0x2000>;
174 compatible = "stericsson,nmk_pinctrl"; 176 compatible = "stericsson,nmk_pinctrl";
175 }; 177 };
176 178
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index f3f7e9d8adca..42eac1ff3cc8 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -117,6 +117,7 @@
117 pinctrl: pinctrl@d0200 { 117 pinctrl: pinctrl@d0200 {
118 compatible = "marvell,dove-pinctrl"; 118 compatible = "marvell,dove-pinctrl";
119 reg = <0xd0200 0x10>; 119 reg = <0xd0200 0x10>;
120 clocks = <&gate_clk 22>;
120 }; 121 };
121 122
122 spi0: spi@10600 { 123 spi0: spi@10600 {
diff --git a/arch/arm/boot/dts/ecx-2000.dts b/arch/arm/boot/dts/ecx-2000.dts
index 46477ac1de99..139b40cc3a23 100644
--- a/arch/arm/boot/dts/ecx-2000.dts
+++ b/arch/arm/boot/dts/ecx-2000.dts
@@ -32,6 +32,7 @@
32 32
33 cpu@0 { 33 cpu@0 {
34 compatible = "arm,cortex-a15"; 34 compatible = "arm,cortex-a15";
35 device_type = "cpu";
35 reg = <0>; 36 reg = <0>;
36 clocks = <&a9pll>; 37 clocks = <&a9pll>;
37 clock-names = "cpu"; 38 clock-names = "cpu";
@@ -39,6 +40,7 @@
39 40
40 cpu@1 { 41 cpu@1 {
41 compatible = "arm,cortex-a15"; 42 compatible = "arm,cortex-a15";
43 device_type = "cpu";
42 reg = <1>; 44 reg = <1>;
43 clocks = <&a9pll>; 45 clocks = <&a9pll>;
44 clock-names = "cpu"; 46 clock-names = "cpu";
@@ -46,6 +48,7 @@
46 48
47 cpu@2 { 49 cpu@2 {
48 compatible = "arm,cortex-a15"; 50 compatible = "arm,cortex-a15";
51 device_type = "cpu";
49 reg = <2>; 52 reg = <2>;
50 clocks = <&a9pll>; 53 clocks = <&a9pll>;
51 clock-names = "cpu"; 54 clock-names = "cpu";
@@ -53,6 +56,7 @@
53 56
54 cpu@3 { 57 cpu@3 {
55 compatible = "arm,cortex-a15"; 58 compatible = "arm,cortex-a15";
59 device_type = "cpu";
56 reg = <3>; 60 reg = <3>;
57 clocks = <&a9pll>; 61 clocks = <&a9pll>;
58 clock-names = "cpu"; 62 clock-names = "cpu";
diff --git a/arch/arm/boot/dts/exynos4210-smdkv310.dts b/arch/arm/boot/dts/exynos4210-smdkv310.dts
index 9b23a8255e39..f63490707f3a 100644
--- a/arch/arm/boot/dts/exynos4210-smdkv310.dts
+++ b/arch/arm/boot/dts/exynos4210-smdkv310.dts
@@ -26,7 +26,7 @@
26 }; 26 };
27 27
28 chosen { 28 chosen {
29 bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC2,115200 init=/linuxrc"; 29 bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc";
30 }; 30 };
31 31
32 sdhci@12530000 { 32 sdhci@12530000 {
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 2e3b6efaf1a2..3acf594ea60b 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -574,7 +574,7 @@
574 574
575 hdmi { 575 hdmi {
576 compatible = "samsung,exynos5-hdmi"; 576 compatible = "samsung,exynos5-hdmi";
577 reg = <0x14530000 0x100000>; 577 reg = <0x14530000 0x70000>;
578 interrupts = <0 95 0>; 578 interrupts = <0 95 0>;
579 }; 579 };
580 580
diff --git a/arch/arm/boot/dts/exynos5440-ssdk5440.dts b/arch/arm/boot/dts/exynos5440-ssdk5440.dts
index 921c83cf694f..81e2c964a900 100644
--- a/arch/arm/boot/dts/exynos5440-ssdk5440.dts
+++ b/arch/arm/boot/dts/exynos5440-ssdk5440.dts
@@ -21,7 +21,7 @@
21 }; 21 };
22 22
23 chosen { 23 chosen {
24 bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x81000000,8M console=ttySAC2,115200 init=/linuxrc"; 24 bootargs = "root=/dev/ram0 rw ramdisk=8192 initrd=0x81000000,8M console=ttySAC0,115200 init=/linuxrc";
25 }; 25 };
26 26
27 spi { 27 spi {
diff --git a/arch/arm/boot/dts/highbank.dts b/arch/arm/boot/dts/highbank.dts
index a9ae5d32e80d..5927a8df5625 100644
--- a/arch/arm/boot/dts/highbank.dts
+++ b/arch/arm/boot/dts/highbank.dts
@@ -30,33 +30,37 @@
30 #address-cells = <1>; 30 #address-cells = <1>;
31 #size-cells = <0>; 31 #size-cells = <0>;
32 32
33 cpu@0 { 33 cpu@900 {
34 compatible = "arm,cortex-a9"; 34 compatible = "arm,cortex-a9";
35 reg = <0>; 35 device_type = "cpu";
36 reg = <0x900>;
36 next-level-cache = <&L2>; 37 next-level-cache = <&L2>;
37 clocks = <&a9pll>; 38 clocks = <&a9pll>;
38 clock-names = "cpu"; 39 clock-names = "cpu";
39 }; 40 };
40 41
41 cpu@1 { 42 cpu@901 {
42 compatible = "arm,cortex-a9"; 43 compatible = "arm,cortex-a9";
43 reg = <1>; 44 device_type = "cpu";
45 reg = <0x901>;
44 next-level-cache = <&L2>; 46 next-level-cache = <&L2>;
45 clocks = <&a9pll>; 47 clocks = <&a9pll>;
46 clock-names = "cpu"; 48 clock-names = "cpu";
47 }; 49 };
48 50
49 cpu@2 { 51 cpu@902 {
50 compatible = "arm,cortex-a9"; 52 compatible = "arm,cortex-a9";
51 reg = <2>; 53 device_type = "cpu";
54 reg = <0x902>;
52 next-level-cache = <&L2>; 55 next-level-cache = <&L2>;
53 clocks = <&a9pll>; 56 clocks = <&a9pll>;
54 clock-names = "cpu"; 57 clock-names = "cpu";
55 }; 58 };
56 59
57 cpu@3 { 60 cpu@903 {
58 compatible = "arm,cortex-a9"; 61 compatible = "arm,cortex-a9";
59 reg = <3>; 62 device_type = "cpu";
63 reg = <0x903>;
60 next-level-cache = <&L2>; 64 next-level-cache = <&L2>;
61 clocks = <&a9pll>; 65 clocks = <&a9pll>;
62 clock-names = "cpu"; 66 clock-names = "cpu";
diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts
index 7c43b8e70b9f..e7484e4ea659 100644
--- a/arch/arm/boot/dts/imx23-olinuxino.dts
+++ b/arch/arm/boot/dts/imx23-olinuxino.dts
@@ -39,17 +39,17 @@
39 hog_pins_a: hog@0 { 39 hog_pins_a: hog@0 {
40 reg = <0>; 40 reg = <0>;
41 fsl,pinmux-ids = < 41 fsl,pinmux-ids = <
42 0x2013 /* MX23_PAD_SSP1_DETECT__GPIO_2_1 */ 42 0x0113 /* MX23_PAD_GPMI_ALE__GPIO_0_17 */
43 >; 43 >;
44 fsl,drive-strength = <0>; 44 fsl,drive-strength = <0>;
45 fsl,voltage = <1>; 45 fsl,voltage = <1>;
46 fsl,pull-up = <0>; 46 fsl,pull-up = <0>;
47 }; 47 };
48 48
49 led_pin_gpio0_17: led_gpio0_17@0 { 49 led_pin_gpio2_1: led_gpio2_1@0 {
50 reg = <0>; 50 reg = <0>;
51 fsl,pinmux-ids = < 51 fsl,pinmux-ids = <
52 0x0113 /* MX23_PAD_GPMI_ALE__GPIO_0_17 */ 52 0x2013 /* MX23_PAD_SSP1_DETECT__GPIO_2_1 */
53 >; 53 >;
54 fsl,drive-strength = <0>; 54 fsl,drive-strength = <0>;
55 fsl,voltage = <1>; 55 fsl,voltage = <1>;
@@ -110,7 +110,7 @@
110 leds { 110 leds {
111 compatible = "gpio-leds"; 111 compatible = "gpio-leds";
112 pinctrl-names = "default"; 112 pinctrl-names = "default";
113 pinctrl-0 = <&led_pin_gpio0_17>; 113 pinctrl-0 = <&led_pin_gpio2_1>;
114 114
115 user { 115 user {
116 label = "green"; 116 label = "green";
diff --git a/arch/arm/boot/dts/imx31-bug.dts b/arch/arm/boot/dts/imx31-bug.dts
index 24731cb78e8e..7f67402328d3 100644
--- a/arch/arm/boot/dts/imx31-bug.dts
+++ b/arch/arm/boot/dts/imx31-bug.dts
@@ -14,7 +14,7 @@
14 14
15/ { 15/ {
16 model = "Buglabs i.MX31 Bug 1.x"; 16 model = "Buglabs i.MX31 Bug 1.x";
17 compatible = "fsl,imx31-bug", "fsl,imx31"; 17 compatible = "buglabs,imx31-bug", "fsl,imx31";
18 18
19 memory { 19 memory {
20 reg = <0x80000000 0x8000000>; /* 128M */ 20 reg = <0x80000000 0x8000000>; /* 128M */
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index 552aed4ff982..edc3f1eb6699 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -492,7 +492,7 @@
492 compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan"; 492 compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan";
493 reg = <0x53fcc000 0x4000>; 493 reg = <0x53fcc000 0x4000>;
494 interrupts = <83>; 494 interrupts = <83>;
495 clocks = <&clks 158>, <&clks 157>; 495 clocks = <&clks 87>, <&clks 86>;
496 clock-names = "ipg", "per"; 496 clock-names = "ipg", "per";
497 status = "disabled"; 497 status = "disabled";
498 }; 498 };
diff --git a/arch/arm/boot/dts/kirkwood-6282.dtsi b/arch/arm/boot/dts/kirkwood-6282.dtsi
index 9ae2004d5675..4ccea2130a6c 100644
--- a/arch/arm/boot/dts/kirkwood-6282.dtsi
+++ b/arch/arm/boot/dts/kirkwood-6282.dtsi
@@ -39,6 +39,7 @@
39 #size-cells = <0>; 39 #size-cells = <0>;
40 interrupts = <32>; 40 interrupts = <32>;
41 clock-frequency = <100000>; 41 clock-frequency = <100000>;
42 clocks = <&gate_clk 7>;
42 status = "disabled"; 43 status = "disabled";
43 }; 44 };
44 }; 45 };
diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts
index c0de5a7f660d..cd15452a52a6 100644
--- a/arch/arm/boot/dts/kirkwood-topkick.dts
+++ b/arch/arm/boot/dts/kirkwood-topkick.dts
@@ -82,4 +82,21 @@
82 gpios = <&gpio1 16 1>; 82 gpios = <&gpio1 16 1>;
83 }; 83 };
84 }; 84 };
85 regulators {
86 compatible = "simple-bus";
87 #address-cells = <1>;
88 #size-cells = <0>;
89
90 sata0_power: regulator@1 {
91 compatible = "regulator-fixed";
92 reg = <1>;
93 regulator-name = "SATA0 Power";
94 regulator-min-microvolt = <5000000>;
95 regulator-max-microvolt = <5000000>;
96 enable-active-high;
97 regulator-always-on;
98 regulator-boot-on;
99 gpio = <&gpio1 4 0>;
100 };
101 };
85}; 102};
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
index 7735cee4a9c6..110d6cbb795b 100644
--- a/arch/arm/boot/dts/kirkwood.dtsi
+++ b/arch/arm/boot/dts/kirkwood.dtsi
@@ -144,6 +144,7 @@
144 compatible = "marvell,orion-ehci"; 144 compatible = "marvell,orion-ehci";
145 reg = <0x50000 0x1000>; 145 reg = <0x50000 0x1000>;
146 interrupts = <19>; 146 interrupts = <19>;
147 clocks = <&gate_clk 3>;
147 status = "okay"; 148 status = "okay";
148 }; 149 };
149 150
diff --git a/arch/arm/boot/dts/twl4030.dtsi b/arch/arm/boot/dts/twl4030.dtsi
index 63411b036932..ed0bc9546837 100644
--- a/arch/arm/boot/dts/twl4030.dtsi
+++ b/arch/arm/boot/dts/twl4030.dtsi
@@ -19,6 +19,10 @@
19 interrupts = <11>; 19 interrupts = <11>;
20 }; 20 };
21 21
22 watchdog {
23 compatible = "ti,twl4030-wdt";
24 };
25
22 vdac: regulator-vdac { 26 vdac: regulator-vdac {
23 compatible = "ti,twl4030-vdac"; 27 compatible = "ti,twl4030-vdac";
24 regulator-min-microvolt = <1800000>; 28 regulator-min-microvolt = <1800000>;
diff --git a/arch/arm/boot/dts/wm8850-w70v2.dts b/arch/arm/boot/dts/wm8850-w70v2.dts
new file mode 100644
index 000000000000..fcc660c89540
--- /dev/null
+++ b/arch/arm/boot/dts/wm8850-w70v2.dts
@@ -0,0 +1,47 @@
1/*
2 * wm8850-w70v2.dts
3 * - Device tree file for Wondermedia WM8850 Tablet
4 * - 'W70-V2' mainboard
5 * - HongLianYing 'HLY070ML268-21A' 7" LCD panel
6 *
7 * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz>
8 *
9 * Licensed under GPLv2 or later
10 */
11
12/dts-v1/;
13/include/ "wm8850.dtsi"
14
15/ {
16 model = "Wondermedia WM8850-W70v2 Tablet";
17
18 /*
19 * Display node is based on Sascha Hauer's patch on dri-devel.
20 * Added a bpp property to calculate the size of the framebuffer
21 * until the binding is formalized.
22 */
23 display: display@0 {
24 modes {
25 mode0: mode@0 {
26 hactive = <800>;
27 vactive = <480>;
28 hback-porch = <88>;
29 hfront-porch = <40>;
30 hsync-len = <0>;
31 vback-porch = <32>;
32 vfront-porch = <11>;
33 vsync-len = <1>;
34 clock = <0>; /* unused but required */
35 bpp = <16>; /* non-standard but required */
36 };
37 };
38 };
39
40 backlight {
41 compatible = "pwm-backlight";
42 pwms = <&pwm 0 50000 1>; /* duty inverted */
43
44 brightness-levels = <0 40 60 80 100 130 190 255>;
45 default-brightness-level = <5>;
46 };
47};
diff --git a/arch/arm/boot/dts/wm8850.dtsi b/arch/arm/boot/dts/wm8850.dtsi
new file mode 100644
index 000000000000..e8cbfdc87bba
--- /dev/null
+++ b/arch/arm/boot/dts/wm8850.dtsi
@@ -0,0 +1,224 @@
1/*
2 * wm8850.dtsi - Device tree file for Wondermedia WM8850 SoC
3 *
4 * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz>
5 *
6 * Licensed under GPLv2 or later
7 */
8
9/include/ "skeleton.dtsi"
10
11/ {
12 compatible = "wm,wm8850";
13
14 aliases {
15 serial0 = &uart0;
16 serial1 = &uart1;
17 serial2 = &uart2;
18 serial3 = &uart3;
19 };
20
21 soc {
22 #address-cells = <1>;
23 #size-cells = <1>;
24 compatible = "simple-bus";
25 ranges;
26 interrupt-parent = <&intc0>;
27
28 intc0: interrupt-controller@d8140000 {
29 compatible = "via,vt8500-intc";
30 interrupt-controller;
31 reg = <0xd8140000 0x10000>;
32 #interrupt-cells = <1>;
33 };
34
35 /* Secondary IC cascaded to intc0 */
36 intc1: interrupt-controller@d8150000 {
37 compatible = "via,vt8500-intc";
38 interrupt-controller;
39 #interrupt-cells = <1>;
40 reg = <0xD8150000 0x10000>;
41 interrupts = <56 57 58 59 60 61 62 63>;
42 };
43
44 gpio: gpio-controller@d8110000 {
45 compatible = "wm,wm8650-gpio";
46 gpio-controller;
47 reg = <0xd8110000 0x10000>;
48 #gpio-cells = <3>;
49 };
50
51 pmc@d8130000 {
52 compatible = "via,vt8500-pmc";
53 reg = <0xd8130000 0x1000>;
54
55 clocks {
56 #address-cells = <1>;
57 #size-cells = <0>;
58
59 ref25: ref25M {
60 #clock-cells = <0>;
61 compatible = "fixed-clock";
62 clock-frequency = <25000000>;
63 };
64
65 ref24: ref24M {
66 #clock-cells = <0>;
67 compatible = "fixed-clock";
68 clock-frequency = <24000000>;
69 };
70
71 plla: plla {
72 #clock-cells = <0>;
73 compatible = "wm,wm8750-pll-clock";
74 clocks = <&ref25>;
75 reg = <0x200>;
76 };
77
78 pllb: pllb {
79 #clock-cells = <0>;
80 compatible = "wm,wm8750-pll-clock";
81 clocks = <&ref25>;
82 reg = <0x204>;
83 };
84
85 clkuart0: uart0 {
86 #clock-cells = <0>;
87 compatible = "via,vt8500-device-clock";
88 clocks = <&ref24>;
89 enable-reg = <0x254>;
90 enable-bit = <24>;
91 };
92
93 clkuart1: uart1 {
94 #clock-cells = <0>;
95 compatible = "via,vt8500-device-clock";
96 clocks = <&ref24>;
97 enable-reg = <0x254>;
98 enable-bit = <25>;
99 };
100
101 clkuart2: uart2 {
102 #clock-cells = <0>;
103 compatible = "via,vt8500-device-clock";
104 clocks = <&ref24>;
105 enable-reg = <0x254>;
106 enable-bit = <26>;
107 };
108
109 clkuart3: uart3 {
110 #clock-cells = <0>;
111 compatible = "via,vt8500-device-clock";
112 clocks = <&ref24>;
113 enable-reg = <0x254>;
114 enable-bit = <27>;
115 };
116
117 clkpwm: pwm {
118 #clock-cells = <0>;
119 compatible = "via,vt8500-device-clock";
120 clocks = <&pllb>;
121 divisor-reg = <0x350>;
122 enable-reg = <0x250>;
123 enable-bit = <17>;
124 };
125
126 clksdhc: sdhc {
127 #clock-cells = <0>;
128 compatible = "via,vt8500-device-clock";
129 clocks = <&pllb>;
130 divisor-reg = <0x330>;
131 divisor-mask = <0x3f>;
132 enable-reg = <0x250>;
133 enable-bit = <0>;
134 };
135 };
136 };
137
138 fb@d8051700 {
139 compatible = "wm,wm8505-fb";
140 reg = <0xd8051700 0x200>;
141 display = <&display>;
142 default-mode = <&mode0>;
143 };
144
145 ge_rops@d8050400 {
146 compatible = "wm,prizm-ge-rops";
147 reg = <0xd8050400 0x100>;
148 };
149
150 pwm: pwm@d8220000 {
151 #pwm-cells = <3>;
152 compatible = "via,vt8500-pwm";
153 reg = <0xd8220000 0x100>;
154 clocks = <&clkpwm>;
155 };
156
157 timer@d8130100 {
158 compatible = "via,vt8500-timer";
159 reg = <0xd8130100 0x28>;
160 interrupts = <36>;
161 };
162
163 ehci@d8007900 {
164 compatible = "via,vt8500-ehci";
165 reg = <0xd8007900 0x200>;
166 interrupts = <26>;
167 };
168
169 uhci@d8007b00 {
170 compatible = "platform-uhci";
171 reg = <0xd8007b00 0x200>;
172 interrupts = <26>;
173 };
174
175 uhci@d8008d00 {
176 compatible = "platform-uhci";
177 reg = <0xd8008d00 0x200>;
178 interrupts = <26>;
179 };
180
181 uart0: uart@d8200000 {
182 compatible = "via,vt8500-uart";
183 reg = <0xd8200000 0x1040>;
184 interrupts = <32>;
185 clocks = <&clkuart0>;
186 };
187
188 uart1: uart@d82b0000 {
189 compatible = "via,vt8500-uart";
190 reg = <0xd82b0000 0x1040>;
191 interrupts = <33>;
192 clocks = <&clkuart1>;
193 };
194
195 uart2: uart@d8210000 {
196 compatible = "via,vt8500-uart";
197 reg = <0xd8210000 0x1040>;
198 interrupts = <47>;
199 clocks = <&clkuart2>;
200 };
201
202 uart3: uart@d82c0000 {
203 compatible = "via,vt8500-uart";
204 reg = <0xd82c0000 0x1040>;
205 interrupts = <50>;
206 clocks = <&clkuart3>;
207 };
208
209 rtc@d8100000 {
210 compatible = "via,vt8500-rtc";
211 reg = <0xd8100000 0x10000>;
212 interrupts = <48>;
213 };
214
215 sdhc@d800a000 {
216 compatible = "wm,wm8505-sdhc";
217 reg = <0xd800a000 0x1000>;
218 interrupts = <20 21>;
219 clocks = <&clksdhc>;
220 bus-width = <4>;
221 sdon-inverted;
222 };
223 };
224};
diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig
index 45ceeb0e93e0..9353184d730d 100644
--- a/arch/arm/common/Kconfig
+++ b/arch/arm/common/Kconfig
@@ -1,26 +1,3 @@
1config ARM_GIC
2 bool
3 select IRQ_DOMAIN
4 select MULTI_IRQ_HANDLER
5
6config GIC_NON_BANKED
7 bool
8
9config ARM_VIC
10 bool
11 select IRQ_DOMAIN
12 select MULTI_IRQ_HANDLER
13
14config ARM_VIC_NR
15 int
16 default 4 if ARCH_S5PV210
17 default 3 if ARCH_S5PC100
18 default 2
19 depends on ARM_VIC
20 help
21 The maximum number of VICs available in the system, for
22 power management.
23
24config ICST 1config ICST
25 bool 2 bool
26 3
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile
index e8a4e58f1b82..dc8dd0de5c0f 100644
--- a/arch/arm/common/Makefile
+++ b/arch/arm/common/Makefile
@@ -2,8 +2,6 @@
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4 4
5obj-$(CONFIG_ARM_GIC) += gic.o
6obj-$(CONFIG_ARM_VIC) += vic.o
7obj-$(CONFIG_ICST) += icst.o 5obj-$(CONFIG_ICST) += icst.o
8obj-$(CONFIG_SA1111) += sa1111.o 6obj-$(CONFIG_SA1111) += sa1111.o
9obj-$(CONFIG_PCI_HOST_VIA82C505) += via82c505.o 7obj-$(CONFIG_PCI_HOST_VIA82C505) += via82c505.o
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
deleted file mode 100644
index 36ae03a3f5d1..000000000000
--- a/arch/arm/common/gic.c
+++ /dev/null
@@ -1,811 +0,0 @@
1/*
2 * linux/arch/arm/common/gic.c
3 *
4 * Copyright (C) 2002 ARM Limited, 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 version 2 as
8 * published by the Free Software Foundation.
9 *
10 * Interrupt architecture for the GIC:
11 *
12 * o There is one Interrupt Distributor, which receives interrupts
13 * from system devices and sends them to the Interrupt Controllers.
14 *
15 * o There is one CPU Interface per CPU, which sends interrupts sent
16 * by the Distributor, and interrupts generated locally, to the
17 * associated CPU. The base address of the CPU interface is usually
18 * aliased so that the same address points to different chips depending
19 * on the CPU it is accessed from.
20 *
21 * Note that IRQs 0-31 are special - they are local to each CPU.
22 * As such, the enable set/clear, pending set/clear and active bit
23 * registers are banked per-cpu for these sources.
24 */
25#include <linux/init.h>
26#include <linux/kernel.h>
27#include <linux/err.h>
28#include <linux/module.h>
29#include <linux/list.h>
30#include <linux/smp.h>
31#include <linux/cpu_pm.h>
32#include <linux/cpumask.h>
33#include <linux/io.h>
34#include <linux/of.h>
35#include <linux/of_address.h>
36#include <linux/of_irq.h>
37#include <linux/irqdomain.h>
38#include <linux/interrupt.h>
39#include <linux/percpu.h>
40#include <linux/slab.h>
41
42#include <asm/irq.h>
43#include <asm/exception.h>
44#include <asm/smp_plat.h>
45#include <asm/mach/irq.h>
46#include <asm/hardware/gic.h>
47
48union gic_base {
49 void __iomem *common_base;
50 void __percpu __iomem **percpu_base;
51};
52
53struct gic_chip_data {
54 union gic_base dist_base;
55 union gic_base cpu_base;
56#ifdef CONFIG_CPU_PM
57 u32 saved_spi_enable[DIV_ROUND_UP(1020, 32)];
58 u32 saved_spi_conf[DIV_ROUND_UP(1020, 16)];
59 u32 saved_spi_target[DIV_ROUND_UP(1020, 4)];
60 u32 __percpu *saved_ppi_enable;
61 u32 __percpu *saved_ppi_conf;
62#endif
63 struct irq_domain *domain;
64 unsigned int gic_irqs;
65#ifdef CONFIG_GIC_NON_BANKED
66 void __iomem *(*get_base)(union gic_base *);
67#endif
68};
69
70static DEFINE_RAW_SPINLOCK(irq_controller_lock);
71
72/*
73 * The GIC mapping of CPU interfaces does not necessarily match
74 * the logical CPU numbering. Let's use a mapping as returned
75 * by the GIC itself.
76 */
77#define NR_GIC_CPU_IF 8
78static u8 gic_cpu_map[NR_GIC_CPU_IF] __read_mostly;
79
80/*
81 * Supported arch specific GIC irq extension.
82 * Default make them NULL.
83 */
84struct irq_chip gic_arch_extn = {
85 .irq_eoi = NULL,
86 .irq_mask = NULL,
87 .irq_unmask = NULL,
88 .irq_retrigger = NULL,
89 .irq_set_type = NULL,
90 .irq_set_wake = NULL,
91};
92
93#ifndef MAX_GIC_NR
94#define MAX_GIC_NR 1
95#endif
96
97static struct gic_chip_data gic_data[MAX_GIC_NR] __read_mostly;
98
99#ifdef CONFIG_GIC_NON_BANKED
100static void __iomem *gic_get_percpu_base(union gic_base *base)
101{
102 return *__this_cpu_ptr(base->percpu_base);
103}
104
105static void __iomem *gic_get_common_base(union gic_base *base)
106{
107 return base->common_base;
108}
109
110static inline void __iomem *gic_data_dist_base(struct gic_chip_data *data)
111{
112 return data->get_base(&data->dist_base);
113}
114
115static inline void __iomem *gic_data_cpu_base(struct gic_chip_data *data)
116{
117 return data->get_base(&data->cpu_base);
118}
119
120static inline void gic_set_base_accessor(struct gic_chip_data *data,
121 void __iomem *(*f)(union gic_base *))
122{
123 data->get_base = f;
124}
125#else
126#define gic_data_dist_base(d) ((d)->dist_base.common_base)
127#define gic_data_cpu_base(d) ((d)->cpu_base.common_base)
128#define gic_set_base_accessor(d,f)
129#endif
130
131static inline void __iomem *gic_dist_base(struct irq_data *d)
132{
133 struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
134 return gic_data_dist_base(gic_data);
135}
136
137static inline void __iomem *gic_cpu_base(struct irq_data *d)
138{
139 struct gic_chip_data *gic_data = irq_data_get_irq_chip_data(d);
140 return gic_data_cpu_base(gic_data);
141}
142
143static inline unsigned int gic_irq(struct irq_data *d)
144{
145 return d->hwirq;
146}
147
148/*
149 * Routines to acknowledge, disable and enable interrupts
150 */
151static void gic_mask_irq(struct irq_data *d)
152{
153 u32 mask = 1 << (gic_irq(d) % 32);
154
155 raw_spin_lock(&irq_controller_lock);
156 writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_CLEAR + (gic_irq(d) / 32) * 4);
157 if (gic_arch_extn.irq_mask)
158 gic_arch_extn.irq_mask(d);
159 raw_spin_unlock(&irq_controller_lock);
160}
161
162static void gic_unmask_irq(struct irq_data *d)
163{
164 u32 mask = 1 << (gic_irq(d) % 32);
165
166 raw_spin_lock(&irq_controller_lock);
167 if (gic_arch_extn.irq_unmask)
168 gic_arch_extn.irq_unmask(d);
169 writel_relaxed(mask, gic_dist_base(d) + GIC_DIST_ENABLE_SET + (gic_irq(d) / 32) * 4);
170 raw_spin_unlock(&irq_controller_lock);
171}
172
173static void gic_eoi_irq(struct irq_data *d)
174{
175 if (gic_arch_extn.irq_eoi) {
176 raw_spin_lock(&irq_controller_lock);
177 gic_arch_extn.irq_eoi(d);
178 raw_spin_unlock(&irq_controller_lock);
179 }
180
181 writel_relaxed(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI);
182}
183
184static int gic_set_type(struct irq_data *d, unsigned int type)
185{
186 void __iomem *base = gic_dist_base(d);
187 unsigned int gicirq = gic_irq(d);
188 u32 enablemask = 1 << (gicirq % 32);
189 u32 enableoff = (gicirq / 32) * 4;
190 u32 confmask = 0x2 << ((gicirq % 16) * 2);
191 u32 confoff = (gicirq / 16) * 4;
192 bool enabled = false;
193 u32 val;
194
195 /* Interrupt configuration for SGIs can't be changed */
196 if (gicirq < 16)
197 return -EINVAL;
198
199 if (type != IRQ_TYPE_LEVEL_HIGH && type != IRQ_TYPE_EDGE_RISING)
200 return -EINVAL;
201
202 raw_spin_lock(&irq_controller_lock);
203
204 if (gic_arch_extn.irq_set_type)
205 gic_arch_extn.irq_set_type(d, type);
206
207 val = readl_relaxed(base + GIC_DIST_CONFIG + confoff);
208 if (type == IRQ_TYPE_LEVEL_HIGH)
209 val &= ~confmask;
210 else if (type == IRQ_TYPE_EDGE_RISING)
211 val |= confmask;
212
213 /*
214 * As recommended by the spec, disable the interrupt before changing
215 * the configuration
216 */
217 if (readl_relaxed(base + GIC_DIST_ENABLE_SET + enableoff) & enablemask) {
218 writel_relaxed(enablemask, base + GIC_DIST_ENABLE_CLEAR + enableoff);
219 enabled = true;
220 }
221
222 writel_relaxed(val, base + GIC_DIST_CONFIG + confoff);
223
224 if (enabled)
225 writel_relaxed(enablemask, base + GIC_DIST_ENABLE_SET + enableoff);
226
227 raw_spin_unlock(&irq_controller_lock);
228
229 return 0;
230}
231
232static int gic_retrigger(struct irq_data *d)
233{
234 if (gic_arch_extn.irq_retrigger)
235 return gic_arch_extn.irq_retrigger(d);
236
237 return -ENXIO;
238}
239
240#ifdef CONFIG_SMP
241static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
242 bool force)
243{
244 void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3);
245 unsigned int shift = (gic_irq(d) % 4) * 8;
246 unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask);
247 u32 val, mask, bit;
248
249 if (cpu >= NR_GIC_CPU_IF || cpu >= nr_cpu_ids)
250 return -EINVAL;
251
252 mask = 0xff << shift;
253 bit = gic_cpu_map[cpu] << shift;
254
255 raw_spin_lock(&irq_controller_lock);
256 val = readl_relaxed(reg) & ~mask;
257 writel_relaxed(val | bit, reg);
258 raw_spin_unlock(&irq_controller_lock);
259
260 return IRQ_SET_MASK_OK;
261}
262#endif
263
264#ifdef CONFIG_PM
265static int gic_set_wake(struct irq_data *d, unsigned int on)
266{
267 int ret = -ENXIO;
268
269 if (gic_arch_extn.irq_set_wake)
270 ret = gic_arch_extn.irq_set_wake(d, on);
271
272 return ret;
273}
274
275#else
276#define gic_set_wake NULL
277#endif
278
279asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
280{
281 u32 irqstat, irqnr;
282 struct gic_chip_data *gic = &gic_data[0];
283 void __iomem *cpu_base = gic_data_cpu_base(gic);
284
285 do {
286 irqstat = readl_relaxed(cpu_base + GIC_CPU_INTACK);
287 irqnr = irqstat & ~0x1c00;
288
289 if (likely(irqnr > 15 && irqnr < 1021)) {
290 irqnr = irq_find_mapping(gic->domain, irqnr);
291 handle_IRQ(irqnr, regs);
292 continue;
293 }
294 if (irqnr < 16) {
295 writel_relaxed(irqstat, cpu_base + GIC_CPU_EOI);
296#ifdef CONFIG_SMP
297 handle_IPI(irqnr, regs);
298#endif
299 continue;
300 }
301 break;
302 } while (1);
303}
304
305static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
306{
307 struct gic_chip_data *chip_data = irq_get_handler_data(irq);
308 struct irq_chip *chip = irq_get_chip(irq);
309 unsigned int cascade_irq, gic_irq;
310 unsigned long status;
311
312 chained_irq_enter(chip, desc);
313
314 raw_spin_lock(&irq_controller_lock);
315 status = readl_relaxed(gic_data_cpu_base(chip_data) + GIC_CPU_INTACK);
316 raw_spin_unlock(&irq_controller_lock);
317
318 gic_irq = (status & 0x3ff);
319 if (gic_irq == 1023)
320 goto out;
321
322 cascade_irq = irq_find_mapping(chip_data->domain, gic_irq);
323 if (unlikely(gic_irq < 32 || gic_irq > 1020))
324 do_bad_IRQ(cascade_irq, desc);
325 else
326 generic_handle_irq(cascade_irq);
327
328 out:
329 chained_irq_exit(chip, desc);
330}
331
332static struct irq_chip gic_chip = {
333 .name = "GIC",
334 .irq_mask = gic_mask_irq,
335 .irq_unmask = gic_unmask_irq,
336 .irq_eoi = gic_eoi_irq,
337 .irq_set_type = gic_set_type,
338 .irq_retrigger = gic_retrigger,
339#ifdef CONFIG_SMP
340 .irq_set_affinity = gic_set_affinity,
341#endif
342 .irq_set_wake = gic_set_wake,
343};
344
345void __init gic_cascade_irq(unsigned int gic_nr, unsigned int irq)
346{
347 if (gic_nr >= MAX_GIC_NR)
348 BUG();
349 if (irq_set_handler_data(irq, &gic_data[gic_nr]) != 0)
350 BUG();
351 irq_set_chained_handler(irq, gic_handle_cascade_irq);
352}
353
354static void __init gic_dist_init(struct gic_chip_data *gic)
355{
356 unsigned int i;
357 u32 cpumask;
358 unsigned int gic_irqs = gic->gic_irqs;
359 void __iomem *base = gic_data_dist_base(gic);
360
361 writel_relaxed(0, base + GIC_DIST_CTRL);
362
363 /*
364 * Set all global interrupts to be level triggered, active low.
365 */
366 for (i = 32; i < gic_irqs; i += 16)
367 writel_relaxed(0, base + GIC_DIST_CONFIG + i * 4 / 16);
368
369 /*
370 * Set all global interrupts to this CPU only.
371 */
372 cpumask = readl_relaxed(base + GIC_DIST_TARGET + 0);
373 for (i = 32; i < gic_irqs; i += 4)
374 writel_relaxed(cpumask, base + GIC_DIST_TARGET + i * 4 / 4);
375
376 /*
377 * Set priority on all global interrupts.
378 */
379 for (i = 32; i < gic_irqs; i += 4)
380 writel_relaxed(0xa0a0a0a0, base + GIC_DIST_PRI + i * 4 / 4);
381
382 /*
383 * Disable all interrupts. Leave the PPI and SGIs alone
384 * as these enables are banked registers.
385 */
386 for (i = 32; i < gic_irqs; i += 32)
387 writel_relaxed(0xffffffff, base + GIC_DIST_ENABLE_CLEAR + i * 4 / 32);
388
389 writel_relaxed(1, base + GIC_DIST_CTRL);
390}
391
392static void __cpuinit gic_cpu_init(struct gic_chip_data *gic)
393{
394 void __iomem *dist_base = gic_data_dist_base(gic);
395 void __iomem *base = gic_data_cpu_base(gic);
396 unsigned int cpu_mask, cpu = smp_processor_id();
397 int i;
398
399 /*
400 * Get what the GIC says our CPU mask is.
401 */
402 BUG_ON(cpu >= NR_GIC_CPU_IF);
403 cpu_mask = readl_relaxed(dist_base + GIC_DIST_TARGET + 0);
404 gic_cpu_map[cpu] = cpu_mask;
405
406 /*
407 * Clear our mask from the other map entries in case they're
408 * still undefined.
409 */
410 for (i = 0; i < NR_GIC_CPU_IF; i++)
411 if (i != cpu)
412 gic_cpu_map[i] &= ~cpu_mask;
413
414 /*
415 * Deal with the banked PPI and SGI interrupts - disable all
416 * PPI interrupts, ensure all SGI interrupts are enabled.
417 */
418 writel_relaxed(0xffff0000, dist_base + GIC_DIST_ENABLE_CLEAR);
419 writel_relaxed(0x0000ffff, dist_base + GIC_DIST_ENABLE_SET);
420
421 /*
422 * Set priority on PPI and SGI interrupts
423 */
424 for (i = 0; i < 32; i += 4)
425 writel_relaxed(0xa0a0a0a0, dist_base + GIC_DIST_PRI + i * 4 / 4);
426
427 writel_relaxed(0xf0, base + GIC_CPU_PRIMASK);
428 writel_relaxed(1, base + GIC_CPU_CTRL);
429}
430
431#ifdef CONFIG_CPU_PM
432/*
433 * Saves the GIC distributor registers during suspend or idle. Must be called
434 * with interrupts disabled but before powering down the GIC. After calling
435 * this function, no interrupts will be delivered by the GIC, and another
436 * platform-specific wakeup source must be enabled.
437 */
438static void gic_dist_save(unsigned int gic_nr)
439{
440 unsigned int gic_irqs;
441 void __iomem *dist_base;
442 int i;
443
444 if (gic_nr >= MAX_GIC_NR)
445 BUG();
446
447 gic_irqs = gic_data[gic_nr].gic_irqs;
448 dist_base = gic_data_dist_base(&gic_data[gic_nr]);
449
450 if (!dist_base)
451 return;
452
453 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 16); i++)
454 gic_data[gic_nr].saved_spi_conf[i] =
455 readl_relaxed(dist_base + GIC_DIST_CONFIG + i * 4);
456
457 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 4); i++)
458 gic_data[gic_nr].saved_spi_target[i] =
459 readl_relaxed(dist_base + GIC_DIST_TARGET + i * 4);
460
461 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 32); i++)
462 gic_data[gic_nr].saved_spi_enable[i] =
463 readl_relaxed(dist_base + GIC_DIST_ENABLE_SET + i * 4);
464}
465
466/*
467 * Restores the GIC distributor registers during resume or when coming out of
468 * idle. Must be called before enabling interrupts. If a level interrupt
469 * that occured while the GIC was suspended is still present, it will be
470 * handled normally, but any edge interrupts that occured will not be seen by
471 * the GIC and need to be handled by the platform-specific wakeup source.
472 */
473static void gic_dist_restore(unsigned int gic_nr)
474{
475 unsigned int gic_irqs;
476 unsigned int i;
477 void __iomem *dist_base;
478
479 if (gic_nr >= MAX_GIC_NR)
480 BUG();
481
482 gic_irqs = gic_data[gic_nr].gic_irqs;
483 dist_base = gic_data_dist_base(&gic_data[gic_nr]);
484
485 if (!dist_base)
486 return;
487
488 writel_relaxed(0, dist_base + GIC_DIST_CTRL);
489
490 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 16); i++)
491 writel_relaxed(gic_data[gic_nr].saved_spi_conf[i],
492 dist_base + GIC_DIST_CONFIG + i * 4);
493
494 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 4); i++)
495 writel_relaxed(0xa0a0a0a0,
496 dist_base + GIC_DIST_PRI + i * 4);
497
498 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 4); i++)
499 writel_relaxed(gic_data[gic_nr].saved_spi_target[i],
500 dist_base + GIC_DIST_TARGET + i * 4);
501
502 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 32); i++)
503 writel_relaxed(gic_data[gic_nr].saved_spi_enable[i],
504 dist_base + GIC_DIST_ENABLE_SET + i * 4);
505
506 writel_relaxed(1, dist_base + GIC_DIST_CTRL);
507}
508
509static void gic_cpu_save(unsigned int gic_nr)
510{
511 int i;
512 u32 *ptr;
513 void __iomem *dist_base;
514 void __iomem *cpu_base;
515
516 if (gic_nr >= MAX_GIC_NR)
517 BUG();
518
519 dist_base = gic_data_dist_base(&gic_data[gic_nr]);
520 cpu_base = gic_data_cpu_base(&gic_data[gic_nr]);
521
522 if (!dist_base || !cpu_base)
523 return;
524
525 ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_enable);
526 for (i = 0; i < DIV_ROUND_UP(32, 32); i++)
527 ptr[i] = readl_relaxed(dist_base + GIC_DIST_ENABLE_SET + i * 4);
528
529 ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_conf);
530 for (i = 0; i < DIV_ROUND_UP(32, 16); i++)
531 ptr[i] = readl_relaxed(dist_base + GIC_DIST_CONFIG + i * 4);
532
533}
534
535static void gic_cpu_restore(unsigned int gic_nr)
536{
537 int i;
538 u32 *ptr;
539 void __iomem *dist_base;
540 void __iomem *cpu_base;
541
542 if (gic_nr >= MAX_GIC_NR)
543 BUG();
544
545 dist_base = gic_data_dist_base(&gic_data[gic_nr]);
546 cpu_base = gic_data_cpu_base(&gic_data[gic_nr]);
547
548 if (!dist_base || !cpu_base)
549 return;
550
551 ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_enable);
552 for (i = 0; i < DIV_ROUND_UP(32, 32); i++)
553 writel_relaxed(ptr[i], dist_base + GIC_DIST_ENABLE_SET + i * 4);
554
555 ptr = __this_cpu_ptr(gic_data[gic_nr].saved_ppi_conf);
556 for (i = 0; i < DIV_ROUND_UP(32, 16); i++)
557 writel_relaxed(ptr[i], dist_base + GIC_DIST_CONFIG + i * 4);
558
559 for (i = 0; i < DIV_ROUND_UP(32, 4); i++)
560 writel_relaxed(0xa0a0a0a0, dist_base + GIC_DIST_PRI + i * 4);
561
562 writel_relaxed(0xf0, cpu_base + GIC_CPU_PRIMASK);
563 writel_relaxed(1, cpu_base + GIC_CPU_CTRL);
564}
565
566static int gic_notifier(struct notifier_block *self, unsigned long cmd, void *v)
567{
568 int i;
569
570 for (i = 0; i < MAX_GIC_NR; i++) {
571#ifdef CONFIG_GIC_NON_BANKED
572 /* Skip over unused GICs */
573 if (!gic_data[i].get_base)
574 continue;
575#endif
576 switch (cmd) {
577 case CPU_PM_ENTER:
578 gic_cpu_save(i);
579 break;
580 case CPU_PM_ENTER_FAILED:
581 case CPU_PM_EXIT:
582 gic_cpu_restore(i);
583 break;
584 case CPU_CLUSTER_PM_ENTER:
585 gic_dist_save(i);
586 break;
587 case CPU_CLUSTER_PM_ENTER_FAILED:
588 case CPU_CLUSTER_PM_EXIT:
589 gic_dist_restore(i);
590 break;
591 }
592 }
593
594 return NOTIFY_OK;
595}
596
597static struct notifier_block gic_notifier_block = {
598 .notifier_call = gic_notifier,
599};
600
601static void __init gic_pm_init(struct gic_chip_data *gic)
602{
603 gic->saved_ppi_enable = __alloc_percpu(DIV_ROUND_UP(32, 32) * 4,
604 sizeof(u32));
605 BUG_ON(!gic->saved_ppi_enable);
606
607 gic->saved_ppi_conf = __alloc_percpu(DIV_ROUND_UP(32, 16) * 4,
608 sizeof(u32));
609 BUG_ON(!gic->saved_ppi_conf);
610
611 if (gic == &gic_data[0])
612 cpu_pm_register_notifier(&gic_notifier_block);
613}
614#else
615static void __init gic_pm_init(struct gic_chip_data *gic)
616{
617}
618#endif
619
620static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
621 irq_hw_number_t hw)
622{
623 if (hw < 32) {
624 irq_set_percpu_devid(irq);
625 irq_set_chip_and_handler(irq, &gic_chip,
626 handle_percpu_devid_irq);
627 set_irq_flags(irq, IRQF_VALID | IRQF_NOAUTOEN);
628 } else {
629 irq_set_chip_and_handler(irq, &gic_chip,
630 handle_fasteoi_irq);
631 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
632 }
633 irq_set_chip_data(irq, d->host_data);
634 return 0;
635}
636
637static int gic_irq_domain_xlate(struct irq_domain *d,
638 struct device_node *controller,
639 const u32 *intspec, unsigned int intsize,
640 unsigned long *out_hwirq, unsigned int *out_type)
641{
642 if (d->of_node != controller)
643 return -EINVAL;
644 if (intsize < 3)
645 return -EINVAL;
646
647 /* Get the interrupt number and add 16 to skip over SGIs */
648 *out_hwirq = intspec[1] + 16;
649
650 /* For SPIs, we need to add 16 more to get the GIC irq ID number */
651 if (!intspec[0])
652 *out_hwirq += 16;
653
654 *out_type = intspec[2] & IRQ_TYPE_SENSE_MASK;
655 return 0;
656}
657
658const struct irq_domain_ops gic_irq_domain_ops = {
659 .map = gic_irq_domain_map,
660 .xlate = gic_irq_domain_xlate,
661};
662
663void __init gic_init_bases(unsigned int gic_nr, int irq_start,
664 void __iomem *dist_base, void __iomem *cpu_base,
665 u32 percpu_offset, struct device_node *node)
666{
667 irq_hw_number_t hwirq_base;
668 struct gic_chip_data *gic;
669 int gic_irqs, irq_base, i;
670
671 BUG_ON(gic_nr >= MAX_GIC_NR);
672
673 gic = &gic_data[gic_nr];
674#ifdef CONFIG_GIC_NON_BANKED
675 if (percpu_offset) { /* Frankein-GIC without banked registers... */
676 unsigned int cpu;
677
678 gic->dist_base.percpu_base = alloc_percpu(void __iomem *);
679 gic->cpu_base.percpu_base = alloc_percpu(void __iomem *);
680 if (WARN_ON(!gic->dist_base.percpu_base ||
681 !gic->cpu_base.percpu_base)) {
682 free_percpu(gic->dist_base.percpu_base);
683 free_percpu(gic->cpu_base.percpu_base);
684 return;
685 }
686
687 for_each_possible_cpu(cpu) {
688 unsigned long offset = percpu_offset * cpu_logical_map(cpu);
689 *per_cpu_ptr(gic->dist_base.percpu_base, cpu) = dist_base + offset;
690 *per_cpu_ptr(gic->cpu_base.percpu_base, cpu) = cpu_base + offset;
691 }
692
693 gic_set_base_accessor(gic, gic_get_percpu_base);
694 } else
695#endif
696 { /* Normal, sane GIC... */
697 WARN(percpu_offset,
698 "GIC_NON_BANKED not enabled, ignoring %08x offset!",
699 percpu_offset);
700 gic->dist_base.common_base = dist_base;
701 gic->cpu_base.common_base = cpu_base;
702 gic_set_base_accessor(gic, gic_get_common_base);
703 }
704
705 /*
706 * Initialize the CPU interface map to all CPUs.
707 * It will be refined as each CPU probes its ID.
708 */
709 for (i = 0; i < NR_GIC_CPU_IF; i++)
710 gic_cpu_map[i] = 0xff;
711
712 /*
713 * For primary GICs, skip over SGIs.
714 * For secondary GICs, skip over PPIs, too.
715 */
716 if (gic_nr == 0 && (irq_start & 31) > 0) {
717 hwirq_base = 16;
718 if (irq_start != -1)
719 irq_start = (irq_start & ~31) + 16;
720 } else {
721 hwirq_base = 32;
722 }
723
724 /*
725 * Find out how many interrupts are supported.
726 * The GIC only supports up to 1020 interrupt sources.
727 */
728 gic_irqs = readl_relaxed(gic_data_dist_base(gic) + GIC_DIST_CTR) & 0x1f;
729 gic_irqs = (gic_irqs + 1) * 32;
730 if (gic_irqs > 1020)
731 gic_irqs = 1020;
732 gic->gic_irqs = gic_irqs;
733
734 gic_irqs -= hwirq_base; /* calculate # of irqs to allocate */
735 irq_base = irq_alloc_descs(irq_start, 16, gic_irqs, numa_node_id());
736 if (IS_ERR_VALUE(irq_base)) {
737 WARN(1, "Cannot allocate irq_descs @ IRQ%d, assuming pre-allocated\n",
738 irq_start);
739 irq_base = irq_start;
740 }
741 gic->domain = irq_domain_add_legacy(node, gic_irqs, irq_base,
742 hwirq_base, &gic_irq_domain_ops, gic);
743 if (WARN_ON(!gic->domain))
744 return;
745
746 gic_chip.flags |= gic_arch_extn.flags;
747 gic_dist_init(gic);
748 gic_cpu_init(gic);
749 gic_pm_init(gic);
750}
751
752void __cpuinit gic_secondary_init(unsigned int gic_nr)
753{
754 BUG_ON(gic_nr >= MAX_GIC_NR);
755
756 gic_cpu_init(&gic_data[gic_nr]);
757}
758
759#ifdef CONFIG_SMP
760void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
761{
762 int cpu;
763 unsigned long map = 0;
764
765 /* Convert our logical CPU mask into a physical one. */
766 for_each_cpu(cpu, mask)
767 map |= gic_cpu_map[cpu];
768
769 /*
770 * Ensure that stores to Normal memory are visible to the
771 * other CPUs before issuing the IPI.
772 */
773 dsb();
774
775 /* this always happens on GIC0 */
776 writel_relaxed(map << 16 | irq, gic_data_dist_base(&gic_data[0]) + GIC_DIST_SOFTINT);
777}
778#endif
779
780#ifdef CONFIG_OF
781static int gic_cnt __initdata = 0;
782
783int __init gic_of_init(struct device_node *node, struct device_node *parent)
784{
785 void __iomem *cpu_base;
786 void __iomem *dist_base;
787 u32 percpu_offset;
788 int irq;
789
790 if (WARN_ON(!node))
791 return -ENODEV;
792
793 dist_base = of_iomap(node, 0);
794 WARN(!dist_base, "unable to map gic dist registers\n");
795
796 cpu_base = of_iomap(node, 1);
797 WARN(!cpu_base, "unable to map gic cpu registers\n");
798
799 if (of_property_read_u32(node, "cpu-offset", &percpu_offset))
800 percpu_offset = 0;
801
802 gic_init_bases(gic_cnt, -1, dist_base, cpu_base, percpu_offset, node);
803
804 if (parent) {
805 irq = irq_of_parse_and_map(node, 0);
806 gic_cascade_irq(gic_cnt, irq);
807 }
808 gic_cnt++;
809 return 0;
810}
811#endif
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 9173d112ea01..e57d7e5bf96a 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -686,8 +686,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
686 * %-EINVAL no platform data passed 686 * %-EINVAL no platform data passed
687 * %0 successful. 687 * %0 successful.
688 */ 688 */
689static int __devinit 689static int __sa1111_probe(struct device *me, struct resource *mem, int irq)
690__sa1111_probe(struct device *me, struct resource *mem, int irq)
691{ 690{
692 struct sa1111_platform_data *pd = me->platform_data; 691 struct sa1111_platform_data *pd = me->platform_data;
693 struct sa1111 *sachip; 692 struct sa1111 *sachip;
@@ -1011,7 +1010,7 @@ static int sa1111_resume(struct platform_device *dev)
1011#define sa1111_resume NULL 1010#define sa1111_resume NULL
1012#endif 1011#endif
1013 1012
1014static int __devinit sa1111_probe(struct platform_device *pdev) 1013static int sa1111_probe(struct platform_device *pdev)
1015{ 1014{
1016 struct resource *mem; 1015 struct resource *mem;
1017 int irq; 1016 int irq;
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c
index 0c616d5fcb0f..a5c3dc38aa18 100644
--- a/arch/arm/common/scoop.c
+++ b/arch/arm/common/scoop.c
@@ -176,7 +176,7 @@ static int scoop_resume(struct platform_device *dev)
176#define scoop_resume NULL 176#define scoop_resume NULL
177#endif 177#endif
178 178
179static int __devinit scoop_probe(struct platform_device *pdev) 179static int scoop_probe(struct platform_device *pdev)
180{ 180{
181 struct scoop_dev *devptr; 181 struct scoop_dev *devptr;
182 struct scoop_config *inf; 182 struct scoop_config *inf;
@@ -243,7 +243,7 @@ err_ioremap:
243 return ret; 243 return ret;
244} 244}
245 245
246static int __devexit scoop_remove(struct platform_device *pdev) 246static int scoop_remove(struct platform_device *pdev)
247{ 247{
248 struct scoop_dev *sdev = platform_get_drvdata(pdev); 248 struct scoop_dev *sdev = platform_get_drvdata(pdev);
249 int ret; 249 int ret;
@@ -268,7 +268,7 @@ static int __devexit scoop_remove(struct platform_device *pdev)
268 268
269static struct platform_driver scoop_driver = { 269static struct platform_driver scoop_driver = {
270 .probe = scoop_probe, 270 .probe = scoop_probe,
271 .remove = __devexit_p(scoop_remove), 271 .remove = scoop_remove,
272 .suspend = scoop_suspend, 272 .suspend = scoop_suspend,
273 .resume = scoop_resume, 273 .resume = scoop_resume,
274 .driver = { 274 .driver = {
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c
deleted file mode 100644
index e4df17ca90c7..000000000000
--- a/arch/arm/common/vic.c
+++ /dev/null
@@ -1,459 +0,0 @@
1/*
2 * linux/arch/arm/common/vic.c
3 *
4 * Copyright (C) 1999 - 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
22#include <linux/export.h>
23#include <linux/init.h>
24#include <linux/list.h>
25#include <linux/io.h>
26#include <linux/irqdomain.h>
27#include <linux/of.h>
28#include <linux/of_address.h>
29#include <linux/of_irq.h>
30#include <linux/syscore_ops.h>
31#include <linux/device.h>
32#include <linux/amba/bus.h>
33
34#include <asm/exception.h>
35#include <asm/mach/irq.h>
36#include <asm/hardware/vic.h>
37
38/**
39 * struct vic_device - VIC PM device
40 * @irq: The IRQ number for the base of the VIC.
41 * @base: The register base for the VIC.
42 * @valid_sources: A bitmask of valid interrupts
43 * @resume_sources: A bitmask of interrupts for resume.
44 * @resume_irqs: The IRQs enabled for resume.
45 * @int_select: Save for VIC_INT_SELECT.
46 * @int_enable: Save for VIC_INT_ENABLE.
47 * @soft_int: Save for VIC_INT_SOFT.
48 * @protect: Save for VIC_PROTECT.
49 * @domain: The IRQ domain for the VIC.
50 */
51struct vic_device {
52 void __iomem *base;
53 int irq;
54 u32 valid_sources;
55 u32 resume_sources;
56 u32 resume_irqs;
57 u32 int_select;
58 u32 int_enable;
59 u32 soft_int;
60 u32 protect;
61 struct irq_domain *domain;
62};
63
64/* we cannot allocate memory when VICs are initially registered */
65static struct vic_device vic_devices[CONFIG_ARM_VIC_NR];
66
67static int vic_id;
68
69/**
70 * vic_init2 - common initialisation code
71 * @base: Base of the VIC.
72 *
73 * Common initialisation code for registration
74 * and resume.
75*/
76static void vic_init2(void __iomem *base)
77{
78 int i;
79
80 for (i = 0; i < 16; i++) {
81 void __iomem *reg = base + VIC_VECT_CNTL0 + (i * 4);
82 writel(VIC_VECT_CNTL_ENABLE | i, reg);
83 }
84
85 writel(32, base + VIC_PL190_DEF_VECT_ADDR);
86}
87
88#ifdef CONFIG_PM
89static void resume_one_vic(struct vic_device *vic)
90{
91 void __iomem *base = vic->base;
92
93 printk(KERN_DEBUG "%s: resuming vic at %p\n", __func__, base);
94
95 /* re-initialise static settings */
96 vic_init2(base);
97
98 writel(vic->int_select, base + VIC_INT_SELECT);
99 writel(vic->protect, base + VIC_PROTECT);
100
101 /* set the enabled ints and then clear the non-enabled */
102 writel(vic->int_enable, base + VIC_INT_ENABLE);
103 writel(~vic->int_enable, base + VIC_INT_ENABLE_CLEAR);
104
105 /* and the same for the soft-int register */
106
107 writel(vic->soft_int, base + VIC_INT_SOFT);
108 writel(~vic->soft_int, base + VIC_INT_SOFT_CLEAR);
109}
110
111static void vic_resume(void)
112{
113 int id;
114
115 for (id = vic_id - 1; id >= 0; id--)
116 resume_one_vic(vic_devices + id);
117}
118
119static void suspend_one_vic(struct vic_device *vic)
120{
121 void __iomem *base = vic->base;
122
123 printk(KERN_DEBUG "%s: suspending vic at %p\n", __func__, base);
124
125 vic->int_select = readl(base + VIC_INT_SELECT);
126 vic->int_enable = readl(base + VIC_INT_ENABLE);
127 vic->soft_int = readl(base + VIC_INT_SOFT);
128 vic->protect = readl(base + VIC_PROTECT);
129
130 /* set the interrupts (if any) that are used for
131 * resuming the system */
132
133 writel(vic->resume_irqs, base + VIC_INT_ENABLE);
134 writel(~vic->resume_irqs, base + VIC_INT_ENABLE_CLEAR);
135}
136
137static int vic_suspend(void)
138{
139 int id;
140
141 for (id = 0; id < vic_id; id++)
142 suspend_one_vic(vic_devices + id);
143
144 return 0;
145}
146
147struct syscore_ops vic_syscore_ops = {
148 .suspend = vic_suspend,
149 .resume = vic_resume,
150};
151
152/**
153 * vic_pm_init - initicall to register VIC pm
154 *
155 * This is called via late_initcall() to register
156 * the resources for the VICs due to the early
157 * nature of the VIC's registration.
158*/
159static int __init vic_pm_init(void)
160{
161 if (vic_id > 0)
162 register_syscore_ops(&vic_syscore_ops);
163
164 return 0;
165}
166late_initcall(vic_pm_init);
167#endif /* CONFIG_PM */
168
169static struct irq_chip vic_chip;
170
171static int vic_irqdomain_map(struct irq_domain *d, unsigned int irq,
172 irq_hw_number_t hwirq)
173{
174 struct vic_device *v = d->host_data;
175
176 /* Skip invalid IRQs, only register handlers for the real ones */
177 if (!(v->valid_sources & (1 << hwirq)))
178 return -ENOTSUPP;
179 irq_set_chip_and_handler(irq, &vic_chip, handle_level_irq);
180 irq_set_chip_data(irq, v->base);
181 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
182 return 0;
183}
184
185static struct irq_domain_ops vic_irqdomain_ops = {
186 .map = vic_irqdomain_map,
187 .xlate = irq_domain_xlate_onetwocell,
188};
189
190/**
191 * vic_register() - Register a VIC.
192 * @base: The base address of the VIC.
193 * @irq: The base IRQ for the VIC.
194 * @valid_sources: bitmask of valid interrupts
195 * @resume_sources: bitmask of interrupts allowed for resume sources.
196 * @node: The device tree node associated with the VIC.
197 *
198 * Register the VIC with the system device tree so that it can be notified
199 * of suspend and resume requests and ensure that the correct actions are
200 * taken to re-instate the settings on resume.
201 *
202 * This also configures the IRQ domain for the VIC.
203 */
204static void __init vic_register(void __iomem *base, unsigned int irq,
205 u32 valid_sources, u32 resume_sources,
206 struct device_node *node)
207{
208 struct vic_device *v;
209
210 if (vic_id >= ARRAY_SIZE(vic_devices)) {
211 printk(KERN_ERR "%s: too few VICs, increase CONFIG_ARM_VIC_NR\n", __func__);
212 return;
213 }
214
215 v = &vic_devices[vic_id];
216 v->base = base;
217 v->valid_sources = valid_sources;
218 v->resume_sources = resume_sources;
219 v->irq = irq;
220 vic_id++;
221 v->domain = irq_domain_add_simple(node, fls(valid_sources), irq,
222 &vic_irqdomain_ops, v);
223}
224
225static void vic_ack_irq(struct irq_data *d)
226{
227 void __iomem *base = irq_data_get_irq_chip_data(d);
228 unsigned int irq = d->hwirq;
229 writel(1 << irq, base + VIC_INT_ENABLE_CLEAR);
230 /* moreover, clear the soft-triggered, in case it was the reason */
231 writel(1 << irq, base + VIC_INT_SOFT_CLEAR);
232}
233
234static void vic_mask_irq(struct irq_data *d)
235{
236 void __iomem *base = irq_data_get_irq_chip_data(d);
237 unsigned int irq = d->hwirq;
238 writel(1 << irq, base + VIC_INT_ENABLE_CLEAR);
239}
240
241static void vic_unmask_irq(struct irq_data *d)
242{
243 void __iomem *base = irq_data_get_irq_chip_data(d);
244 unsigned int irq = d->hwirq;
245 writel(1 << irq, base + VIC_INT_ENABLE);
246}
247
248#if defined(CONFIG_PM)
249static struct vic_device *vic_from_irq(unsigned int irq)
250{
251 struct vic_device *v = vic_devices;
252 unsigned int base_irq = irq & ~31;
253 int id;
254
255 for (id = 0; id < vic_id; id++, v++) {
256 if (v->irq == base_irq)
257 return v;
258 }
259
260 return NULL;
261}
262
263static int vic_set_wake(struct irq_data *d, unsigned int on)
264{
265 struct vic_device *v = vic_from_irq(d->irq);
266 unsigned int off = d->hwirq;
267 u32 bit = 1 << off;
268
269 if (!v)
270 return -EINVAL;
271
272 if (!(bit & v->resume_sources))
273 return -EINVAL;
274
275 if (on)
276 v->resume_irqs |= bit;
277 else
278 v->resume_irqs &= ~bit;
279
280 return 0;
281}
282#else
283#define vic_set_wake NULL
284#endif /* CONFIG_PM */
285
286static struct irq_chip vic_chip = {
287 .name = "VIC",
288 .irq_ack = vic_ack_irq,
289 .irq_mask = vic_mask_irq,
290 .irq_unmask = vic_unmask_irq,
291 .irq_set_wake = vic_set_wake,
292};
293
294static void __init vic_disable(void __iomem *base)
295{
296 writel(0, base + VIC_INT_SELECT);
297 writel(0, base + VIC_INT_ENABLE);
298 writel(~0, base + VIC_INT_ENABLE_CLEAR);
299 writel(0, base + VIC_ITCR);
300 writel(~0, base + VIC_INT_SOFT_CLEAR);
301}
302
303static void __init vic_clear_interrupts(void __iomem *base)
304{
305 unsigned int i;
306
307 writel(0, base + VIC_PL190_VECT_ADDR);
308 for (i = 0; i < 19; i++) {
309 unsigned int value;
310
311 value = readl(base + VIC_PL190_VECT_ADDR);
312 writel(value, base + VIC_PL190_VECT_ADDR);
313 }
314}
315
316/*
317 * The PL190 cell from ARM has been modified by ST to handle 64 interrupts.
318 * The original cell has 32 interrupts, while the modified one has 64,
319 * replocating two blocks 0x00..0x1f in 0x20..0x3f. In that case
320 * the probe function is called twice, with base set to offset 000
321 * and 020 within the page. We call this "second block".
322 */
323static void __init vic_init_st(void __iomem *base, unsigned int irq_start,
324 u32 vic_sources, struct device_node *node)
325{
326 unsigned int i;
327 int vic_2nd_block = ((unsigned long)base & ~PAGE_MASK) != 0;
328
329 /* Disable all interrupts initially. */
330 vic_disable(base);
331
332 /*
333 * Make sure we clear all existing interrupts. The vector registers
334 * in this cell are after the second block of general registers,
335 * so we can address them using standard offsets, but only from
336 * the second base address, which is 0x20 in the page
337 */
338 if (vic_2nd_block) {
339 vic_clear_interrupts(base);
340
341 /* ST has 16 vectors as well, but we don't enable them by now */
342 for (i = 0; i < 16; i++) {
343 void __iomem *reg = base + VIC_VECT_CNTL0 + (i * 4);
344 writel(0, reg);
345 }
346
347 writel(32, base + VIC_PL190_DEF_VECT_ADDR);
348 }
349
350 vic_register(base, irq_start, vic_sources, 0, node);
351}
352
353void __init __vic_init(void __iomem *base, int irq_start,
354 u32 vic_sources, u32 resume_sources,
355 struct device_node *node)
356{
357 unsigned int i;
358 u32 cellid = 0;
359 enum amba_vendor vendor;
360
361 /* Identify which VIC cell this one is, by reading the ID */
362 for (i = 0; i < 4; i++) {
363 void __iomem *addr;
364 addr = (void __iomem *)((u32)base & PAGE_MASK) + 0xfe0 + (i * 4);
365 cellid |= (readl(addr) & 0xff) << (8 * i);
366 }
367 vendor = (cellid >> 12) & 0xff;
368 printk(KERN_INFO "VIC @%p: id 0x%08x, vendor 0x%02x\n",
369 base, cellid, vendor);
370
371 switch(vendor) {
372 case AMBA_VENDOR_ST:
373 vic_init_st(base, irq_start, vic_sources, node);
374 return;
375 default:
376 printk(KERN_WARNING "VIC: unknown vendor, continuing anyways\n");
377 /* fall through */
378 case AMBA_VENDOR_ARM:
379 break;
380 }
381
382 /* Disable all interrupts initially. */
383 vic_disable(base);
384
385 /* Make sure we clear all existing interrupts */
386 vic_clear_interrupts(base);
387
388 vic_init2(base);
389
390 vic_register(base, irq_start, vic_sources, resume_sources, node);
391}
392
393/**
394 * vic_init() - initialise a vectored interrupt controller
395 * @base: iomem base address
396 * @irq_start: starting interrupt number, must be muliple of 32
397 * @vic_sources: bitmask of interrupt sources to allow
398 * @resume_sources: bitmask of interrupt sources to allow for resume
399 */
400void __init vic_init(void __iomem *base, unsigned int irq_start,
401 u32 vic_sources, u32 resume_sources)
402{
403 __vic_init(base, irq_start, vic_sources, resume_sources, NULL);
404}
405
406#ifdef CONFIG_OF
407int __init vic_of_init(struct device_node *node, struct device_node *parent)
408{
409 void __iomem *regs;
410
411 if (WARN(parent, "non-root VICs are not supported"))
412 return -EINVAL;
413
414 regs = of_iomap(node, 0);
415 if (WARN_ON(!regs))
416 return -EIO;
417
418 /*
419 * Passing -1 as first IRQ makes the simple domain allocate descriptors
420 */
421 __vic_init(regs, -1, ~0, ~0, node);
422
423 return 0;
424}
425#endif /* CONFIG OF */
426
427/*
428 * Handle each interrupt in a single VIC. Returns non-zero if we've
429 * handled at least one interrupt. This reads the status register
430 * before handling each interrupt, which is necessary given that
431 * handle_IRQ may briefly re-enable interrupts for soft IRQ handling.
432 */
433static int handle_one_vic(struct vic_device *vic, struct pt_regs *regs)
434{
435 u32 stat, irq;
436 int handled = 0;
437
438 while ((stat = readl_relaxed(vic->base + VIC_IRQ_STATUS))) {
439 irq = ffs(stat) - 1;
440 handle_IRQ(irq_find_mapping(vic->domain, irq), regs);
441 handled = 1;
442 }
443
444 return handled;
445}
446
447/*
448 * Keep iterating over all registered VIC's until there are no pending
449 * interrupts.
450 */
451asmlinkage void __exception_irq_entry vic_handle_irq(struct pt_regs *regs)
452{
453 int i, handled;
454
455 do {
456 for (i = 0, handled = 0; i < vic_id; ++i)
457 handled |= handle_one_vic(&vic_devices[i], regs);
458 } while (handled);
459}
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index dbea6f4efe9f..2eeff1e64b6e 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -6,6 +6,7 @@ CONFIG_MACH_ARMADA_370=y
6CONFIG_MACH_ARMADA_XP=y 6CONFIG_MACH_ARMADA_XP=y
7CONFIG_ARCH_HIGHBANK=y 7CONFIG_ARCH_HIGHBANK=y
8CONFIG_ARCH_SOCFPGA=y 8CONFIG_ARCH_SOCFPGA=y
9CONFIG_ARCH_SUNXI=y
9# CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set 10# CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA is not set
10CONFIG_ARM_ERRATA_754322=y 11CONFIG_ARM_ERRATA_754322=y
11CONFIG_SMP=y 12CONFIG_SMP=y
diff --git a/arch/arm/configs/mvebu_defconfig b/arch/arm/configs/mvebu_defconfig
index a702fb345c01..b5bc96cb65a7 100644
--- a/arch/arm/configs/mvebu_defconfig
+++ b/arch/arm/configs/mvebu_defconfig
@@ -33,9 +33,7 @@ CONFIG_MVNETA=y
33CONFIG_MARVELL_PHY=y 33CONFIG_MARVELL_PHY=y
34CONFIG_SERIAL_8250=y 34CONFIG_SERIAL_8250=y
35CONFIG_SERIAL_8250_CONSOLE=y 35CONFIG_SERIAL_8250_CONSOLE=y
36CONFIG_SERIAL_OF_PLATFORM=y 36CONFIG_SERIAL_8250_DW=y
37CONFIG_I2C=y
38CONFIG_I2C_MV64XXX=y
39CONFIG_GPIOLIB=y 37CONFIG_GPIOLIB=y
40CONFIG_GPIO_SYSFS=y 38CONFIG_GPIO_SYSFS=y
41# CONFIG_USB_SUPPORT is not set 39# CONFIG_USB_SUPPORT is not set
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index a1dc5c071e71..82ce8d738fa1 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -65,6 +65,8 @@ CONFIG_MAC80211_RC_PID=y
65CONFIG_MAC80211_RC_DEFAULT_PID=y 65CONFIG_MAC80211_RC_DEFAULT_PID=y
66CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" 66CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
67CONFIG_CONNECTOR=y 67CONFIG_CONNECTOR=y
68CONFIG_DEVTMPFS=y
69CONFIG_DEVTMPFS_MOUNT=y
68CONFIG_MTD=y 70CONFIG_MTD=y
69CONFIG_MTD_CMDLINE_PARTS=y 71CONFIG_MTD_CMDLINE_PARTS=y
70CONFIG_MTD_CHAR=y 72CONFIG_MTD_CHAR=y
@@ -132,9 +134,11 @@ CONFIG_POWER_SUPPLY=y
132CONFIG_WATCHDOG=y 134CONFIG_WATCHDOG=y
133CONFIG_OMAP_WATCHDOG=y 135CONFIG_OMAP_WATCHDOG=y
134CONFIG_TWL4030_WATCHDOG=y 136CONFIG_TWL4030_WATCHDOG=y
137CONFIG_MFD_TPS65217=y
135CONFIG_REGULATOR_TWL4030=y 138CONFIG_REGULATOR_TWL4030=y
136CONFIG_REGULATOR_TPS65023=y 139CONFIG_REGULATOR_TPS65023=y
137CONFIG_REGULATOR_TPS6507X=y 140CONFIG_REGULATOR_TPS6507X=y
141CONFIG_REGULATOR_TPS65217=y
138CONFIG_FB=y 142CONFIG_FB=y
139CONFIG_FIRMWARE_EDID=y 143CONFIG_FIRMWARE_EDID=y
140CONFIG_FB_MODE_HELPERS=y 144CONFIG_FB_MODE_HELPERS=y
@@ -170,6 +174,7 @@ CONFIG_SND_DEBUG=y
170CONFIG_SND_USB_AUDIO=m 174CONFIG_SND_USB_AUDIO=m
171CONFIG_SND_SOC=m 175CONFIG_SND_SOC=m
172CONFIG_SND_OMAP_SOC=m 176CONFIG_SND_OMAP_SOC=m
177CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m
173CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m 178CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m
174CONFIG_USB=y 179CONFIG_USB=y
175CONFIG_USB_DEBUG=y 180CONFIG_USB_DEBUG=y
diff --git a/arch/arm/include/asm/hardware/gic.h b/arch/arm/include/asm/hardware/gic.h
deleted file mode 100644
index 4b1ce6cd477f..000000000000
--- a/arch/arm/include/asm/hardware/gic.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * arch/arm/include/asm/hardware/gic.h
3 *
4 * Copyright (C) 2002 ARM Limited, 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 version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __ASM_ARM_HARDWARE_GIC_H
11#define __ASM_ARM_HARDWARE_GIC_H
12
13#include <linux/compiler.h>
14
15#define GIC_CPU_CTRL 0x00
16#define GIC_CPU_PRIMASK 0x04
17#define GIC_CPU_BINPOINT 0x08
18#define GIC_CPU_INTACK 0x0c
19#define GIC_CPU_EOI 0x10
20#define GIC_CPU_RUNNINGPRI 0x14
21#define GIC_CPU_HIGHPRI 0x18
22
23#define GIC_DIST_CTRL 0x000
24#define GIC_DIST_CTR 0x004
25#define GIC_DIST_ENABLE_SET 0x100
26#define GIC_DIST_ENABLE_CLEAR 0x180
27#define GIC_DIST_PENDING_SET 0x200
28#define GIC_DIST_PENDING_CLEAR 0x280
29#define GIC_DIST_ACTIVE_BIT 0x300
30#define GIC_DIST_PRI 0x400
31#define GIC_DIST_TARGET 0x800
32#define GIC_DIST_CONFIG 0xc00
33#define GIC_DIST_SOFTINT 0xf00
34
35#ifndef __ASSEMBLY__
36#include <linux/irqdomain.h>
37struct device_node;
38
39extern struct irq_chip gic_arch_extn;
40
41void gic_init_bases(unsigned int, int, void __iomem *, void __iomem *,
42 u32 offset, struct device_node *);
43int gic_of_init(struct device_node *node, struct device_node *parent);
44void gic_secondary_init(unsigned int);
45void gic_handle_irq(struct pt_regs *regs);
46void gic_cascade_irq(unsigned int gic_nr, unsigned int irq);
47void gic_raise_softirq(const struct cpumask *mask, unsigned int irq);
48
49static inline void gic_init(unsigned int nr, int start,
50 void __iomem *dist , void __iomem *cpu)
51{
52 gic_init_bases(nr, start, dist, cpu, 0, NULL);
53}
54
55#endif
56
57#endif
diff --git a/arch/arm/include/asm/hardware/vic.h b/arch/arm/include/asm/hardware/vic.h
deleted file mode 100644
index 2bebad36fc83..000000000000
--- a/arch/arm/include/asm/hardware/vic.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 * arch/arm/include/asm/hardware/vic.h
3 *
4 * Copyright (c) ARM Limited 2003. 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 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ASM_ARM_HARDWARE_VIC_H
21#define __ASM_ARM_HARDWARE_VIC_H
22
23#define VIC_IRQ_STATUS 0x00
24#define VIC_FIQ_STATUS 0x04
25#define VIC_RAW_STATUS 0x08
26#define VIC_INT_SELECT 0x0c /* 1 = FIQ, 0 = IRQ */
27#define VIC_INT_ENABLE 0x10 /* 1 = enable, 0 = disable */
28#define VIC_INT_ENABLE_CLEAR 0x14
29#define VIC_INT_SOFT 0x18
30#define VIC_INT_SOFT_CLEAR 0x1c
31#define VIC_PROTECT 0x20
32#define VIC_PL190_VECT_ADDR 0x30 /* PL190 only */
33#define VIC_PL190_DEF_VECT_ADDR 0x34 /* PL190 only */
34
35#define VIC_VECT_ADDR0 0x100 /* 0 to 15 (0..31 PL192) */
36#define VIC_VECT_CNTL0 0x200 /* 0 to 15 (0..31 PL192) */
37#define VIC_ITCR 0x300 /* VIC test control register */
38
39#define VIC_VECT_CNTL_ENABLE (1 << 5)
40
41#define VIC_PL192_VECT_ADDR 0xF00
42
43#ifndef __ASSEMBLY__
44#include <linux/compiler.h>
45#include <linux/types.h>
46
47struct device_node;
48struct pt_regs;
49
50void __vic_init(void __iomem *base, int irq_start, u32 vic_sources,
51 u32 resume_sources, struct device_node *node);
52void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources, u32 resume_sources);
53int vic_of_init(struct device_node *node, struct device_node *parent);
54void vic_handle_irq(struct pt_regs *regs);
55
56#endif /* __ASSEMBLY__ */
57#endif
diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h
index 15cb035309f7..18c883023339 100644
--- a/arch/arm/include/asm/mach/irq.h
+++ b/arch/arm/include/asm/mach/irq.h
@@ -22,6 +22,7 @@ extern int show_fiq_list(struct seq_file *, int);
22 22
23#ifdef CONFIG_MULTI_IRQ_HANDLER 23#ifdef CONFIG_MULTI_IRQ_HANDLER
24extern void (*handle_arch_irq)(struct pt_regs *); 24extern void (*handle_arch_irq)(struct pt_regs *);
25extern void set_handle_irq(void (*handle_irq)(struct pt_regs *));
25#endif 26#endif
26 27
27/* 28/*
diff --git a/arch/arm/mach-vt8500/include/mach/debug-macro.S b/arch/arm/include/debug/vt8500.S
index ca292f29d4a3..0e0ca0869da7 100644
--- a/arch/arm/mach-vt8500/include/mach/debug-macro.S
+++ b/arch/arm/include/debug/vt8500.S
@@ -1,20 +1,24 @@
1/* 1/*
2 * arch/arm/mach-vt8500/include/mach/debug-macro.S 2 * Debugging macro include header
3 * 3 *
4 * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com> 4 * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
5 * 5 * Moved from arch/arm/mach-vt8500/include/mach/debug-macro.S
6 * Debugging macro include header 6 * Minor changes for readability.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 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 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 * 11 */
12*/ 12
13#define DEBUG_LL_PHYS_BASE 0xD8000000
14#define DEBUG_LL_VIRT_BASE 0xF8000000
15#define DEBUG_LL_UART_OFFSET 0x00200000
13 16
17#if defined(CONFIG_DEBUG_VT8500_UART0)
14 .macro addruart, rp, rv, tmp 18 .macro addruart, rp, rv, tmp
15 mov \rp, #0x00200000 19 mov \rp, #DEBUG_LL_UART_OFFSET
16 orr \rv, \rp, #0xf8000000 20 orr \rv, \rp, #DEBUG_LL_VIRT_BASE
17 orr \rp, \rp, #0xd8000000 21 orr \rp, \rp, #DEBUG_LL_PHYS_BASE
18 .endm 22 .endm
19 23
20 .macro senduart,rd,rx 24 .macro senduart,rd,rx
@@ -29,3 +33,5 @@
29 33
30 .macro waituart,rd,rx 34 .macro waituart,rd,rx
31 .endm 35 .endm
36
37#endif
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 9b722612553d..379cf3292390 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -78,7 +78,7 @@ void pcibios_report_status(u_int status_mask, int warn)
78 * Bug 3 is responsible for the sound DMA grinding to a halt. We now 78 * Bug 3 is responsible for the sound DMA grinding to a halt. We now
79 * live with bug 2. 79 * live with bug 2.
80 */ 80 */
81static void __devinit pci_fixup_83c553(struct pci_dev *dev) 81static void pci_fixup_83c553(struct pci_dev *dev)
82{ 82{
83 /* 83 /*
84 * Set memory region to start at address 0, and enable IO 84 * Set memory region to start at address 0, and enable IO
@@ -130,7 +130,7 @@ static void __devinit pci_fixup_83c553(struct pci_dev *dev)
130} 130}
131DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_83C553, pci_fixup_83c553); 131DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_83C553, pci_fixup_83c553);
132 132
133static void __devinit pci_fixup_unassign(struct pci_dev *dev) 133static void pci_fixup_unassign(struct pci_dev *dev)
134{ 134{
135 dev->resource[0].end -= dev->resource[0].start; 135 dev->resource[0].end -= dev->resource[0].start;
136 dev->resource[0].start = 0; 136 dev->resource[0].start = 0;
@@ -142,7 +142,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C940F,
142 * if it is the host bridge by marking it as such. These resources are of 142 * if it is the host bridge by marking it as such. These resources are of
143 * no consequence to the PCI layer (they are handled elsewhere). 143 * no consequence to the PCI layer (they are handled elsewhere).
144 */ 144 */
145static void __devinit pci_fixup_dec21285(struct pci_dev *dev) 145static void pci_fixup_dec21285(struct pci_dev *dev)
146{ 146{
147 int i; 147 int i;
148 148
@@ -161,7 +161,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285, pci_fixup_d
161/* 161/*
162 * PCI IDE controllers use non-standard I/O port decoding, respect it. 162 * PCI IDE controllers use non-standard I/O port decoding, respect it.
163 */ 163 */
164static void __devinit pci_fixup_ide_bases(struct pci_dev *dev) 164static void pci_fixup_ide_bases(struct pci_dev *dev)
165{ 165{
166 struct resource *r; 166 struct resource *r;
167 int i; 167 int i;
@@ -182,7 +182,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pci_fixup_ide_bases);
182/* 182/*
183 * Put the DEC21142 to sleep 183 * Put the DEC21142 to sleep
184 */ 184 */
185static void __devinit pci_fixup_dec21142(struct pci_dev *dev) 185static void pci_fixup_dec21142(struct pci_dev *dev)
186{ 186{
187 pci_write_config_dword(dev, 0x40, 0x80000000); 187 pci_write_config_dword(dev, 0x40, 0x80000000);
188} 188}
@@ -204,7 +204,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, pci_fixup_d
204 * functional. However, The CY82C693U _does not work_ in bus 204 * functional. However, The CY82C693U _does not work_ in bus
205 * master mode without locking the PCI bus solid. 205 * master mode without locking the PCI bus solid.
206 */ 206 */
207static void __devinit pci_fixup_cy82c693(struct pci_dev *dev) 207static void pci_fixup_cy82c693(struct pci_dev *dev)
208{ 208{
209 if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) { 209 if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) {
210 u32 base0, base1; 210 u32 base0, base1;
@@ -254,7 +254,7 @@ static void __devinit pci_fixup_cy82c693(struct pci_dev *dev)
254} 254}
255DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, pci_fixup_cy82c693); 255DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, pci_fixup_cy82c693);
256 256
257static void __devinit pci_fixup_it8152(struct pci_dev *dev) 257static void pci_fixup_it8152(struct pci_dev *dev)
258{ 258{
259 int i; 259 int i;
260 /* fixup for ITE 8152 devices */ 260 /* fixup for ITE 8152 devices */
@@ -361,9 +361,7 @@ void pcibios_fixup_bus(struct pci_bus *bus)
361 printk(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n", 361 printk(KERN_INFO "PCI: bus%d: Fast back to back transfers %sabled\n",
362 bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis"); 362 bus->number, (features & PCI_COMMAND_FAST_BACK) ? "en" : "dis");
363} 363}
364#ifdef CONFIG_HOTPLUG
365EXPORT_SYMBOL(pcibios_fixup_bus); 364EXPORT_SYMBOL(pcibios_fixup_bus);
366#endif
367 365
368/* 366/*
369 * Swizzle the device pin each time we cross a bridge. If a platform does 367 * Swizzle the device pin each time we cross a bridge. If a platform does
@@ -380,7 +378,7 @@ EXPORT_SYMBOL(pcibios_fixup_bus);
380 * PCI standard swizzle is implemented on plug-in cards and Cardbus based 378 * PCI standard swizzle is implemented on plug-in cards and Cardbus based
381 * PCI extenders, so it can not be ignored. 379 * PCI extenders, so it can not be ignored.
382 */ 380 */
383static u8 __devinit pcibios_swizzle(struct pci_dev *dev, u8 *pin) 381static u8 pcibios_swizzle(struct pci_dev *dev, u8 *pin)
384{ 382{
385 struct pci_sys_data *sys = dev->sysdata; 383 struct pci_sys_data *sys = dev->sysdata;
386 int slot, oldpin = *pin; 384 int slot, oldpin = *pin;
diff --git a/arch/arm/kernel/etm.c b/arch/arm/kernel/etm.c
index 36d20bd50120..9b6de8c988f3 100644
--- a/arch/arm/kernel/etm.c
+++ b/arch/arm/kernel/etm.c
@@ -339,7 +339,7 @@ static struct miscdevice etb_miscdev = {
339 .fops = &etb_fops, 339 .fops = &etb_fops,
340}; 340};
341 341
342static int __devinit etb_probe(struct amba_device *dev, const struct amba_id *id) 342static int etb_probe(struct amba_device *dev, const struct amba_id *id)
343{ 343{
344 struct tracectx *t = &tracer; 344 struct tracectx *t = &tracer;
345 int ret = 0; 345 int ret = 0;
@@ -531,7 +531,7 @@ static ssize_t trace_mode_store(struct kobject *kobj,
531static struct kobj_attribute trace_mode_attr = 531static struct kobj_attribute trace_mode_attr =
532 __ATTR(trace_mode, 0644, trace_mode_show, trace_mode_store); 532 __ATTR(trace_mode, 0644, trace_mode_show, trace_mode_store);
533 533
534static int __devinit etm_probe(struct amba_device *dev, const struct amba_id *id) 534static int etm_probe(struct amba_device *dev, const struct amba_id *id)
535{ 535{
536 struct tracectx *t = &tracer; 536 struct tracectx *t = &tracer;
537 int ret = 0; 537 int ret = 0;
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 896165096d6a..8e4ef4c83a74 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -117,6 +117,16 @@ void __init init_IRQ(void)
117 machine_desc->init_irq(); 117 machine_desc->init_irq();
118} 118}
119 119
120#ifdef CONFIG_MULTI_IRQ_HANDLER
121void __init set_handle_irq(void (*handle_irq)(struct pt_regs *))
122{
123 if (handle_arch_irq)
124 return;
125
126 handle_arch_irq = handle_irq;
127}
128#endif
129
120#ifdef CONFIG_SPARSE_IRQ 130#ifdef CONFIG_SPARSE_IRQ
121int __init arch_probe_nr_irqs(void) 131int __init arch_probe_nr_irqs(void)
122{ 132{
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c
index 9a4f6307a016..5f6620684e25 100644
--- a/arch/arm/kernel/perf_event_cpu.c
+++ b/arch/arm/kernel/perf_event_cpu.c
@@ -132,7 +132,7 @@ static int cpu_pmu_request_irq(struct arm_pmu *cpu_pmu, irq_handler_t handler)
132 return 0; 132 return 0;
133} 133}
134 134
135static void __devinit cpu_pmu_init(struct arm_pmu *cpu_pmu) 135static void cpu_pmu_init(struct arm_pmu *cpu_pmu)
136{ 136{
137 int cpu; 137 int cpu;
138 for_each_possible_cpu(cpu) { 138 for_each_possible_cpu(cpu) {
@@ -178,7 +178,7 @@ static struct notifier_block __cpuinitdata cpu_pmu_hotplug_notifier = {
178/* 178/*
179 * PMU platform driver and devicetree bindings. 179 * PMU platform driver and devicetree bindings.
180 */ 180 */
181static struct of_device_id __devinitdata cpu_pmu_of_device_ids[] = { 181static struct of_device_id cpu_pmu_of_device_ids[] = {
182 {.compatible = "arm,cortex-a15-pmu", .data = armv7_a15_pmu_init}, 182 {.compatible = "arm,cortex-a15-pmu", .data = armv7_a15_pmu_init},
183 {.compatible = "arm,cortex-a9-pmu", .data = armv7_a9_pmu_init}, 183 {.compatible = "arm,cortex-a9-pmu", .data = armv7_a9_pmu_init},
184 {.compatible = "arm,cortex-a8-pmu", .data = armv7_a8_pmu_init}, 184 {.compatible = "arm,cortex-a8-pmu", .data = armv7_a8_pmu_init},
@@ -190,7 +190,7 @@ static struct of_device_id __devinitdata cpu_pmu_of_device_ids[] = {
190 {}, 190 {},
191}; 191};
192 192
193static struct platform_device_id __devinitdata cpu_pmu_plat_device_ids[] = { 193static struct platform_device_id cpu_pmu_plat_device_ids[] = {
194 {.name = "arm-pmu"}, 194 {.name = "arm-pmu"},
195 {}, 195 {},
196}; 196};
@@ -198,7 +198,7 @@ static struct platform_device_id __devinitdata cpu_pmu_plat_device_ids[] = {
198/* 198/*
199 * CPU PMU identification and probing. 199 * CPU PMU identification and probing.
200 */ 200 */
201static int __devinit probe_current_pmu(struct arm_pmu *pmu) 201static int probe_current_pmu(struct arm_pmu *pmu)
202{ 202{
203 int cpu = get_cpu(); 203 int cpu = get_cpu();
204 unsigned long cpuid = read_cpuid_id(); 204 unsigned long cpuid = read_cpuid_id();
@@ -252,7 +252,7 @@ static int __devinit probe_current_pmu(struct arm_pmu *pmu)
252 return ret; 252 return ret;
253} 253}
254 254
255static int __devinit cpu_pmu_device_probe(struct platform_device *pdev) 255static int cpu_pmu_device_probe(struct platform_device *pdev)
256{ 256{
257 const struct of_device_id *of_id; 257 const struct of_device_id *of_id;
258 int (*init_fn)(struct arm_pmu *); 258 int (*init_fn)(struct arm_pmu *);
diff --git a/arch/arm/kernel/perf_event_v6.c b/arch/arm/kernel/perf_event_v6.c
index f3e22ff8b6a2..041d0526a288 100644
--- a/arch/arm/kernel/perf_event_v6.c
+++ b/arch/arm/kernel/perf_event_v6.c
@@ -653,7 +653,7 @@ static int armv6_map_event(struct perf_event *event)
653 &armv6_perf_cache_map, 0xFF); 653 &armv6_perf_cache_map, 0xFF);
654} 654}
655 655
656static int __devinit armv6pmu_init(struct arm_pmu *cpu_pmu) 656static int armv6pmu_init(struct arm_pmu *cpu_pmu)
657{ 657{
658 cpu_pmu->name = "v6"; 658 cpu_pmu->name = "v6";
659 cpu_pmu->handle_irq = armv6pmu_handle_irq; 659 cpu_pmu->handle_irq = armv6pmu_handle_irq;
@@ -685,7 +685,7 @@ static int armv6mpcore_map_event(struct perf_event *event)
685 &armv6mpcore_perf_cache_map, 0xFF); 685 &armv6mpcore_perf_cache_map, 0xFF);
686} 686}
687 687
688static int __devinit armv6mpcore_pmu_init(struct arm_pmu *cpu_pmu) 688static int armv6mpcore_pmu_init(struct arm_pmu *cpu_pmu)
689{ 689{
690 cpu_pmu->name = "v6mpcore"; 690 cpu_pmu->name = "v6mpcore";
691 cpu_pmu->handle_irq = armv6pmu_handle_irq; 691 cpu_pmu->handle_irq = armv6pmu_handle_irq;
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c
index 7d0cce85d17e..4fbc757d9cff 100644
--- a/arch/arm/kernel/perf_event_v7.c
+++ b/arch/arm/kernel/perf_event_v7.c
@@ -1226,7 +1226,7 @@ static void armv7pmu_init(struct arm_pmu *cpu_pmu)
1226 cpu_pmu->max_period = (1LLU << 32) - 1; 1226 cpu_pmu->max_period = (1LLU << 32) - 1;
1227}; 1227};
1228 1228
1229static u32 __devinit armv7_read_num_pmnc_events(void) 1229static u32 armv7_read_num_pmnc_events(void)
1230{ 1230{
1231 u32 nb_cnt; 1231 u32 nb_cnt;
1232 1232
@@ -1237,7 +1237,7 @@ static u32 __devinit armv7_read_num_pmnc_events(void)
1237 return nb_cnt + 1; 1237 return nb_cnt + 1;
1238} 1238}
1239 1239
1240static int __devinit armv7_a8_pmu_init(struct arm_pmu *cpu_pmu) 1240static int armv7_a8_pmu_init(struct arm_pmu *cpu_pmu)
1241{ 1241{
1242 armv7pmu_init(cpu_pmu); 1242 armv7pmu_init(cpu_pmu);
1243 cpu_pmu->name = "ARMv7 Cortex-A8"; 1243 cpu_pmu->name = "ARMv7 Cortex-A8";
@@ -1246,7 +1246,7 @@ static int __devinit armv7_a8_pmu_init(struct arm_pmu *cpu_pmu)
1246 return 0; 1246 return 0;
1247} 1247}
1248 1248
1249static int __devinit armv7_a9_pmu_init(struct arm_pmu *cpu_pmu) 1249static int armv7_a9_pmu_init(struct arm_pmu *cpu_pmu)
1250{ 1250{
1251 armv7pmu_init(cpu_pmu); 1251 armv7pmu_init(cpu_pmu);
1252 cpu_pmu->name = "ARMv7 Cortex-A9"; 1252 cpu_pmu->name = "ARMv7 Cortex-A9";
@@ -1255,7 +1255,7 @@ static int __devinit armv7_a9_pmu_init(struct arm_pmu *cpu_pmu)
1255 return 0; 1255 return 0;
1256} 1256}
1257 1257
1258static int __devinit armv7_a5_pmu_init(struct arm_pmu *cpu_pmu) 1258static int armv7_a5_pmu_init(struct arm_pmu *cpu_pmu)
1259{ 1259{
1260 armv7pmu_init(cpu_pmu); 1260 armv7pmu_init(cpu_pmu);
1261 cpu_pmu->name = "ARMv7 Cortex-A5"; 1261 cpu_pmu->name = "ARMv7 Cortex-A5";
@@ -1264,7 +1264,7 @@ static int __devinit armv7_a5_pmu_init(struct arm_pmu *cpu_pmu)
1264 return 0; 1264 return 0;
1265} 1265}
1266 1266
1267static int __devinit armv7_a15_pmu_init(struct arm_pmu *cpu_pmu) 1267static int armv7_a15_pmu_init(struct arm_pmu *cpu_pmu)
1268{ 1268{
1269 armv7pmu_init(cpu_pmu); 1269 armv7pmu_init(cpu_pmu);
1270 cpu_pmu->name = "ARMv7 Cortex-A15"; 1270 cpu_pmu->name = "ARMv7 Cortex-A15";
@@ -1274,7 +1274,7 @@ static int __devinit armv7_a15_pmu_init(struct arm_pmu *cpu_pmu)
1274 return 0; 1274 return 0;
1275} 1275}
1276 1276
1277static int __devinit armv7_a7_pmu_init(struct arm_pmu *cpu_pmu) 1277static int armv7_a7_pmu_init(struct arm_pmu *cpu_pmu)
1278{ 1278{
1279 armv7pmu_init(cpu_pmu); 1279 armv7pmu_init(cpu_pmu);
1280 cpu_pmu->name = "ARMv7 Cortex-A7"; 1280 cpu_pmu->name = "ARMv7 Cortex-A7";
diff --git a/arch/arm/kernel/perf_event_xscale.c b/arch/arm/kernel/perf_event_xscale.c
index 0c8265e53d5f..2b0fe30ec12e 100644
--- a/arch/arm/kernel/perf_event_xscale.c
+++ b/arch/arm/kernel/perf_event_xscale.c
@@ -440,7 +440,7 @@ static int xscale_map_event(struct perf_event *event)
440 &xscale_perf_cache_map, 0xFF); 440 &xscale_perf_cache_map, 0xFF);
441} 441}
442 442
443static int __devinit xscale1pmu_init(struct arm_pmu *cpu_pmu) 443static int xscale1pmu_init(struct arm_pmu *cpu_pmu)
444{ 444{
445 cpu_pmu->name = "xscale1"; 445 cpu_pmu->name = "xscale1";
446 cpu_pmu->handle_irq = xscale1pmu_handle_irq; 446 cpu_pmu->handle_irq = xscale1pmu_handle_irq;
@@ -810,7 +810,7 @@ static inline void xscale2pmu_write_counter(struct perf_event *event, u32 val)
810 } 810 }
811} 811}
812 812
813static int __devinit xscale2pmu_init(struct arm_pmu *cpu_pmu) 813static int xscale2pmu_init(struct arm_pmu *cpu_pmu)
814{ 814{
815 cpu_pmu->name = "xscale2"; 815 cpu_pmu->name = "xscale2";
816 cpu_pmu->handle_irq = xscale2pmu_handle_irq; 816 cpu_pmu->handle_irq = xscale2pmu_handle_irq;
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 84f4cbf652e5..3fc96db2a4b6 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -416,7 +416,8 @@ static void (*smp_cross_call)(const struct cpumask *, unsigned int);
416 416
417void __init set_smp_cross_call(void (*fn)(const struct cpumask *, unsigned int)) 417void __init set_smp_cross_call(void (*fn)(const struct cpumask *, unsigned int))
418{ 418{
419 smp_cross_call = fn; 419 if (!smp_cross_call)
420 smp_cross_call = fn;
420} 421}
421 422
422void arch_send_call_function_ipi_mask(const struct cpumask *mask) 423void arch_send_call_function_ipi_mask(const struct cpumask *mask)
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
index 49f335d301ba..dc9bb0146665 100644
--- a/arch/arm/kernel/smp_twd.c
+++ b/arch/arm/kernel/smp_twd.c
@@ -24,7 +24,6 @@
24 24
25#include <asm/smp_twd.h> 25#include <asm/smp_twd.h>
26#include <asm/localtimer.h> 26#include <asm/localtimer.h>
27#include <asm/hardware/gic.h>
28 27
29/* set up by the platform code */ 28/* set up by the platform code */
30static void __iomem *twd_base; 29static void __iomem *twd_base;
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c
index 180b3024bec3..2acdff4c1dfe 100644
--- a/arch/arm/mach-at91/at91rm9200_time.c
+++ b/arch/arm/mach-at91/at91rm9200_time.c
@@ -174,7 +174,6 @@ clkevt32k_next_event(unsigned long delta, struct clock_event_device *dev)
174static struct clock_event_device clkevt = { 174static struct clock_event_device clkevt = {
175 .name = "at91_tick", 175 .name = "at91_tick",
176 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 176 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
177 .shift = 32,
178 .rating = 150, 177 .rating = 150,
179 .set_next_event = clkevt32k_next_event, 178 .set_next_event = clkevt32k_next_event,
180 .set_mode = clkevt32k_mode, 179 .set_mode = clkevt32k_mode,
@@ -265,11 +264,9 @@ void __init at91rm9200_timer_init(void)
265 at91_st_write(AT91_ST_RTMR, 1); 264 at91_st_write(AT91_ST_RTMR, 1);
266 265
267 /* Setup timer clockevent, with minimum of two ticks (important!!) */ 266 /* Setup timer clockevent, with minimum of two ticks (important!!) */
268 clkevt.mult = div_sc(AT91_SLOW_CLOCK, NSEC_PER_SEC, clkevt.shift);
269 clkevt.max_delta_ns = clockevent_delta2ns(AT91_ST_ALMV, &clkevt);
270 clkevt.min_delta_ns = clockevent_delta2ns(2, &clkevt) + 1;
271 clkevt.cpumask = cpumask_of(0); 267 clkevt.cpumask = cpumask_of(0);
272 clockevents_register_device(&clkevt); 268 clockevents_config_and_register(&clkevt, AT91_SLOW_CLOCK,
269 2, AT91_ST_ALMV);
273 270
274 /* register clocksource */ 271 /* register clocksource */
275 clocksource_register_hz(&clk32k, AT91_SLOW_CLOCK); 272 clocksource_register_hz(&clk32k, AT91_SLOW_CLOCK);
diff --git a/arch/arm/mach-bcm/board_bcm.c b/arch/arm/mach-bcm/board_bcm.c
index 3df68030cf68..f0f9abafad29 100644
--- a/arch/arm/mach-bcm/board_bcm.c
+++ b/arch/arm/mach-bcm/board_bcm.c
@@ -11,30 +11,19 @@
11 * GNU General Public License for more details. 11 * GNU General Public License for more details.
12 */ 12 */
13 13
14#include <linux/of_irq.h>
15#include <linux/of_platform.h> 14#include <linux/of_platform.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/device.h> 16#include <linux/device.h>
18#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/irqchip.h>
19 19
20#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
21#include <asm/hardware/gic.h>
22
23#include <asm/mach/time.h> 21#include <asm/mach/time.h>
24 22
25static const struct of_device_id irq_match[] = {
26 {.compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
27 {}
28};
29
30static void timer_init(void) 23static void timer_init(void)
31{ 24{
32} 25}
33 26
34static void __init init_irq(void)
35{
36 of_irq_init(irq_match);
37}
38 27
39static void __init board_init(void) 28static void __init board_init(void)
40{ 29{
@@ -45,9 +34,8 @@ static void __init board_init(void)
45static const char * const bcm11351_dt_compat[] = { "bcm,bcm11351", NULL, }; 34static const char * const bcm11351_dt_compat[] = { "bcm,bcm11351", NULL, };
46 35
47DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor") 36DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor")
48 .init_irq = init_irq, 37 .init_irq = irqchip_init,
49 .init_time = timer_init, 38 .init_time = timer_init,
50 .init_machine = board_init, 39 .init_machine = board_init,
51 .dt_compat = bcm11351_dt_compat, 40 .dt_compat = bcm11351_dt_compat,
52 .handle_irq = gic_handle_irq,
53MACHINE_END 41MACHINE_END
diff --git a/arch/arm/mach-cns3xxx/cns3420vb.c b/arch/arm/mach-cns3xxx/cns3420vb.c
index 3c86f910b647..a71867e1d8d6 100644
--- a/arch/arm/mach-cns3xxx/cns3420vb.c
+++ b/arch/arm/mach-cns3xxx/cns3420vb.c
@@ -28,7 +28,6 @@
28#include <linux/usb/ohci_pdriver.h> 28#include <linux/usb/ohci_pdriver.h>
29#include <asm/setup.h> 29#include <asm/setup.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31#include <asm/hardware/gic.h>
32#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
33#include <asm/mach/map.h> 32#include <asm/mach/map.h>
34#include <asm/mach/time.h> 33#include <asm/mach/time.h>
@@ -251,7 +250,6 @@ MACHINE_START(CNS3420VB, "Cavium Networks CNS3420 Validation Board")
251 .map_io = cns3420_map_io, 250 .map_io = cns3420_map_io,
252 .init_irq = cns3xxx_init_irq, 251 .init_irq = cns3xxx_init_irq,
253 .init_time = cns3xxx_timer_init, 252 .init_time = cns3xxx_timer_init,
254 .handle_irq = gic_handle_irq,
255 .init_machine = cns3420_init, 253 .init_machine = cns3420_init,
256 .restart = cns3xxx_restart, 254 .restart = cns3xxx_restart,
257MACHINE_END 255MACHINE_END
diff --git a/arch/arm/mach-cns3xxx/core.c b/arch/arm/mach-cns3xxx/core.c
index 1754f8f4f34c..e698f26cc0cb 100644
--- a/arch/arm/mach-cns3xxx/core.c
+++ b/arch/arm/mach-cns3xxx/core.c
@@ -12,10 +12,10 @@
12#include <linux/interrupt.h> 12#include <linux/interrupt.h>
13#include <linux/clockchips.h> 13#include <linux/clockchips.h>
14#include <linux/io.h> 14#include <linux/io.h>
15#include <linux/irqchip/arm-gic.h>
15#include <asm/mach/map.h> 16#include <asm/mach/map.h>
16#include <asm/mach/time.h> 17#include <asm/mach/time.h>
17#include <asm/mach/irq.h> 18#include <asm/mach/irq.h>
18#include <asm/hardware/gic.h>
19#include <asm/hardware/cache-l2x0.h> 19#include <asm/hardware/cache-l2x0.h>
20#include <mach/cns3xxx.h> 20#include <mach/cns3xxx.h>
21#include "core.h" 21#include "core.h"
@@ -134,7 +134,6 @@ static int cns3xxx_timer_set_next_event(unsigned long evt,
134 134
135static struct clock_event_device cns3xxx_tmr1_clockevent = { 135static struct clock_event_device cns3xxx_tmr1_clockevent = {
136 .name = "cns3xxx timer1", 136 .name = "cns3xxx timer1",
137 .shift = 8,
138 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 137 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
139 .set_mode = cns3xxx_timer_set_mode, 138 .set_mode = cns3xxx_timer_set_mode,
140 .set_next_event = cns3xxx_timer_set_next_event, 139 .set_next_event = cns3xxx_timer_set_next_event,
@@ -145,15 +144,9 @@ static struct clock_event_device cns3xxx_tmr1_clockevent = {
145static void __init cns3xxx_clockevents_init(unsigned int timer_irq) 144static void __init cns3xxx_clockevents_init(unsigned int timer_irq)
146{ 145{
147 cns3xxx_tmr1_clockevent.irq = timer_irq; 146 cns3xxx_tmr1_clockevent.irq = timer_irq;
148 cns3xxx_tmr1_clockevent.mult = 147 clockevents_config_and_register(&cns3xxx_tmr1_clockevent,
149 div_sc((cns3xxx_cpu_clock() >> 3) * 1000000, NSEC_PER_SEC, 148 (cns3xxx_cpu_clock() >> 3) * 1000000,
150 cns3xxx_tmr1_clockevent.shift); 149 0xf, 0xffffffff);
151 cns3xxx_tmr1_clockevent.max_delta_ns =
152 clockevent_delta2ns(0xffffffff, &cns3xxx_tmr1_clockevent);
153 cns3xxx_tmr1_clockevent.min_delta_ns =
154 clockevent_delta2ns(0xf, &cns3xxx_tmr1_clockevent);
155
156 clockevents_register_device(&cns3xxx_tmr1_clockevent);
157} 150}
158 151
159/* 152/*
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
index a9f2054c3e9b..de7adff324dc 100644
--- a/arch/arm/mach-davinci/board-dm646x-evm.c
+++ b/arch/arm/mach-davinci/board-dm646x-evm.c
@@ -358,7 +358,7 @@ static int cpld_video_probe(struct i2c_client *client,
358 return 0; 358 return 0;
359} 359}
360 360
361static int __devexit cpld_video_remove(struct i2c_client *client) 361static int cpld_video_remove(struct i2c_client *client)
362{ 362{
363 cpld_client = NULL; 363 cpld_client = NULL;
364 return 0; 364 return 0;
diff --git a/arch/arm/mach-davinci/cdce949.c b/arch/arm/mach-davinci/cdce949.c
index f2232ca6d070..abafb92031c0 100644
--- a/arch/arm/mach-davinci/cdce949.c
+++ b/arch/arm/mach-davinci/cdce949.c
@@ -256,7 +256,7 @@ static int cdce_probe(struct i2c_client *client,
256 return 0; 256 return 0;
257} 257}
258 258
259static int __devexit cdce_remove(struct i2c_client *client) 259static int cdce_remove(struct i2c_client *client)
260{ 260{
261 cdce_i2c_client = NULL; 261 cdce_i2c_client = NULL;
262 return 0; 262 return 0;
@@ -274,7 +274,7 @@ static struct i2c_driver cdce_driver = {
274 .name = "cdce949", 274 .name = "cdce949",
275 }, 275 },
276 .probe = cdce_probe, 276 .probe = cdce_probe,
277 .remove = __devexit_p(cdce_remove), 277 .remove = cdce_remove,
278 .id_table = cdce_id, 278 .id_table = cdce_id,
279}; 279};
280 280
diff --git a/arch/arm/mach-dove/pcie.c b/arch/arm/mach-dove/pcie.c
index 0ef4435b1657..8a275f297522 100644
--- a/arch/arm/mach-dove/pcie.c
+++ b/arch/arm/mach-dove/pcie.c
@@ -135,7 +135,7 @@ static struct pci_ops pcie_ops = {
135 .write = pcie_wr_conf, 135 .write = pcie_wr_conf,
136}; 136};
137 137
138static void __devinit rc_pci_fixup(struct pci_dev *dev) 138static void rc_pci_fixup(struct pci_dev *dev)
139{ 139{
140 /* 140 /*
141 * Prevent enumeration of root complex. 141 * Prevent enumeration of root complex.
diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c
index 82d9c788535a..bda6c3a5c923 100644
--- a/arch/arm/mach-ep93xx/adssphere.c
+++ b/arch/arm/mach-ep93xx/adssphere.c
@@ -17,7 +17,6 @@
17 17
18#include <mach/hardware.h> 18#include <mach/hardware.h>
19 19
20#include <asm/hardware/vic.h>
21#include <asm/mach-types.h> 20#include <asm/mach-types.h>
22#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
23 22
@@ -39,7 +38,6 @@ MACHINE_START(ADSSPHERE, "ADS Sphere board")
39 .atag_offset = 0x100, 38 .atag_offset = 0x100,
40 .map_io = ep93xx_map_io, 39 .map_io = ep93xx_map_io,
41 .init_irq = ep93xx_init_irq, 40 .init_irq = ep93xx_init_irq,
42 .handle_irq = vic_handle_irq,
43 .init_time = ep93xx_timer_init, 41 .init_time = ep93xx_timer_init,
44 .init_machine = adssphere_init_machine, 42 .init_machine = adssphere_init_machine,
45 .init_late = ep93xx_init_late, 43 .init_late = ep93xx_init_late,
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index ee27b4b0ab07..c49ed3dc1aea 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -34,6 +34,7 @@
34#include <linux/i2c-gpio.h> 34#include <linux/i2c-gpio.h>
35#include <linux/spi/spi.h> 35#include <linux/spi/spi.h>
36#include <linux/export.h> 36#include <linux/export.h>
37#include <linux/irqchip/arm-vic.h>
37 38
38#include <mach/hardware.h> 39#include <mach/hardware.h>
39#include <linux/platform_data/video-ep93xx.h> 40#include <linux/platform_data/video-ep93xx.h>
@@ -44,8 +45,6 @@
44#include <asm/mach/map.h> 45#include <asm/mach/map.h>
45#include <asm/mach/time.h> 46#include <asm/mach/time.h>
46 47
47#include <asm/hardware/vic.h>
48
49#include "soc.h" 48#include "soc.h"
50 49
51/************************************************************************* 50/*************************************************************************
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c
index ac260519c9e9..27b14ae92c7e 100644
--- a/arch/arm/mach-ep93xx/edb93xx.c
+++ b/arch/arm/mach-ep93xx/edb93xx.c
@@ -39,7 +39,6 @@
39#include <linux/platform_data/spi-ep93xx.h> 39#include <linux/platform_data/spi-ep93xx.h>
40#include <mach/gpio-ep93xx.h> 40#include <mach/gpio-ep93xx.h>
41 41
42#include <asm/hardware/vic.h>
43#include <asm/mach-types.h> 42#include <asm/mach-types.h>
44#include <asm/mach/arch.h> 43#include <asm/mach/arch.h>
45 44
@@ -276,7 +275,6 @@ MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board")
276 .atag_offset = 0x100, 275 .atag_offset = 0x100,
277 .map_io = ep93xx_map_io, 276 .map_io = ep93xx_map_io,
278 .init_irq = ep93xx_init_irq, 277 .init_irq = ep93xx_init_irq,
279 .handle_irq = vic_handle_irq,
280 .init_time = ep93xx_timer_init, 278 .init_time = ep93xx_timer_init,
281 .init_machine = edb93xx_init_machine, 279 .init_machine = edb93xx_init_machine,
282 .init_late = ep93xx_init_late, 280 .init_late = ep93xx_init_late,
@@ -290,7 +288,6 @@ MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
290 .atag_offset = 0x100, 288 .atag_offset = 0x100,
291 .map_io = ep93xx_map_io, 289 .map_io = ep93xx_map_io,
292 .init_irq = ep93xx_init_irq, 290 .init_irq = ep93xx_init_irq,
293 .handle_irq = vic_handle_irq,
294 .init_time = ep93xx_timer_init, 291 .init_time = ep93xx_timer_init,
295 .init_machine = edb93xx_init_machine, 292 .init_machine = edb93xx_init_machine,
296 .init_late = ep93xx_init_late, 293 .init_late = ep93xx_init_late,
@@ -304,7 +301,6 @@ MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
304 .atag_offset = 0x100, 301 .atag_offset = 0x100,
305 .map_io = ep93xx_map_io, 302 .map_io = ep93xx_map_io,
306 .init_irq = ep93xx_init_irq, 303 .init_irq = ep93xx_init_irq,
307 .handle_irq = vic_handle_irq,
308 .init_time = ep93xx_timer_init, 304 .init_time = ep93xx_timer_init,
309 .init_machine = edb93xx_init_machine, 305 .init_machine = edb93xx_init_machine,
310 .init_late = ep93xx_init_late, 306 .init_late = ep93xx_init_late,
@@ -318,7 +314,6 @@ MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
318 .atag_offset = 0x100, 314 .atag_offset = 0x100,
319 .map_io = ep93xx_map_io, 315 .map_io = ep93xx_map_io,
320 .init_irq = ep93xx_init_irq, 316 .init_irq = ep93xx_init_irq,
321 .handle_irq = vic_handle_irq,
322 .init_time = ep93xx_timer_init, 317 .init_time = ep93xx_timer_init,
323 .init_machine = edb93xx_init_machine, 318 .init_machine = edb93xx_init_machine,
324 .init_late = ep93xx_init_late, 319 .init_late = ep93xx_init_late,
@@ -332,7 +327,6 @@ MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board")
332 .atag_offset = 0x100, 327 .atag_offset = 0x100,
333 .map_io = ep93xx_map_io, 328 .map_io = ep93xx_map_io,
334 .init_irq = ep93xx_init_irq, 329 .init_irq = ep93xx_init_irq,
335 .handle_irq = vic_handle_irq,
336 .init_time = ep93xx_timer_init, 330 .init_time = ep93xx_timer_init,
337 .init_machine = edb93xx_init_machine, 331 .init_machine = edb93xx_init_machine,
338 .init_late = ep93xx_init_late, 332 .init_late = ep93xx_init_late,
@@ -346,7 +340,6 @@ MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
346 .atag_offset = 0x100, 340 .atag_offset = 0x100,
347 .map_io = ep93xx_map_io, 341 .map_io = ep93xx_map_io,
348 .init_irq = ep93xx_init_irq, 342 .init_irq = ep93xx_init_irq,
349 .handle_irq = vic_handle_irq,
350 .init_time = ep93xx_timer_init, 343 .init_time = ep93xx_timer_init,
351 .init_machine = edb93xx_init_machine, 344 .init_machine = edb93xx_init_machine,
352 .init_late = ep93xx_init_late, 345 .init_late = ep93xx_init_late,
@@ -360,7 +353,6 @@ MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
360 .atag_offset = 0x100, 353 .atag_offset = 0x100,
361 .map_io = ep93xx_map_io, 354 .map_io = ep93xx_map_io,
362 .init_irq = ep93xx_init_irq, 355 .init_irq = ep93xx_init_irq,
363 .handle_irq = vic_handle_irq,
364 .init_time = ep93xx_timer_init, 356 .init_time = ep93xx_timer_init,
365 .init_machine = edb93xx_init_machine, 357 .init_machine = edb93xx_init_machine,
366 .init_late = ep93xx_init_late, 358 .init_late = ep93xx_init_late,
@@ -374,7 +366,6 @@ MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
374 .atag_offset = 0x100, 366 .atag_offset = 0x100,
375 .map_io = ep93xx_map_io, 367 .map_io = ep93xx_map_io,
376 .init_irq = ep93xx_init_irq, 368 .init_irq = ep93xx_init_irq,
377 .handle_irq = vic_handle_irq,
378 .init_time = ep93xx_timer_init, 369 .init_time = ep93xx_timer_init,
379 .init_machine = edb93xx_init_machine, 370 .init_machine = edb93xx_init_machine,
380 .init_late = ep93xx_init_late, 371 .init_late = ep93xx_init_late,
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c
index 76c50f42bd71..0cca5b183309 100644
--- a/arch/arm/mach-ep93xx/gesbc9312.c
+++ b/arch/arm/mach-ep93xx/gesbc9312.c
@@ -17,7 +17,6 @@
17 17
18#include <mach/hardware.h> 18#include <mach/hardware.h>
19 19
20#include <asm/hardware/vic.h>
21#include <asm/mach-types.h> 20#include <asm/mach-types.h>
22#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
23 22
@@ -39,7 +38,6 @@ MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
39 .atag_offset = 0x100, 38 .atag_offset = 0x100,
40 .map_io = ep93xx_map_io, 39 .map_io = ep93xx_map_io,
41 .init_irq = ep93xx_init_irq, 40 .init_irq = ep93xx_init_irq,
42 .handle_irq = vic_handle_irq,
43 .init_time = ep93xx_timer_init, 41 .init_time = ep93xx_timer_init,
44 .init_machine = gesbc9312_init_machine, 42 .init_machine = gesbc9312_init_machine,
45 .init_late = ep93xx_init_late, 43 .init_late = ep93xx_init_late,
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c
index 777cd2170f8a..373583c29825 100644
--- a/arch/arm/mach-ep93xx/micro9.c
+++ b/arch/arm/mach-ep93xx/micro9.c
@@ -18,7 +18,6 @@
18 18
19#include <mach/hardware.h> 19#include <mach/hardware.h>
20 20
21#include <asm/hardware/vic.h>
22#include <asm/mach-types.h> 21#include <asm/mach-types.h>
23#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
24 23
@@ -82,7 +81,6 @@ MACHINE_START(MICRO9, "Contec Micro9-High")
82 .atag_offset = 0x100, 81 .atag_offset = 0x100,
83 .map_io = ep93xx_map_io, 82 .map_io = ep93xx_map_io,
84 .init_irq = ep93xx_init_irq, 83 .init_irq = ep93xx_init_irq,
85 .handle_irq = vic_handle_irq,
86 .init_time = ep93xx_timer_init, 84 .init_time = ep93xx_timer_init,
87 .init_machine = micro9_init_machine, 85 .init_machine = micro9_init_machine,
88 .init_late = ep93xx_init_late, 86 .init_late = ep93xx_init_late,
@@ -96,7 +94,6 @@ MACHINE_START(MICRO9M, "Contec Micro9-Mid")
96 .atag_offset = 0x100, 94 .atag_offset = 0x100,
97 .map_io = ep93xx_map_io, 95 .map_io = ep93xx_map_io,
98 .init_irq = ep93xx_init_irq, 96 .init_irq = ep93xx_init_irq,
99 .handle_irq = vic_handle_irq,
100 .init_time = ep93xx_timer_init, 97 .init_time = ep93xx_timer_init,
101 .init_machine = micro9_init_machine, 98 .init_machine = micro9_init_machine,
102 .init_late = ep93xx_init_late, 99 .init_late = ep93xx_init_late,
@@ -110,7 +107,6 @@ MACHINE_START(MICRO9L, "Contec Micro9-Lite")
110 .atag_offset = 0x100, 107 .atag_offset = 0x100,
111 .map_io = ep93xx_map_io, 108 .map_io = ep93xx_map_io,
112 .init_irq = ep93xx_init_irq, 109 .init_irq = ep93xx_init_irq,
113 .handle_irq = vic_handle_irq,
114 .init_time = ep93xx_timer_init, 110 .init_time = ep93xx_timer_init,
115 .init_machine = micro9_init_machine, 111 .init_machine = micro9_init_machine,
116 .init_late = ep93xx_init_late, 112 .init_late = ep93xx_init_late,
@@ -124,7 +120,6 @@ MACHINE_START(MICRO9S, "Contec Micro9-Slim")
124 .atag_offset = 0x100, 120 .atag_offset = 0x100,
125 .map_io = ep93xx_map_io, 121 .map_io = ep93xx_map_io,
126 .init_irq = ep93xx_init_irq, 122 .init_irq = ep93xx_init_irq,
127 .handle_irq = vic_handle_irq,
128 .init_time = ep93xx_timer_init, 123 .init_time = ep93xx_timer_init,
129 .init_machine = micro9_init_machine, 124 .init_machine = micro9_init_machine,
130 .init_late = ep93xx_init_late, 125 .init_late = ep93xx_init_late,
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c
index 6ff39ee2ad5d..36f22c1a31fe 100644
--- a/arch/arm/mach-ep93xx/simone.c
+++ b/arch/arm/mach-ep93xx/simone.c
@@ -25,7 +25,6 @@
25#include <linux/platform_data/video-ep93xx.h> 25#include <linux/platform_data/video-ep93xx.h>
26#include <mach/gpio-ep93xx.h> 26#include <mach/gpio-ep93xx.h>
27 27
28#include <asm/hardware/vic.h>
29#include <asm/mach-types.h> 28#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
31 30
@@ -83,7 +82,6 @@ MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board")
83 .atag_offset = 0x100, 82 .atag_offset = 0x100,
84 .map_io = ep93xx_map_io, 83 .map_io = ep93xx_map_io,
85 .init_irq = ep93xx_init_irq, 84 .init_irq = ep93xx_init_irq,
86 .handle_irq = vic_handle_irq,
87 .init_time = ep93xx_timer_init, 85 .init_time = ep93xx_timer_init,
88 .init_machine = simone_init_machine, 86 .init_machine = simone_init_machine,
89 .init_late = ep93xx_init_late, 87 .init_late = ep93xx_init_late,
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c
index 6434c07dbf96..aa86f86638dd 100644
--- a/arch/arm/mach-ep93xx/snappercl15.c
+++ b/arch/arm/mach-ep93xx/snappercl15.c
@@ -31,7 +31,6 @@
31#include <linux/platform_data/video-ep93xx.h> 31#include <linux/platform_data/video-ep93xx.h>
32#include <mach/gpio-ep93xx.h> 32#include <mach/gpio-ep93xx.h>
33 33
34#include <asm/hardware/vic.h>
35#include <asm/mach-types.h> 34#include <asm/mach-types.h>
36#include <asm/mach/arch.h> 35#include <asm/mach/arch.h>
37 36
@@ -176,7 +175,6 @@ MACHINE_START(SNAPPER_CL15, "Bluewater Systems Snapper CL15")
176 .atag_offset = 0x100, 175 .atag_offset = 0x100,
177 .map_io = ep93xx_map_io, 176 .map_io = ep93xx_map_io,
178 .init_irq = ep93xx_init_irq, 177 .init_irq = ep93xx_init_irq,
179 .handle_irq = vic_handle_irq,
180 .init_time = ep93xx_timer_init, 178 .init_time = ep93xx_timer_init,
181 .init_machine = snappercl15_init_machine, 179 .init_machine = snappercl15_init_machine,
182 .init_late = ep93xx_init_late, 180 .init_late = ep93xx_init_late,
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index e4fa0d3760a5..61f4b5dc4d7d 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -22,7 +22,6 @@
22 22
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24 24
25#include <asm/hardware/vic.h>
26#include <asm/mach-types.h> 25#include <asm/mach-types.h>
27#include <asm/mach/map.h> 26#include <asm/mach/map.h>
28#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
@@ -246,7 +245,6 @@ MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
246 .atag_offset = 0x100, 245 .atag_offset = 0x100,
247 .map_io = ts72xx_map_io, 246 .map_io = ts72xx_map_io,
248 .init_irq = ep93xx_init_irq, 247 .init_irq = ep93xx_init_irq,
249 .handle_irq = vic_handle_irq,
250 .init_time = ep93xx_timer_init, 248 .init_time = ep93xx_timer_init,
251 .init_machine = ts72xx_init_machine, 249 .init_machine = ts72xx_init_machine,
252 .init_late = ep93xx_init_late, 250 .init_late = ep93xx_init_late,
diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c
index 8610ba293991..605956fd07a2 100644
--- a/arch/arm/mach-ep93xx/vision_ep9307.c
+++ b/arch/arm/mach-ep93xx/vision_ep9307.c
@@ -34,7 +34,6 @@
34#include <linux/platform_data/spi-ep93xx.h> 34#include <linux/platform_data/spi-ep93xx.h>
35#include <mach/gpio-ep93xx.h> 35#include <mach/gpio-ep93xx.h>
36 36
37#include <asm/hardware/vic.h>
38#include <asm/mach-types.h> 37#include <asm/mach-types.h>
39#include <asm/mach/map.h> 38#include <asm/mach/map.h>
40#include <asm/mach/arch.h> 39#include <asm/mach/arch.h>
@@ -364,7 +363,6 @@ MACHINE_START(VISION_EP9307, "Vision Engraving Systems EP9307")
364 .atag_offset = 0x100, 363 .atag_offset = 0x100,
365 .map_io = vision_map_io, 364 .map_io = vision_map_io,
366 .init_irq = ep93xx_init_irq, 365 .init_irq = ep93xx_init_irq,
367 .handle_irq = vic_handle_irq,
368 .init_time = ep93xx_timer_init, 366 .init_time = ep93xx_timer_init,
369 .init_machine = vision_init_machine, 367 .init_machine = vision_init_machine,
370 .init_late = ep93xx_init_late, 368 .init_late = ep93xx_init_late,
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 91d5b6f1d5af..e103c290bc9e 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -74,6 +74,8 @@ config SOC_EXYNOS5440
74 depends on ARCH_EXYNOS5 74 depends on ARCH_EXYNOS5
75 select ARM_ARCH_TIMER 75 select ARM_ARCH_TIMER
76 select AUTO_ZRELADDR 76 select AUTO_ZRELADDR
77 select PINCTRL
78 select PINCTRL_EXYNOS5440
77 help 79 help
78 Enable EXYNOS5440 SoC support 80 Enable EXYNOS5440 SoC support
79 81
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index d6d0dc651089..4ea80bc4ef9b 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -22,12 +22,13 @@
22#include <linux/of_irq.h> 22#include <linux/of_irq.h>
23#include <linux/export.h> 23#include <linux/export.h>
24#include <linux/irqdomain.h> 24#include <linux/irqdomain.h>
25#include <linux/irqchip.h>
25#include <linux/of_address.h> 26#include <linux/of_address.h>
27#include <linux/irqchip/arm-gic.h>
26 28
27#include <asm/proc-fns.h> 29#include <asm/proc-fns.h>
28#include <asm/exception.h> 30#include <asm/exception.h>
29#include <asm/hardware/cache-l2x0.h> 31#include <asm/hardware/cache-l2x0.h>
30#include <asm/hardware/gic.h>
31#include <asm/mach/map.h> 32#include <asm/mach/map.h>
32#include <asm/mach/irq.h> 33#include <asm/mach/irq.h>
33#include <asm/cacheflush.h> 34#include <asm/cacheflush.h>
@@ -424,11 +425,18 @@ static void __init exynos5_init_clocks(int xtal)
424{ 425{
425 printk(KERN_DEBUG "%s: initializing clocks\n", __func__); 426 printk(KERN_DEBUG "%s: initializing clocks\n", __func__);
426 427
428 /* EXYNOS5440 can support only common clock framework */
429
430 if (soc_is_exynos5440())
431 return;
432
433#ifdef CONFIG_SOC_EXYNOS5250
427 s3c24xx_register_baseclocks(xtal); 434 s3c24xx_register_baseclocks(xtal);
428 s5p_register_clocks(xtal); 435 s5p_register_clocks(xtal);
429 436
430 exynos5_register_clocks(); 437 exynos5_register_clocks();
431 exynos5_setup_clocks(); 438 exynos5_setup_clocks();
439#endif
432} 440}
433 441
434#define COMBINER_ENABLE_SET 0x0 442#define COMBINER_ENABLE_SET 0x0
@@ -637,8 +645,6 @@ static int __init combiner_of_init(struct device_node *np,
637} 645}
638 646
639static const struct of_device_id exynos_dt_irq_match[] = { 647static const struct of_device_id exynos_dt_irq_match[] = {
640 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
641 { .compatible = "arm,cortex-a15-gic", .data = gic_of_init, },
642 { .compatible = "samsung,exynos4210-combiner", 648 { .compatible = "samsung,exynos4210-combiner",
643 .data = combiner_of_init, }, 649 .data = combiner_of_init, },
644 {}, 650 {},
@@ -654,8 +660,10 @@ void __init exynos4_init_irq(void)
654 if (!of_have_populated_dt()) 660 if (!of_have_populated_dt())
655 gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset, NULL); 661 gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset, NULL);
656#ifdef CONFIG_OF 662#ifdef CONFIG_OF
657 else 663 else {
664 irqchip_init();
658 of_irq_init(exynos_dt_irq_match); 665 of_irq_init(exynos_dt_irq_match);
666 }
659#endif 667#endif
660 668
661 if (!of_have_populated_dt()) 669 if (!of_have_populated_dt())
@@ -672,6 +680,7 @@ void __init exynos4_init_irq(void)
672void __init exynos5_init_irq(void) 680void __init exynos5_init_irq(void)
673{ 681{
674#ifdef CONFIG_OF 682#ifdef CONFIG_OF
683 irqchip_init();
675 of_irq_init(exynos_dt_irq_match); 684 of_irq_init(exynos_dt_irq_match);
676#endif 685#endif
677 /* 686 /*
diff --git a/arch/arm/mach-exynos/include/mach/regs-irq.h b/arch/arm/mach-exynos/include/mach/regs-irq.h
index 9c7b4bfd546f..f2b50506b9f6 100644
--- a/arch/arm/mach-exynos/include/mach/regs-irq.h
+++ b/arch/arm/mach-exynos/include/mach/regs-irq.h
@@ -13,7 +13,7 @@
13#ifndef __ASM_ARCH_REGS_IRQ_H 13#ifndef __ASM_ARCH_REGS_IRQ_H
14#define __ASM_ARCH_REGS_IRQ_H __FILE__ 14#define __ASM_ARCH_REGS_IRQ_H __FILE__
15 15
16#include <asm/hardware/gic.h> 16#include <linux/irqchip/arm-gic.h>
17#include <mach/map.h> 17#include <mach/map.h>
18 18
19#endif /* __ASM_ARCH_REGS_IRQ_H */ 19#endif /* __ASM_ARCH_REGS_IRQ_H */
diff --git a/arch/arm/mach-exynos/mach-armlex4210.c b/arch/arm/mach-exynos/mach-armlex4210.c
index 2f18130d0d10..685f29173afa 100644
--- a/arch/arm/mach-exynos/mach-armlex4210.c
+++ b/arch/arm/mach-exynos/mach-armlex4210.c
@@ -16,7 +16,6 @@
16#include <linux/smsc911x.h> 16#include <linux/smsc911x.h>
17 17
18#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
19#include <asm/hardware/gic.h>
20#include <asm/mach-types.h> 19#include <asm/mach-types.h>
21 20
22#include <plat/cpu.h> 21#include <plat/cpu.h>
@@ -201,7 +200,6 @@ MACHINE_START(ARMLEX4210, "ARMLEX4210")
201 .smp = smp_ops(exynos_smp_ops), 200 .smp = smp_ops(exynos_smp_ops),
202 .init_irq = exynos4_init_irq, 201 .init_irq = exynos4_init_irq,
203 .map_io = armlex4210_map_io, 202 .map_io = armlex4210_map_io,
204 .handle_irq = gic_handle_irq,
205 .init_machine = armlex4210_machine_init, 203 .init_machine = armlex4210_machine_init,
206 .init_late = exynos_init_late, 204 .init_late = exynos_init_late,
207 .init_time = exynos4_timer_init, 205 .init_time = exynos4_timer_init,
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c
index 160030168b19..112d10e53d20 100644
--- a/arch/arm/mach-exynos/mach-exynos4-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos4-dt.c
@@ -15,7 +15,6 @@
15#include <linux/serial_core.h> 15#include <linux/serial_core.h>
16 16
17#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
18#include <asm/hardware/gic.h>
19#include <mach/map.h> 18#include <mach/map.h>
20 19
21#include <plat/cpu.h> 20#include <plat/cpu.h>
@@ -107,7 +106,6 @@ DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)")
107 .smp = smp_ops(exynos_smp_ops), 106 .smp = smp_ops(exynos_smp_ops),
108 .init_irq = exynos4_init_irq, 107 .init_irq = exynos4_init_irq,
109 .map_io = exynos4_dt_map_io, 108 .map_io = exynos4_dt_map_io,
110 .handle_irq = gic_handle_irq,
111 .init_machine = exynos4_dt_machine_init, 109 .init_machine = exynos4_dt_machine_init,
112 .init_late = exynos_init_late, 110 .init_late = exynos_init_late,
113 .init_time = exynos4_timer_init, 111 .init_time = exynos4_timer_init,
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c
index 4e074c67cc8b..0deeecffa3ae 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -16,7 +16,6 @@
16#include <linux/io.h> 16#include <linux/io.h>
17 17
18#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
19#include <asm/hardware/gic.h>
20#include <mach/map.h> 19#include <mach/map.h>
21#include <mach/regs-pmu.h> 20#include <mach/regs-pmu.h>
22 21
@@ -179,7 +178,6 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)")
179 .init_irq = exynos5_init_irq, 178 .init_irq = exynos5_init_irq,
180 .smp = smp_ops(exynos_smp_ops), 179 .smp = smp_ops(exynos_smp_ops),
181 .map_io = exynos5_dt_map_io, 180 .map_io = exynos5_dt_map_io,
182 .handle_irq = gic_handle_irq,
183 .init_machine = exynos5_dt_machine_init, 181 .init_machine = exynos5_dt_machine_init,
184 .init_late = exynos_init_late, 182 .init_late = exynos_init_late,
185 .init_time = exynos4_timer_init, 183 .init_time = exynos4_timer_init,
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index dccd1d16b836..b8b3fbf0bae7 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -39,7 +39,6 @@
39#include <media/v4l2-mediabus.h> 39#include <media/v4l2-mediabus.h>
40 40
41#include <asm/mach/arch.h> 41#include <asm/mach/arch.h>
42#include <asm/hardware/gic.h>
43#include <asm/mach-types.h> 42#include <asm/mach-types.h>
44 43
45#include <plat/adc.h> 44#include <plat/adc.h>
@@ -1379,7 +1378,6 @@ MACHINE_START(NURI, "NURI")
1379 .smp = smp_ops(exynos_smp_ops), 1378 .smp = smp_ops(exynos_smp_ops),
1380 .init_irq = exynos4_init_irq, 1379 .init_irq = exynos4_init_irq,
1381 .map_io = nuri_map_io, 1380 .map_io = nuri_map_io,
1382 .handle_irq = gic_handle_irq,
1383 .init_machine = nuri_machine_init, 1381 .init_machine = nuri_machine_init,
1384 .init_late = exynos_init_late, 1382 .init_late = exynos_init_late,
1385 .init_time = exynos4_timer_init, 1383 .init_time = exynos4_timer_init,
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index 4e1156324562..579d2d171daa 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -29,7 +29,6 @@
29#include <linux/platform_data/usb-exynos.h> 29#include <linux/platform_data/usb-exynos.h>
30 30
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32#include <asm/hardware/gic.h>
33#include <asm/mach-types.h> 32#include <asm/mach-types.h>
34 33
35#include <video/platform_lcd.h> 34#include <video/platform_lcd.h>
@@ -814,7 +813,6 @@ MACHINE_START(ORIGEN, "ORIGEN")
814 .smp = smp_ops(exynos_smp_ops), 813 .smp = smp_ops(exynos_smp_ops),
815 .init_irq = exynos4_init_irq, 814 .init_irq = exynos4_init_irq,
816 .map_io = origen_map_io, 815 .map_io = origen_map_io,
817 .handle_irq = gic_handle_irq,
818 .init_machine = origen_machine_init, 816 .init_machine = origen_machine_init,
819 .init_late = exynos_init_late, 817 .init_late = exynos_init_late,
820 .init_time = exynos4_timer_init, 818 .init_time = exynos4_timer_init,
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c
index e9c9c2995f09..fe6149624b84 100644
--- a/arch/arm/mach-exynos/mach-smdk4x12.c
+++ b/arch/arm/mach-exynos/mach-smdk4x12.c
@@ -25,7 +25,6 @@
25#include <linux/platform_data/s3c-hsotg.h> 25#include <linux/platform_data/s3c-hsotg.h>
26 26
27#include <asm/mach/arch.h> 27#include <asm/mach/arch.h>
28#include <asm/hardware/gic.h>
29#include <asm/mach-types.h> 28#include <asm/mach-types.h>
30 29
31#include <video/samsung_fimd.h> 30#include <video/samsung_fimd.h>
@@ -376,7 +375,6 @@ MACHINE_START(SMDK4212, "SMDK4212")
376 .smp = smp_ops(exynos_smp_ops), 375 .smp = smp_ops(exynos_smp_ops),
377 .init_irq = exynos4_init_irq, 376 .init_irq = exynos4_init_irq,
378 .map_io = smdk4x12_map_io, 377 .map_io = smdk4x12_map_io,
379 .handle_irq = gic_handle_irq,
380 .init_machine = smdk4x12_machine_init, 378 .init_machine = smdk4x12_machine_init,
381 .init_time = exynos4_timer_init, 379 .init_time = exynos4_timer_init,
382 .restart = exynos4_restart, 380 .restart = exynos4_restart,
@@ -390,7 +388,6 @@ MACHINE_START(SMDK4412, "SMDK4412")
390 .smp = smp_ops(exynos_smp_ops), 388 .smp = smp_ops(exynos_smp_ops),
391 .init_irq = exynos4_init_irq, 389 .init_irq = exynos4_init_irq,
392 .map_io = smdk4x12_map_io, 390 .map_io = smdk4x12_map_io,
393 .handle_irq = gic_handle_irq,
394 .init_machine = smdk4x12_machine_init, 391 .init_machine = smdk4x12_machine_init,
395 .init_late = exynos_init_late, 392 .init_late = exynos_init_late,
396 .init_time = exynos4_timer_init, 393 .init_time = exynos4_timer_init,
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
index b228ab9bda0b..d71672922b19 100644
--- a/arch/arm/mach-exynos/mach-smdkv310.c
+++ b/arch/arm/mach-exynos/mach-smdkv310.c
@@ -26,7 +26,6 @@
26#include <linux/platform_data/usb-exynos.h> 26#include <linux/platform_data/usb-exynos.h>
27 27
28#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
29#include <asm/hardware/gic.h>
30#include <asm/mach-types.h> 29#include <asm/mach-types.h>
31 30
32#include <video/platform_lcd.h> 31#include <video/platform_lcd.h>
@@ -423,7 +422,6 @@ MACHINE_START(SMDKV310, "SMDKV310")
423 .smp = smp_ops(exynos_smp_ops), 422 .smp = smp_ops(exynos_smp_ops),
424 .init_irq = exynos4_init_irq, 423 .init_irq = exynos4_init_irq,
425 .map_io = smdkv310_map_io, 424 .map_io = smdkv310_map_io,
426 .handle_irq = gic_handle_irq,
427 .init_machine = smdkv310_machine_init, 425 .init_machine = smdkv310_machine_init,
428 .init_time = exynos4_timer_init, 426 .init_time = exynos4_timer_init,
429 .reserve = &smdkv310_reserve, 427 .reserve = &smdkv310_reserve,
@@ -436,7 +434,6 @@ MACHINE_START(SMDKC210, "SMDKC210")
436 .smp = smp_ops(exynos_smp_ops), 434 .smp = smp_ops(exynos_smp_ops),
437 .init_irq = exynos4_init_irq, 435 .init_irq = exynos4_init_irq,
438 .map_io = smdkv310_map_io, 436 .map_io = smdkv310_map_io,
439 .handle_irq = gic_handle_irq,
440 .init_machine = smdkv310_machine_init, 437 .init_machine = smdkv310_machine_init,
441 .init_late = exynos_init_late, 438 .init_late = exynos_init_late,
442 .init_time = exynos4_timer_init, 439 .init_time = exynos4_timer_init,
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index 866f29a9beee..c9d33a43103e 100644
--- a/arch/arm/mach-exynos/mach-universal_c210.c
+++ b/arch/arm/mach-exynos/mach-universal_c210.c
@@ -29,7 +29,6 @@
29#include <drm/exynos_drm.h> 29#include <drm/exynos_drm.h>
30 30
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32#include <asm/hardware/gic.h>
33#include <asm/mach-types.h> 32#include <asm/mach-types.h>
34 33
35#include <video/samsung_fimd.h> 34#include <video/samsung_fimd.h>
@@ -1151,7 +1150,6 @@ MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
1151 .smp = smp_ops(exynos_smp_ops), 1150 .smp = smp_ops(exynos_smp_ops),
1152 .init_irq = exynos4_init_irq, 1151 .init_irq = exynos4_init_irq,
1153 .map_io = universal_map_io, 1152 .map_io = universal_map_io,
1154 .handle_irq = gic_handle_irq,
1155 .init_machine = universal_machine_init, 1153 .init_machine = universal_machine_init,
1156 .init_late = exynos_init_late, 1154 .init_late = exynos_init_late,
1157 .init_time = s5p_timer_init, 1155 .init_time = s5p_timer_init,
diff --git a/arch/arm/mach-exynos/mct.c b/arch/arm/mach-exynos/mct.c
index 4a89b54fcadb..c9d6650f9b5d 100644
--- a/arch/arm/mach-exynos/mct.c
+++ b/arch/arm/mach-exynos/mct.c
@@ -22,7 +22,6 @@
22#include <linux/of.h> 22#include <linux/of.h>
23 23
24#include <asm/arch_timer.h> 24#include <asm/arch_timer.h>
25#include <asm/hardware/gic.h>
26#include <asm/localtimer.h> 25#include <asm/localtimer.h>
27 26
28#include <plat/cpu.h> 27#include <plat/cpu.h>
@@ -255,13 +254,9 @@ static struct irqaction mct_comp_event_irq = {
255 254
256static void exynos4_clockevent_init(void) 255static void exynos4_clockevent_init(void)
257{ 256{
258 clockevents_calc_mult_shift(&mct_comp_device, clk_rate, 5);
259 mct_comp_device.max_delta_ns =
260 clockevent_delta2ns(0xffffffff, &mct_comp_device);
261 mct_comp_device.min_delta_ns =
262 clockevent_delta2ns(0xf, &mct_comp_device);
263 mct_comp_device.cpumask = cpumask_of(0); 257 mct_comp_device.cpumask = cpumask_of(0);
264 clockevents_register_device(&mct_comp_device); 258 clockevents_config_and_register(&mct_comp_device, clk_rate,
259 0xf, 0xffffffff);
265 260
266 if (soc_is_exynos5250()) 261 if (soc_is_exynos5250())
267 setup_irq(EXYNOS5_IRQ_MCT_G0, &mct_comp_event_irq); 262 setup_irq(EXYNOS5_IRQ_MCT_G0, &mct_comp_event_irq);
@@ -404,14 +399,8 @@ static int __cpuinit exynos4_local_timer_setup(struct clock_event_device *evt)
404 evt->set_mode = exynos4_tick_set_mode; 399 evt->set_mode = exynos4_tick_set_mode;
405 evt->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; 400 evt->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT;
406 evt->rating = 450; 401 evt->rating = 450;
407 402 clockevents_config_and_register(evt, clk_rate / (TICK_BASE_CNT + 1),
408 clockevents_calc_mult_shift(evt, clk_rate / (TICK_BASE_CNT + 1), 5); 403 0xf, 0x7fffffff);
409 evt->max_delta_ns =
410 clockevent_delta2ns(0x7fffffff, evt);
411 evt->min_delta_ns =
412 clockevent_delta2ns(0xf, evt);
413
414 clockevents_register_device(evt);
415 404
416 exynos4_mct_write(TICK_BASE_CNT, mevt->base + MCT_L_TCNTB_OFFSET); 405 exynos4_mct_write(TICK_BASE_CNT, mevt->base + MCT_L_TCNTB_OFFSET);
417 406
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index c5c840e947b8..60f7c5be057d 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -20,9 +20,9 @@
20#include <linux/jiffies.h> 20#include <linux/jiffies.h>
21#include <linux/smp.h> 21#include <linux/smp.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/irqchip/arm-gic.h>
23 24
24#include <asm/cacheflush.h> 25#include <asm/cacheflush.h>
25#include <asm/hardware/gic.h>
26#include <asm/smp_plat.h> 26#include <asm/smp_plat.h>
27#include <asm/smp_scu.h> 27#include <asm/smp_scu.h>
28 28
@@ -149,7 +149,7 @@ static int __cpuinit exynos_boot_secondary(unsigned int cpu, struct task_struct
149 149
150 __raw_writel(virt_to_phys(exynos4_secondary_startup), 150 __raw_writel(virt_to_phys(exynos4_secondary_startup),
151 cpu_boot_reg(phys_cpu)); 151 cpu_boot_reg(phys_cpu));
152 gic_raise_softirq(cpumask_of(cpu), 0); 152 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
153 153
154 if (pen_release == -1) 154 if (pen_release == -1)
155 break; 155 break;
@@ -190,8 +190,6 @@ static void __init exynos_smp_init_cpus(void)
190 190
191 for (i = 0; i < ncores; i++) 191 for (i = 0; i < ncores; i++)
192 set_cpu_possible(i, true); 192 set_cpu_possible(i, true);
193
194 set_smp_cross_call(gic_raise_softirq);
195} 193}
196 194
197static void __init exynos_smp_prepare_cpus(unsigned int max_cpus) 195static void __init exynos_smp_prepare_cpus(unsigned int max_cpus)
diff --git a/arch/arm/mach-footbridge/dc21285-timer.c b/arch/arm/mach-footbridge/dc21285-timer.c
index 9f14b1d9a0e7..9ee78f7b4990 100644
--- a/arch/arm/mach-footbridge/dc21285-timer.c
+++ b/arch/arm/mach-footbridge/dc21285-timer.c
@@ -101,10 +101,6 @@ void __init footbridge_timer_init(void)
101 101
102 setup_irq(ce->irq, &footbridge_timer_irq); 102 setup_irq(ce->irq, &footbridge_timer_irq);
103 103
104 clockevents_calc_mult_shift(ce, mem_fclk_21285, 5);
105 ce->max_delta_ns = clockevent_delta2ns(0xffffff, ce);
106 ce->min_delta_ns = clockevent_delta2ns(0x000004, ce);
107 ce->cpumask = cpumask_of(smp_processor_id()); 104 ce->cpumask = cpumask_of(smp_processor_id());
108 105 clockevents_config_and_register(ce, mem_fclk_21285, 0x4, 0xffffff);
109 clockevents_register_device(ce);
110} 106}
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index f6ca285ee5c5..fd630bccbd31 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -18,6 +18,7 @@
18#include <linux/dma-mapping.h> 18#include <linux/dma-mapping.h>
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/irq.h> 20#include <linux/irq.h>
21#include <linux/irqchip.h>
21#include <linux/irqdomain.h> 22#include <linux/irqdomain.h>
22#include <linux/of.h> 23#include <linux/of.h>
23#include <linux/of_irq.h> 24#include <linux/of_irq.h>
@@ -32,7 +33,6 @@
32#include <asm/smp_twd.h> 33#include <asm/smp_twd.h>
33#include <asm/hardware/arm_timer.h> 34#include <asm/hardware/arm_timer.h>
34#include <asm/hardware/timer-sp.h> 35#include <asm/hardware/timer-sp.h>
35#include <asm/hardware/gic.h>
36#include <asm/hardware/cache-l2x0.h> 36#include <asm/hardware/cache-l2x0.h>
37#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
38#include <asm/mach/map.h> 38#include <asm/mach/map.h>
@@ -66,12 +66,6 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr)
66 HB_JUMP_TABLE_PHYS(cpu) + 15); 66 HB_JUMP_TABLE_PHYS(cpu) + 15);
67} 67}
68 68
69const static struct of_device_id irq_match[] = {
70 { .compatible = "arm,cortex-a15-gic", .data = gic_of_init, },
71 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
72 {}
73};
74
75#ifdef CONFIG_CACHE_L2X0 69#ifdef CONFIG_CACHE_L2X0
76static void highbank_l2x0_disable(void) 70static void highbank_l2x0_disable(void)
77{ 71{
@@ -82,7 +76,7 @@ static void highbank_l2x0_disable(void)
82 76
83static void __init highbank_init_irq(void) 77static void __init highbank_init_irq(void)
84{ 78{
85 of_irq_init(irq_match); 79 irqchip_init();
86 80
87 if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9")) 81 if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9"))
88 highbank_scu_map_io(); 82 highbank_scu_map_io();
@@ -131,7 +125,7 @@ static void __init highbank_timer_init(void)
131 125
132static void highbank_power_off(void) 126static void highbank_power_off(void)
133{ 127{
134 hignbank_set_pwr_shutdown(); 128 highbank_set_pwr_shutdown();
135 129
136 while (1) 130 while (1)
137 cpu_do_idle(); 131 cpu_do_idle();
@@ -206,7 +200,6 @@ DT_MACHINE_START(HIGHBANK, "Highbank")
206 .map_io = debug_ll_io_init, 200 .map_io = debug_ll_io_init,
207 .init_irq = highbank_init_irq, 201 .init_irq = highbank_init_irq,
208 .init_time = highbank_timer_init, 202 .init_time = highbank_timer_init,
209 .handle_irq = gic_handle_irq,
210 .init_machine = highbank_init, 203 .init_machine = highbank_init,
211 .dt_compat = highbank_match, 204 .dt_compat = highbank_match,
212 .restart = highbank_restart, 205 .restart = highbank_restart,
diff --git a/arch/arm/mach-highbank/hotplug.c b/arch/arm/mach-highbank/hotplug.c
index 7b60faccd551..f30c52843396 100644
--- a/arch/arm/mach-highbank/hotplug.c
+++ b/arch/arm/mach-highbank/hotplug.c
@@ -30,7 +30,7 @@ void __ref highbank_cpu_die(unsigned int cpu)
30{ 30{
31 flush_cache_all(); 31 flush_cache_all();
32 32
33 highbank_set_cpu_jump(cpu, secondary_startup); 33 highbank_set_cpu_jump(cpu, phys_to_virt(0));
34 highbank_set_core_pwr(); 34 highbank_set_core_pwr();
35 35
36 cpu_do_idle(); 36 cpu_do_idle();
diff --git a/arch/arm/mach-highbank/platsmp.c b/arch/arm/mach-highbank/platsmp.c
index 1129957f6c1d..8797a7001720 100644
--- a/arch/arm/mach-highbank/platsmp.c
+++ b/arch/arm/mach-highbank/platsmp.c
@@ -17,9 +17,9 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/smp.h> 18#include <linux/smp.h>
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/irqchip/arm-gic.h>
20 21
21#include <asm/smp_scu.h> 22#include <asm/smp_scu.h>
22#include <asm/hardware/gic.h>
23 23
24#include "core.h" 24#include "core.h"
25 25
@@ -32,7 +32,8 @@ static void __cpuinit highbank_secondary_init(unsigned int cpu)
32 32
33static int __cpuinit highbank_boot_secondary(unsigned int cpu, struct task_struct *idle) 33static int __cpuinit highbank_boot_secondary(unsigned int cpu, struct task_struct *idle)
34{ 34{
35 gic_raise_softirq(cpumask_of(cpu), 0); 35 highbank_set_cpu_jump(cpu, secondary_startup);
36 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
36 return 0; 37 return 0;
37} 38}
38 39
@@ -55,25 +56,12 @@ static void __init highbank_smp_init_cpus(void)
55 56
56 for (i = 0; i < ncores; i++) 57 for (i = 0; i < ncores; i++)
57 set_cpu_possible(i, true); 58 set_cpu_possible(i, true);
58
59 set_smp_cross_call(gic_raise_softirq);
60} 59}
61 60
62static void __init highbank_smp_prepare_cpus(unsigned int max_cpus) 61static void __init highbank_smp_prepare_cpus(unsigned int max_cpus)
63{ 62{
64 int i;
65
66 if (scu_base_addr) 63 if (scu_base_addr)
67 scu_enable(scu_base_addr); 64 scu_enable(scu_base_addr);
68
69 /*
70 * Write the address of secondary startup into the jump table
71 * The cores are in wfi and wait until they receive a soft interrupt
72 * and a non-zero value to jump to. Then the secondary CPU branches
73 * to this address.
74 */
75 for (i = 1; i < max_cpus; i++)
76 highbank_set_cpu_jump(i, secondary_startup);
77} 65}
78 66
79struct smp_operations highbank_smp_ops __initdata = { 67struct smp_operations highbank_smp_ops __initdata = {
diff --git a/arch/arm/mach-highbank/pm.c b/arch/arm/mach-highbank/pm.c
index 74aa135966f0..04eddb4f4380 100644
--- a/arch/arm/mach-highbank/pm.c
+++ b/arch/arm/mach-highbank/pm.c
@@ -14,10 +14,12 @@
14 * this program. If not, see <http://www.gnu.org/licenses/>. 14 * this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16 16
17#include <linux/cpu_pm.h>
17#include <linux/init.h> 18#include <linux/init.h>
18#include <linux/io.h> 19#include <linux/io.h>
19#include <linux/suspend.h> 20#include <linux/suspend.h>
20 21
22#include <asm/cacheflush.h>
21#include <asm/proc-fns.h> 23#include <asm/proc-fns.h>
22#include <asm/suspend.h> 24#include <asm/suspend.h>
23 25
@@ -26,16 +28,31 @@
26 28
27static int highbank_suspend_finish(unsigned long val) 29static int highbank_suspend_finish(unsigned long val)
28{ 30{
31 outer_flush_all();
32 outer_disable();
33
34 highbank_set_pwr_suspend();
35
29 cpu_do_idle(); 36 cpu_do_idle();
37
38 highbank_clear_pwr_request();
30 return 0; 39 return 0;
31} 40}
32 41
33static int highbank_pm_enter(suspend_state_t state) 42static int highbank_pm_enter(suspend_state_t state)
34{ 43{
35 hignbank_set_pwr_suspend(); 44 cpu_pm_enter();
45 cpu_cluster_pm_enter();
46
36 highbank_set_cpu_jump(0, cpu_resume); 47 highbank_set_cpu_jump(0, cpu_resume);
37 cpu_suspend(0, highbank_suspend_finish); 48 cpu_suspend(0, highbank_suspend_finish);
38 49
50 cpu_cluster_pm_exit();
51 cpu_pm_exit();
52
53 highbank_smc1(0x102, 0x1);
54 if (scu_base_addr)
55 scu_enable(scu_base_addr);
39 return 0; 56 return 0;
40} 57}
41 58
diff --git a/arch/arm/mach-highbank/sysregs.h b/arch/arm/mach-highbank/sysregs.h
index e13e8ea7c6cb..70af9d13fcef 100644
--- a/arch/arm/mach-highbank/sysregs.h
+++ b/arch/arm/mach-highbank/sysregs.h
@@ -44,28 +44,43 @@ static inline void highbank_set_core_pwr(void)
44 writel_relaxed(1, sregs_base + SREG_CPU_PWR_CTRL(cpu)); 44 writel_relaxed(1, sregs_base + SREG_CPU_PWR_CTRL(cpu));
45} 45}
46 46
47static inline void hignbank_set_pwr_suspend(void) 47static inline void highbank_clear_core_pwr(void)
48{
49 int cpu = cpu_logical_map(smp_processor_id());
50 if (scu_base_addr)
51 scu_power_mode(scu_base_addr, SCU_PM_NORMAL);
52 else
53 writel_relaxed(0, sregs_base + SREG_CPU_PWR_CTRL(cpu));
54}
55
56static inline void highbank_set_pwr_suspend(void)
48{ 57{
49 writel(HB_PWR_SUSPEND, sregs_base + HB_SREG_A9_PWR_REQ); 58 writel(HB_PWR_SUSPEND, sregs_base + HB_SREG_A9_PWR_REQ);
50 highbank_set_core_pwr(); 59 highbank_set_core_pwr();
51} 60}
52 61
53static inline void hignbank_set_pwr_shutdown(void) 62static inline void highbank_set_pwr_shutdown(void)
54{ 63{
55 writel(HB_PWR_SHUTDOWN, sregs_base + HB_SREG_A9_PWR_REQ); 64 writel(HB_PWR_SHUTDOWN, sregs_base + HB_SREG_A9_PWR_REQ);
56 highbank_set_core_pwr(); 65 highbank_set_core_pwr();
57} 66}
58 67
59static inline void hignbank_set_pwr_soft_reset(void) 68static inline void highbank_set_pwr_soft_reset(void)
60{ 69{
61 writel(HB_PWR_SOFT_RESET, sregs_base + HB_SREG_A9_PWR_REQ); 70 writel(HB_PWR_SOFT_RESET, sregs_base + HB_SREG_A9_PWR_REQ);
62 highbank_set_core_pwr(); 71 highbank_set_core_pwr();
63} 72}
64 73
65static inline void hignbank_set_pwr_hard_reset(void) 74static inline void highbank_set_pwr_hard_reset(void)
66{ 75{
67 writel(HB_PWR_HARD_RESET, sregs_base + HB_SREG_A9_PWR_REQ); 76 writel(HB_PWR_HARD_RESET, sregs_base + HB_SREG_A9_PWR_REQ);
68 highbank_set_core_pwr(); 77 highbank_set_core_pwr();
69} 78}
70 79
80static inline void highbank_clear_pwr_request(void)
81{
82 writel(~0UL, sregs_base + HB_SREG_A9_PWR_REQ);
83 highbank_clear_core_pwr();
84}
85
71#endif 86#endif
diff --git a/arch/arm/mach-highbank/system.c b/arch/arm/mach-highbank/system.c
index aed96ad9bd4a..37d8384dcf19 100644
--- a/arch/arm/mach-highbank/system.c
+++ b/arch/arm/mach-highbank/system.c
@@ -22,9 +22,9 @@
22void highbank_restart(char mode, const char *cmd) 22void highbank_restart(char mode, const char *cmd)
23{ 23{
24 if (mode == 'h') 24 if (mode == 'h')
25 hignbank_set_pwr_hard_reset(); 25 highbank_set_pwr_hard_reset();
26 else 26 else
27 hignbank_set_pwr_soft_reset(); 27 highbank_set_pwr_soft_reset();
28 28
29 while (1) 29 while (1)
30 cpu_do_idle(); 30 cpu_do_idle();
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 1ad0d76de8c7..3e628fd7a674 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -841,8 +841,6 @@ config SOC_IMX6Q
841 select ARCH_HAS_CPUFREQ 841 select ARCH_HAS_CPUFREQ
842 select ARCH_HAS_OPP 842 select ARCH_HAS_OPP
843 select ARM_CPU_SUSPEND if PM 843 select ARM_CPU_SUSPEND if PM
844 select ARM_ERRATA_743622
845 select ARM_ERRATA_751472
846 select ARM_ERRATA_754322 844 select ARM_ERRATA_754322
847 select ARM_ERRATA_764369 if SMP 845 select ARM_ERRATA_764369 if SMP
848 select ARM_ERRATA_775420 846 select ARM_ERRATA_775420
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h
index 7191ab4434e5..b0164da63b0c 100644
--- a/arch/arm/mach-imx/common.h
+++ b/arch/arm/mach-imx/common.h
@@ -112,7 +112,6 @@ void tzic_handle_irq(struct pt_regs *);
112#define imx50_handle_irq tzic_handle_irq 112#define imx50_handle_irq tzic_handle_irq
113#define imx51_handle_irq tzic_handle_irq 113#define imx51_handle_irq tzic_handle_irq
114#define imx53_handle_irq tzic_handle_irq 114#define imx53_handle_irq tzic_handle_irq
115#define imx6q_handle_irq gic_handle_irq
116 115
117extern void imx_enable_cpu(int cpu, bool enable); 116extern void imx_enable_cpu(int cpu, bool enable);
118extern void imx_set_cpu_jump(int cpu, void *jump_addr); 117extern void imx_set_cpu_jump(int cpu, void *jump_addr);
diff --git a/arch/arm/mach-imx/cpufreq.c b/arch/arm/mach-imx/cpufreq.c
index 36e8b3994470..d8c75c3c925d 100644
--- a/arch/arm/mach-imx/cpufreq.c
+++ b/arch/arm/mach-imx/cpufreq.c
@@ -188,7 +188,7 @@ static struct cpufreq_driver mxc_driver = {
188 .name = "imx", 188 .name = "imx",
189}; 189};
190 190
191static int __devinit mxc_cpufreq_driver_init(void) 191static int mxc_cpufreq_driver_init(void)
192{ 192{
193 return cpufreq_register_driver(&mxc_driver); 193 return cpufreq_register_driver(&mxc_driver);
194} 194}
diff --git a/arch/arm/mach-imx/epit.c b/arch/arm/mach-imx/epit.c
index 04a5961beeac..e02de188ae83 100644
--- a/arch/arm/mach-imx/epit.c
+++ b/arch/arm/mach-imx/epit.c
@@ -178,7 +178,6 @@ static struct irqaction epit_timer_irq = {
178static struct clock_event_device clockevent_epit = { 178static struct clock_event_device clockevent_epit = {
179 .name = "epit", 179 .name = "epit",
180 .features = CLOCK_EVT_FEAT_ONESHOT, 180 .features = CLOCK_EVT_FEAT_ONESHOT,
181 .shift = 32,
182 .set_mode = epit_set_mode, 181 .set_mode = epit_set_mode,
183 .set_next_event = epit_set_next_event, 182 .set_next_event = epit_set_next_event,
184 .rating = 200, 183 .rating = 200,
@@ -186,18 +185,10 @@ static struct clock_event_device clockevent_epit = {
186 185
187static int __init epit_clockevent_init(struct clk *timer_clk) 186static int __init epit_clockevent_init(struct clk *timer_clk)
188{ 187{
189 unsigned int c = clk_get_rate(timer_clk);
190
191 clockevent_epit.mult = div_sc(c, NSEC_PER_SEC,
192 clockevent_epit.shift);
193 clockevent_epit.max_delta_ns =
194 clockevent_delta2ns(0xfffffffe, &clockevent_epit);
195 clockevent_epit.min_delta_ns =
196 clockevent_delta2ns(0x800, &clockevent_epit);
197
198 clockevent_epit.cpumask = cpumask_of(0); 188 clockevent_epit.cpumask = cpumask_of(0);
199 189 clockevents_config_and_register(&clockevent_epit,
200 clockevents_register_device(&clockevent_epit); 190 clk_get_rate(timer_clk),
191 0x800, 0xfffffffe);
201 192
202 return 0; 193 return 0;
203} 194}
diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c
index e1537f9e45b8..ff24920699e4 100644
--- a/arch/arm/mach-imx/gpc.c
+++ b/arch/arm/mach-imx/gpc.c
@@ -15,7 +15,7 @@
15#include <linux/of.h> 15#include <linux/of.h>
16#include <linux/of_address.h> 16#include <linux/of_address.h>
17#include <linux/of_irq.h> 17#include <linux/of_irq.h>
18#include <asm/hardware/gic.h> 18#include <linux/irqchip/arm-gic.h>
19 19
20#define GPC_IMR1 0x008 20#define GPC_IMR1 0x008
21#define GPC_PGC_CPU_PDN 0x2a0 21#define GPC_PGC_CPU_PDN 0x2a0
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index cd277a0f5b16..8d3d06e0e8a1 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -18,6 +18,7 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/irq.h> 20#include <linux/irq.h>
21#include <linux/irqchip.h>
21#include <linux/of.h> 22#include <linux/of.h>
22#include <linux/of_address.h> 23#include <linux/of_address.h>
23#include <linux/of_irq.h> 24#include <linux/of_irq.h>
@@ -29,7 +30,6 @@
29#include <asm/cpuidle.h> 30#include <asm/cpuidle.h>
30#include <asm/smp_twd.h> 31#include <asm/smp_twd.h>
31#include <asm/hardware/cache-l2x0.h> 32#include <asm/hardware/cache-l2x0.h>
32#include <asm/hardware/gic.h>
33#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
34#include <asm/mach/time.h> 34#include <asm/mach/time.h>
35#include <asm/system_misc.h> 35#include <asm/system_misc.h>
@@ -221,17 +221,12 @@ static void __init imx6q_map_io(void)
221 imx6q_clock_map_io(); 221 imx6q_clock_map_io();
222} 222}
223 223
224static const struct of_device_id imx6q_irq_match[] __initconst = {
225 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
226 { /* sentinel */ }
227};
228
229static void __init imx6q_init_irq(void) 224static void __init imx6q_init_irq(void)
230{ 225{
231 l2x0_of_init(0, ~0UL); 226 l2x0_of_init(0, ~0UL);
232 imx_src_init(); 227 imx_src_init();
233 imx_gpc_init(); 228 imx_gpc_init();
234 of_irq_init(imx6q_irq_match); 229 irqchip_init();
235} 230}
236 231
237static void __init imx6q_timer_init(void) 232static void __init imx6q_timer_init(void)
@@ -250,7 +245,6 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad (Device Tree)")
250 .smp = smp_ops(imx_smp_ops), 245 .smp = smp_ops(imx_smp_ops),
251 .map_io = imx6q_map_io, 246 .map_io = imx6q_map_io,
252 .init_irq = imx6q_init_irq, 247 .init_irq = imx6q_init_irq,
253 .handle_irq = imx6q_handle_irq,
254 .init_time = imx6q_timer_init, 248 .init_time = imx6q_timer_init,
255 .init_machine = imx6q_init_machine, 249 .init_machine = imx6q_init_machine,
256 .init_late = imx6q_init_late, 250 .init_late = imx6q_init_late,
diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx/mmdc.c
index c461e98496c3..7a9686ad994c 100644
--- a/arch/arm/mach-imx/mmdc.c
+++ b/arch/arm/mach-imx/mmdc.c
@@ -21,7 +21,7 @@
21#define BP_MMDC_MAPSR_PSD 0 21#define BP_MMDC_MAPSR_PSD 0
22#define BP_MMDC_MAPSR_PSS 4 22#define BP_MMDC_MAPSR_PSS 4
23 23
24static int __devinit imx_mmdc_probe(struct platform_device *pdev) 24static int imx_mmdc_probe(struct platform_device *pdev)
25{ 25{
26 struct device_node *np = pdev->dev.of_node; 26 struct device_node *np = pdev->dev.of_node;
27 void __iomem *mmdc_base, *reg; 27 void __iomem *mmdc_base, *reg;
diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c
index 3777b805b76b..d35693117991 100644
--- a/arch/arm/mach-imx/platsmp.c
+++ b/arch/arm/mach-imx/platsmp.c
@@ -12,9 +12,9 @@
12 12
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/smp.h> 14#include <linux/smp.h>
15#include <linux/irqchip/arm-gic.h>
15#include <asm/page.h> 16#include <asm/page.h>
16#include <asm/smp_scu.h> 17#include <asm/smp_scu.h>
17#include <asm/hardware/gic.h>
18#include <asm/mach/map.h> 18#include <asm/mach/map.h>
19 19
20#include "common.h" 20#include "common.h"
@@ -71,8 +71,6 @@ static void __init imx_smp_init_cpus(void)
71 71
72 for (i = 0; i < ncores; i++) 72 for (i = 0; i < ncores; i++)
73 set_cpu_possible(i, true); 73 set_cpu_possible(i, true);
74
75 set_smp_cross_call(gic_raise_softirq);
76} 74}
77 75
78void imx_smp_prepare(void) 76void imx_smp_prepare(void)
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c
index f017302f6d09..62769df36db1 100644
--- a/arch/arm/mach-imx/time.c
+++ b/arch/arm/mach-imx/time.c
@@ -256,7 +256,6 @@ static struct irqaction mxc_timer_irq = {
256static struct clock_event_device clockevent_mxc = { 256static struct clock_event_device clockevent_mxc = {
257 .name = "mxc_timer1", 257 .name = "mxc_timer1",
258 .features = CLOCK_EVT_FEAT_ONESHOT, 258 .features = CLOCK_EVT_FEAT_ONESHOT,
259 .shift = 32,
260 .set_mode = mxc_set_mode, 259 .set_mode = mxc_set_mode,
261 .set_next_event = mx1_2_set_next_event, 260 .set_next_event = mx1_2_set_next_event,
262 .rating = 200, 261 .rating = 200,
@@ -264,21 +263,13 @@ static struct clock_event_device clockevent_mxc = {
264 263
265static int __init mxc_clockevent_init(struct clk *timer_clk) 264static int __init mxc_clockevent_init(struct clk *timer_clk)
266{ 265{
267 unsigned int c = clk_get_rate(timer_clk);
268
269 if (timer_is_v2()) 266 if (timer_is_v2())
270 clockevent_mxc.set_next_event = v2_set_next_event; 267 clockevent_mxc.set_next_event = v2_set_next_event;
271 268
272 clockevent_mxc.mult = div_sc(c, NSEC_PER_SEC,
273 clockevent_mxc.shift);
274 clockevent_mxc.max_delta_ns =
275 clockevent_delta2ns(0xfffffffe, &clockevent_mxc);
276 clockevent_mxc.min_delta_ns =
277 clockevent_delta2ns(0xff, &clockevent_mxc);
278
279 clockevent_mxc.cpumask = cpumask_of(0); 269 clockevent_mxc.cpumask = cpumask_of(0);
280 270 clockevents_config_and_register(&clockevent_mxc,
281 clockevents_register_device(&clockevent_mxc); 271 clk_get_rate(timer_clk),
272 0xff, 0xfffffffe);
282 273
283 return 0; 274 return 0;
284} 275}
diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c
index 2f28018c4447..9082b84aeebb 100644
--- a/arch/arm/mach-iop13xx/pci.c
+++ b/arch/arm/mach-iop13xx/pci.c
@@ -504,7 +504,7 @@ iop13xx_pci_abort(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
504 504
505/* Scan an IOP13XX PCI bus. nr selects which ATU we use. 505/* Scan an IOP13XX PCI bus. nr selects which ATU we use.
506 */ 506 */
507struct pci_bus * __devinit iop13xx_scan_bus(int nr, struct pci_sys_data *sys) 507struct pci_bus *iop13xx_scan_bus(int nr, struct pci_sys_data *sys)
508{ 508{
509 int which_atu; 509 int which_atu;
510 struct pci_bus *bus = NULL; 510 struct pci_bus *bus = NULL;
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index f6ac695ceb60..1dbeb7c99d58 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -519,22 +519,15 @@ static struct clock_event_device clockevent_ixp4xx = {
519 .name = "ixp4xx timer1", 519 .name = "ixp4xx timer1",
520 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 520 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
521 .rating = 200, 521 .rating = 200,
522 .shift = 24,
523 .set_mode = ixp4xx_set_mode, 522 .set_mode = ixp4xx_set_mode,
524 .set_next_event = ixp4xx_set_next_event, 523 .set_next_event = ixp4xx_set_next_event,
525}; 524};
526 525
527static void __init ixp4xx_clockevent_init(void) 526static void __init ixp4xx_clockevent_init(void)
528{ 527{
529 clockevent_ixp4xx.mult = div_sc(IXP4XX_TIMER_FREQ, NSEC_PER_SEC,
530 clockevent_ixp4xx.shift);
531 clockevent_ixp4xx.max_delta_ns =
532 clockevent_delta2ns(0xfffffffe, &clockevent_ixp4xx);
533 clockevent_ixp4xx.min_delta_ns =
534 clockevent_delta2ns(0xf, &clockevent_ixp4xx);
535 clockevent_ixp4xx.cpumask = cpumask_of(0); 528 clockevent_ixp4xx.cpumask = cpumask_of(0);
536 529 clockevents_config_and_register(&clockevent_ixp4xx, IXP4XX_TIMER_FREQ,
537 clockevents_register_device(&clockevent_ixp4xx); 530 0xf, 0xfffffffe);
538} 531}
539 532
540void ixp4xx_restart(char mode, const char *cmd) 533void ixp4xx_restart(char mode, const char *cmd)
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index d6f57fd6f788..d4af5c191c24 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -67,6 +67,10 @@ static void __init kirkwood_legacy_clk_init(void)
67 orion_clkdev_add(NULL, "mv643xx_eth_port.1", 67 orion_clkdev_add(NULL, "mv643xx_eth_port.1",
68 of_clk_get_from_provider(&clkspec)); 68 of_clk_get_from_provider(&clkspec));
69 69
70 clkspec.args[0] = CGC_BIT_SDIO;
71 orion_clkdev_add(NULL, "mvsdio",
72 of_clk_get_from_provider(&clkspec));
73
70} 74}
71 75
72static void __init kirkwood_of_clk_init(void) 76static void __init kirkwood_of_clk_init(void)
diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c
index 15e69fcde9f4..23d2dd1b1b1e 100644
--- a/arch/arm/mach-kirkwood/board-usi_topkick.c
+++ b/arch/arm/mach-kirkwood/board-usi_topkick.c
@@ -64,8 +64,6 @@ static unsigned int topkick_mpp_config[] __initdata = {
64 0 64 0
65}; 65};
66 66
67#define TOPKICK_SATA0_PWR_ENABLE 36
68
69void __init usi_topkick_init(void) 67void __init usi_topkick_init(void)
70{ 68{
71 /* 69 /*
@@ -73,8 +71,6 @@ void __init usi_topkick_init(void)
73 */ 71 */
74 kirkwood_mpp_conf(topkick_mpp_config); 72 kirkwood_mpp_conf(topkick_mpp_config);
75 73
76 /* SATA0 power enable */
77 gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1);
78 74
79 kirkwood_ge00_init(&topkick_ge00_data); 75 kirkwood_ge00_init(&topkick_ge00_data);
80 kirkwood_sdio_init(&topkick_mvsdio_data); 76 kirkwood_sdio_init(&topkick_mvsdio_data);
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c
index ef102646ba9a..a1c3ab6fc809 100644
--- a/arch/arm/mach-kirkwood/pcie.c
+++ b/arch/arm/mach-kirkwood/pcie.c
@@ -214,7 +214,7 @@ static int __init kirkwood_pcie_setup(int nr, struct pci_sys_data *sys)
214 * PCI_CLASS_BRIDGE_HOST or Linux will errantly try to process the BAR's on 214 * PCI_CLASS_BRIDGE_HOST or Linux will errantly try to process the BAR's on
215 * the device. Decoding setup is handled by the orion code. 215 * the device. Decoding setup is handled by the orion code.
216 */ 216 */
217static void __devinit rc_pci_fixup(struct pci_dev *dev) 217static void rc_pci_fixup(struct pci_dev *dev)
218{ 218{
219 if (dev->bus->parent == NULL && dev->devfn == 0) { 219 if (dev->bus->parent == NULL && dev->devfn == 0) {
220 int i; 220 int i;
diff --git a/arch/arm/mach-ks8695/board-acs5k.c b/arch/arm/mach-ks8695/board-acs5k.c
index 7beec9b8becd..456d6386edf8 100644
--- a/arch/arm/mach-ks8695/board-acs5k.c
+++ b/arch/arm/mach-ks8695/board-acs5k.c
@@ -92,7 +92,7 @@ static struct i2c_board_info acs5k_i2c_devs[] __initdata = {
92 }, 92 },
93}; 93};
94 94
95static void __devinit acs5k_i2c_init(void) 95static void acs5k_i2c_init(void)
96{ 96{
97 /* The gpio interface */ 97 /* The gpio interface */
98 platform_device_register(&acs5k_i2c_device); 98 platform_device_register(&acs5k_i2c_device);
diff --git a/arch/arm/mach-lpc32xx/timer.c b/arch/arm/mach-lpc32xx/timer.c
index 88bd4ce3b94a..20eab63d10ba 100644
--- a/arch/arm/mach-lpc32xx/timer.c
+++ b/arch/arm/mach-lpc32xx/timer.c
@@ -70,7 +70,6 @@ static void lpc32xx_clkevt_mode(enum clock_event_mode mode,
70static struct clock_event_device lpc32xx_clkevt = { 70static struct clock_event_device lpc32xx_clkevt = {
71 .name = "lpc32xx_clkevt", 71 .name = "lpc32xx_clkevt",
72 .features = CLOCK_EVT_FEAT_ONESHOT, 72 .features = CLOCK_EVT_FEAT_ONESHOT,
73 .shift = 32,
74 .rating = 300, 73 .rating = 300,
75 .set_next_event = lpc32xx_clkevt_next_event, 74 .set_next_event = lpc32xx_clkevt_next_event,
76 .set_mode = lpc32xx_clkevt_mode, 75 .set_mode = lpc32xx_clkevt_mode,
@@ -141,14 +140,8 @@ void __init lpc32xx_timer_init(void)
141 setup_irq(IRQ_LPC32XX_TIMER0, &lpc32xx_timer_irq); 140 setup_irq(IRQ_LPC32XX_TIMER0, &lpc32xx_timer_irq);
142 141
143 /* Setup the clockevent structure. */ 142 /* Setup the clockevent structure. */
144 lpc32xx_clkevt.mult = div_sc(clkrate, NSEC_PER_SEC,
145 lpc32xx_clkevt.shift);
146 lpc32xx_clkevt.max_delta_ns = clockevent_delta2ns(-1,
147 &lpc32xx_clkevt);
148 lpc32xx_clkevt.min_delta_ns = clockevent_delta2ns(1,
149 &lpc32xx_clkevt) + 1;
150 lpc32xx_clkevt.cpumask = cpumask_of(0); 143 lpc32xx_clkevt.cpumask = cpumask_of(0);
151 clockevents_register_device(&lpc32xx_clkevt); 144 clockevents_config_and_register(&lpc32xx_clkevt, clkrate, 1, -1);
152 145
153 /* Use timer1 as clock source. */ 146 /* Use timer1 as clock source. */
154 __raw_writel(LPC32XX_TIMER_CNTR_TCR_RESET, 147 __raw_writel(LPC32XX_TIMER_CNTR_TCR_RESET,
diff --git a/arch/arm/mach-mmp/sram.c b/arch/arm/mach-mmp/sram.c
index a6c08ede4491..bf5e64906e65 100644
--- a/arch/arm/mach-mmp/sram.c
+++ b/arch/arm/mach-mmp/sram.c
@@ -61,7 +61,7 @@ struct gen_pool *sram_get_gpool(char *pool_name)
61} 61}
62EXPORT_SYMBOL(sram_get_gpool); 62EXPORT_SYMBOL(sram_get_gpool);
63 63
64static int __devinit sram_probe(struct platform_device *pdev) 64static int sram_probe(struct platform_device *pdev)
65{ 65{
66 struct sram_platdata *pdata = pdev->dev.platform_data; 66 struct sram_platdata *pdata = pdev->dev.platform_data;
67 struct sram_bank_info *info; 67 struct sram_bank_info *info;
@@ -125,7 +125,7 @@ out:
125 return ret; 125 return ret;
126} 126}
127 127
128static int __devexit sram_remove(struct platform_device *pdev) 128static int sram_remove(struct platform_device *pdev)
129{ 129{
130 struct sram_bank_info *info; 130 struct sram_bank_info *info;
131 131
diff --git a/arch/arm/mach-mmp/time.c b/arch/arm/mach-mmp/time.c
index 936447c70977..86a18b3d252e 100644
--- a/arch/arm/mach-mmp/time.c
+++ b/arch/arm/mach-mmp/time.c
@@ -141,7 +141,6 @@ static void timer_set_mode(enum clock_event_mode mode,
141static struct clock_event_device ckevt = { 141static struct clock_event_device ckevt = {
142 .name = "clockevent", 142 .name = "clockevent",
143 .features = CLOCK_EVT_FEAT_ONESHOT, 143 .features = CLOCK_EVT_FEAT_ONESHOT,
144 .shift = 32,
145 .rating = 200, 144 .rating = 200,
146 .set_next_event = timer_set_next_event, 145 .set_next_event = timer_set_next_event,
147 .set_mode = timer_set_mode, 146 .set_mode = timer_set_mode,
@@ -198,15 +197,13 @@ void __init timer_init(int irq)
198 197
199 setup_sched_clock(mmp_read_sched_clock, 32, CLOCK_TICK_RATE); 198 setup_sched_clock(mmp_read_sched_clock, 32, CLOCK_TICK_RATE);
200 199
201 ckevt.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, ckevt.shift);
202 ckevt.max_delta_ns = clockevent_delta2ns(MAX_DELTA, &ckevt);
203 ckevt.min_delta_ns = clockevent_delta2ns(MIN_DELTA, &ckevt);
204 ckevt.cpumask = cpumask_of(0); 200 ckevt.cpumask = cpumask_of(0);
205 201
206 setup_irq(irq, &timer_irq); 202 setup_irq(irq, &timer_irq);
207 203
208 clocksource_register_hz(&cksrc, CLOCK_TICK_RATE); 204 clocksource_register_hz(&cksrc, CLOCK_TICK_RATE);
209 clockevents_register_device(&ckevt); 205 clockevents_config_and_register(&ckevt, CLOCK_TICK_RATE,
206 MIN_DELTA, MAX_DELTA);
210} 207}
211 208
212#ifdef CONFIG_OF 209#ifdef CONFIG_OF
diff --git a/arch/arm/mach-msm/board-dt-8660.c b/arch/arm/mach-msm/board-dt-8660.c
index 27c41eabfd12..7dcfc5300bbd 100644
--- a/arch/arm/mach-msm/board-dt-8660.c
+++ b/arch/arm/mach-msm/board-dt-8660.c
@@ -11,26 +11,15 @@
11 */ 11 */
12 12
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/irqchip.h>
14#include <linux/of.h> 15#include <linux/of.h>
15#include <linux/of_irq.h>
16#include <linux/of_platform.h> 16#include <linux/of_platform.h>
17 17
18#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
19#include <asm/hardware/gic.h>
20 19
21#include <mach/board.h> 20#include <mach/board.h>
22#include "common.h" 21#include "common.h"
23 22
24static const struct of_device_id msm_dt_gic_match[] __initconst = {
25 { .compatible = "qcom,msm-8660-qgic", .data = gic_of_init },
26 {}
27};
28
29static void __init msm8x60_init_irq(void)
30{
31 of_irq_init(msm_dt_gic_match);
32}
33
34static void __init msm8x60_init_late(void) 23static void __init msm8x60_init_late(void)
35{ 24{
36 smd_debugfs_init(); 25 smd_debugfs_init();
@@ -55,8 +44,7 @@ static const char *msm8x60_fluid_match[] __initdata = {
55DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)") 44DT_MACHINE_START(MSM_DT, "Qualcomm MSM (Flattened Device Tree)")
56 .smp = smp_ops(msm_smp_ops), 45 .smp = smp_ops(msm_smp_ops),
57 .map_io = msm_map_msm8x60_io, 46 .map_io = msm_map_msm8x60_io,
58 .init_irq = msm8x60_init_irq, 47 .init_irq = irqchip_init,
59 .handle_irq = gic_handle_irq,
60 .init_machine = msm8x60_dt_init, 48 .init_machine = msm8x60_dt_init,
61 .init_late = msm8x60_init_late, 49 .init_late = msm8x60_init_late,
62 .init_time = msm_dt_timer_init, 50 .init_time = msm_dt_timer_init,
diff --git a/arch/arm/mach-msm/board-dt-8960.c b/arch/arm/mach-msm/board-dt-8960.c
index 3226d5276962..73019363ffa4 100644
--- a/arch/arm/mach-msm/board-dt-8960.c
+++ b/arch/arm/mach-msm/board-dt-8960.c
@@ -11,24 +11,13 @@
11 */ 11 */
12 12
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/of_irq.h> 14#include <linux/irqchip.h>
15#include <linux/of_platform.h> 15#include <linux/of_platform.h>
16 16
17#include <asm/hardware/gic.h>
18#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
19 18
20#include "common.h" 19#include "common.h"
21 20
22static const struct of_device_id msm_dt_gic_match[] __initconst = {
23 { .compatible = "qcom,msm-qgic2", .data = gic_of_init },
24 { }
25};
26
27static void __init msm_dt_init_irq(void)
28{
29 of_irq_init(msm_dt_gic_match);
30}
31
32static void __init msm_dt_init(void) 21static void __init msm_dt_init(void)
33{ 22{
34 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 23 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
@@ -42,9 +31,8 @@ static const char * const msm8960_dt_match[] __initconst = {
42DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)") 31DT_MACHINE_START(MSM8960_DT, "Qualcomm MSM (Flattened Device Tree)")
43 .smp = smp_ops(msm_smp_ops), 32 .smp = smp_ops(msm_smp_ops),
44 .map_io = msm_map_msm8960_io, 33 .map_io = msm_map_msm8960_io,
45 .init_irq = msm_dt_init_irq, 34 .init_irq = irqchip_init,
46 .init_time = msm_dt_timer_init, 35 .init_time = msm_dt_timer_init,
47 .init_machine = msm_dt_init, 36 .init_machine = msm_dt_init,
48 .dt_compat = msm8960_dt_match, 37 .dt_compat = msm8960_dt_match,
49 .handle_irq = gic_handle_irq,
50MACHINE_END 38MACHINE_END
diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c
index 7ed69b69c87c..42932865416a 100644
--- a/arch/arm/mach-msm/platsmp.c
+++ b/arch/arm/mach-msm/platsmp.c
@@ -15,8 +15,8 @@
15#include <linux/jiffies.h> 15#include <linux/jiffies.h>
16#include <linux/smp.h> 16#include <linux/smp.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/irqchip/arm-gic.h>
18 19
19#include <asm/hardware/gic.h>
20#include <asm/cacheflush.h> 20#include <asm/cacheflush.h>
21#include <asm/cputype.h> 21#include <asm/cputype.h>
22#include <asm/mach-types.h> 22#include <asm/mach-types.h>
@@ -115,7 +115,7 @@ static int __cpuinit msm_boot_secondary(unsigned int cpu, struct task_struct *id
115 * the boot monitor to read the system wide flags register, 115 * the boot monitor to read the system wide flags register,
116 * and branch to the address found there. 116 * and branch to the address found there.
117 */ 117 */
118 gic_raise_softirq(cpumask_of(cpu), 0); 118 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
119 119
120 timeout = jiffies + (1 * HZ); 120 timeout = jiffies + (1 * HZ);
121 while (time_before(jiffies, timeout)) { 121 while (time_before(jiffies, timeout)) {
@@ -153,8 +153,6 @@ static void __init msm_smp_init_cpus(void)
153 153
154 for (i = 0; i < ncores; i++) 154 for (i = 0; i < ncores; i++)
155 set_cpu_possible(i, true); 155 set_cpu_possible(i, true);
156
157 set_smp_cross_call(gic_raise_softirq);
158} 156}
159 157
160static void __init msm_smp_prepare_cpus(unsigned int max_cpus) 158static void __init msm_smp_prepare_cpus(unsigned int max_cpus)
diff --git a/arch/arm/mach-msm/proc_comm.c b/arch/arm/mach-msm/proc_comm.c
index 8f1eecd88186..507f5ca80697 100644
--- a/arch/arm/mach-msm/proc_comm.c
+++ b/arch/arm/mach-msm/proc_comm.c
@@ -120,7 +120,7 @@ int msm_proc_comm(unsigned cmd, unsigned *data1, unsigned *data2)
120 * and unknown state. This function should be called early to 120 * and unknown state. This function should be called early to
121 * wait on the ARM9. 121 * wait on the ARM9.
122 */ 122 */
123void __devinit proc_comm_boot_wait(void) 123void proc_comm_boot_wait(void)
124{ 124{
125 void __iomem *base = MSM_SHARED_RAM_BASE; 125 void __iomem *base = MSM_SHARED_RAM_BASE;
126 126
diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
index c5a2eddc6cdc..b1588a1ea2f8 100644
--- a/arch/arm/mach-msm/smd.c
+++ b/arch/arm/mach-msm/smd.c
@@ -988,7 +988,7 @@ int smd_core_init(void)
988 return 0; 988 return 0;
989} 989}
990 990
991static int __devinit msm_smd_probe(struct platform_device *pdev) 991static int msm_smd_probe(struct platform_device *pdev)
992{ 992{
993 /* 993 /*
994 * If we haven't waited for the ARM9 to boot up till now, 994 * If we haven't waited for the ARM9 to boot up till now,
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
index 2fb5f3eec50f..2969027f02fa 100644
--- a/arch/arm/mach-msm/timer.c
+++ b/arch/arm/mach-msm/timer.c
@@ -25,7 +25,6 @@
25#include <linux/of_irq.h> 25#include <linux/of_irq.h>
26 26
27#include <asm/mach/time.h> 27#include <asm/mach/time.h>
28#include <asm/hardware/gic.h>
29#include <asm/localtimer.h> 28#include <asm/localtimer.h>
30#include <asm/sched_clock.h> 29#include <asm/sched_clock.h>
31 30
@@ -144,13 +143,9 @@ static int __cpuinit msm_local_timer_setup(struct clock_event_device *evt)
144 evt->rating = msm_clockevent.rating; 143 evt->rating = msm_clockevent.rating;
145 evt->set_mode = msm_timer_set_mode; 144 evt->set_mode = msm_timer_set_mode;
146 evt->set_next_event = msm_timer_set_next_event; 145 evt->set_next_event = msm_timer_set_next_event;
147 evt->shift = msm_clockevent.shift;
148 evt->mult = div_sc(GPT_HZ, NSEC_PER_SEC, evt->shift);
149 evt->max_delta_ns = clockevent_delta2ns(0xf0000000, evt);
150 evt->min_delta_ns = clockevent_delta2ns(4, evt);
151 146
152 *__this_cpu_ptr(msm_evt.percpu_evt) = evt; 147 *__this_cpu_ptr(msm_evt.percpu_evt) = evt;
153 clockevents_register_device(evt); 148 clockevents_config_and_register(evt, GPT_HZ, 4, 0xf0000000);
154 enable_percpu_irq(evt->irq, IRQ_TYPE_EDGE_RISING); 149 enable_percpu_irq(evt->irq, IRQ_TYPE_EDGE_RISING);
155 return 0; 150 return 0;
156} 151}
diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c
index a9a154a646dd..ee8c0b51df2c 100644
--- a/arch/arm/mach-mv78xx0/pcie.c
+++ b/arch/arm/mach-mv78xx0/pcie.c
@@ -173,7 +173,7 @@ static struct pci_ops pcie_ops = {
173 .write = pcie_wr_conf, 173 .write = pcie_wr_conf,
174}; 174};
175 175
176static void __devinit rc_pci_fixup(struct pci_dev *dev) 176static void rc_pci_fixup(struct pci_dev *dev)
177{ 177{
178 /* 178 /*
179 * Prevent enumeration of root complex. 179 * Prevent enumeration of root complex.
diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c
index 856f4c796061..27451b1ba3f1 100644
--- a/arch/arm/mach-mxs/timer.c
+++ b/arch/arm/mach-mxs/timer.c
@@ -195,7 +195,6 @@ static void mxs_set_mode(enum clock_event_mode mode,
195static struct clock_event_device mxs_clockevent_device = { 195static struct clock_event_device mxs_clockevent_device = {
196 .name = "mxs_timrot", 196 .name = "mxs_timrot",
197 .features = CLOCK_EVT_FEAT_ONESHOT, 197 .features = CLOCK_EVT_FEAT_ONESHOT,
198 .shift = 32,
199 .set_mode = mxs_set_mode, 198 .set_mode = mxs_set_mode,
200 .set_next_event = timrotv2_set_next_event, 199 .set_next_event = timrotv2_set_next_event,
201 .rating = 200, 200 .rating = 200,
@@ -203,25 +202,12 @@ static struct clock_event_device mxs_clockevent_device = {
203 202
204static int __init mxs_clockevent_init(struct clk *timer_clk) 203static int __init mxs_clockevent_init(struct clk *timer_clk)
205{ 204{
206 unsigned int c = clk_get_rate(timer_clk); 205 if (timrot_is_v1())
207
208 mxs_clockevent_device.mult =
209 div_sc(c, NSEC_PER_SEC, mxs_clockevent_device.shift);
210 mxs_clockevent_device.cpumask = cpumask_of(0);
211 if (timrot_is_v1()) {
212 mxs_clockevent_device.set_next_event = timrotv1_set_next_event; 206 mxs_clockevent_device.set_next_event = timrotv1_set_next_event;
213 mxs_clockevent_device.max_delta_ns = 207 mxs_clockevent_device.cpumask = cpumask_of(0);
214 clockevent_delta2ns(0xfffe, &mxs_clockevent_device); 208 clockevents_config_and_register(&mxs_clockevent_device,
215 mxs_clockevent_device.min_delta_ns = 209 clk_get_rate(timer_clk), 0xf,
216 clockevent_delta2ns(0xf, &mxs_clockevent_device); 210 timrot_is_v1() ? 0xfffe : 0xfffffffe);
217 } else {
218 mxs_clockevent_device.max_delta_ns =
219 clockevent_delta2ns(0xfffffffe, &mxs_clockevent_device);
220 mxs_clockevent_device.min_delta_ns =
221 clockevent_delta2ns(0xf, &mxs_clockevent_device);
222 }
223
224 clockevents_register_device(&mxs_clockevent_device);
225 211
226 return 0; 212 return 0;
227} 213}
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c
index aa627465d914..27c2cb7ab813 100644
--- a/arch/arm/mach-netx/generic.c
+++ b/arch/arm/mach-netx/generic.c
@@ -23,9 +23,9 @@
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/irqchip/arm-vic.h>
26#include <mach/hardware.h> 27#include <mach/hardware.h>
27#include <asm/mach/map.h> 28#include <asm/mach/map.h>
28#include <asm/hardware/vic.h>
29#include <mach/netx-regs.h> 29#include <mach/netx-regs.h>
30#include <asm/mach/irq.h> 30#include <asm/mach/irq.h>
31 31
diff --git a/arch/arm/mach-netx/nxdb500.c b/arch/arm/mach-netx/nxdb500.c
index 241e1b9c58cb..9b558eb3070f 100644
--- a/arch/arm/mach-netx/nxdb500.c
+++ b/arch/arm/mach-netx/nxdb500.c
@@ -28,7 +28,6 @@
28#include <mach/hardware.h> 28#include <mach/hardware.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31#include <asm/hardware/vic.h>
32#include <mach/netx-regs.h> 31#include <mach/netx-regs.h>
33#include <linux/platform_data/eth-netx.h> 32#include <linux/platform_data/eth-netx.h>
34 33
@@ -204,7 +203,6 @@ MACHINE_START(NXDB500, "Hilscher nxdb500")
204 .atag_offset = 0x100, 203 .atag_offset = 0x100,
205 .map_io = netx_map_io, 204 .map_io = netx_map_io,
206 .init_irq = netx_init_irq, 205 .init_irq = netx_init_irq,
207 .handle_irq = vic_handle_irq,
208 .init_time = netx_timer_init, 206 .init_time = netx_timer_init,
209 .init_machine = nxdb500_init, 207 .init_machine = nxdb500_init,
210 .restart = netx_restart, 208 .restart = netx_restart,
diff --git a/arch/arm/mach-netx/nxdkn.c b/arch/arm/mach-netx/nxdkn.c
index 055aeecedde2..a5e86cd365e7 100644
--- a/arch/arm/mach-netx/nxdkn.c
+++ b/arch/arm/mach-netx/nxdkn.c
@@ -28,7 +28,6 @@
28#include <mach/hardware.h> 28#include <mach/hardware.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31#include <asm/hardware/vic.h>
32#include <mach/netx-regs.h> 31#include <mach/netx-regs.h>
33#include <linux/platform_data/eth-netx.h> 32#include <linux/platform_data/eth-netx.h>
34 33
@@ -97,7 +96,6 @@ MACHINE_START(NXDKN, "Hilscher nxdkn")
97 .atag_offset = 0x100, 96 .atag_offset = 0x100,
98 .map_io = netx_map_io, 97 .map_io = netx_map_io,
99 .init_irq = netx_init_irq, 98 .init_irq = netx_init_irq,
100 .handle_irq = vic_handle_irq,
101 .init_time = netx_timer_init, 99 .init_time = netx_timer_init,
102 .init_machine = nxdkn_init, 100 .init_machine = nxdkn_init,
103 .restart = netx_restart, 101 .restart = netx_restart,
diff --git a/arch/arm/mach-netx/nxeb500hmi.c b/arch/arm/mach-netx/nxeb500hmi.c
index 018e91c55b00..ad17885d0159 100644
--- a/arch/arm/mach-netx/nxeb500hmi.c
+++ b/arch/arm/mach-netx/nxeb500hmi.c
@@ -28,7 +28,6 @@
28#include <mach/hardware.h> 28#include <mach/hardware.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31#include <asm/hardware/vic.h>
32#include <mach/netx-regs.h> 31#include <mach/netx-regs.h>
33#include <linux/platform_data/eth-netx.h> 32#include <linux/platform_data/eth-netx.h>
34 33
@@ -181,7 +180,6 @@ MACHINE_START(NXEB500HMI, "Hilscher nxeb500hmi")
181 .atag_offset = 0x100, 180 .atag_offset = 0x100,
182 .map_io = netx_map_io, 181 .map_io = netx_map_io,
183 .init_irq = netx_init_irq, 182 .init_irq = netx_init_irq,
184 .handle_irq = vic_handle_irq,
185 .init_time = netx_timer_init, 183 .init_time = netx_timer_init,
186 .init_machine = nxeb500hmi_init, 184 .init_machine = nxeb500hmi_init,
187 .restart = netx_restart, 185 .restart = netx_restart,
diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c
index 0dee4524494f..6df42e643031 100644
--- a/arch/arm/mach-netx/time.c
+++ b/arch/arm/mach-netx/time.c
@@ -76,7 +76,6 @@ static int netx_set_next_event(unsigned long evt,
76 76
77static struct clock_event_device netx_clockevent = { 77static struct clock_event_device netx_clockevent = {
78 .name = "netx-timer" __stringify(TIMER_CLOCKEVENT), 78 .name = "netx-timer" __stringify(TIMER_CLOCKEVENT),
79 .shift = 32,
80 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 79 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
81 .set_next_event = netx_set_next_event, 80 .set_next_event = netx_set_next_event,
82 .set_mode = netx_set_mode, 81 .set_mode = netx_set_mode,
@@ -140,14 +139,9 @@ void __init netx_timer_init(void)
140 clocksource_mmio_init(NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE), 139 clocksource_mmio_init(NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE),
141 "netx_timer", CLOCK_TICK_RATE, 200, 32, clocksource_mmio_readl_up); 140 "netx_timer", CLOCK_TICK_RATE, 200, 32, clocksource_mmio_readl_up);
142 141
143 netx_clockevent.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC,
144 netx_clockevent.shift);
145 netx_clockevent.max_delta_ns =
146 clockevent_delta2ns(0xfffffffe, &netx_clockevent);
147 /* with max_delta_ns >= delta2ns(0x800) the system currently runs fine. 142 /* with max_delta_ns >= delta2ns(0x800) the system currently runs fine.
148 * Adding some safety ... */ 143 * Adding some safety ... */
149 netx_clockevent.min_delta_ns =
150 clockevent_delta2ns(0xa00, &netx_clockevent);
151 netx_clockevent.cpumask = cpumask_of(0); 144 netx_clockevent.cpumask = cpumask_of(0);
152 clockevents_register_device(&netx_clockevent); 145 clockevents_config_and_register(&netx_clockevent, CLOCK_TICK_RATE,
146 0xa00, 0xfffffffe);
153} 147}
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c
index ab756ed87ef0..aaed48d94374 100644
--- a/arch/arm/mach-nomadik/board-nhk8815.c
+++ b/arch/arm/mach-nomadik/board-nhk8815.c
@@ -27,8 +27,6 @@
27#include <linux/pinctrl/machine.h> 27#include <linux/pinctrl/machine.h>
28#include <linux/platform_data/pinctrl-nomadik.h> 28#include <linux/platform_data/pinctrl-nomadik.h>
29#include <linux/platform_data/clocksource-nomadik-mtu.h> 29#include <linux/platform_data/clocksource-nomadik-mtu.h>
30#include <linux/platform_data/mtd-nomadik-nand.h>
31#include <asm/hardware/vic.h>
32#include <asm/sizes.h> 30#include <asm/sizes.h>
33#include <asm/mach-types.h> 31#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
@@ -349,7 +347,6 @@ MACHINE_START(NOMADIK, "NHK8815")
349 .atag_offset = 0x100, 347 .atag_offset = 0x100,
350 .map_io = cpu8815_map_io, 348 .map_io = cpu8815_map_io,
351 .init_irq = cpu8815_init_irq, 349 .init_irq = cpu8815_init_irq,
352 .handle_irq = vic_handle_irq,
353 .init_time = nomadik_timer_init, 350 .init_time = nomadik_timer_init,
354 .init_machine = nhk8815_platform_init, 351 .init_machine = nhk8815_platform_init,
355 .restart = cpu8815_restart, 352 .restart = cpu8815_restart,
diff --git a/arch/arm/mach-nomadik/cpu-8815.c b/arch/arm/mach-nomadik/cpu-8815.c
index 1273931303fb..351404673f6c 100644
--- a/arch/arm/mach-nomadik/cpu-8815.c
+++ b/arch/arm/mach-nomadik/cpu-8815.c
@@ -25,13 +25,13 @@
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/irq.h> 26#include <linux/irq.h>
27#include <linux/dma-mapping.h> 27#include <linux/dma-mapping.h>
28#include <linux/irqchip/arm-vic.h>
28#include <linux/platform_data/clk-nomadik.h> 29#include <linux/platform_data/clk-nomadik.h>
29#include <linux/platform_data/pinctrl-nomadik.h> 30#include <linux/platform_data/pinctrl-nomadik.h>
30 31
31#include <mach/hardware.h> 32#include <mach/hardware.h>
32#include <mach/irqs.h> 33#include <mach/irqs.h>
33#include <asm/mach/map.h> 34#include <asm/mach/map.h>
34#include <asm/hardware/vic.h>
35 35
36#include <asm/cacheflush.h> 36#include <asm/cacheflush.h>
37#include <asm/hardware/cache-l2x0.h> 37#include <asm/hardware/cache-l2x0.h>
diff --git a/arch/arm/mach-nomadik/include/mach/irqs.h b/arch/arm/mach-nomadik/include/mach/irqs.h
index b549d0571548..215f8cdb4004 100644
--- a/arch/arm/mach-nomadik/include/mach/irqs.h
+++ b/arch/arm/mach-nomadik/include/mach/irqs.h
@@ -22,49 +22,49 @@
22 22
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24 24
25#define IRQ_VIC_START 1 /* first VIC interrupt is 1 */ 25#define IRQ_VIC_START 32 /* first VIC interrupt is 1 */
26 26
27/* 27/*
28 * Interrupt numbers generic for all Nomadik Chip cuts 28 * Interrupt numbers generic for all Nomadik Chip cuts
29 */ 29 */
30#define IRQ_WATCHDOG 1 30#define IRQ_WATCHDOG (IRQ_VIC_START+0)
31#define IRQ_SOFTINT 2 31#define IRQ_SOFTINT (IRQ_VIC_START+1)
32#define IRQ_CRYPTO 3 32#define IRQ_CRYPTO (IRQ_VIC_START+2)
33#define IRQ_OWM 4 33#define IRQ_OWM (IRQ_VIC_START+3)
34#define IRQ_MTU0 5 34#define IRQ_MTU0 (IRQ_VIC_START+4)
35#define IRQ_MTU1 6 35#define IRQ_MTU1 (IRQ_VIC_START+5)
36#define IRQ_GPIO0 7 36#define IRQ_GPIO0 (IRQ_VIC_START+6)
37#define IRQ_GPIO1 8 37#define IRQ_GPIO1 (IRQ_VIC_START+7)
38#define IRQ_GPIO2 9 38#define IRQ_GPIO2 (IRQ_VIC_START+8)
39#define IRQ_GPIO3 10 39#define IRQ_GPIO3 (IRQ_VIC_START+9)
40#define IRQ_RTC_RTT 11 40#define IRQ_RTC_RTT (IRQ_VIC_START+10)
41#define IRQ_SSP 12 41#define IRQ_SSP (IRQ_VIC_START+11)
42#define IRQ_UART0 13 42#define IRQ_UART0 (IRQ_VIC_START+12)
43#define IRQ_DMA1 14 43#define IRQ_DMA1 (IRQ_VIC_START+13)
44#define IRQ_CLCD_MDIF 15 44#define IRQ_CLCD_MDIF (IRQ_VIC_START+14)
45#define IRQ_DMA0 16 45#define IRQ_DMA0 (IRQ_VIC_START+15)
46#define IRQ_PWRFAIL 17 46#define IRQ_PWRFAIL (IRQ_VIC_START+16)
47#define IRQ_UART1 18 47#define IRQ_UART1 (IRQ_VIC_START+17)
48#define IRQ_FIRDA 19 48#define IRQ_FIRDA (IRQ_VIC_START+18)
49#define IRQ_MSP0 20 49#define IRQ_MSP0 (IRQ_VIC_START+19)
50#define IRQ_I2C0 21 50#define IRQ_I2C0 (IRQ_VIC_START+20)
51#define IRQ_I2C1 22 51#define IRQ_I2C1 (IRQ_VIC_START+21)
52#define IRQ_SDMMC 23 52#define IRQ_SDMMC (IRQ_VIC_START+22)
53#define IRQ_USBOTG 24 53#define IRQ_USBOTG (IRQ_VIC_START+23)
54#define IRQ_SVA_IT0 25 54#define IRQ_SVA_IT0 (IRQ_VIC_START+24)
55#define IRQ_SVA_IT1 26 55#define IRQ_SVA_IT1 (IRQ_VIC_START+25)
56#define IRQ_SAA_IT0 27 56#define IRQ_SAA_IT0 (IRQ_VIC_START+26)
57#define IRQ_SAA_IT1 28 57#define IRQ_SAA_IT1 (IRQ_VIC_START+27)
58#define IRQ_UART2 29 58#define IRQ_UART2 (IRQ_VIC_START+28)
59#define IRQ_MSP2 30 59#define IRQ_MSP2 (IRQ_VIC_START+29)
60#define IRQ_L2CC 49 60#define IRQ_L2CC (IRQ_VIC_START+30)
61#define IRQ_HPI 50 61#define IRQ_HPI (IRQ_VIC_START+31)
62#define IRQ_SKE 51 62#define IRQ_SKE (IRQ_VIC_START+32)
63#define IRQ_KP 52 63#define IRQ_KP (IRQ_VIC_START+33)
64#define IRQ_MEMST 55 64#define IRQ_MEMST (IRQ_VIC_START+34)
65#define IRQ_SGA_IT 59 65#define IRQ_SGA_IT (IRQ_VIC_START+35)
66#define IRQ_USBM 61 66#define IRQ_USBM (IRQ_VIC_START+36)
67#define IRQ_MSP1 63 67#define IRQ_MSP1 (IRQ_VIC_START+37)
68 68
69#define NOMADIK_GPIO_OFFSET (IRQ_VIC_START+64) 69#define NOMADIK_GPIO_OFFSET (IRQ_VIC_START+64)
70 70
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index f0e69cbc5baa..222d58c0ae76 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -4,7 +4,7 @@
4 4
5# Common support 5# Common support
6obj-y := io.o id.o sram-init.o sram.o time.o irq.o mux.o flash.o \ 6obj-y := io.o id.o sram-init.o sram.o time.o irq.o mux.o flash.o \
7 serial.o devices.o dma.o 7 serial.o devices.o dma.o fb.o
8obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o timer.o 8obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o timer.o
9 9
10ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) 10ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),)
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 3d2aa6f30192..2aab761ee68d 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -160,7 +160,7 @@ static struct omap_lcd_config ams_delta_lcd_config __initdata = {
160 .ctrl_name = "internal", 160 .ctrl_name = "internal",
161}; 161};
162 162
163static struct omap_usb_config ams_delta_usb_config = { 163static struct omap_usb_config ams_delta_usb_config __initdata = {
164 .register_host = 1, 164 .register_host = 1,
165 .hmc_mode = 16, 165 .hmc_mode = 16,
166 .pins[0] = 2, 166 .pins[0] = 2,
diff --git a/arch/arm/mach-omap1/fb.c b/arch/arm/mach-omap1/fb.c
new file mode 100644
index 000000000000..c770d45c7226
--- /dev/null
+++ b/arch/arm/mach-omap1/fb.c
@@ -0,0 +1,80 @@
1/*
2 * File: arch/arm/plat-omap/fb.c
3 *
4 * Framebuffer device registration for TI OMAP platforms
5 *
6 * Copyright (C) 2006 Nokia Corporation
7 * Author: Imre Deak <imre.deak@nokia.com>
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 */
23
24#include <linux/module.h>
25#include <linux/kernel.h>
26#include <linux/mm.h>
27#include <linux/init.h>
28#include <linux/platform_device.h>
29#include <linux/memblock.h>
30#include <linux/io.h>
31#include <linux/omapfb.h>
32#include <linux/dma-mapping.h>
33
34#include <asm/mach/map.h>
35
36#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)
37
38static bool omapfb_lcd_configured;
39static struct omapfb_platform_data omapfb_config;
40
41static u64 omap_fb_dma_mask = ~(u32)0;
42
43static struct platform_device omap_fb_device = {
44 .name = "omapfb",
45 .id = -1,
46 .dev = {
47 .dma_mask = &omap_fb_dma_mask,
48 .coherent_dma_mask = DMA_BIT_MASK(32),
49 .platform_data = &omapfb_config,
50 },
51 .num_resources = 0,
52};
53
54void __init omapfb_set_lcd_config(const struct omap_lcd_config *config)
55{
56 omapfb_config.lcd = *config;
57 omapfb_lcd_configured = true;
58}
59
60static int __init omap_init_fb(void)
61{
62 /*
63 * If the board file has not set the lcd config with
64 * omapfb_set_lcd_config(), don't bother registering the omapfb device
65 */
66 if (!omapfb_lcd_configured)
67 return 0;
68
69 return platform_device_register(&omap_fb_device);
70}
71
72arch_initcall(omap_init_fb);
73
74#else
75
76void __init omapfb_set_lcd_config(const struct omap_lcd_config *config)
77{
78}
79
80#endif
diff --git a/arch/arm/mach-omap1/mailbox.c b/arch/arm/mach-omap1/mailbox.c
index e962926b67bc..efc8f207f6fc 100644
--- a/arch/arm/mach-omap1/mailbox.c
+++ b/arch/arm/mach-omap1/mailbox.c
@@ -142,7 +142,7 @@ static struct omap_mbox mbox_dsp_info = {
142 142
143static struct omap_mbox *omap1_mboxes[] = { &mbox_dsp_info, NULL }; 143static struct omap_mbox *omap1_mboxes[] = { &mbox_dsp_info, NULL };
144 144
145static int __devinit omap1_mbox_probe(struct platform_device *pdev) 145static int omap1_mbox_probe(struct platform_device *pdev)
146{ 146{
147 struct resource *mem; 147 struct resource *mem;
148 int ret; 148 int ret;
@@ -165,7 +165,7 @@ static int __devinit omap1_mbox_probe(struct platform_device *pdev)
165 return 0; 165 return 0;
166} 166}
167 167
168static int __devexit omap1_mbox_remove(struct platform_device *pdev) 168static int omap1_mbox_remove(struct platform_device *pdev)
169{ 169{
170 omap_mbox_unregister(); 170 omap_mbox_unregister();
171 iounmap(mbox_base); 171 iounmap(mbox_base);
@@ -174,7 +174,7 @@ static int __devexit omap1_mbox_remove(struct platform_device *pdev)
174 174
175static struct platform_driver omap1_mbox_driver = { 175static struct platform_driver omap1_mbox_driver = {
176 .probe = omap1_mbox_probe, 176 .probe = omap1_mbox_probe,
177 .remove = __devexit_p(omap1_mbox_remove), 177 .remove = omap1_mbox_remove,
178 .driver = { 178 .driver = {
179 .name = "omap-mailbox", 179 .name = "omap-mailbox",
180 }, 180 },
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
index 1d4512fdc9bc..726ec23d29c7 100644
--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -145,7 +145,6 @@ static void omap_mpu_set_mode(enum clock_event_mode mode,
145static struct clock_event_device clockevent_mpu_timer1 = { 145static struct clock_event_device clockevent_mpu_timer1 = {
146 .name = "mpu_timer1", 146 .name = "mpu_timer1",
147 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 147 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
148 .shift = 32,
149 .set_next_event = omap_mpu_set_next_event, 148 .set_next_event = omap_mpu_set_next_event,
150 .set_mode = omap_mpu_set_mode, 149 .set_mode = omap_mpu_set_mode,
151}; 150};
@@ -170,15 +169,9 @@ static __init void omap_init_mpu_timer(unsigned long rate)
170 setup_irq(INT_TIMER1, &omap_mpu_timer1_irq); 169 setup_irq(INT_TIMER1, &omap_mpu_timer1_irq);
171 omap_mpu_timer_start(0, (rate / HZ) - 1, 1); 170 omap_mpu_timer_start(0, (rate / HZ) - 1, 1);
172 171
173 clockevent_mpu_timer1.mult = div_sc(rate, NSEC_PER_SEC,
174 clockevent_mpu_timer1.shift);
175 clockevent_mpu_timer1.max_delta_ns =
176 clockevent_delta2ns(-1, &clockevent_mpu_timer1);
177 clockevent_mpu_timer1.min_delta_ns =
178 clockevent_delta2ns(1, &clockevent_mpu_timer1);
179
180 clockevent_mpu_timer1.cpumask = cpumask_of(0); 172 clockevent_mpu_timer1.cpumask = cpumask_of(0);
181 clockevents_register_device(&clockevent_mpu_timer1); 173 clockevents_config_and_register(&clockevent_mpu_timer1, rate,
174 1, -1);
182} 175}
183 176
184 177
diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c
index 41152fadd4c0..0b74246ba62c 100644
--- a/arch/arm/mach-omap1/timer32k.c
+++ b/arch/arm/mach-omap1/timer32k.c
@@ -140,7 +140,6 @@ static void omap_32k_timer_set_mode(enum clock_event_mode mode,
140static struct clock_event_device clockevent_32k_timer = { 140static struct clock_event_device clockevent_32k_timer = {
141 .name = "32k-timer", 141 .name = "32k-timer",
142 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 142 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
143 .shift = 32,
144 .set_next_event = omap_32k_timer_set_next_event, 143 .set_next_event = omap_32k_timer_set_next_event,
145 .set_mode = omap_32k_timer_set_mode, 144 .set_mode = omap_32k_timer_set_mode,
146}; 145};
@@ -165,16 +164,9 @@ static __init void omap_init_32k_timer(void)
165{ 164{
166 setup_irq(INT_OS_TIMER, &omap_32k_timer_irq); 165 setup_irq(INT_OS_TIMER, &omap_32k_timer_irq);
167 166
168 clockevent_32k_timer.mult = div_sc(OMAP_32K_TICKS_PER_SEC,
169 NSEC_PER_SEC,
170 clockevent_32k_timer.shift);
171 clockevent_32k_timer.max_delta_ns =
172 clockevent_delta2ns(0xfffffffe, &clockevent_32k_timer);
173 clockevent_32k_timer.min_delta_ns =
174 clockevent_delta2ns(1, &clockevent_32k_timer);
175
176 clockevent_32k_timer.cpumask = cpumask_of(0); 167 clockevent_32k_timer.cpumask = cpumask_of(0);
177 clockevents_register_device(&clockevent_32k_timer); 168 clockevents_config_and_register(&clockevent_32k_timer,
169 OMAP_32K_TICKS_PER_SEC, 1, 0xfffffffe);
178} 170}
179 171
180/* 172/*
diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c
index 104fed366b8f..1a1db5971cd9 100644
--- a/arch/arm/mach-omap1/usb.c
+++ b/arch/arm/mach-omap1/usb.c
@@ -629,8 +629,14 @@ static void __init omap_1510_usb_init(struct omap_usb_config *config)
629static inline void omap_1510_usb_init(struct omap_usb_config *config) {} 629static inline void omap_1510_usb_init(struct omap_usb_config *config) {}
630#endif 630#endif
631 631
632void __init omap1_usb_init(struct omap_usb_config *pdata) 632void __init omap1_usb_init(struct omap_usb_config *_pdata)
633{ 633{
634 struct omap_usb_config *pdata;
635
636 pdata = kmemdup(_pdata, sizeof(*pdata), GFP_KERNEL);
637 if (!pdata)
638 return;
639
634 pdata->usb0_init = omap1_usb0_init; 640 pdata->usb0_init = omap1_usb0_init;
635 pdata->usb1_init = omap1_usb1_init; 641 pdata->usb1_init = omap1_usb1_init;
636 pdata->usb2_init = omap1_usb2_init; 642 pdata->usb2_init = omap1_usb2_init;
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index a8004f33b7e2..947cafe65aef 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5# Common support 5# Common support
6obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \ 6obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \
7 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \ 7 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
8 omap_device.o sram.o 8 omap_device.o sram.o
9 9
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index f5d5f5941d7d..f8eeef40efe8 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -26,10 +26,10 @@
26#include <linux/regulator/fixed.h> 26#include <linux/regulator/fixed.h>
27#include <linux/leds.h> 27#include <linux/leds.h>
28#include <linux/leds_pwm.h> 28#include <linux/leds_pwm.h>
29#include <linux/irqchip/arm-gic.h>
29#include <linux/platform_data/omap4-keypad.h> 30#include <linux/platform_data/omap4-keypad.h>
30#include <linux/usb/musb.h> 31#include <linux/usb/musb.h>
31 32
32#include <asm/hardware/gic.h>
33#include <asm/mach-types.h> 33#include <asm/mach-types.h>
34#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
35#include <asm/mach/map.h> 35#include <asm/mach/map.h>
@@ -722,7 +722,6 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
722 .map_io = omap4_map_io, 722 .map_io = omap4_map_io,
723 .init_early = omap4430_init_early, 723 .init_early = omap4430_init_early,
724 .init_irq = gic_init_irq, 724 .init_irq = gic_init_irq,
725 .handle_irq = gic_handle_irq,
726 .init_machine = omap_4430sdp_init, 725 .init_machine = omap_4430sdp_init,
727 .init_late = omap4430_init_late, 726 .init_late = omap4430_init_late,
728 .init_time = omap4_local_timer_init, 727 .init_time = omap4_local_timer_init,
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 8a5f814613c6..2590463e4b57 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -16,7 +16,6 @@
16#include <linux/of_platform.h> 16#include <linux/of_platform.h>
17#include <linux/irqdomain.h> 17#include <linux/irqdomain.h>
18 18
19#include <asm/hardware/gic.h>
20#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
21 20
22#include "common.h" 21#include "common.h"
@@ -156,7 +155,6 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
156 .map_io = omap4_map_io, 155 .map_io = omap4_map_io,
157 .init_early = omap4430_init_early, 156 .init_early = omap4430_init_early,
158 .init_irq = omap_gic_of_init, 157 .init_irq = omap_gic_of_init,
159 .handle_irq = gic_handle_irq,
160 .init_machine = omap_generic_init, 158 .init_machine = omap_generic_init,
161 .init_late = omap4430_init_late, 159 .init_late = omap4430_init_late,
162 .init_time = omap4_local_timer_init, 160 .init_time = omap4_local_timer_init,
@@ -177,7 +175,6 @@ DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)")
177 .map_io = omap5_map_io, 175 .map_io = omap5_map_io,
178 .init_early = omap5_init_early, 176 .init_early = omap5_init_early,
179 .init_irq = omap_gic_of_init, 177 .init_irq = omap_gic_of_init,
180 .handle_irq = gic_handle_irq,
181 .init_machine = omap_generic_init, 178 .init_machine = omap_generic_init,
182 .init_time = omap5_realtime_timer_init, 179 .init_time = omap5_realtime_timer_init,
183 .dt_compat = omap5_boards_compat, 180 .dt_compat = omap5_boards_compat,
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index ed8240c1a9b9..22838fa44a60 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -31,9 +31,9 @@
31#include <linux/ti_wilink_st.h> 31#include <linux/ti_wilink_st.h>
32#include <linux/usb/musb.h> 32#include <linux/usb/musb.h>
33#include <linux/wl12xx.h> 33#include <linux/wl12xx.h>
34#include <linux/irqchip/arm-gic.h>
34#include <linux/platform_data/omap-abe-twl6040.h> 35#include <linux/platform_data/omap-abe-twl6040.h>
35 36
36#include <asm/hardware/gic.h>
37#include <asm/mach-types.h> 37#include <asm/mach-types.h>
38#include <asm/mach/arch.h> 38#include <asm/mach/arch.h>
39#include <asm/mach/map.h> 39#include <asm/mach/map.h>
@@ -453,7 +453,6 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
453 .map_io = omap4_map_io, 453 .map_io = omap4_map_io,
454 .init_early = omap4430_init_early, 454 .init_early = omap4430_init_early,
455 .init_irq = gic_init_irq, 455 .init_irq = gic_init_irq,
456 .handle_irq = gic_handle_irq,
457 .init_machine = omap4_panda_init, 456 .init_machine = omap4_panda_init,
458 .init_late = omap4430_init_late, 457 .init_late = omap4430_init_late,
459 .init_time = omap4_local_timer_init, 458 .init_time = omap4_local_timer_init,
diff --git a/arch/arm/mach-omap2/cclock3xxx_data.c b/arch/arm/mach-omap2/cclock3xxx_data.c
index bdf39481fbd6..6ef87580c33f 100644
--- a/arch/arm/mach-omap2/cclock3xxx_data.c
+++ b/arch/arm/mach-omap2/cclock3xxx_data.c
@@ -1167,6 +1167,8 @@ static const struct clk_ops emu_src_ck_ops = {
1167 .recalc_rate = &omap2_clksel_recalc, 1167 .recalc_rate = &omap2_clksel_recalc,
1168 .get_parent = &omap2_clksel_find_parent_index, 1168 .get_parent = &omap2_clksel_find_parent_index,
1169 .set_parent = &omap2_clksel_set_parent, 1169 .set_parent = &omap2_clksel_set_parent,
1170 .enable = &omap2_clkops_enable_clkdm,
1171 .disable = &omap2_clkops_disable_clkdm,
1170}; 1172};
1171 1173
1172static struct clk emu_src_ck; 1174static struct clk emu_src_ck;
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
index 3d944d3263d2..e6c328128a0a 100644
--- a/arch/arm/mach-omap2/control.h
+++ b/arch/arm/mach-omap2/control.h
@@ -234,7 +234,7 @@
234#define OMAP343X_PADCONF_ETK_D14 OMAP343X_PADCONF_ETK(16) 234#define OMAP343X_PADCONF_ETK_D14 OMAP343X_PADCONF_ETK(16)
235#define OMAP343X_PADCONF_ETK_D15 OMAP343X_PADCONF_ETK(17) 235#define OMAP343X_PADCONF_ETK_D15 OMAP343X_PADCONF_ETK(17)
236 236
237/* 34xx GENERAL_WKUP regist offsets */ 237/* 34xx GENERAL_WKUP register offsets */
238#define OMAP343X_CONTROL_WKUP_DEBOBSMUX(i) (OMAP343X_CONTROL_GENERAL_WKUP + \ 238#define OMAP343X_CONTROL_WKUP_DEBOBSMUX(i) (OMAP343X_CONTROL_GENERAL_WKUP + \
239 0x008 + (i)) 239 0x008 + (i))
240#define OMAP343X_CONTROL_WKUP_DEBOBS0 (OMAP343X_CONTROL_GENERAL_WKUP + 0x008) 240#define OMAP343X_CONTROL_WKUP_DEBOBS0 (OMAP343X_CONTROL_GENERAL_WKUP + 0x008)
diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c
index 2bb18838cba9..0a02aab5df67 100644
--- a/arch/arm/mach-omap2/dpll3xxx.c
+++ b/arch/arm/mach-omap2/dpll3xxx.c
@@ -504,8 +504,7 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate,
504 if (!cpu_is_omap44xx() && !cpu_is_omap3630()) { 504 if (!cpu_is_omap44xx() && !cpu_is_omap3630()) {
505 freqsel = _omap3_dpll_compute_freqsel(clk, 505 freqsel = _omap3_dpll_compute_freqsel(clk,
506 dd->last_rounded_n); 506 dd->last_rounded_n);
507 if (!freqsel) 507 WARN_ON(!freqsel);
508 WARN_ON(1);
509 } 508 }
510 509
511 pr_debug("%s: %s: set rate: locking rate to %lu.\n", 510 pr_debug("%s: %s: set rate: locking rate to %lu.\n",
diff --git a/arch/arm/mach-omap2/drm.c b/arch/arm/mach-omap2/drm.c
index fce5aa3fff49..4c7566c7e24a 100644
--- a/arch/arm/mach-omap2/drm.c
+++ b/arch/arm/mach-omap2/drm.c
@@ -27,7 +27,6 @@
27 27
28#include "omap_device.h" 28#include "omap_device.h"
29#include "omap_hwmod.h" 29#include "omap_hwmod.h"
30#include <plat/cpu.h>
31 30
32#if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE) 31#if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE)
33 32
diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c
index 679a0478644f..4be5cfc81ab8 100644
--- a/arch/arm/mach-omap2/dss-common.c
+++ b/arch/arm/mach-omap2/dss-common.c
@@ -31,8 +31,7 @@
31#include <video/omap-panel-nokia-dsi.h> 31#include <video/omap-panel-nokia-dsi.h>
32#include <video/omap-panel-picodlp.h> 32#include <video/omap-panel-picodlp.h>
33 33
34#include <plat/cpu.h> 34#include "soc.h"
35
36#include "dss-common.h" 35#include "dss-common.h"
37#include "mux.h" 36#include "mux.h"
38 37
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/mach-omap2/fb.c
index a3367b783fc7..d9bd965f6d07 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/mach-omap2/fb.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * File: arch/arm/plat-omap/fb.c
3 *
4 * Framebuffer device registration for TI OMAP platforms 2 * Framebuffer device registration for TI OMAP platforms
5 * 3 *
6 * Copyright (C) 2006 Nokia Corporation 4 * Copyright (C) 2006 Nokia Corporation
@@ -33,7 +31,7 @@
33 31
34#include <asm/mach/map.h> 32#include <asm/mach/map.h>
35 33
36#include <plat/cpu.h> 34#include "soc.h"
37 35
38#ifdef CONFIG_OMAP2_VRFB 36#ifdef CONFIG_OMAP2_VRFB
39 37
@@ -94,45 +92,7 @@ static int __init omap_init_vrfb(void)
94arch_initcall(omap_init_vrfb); 92arch_initcall(omap_init_vrfb);
95#endif 93#endif
96 94
97#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) 95#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
98
99static bool omapfb_lcd_configured;
100static struct omapfb_platform_data omapfb_config;
101
102static u64 omap_fb_dma_mask = ~(u32)0;
103
104static struct platform_device omap_fb_device = {
105 .name = "omapfb",
106 .id = -1,
107 .dev = {
108 .dma_mask = &omap_fb_dma_mask,
109 .coherent_dma_mask = DMA_BIT_MASK(32),
110 .platform_data = &omapfb_config,
111 },
112 .num_resources = 0,
113};
114
115void __init omapfb_set_lcd_config(const struct omap_lcd_config *config)
116{
117 omapfb_config.lcd = *config;
118 omapfb_lcd_configured = true;
119}
120
121static int __init omap_init_fb(void)
122{
123 /*
124 * If the board file has not set the lcd config with
125 * omapfb_set_lcd_config(), don't bother registering the omapfb device
126 */
127 if (!omapfb_lcd_configured)
128 return 0;
129
130 return platform_device_register(&omap_fb_device);
131}
132
133arch_initcall(omap_init_fb);
134
135#elif defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
136 96
137static u64 omap_fb_dma_mask = ~(u32)0; 97static u64 omap_fb_dma_mask = ~(u32)0;
138static struct omapfb_platform_data omapfb_config; 98static struct omapfb_platform_data omapfb_config;
@@ -155,10 +115,4 @@ static int __init omap_init_fb(void)
155 115
156arch_initcall(omap_init_fb); 116arch_initcall(omap_init_fb);
157 117
158#else
159
160void __init omapfb_set_lcd_config(const struct omap_lcd_config *config)
161{
162}
163
164#endif 118#endif
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 65468f6d7f0e..8033cb747c86 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -744,7 +744,7 @@ static int gpmc_setup_irq(void)
744 return request_irq(gpmc_irq, gpmc_handle_irq, 0, "gpmc", NULL); 744 return request_irq(gpmc_irq, gpmc_handle_irq, 0, "gpmc", NULL);
745} 745}
746 746
747static __devexit int gpmc_free_irq(void) 747static int gpmc_free_irq(void)
748{ 748{
749 int i; 749 int i;
750 750
@@ -762,7 +762,7 @@ static __devexit int gpmc_free_irq(void)
762 return 0; 762 return 0;
763} 763}
764 764
765static void __devexit gpmc_mem_exit(void) 765static void gpmc_mem_exit(void)
766{ 766{
767 int cs; 767 int cs;
768 768
@@ -774,7 +774,7 @@ static void __devexit gpmc_mem_exit(void)
774 774
775} 775}
776 776
777static int __devinit gpmc_mem_init(void) 777static int gpmc_mem_init(void)
778{ 778{
779 int cs, rc; 779 int cs, rc;
780 unsigned long boot_rom_space = 0; 780 unsigned long boot_rom_space = 0;
@@ -1121,7 +1121,7 @@ int gpmc_calc_timings(struct gpmc_timings *gpmc_t,
1121 return 0; 1121 return 0;
1122} 1122}
1123 1123
1124static __devinit int gpmc_probe(struct platform_device *pdev) 1124static int gpmc_probe(struct platform_device *pdev)
1125{ 1125{
1126 int rc; 1126 int rc;
1127 u32 l; 1127 u32 l;
@@ -1177,7 +1177,7 @@ static __devinit int gpmc_probe(struct platform_device *pdev)
1177 return 0; 1177 return 0;
1178} 1178}
1179 1179
1180static __devexit int gpmc_remove(struct platform_device *pdev) 1180static int gpmc_remove(struct platform_device *pdev)
1181{ 1181{
1182 gpmc_free_irq(); 1182 gpmc_free_irq();
1183 gpmc_mem_exit(); 1183 gpmc_mem_exit();
@@ -1187,7 +1187,7 @@ static __devexit int gpmc_remove(struct platform_device *pdev)
1187 1187
1188static struct platform_driver gpmc_driver = { 1188static struct platform_driver gpmc_driver = {
1189 .probe = gpmc_probe, 1189 .probe = gpmc_probe,
1190 .remove = __devexit_p(gpmc_remove), 1190 .remove = gpmc_remove,
1191 .driver = { 1191 .driver = {
1192 .name = DEVICE_NAME, 1192 .name = DEVICE_NAME,
1193 .owner = THIS_MODULE, 1193 .owner = THIS_MODULE,
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 0d974565f8ca..0b080267b7f6 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -342,7 +342,7 @@ struct omap_mbox mbox_2_info = {
342struct omap_mbox *omap4_mboxes[] = { &mbox_1_info, &mbox_2_info, NULL }; 342struct omap_mbox *omap4_mboxes[] = { &mbox_1_info, &mbox_2_info, NULL };
343#endif 343#endif
344 344
345static int __devinit omap2_mbox_probe(struct platform_device *pdev) 345static int omap2_mbox_probe(struct platform_device *pdev)
346{ 346{
347 struct resource *mem; 347 struct resource *mem;
348 int ret; 348 int ret;
@@ -395,7 +395,7 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev)
395 return 0; 395 return 0;
396} 396}
397 397
398static int __devexit omap2_mbox_remove(struct platform_device *pdev) 398static int omap2_mbox_remove(struct platform_device *pdev)
399{ 399{
400 omap_mbox_unregister(); 400 omap_mbox_unregister();
401 iounmap(mbox_base); 401 iounmap(mbox_base);
@@ -404,7 +404,7 @@ static int __devexit omap2_mbox_remove(struct platform_device *pdev)
404 404
405static struct platform_driver omap2_mbox_driver = { 405static struct platform_driver omap2_mbox_driver = {
406 .probe = omap2_mbox_probe, 406 .probe = omap2_mbox_probe,
407 .remove = __devexit_p(omap2_mbox_remove), 407 .remove = omap2_mbox_remove,
408 .driver = { 408 .driver = {
409 .name = "omap-mailbox", 409 .name = "omap-mailbox",
410 }, 410 },
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index cd42d921940d..361677983af0 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -19,9 +19,9 @@
19#include <linux/device.h> 19#include <linux/device.h>
20#include <linux/smp.h> 20#include <linux/smp.h>
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/irqchip/arm-gic.h>
22 23
23#include <asm/cacheflush.h> 24#include <asm/cacheflush.h>
24#include <asm/hardware/gic.h>
25#include <asm/smp_scu.h> 25#include <asm/smp_scu.h>
26 26
27#include "omap-secure.h" 27#include "omap-secure.h"
@@ -157,7 +157,7 @@ static int __cpuinit omap4_boot_secondary(unsigned int cpu, struct task_struct *
157 booted = true; 157 booted = true;
158 } 158 }
159 159
160 gic_raise_softirq(cpumask_of(cpu), 0); 160 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
161 161
162 /* 162 /*
163 * Now the secondary core is starting up let it run its 163 * Now the secondary core is starting up let it run its
@@ -231,8 +231,6 @@ static void __init omap4_smp_init_cpus(void)
231 231
232 for (i = 0; i < ncores; i++) 232 for (i = 0; i < ncores; i++)
233 set_cpu_possible(i, true); 233 set_cpu_possible(i, true);
234
235 set_smp_cross_call(gic_raise_softirq);
236} 234}
237 235
238static void __init omap4_smp_prepare_cpus(unsigned int max_cpus) 236static void __init omap4_smp_prepare_cpus(unsigned int max_cpus)
diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c
index 5d3b4f4f81ae..8c5b5e3e3541 100644
--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -24,8 +24,7 @@
24#include <linux/cpu.h> 24#include <linux/cpu.h>
25#include <linux/notifier.h> 25#include <linux/notifier.h>
26#include <linux/cpu_pm.h> 26#include <linux/cpu_pm.h>
27 27#include <linux/irqchip/arm-gic.h>
28#include <asm/hardware/gic.h>
29 28
30#include "omap-wakeupgen.h" 29#include "omap-wakeupgen.h"
31#include "omap-secure.h" 30#include "omap-secure.h"
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 6897ae21bb82..547094883606 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -15,13 +15,14 @@
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/io.h> 16#include <linux/io.h>
17#include <linux/irq.h> 17#include <linux/irq.h>
18#include <linux/irqchip.h>
18#include <linux/platform_device.h> 19#include <linux/platform_device.h>
19#include <linux/memblock.h> 20#include <linux/memblock.h>
20#include <linux/of_irq.h> 21#include <linux/of_irq.h>
21#include <linux/of_platform.h> 22#include <linux/of_platform.h>
22#include <linux/export.h> 23#include <linux/export.h>
24#include <linux/irqchip/arm-gic.h>
23 25
24#include <asm/hardware/gic.h>
25#include <asm/hardware/cache-l2x0.h> 26#include <asm/hardware/cache-l2x0.h>
26#include <asm/mach/map.h> 27#include <asm/mach/map.h>
27#include <asm/memblock.h> 28#include <asm/memblock.h>
@@ -255,16 +256,10 @@ static int __init omap4_sar_ram_init(void)
255} 256}
256early_initcall(omap4_sar_ram_init); 257early_initcall(omap4_sar_ram_init);
257 258
258static struct of_device_id irq_match[] __initdata = {
259 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
260 { .compatible = "arm,cortex-a15-gic", .data = gic_of_init, },
261 { }
262};
263
264void __init omap_gic_of_init(void) 259void __init omap_gic_of_init(void)
265{ 260{
266 omap_wakeupgen_init(); 261 omap_wakeupgen_init();
267 of_irq_init(irq_match); 262 irqchip_init();
268} 263}
269 264
270#if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) 265#if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
index 081c71edddf4..646c14d9fdb9 100644
--- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c
@@ -2070,7 +2070,7 @@ static struct omap_hwmod_irq_info am33xx_usbss_mpu_irqs[] = {
2070 { .name = "usbss-irq", .irq = 17 + OMAP_INTC_START, }, 2070 { .name = "usbss-irq", .irq = 17 + OMAP_INTC_START, },
2071 { .name = "musb0-irq", .irq = 18 + OMAP_INTC_START, }, 2071 { .name = "musb0-irq", .irq = 18 + OMAP_INTC_START, },
2072 { .name = "musb1-irq", .irq = 19 + OMAP_INTC_START, }, 2072 { .name = "musb1-irq", .irq = 19 + OMAP_INTC_START, },
2073 { .irq = -1 + OMAP_INTC_START, }, 2073 { .irq = -1, },
2074}; 2074};
2075 2075
2076static struct omap_hwmod am33xx_usbss_hwmod = { 2076static struct omap_hwmod am33xx_usbss_hwmod = {
@@ -2515,7 +2515,7 @@ static struct omap_hwmod_ocp_if am33xx_l4_hs__cpgmac0 = {
2515 .user = OCP_USER_MPU, 2515 .user = OCP_USER_MPU,
2516}; 2516};
2517 2517
2518struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = { 2518static struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = {
2519 { 2519 {
2520 .pa_start = 0x4A101000, 2520 .pa_start = 0x4A101000,
2521 .pa_end = 0x4A101000 + SZ_256 - 1, 2521 .pa_end = 0x4A101000 + SZ_256 - 1,
@@ -2523,7 +2523,7 @@ struct omap_hwmod_addr_space am33xx_mdio_addr_space[] = {
2523 { } 2523 { }
2524}; 2524};
2525 2525
2526struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = { 2526static struct omap_hwmod_ocp_if am33xx_cpgmac0__mdio = {
2527 .master = &am33xx_cpgmac0_hwmod, 2527 .master = &am33xx_cpgmac0_hwmod,
2528 .slave = &am33xx_mdio_hwmod, 2528 .slave = &am33xx_mdio_hwmod,
2529 .addr = am33xx_mdio_addr_space, 2529 .addr = am33xx_mdio_addr_space,
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index f9fab942d5ba..129d5081ed15 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -26,7 +26,6 @@
26 26
27#include <linux/omap-dma.h> 27#include <linux/omap-dma.h>
28 28
29#include <linux/platform_data/omap_ocp2scp.h>
30#include <linux/platform_data/spi-omap2-mcspi.h> 29#include <linux/platform_data/spi-omap2-mcspi.h>
31#include <linux/platform_data/asoc-ti-mcbsp.h> 30#include <linux/platform_data/asoc-ti-mcbsp.h>
32#include <linux/platform_data/iommu-omap.h> 31#include <linux/platform_data/iommu-omap.h>
diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c
index fefd40166624..615e5b1fb025 100644
--- a/arch/arm/mach-omap2/omap_twl.c
+++ b/arch/arm/mach-omap2/omap_twl.c
@@ -292,8 +292,8 @@ int __init omap3_twl_set_sr_bit(bool enable)
292 if (twl_sr_enable_autoinit) 292 if (twl_sr_enable_autoinit)
293 pr_warning("%s: unexpected multiple calls\n", __func__); 293 pr_warning("%s: unexpected multiple calls\n", __func__);
294 294
295 ret = twl_i2c_read_u8(TWL4030_MODULE_PM_RECEIVER, &temp, 295 ret = twl_i2c_read_u8(TWL_MODULE_PM_RECEIVER, &temp,
296 TWL4030_DCDC_GLOBAL_CFG); 296 TWL4030_DCDC_GLOBAL_CFG);
297 if (ret) 297 if (ret)
298 goto err; 298 goto err;
299 299
@@ -302,8 +302,8 @@ int __init omap3_twl_set_sr_bit(bool enable)
302 else 302 else
303 temp &= ~SMARTREFLEX_ENABLE; 303 temp &= ~SMARTREFLEX_ENABLE;
304 304
305 ret = twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, temp, 305 ret = twl_i2c_write_u8(TWL_MODULE_PM_RECEIVER, temp,
306 TWL4030_DCDC_GLOBAL_CFG); 306 TWL4030_DCDC_GLOBAL_CFG);
307 if (!ret) { 307 if (!ret) {
308 twl_sr_enable_autoinit = true; 308 twl_sr_enable_autoinit = true;
309 return 0; 309 return 0;
diff --git a/arch/arm/mach-omap2/pmu.c b/arch/arm/mach-omap2/pmu.c
index 250d909e38bd..eb78ae7a3464 100644
--- a/arch/arm/mach-omap2/pmu.c
+++ b/arch/arm/mach-omap2/pmu.c
@@ -11,8 +11,6 @@
11 * the Free Software Foundation; either version 2 of the License, or 11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version. 12 * (at your option) any later version.
13 */ 13 */
14#include <linux/pm_runtime.h>
15
16#include <asm/pmu.h> 14#include <asm/pmu.h>
17 15
18#include "soc.h" 16#include "soc.h"
diff --git a/arch/arm/mach-omap2/prm2xxx.c b/arch/arm/mach-omap2/prm2xxx.c
index faeab18696df..418de9c3b319 100644
--- a/arch/arm/mach-omap2/prm2xxx.c
+++ b/arch/arm/mach-omap2/prm2xxx.c
@@ -18,9 +18,8 @@
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/irq.h> 19#include <linux/irq.h>
20 20
21#include "soc.h"
21#include "common.h" 22#include "common.h"
22#include <plat/cpu.h>
23
24#include "vp.h" 23#include "vp.h"
25#include "powerdomain.h" 24#include "powerdomain.h"
26#include "clockdomain.h" 25#include "clockdomain.h"
@@ -29,6 +28,14 @@
29#include "prm-regbits-24xx.h" 28#include "prm-regbits-24xx.h"
30 29
31/* 30/*
31 * OMAP24xx PM_PWSTCTRL_*.POWERSTATE and PM_PWSTST_*.LASTSTATEENTERED bits -
32 * these are reversed from the bits used on OMAP3+
33 */
34#define OMAP24XX_PWRDM_POWER_ON 0x0
35#define OMAP24XX_PWRDM_POWER_RET 0x1
36#define OMAP24XX_PWRDM_POWER_OFF 0x3
37
38/*
32 * omap2xxx_prm_reset_src_map - map from bits in the PRM_RSTST_WKUP 39 * omap2xxx_prm_reset_src_map - map from bits in the PRM_RSTST_WKUP
33 * hardware register (which are specific to the OMAP2xxx SoCs) to 40 * hardware register (which are specific to the OMAP2xxx SoCs) to
34 * reset source ID bit shifts (which is an OMAP SoC-independent 41 * reset source ID bit shifts (which is an OMAP SoC-independent
@@ -69,6 +76,34 @@ static u32 omap2xxx_prm_read_reset_sources(void)
69} 76}
70 77
71/** 78/**
79 * omap2xxx_pwrst_to_common_pwrst - convert OMAP2xxx pwrst to common pwrst
80 * @omap2xxx_pwrst: OMAP2xxx hardware power state to convert
81 *
82 * Return the common power state bits corresponding to the OMAP2xxx
83 * hardware power state bits @omap2xxx_pwrst, or -EINVAL upon error.
84 */
85static int omap2xxx_pwrst_to_common_pwrst(u8 omap2xxx_pwrst)
86{
87 u8 pwrst;
88
89 switch (omap2xxx_pwrst) {
90 case OMAP24XX_PWRDM_POWER_OFF:
91 pwrst = PWRDM_POWER_OFF;
92 break;
93 case OMAP24XX_PWRDM_POWER_RET:
94 pwrst = PWRDM_POWER_RET;
95 break;
96 case OMAP24XX_PWRDM_POWER_ON:
97 pwrst = PWRDM_POWER_ON;
98 break;
99 default:
100 return -EINVAL;
101 }
102
103 return pwrst;
104}
105
106/**
72 * omap2xxx_prm_dpll_reset - use DPLL reset to reboot the OMAP SoC 107 * omap2xxx_prm_dpll_reset - use DPLL reset to reboot the OMAP SoC
73 * 108 *
74 * Set the DPLL reset bit, which should reboot the SoC. This is the 109 * Set the DPLL reset bit, which should reboot the SoC. This is the
@@ -98,10 +133,56 @@ int omap2xxx_clkdm_wakeup(struct clockdomain *clkdm)
98 return 0; 133 return 0;
99} 134}
100 135
136static int omap2xxx_pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst)
137{
138 u8 omap24xx_pwrst;
139
140 switch (pwrst) {
141 case PWRDM_POWER_OFF:
142 omap24xx_pwrst = OMAP24XX_PWRDM_POWER_OFF;
143 break;
144 case PWRDM_POWER_RET:
145 omap24xx_pwrst = OMAP24XX_PWRDM_POWER_RET;
146 break;
147 case PWRDM_POWER_ON:
148 omap24xx_pwrst = OMAP24XX_PWRDM_POWER_ON;
149 break;
150 default:
151 return -EINVAL;
152 }
153
154 omap2_prm_rmw_mod_reg_bits(OMAP_POWERSTATE_MASK,
155 (omap24xx_pwrst << OMAP_POWERSTATE_SHIFT),
156 pwrdm->prcm_offs, OMAP2_PM_PWSTCTRL);
157 return 0;
158}
159
160static int omap2xxx_pwrdm_read_next_pwrst(struct powerdomain *pwrdm)
161{
162 u8 omap2xxx_pwrst;
163
164 omap2xxx_pwrst = omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs,
165 OMAP2_PM_PWSTCTRL,
166 OMAP_POWERSTATE_MASK);
167
168 return omap2xxx_pwrst_to_common_pwrst(omap2xxx_pwrst);
169}
170
171static int omap2xxx_pwrdm_read_pwrst(struct powerdomain *pwrdm)
172{
173 u8 omap2xxx_pwrst;
174
175 omap2xxx_pwrst = omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs,
176 OMAP2_PM_PWSTST,
177 OMAP_POWERSTATEST_MASK);
178
179 return omap2xxx_pwrst_to_common_pwrst(omap2xxx_pwrst);
180}
181
101struct pwrdm_ops omap2_pwrdm_operations = { 182struct pwrdm_ops omap2_pwrdm_operations = {
102 .pwrdm_set_next_pwrst = omap2_pwrdm_set_next_pwrst, 183 .pwrdm_set_next_pwrst = omap2xxx_pwrdm_set_next_pwrst,
103 .pwrdm_read_next_pwrst = omap2_pwrdm_read_next_pwrst, 184 .pwrdm_read_next_pwrst = omap2xxx_pwrdm_read_next_pwrst,
104 .pwrdm_read_pwrst = omap2_pwrdm_read_pwrst, 185 .pwrdm_read_pwrst = omap2xxx_pwrdm_read_pwrst,
105 .pwrdm_set_logic_retst = omap2_pwrdm_set_logic_retst, 186 .pwrdm_set_logic_retst = omap2_pwrdm_set_logic_retst,
106 .pwrdm_set_mem_onst = omap2_pwrdm_set_mem_onst, 187 .pwrdm_set_mem_onst = omap2_pwrdm_set_mem_onst,
107 .pwrdm_set_mem_retst = omap2_pwrdm_set_mem_retst, 188 .pwrdm_set_mem_retst = omap2_pwrdm_set_mem_retst,
diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.c b/arch/arm/mach-omap2/prm2xxx_3xxx.c
index 30517f5af707..a3e121f94a86 100644
--- a/arch/arm/mach-omap2/prm2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/prm2xxx_3xxx.c
@@ -103,28 +103,6 @@ int omap2_prm_deassert_hardreset(s16 prm_mod, u8 rst_shift, u8 st_shift)
103/* Powerdomain low-level functions */ 103/* Powerdomain low-level functions */
104 104
105/* Common functions across OMAP2 and OMAP3 */ 105/* Common functions across OMAP2 and OMAP3 */
106int omap2_pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst)
107{
108 omap2_prm_rmw_mod_reg_bits(OMAP_POWERSTATE_MASK,
109 (pwrst << OMAP_POWERSTATE_SHIFT),
110 pwrdm->prcm_offs, OMAP2_PM_PWSTCTRL);
111 return 0;
112}
113
114int omap2_pwrdm_read_next_pwrst(struct powerdomain *pwrdm)
115{
116 return omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs,
117 OMAP2_PM_PWSTCTRL,
118 OMAP_POWERSTATE_MASK);
119}
120
121int omap2_pwrdm_read_pwrst(struct powerdomain *pwrdm)
122{
123 return omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs,
124 OMAP2_PM_PWSTST,
125 OMAP_POWERSTATEST_MASK);
126}
127
128int omap2_pwrdm_set_mem_onst(struct powerdomain *pwrdm, u8 bank, 106int omap2_pwrdm_set_mem_onst(struct powerdomain *pwrdm, u8 bank,
129 u8 pwrst) 107 u8 pwrst)
130{ 108{
diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c
index db198d058584..e648bd55b072 100644
--- a/arch/arm/mach-omap2/prm3xxx.c
+++ b/arch/arm/mach-omap2/prm3xxx.c
@@ -18,9 +18,8 @@
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/irq.h> 19#include <linux/irq.h>
20 20
21#include "soc.h"
21#include "common.h" 22#include "common.h"
22#include <plat/cpu.h>
23
24#include "vp.h" 23#include "vp.h"
25#include "powerdomain.h" 24#include "powerdomain.h"
26#include "prm3xxx.h" 25#include "prm3xxx.h"
@@ -278,6 +277,28 @@ static u32 omap3xxx_prm_read_reset_sources(void)
278 277
279/* Powerdomain low-level functions */ 278/* Powerdomain low-level functions */
280 279
280static int omap3_pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst)
281{
282 omap2_prm_rmw_mod_reg_bits(OMAP_POWERSTATE_MASK,
283 (pwrst << OMAP_POWERSTATE_SHIFT),
284 pwrdm->prcm_offs, OMAP2_PM_PWSTCTRL);
285 return 0;
286}
287
288static int omap3_pwrdm_read_next_pwrst(struct powerdomain *pwrdm)
289{
290 return omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs,
291 OMAP2_PM_PWSTCTRL,
292 OMAP_POWERSTATE_MASK);
293}
294
295static int omap3_pwrdm_read_pwrst(struct powerdomain *pwrdm)
296{
297 return omap2_prm_read_mod_bits_shift(pwrdm->prcm_offs,
298 OMAP2_PM_PWSTST,
299 OMAP_POWERSTATEST_MASK);
300}
301
281/* Applicable only for OMAP3. Not supported on OMAP2 */ 302/* Applicable only for OMAP3. Not supported on OMAP2 */
282static int omap3_pwrdm_read_prev_pwrst(struct powerdomain *pwrdm) 303static int omap3_pwrdm_read_prev_pwrst(struct powerdomain *pwrdm)
283{ 304{
@@ -356,9 +377,9 @@ static int omap3_pwrdm_disable_hdwr_sar(struct powerdomain *pwrdm)
356} 377}
357 378
358struct pwrdm_ops omap3_pwrdm_operations = { 379struct pwrdm_ops omap3_pwrdm_operations = {
359 .pwrdm_set_next_pwrst = omap2_pwrdm_set_next_pwrst, 380 .pwrdm_set_next_pwrst = omap3_pwrdm_set_next_pwrst,
360 .pwrdm_read_next_pwrst = omap2_pwrdm_read_next_pwrst, 381 .pwrdm_read_next_pwrst = omap3_pwrdm_read_next_pwrst,
361 .pwrdm_read_pwrst = omap2_pwrdm_read_pwrst, 382 .pwrdm_read_pwrst = omap3_pwrdm_read_pwrst,
362 .pwrdm_read_prev_pwrst = omap3_pwrdm_read_prev_pwrst, 383 .pwrdm_read_prev_pwrst = omap3_pwrdm_read_prev_pwrst,
363 .pwrdm_set_logic_retst = omap2_pwrdm_set_logic_retst, 384 .pwrdm_set_logic_retst = omap2_pwrdm_set_logic_retst,
364 .pwrdm_read_logic_pwrst = omap3_pwrdm_read_logic_pwrst, 385 .pwrdm_read_logic_pwrst = omap3_pwrdm_read_logic_pwrst,
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index 7498bc77fe8b..c05a343d465d 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -56,9 +56,9 @@ static struct omap_prcm_irq_setup omap4_prcm_irq_setup = {
56 * enumeration) 56 * enumeration)
57 */ 57 */
58static struct prm_reset_src_map omap44xx_prm_reset_src_map[] = { 58static struct prm_reset_src_map omap44xx_prm_reset_src_map[] = {
59 { OMAP4430_RST_GLOBAL_WARM_SW_SHIFT, 59 { OMAP4430_GLOBAL_WARM_SW_RST_SHIFT,
60 OMAP_GLOBAL_WARM_RST_SRC_ID_SHIFT }, 60 OMAP_GLOBAL_WARM_RST_SRC_ID_SHIFT },
61 { OMAP4430_RST_GLOBAL_COLD_SW_SHIFT, 61 { OMAP4430_GLOBAL_COLD_RST_SHIFT,
62 OMAP_GLOBAL_COLD_RST_SRC_ID_SHIFT }, 62 OMAP_GLOBAL_COLD_RST_SRC_ID_SHIFT },
63 { OMAP4430_MPU_SECURITY_VIOL_RST_SHIFT, 63 { OMAP4430_MPU_SECURITY_VIOL_RST_SHIFT,
64 OMAP_SECU_VIOL_RST_SRC_ID_SHIFT }, 64 OMAP_SECU_VIOL_RST_SRC_ID_SHIFT },
@@ -333,7 +333,7 @@ static u32 omap44xx_prm_read_reset_sources(void)
333 u32 r = 0; 333 u32 r = 0;
334 u32 v; 334 u32 v;
335 335
336 v = omap4_prm_read_inst_reg(OMAP4430_PRM_OCP_SOCKET_INST, 336 v = omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST,
337 OMAP4_RM_RSTST); 337 OMAP4_RM_RSTST);
338 338
339 p = omap44xx_prm_reset_src_map; 339 p = omap44xx_prm_reset_src_map;
diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h
index 22b0979206ca..8ee1fbdec561 100644
--- a/arch/arm/mach-omap2/prm44xx.h
+++ b/arch/arm/mach-omap2/prm44xx.h
@@ -62,8 +62,8 @@
62 62
63/* OMAP4 specific register offsets */ 63/* OMAP4 specific register offsets */
64#define OMAP4_RM_RSTCTRL 0x0000 64#define OMAP4_RM_RSTCTRL 0x0000
65#define OMAP4_RM_RSTTIME 0x0004 65#define OMAP4_RM_RSTST 0x0004
66#define OMAP4_RM_RSTST 0x0008 66#define OMAP4_RM_RSTTIME 0x0008
67#define OMAP4_PM_PWSTCTRL 0x0000 67#define OMAP4_PM_PWSTCTRL 0x0000
68#define OMAP4_PM_PWSTST 0x0004 68#define OMAP4_PM_PWSTST 0x0004
69 69
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 5975a42e16d4..57b1ee39fe56 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -131,7 +131,6 @@ static void omap2_gp_timer_set_mode(enum clock_event_mode mode,
131static struct clock_event_device clockevent_gpt = { 131static struct clock_event_device clockevent_gpt = {
132 .name = "gp_timer", 132 .name = "gp_timer",
133 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 133 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
134 .shift = 32,
135 .rating = 300, 134 .rating = 300,
136 .set_next_event = omap2_gp_timer_set_next_event, 135 .set_next_event = omap2_gp_timer_set_next_event,
137 .set_mode = omap2_gp_timer_set_mode, 136 .set_mode = omap2_gp_timer_set_mode,
@@ -340,17 +339,11 @@ static void __init omap2_gp_clockevent_init(int gptimer_id,
340 339
341 __omap_dm_timer_int_enable(&clkev, OMAP_TIMER_INT_OVERFLOW); 340 __omap_dm_timer_int_enable(&clkev, OMAP_TIMER_INT_OVERFLOW);
342 341
343 clockevent_gpt.mult = div_sc(clkev.rate, NSEC_PER_SEC,
344 clockevent_gpt.shift);
345 clockevent_gpt.max_delta_ns =
346 clockevent_delta2ns(0xffffffff, &clockevent_gpt);
347 clockevent_gpt.min_delta_ns =
348 clockevent_delta2ns(3, &clockevent_gpt);
349 /* Timer internal resynch latency. */
350
351 clockevent_gpt.cpumask = cpu_possible_mask; 342 clockevent_gpt.cpumask = cpu_possible_mask;
352 clockevent_gpt.irq = omap_dm_timer_get_irq(&clkev); 343 clockevent_gpt.irq = omap_dm_timer_get_irq(&clkev);
353 clockevents_register_device(&clockevent_gpt); 344 clockevents_config_and_register(&clockevent_gpt, clkev.rate,
345 3, /* Timer internal resynch latency */
346 0xffffffff);
354 347
355 pr_info("OMAP clockevent source: GPTIMER%d at %lu Hz\n", 348 pr_info("OMAP clockevent source: GPTIMER%d at %lu Hz\n",
356 gptimer_id, clkev.rate); 349 gptimer_id, clkev.rate);
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c
index cd50e328db2a..d9c7c3bf0d9c 100644
--- a/arch/arm/mach-orion5x/pci.c
+++ b/arch/arm/mach-orion5x/pci.c
@@ -506,7 +506,7 @@ static int __init pci_setup(struct pci_sys_data *sys)
506/***************************************************************************** 506/*****************************************************************************
507 * General PCIe + PCI 507 * General PCIe + PCI
508 ****************************************************************************/ 508 ****************************************************************************/
509static void __devinit rc_pci_fixup(struct pci_dev *dev) 509static void rc_pci_fixup(struct pci_dev *dev)
510{ 510{
511 /* 511 /*
512 * Prevent enumeration of root complex. 512 * Prevent enumeration of root complex.
diff --git a/arch/arm/mach-picoxcell/common.c b/arch/arm/mach-picoxcell/common.c
index 518c59bdbcda..70b441ad1d18 100644
--- a/arch/arm/mach-picoxcell/common.c
+++ b/arch/arm/mach-picoxcell/common.c
@@ -9,6 +9,7 @@
9 */ 9 */
10#include <linux/delay.h> 10#include <linux/delay.h>
11#include <linux/irq.h> 11#include <linux/irq.h>
12#include <linux/irqchip.h>
12#include <linux/irqdomain.h> 13#include <linux/irqdomain.h>
13#include <linux/of.h> 14#include <linux/of.h>
14#include <linux/of_address.h> 15#include <linux/of_address.h>
@@ -17,7 +18,6 @@
17#include <linux/dw_apb_timer.h> 18#include <linux/dw_apb_timer.h>
18 19
19#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
20#include <asm/hardware/vic.h>
21#include <asm/mach/map.h> 21#include <asm/mach/map.h>
22 22
23#include "common.h" 23#include "common.h"
@@ -70,16 +70,6 @@ static const char *picoxcell_dt_match[] = {
70 NULL 70 NULL
71}; 71};
72 72
73static const struct of_device_id vic_of_match[] __initconst = {
74 { .compatible = "arm,pl192-vic", .data = vic_of_init, },
75 { /* Sentinel */ }
76};
77
78static void __init picoxcell_init_irq(void)
79{
80 of_irq_init(vic_of_match);
81}
82
83static void picoxcell_wdt_restart(char mode, const char *cmd) 73static void picoxcell_wdt_restart(char mode, const char *cmd)
84{ 74{
85 /* 75 /*
@@ -97,8 +87,7 @@ static void picoxcell_wdt_restart(char mode, const char *cmd)
97DT_MACHINE_START(PICOXCELL, "Picochip picoXcell") 87DT_MACHINE_START(PICOXCELL, "Picochip picoXcell")
98 .map_io = picoxcell_map_io, 88 .map_io = picoxcell_map_io,
99 .nr_irqs = NR_IRQS_LEGACY, 89 .nr_irqs = NR_IRQS_LEGACY,
100 .init_irq = picoxcell_init_irq, 90 .init_irq = irqchip_init,
101 .handle_irq = vic_handle_irq,
102 .init_time = dw_apb_timer_init, 91 .init_time = dw_apb_timer_init,
103 .init_machine = picoxcell_init_machine, 92 .init_machine = picoxcell_init_machine,
104 .dt_compat = picoxcell_dt_match, 93 .dt_compat = picoxcell_dt_match,
diff --git a/arch/arm/mach-prima2/pm.c b/arch/arm/mach-prima2/pm.c
index fb5a7910af35..9936c180bf01 100644
--- a/arch/arm/mach-prima2/pm.c
+++ b/arch/arm/mach-prima2/pm.c
@@ -123,7 +123,7 @@ static const struct of_device_id memc_ids[] = {
123 {} 123 {}
124}; 124};
125 125
126static int __devinit sirfsoc_memc_probe(struct platform_device *op) 126static int sirfsoc_memc_probe(struct platform_device *op)
127{ 127{
128 struct device_node *np = op->dev.of_node; 128 struct device_node *np = op->dev.of_node;
129 129
diff --git a/arch/arm/mach-prima2/rtciobrg.c b/arch/arm/mach-prima2/rtciobrg.c
index fc6c4ab963f2..9f2da2eec4dc 100644
--- a/arch/arm/mach-prima2/rtciobrg.c
+++ b/arch/arm/mach-prima2/rtciobrg.c
@@ -108,7 +108,7 @@ static const struct of_device_id rtciobrg_ids[] = {
108 {} 108 {}
109}; 109};
110 110
111static int __devinit sirfsoc_rtciobrg_probe(struct platform_device *op) 111static int sirfsoc_rtciobrg_probe(struct platform_device *op)
112{ 112{
113 struct device_node *np = op->dev.of_node; 113 struct device_node *np = op->dev.of_node;
114 114
diff --git a/arch/arm/mach-prima2/timer-prima2.c b/arch/arm/mach-prima2/timer-prima2.c
index 309e724735b7..6da584f8a949 100644
--- a/arch/arm/mach-prima2/timer-prima2.c
+++ b/arch/arm/mach-prima2/timer-prima2.c
@@ -175,15 +175,9 @@ static u32 notrace sirfsoc_read_sched_clock(void)
175 175
176static void __init sirfsoc_clockevent_init(void) 176static void __init sirfsoc_clockevent_init(void)
177{ 177{
178 clockevents_calc_mult_shift(&sirfsoc_clockevent, CLOCK_TICK_RATE, 60);
179
180 sirfsoc_clockevent.max_delta_ns =
181 clockevent_delta2ns(-2, &sirfsoc_clockevent);
182 sirfsoc_clockevent.min_delta_ns =
183 clockevent_delta2ns(2, &sirfsoc_clockevent);
184
185 sirfsoc_clockevent.cpumask = cpumask_of(0); 178 sirfsoc_clockevent.cpumask = cpumask_of(0);
186 clockevents_register_device(&sirfsoc_clockevent); 179 clockevents_config_and_register(&sirfsoc_clockevent, CLOCK_TICK_RATE,
180 2, -2);
187} 181}
188 182
189/* initialize the kernel jiffy timer source */ 183/* initialize the kernel jiffy timer source */
diff --git a/arch/arm/mach-pxa/corgi_pm.c b/arch/arm/mach-pxa/corgi_pm.c
index 048c4299473c..7a39efc50865 100644
--- a/arch/arm/mach-pxa/corgi_pm.c
+++ b/arch/arm/mach-pxa/corgi_pm.c
@@ -198,7 +198,7 @@ static struct sharpsl_charger_machinfo corgi_pm_machinfo = {
198 198
199static struct platform_device *corgipm_device; 199static struct platform_device *corgipm_device;
200 200
201static int __devinit corgipm_init(void) 201static int corgipm_init(void)
202{ 202{
203 int ret; 203 int ret;
204 204
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c
index ec55c575ed19..0a36d3585f26 100644
--- a/arch/arm/mach-pxa/sharpsl_pm.c
+++ b/arch/arm/mach-pxa/sharpsl_pm.c
@@ -829,7 +829,7 @@ static const struct platform_suspend_ops sharpsl_pm_ops = {
829}; 829};
830#endif 830#endif
831 831
832static int __devinit sharpsl_pm_probe(struct platform_device *pdev) 832static int sharpsl_pm_probe(struct platform_device *pdev)
833{ 833{
834 int ret, irq; 834 int ret, irq;
835 835
@@ -941,7 +941,7 @@ static struct platform_driver sharpsl_pm_driver = {
941 }, 941 },
942}; 942};
943 943
944static int __devinit sharpsl_pm_init(void) 944static int sharpsl_pm_init(void)
945{ 945{
946 return platform_driver_register(&sharpsl_pm_driver); 946 return platform_driver_register(&sharpsl_pm_driver);
947} 947}
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c
index 842596d4d31e..e191f9996b26 100644
--- a/arch/arm/mach-pxa/spitz_pm.c
+++ b/arch/arm/mach-pxa/spitz_pm.c
@@ -232,7 +232,7 @@ struct sharpsl_charger_machinfo spitz_pm_machinfo = {
232 232
233static struct platform_device *spitzpm_device; 233static struct platform_device *spitzpm_device;
234 234
235static int __devinit spitzpm_init(void) 235static int spitzpm_init(void)
236{ 236{
237 int ret; 237 int ret;
238 238
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index bea19a06b2bf..8f1ee92aea30 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -151,16 +151,12 @@ void __init pxa_timer_init(void)
151 151
152 setup_sched_clock(pxa_read_sched_clock, 32, clock_tick_rate); 152 setup_sched_clock(pxa_read_sched_clock, 32, clock_tick_rate);
153 153
154 clockevents_calc_mult_shift(&ckevt_pxa_osmr0, clock_tick_rate, 4);
155 ckevt_pxa_osmr0.max_delta_ns =
156 clockevent_delta2ns(0x7fffffff, &ckevt_pxa_osmr0);
157 ckevt_pxa_osmr0.min_delta_ns =
158 clockevent_delta2ns(MIN_OSCR_DELTA * 2, &ckevt_pxa_osmr0) + 1;
159 ckevt_pxa_osmr0.cpumask = cpumask_of(0); 154 ckevt_pxa_osmr0.cpumask = cpumask_of(0);
160 155
161 setup_irq(IRQ_OST0, &pxa_ost0_irq); 156 setup_irq(IRQ_OST0, &pxa_ost0_irq);
162 157
163 clocksource_mmio_init(OSCR, "oscr0", clock_tick_rate, 200, 32, 158 clocksource_mmio_init(OSCR, "oscr0", clock_tick_rate, 200, 32,
164 clocksource_mmio_readl_up); 159 clocksource_mmio_readl_up);
165 clockevents_register_device(&ckevt_pxa_osmr0); 160 clockevents_config_and_register(&ckevt_pxa_osmr0, clock_tick_rate,
161 MIN_OSCR_DELTA * 2, 0x7fffffff);
166} 162}
diff --git a/arch/arm/mach-pxa/tosa-bt.c b/arch/arm/mach-pxa/tosa-bt.c
index b9b1e5c2b290..fc3646c2c694 100644
--- a/arch/arm/mach-pxa/tosa-bt.c
+++ b/arch/arm/mach-pxa/tosa-bt.c
@@ -102,7 +102,7 @@ err_reset:
102 return rc; 102 return rc;
103} 103}
104 104
105static int __devexit tosa_bt_remove(struct platform_device *dev) 105static int tosa_bt_remove(struct platform_device *dev)
106{ 106{
107 struct tosa_bt_data *data = dev->dev.platform_data; 107 struct tosa_bt_data *data = dev->dev.platform_data;
108 struct rfkill *rfk = platform_get_drvdata(dev); 108 struct rfkill *rfk = platform_get_drvdata(dev);
@@ -125,7 +125,7 @@ static int __devexit tosa_bt_remove(struct platform_device *dev)
125 125
126static struct platform_driver tosa_bt_driver = { 126static struct platform_driver tosa_bt_driver = {
127 .probe = tosa_bt_probe, 127 .probe = tosa_bt_probe,
128 .remove = __devexit_p(tosa_bt_remove), 128 .remove = tosa_bt_remove,
129 129
130 .driver = { 130 .driver = {
131 .name = "tosa-bt", 131 .name = "tosa-bt",
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index 682467480588..1d5ee5c9a1dc 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -42,7 +42,6 @@
42#include <asm/mach/irq.h> 42#include <asm/mach/irq.h>
43#include <asm/mach/map.h> 43#include <asm/mach/map.h>
44 44
45#include <asm/hardware/gic.h>
46 45
47#include <mach/platform.h> 46#include <mach/platform.h>
48#include <mach/irqs.h> 47#include <mach/irqs.h>
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c
index 300f7064465d..98e3052b7933 100644
--- a/arch/arm/mach-realview/platsmp.c
+++ b/arch/arm/mach-realview/platsmp.c
@@ -14,7 +14,6 @@
14#include <linux/io.h> 14#include <linux/io.h>
15 15
16#include <mach/hardware.h> 16#include <mach/hardware.h>
17#include <asm/hardware/gic.h>
18#include <asm/mach-types.h> 17#include <asm/mach-types.h>
19#include <asm/smp_scu.h> 18#include <asm/smp_scu.h>
20 19
@@ -59,8 +58,6 @@ static void __init realview_smp_init_cpus(void)
59 58
60 for (i = 0; i < ncores; i++) 59 for (i = 0; i < ncores; i++)
61 set_cpu_possible(i, true); 60 set_cpu_possible(i, true);
62
63 set_smp_cross_call(gic_raise_softirq);
64} 61}
65 62
66static void __init realview_smp_prepare_cpus(unsigned int max_cpus) 63static void __init realview_smp_prepare_cpus(unsigned int max_cpus)
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index f892862fd6ae..5b1c8bfe6fa9 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -27,13 +27,13 @@
27#include <linux/amba/mmci.h> 27#include <linux/amba/mmci.h>
28#include <linux/amba/pl022.h> 28#include <linux/amba/pl022.h>
29#include <linux/io.h> 29#include <linux/io.h>
30#include <linux/irqchip/arm-gic.h>
30#include <linux/platform_data/clk-realview.h> 31#include <linux/platform_data/clk-realview.h>
31 32
32#include <mach/hardware.h> 33#include <mach/hardware.h>
33#include <asm/irq.h> 34#include <asm/irq.h>
34#include <asm/mach-types.h> 35#include <asm/mach-types.h>
35#include <asm/pgtable.h> 36#include <asm/pgtable.h>
36#include <asm/hardware/gic.h>
37#include <asm/hardware/cache-l2x0.h> 37#include <asm/hardware/cache-l2x0.h>
38#include <asm/smp_twd.h> 38#include <asm/smp_twd.h>
39 39
@@ -469,7 +469,6 @@ MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
469 .init_early = realview_init_early, 469 .init_early = realview_init_early,
470 .init_irq = gic_init_irq, 470 .init_irq = gic_init_irq,
471 .init_time = realview_eb_timer_init, 471 .init_time = realview_eb_timer_init,
472 .handle_irq = gic_handle_irq,
473 .init_machine = realview_eb_init, 472 .init_machine = realview_eb_init,
474#ifdef CONFIG_ZONE_DMA 473#ifdef CONFIG_ZONE_DMA
475 .dma_zone_size = SZ_256M, 474 .dma_zone_size = SZ_256M,
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
index 6a4524b93fc6..d5e83a1f6982 100644
--- a/arch/arm/mach-realview/realview_pb1176.c
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -29,13 +29,13 @@
29#include <linux/mtd/physmap.h> 29#include <linux/mtd/physmap.h>
30#include <linux/mtd/partitions.h> 30#include <linux/mtd/partitions.h>
31#include <linux/io.h> 31#include <linux/io.h>
32#include <linux/irqchip/arm-gic.h>
32#include <linux/platform_data/clk-realview.h> 33#include <linux/platform_data/clk-realview.h>
33 34
34#include <mach/hardware.h> 35#include <mach/hardware.h>
35#include <asm/irq.h> 36#include <asm/irq.h>
36#include <asm/mach-types.h> 37#include <asm/mach-types.h>
37#include <asm/pgtable.h> 38#include <asm/pgtable.h>
38#include <asm/hardware/gic.h>
39#include <asm/hardware/cache-l2x0.h> 39#include <asm/hardware/cache-l2x0.h>
40 40
41#include <asm/mach/arch.h> 41#include <asm/mach/arch.h>
@@ -381,7 +381,6 @@ MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
381 .init_early = realview_init_early, 381 .init_early = realview_init_early,
382 .init_irq = gic_init_irq, 382 .init_irq = gic_init_irq,
383 .init_time = realview_pb1176_timer_init, 383 .init_time = realview_pb1176_timer_init,
384 .handle_irq = gic_handle_irq,
385 .init_machine = realview_pb1176_init, 384 .init_machine = realview_pb1176_init,
386#ifdef CONFIG_ZONE_DMA 385#ifdef CONFIG_ZONE_DMA
387 .dma_zone_size = SZ_256M, 386 .dma_zone_size = SZ_256M,
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index 502f6e6c6913..c3cfe213b5e6 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -27,13 +27,13 @@
27#include <linux/amba/mmci.h> 27#include <linux/amba/mmci.h>
28#include <linux/amba/pl022.h> 28#include <linux/amba/pl022.h>
29#include <linux/io.h> 29#include <linux/io.h>
30#include <linux/irqchip/arm-gic.h>
30#include <linux/platform_data/clk-realview.h> 31#include <linux/platform_data/clk-realview.h>
31 32
32#include <mach/hardware.h> 33#include <mach/hardware.h>
33#include <asm/irq.h> 34#include <asm/irq.h>
34#include <asm/mach-types.h> 35#include <asm/mach-types.h>
35#include <asm/pgtable.h> 36#include <asm/pgtable.h>
36#include <asm/hardware/gic.h>
37#include <asm/hardware/cache-l2x0.h> 37#include <asm/hardware/cache-l2x0.h>
38#include <asm/smp_twd.h> 38#include <asm/smp_twd.h>
39 39
@@ -364,7 +364,6 @@ MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
364 .init_early = realview_init_early, 364 .init_early = realview_init_early,
365 .init_irq = gic_init_irq, 365 .init_irq = gic_init_irq,
366 .init_time = realview_pb11mp_timer_init, 366 .init_time = realview_pb11mp_timer_init,
367 .handle_irq = gic_handle_irq,
368 .init_machine = realview_pb11mp_init, 367 .init_machine = realview_pb11mp_init,
369#ifdef CONFIG_ZONE_DMA 368#ifdef CONFIG_ZONE_DMA
370 .dma_zone_size = SZ_256M, 369 .dma_zone_size = SZ_256M,
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c
index 85c81aaa05e8..dde652a59620 100644
--- a/arch/arm/mach-realview/realview_pba8.c
+++ b/arch/arm/mach-realview/realview_pba8.c
@@ -27,12 +27,12 @@
27#include <linux/amba/mmci.h> 27#include <linux/amba/mmci.h>
28#include <linux/amba/pl022.h> 28#include <linux/amba/pl022.h>
29#include <linux/io.h> 29#include <linux/io.h>
30#include <linux/irqchip/arm-gic.h>
30#include <linux/platform_data/clk-realview.h> 31#include <linux/platform_data/clk-realview.h>
31 32
32#include <asm/irq.h> 33#include <asm/irq.h>
33#include <asm/mach-types.h> 34#include <asm/mach-types.h>
34#include <asm/pgtable.h> 35#include <asm/pgtable.h>
35#include <asm/hardware/gic.h>
36 36
37#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
38#include <asm/mach/map.h> 38#include <asm/mach/map.h>
@@ -305,7 +305,6 @@ MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")
305 .init_early = realview_init_early, 305 .init_early = realview_init_early,
306 .init_irq = gic_init_irq, 306 .init_irq = gic_init_irq,
307 .init_time = realview_pba8_timer_init, 307 .init_time = realview_pba8_timer_init,
308 .handle_irq = gic_handle_irq,
309 .init_machine = realview_pba8_init, 308 .init_machine = realview_pba8_init,
310#ifdef CONFIG_ZONE_DMA 309#ifdef CONFIG_ZONE_DMA
311 .dma_zone_size = SZ_256M, 310 .dma_zone_size = SZ_256M,
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index a15a7b0be29b..54f0185b01e3 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -26,13 +26,13 @@
26#include <linux/amba/mmci.h> 26#include <linux/amba/mmci.h>
27#include <linux/amba/pl022.h> 27#include <linux/amba/pl022.h>
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/irqchip/arm-gic.h>
29#include <linux/platform_data/clk-realview.h> 30#include <linux/platform_data/clk-realview.h>
30 31
31#include <asm/irq.h> 32#include <asm/irq.h>
32#include <asm/mach-types.h> 33#include <asm/mach-types.h>
33#include <asm/smp_twd.h> 34#include <asm/smp_twd.h>
34#include <asm/pgtable.h> 35#include <asm/pgtable.h>
35#include <asm/hardware/gic.h>
36#include <asm/hardware/cache-l2x0.h> 36#include <asm/hardware/cache-l2x0.h>
37 37
38#include <asm/mach/arch.h> 38#include <asm/mach/arch.h>
@@ -401,7 +401,6 @@ MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
401 .init_early = realview_init_early, 401 .init_early = realview_init_early,
402 .init_irq = gic_init_irq, 402 .init_irq = gic_init_irq,
403 .init_time = realview_pbx_timer_init, 403 .init_time = realview_pbx_timer_init,
404 .handle_irq = gic_handle_irq,
405 .init_machine = realview_pbx_init, 404 .init_machine = realview_pbx_init,
406#ifdef CONFIG_ZONE_DMA 405#ifdef CONFIG_ZONE_DMA
407 .dma_zone_size = SZ_256M, 406 .dma_zone_size = SZ_256M,
diff --git a/arch/arm/mach-s3c24xx/h1940-bluetooth.c b/arch/arm/mach-s3c24xx/h1940-bluetooth.c
index 57aee916bdb1..3f40c61b6e02 100644
--- a/arch/arm/mach-s3c24xx/h1940-bluetooth.c
+++ b/arch/arm/mach-s3c24xx/h1940-bluetooth.c
@@ -62,7 +62,7 @@ static const struct rfkill_ops h1940bt_rfkill_ops = {
62 .set_block = h1940bt_set_block, 62 .set_block = h1940bt_set_block,
63}; 63};
64 64
65static int __devinit h1940bt_probe(struct platform_device *pdev) 65static int h1940bt_probe(struct platform_device *pdev)
66{ 66{
67 struct rfkill *rfk; 67 struct rfkill *rfk;
68 int ret = 0; 68 int ret = 0;
diff --git a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
index 5876c6ba7500..45e74363aaa9 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris-dvs.c
@@ -93,7 +93,7 @@ static struct notifier_block osiris_dvs_nb = {
93 .notifier_call = osiris_dvs_notify, 93 .notifier_call = osiris_dvs_notify,
94}; 94};
95 95
96static int __devinit osiris_dvs_probe(struct platform_device *pdev) 96static int osiris_dvs_probe(struct platform_device *pdev)
97{ 97{
98 int ret; 98 int ret;
99 99
@@ -126,7 +126,7 @@ err_nogpio:
126 return ret; 126 return ret;
127} 127}
128 128
129static int __devexit osiris_dvs_remove(struct platform_device *pdev) 129static int osiris_dvs_remove(struct platform_device *pdev)
130{ 130{
131 dev_info(&pdev->dev, "exiting\n"); 131 dev_info(&pdev->dev, "exiting\n");
132 132
@@ -167,7 +167,7 @@ static const struct dev_pm_ops osiris_dvs_pm = {
167 167
168static struct platform_driver osiris_dvs_driver = { 168static struct platform_driver osiris_dvs_driver = {
169 .probe = osiris_dvs_probe, 169 .probe = osiris_dvs_probe,
170 .remove = __devexit_p(osiris_dvs_remove), 170 .remove = osiris_dvs_remove,
171 .driver = { 171 .driver = {
172 .name = "osiris-dvs", 172 .name = "osiris-dvs",
173 .owner = THIS_MODULE, 173 .owner = THIS_MODULE,
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
index aef303b8997e..0b9c0ba44834 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c64xx/common.c
@@ -25,10 +25,10 @@
25#include <linux/dma-mapping.h> 25#include <linux/dma-mapping.h>
26#include <linux/irq.h> 26#include <linux/irq.h>
27#include <linux/gpio.h> 27#include <linux/gpio.h>
28#include <linux/irqchip/arm-vic.h>
28 29
29#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
30#include <asm/mach/map.h> 31#include <asm/mach/map.h>
31#include <asm/hardware/vic.h>
32#include <asm/system_misc.h> 32#include <asm/system_misc.h>
33 33
34#include <mach/map.h> 34#include <mach/map.h>
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-irq.h b/arch/arm/mach-s3c64xx/include/mach/regs-irq.h
index bcce68a0bb75..6a1127891c87 100644
--- a/arch/arm/mach-s3c64xx/include/mach/regs-irq.h
+++ b/arch/arm/mach-s3c64xx/include/mach/regs-irq.h
@@ -15,6 +15,5 @@
15#ifndef __ASM_ARCH_REGS_IRQ_H 15#ifndef __ASM_ARCH_REGS_IRQ_H
16#define __ASM_ARCH_REGS_IRQ_H __FILE__ 16#define __ASM_ARCH_REGS_IRQ_H __FILE__
17 17
18#include <asm/hardware/vic.h>
19 18
20#endif /* __ASM_ARCH_6400_REGS_IRQ_H */ 19#endif /* __ASM_ARCH_6400_REGS_IRQ_H */
diff --git a/arch/arm/mach-s3c64xx/include/mach/tick.h b/arch/arm/mach-s3c64xx/include/mach/tick.h
index ebe18a9469b8..db9c1b1d56a4 100644
--- a/arch/arm/mach-s3c64xx/include/mach/tick.h
+++ b/arch/arm/mach-s3c64xx/include/mach/tick.h
@@ -15,6 +15,8 @@
15#ifndef __ASM_ARCH_TICK_H 15#ifndef __ASM_ARCH_TICK_H
16#define __ASM_ARCH_TICK_H __FILE__ 16#define __ASM_ARCH_TICK_H __FILE__
17 17
18#include <linux/irqchip/arm-vic.h>
19
18/* note, the timer interrutps turn up in 2 places, the vic and then 20/* note, the timer interrutps turn up in 2 places, the vic and then
19 * the timer block. We take the VIC as the base at the moment. 21 * the timer block. We take the VIC as the base at the moment.
20 */ 22 */
diff --git a/arch/arm/mach-s3c64xx/mach-anw6410.c b/arch/arm/mach-s3c64xx/mach-anw6410.c
index 75cbc67f628e..afeae0b5bb28 100644
--- a/arch/arm/mach-s3c64xx/mach-anw6410.c
+++ b/arch/arm/mach-s3c64xx/mach-anw6410.c
@@ -31,7 +31,6 @@
31#include <video/platform_lcd.h> 31#include <video/platform_lcd.h>
32#include <video/samsung_fimd.h> 32#include <video/samsung_fimd.h>
33 33
34#include <asm/hardware/vic.h>
35#include <asm/mach/arch.h> 34#include <asm/mach/arch.h>
36#include <asm/mach/map.h> 35#include <asm/mach/map.h>
37#include <asm/mach/irq.h> 36#include <asm/mach/irq.h>
@@ -230,7 +229,6 @@ MACHINE_START(ANW6410, "A&W6410")
230 .atag_offset = 0x100, 229 .atag_offset = 0x100,
231 230
232 .init_irq = s3c6410_init_irq, 231 .init_irq = s3c6410_init_irq,
233 .handle_irq = vic_handle_irq,
234 .map_io = anw6410_map_io, 232 .map_io = anw6410_map_io,
235 .init_machine = anw6410_machine_init, 233 .init_machine = anw6410_machine_init,
236 .init_late = s3c64xx_init_late, 234 .init_late = s3c64xx_init_late,
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
index c6d8dba90623..553059f51841 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
@@ -290,7 +290,7 @@ static const struct i2c_board_info wm2200_i2c[] = {
290 .platform_data = &wm2200_pdata, }, 290 .platform_data = &wm2200_pdata, },
291}; 291};
292 292
293static __devinitdata const struct { 293static const struct {
294 u8 id; 294 u8 id;
295 u8 rev; 295 u8 rev;
296 const char *name; 296 const char *name;
@@ -343,8 +343,8 @@ static __devinitdata const struct {
343 .i2c_devs = wm2200_i2c, .num_i2c_devs = ARRAY_SIZE(wm2200_i2c) }, 343 .i2c_devs = wm2200_i2c, .num_i2c_devs = ARRAY_SIZE(wm2200_i2c) },
344}; 344};
345 345
346static __devinit int wlf_gf_module_probe(struct i2c_client *i2c, 346static int wlf_gf_module_probe(struct i2c_client *i2c,
347 const struct i2c_device_id *i2c_id) 347 const struct i2c_device_id *i2c_id)
348{ 348{
349 int ret, i, j, id, rev; 349 int ret, i, j, id, rev;
350 350
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index 87aab127dd60..5b6adc7f1d39 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -42,7 +42,6 @@
42 42
43#include <sound/wm1250-ev1.h> 43#include <sound/wm1250-ev1.h>
44 44
45#include <asm/hardware/vic.h>
46#include <asm/mach/arch.h> 45#include <asm/mach/arch.h>
47#include <asm/mach-types.h> 46#include <asm/mach-types.h>
48 47
@@ -171,7 +170,7 @@ static struct fb_videomode crag6410_lcd_timing = {
171}; 170};
172 171
173/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */ 172/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
174static struct s3c_fb_platdata crag6410_lcd_pdata __devinitdata = { 173static struct s3c_fb_platdata crag6410_lcd_pdata = {
175 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, 174 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
176 .vtiming = &crag6410_lcd_timing, 175 .vtiming = &crag6410_lcd_timing,
177 .win[0] = &crag6410_fb_win0, 176 .win[0] = &crag6410_fb_win0,
@@ -181,7 +180,7 @@ static struct s3c_fb_platdata crag6410_lcd_pdata __devinitdata = {
181 180
182/* 2x6 keypad */ 181/* 2x6 keypad */
183 182
184static uint32_t crag6410_keymap[] __devinitdata = { 183static uint32_t crag6410_keymap[] = {
185 /* KEY(row, col, keycode) */ 184 /* KEY(row, col, keycode) */
186 KEY(0, 0, KEY_VOLUMEUP), 185 KEY(0, 0, KEY_VOLUMEUP),
187 KEY(0, 1, KEY_HOME), 186 KEY(0, 1, KEY_HOME),
@@ -197,12 +196,12 @@ static uint32_t crag6410_keymap[] __devinitdata = {
197 KEY(1, 5, KEY_CAMERA), 196 KEY(1, 5, KEY_CAMERA),
198}; 197};
199 198
200static struct matrix_keymap_data crag6410_keymap_data __devinitdata = { 199static struct matrix_keymap_data crag6410_keymap_data = {
201 .keymap = crag6410_keymap, 200 .keymap = crag6410_keymap,
202 .keymap_size = ARRAY_SIZE(crag6410_keymap), 201 .keymap_size = ARRAY_SIZE(crag6410_keymap),
203}; 202};
204 203
205static struct samsung_keypad_platdata crag6410_keypad_data __devinitdata = { 204static struct samsung_keypad_platdata crag6410_keypad_data = {
206 .keymap_data = &crag6410_keymap_data, 205 .keymap_data = &crag6410_keymap_data,
207 .rows = 2, 206 .rows = 2,
208 .cols = 6, 207 .cols = 6,
@@ -407,11 +406,11 @@ static struct wm831x_buckv_pdata vddarm_pdata = {
407 .dvs_gpio = S3C64XX_GPK(0), 406 .dvs_gpio = S3C64XX_GPK(0),
408}; 407};
409 408
410static struct regulator_consumer_supply vddarm_consumers[] __devinitdata = { 409static struct regulator_consumer_supply vddarm_consumers[] = {
411 REGULATOR_SUPPLY("vddarm", NULL), 410 REGULATOR_SUPPLY("vddarm", NULL),
412}; 411};
413 412
414static struct regulator_init_data vddarm __devinitdata = { 413static struct regulator_init_data vddarm = {
415 .constraints = { 414 .constraints = {
416 .name = "VDDARM", 415 .name = "VDDARM",
417 .min_uV = 1000000, 416 .min_uV = 1000000,
@@ -425,11 +424,11 @@ static struct regulator_init_data vddarm __devinitdata = {
425 .driver_data = &vddarm_pdata, 424 .driver_data = &vddarm_pdata,
426}; 425};
427 426
428static struct regulator_consumer_supply vddint_consumers[] __devinitdata = { 427static struct regulator_consumer_supply vddint_consumers[] = {
429 REGULATOR_SUPPLY("vddint", NULL), 428 REGULATOR_SUPPLY("vddint", NULL),
430}; 429};
431 430
432static struct regulator_init_data vddint __devinitdata = { 431static struct regulator_init_data vddint = {
433 .constraints = { 432 .constraints = {
434 .name = "VDDINT", 433 .name = "VDDINT",
435 .min_uV = 1000000, 434 .min_uV = 1000000,
@@ -442,27 +441,27 @@ static struct regulator_init_data vddint __devinitdata = {
442 .supply_regulator = "WALLVDD", 441 .supply_regulator = "WALLVDD",
443}; 442};
444 443
445static struct regulator_init_data vddmem __devinitdata = { 444static struct regulator_init_data vddmem = {
446 .constraints = { 445 .constraints = {
447 .name = "VDDMEM", 446 .name = "VDDMEM",
448 .always_on = 1, 447 .always_on = 1,
449 }, 448 },
450}; 449};
451 450
452static struct regulator_init_data vddsys __devinitdata = { 451static struct regulator_init_data vddsys = {
453 .constraints = { 452 .constraints = {
454 .name = "VDDSYS,VDDEXT,VDDPCM,VDDSS", 453 .name = "VDDSYS,VDDEXT,VDDPCM,VDDSS",
455 .always_on = 1, 454 .always_on = 1,
456 }, 455 },
457}; 456};
458 457
459static struct regulator_consumer_supply vddmmc_consumers[] __devinitdata = { 458static struct regulator_consumer_supply vddmmc_consumers[] = {
460 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"), 459 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
461 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.1"), 460 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.1"),
462 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"), 461 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"),
463}; 462};
464 463
465static struct regulator_init_data vddmmc __devinitdata = { 464static struct regulator_init_data vddmmc = {
466 .constraints = { 465 .constraints = {
467 .name = "VDDMMC,UH", 466 .name = "VDDMMC,UH",
468 .always_on = 1, 467 .always_on = 1,
@@ -472,7 +471,7 @@ static struct regulator_init_data vddmmc __devinitdata = {
472 .supply_regulator = "WALLVDD", 471 .supply_regulator = "WALLVDD",
473}; 472};
474 473
475static struct regulator_init_data vddotgi __devinitdata = { 474static struct regulator_init_data vddotgi = {
476 .constraints = { 475 .constraints = {
477 .name = "VDDOTGi", 476 .name = "VDDOTGi",
478 .always_on = 1, 477 .always_on = 1,
@@ -480,7 +479,7 @@ static struct regulator_init_data vddotgi __devinitdata = {
480 .supply_regulator = "WALLVDD", 479 .supply_regulator = "WALLVDD",
481}; 480};
482 481
483static struct regulator_init_data vddotg __devinitdata = { 482static struct regulator_init_data vddotg = {
484 .constraints = { 483 .constraints = {
485 .name = "VDDOTG", 484 .name = "VDDOTG",
486 .always_on = 1, 485 .always_on = 1,
@@ -488,7 +487,7 @@ static struct regulator_init_data vddotg __devinitdata = {
488 .supply_regulator = "WALLVDD", 487 .supply_regulator = "WALLVDD",
489}; 488};
490 489
491static struct regulator_init_data vddhi __devinitdata = { 490static struct regulator_init_data vddhi = {
492 .constraints = { 491 .constraints = {
493 .name = "VDDHI", 492 .name = "VDDHI",
494 .always_on = 1, 493 .always_on = 1,
@@ -496,7 +495,7 @@ static struct regulator_init_data vddhi __devinitdata = {
496 .supply_regulator = "WALLVDD", 495 .supply_regulator = "WALLVDD",
497}; 496};
498 497
499static struct regulator_init_data vddadc __devinitdata = { 498static struct regulator_init_data vddadc = {
500 .constraints = { 499 .constraints = {
501 .name = "VDDADC,VDDDAC", 500 .name = "VDDADC,VDDDAC",
502 .always_on = 1, 501 .always_on = 1,
@@ -504,7 +503,7 @@ static struct regulator_init_data vddadc __devinitdata = {
504 .supply_regulator = "WALLVDD", 503 .supply_regulator = "WALLVDD",
505}; 504};
506 505
507static struct regulator_init_data vddmem0 __devinitdata = { 506static struct regulator_init_data vddmem0 = {
508 .constraints = { 507 .constraints = {
509 .name = "VDDMEM0", 508 .name = "VDDMEM0",
510 .always_on = 1, 509 .always_on = 1,
@@ -512,7 +511,7 @@ static struct regulator_init_data vddmem0 __devinitdata = {
512 .supply_regulator = "WALLVDD", 511 .supply_regulator = "WALLVDD",
513}; 512};
514 513
515static struct regulator_init_data vddpll __devinitdata = { 514static struct regulator_init_data vddpll = {
516 .constraints = { 515 .constraints = {
517 .name = "VDDPLL", 516 .name = "VDDPLL",
518 .always_on = 1, 517 .always_on = 1,
@@ -520,7 +519,7 @@ static struct regulator_init_data vddpll __devinitdata = {
520 .supply_regulator = "WALLVDD", 519 .supply_regulator = "WALLVDD",
521}; 520};
522 521
523static struct regulator_init_data vddlcd __devinitdata = { 522static struct regulator_init_data vddlcd = {
524 .constraints = { 523 .constraints = {
525 .name = "VDDLCD", 524 .name = "VDDLCD",
526 .always_on = 1, 525 .always_on = 1,
@@ -528,7 +527,7 @@ static struct regulator_init_data vddlcd __devinitdata = {
528 .supply_regulator = "WALLVDD", 527 .supply_regulator = "WALLVDD",
529}; 528};
530 529
531static struct regulator_init_data vddalive __devinitdata = { 530static struct regulator_init_data vddalive = {
532 .constraints = { 531 .constraints = {
533 .name = "VDDALIVE", 532 .name = "VDDALIVE",
534 .always_on = 1, 533 .always_on = 1,
@@ -536,28 +535,28 @@ static struct regulator_init_data vddalive __devinitdata = {
536 .supply_regulator = "WALLVDD", 535 .supply_regulator = "WALLVDD",
537}; 536};
538 537
539static struct wm831x_backup_pdata banff_backup_pdata __devinitdata = { 538static struct wm831x_backup_pdata banff_backup_pdata = {
540 .charger_enable = 1, 539 .charger_enable = 1,
541 .vlim = 2500, /* mV */ 540 .vlim = 2500, /* mV */
542 .ilim = 200, /* uA */ 541 .ilim = 200, /* uA */
543}; 542};
544 543
545static struct wm831x_status_pdata banff_red_led __devinitdata = { 544static struct wm831x_status_pdata banff_red_led = {
546 .name = "banff:red:", 545 .name = "banff:red:",
547 .default_src = WM831X_STATUS_MANUAL, 546 .default_src = WM831X_STATUS_MANUAL,
548}; 547};
549 548
550static struct wm831x_status_pdata banff_green_led __devinitdata = { 549static struct wm831x_status_pdata banff_green_led = {
551 .name = "banff:green:", 550 .name = "banff:green:",
552 .default_src = WM831X_STATUS_MANUAL, 551 .default_src = WM831X_STATUS_MANUAL,
553}; 552};
554 553
555static struct wm831x_touch_pdata touch_pdata __devinitdata = { 554static struct wm831x_touch_pdata touch_pdata = {
556 .data_irq = S3C_EINT(26), 555 .data_irq = S3C_EINT(26),
557 .pd_irq = S3C_EINT(27), 556 .pd_irq = S3C_EINT(27),
558}; 557};
559 558
560static struct wm831x_pdata crag_pmic_pdata __devinitdata = { 559static struct wm831x_pdata crag_pmic_pdata = {
561 .wm831x_num = 1, 560 .wm831x_num = 1,
562 .gpio_base = BANFF_PMIC_GPIO_BASE, 561 .gpio_base = BANFF_PMIC_GPIO_BASE,
563 .soft_shutdown = true, 562 .soft_shutdown = true,
@@ -601,7 +600,7 @@ static struct wm831x_pdata crag_pmic_pdata __devinitdata = {
601 .touch = &touch_pdata, 600 .touch = &touch_pdata,
602}; 601};
603 602
604static struct i2c_board_info i2c_devs0[] __devinitdata = { 603static struct i2c_board_info i2c_devs0[] = {
605 { I2C_BOARD_INFO("24c08", 0x50), }, 604 { I2C_BOARD_INFO("24c08", 0x50), },
606 { I2C_BOARD_INFO("tca6408", 0x20), 605 { I2C_BOARD_INFO("tca6408", 0x20),
607 .platform_data = &crag6410_pca_data, 606 .platform_data = &crag6410_pca_data,
@@ -616,13 +615,13 @@ static struct s3c2410_platform_i2c i2c0_pdata = {
616 .frequency = 400000, 615 .frequency = 400000,
617}; 616};
618 617
619static struct regulator_consumer_supply pvdd_1v2_consumers[] __devinitdata = { 618static struct regulator_consumer_supply pvdd_1v2_consumers[] = {
620 REGULATOR_SUPPLY("DCVDD", "spi0.0"), 619 REGULATOR_SUPPLY("DCVDD", "spi0.0"),
621 REGULATOR_SUPPLY("AVDD", "spi0.0"), 620 REGULATOR_SUPPLY("AVDD", "spi0.0"),
622 REGULATOR_SUPPLY("AVDD", "spi0.1"), 621 REGULATOR_SUPPLY("AVDD", "spi0.1"),
623}; 622};
624 623
625static struct regulator_init_data pvdd_1v2 __devinitdata = { 624static struct regulator_init_data pvdd_1v2 = {
626 .constraints = { 625 .constraints = {
627 .name = "PVDD_1V2", 626 .name = "PVDD_1V2",
628 .valid_ops_mask = REGULATOR_CHANGE_STATUS, 627 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
@@ -632,7 +631,7 @@ static struct regulator_init_data pvdd_1v2 __devinitdata = {
632 .num_consumer_supplies = ARRAY_SIZE(pvdd_1v2_consumers), 631 .num_consumer_supplies = ARRAY_SIZE(pvdd_1v2_consumers),
633}; 632};
634 633
635static struct regulator_consumer_supply pvdd_1v8_consumers[] __devinitdata = { 634static struct regulator_consumer_supply pvdd_1v8_consumers[] = {
636 REGULATOR_SUPPLY("LDOVDD", "1-001a"), 635 REGULATOR_SUPPLY("LDOVDD", "1-001a"),
637 REGULATOR_SUPPLY("PLLVDD", "1-001a"), 636 REGULATOR_SUPPLY("PLLVDD", "1-001a"),
638 REGULATOR_SUPPLY("DBVDD", "1-001a"), 637 REGULATOR_SUPPLY("DBVDD", "1-001a"),
@@ -664,7 +663,7 @@ static struct regulator_consumer_supply pvdd_1v8_consumers[] __devinitdata = {
664 REGULATOR_SUPPLY("CPVDD", "wm5110-codec"), 663 REGULATOR_SUPPLY("CPVDD", "wm5110-codec"),
665}; 664};
666 665
667static struct regulator_init_data pvdd_1v8 __devinitdata = { 666static struct regulator_init_data pvdd_1v8 = {
668 .constraints = { 667 .constraints = {
669 .name = "PVDD_1V8", 668 .name = "PVDD_1V8",
670 .always_on = 1, 669 .always_on = 1,
@@ -674,12 +673,12 @@ static struct regulator_init_data pvdd_1v8 __devinitdata = {
674 .num_consumer_supplies = ARRAY_SIZE(pvdd_1v8_consumers), 673 .num_consumer_supplies = ARRAY_SIZE(pvdd_1v8_consumers),
675}; 674};
676 675
677static struct regulator_consumer_supply pvdd_3v3_consumers[] __devinitdata = { 676static struct regulator_consumer_supply pvdd_3v3_consumers[] = {
678 REGULATOR_SUPPLY("MICVDD", "1-001a"), 677 REGULATOR_SUPPLY("MICVDD", "1-001a"),
679 REGULATOR_SUPPLY("AVDD1", "1-001a"), 678 REGULATOR_SUPPLY("AVDD1", "1-001a"),
680}; 679};
681 680
682static struct regulator_init_data pvdd_3v3 __devinitdata = { 681static struct regulator_init_data pvdd_3v3 = {
683 .constraints = { 682 .constraints = {
684 .name = "PVDD_3V3", 683 .name = "PVDD_3V3",
685 .always_on = 1, 684 .always_on = 1,
@@ -689,7 +688,7 @@ static struct regulator_init_data pvdd_3v3 __devinitdata = {
689 .num_consumer_supplies = ARRAY_SIZE(pvdd_3v3_consumers), 688 .num_consumer_supplies = ARRAY_SIZE(pvdd_3v3_consumers),
690}; 689};
691 690
692static struct wm831x_pdata glenfarclas_pmic_pdata __devinitdata = { 691static struct wm831x_pdata glenfarclas_pmic_pdata = {
693 .wm831x_num = 2, 692 .wm831x_num = 2,
694 .irq_base = GLENFARCLAS_PMIC_IRQ_BASE, 693 .irq_base = GLENFARCLAS_PMIC_IRQ_BASE,
695 .gpio_base = GLENFARCLAS_PMIC_GPIO_BASE, 694 .gpio_base = GLENFARCLAS_PMIC_GPIO_BASE,
@@ -721,7 +720,7 @@ static struct wm1250_ev1_pdata wm1250_ev1_pdata = {
721 }, 720 },
722}; 721};
723 722
724static struct i2c_board_info i2c_devs1[] __devinitdata = { 723static struct i2c_board_info i2c_devs1[] = {
725 { I2C_BOARD_INFO("wm8311", 0x34), 724 { I2C_BOARD_INFO("wm8311", 0x34),
726 .irq = S3C_EINT(0), 725 .irq = S3C_EINT(0),
727 .platform_data = &glenfarclas_pmic_pdata }, 726 .platform_data = &glenfarclas_pmic_pdata },
@@ -867,7 +866,6 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410")
867 /* Maintainer: Mark Brown <broonie@opensource.wolfsonmicro.com> */ 866 /* Maintainer: Mark Brown <broonie@opensource.wolfsonmicro.com> */
868 .atag_offset = 0x100, 867 .atag_offset = 0x100,
869 .init_irq = s3c6410_init_irq, 868 .init_irq = s3c6410_init_irq,
870 .handle_irq = vic_handle_irq,
871 .map_io = crag6410_map_io, 869 .map_io = crag6410_map_io,
872 .init_machine = crag6410_machine_init, 870 .init_machine = crag6410_machine_init,
873 .init_late = s3c64xx_init_late, 871 .init_late = s3c64xx_init_late,
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
index 7e8605d98142..7212eb9cfeb9 100644
--- a/arch/arm/mach-s3c64xx/mach-hmt.c
+++ b/arch/arm/mach-s3c64xx/mach-hmt.c
@@ -30,7 +30,6 @@
30#include <mach/hardware.h> 30#include <mach/hardware.h>
31#include <mach/map.h> 31#include <mach/map.h>
32 32
33#include <asm/hardware/vic.h>
34#include <asm/irq.h> 33#include <asm/irq.h>
35#include <asm/mach-types.h> 34#include <asm/mach-types.h>
36 35
@@ -273,7 +272,6 @@ MACHINE_START(HMT, "Airgoo-HMT")
273 /* Maintainer: Peter Korsgaard <jacmet@sunsite.dk> */ 272 /* Maintainer: Peter Korsgaard <jacmet@sunsite.dk> */
274 .atag_offset = 0x100, 273 .atag_offset = 0x100,
275 .init_irq = s3c6410_init_irq, 274 .init_irq = s3c6410_init_irq,
276 .handle_irq = vic_handle_irq,
277 .map_io = hmt_map_io, 275 .map_io = hmt_map_io,
278 .init_machine = hmt_machine_init, 276 .init_machine = hmt_machine_init,
279 .init_late = s3c64xx_init_late, 277 .init_late = s3c64xx_init_late,
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
index 4f8dc7dff92b..e173e6e98228 100644
--- a/arch/arm/mach-s3c64xx/mach-mini6410.c
+++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
@@ -24,7 +24,6 @@
24#include <linux/serial_core.h> 24#include <linux/serial_core.h>
25#include <linux/types.h> 25#include <linux/types.h>
26 26
27#include <asm/hardware/vic.h>
28#include <asm/mach-types.h> 27#include <asm/mach-types.h>
29#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
30#include <asm/mach/map.h> 29#include <asm/mach/map.h>
@@ -352,7 +351,6 @@ MACHINE_START(MINI6410, "MINI6410")
352 /* Maintainer: Darius Augulis <augulis.darius@gmail.com> */ 351 /* Maintainer: Darius Augulis <augulis.darius@gmail.com> */
353 .atag_offset = 0x100, 352 .atag_offset = 0x100,
354 .init_irq = s3c6410_init_irq, 353 .init_irq = s3c6410_init_irq,
355 .handle_irq = vic_handle_irq,
356 .map_io = mini6410_map_io, 354 .map_io = mini6410_map_io,
357 .init_machine = mini6410_machine_init, 355 .init_machine = mini6410_machine_init,
358 .init_late = s3c64xx_init_late, 356 .init_late = s3c64xx_init_late,
diff --git a/arch/arm/mach-s3c64xx/mach-ncp.c b/arch/arm/mach-s3c64xx/mach-ncp.c
index cdd7f947376c..8d3cedd995ff 100644
--- a/arch/arm/mach-s3c64xx/mach-ncp.c
+++ b/arch/arm/mach-s3c64xx/mach-ncp.c
@@ -26,7 +26,6 @@
26#include <video/platform_lcd.h> 26#include <video/platform_lcd.h>
27#include <video/samsung_fimd.h> 27#include <video/samsung_fimd.h>
28 28
29#include <asm/hardware/vic.h>
30#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
31#include <asm/mach/map.h> 30#include <asm/mach/map.h>
32#include <asm/mach/irq.h> 31#include <asm/mach/irq.h>
@@ -101,7 +100,6 @@ MACHINE_START(NCP, "NCP")
101 /* Maintainer: Samsung Electronics */ 100 /* Maintainer: Samsung Electronics */
102 .atag_offset = 0x100, 101 .atag_offset = 0x100,
103 .init_irq = s3c6410_init_irq, 102 .init_irq = s3c6410_init_irq,
104 .handle_irq = vic_handle_irq,
105 .map_io = ncp_map_io, 103 .map_io = ncp_map_io,
106 .init_machine = ncp_machine_init, 104 .init_machine = ncp_machine_init,
107 .init_late = s3c64xx_init_late, 105 .init_late = s3c64xx_init_late,
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
index b0f61982ef56..4d0d47a66930 100644
--- a/arch/arm/mach-s3c64xx/mach-real6410.c
+++ b/arch/arm/mach-s3c64xx/mach-real6410.c
@@ -25,7 +25,6 @@
25#include <linux/serial_core.h> 25#include <linux/serial_core.h>
26#include <linux/types.h> 26#include <linux/types.h>
27 27
28#include <asm/hardware/vic.h>
29#include <asm/mach-types.h> 28#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
31#include <asm/mach/map.h> 30#include <asm/mach/map.h>
@@ -331,7 +330,6 @@ MACHINE_START(REAL6410, "REAL6410")
331 .atag_offset = 0x100, 330 .atag_offset = 0x100,
332 331
333 .init_irq = s3c6410_init_irq, 332 .init_irq = s3c6410_init_irq,
334 .handle_irq = vic_handle_irq,
335 .map_io = real6410_map_io, 333 .map_io = real6410_map_io,
336 .init_machine = real6410_machine_init, 334 .init_machine = real6410_machine_init,
337 .init_late = s3c64xx_init_late, 335 .init_late = s3c64xx_init_late,
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c
index 7a737614717e..ca2afcfce573 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq5.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq5.c
@@ -17,7 +17,6 @@
17#include <linux/leds.h> 17#include <linux/leds.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19 19
20#include <asm/hardware/vic.h>
21#include <asm/mach-types.h> 20#include <asm/mach-types.h>
22#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
23 22
@@ -153,7 +152,6 @@ MACHINE_START(SMARTQ5, "SmartQ 5")
153 /* Maintainer: Maurus Cuelenaere <mcuelenaere AT gmail DOT com> */ 152 /* Maintainer: Maurus Cuelenaere <mcuelenaere AT gmail DOT com> */
154 .atag_offset = 0x100, 153 .atag_offset = 0x100,
155 .init_irq = s3c6410_init_irq, 154 .init_irq = s3c6410_init_irq,
156 .handle_irq = vic_handle_irq,
157 .map_io = smartq_map_io, 155 .map_io = smartq_map_io,
158 .init_machine = smartq5_machine_init, 156 .init_machine = smartq5_machine_init,
159 .init_late = s3c64xx_init_late, 157 .init_late = s3c64xx_init_late,
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c
index 889d525325c8..37bb0c632a5e 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq7.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq7.c
@@ -17,7 +17,6 @@
17#include <linux/leds.h> 17#include <linux/leds.h>
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19 19
20#include <asm/hardware/vic.h>
21#include <asm/mach-types.h> 20#include <asm/mach-types.h>
22#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
23 22
@@ -169,7 +168,6 @@ MACHINE_START(SMARTQ7, "SmartQ 7")
169 /* Maintainer: Maurus Cuelenaere <mcuelenaere AT gmail DOT com> */ 168 /* Maintainer: Maurus Cuelenaere <mcuelenaere AT gmail DOT com> */
170 .atag_offset = 0x100, 169 .atag_offset = 0x100,
171 .init_irq = s3c6410_init_irq, 170 .init_irq = s3c6410_init_irq,
172 .handle_irq = vic_handle_irq,
173 .map_io = smartq_map_io, 171 .map_io = smartq_map_io,
174 .init_machine = smartq7_machine_init, 172 .init_machine = smartq7_machine_init,
175 .init_late = s3c64xx_init_late, 173 .init_late = s3c64xx_init_late,
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c64xx/mach-smdk6400.c
index e31fe5bb37b6..a392869c8342 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6400.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6400.c
@@ -22,7 +22,6 @@
22 22
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24 24
25#include <asm/hardware/vic.h>
26#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 26#include <asm/mach/map.h>
28#include <asm/mach/irq.h> 27#include <asm/mach/irq.h>
@@ -90,7 +89,6 @@ MACHINE_START(SMDK6400, "SMDK6400")
90 .atag_offset = 0x100, 89 .atag_offset = 0x100,
91 90
92 .init_irq = s3c6400_init_irq, 91 .init_irq = s3c6400_init_irq,
93 .handle_irq = vic_handle_irq,
94 .map_io = smdk6400_map_io, 92 .map_io = smdk6400_map_io,
95 .init_machine = smdk6400_machine_init, 93 .init_machine = smdk6400_machine_init,
96 .init_late = s3c64xx_init_late, 94 .init_late = s3c64xx_init_late,
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index f1b87cd9cb0e..1663d10ba02a 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -45,7 +45,6 @@
45#include <video/platform_lcd.h> 45#include <video/platform_lcd.h>
46#include <video/samsung_fimd.h> 46#include <video/samsung_fimd.h>
47 47
48#include <asm/hardware/vic.h>
49#include <asm/mach/arch.h> 48#include <asm/mach/arch.h>
50#include <asm/mach/map.h> 49#include <asm/mach/map.h>
51#include <asm/mach/irq.h> 50#include <asm/mach/irq.h>
@@ -700,7 +699,6 @@ MACHINE_START(SMDK6410, "SMDK6410")
700 .atag_offset = 0x100, 699 .atag_offset = 0x100,
701 700
702 .init_irq = s3c6410_init_irq, 701 .init_irq = s3c6410_init_irq,
703 .handle_irq = vic_handle_irq,
704 .map_io = smdk6410_map_io, 702 .map_io = smdk6410_map_io,
705 .init_machine = smdk6410_machine_init, 703 .init_machine = smdk6410_machine_init,
706 .init_late = s3c64xx_init_late, 704 .init_late = s3c64xx_init_late,
diff --git a/arch/arm/mach-s5p64x0/include/mach/regs-irq.h b/arch/arm/mach-s5p64x0/include/mach/regs-irq.h
index 4aaebdace55f..d60397d1ff40 100644
--- a/arch/arm/mach-s5p64x0/include/mach/regs-irq.h
+++ b/arch/arm/mach-s5p64x0/include/mach/regs-irq.h
@@ -13,7 +13,6 @@
13#ifndef __ASM_ARCH_REGS_IRQ_H 13#ifndef __ASM_ARCH_REGS_IRQ_H
14#define __ASM_ARCH_REGS_IRQ_H __FILE__ 14#define __ASM_ARCH_REGS_IRQ_H __FILE__
15 15
16#include <asm/hardware/vic.h>
17#include <mach/map.h> 16#include <mach/map.h>
18 17
19#endif /* __ASM_ARCH_REGS_IRQ_H */ 18#endif /* __ASM_ARCH_REGS_IRQ_H */
diff --git a/arch/arm/mach-s5p64x0/include/mach/tick.h b/arch/arm/mach-s5p64x0/include/mach/tick.h
deleted file mode 100644
index 00aa7f1d8e51..000000000000
--- a/arch/arm/mach-s5p64x0/include/mach/tick.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/* linux/arch/arm/mach-s5p64x0/include/mach/tick.h
2 *
3 * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * Copyright 2008 Openmoko, Inc.
7 * Copyright 2008 Simtec Electronics
8 * http://armlinux.simtec.co.uk/
9 * Ben Dooks <ben@simtec.co.uk>
10 *
11 * S5P64X0 - Timer tick support definitions
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
16*/
17
18#ifndef __ASM_ARCH_TICK_H
19#define __ASM_ARCH_TICK_H __FILE__
20
21static inline u32 s3c24xx_ostimer_pending(void)
22{
23 u32 pend = __raw_readl(VA_VIC0 + VIC_RAW_STATUS);
24 return pend & (1 << (IRQ_TIMER4_VIC - S5P_IRQ_VIC0(0)));
25}
26
27#define TICK_MAX (0xffffffff)
28
29#endif /* __ASM_ARCH_TICK_H */
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6440.c b/arch/arm/mach-s5p64x0/mach-smdk6440.c
index 0a3146dc081a..a40d5eb38124 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6440.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c
@@ -29,7 +29,6 @@
29#include <video/platform_lcd.h> 29#include <video/platform_lcd.h>
30#include <video/samsung_fimd.h> 30#include <video/samsung_fimd.h>
31 31
32#include <asm/hardware/vic.h>
33#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
34#include <asm/mach/map.h> 33#include <asm/mach/map.h>
35#include <asm/irq.h> 34#include <asm/irq.h>
@@ -272,7 +271,6 @@ MACHINE_START(SMDK6440, "SMDK6440")
272 .atag_offset = 0x100, 271 .atag_offset = 0x100,
273 272
274 .init_irq = s5p6440_init_irq, 273 .init_irq = s5p6440_init_irq,
275 .handle_irq = vic_handle_irq,
276 .map_io = smdk6440_map_io, 274 .map_io = smdk6440_map_io,
277 .init_machine = smdk6440_machine_init, 275 .init_machine = smdk6440_machine_init,
278 .init_time = s5p_timer_init, 276 .init_time = s5p_timer_init,
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c
index 36917f2ea25a..703e576a26e0 100644
--- a/arch/arm/mach-s5p64x0/mach-smdk6450.c
+++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c
@@ -29,7 +29,6 @@
29#include <video/platform_lcd.h> 29#include <video/platform_lcd.h>
30#include <video/samsung_fimd.h> 30#include <video/samsung_fimd.h>
31 31
32#include <asm/hardware/vic.h>
33#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
34#include <asm/mach/map.h> 33#include <asm/mach/map.h>
35#include <asm/irq.h> 34#include <asm/irq.h>
@@ -291,7 +290,6 @@ MACHINE_START(SMDK6450, "SMDK6450")
291 .atag_offset = 0x100, 290 .atag_offset = 0x100,
292 291
293 .init_irq = s5p6450_init_irq, 292 .init_irq = s5p6450_init_irq,
294 .handle_irq = vic_handle_irq,
295 .map_io = smdk6450_map_io, 293 .map_io = smdk6450_map_io,
296 .init_machine = smdk6450_machine_init, 294 .init_machine = smdk6450_machine_init,
297 .init_time = s5p_timer_init, 295 .init_time = s5p_timer_init,
diff --git a/arch/arm/mach-s5pc100/include/mach/regs-irq.h b/arch/arm/mach-s5pc100/include/mach/regs-irq.h
index 4d9036d0f288..761627897f30 100644
--- a/arch/arm/mach-s5pc100/include/mach/regs-irq.h
+++ b/arch/arm/mach-s5pc100/include/mach/regs-irq.h
@@ -14,6 +14,5 @@
14#define __ASM_ARCH_REGS_IRQ_H __FILE__ 14#define __ASM_ARCH_REGS_IRQ_H __FILE__
15 15
16#include <mach/map.h> 16#include <mach/map.h>
17#include <asm/hardware/vic.h>
18 17
19#endif /* __ASM_ARCH_REGS_IRQ_H */ 18#endif /* __ASM_ARCH_REGS_IRQ_H */
diff --git a/arch/arm/mach-s5pc100/include/mach/tick.h b/arch/arm/mach-s5pc100/include/mach/tick.h
index 20f68730ed18..0af8e41230ed 100644
--- a/arch/arm/mach-s5pc100/include/mach/tick.h
+++ b/arch/arm/mach-s5pc100/include/mach/tick.h
@@ -15,6 +15,8 @@
15#ifndef __ASM_ARCH_TICK_H 15#ifndef __ASM_ARCH_TICK_H
16#define __ASM_ARCH_TICK_H __FILE__ 16#define __ASM_ARCH_TICK_H __FILE__
17 17
18#include <linux/irqchip/arm-vic.h>
19
18/* note, the timer interrutps turn up in 2 places, the vic and then 20/* note, the timer interrutps turn up in 2 places, the vic and then
19 * the timer block. We take the VIC as the base at the moment. 21 * the timer block. We take the VIC as the base at the moment.
20 */ 22 */
diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-s5pc100/mach-smdkc100.c
index 39a9197d1746..185a19583898 100644
--- a/arch/arm/mach-s5pc100/mach-smdkc100.c
+++ b/arch/arm/mach-s5pc100/mach-smdkc100.c
@@ -25,7 +25,6 @@
25#include <linux/input.h> 25#include <linux/input.h>
26#include <linux/pwm_backlight.h> 26#include <linux/pwm_backlight.h>
27 27
28#include <asm/hardware/vic.h>
29#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
30#include <asm/mach/map.h> 29#include <asm/mach/map.h>
31 30
@@ -254,7 +253,6 @@ MACHINE_START(SMDKC100, "SMDKC100")
254 /* Maintainer: Byungho Min <bhmin@samsung.com> */ 253 /* Maintainer: Byungho Min <bhmin@samsung.com> */
255 .atag_offset = 0x100, 254 .atag_offset = 0x100,
256 .init_irq = s5pc100_init_irq, 255 .init_irq = s5pc100_init_irq,
257 .handle_irq = vic_handle_irq,
258 .map_io = smdkc100_map_io, 256 .map_io = smdkc100_map_io,
259 .init_machine = smdkc100_machine_init, 257 .init_machine = smdkc100_machine_init,
260 .init_time = s3c24xx_timer_init, 258 .init_time = s3c24xx_timer_init,
diff --git a/arch/arm/mach-s5pv210/include/mach/regs-irq.h b/arch/arm/mach-s5pv210/include/mach/regs-irq.h
index 5c3b104a7c86..d8bc1e6c7aaa 100644
--- a/arch/arm/mach-s5pv210/include/mach/regs-irq.h
+++ b/arch/arm/mach-s5pv210/include/mach/regs-irq.h
@@ -13,7 +13,6 @@
13#ifndef __ASM_ARCH_REGS_IRQ_H 13#ifndef __ASM_ARCH_REGS_IRQ_H
14#define __ASM_ARCH_REGS_IRQ_H __FILE__ 14#define __ASM_ARCH_REGS_IRQ_H __FILE__
15 15
16#include <asm/hardware/vic.h>
17#include <mach/map.h> 16#include <mach/map.h>
18 17
19#endif /* __ASM_ARCH_REGS_IRQ_H */ 18#endif /* __ASM_ARCH_REGS_IRQ_H */
diff --git a/arch/arm/mach-s5pv210/include/mach/tick.h b/arch/arm/mach-s5pv210/include/mach/tick.h
deleted file mode 100644
index 7993b3603ccf..000000000000
--- a/arch/arm/mach-s5pv210/include/mach/tick.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/* linux/arch/arm/mach-s5pv210/include/mach/tick.h
2 *
3 * Copyright (c) 2009 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
5 *
6 * Based on arch/arm/mach-s3c6400/include/mach/tick.h
7 *
8 * S5PV210 - Timer tick support definitions
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13*/
14
15#ifndef __ASM_ARCH_TICK_H
16#define __ASM_ARCH_TICK_H __FILE__
17
18static inline u32 s3c24xx_ostimer_pending(void)
19{
20 u32 pend = __raw_readl(VA_VIC0 + VIC_RAW_STATUS);
21 return pend & (1 << (IRQ_TIMER4_VIC - S5P_IRQ_VIC0(0)));
22}
23
24#define TICK_MAX (0xffffffff)
25
26#endif /* __ASM_ARCH_TICK_H */
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c b/arch/arm/mach-s5pv210/mach-aquila.c
index 1fb44a5ebb83..11900a8e88a3 100644
--- a/arch/arm/mach-s5pv210/mach-aquila.c
+++ b/arch/arm/mach-s5pv210/mach-aquila.c
@@ -22,7 +22,6 @@
22#include <linux/input.h> 22#include <linux/input.h>
23#include <linux/gpio.h> 23#include <linux/gpio.h>
24 24
25#include <asm/hardware/vic.h>
26#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 26#include <asm/mach/map.h>
28#include <asm/setup.h> 27#include <asm/setup.h>
@@ -685,7 +684,6 @@ MACHINE_START(AQUILA, "Aquila")
685 Kyungmin Park <kyungmin.park@samsung.com> */ 684 Kyungmin Park <kyungmin.park@samsung.com> */
686 .atag_offset = 0x100, 685 .atag_offset = 0x100,
687 .init_irq = s5pv210_init_irq, 686 .init_irq = s5pv210_init_irq,
688 .handle_irq = vic_handle_irq,
689 .map_io = aquila_map_io, 687 .map_io = aquila_map_io,
690 .init_machine = aquila_machine_init, 688 .init_machine = aquila_machine_init,
691 .init_time = s5p_timer_init, 689 .init_time = s5p_timer_init,
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index ababdca2b3e4..570481591746 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -29,7 +29,6 @@
29#include <linux/interrupt.h> 29#include <linux/interrupt.h>
30#include <linux/platform_data/s3c-hsotg.h> 30#include <linux/platform_data/s3c-hsotg.h>
31 31
32#include <asm/hardware/vic.h>
33#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
34#include <asm/mach/map.h> 33#include <asm/mach/map.h>
35#include <asm/setup.h> 34#include <asm/setup.h>
@@ -972,7 +971,6 @@ MACHINE_START(GONI, "GONI")
972 /* Maintainers: Kyungmin Park <kyungmin.park@samsung.com> */ 971 /* Maintainers: Kyungmin Park <kyungmin.park@samsung.com> */
973 .atag_offset = 0x100, 972 .atag_offset = 0x100,
974 .init_irq = s5pv210_init_irq, 973 .init_irq = s5pv210_init_irq,
975 .handle_irq = vic_handle_irq,
976 .map_io = goni_map_io, 974 .map_io = goni_map_io,
977 .init_machine = goni_machine_init, 975 .init_machine = goni_machine_init,
978 .init_time = s5p_timer_init, 976 .init_time = s5p_timer_init,
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c
index acfb0ebce13b..28bd0248a3e2 100644
--- a/arch/arm/mach-s5pv210/mach-smdkc110.c
+++ b/arch/arm/mach-s5pv210/mach-smdkc110.c
@@ -15,7 +15,6 @@
15#include <linux/i2c.h> 15#include <linux/i2c.h>
16#include <linux/device.h> 16#include <linux/device.h>
17 17
18#include <asm/hardware/vic.h>
19#include <asm/mach/arch.h> 18#include <asm/mach/arch.h>
20#include <asm/mach/map.h> 19#include <asm/mach/map.h>
21#include <asm/setup.h> 20#include <asm/setup.h>
@@ -152,7 +151,6 @@ MACHINE_START(SMDKC110, "SMDKC110")
152 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ 151 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
153 .atag_offset = 0x100, 152 .atag_offset = 0x100,
154 .init_irq = s5pv210_init_irq, 153 .init_irq = s5pv210_init_irq,
155 .handle_irq = vic_handle_irq,
156 .map_io = smdkc110_map_io, 154 .map_io = smdkc110_map_io,
157 .init_machine = smdkc110_machine_init, 155 .init_machine = smdkc110_machine_init,
158 .init_time = s5p_timer_init, 156 .init_time = s5p_timer_init,
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
index e1d820f3b426..3c73f36869bb 100644
--- a/arch/arm/mach-s5pv210/mach-smdkv210.c
+++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
@@ -21,7 +21,6 @@
21#include <linux/pwm_backlight.h> 21#include <linux/pwm_backlight.h>
22#include <linux/platform_data/s3c-hsotg.h> 22#include <linux/platform_data/s3c-hsotg.h>
23 23
24#include <asm/hardware/vic.h>
25#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
26#include <asm/mach/map.h> 25#include <asm/mach/map.h>
27#include <asm/setup.h> 26#include <asm/setup.h>
@@ -328,7 +327,6 @@ MACHINE_START(SMDKV210, "SMDKV210")
328 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */ 327 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
329 .atag_offset = 0x100, 328 .atag_offset = 0x100,
330 .init_irq = s5pv210_init_irq, 329 .init_irq = s5pv210_init_irq,
331 .handle_irq = vic_handle_irq,
332 .map_io = smdkv210_map_io, 330 .map_io = smdkv210_map_io,
333 .init_machine = smdkv210_machine_init, 331 .init_machine = smdkv210_machine_init,
334 .init_time = s5p_timer_init, 332 .init_time = s5p_timer_init,
diff --git a/arch/arm/mach-s5pv210/mach-torbreck.c b/arch/arm/mach-s5pv210/mach-torbreck.c
index 1e6fc6eccdf3..2d4c5531819c 100644
--- a/arch/arm/mach-s5pv210/mach-torbreck.c
+++ b/arch/arm/mach-s5pv210/mach-torbreck.c
@@ -14,7 +14,6 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/serial_core.h> 15#include <linux/serial_core.h>
16 16
17#include <asm/hardware/vic.h>
18#include <asm/mach/arch.h> 17#include <asm/mach/arch.h>
19#include <asm/mach/map.h> 18#include <asm/mach/map.h>
20#include <asm/setup.h> 19#include <asm/setup.h>
@@ -129,7 +128,6 @@ MACHINE_START(TORBRECK, "TORBRECK")
129 /* Maintainer: Hyunchul Ko <ghcstop@gmail.com> */ 128 /* Maintainer: Hyunchul Ko <ghcstop@gmail.com> */
130 .atag_offset = 0x100, 129 .atag_offset = 0x100,
131 .init_irq = s5pv210_init_irq, 130 .init_irq = s5pv210_init_irq,
132 .handle_irq = vic_handle_irq,
133 .map_io = torbreck_map_io, 131 .map_io = torbreck_map_io,
134 .init_machine = torbreck_machine_init, 132 .init_machine = torbreck_machine_init,
135 .init_time = s5p_timer_init, 133 .init_time = s5p_timer_init,
diff --git a/arch/arm/mach-sa1100/jornada720_ssp.c b/arch/arm/mach-sa1100/jornada720_ssp.c
index 7f07f08d8968..b143c4659346 100644
--- a/arch/arm/mach-sa1100/jornada720_ssp.c
+++ b/arch/arm/mach-sa1100/jornada720_ssp.c
@@ -130,7 +130,7 @@ void jornada_ssp_end(void)
130}; 130};
131EXPORT_SYMBOL(jornada_ssp_end); 131EXPORT_SYMBOL(jornada_ssp_end);
132 132
133static int __devinit jornada_ssp_probe(struct platform_device *dev) 133static int jornada_ssp_probe(struct platform_device *dev)
134{ 134{
135 int ret; 135 int ret;
136 136
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index 88be0474f3d7..400f80332046 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -154,7 +154,7 @@ static u_int neponset_get_mctrl(struct uart_port *port)
154 return ret; 154 return ret;
155} 155}
156 156
157static struct sa1100_port_fns neponset_port_fns __devinitdata = { 157static struct sa1100_port_fns neponset_port_fns = {
158 .set_mctrl = neponset_set_mctrl, 158 .set_mctrl = neponset_set_mctrl,
159 .get_mctrl = neponset_get_mctrl, 159 .get_mctrl = neponset_get_mctrl,
160}; 160};
@@ -233,7 +233,7 @@ static struct sa1111_platform_data sa1111_info = {
233 .disable_devs = SA1111_DEVID_PS2_MSE, 233 .disable_devs = SA1111_DEVID_PS2_MSE,
234}; 234};
235 235
236static int __devinit neponset_probe(struct platform_device *dev) 236static int neponset_probe(struct platform_device *dev)
237{ 237{
238 struct neponset_drvdata *d; 238 struct neponset_drvdata *d;
239 struct resource *nep_res, *sa1111_res, *smc91x_res; 239 struct resource *nep_res, *sa1111_res, *smc91x_res;
@@ -368,7 +368,7 @@ static int __devinit neponset_probe(struct platform_device *dev)
368 return ret; 368 return ret;
369} 369}
370 370
371static int __devexit neponset_remove(struct platform_device *dev) 371static int neponset_remove(struct platform_device *dev)
372{ 372{
373 struct neponset_drvdata *d = platform_get_drvdata(dev); 373 struct neponset_drvdata *d = platform_get_drvdata(dev);
374 int irq = platform_get_irq(dev, 0); 374 int irq = platform_get_irq(dev, 0);
@@ -420,7 +420,7 @@ static const struct dev_pm_ops neponset_pm_ops = {
420 420
421static struct platform_driver neponset_device_driver = { 421static struct platform_driver neponset_device_driver = {
422 .probe = neponset_probe, 422 .probe = neponset_probe,
423 .remove = __devexit_p(neponset_remove), 423 .remove = neponset_remove,
424 .driver = { 424 .driver = {
425 .name = "neponset", 425 .name = "neponset",
426 .owner = THIS_MODULE, 426 .owner = THIS_MODULE,
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
index 934db6385cd6..a59a13a665a6 100644
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -124,16 +124,12 @@ void __init sa1100_timer_init(void)
124 124
125 setup_sched_clock(sa1100_read_sched_clock, 32, 3686400); 125 setup_sched_clock(sa1100_read_sched_clock, 32, 3686400);
126 126
127 clockevents_calc_mult_shift(&ckevt_sa1100_osmr0, 3686400, 4);
128 ckevt_sa1100_osmr0.max_delta_ns =
129 clockevent_delta2ns(0x7fffffff, &ckevt_sa1100_osmr0);
130 ckevt_sa1100_osmr0.min_delta_ns =
131 clockevent_delta2ns(MIN_OSCR_DELTA * 2, &ckevt_sa1100_osmr0) + 1;
132 ckevt_sa1100_osmr0.cpumask = cpumask_of(0); 127 ckevt_sa1100_osmr0.cpumask = cpumask_of(0);
133 128
134 setup_irq(IRQ_OST0, &sa1100_timer_irq); 129 setup_irq(IRQ_OST0, &sa1100_timer_irq);
135 130
136 clocksource_mmio_init(OSCR, "oscr", CLOCK_TICK_RATE, 200, 32, 131 clocksource_mmio_init(OSCR, "oscr", CLOCK_TICK_RATE, 200, 32,
137 clocksource_mmio_readl_up); 132 clocksource_mmio_readl_up);
138 clockevents_register_device(&ckevt_sa1100_osmr0); 133 clockevents_config_and_register(&ckevt_sa1100_osmr0, 3686400,
134 MIN_OSCR_DELTA * 2, 0x7fffffff);
139} 135}
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index d81a66362b7c..705bc63c7984 100644
--- a/arch/arm/mach-shmobile/board-ag5evm.c
+++ b/arch/arm/mach-shmobile/board-ag5evm.c
@@ -40,6 +40,7 @@
40#include <linux/mmc/sh_mobile_sdhi.h> 40#include <linux/mmc/sh_mobile_sdhi.h>
41#include <linux/mfd/tmio.h> 41#include <linux/mfd/tmio.h>
42#include <linux/sh_clk.h> 42#include <linux/sh_clk.h>
43#include <linux/irqchip/arm-gic.h>
43#include <video/sh_mobile_lcdc.h> 44#include <video/sh_mobile_lcdc.h>
44#include <video/sh_mipi_dsi.h> 45#include <video/sh_mipi_dsi.h>
45#include <sound/sh_fsi.h> 46#include <sound/sh_fsi.h>
@@ -49,7 +50,6 @@
49#include <mach/common.h> 50#include <mach/common.h>
50#include <asm/mach-types.h> 51#include <asm/mach-types.h>
51#include <asm/mach/arch.h> 52#include <asm/mach/arch.h>
52#include <asm/hardware/gic.h>
53#include <asm/hardware/cache-l2x0.h> 53#include <asm/hardware/cache-l2x0.h>
54#include <asm/traps.h> 54#include <asm/traps.h>
55 55
@@ -668,7 +668,6 @@ MACHINE_START(AG5EVM, "ag5evm")
668 .init_early = sh73a0_add_early_devices, 668 .init_early = sh73a0_add_early_devices,
669 .nr_irqs = NR_IRQS_LEGACY, 669 .nr_irqs = NR_IRQS_LEGACY,
670 .init_irq = sh73a0_init_irq, 670 .init_irq = sh73a0_init_irq,
671 .handle_irq = gic_handle_irq,
672 .init_machine = ag5evm_init, 671 .init_machine = ag5evm_init,
673 .init_late = shmobile_init_late, 672 .init_late = shmobile_init_late,
674 .init_time = sh73a0_earlytimer_init, 673 .init_time = sh73a0_earlytimer_init,
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c
index 2f24994f2ef8..d759a9c2b9e8 100644
--- a/arch/arm/mach-shmobile/board-kota2.c
+++ b/arch/arm/mach-shmobile/board-kota2.c
@@ -35,6 +35,7 @@
35#include <linux/input/sh_keysc.h> 35#include <linux/input/sh_keysc.h>
36#include <linux/gpio_keys.h> 36#include <linux/gpio_keys.h>
37#include <linux/leds.h> 37#include <linux/leds.h>
38#include <linux/irqchip/arm-gic.h>
38#include <linux/platform_data/leds-renesas-tpu.h> 39#include <linux/platform_data/leds-renesas-tpu.h>
39#include <linux/mmc/host.h> 40#include <linux/mmc/host.h>
40#include <linux/mmc/sh_mmcif.h> 41#include <linux/mmc/sh_mmcif.h>
@@ -47,7 +48,6 @@
47#include <asm/mach-types.h> 48#include <asm/mach-types.h>
48#include <asm/mach/arch.h> 49#include <asm/mach/arch.h>
49#include <asm/mach/time.h> 50#include <asm/mach/time.h>
50#include <asm/hardware/gic.h>
51#include <asm/hardware/cache-l2x0.h> 51#include <asm/hardware/cache-l2x0.h>
52#include <asm/traps.h> 52#include <asm/traps.h>
53 53
@@ -550,7 +550,6 @@ MACHINE_START(KOTA2, "kota2")
550 .init_early = sh73a0_add_early_devices, 550 .init_early = sh73a0_add_early_devices,
551 .nr_irqs = NR_IRQS_LEGACY, 551 .nr_irqs = NR_IRQS_LEGACY,
552 .init_irq = sh73a0_init_irq, 552 .init_irq = sh73a0_init_irq,
553 .handle_irq = gic_handle_irq,
554 .init_machine = kota2_init, 553 .init_machine = kota2_init,
555 .init_late = shmobile_init_late, 554 .init_late = shmobile_init_late,
556 .init_time = sh73a0_earlytimer_init, 555 .init_time = sh73a0_earlytimer_init,
diff --git a/arch/arm/mach-shmobile/board-kzm9d.c b/arch/arm/mach-shmobile/board-kzm9d.c
index 59be864f5992..c254782aa727 100644
--- a/arch/arm/mach-shmobile/board-kzm9d.c
+++ b/arch/arm/mach-shmobile/board-kzm9d.c
@@ -28,7 +28,6 @@
28#include <mach/emev2.h> 28#include <mach/emev2.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31#include <asm/hardware/gic.h>
32 31
33/* Dummy supplies, where voltage doesn't matter */ 32/* Dummy supplies, where voltage doesn't matter */
34static struct regulator_consumer_supply dummy_supplies[] = { 33static struct regulator_consumer_supply dummy_supplies[] = {
@@ -89,7 +88,6 @@ DT_MACHINE_START(KZM9D_DT, "kzm9d")
89 .init_early = emev2_add_early_devices, 88 .init_early = emev2_add_early_devices,
90 .nr_irqs = NR_IRQS_LEGACY, 89 .nr_irqs = NR_IRQS_LEGACY,
91 .init_irq = emev2_init_irq, 90 .init_irq = emev2_init_irq,
92 .handle_irq = gic_handle_irq,
93 .init_machine = kzm9d_add_standard_devices, 91 .init_machine = kzm9d_add_standard_devices,
94 .init_late = shmobile_init_late, 92 .init_late = shmobile_init_late,
95 .init_time = shmobile_timer_init, 93 .init_time = shmobile_timer_init,
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index adb23ef51121..ac9428530d7b 100644
--- a/arch/arm/mach-shmobile/board-kzm9g.c
+++ b/arch/arm/mach-shmobile/board-kzm9g.c
@@ -25,6 +25,7 @@
25#include <linux/i2c.h> 25#include <linux/i2c.h>
26#include <linux/i2c/pcf857x.h> 26#include <linux/i2c/pcf857x.h>
27#include <linux/input.h> 27#include <linux/input.h>
28#include <linux/irqchip/arm-gic.h>
28#include <linux/mmc/host.h> 29#include <linux/mmc/host.h>
29#include <linux/mmc/sh_mmcif.h> 30#include <linux/mmc/sh_mmcif.h>
30#include <linux/mmc/sh_mobile_sdhi.h> 31#include <linux/mmc/sh_mobile_sdhi.h>
@@ -42,7 +43,6 @@
42#include <mach/sh73a0.h> 43#include <mach/sh73a0.h>
43#include <mach/common.h> 44#include <mach/common.h>
44#include <asm/hardware/cache-l2x0.h> 45#include <asm/hardware/cache-l2x0.h>
45#include <asm/hardware/gic.h>
46#include <asm/mach-types.h> 46#include <asm/mach-types.h>
47#include <asm/mach/arch.h> 47#include <asm/mach/arch.h>
48#include <video/sh_mobile_lcdc.h> 48#include <video/sh_mobile_lcdc.h>
@@ -792,7 +792,6 @@ DT_MACHINE_START(KZM9G_DT, "kzm9g")
792 .init_early = sh73a0_add_early_devices, 792 .init_early = sh73a0_add_early_devices,
793 .nr_irqs = NR_IRQS_LEGACY, 793 .nr_irqs = NR_IRQS_LEGACY,
794 .init_irq = sh73a0_init_irq, 794 .init_irq = sh73a0_init_irq,
795 .handle_irq = gic_handle_irq,
796 .init_machine = kzm_init, 795 .init_machine = kzm_init,
797 .init_late = shmobile_init_late, 796 .init_late = shmobile_init_late,
798 .init_time = sh73a0_earlytimer_init, 797 .init_time = sh73a0_earlytimer_init,
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index ca45a0c50afe..cdcb799e802f 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -44,7 +44,6 @@
44#include <mach/irqs.h> 44#include <mach/irqs.h>
45#include <asm/mach-types.h> 45#include <asm/mach-types.h>
46#include <asm/mach/arch.h> 46#include <asm/mach/arch.h>
47#include <asm/hardware/gic.h>
48#include <asm/traps.h> 47#include <asm/traps.h>
49 48
50/* Fixed 3.3V regulator to be used by SDHI0 */ 49/* Fixed 3.3V regulator to be used by SDHI0 */
@@ -382,7 +381,6 @@ MACHINE_START(MARZEN, "marzen")
382 .init_early = r8a7779_add_early_devices, 381 .init_early = r8a7779_add_early_devices,
383 .nr_irqs = NR_IRQS_LEGACY, 382 .nr_irqs = NR_IRQS_LEGACY,
384 .init_irq = r8a7779_init_irq, 383 .init_irq = r8a7779_init_irq,
385 .handle_irq = gic_handle_irq,
386 .init_machine = marzen_init, 384 .init_machine = marzen_init,
387 .init_late = marzen_init_late, 385 .init_late = marzen_init_late,
388 .init_time = r8a7779_earlytimer_init, 386 .init_time = r8a7779_earlytimer_init,
diff --git a/arch/arm/mach-shmobile/intc-r8a7779.c b/arch/arm/mach-shmobile/intc-r8a7779.c
index ef66f1a8aa2e..8807c27f71f9 100644
--- a/arch/arm/mach-shmobile/intc-r8a7779.c
+++ b/arch/arm/mach-shmobile/intc-r8a7779.c
@@ -22,10 +22,10 @@
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/irq.h> 23#include <linux/irq.h>
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/irqchip/arm-gic.h>
25#include <mach/common.h> 26#include <mach/common.h>
26#include <mach/intc.h> 27#include <mach/intc.h>
27#include <mach/r8a7779.h> 28#include <mach/r8a7779.h>
28#include <asm/hardware/gic.h>
29#include <asm/mach-types.h> 29#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31 31
diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c
index f0c5e5190601..978369973be4 100644
--- a/arch/arm/mach-shmobile/intc-sh73a0.c
+++ b/arch/arm/mach-shmobile/intc-sh73a0.c
@@ -23,10 +23,10 @@
23#include <linux/irq.h> 23#include <linux/irq.h>
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/sh_intc.h> 25#include <linux/sh_intc.h>
26#include <linux/irqchip/arm-gic.h>
26#include <mach/intc.h> 27#include <mach/intc.h>
27#include <mach/irqs.h> 28#include <mach/irqs.h>
28#include <mach/sh73a0.h> 29#include <mach/sh73a0.h>
29#include <asm/hardware/gic.h>
30#include <asm/mach-types.h> 30#include <asm/mach-types.h>
31#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
32 32
diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c
index ed8d2351915e..1f958d7b0bac 100644
--- a/arch/arm/mach-shmobile/platsmp.c
+++ b/arch/arm/mach-shmobile/platsmp.c
@@ -12,7 +12,6 @@
12 */ 12 */
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/smp.h> 14#include <linux/smp.h>
15#include <asm/hardware/gic.h>
16 15
17void __init shmobile_smp_init_cpus(unsigned int ncores) 16void __init shmobile_smp_init_cpus(unsigned int ncores)
18{ 17{
@@ -26,6 +25,4 @@ void __init shmobile_smp_init_cpus(unsigned int ncores)
26 25
27 for (i = 0; i < ncores; i++) 26 for (i = 0; i < ncores; i++)
28 set_cpu_possible(i, true); 27 set_cpu_possible(i, true);
29
30 set_smp_cross_call(gic_raise_softirq);
31} 28}
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
index ea61cb657ac3..47662a581c0a 100644
--- a/arch/arm/mach-shmobile/setup-emev2.c
+++ b/arch/arm/mach-shmobile/setup-emev2.c
@@ -20,13 +20,14 @@
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/irq.h> 22#include <linux/irq.h>
23#include <linux/irqchip.h>
23#include <linux/platform_device.h> 24#include <linux/platform_device.h>
24#include <linux/platform_data/gpio-em.h> 25#include <linux/platform_data/gpio-em.h>
25#include <linux/of_platform.h> 26#include <linux/of_platform.h>
26#include <linux/delay.h> 27#include <linux/delay.h>
27#include <linux/input.h> 28#include <linux/input.h>
28#include <linux/io.h> 29#include <linux/io.h>
29#include <linux/of_irq.h> 30#include <linux/irqchip/arm-gic.h>
30#include <mach/hardware.h> 31#include <mach/hardware.h>
31#include <mach/common.h> 32#include <mach/common.h>
32#include <mach/emev2.h> 33#include <mach/emev2.h>
@@ -35,7 +36,6 @@
35#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
36#include <asm/mach/map.h> 37#include <asm/mach/map.h>
37#include <asm/mach/time.h> 38#include <asm/mach/time.h>
38#include <asm/hardware/gic.h>
39 39
40static struct map_desc emev2_io_desc[] __initdata = { 40static struct map_desc emev2_io_desc[] __initdata = {
41#ifdef CONFIG_SMP 41#ifdef CONFIG_SMP
@@ -445,27 +445,16 @@ void __init emev2_add_standard_devices_dt(void)
445 emev2_auxdata_lookup, NULL); 445 emev2_auxdata_lookup, NULL);
446} 446}
447 447
448static const struct of_device_id emev2_dt_irq_match[] = {
449 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
450 {},
451};
452
453static const char *emev2_boards_compat_dt[] __initdata = { 448static const char *emev2_boards_compat_dt[] __initdata = {
454 "renesas,emev2", 449 "renesas,emev2",
455 NULL, 450 NULL,
456}; 451};
457 452
458void __init emev2_init_irq_dt(void)
459{
460 of_irq_init(emev2_dt_irq_match);
461}
462
463DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)") 453DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
464 .smp = smp_ops(emev2_smp_ops), 454 .smp = smp_ops(emev2_smp_ops),
465 .init_early = emev2_init_delay, 455 .init_early = emev2_init_delay,
466 .nr_irqs = NR_IRQS_LEGACY, 456 .nr_irqs = NR_IRQS_LEGACY,
467 .init_irq = emev2_init_irq_dt, 457 .init_irq = irqchip_init,
468 .handle_irq = gic_handle_irq,
469 .init_machine = emev2_add_standard_devices_dt, 458 .init_machine = emev2_add_standard_devices_dt,
470 .init_time = shmobile_timer_init, 459 .init_time = shmobile_timer_init,
471 .dt_compat = emev2_boards_compat_dt, 460 .dt_compat = emev2_boards_compat_dt,
diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c
index f67456286280..953eb1f9388d 100644
--- a/arch/arm/mach-shmobile/smp-emev2.c
+++ b/arch/arm/mach-shmobile/smp-emev2.c
@@ -23,11 +23,11 @@
23#include <linux/spinlock.h> 23#include <linux/spinlock.h>
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/delay.h> 25#include <linux/delay.h>
26#include <linux/irqchip/arm-gic.h>
26#include <mach/common.h> 27#include <mach/common.h>
27#include <mach/emev2.h> 28#include <mach/emev2.h>
28#include <asm/smp_plat.h> 29#include <asm/smp_plat.h>
29#include <asm/smp_scu.h> 30#include <asm/smp_scu.h>
30#include <asm/hardware/gic.h>
31#include <asm/cacheflush.h> 31#include <asm/cacheflush.h>
32 32
33#define EMEV2_SCU_BASE 0x1e000000 33#define EMEV2_SCU_BASE 0x1e000000
@@ -100,7 +100,7 @@ static int __cpuinit emev2_boot_secondary(unsigned int cpu, struct task_struct *
100 /* Tell ROM loader about our vector (in headsmp.S) */ 100 /* Tell ROM loader about our vector (in headsmp.S) */
101 emev2_set_boot_vector(__pa(shmobile_secondary_vector)); 101 emev2_set_boot_vector(__pa(shmobile_secondary_vector));
102 102
103 gic_raise_softirq(cpumask_of(cpu), 0); 103 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
104 return 0; 104 return 0;
105} 105}
106 106
diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
index 2ce6af9a6a37..3a4acf23edcf 100644
--- a/arch/arm/mach-shmobile/smp-r8a7779.c
+++ b/arch/arm/mach-shmobile/smp-r8a7779.c
@@ -23,12 +23,12 @@
23#include <linux/spinlock.h> 23#include <linux/spinlock.h>
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/delay.h> 25#include <linux/delay.h>
26#include <linux/irqchip/arm-gic.h>
26#include <mach/common.h> 27#include <mach/common.h>
27#include <mach/r8a7779.h> 28#include <mach/r8a7779.h>
28#include <asm/smp_plat.h> 29#include <asm/smp_plat.h>
29#include <asm/smp_scu.h> 30#include <asm/smp_scu.h>
30#include <asm/smp_twd.h> 31#include <asm/smp_twd.h>
31#include <asm/hardware/gic.h>
32 32
33#define AVECR IOMEM(0xfe700040) 33#define AVECR IOMEM(0xfe700040)
34 34
diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c
index 624f00f70abf..5c5bcb595350 100644
--- a/arch/arm/mach-shmobile/smp-sh73a0.c
+++ b/arch/arm/mach-shmobile/smp-sh73a0.c
@@ -23,12 +23,12 @@
23#include <linux/spinlock.h> 23#include <linux/spinlock.h>
24#include <linux/io.h> 24#include <linux/io.h>
25#include <linux/delay.h> 25#include <linux/delay.h>
26#include <linux/irqchip/arm-gic.h>
26#include <mach/common.h> 27#include <mach/common.h>
27#include <asm/smp_plat.h> 28#include <asm/smp_plat.h>
28#include <mach/sh73a0.h> 29#include <mach/sh73a0.h>
29#include <asm/smp_scu.h> 30#include <asm/smp_scu.h>
30#include <asm/smp_twd.h> 31#include <asm/smp_twd.h>
31#include <asm/hardware/gic.h>
32 32
33#define WUPCR IOMEM(0xe6151010) 33#define WUPCR IOMEM(0xe6151010)
34#define SRESCR IOMEM(0xe6151018) 34#define SRESCR IOMEM(0xe6151018)
diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c
index 68dd1b69512a..4e9e69d9e7de 100644
--- a/arch/arm/mach-socfpga/platsmp.c
+++ b/arch/arm/mach-socfpga/platsmp.c
@@ -22,9 +22,9 @@
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/of.h> 23#include <linux/of.h>
24#include <linux/of_address.h> 24#include <linux/of_address.h>
25#include <linux/irqchip/arm-gic.h>
25 26
26#include <asm/cacheflush.h> 27#include <asm/cacheflush.h>
27#include <asm/hardware/gic.h>
28#include <asm/smp_scu.h> 28#include <asm/smp_scu.h>
29#include <asm/smp_plat.h> 29#include <asm/smp_plat.h>
30 30
@@ -83,8 +83,6 @@ static void __init socfpga_smp_init_cpus(void)
83 83
84 for (i = 0; i < ncores; i++) 84 for (i = 0; i < ncores; i++)
85 set_cpu_possible(i, true); 85 set_cpu_possible(i, true);
86
87 set_smp_cross_call(gic_raise_softirq);
88} 86}
89 87
90static void __init socfpga_smp_prepare_cpus(unsigned int max_cpus) 88static void __init socfpga_smp_prepare_cpus(unsigned int max_cpus)
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c
index b54baea5f809..27d68468a027 100644
--- a/arch/arm/mach-socfpga/socfpga.c
+++ b/arch/arm/mach-socfpga/socfpga.c
@@ -15,12 +15,12 @@
15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17#include <linux/dw_apb_timer.h> 17#include <linux/dw_apb_timer.h>
18#include <linux/irqchip.h>
18#include <linux/of_address.h> 19#include <linux/of_address.h>
19#include <linux/of_irq.h> 20#include <linux/of_irq.h>
20#include <linux/of_platform.h> 21#include <linux/of_platform.h>
21 22
22#include <asm/hardware/cache-l2x0.h> 23#include <asm/hardware/cache-l2x0.h>
23#include <asm/hardware/gic.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
25#include <asm/mach/map.h> 25#include <asm/mach/map.h>
26 26
@@ -62,11 +62,6 @@ static void __init socfpga_map_io(void)
62 early_printk("Early printk initialized\n"); 62 early_printk("Early printk initialized\n");
63} 63}
64 64
65const static struct of_device_id irq_match[] = {
66 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
67 {}
68};
69
70void __init socfpga_sysmgr_init(void) 65void __init socfpga_sysmgr_init(void)
71{ 66{
72 struct device_node *np; 67 struct device_node *np;
@@ -78,9 +73,9 @@ void __init socfpga_sysmgr_init(void)
78 rst_manager_base_addr = of_iomap(np, 0); 73 rst_manager_base_addr = of_iomap(np, 0);
79} 74}
80 75
81static void __init gic_init_irq(void) 76static void __init socfpga_init_irq(void)
82{ 77{
83 of_irq_init(irq_match); 78 irqchip_init();
84 socfpga_sysmgr_init(); 79 socfpga_sysmgr_init();
85} 80}
86 81
@@ -105,8 +100,7 @@ static const char *altera_dt_match[] = {
105DT_MACHINE_START(SOCFPGA, "Altera SOCFPGA") 100DT_MACHINE_START(SOCFPGA, "Altera SOCFPGA")
106 .smp = smp_ops(socfpga_smp_ops), 101 .smp = smp_ops(socfpga_smp_ops),
107 .map_io = socfpga_map_io, 102 .map_io = socfpga_map_io,
108 .init_irq = gic_init_irq, 103 .init_irq = socfpga_init_irq,
109 .handle_irq = gic_handle_irq,
110 .init_time = dw_apb_timer_init, 104 .init_time = dw_apb_timer_init,
111 .init_machine = socfpga_cyclone5_init, 105 .init_machine = socfpga_cyclone5_init,
112 .restart = socfpga_cyclone5_restart, 106 .restart = socfpga_cyclone5_restart,
diff --git a/arch/arm/mach-spear13xx/include/mach/generic.h b/arch/arm/mach-spear13xx/include/mach/generic.h
index 35e8a0074639..633e678e01a3 100644
--- a/arch/arm/mach-spear13xx/include/mach/generic.h
+++ b/arch/arm/mach-spear13xx/include/mach/generic.h
@@ -28,7 +28,6 @@ extern struct dw_dma_slave nand_write_dma_priv;
28/* Add spear13xx family function declarations here */ 28/* Add spear13xx family function declarations here */
29void __init spear_setup_of_timer(void); 29void __init spear_setup_of_timer(void);
30void __init spear13xx_map_io(void); 30void __init spear13xx_map_io(void);
31void __init spear13xx_dt_init_irq(void);
32void __init spear13xx_l2x0_init(void); 31void __init spear13xx_l2x0_init(void);
33bool dw_dma_filter(struct dma_chan *chan, void *slave); 32bool dw_dma_filter(struct dma_chan *chan, void *slave);
34void spear_restart(char, const char *); 33void spear_restart(char, const char *);
diff --git a/arch/arm/mach-spear13xx/platsmp.c b/arch/arm/mach-spear13xx/platsmp.c
index 2eaa3fa7b432..af4ade61cd95 100644
--- a/arch/arm/mach-spear13xx/platsmp.c
+++ b/arch/arm/mach-spear13xx/platsmp.c
@@ -15,8 +15,8 @@
15#include <linux/jiffies.h> 15#include <linux/jiffies.h>
16#include <linux/io.h> 16#include <linux/io.h>
17#include <linux/smp.h> 17#include <linux/smp.h>
18#include <linux/irqchip/arm-gic.h>
18#include <asm/cacheflush.h> 19#include <asm/cacheflush.h>
19#include <asm/hardware/gic.h>
20#include <asm/smp_scu.h> 20#include <asm/smp_scu.h>
21#include <mach/spear.h> 21#include <mach/spear.h>
22#include <mach/generic.h> 22#include <mach/generic.h>
@@ -104,8 +104,6 @@ static void __init spear13xx_smp_init_cpus(void)
104 104
105 for (i = 0; i < ncores; i++) 105 for (i = 0; i < ncores; i++)
106 set_cpu_possible(i, true); 106 set_cpu_possible(i, true);
107
108 set_smp_cross_call(gic_raise_softirq);
109} 107}
110 108
111static void __init spear13xx_smp_prepare_cpus(unsigned int max_cpus) 109static void __init spear13xx_smp_prepare_cpus(unsigned int max_cpus)
diff --git a/arch/arm/mach-spear13xx/spear1310.c b/arch/arm/mach-spear13xx/spear1310.c
index e77d05d48082..56214d1076ef 100644
--- a/arch/arm/mach-spear13xx/spear1310.c
+++ b/arch/arm/mach-spear13xx/spear1310.c
@@ -14,9 +14,9 @@
14#define pr_fmt(fmt) "SPEAr1310: " fmt 14#define pr_fmt(fmt) "SPEAr1310: " fmt
15 15
16#include <linux/amba/pl022.h> 16#include <linux/amba/pl022.h>
17#include <linux/irqchip.h>
17#include <linux/of_platform.h> 18#include <linux/of_platform.h>
18#include <linux/pata_arasan_cf_data.h> 19#include <linux/pata_arasan_cf_data.h>
19#include <asm/hardware/gic.h>
20#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
21#include <asm/mach/map.h> 21#include <asm/mach/map.h>
22#include <mach/generic.h> 22#include <mach/generic.h>
@@ -90,8 +90,7 @@ static void __init spear1310_map_io(void)
90DT_MACHINE_START(SPEAR1310_DT, "ST SPEAr1310 SoC with Flattened Device Tree") 90DT_MACHINE_START(SPEAR1310_DT, "ST SPEAr1310 SoC with Flattened Device Tree")
91 .smp = smp_ops(spear13xx_smp_ops), 91 .smp = smp_ops(spear13xx_smp_ops),
92 .map_io = spear1310_map_io, 92 .map_io = spear1310_map_io,
93 .init_irq = spear13xx_dt_init_irq, 93 .init_irq = irqchip_init,
94 .handle_irq = gic_handle_irq,
95 .init_time = spear13xx_timer_init, 94 .init_time = spear13xx_timer_init,
96 .init_machine = spear1310_dt_init, 95 .init_machine = spear1310_dt_init,
97 .restart = spear_restart, 96 .restart = spear_restart,
diff --git a/arch/arm/mach-spear13xx/spear1340.c b/arch/arm/mach-spear13xx/spear1340.c
index ebc254779069..9a28beb2a113 100644
--- a/arch/arm/mach-spear13xx/spear1340.c
+++ b/arch/arm/mach-spear13xx/spear1340.c
@@ -18,7 +18,7 @@
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/dw_dmac.h> 19#include <linux/dw_dmac.h>
20#include <linux/of_platform.h> 20#include <linux/of_platform.h>
21#include <asm/hardware/gic.h> 21#include <linux/irqchip.h>
22#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
23#include <mach/dma.h> 23#include <mach/dma.h>
24#include <mach/generic.h> 24#include <mach/generic.h>
@@ -184,8 +184,7 @@ static const char * const spear1340_dt_board_compat[] = {
184DT_MACHINE_START(SPEAR1340_DT, "ST SPEAr1340 SoC with Flattened Device Tree") 184DT_MACHINE_START(SPEAR1340_DT, "ST SPEAr1340 SoC with Flattened Device Tree")
185 .smp = smp_ops(spear13xx_smp_ops), 185 .smp = smp_ops(spear13xx_smp_ops),
186 .map_io = spear13xx_map_io, 186 .map_io = spear13xx_map_io,
187 .init_irq = spear13xx_dt_init_irq, 187 .init_irq = irqchip_init,
188 .handle_irq = gic_handle_irq,
189 .init_time = spear13xx_timer_init, 188 .init_time = spear13xx_timer_init,
190 .init_machine = spear1340_dt_init, 189 .init_machine = spear1340_dt_init,
191 .restart = spear_restart, 190 .restart = spear_restart,
diff --git a/arch/arm/mach-spear13xx/spear13xx.c b/arch/arm/mach-spear13xx/spear13xx.c
index 7f7acf775f07..c7d2b4a8d8cc 100644
--- a/arch/arm/mach-spear13xx/spear13xx.c
+++ b/arch/arm/mach-spear13xx/spear13xx.c
@@ -17,9 +17,8 @@
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/dw_dmac.h> 18#include <linux/dw_dmac.h>
19#include <linux/err.h> 19#include <linux/err.h>
20#include <linux/of_irq.h> 20#include <linux/of.h>
21#include <asm/hardware/cache-l2x0.h> 21#include <asm/hardware/cache-l2x0.h>
22#include <asm/hardware/gic.h>
23#include <asm/mach/map.h> 22#include <asm/mach/map.h>
24#include <asm/smp_twd.h> 23#include <asm/smp_twd.h>
25#include <mach/dma.h> 24#include <mach/dma.h>
@@ -182,13 +181,3 @@ void __init spear13xx_timer_init(void)
182 spear_setup_of_timer(); 181 spear_setup_of_timer();
183 twd_local_timer_of_register(); 182 twd_local_timer_of_register();
184} 183}
185
186static const struct of_device_id gic_of_match[] __initconst = {
187 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init },
188 { /* Sentinel */ }
189};
190
191void __init spear13xx_dt_init_irq(void)
192{
193 of_irq_init(gic_of_match);
194}
diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h
index 46b8f7e4d380..df310799e416 100644
--- a/arch/arm/mach-spear3xx/include/mach/generic.h
+++ b/arch/arm/mach-spear3xx/include/mach/generic.h
@@ -30,7 +30,6 @@ extern struct pl08x_platform_data pl080_plat_data;
30void __init spear_setup_of_timer(void); 30void __init spear_setup_of_timer(void);
31void __init spear3xx_clk_init(void); 31void __init spear3xx_clk_init(void);
32void __init spear3xx_map_io(void); 32void __init spear3xx_map_io(void);
33void __init spear3xx_dt_init_irq(void);
34 33
35void spear_restart(char, const char *); 34void spear_restart(char, const char *);
36 35
diff --git a/arch/arm/mach-spear3xx/spear300.c b/arch/arm/mach-spear3xx/spear300.c
index 2630efa93f5e..bbc9b7e9c62c 100644
--- a/arch/arm/mach-spear3xx/spear300.c
+++ b/arch/arm/mach-spear3xx/spear300.c
@@ -14,8 +14,8 @@
14#define pr_fmt(fmt) "SPEAr300: " fmt 14#define pr_fmt(fmt) "SPEAr300: " fmt
15 15
16#include <linux/amba/pl08x.h> 16#include <linux/amba/pl08x.h>
17#include <linux/irqchip.h>
17#include <linux/of_platform.h> 18#include <linux/of_platform.h>
18#include <asm/hardware/vic.h>
19#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
20#include <mach/generic.h> 20#include <mach/generic.h>
21#include <mach/spear.h> 21#include <mach/spear.h>
@@ -212,8 +212,7 @@ static void __init spear300_map_io(void)
212 212
213DT_MACHINE_START(SPEAR300_DT, "ST SPEAr300 SoC with Flattened Device Tree") 213DT_MACHINE_START(SPEAR300_DT, "ST SPEAr300 SoC with Flattened Device Tree")
214 .map_io = spear300_map_io, 214 .map_io = spear300_map_io,
215 .init_irq = spear3xx_dt_init_irq, 215 .init_irq = irqchip_init,
216 .handle_irq = vic_handle_irq,
217 .init_time = spear3xx_timer_init, 216 .init_time = spear3xx_timer_init,
218 .init_machine = spear300_dt_init, 217 .init_machine = spear300_dt_init,
219 .restart = spear_restart, 218 .restart = spear_restart,
diff --git a/arch/arm/mach-spear3xx/spear310.c b/arch/arm/mach-spear3xx/spear310.c
index b6147eaebcde..c13a434a8195 100644
--- a/arch/arm/mach-spear3xx/spear310.c
+++ b/arch/arm/mach-spear3xx/spear310.c
@@ -15,8 +15,8 @@
15 15
16#include <linux/amba/pl08x.h> 16#include <linux/amba/pl08x.h>
17#include <linux/amba/serial.h> 17#include <linux/amba/serial.h>
18#include <linux/irqchip.h>
18#include <linux/of_platform.h> 19#include <linux/of_platform.h>
19#include <asm/hardware/vic.h>
20#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
21#include <mach/generic.h> 21#include <mach/generic.h>
22#include <mach/spear.h> 22#include <mach/spear.h>
@@ -254,8 +254,7 @@ static void __init spear310_map_io(void)
254 254
255DT_MACHINE_START(SPEAR310_DT, "ST SPEAr310 SoC with Flattened Device Tree") 255DT_MACHINE_START(SPEAR310_DT, "ST SPEAr310 SoC with Flattened Device Tree")
256 .map_io = spear310_map_io, 256 .map_io = spear310_map_io,
257 .init_irq = spear3xx_dt_init_irq, 257 .init_irq = irqchip_init,
258 .handle_irq = vic_handle_irq,
259 .init_time = spear3xx_timer_init, 258 .init_time = spear3xx_timer_init,
260 .init_machine = spear310_dt_init, 259 .init_machine = spear310_dt_init,
261 .restart = spear_restart, 260 .restart = spear_restart,
diff --git a/arch/arm/mach-spear3xx/spear320.c b/arch/arm/mach-spear3xx/spear320.c
index 53160f713afe..e1c77079a3e5 100644
--- a/arch/arm/mach-spear3xx/spear320.c
+++ b/arch/arm/mach-spear3xx/spear320.c
@@ -16,8 +16,8 @@
16#include <linux/amba/pl022.h> 16#include <linux/amba/pl022.h>
17#include <linux/amba/pl08x.h> 17#include <linux/amba/pl08x.h>
18#include <linux/amba/serial.h> 18#include <linux/amba/serial.h>
19#include <linux/irqchip.h>
19#include <linux/of_platform.h> 20#include <linux/of_platform.h>
20#include <asm/hardware/vic.h>
21#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
22#include <mach/generic.h> 22#include <mach/generic.h>
23#include <mach/spear.h> 23#include <mach/spear.h>
@@ -268,8 +268,7 @@ static void __init spear320_map_io(void)
268 268
269DT_MACHINE_START(SPEAR320_DT, "ST SPEAr320 SoC with Flattened Device Tree") 269DT_MACHINE_START(SPEAR320_DT, "ST SPEAr320 SoC with Flattened Device Tree")
270 .map_io = spear320_map_io, 270 .map_io = spear320_map_io,
271 .init_irq = spear3xx_dt_init_irq, 271 .init_irq = irqchip_init,
272 .handle_irq = vic_handle_irq,
273 .init_time = spear3xx_timer_init, 272 .init_time = spear3xx_timer_init,
274 .init_machine = spear320_dt_init, 273 .init_machine = spear320_dt_init,
275 .restart = spear_restart, 274 .restart = spear_restart,
diff --git a/arch/arm/mach-spear3xx/spear3xx.c b/arch/arm/mach-spear3xx/spear3xx.c
index 89f4c58908e3..b2ba516ca2d4 100644
--- a/arch/arm/mach-spear3xx/spear3xx.c
+++ b/arch/arm/mach-spear3xx/spear3xx.c
@@ -15,11 +15,8 @@
15 15
16#include <linux/amba/pl022.h> 16#include <linux/amba/pl022.h>
17#include <linux/amba/pl08x.h> 17#include <linux/amba/pl08x.h>
18#include <linux/irqchip/spear-shirq.h>
19#include <linux/of_irq.h>
20#include <linux/io.h> 18#include <linux/io.h>
21#include <asm/hardware/pl080.h> 19#include <asm/hardware/pl080.h>
22#include <asm/hardware/vic.h>
23#include <plat/pl080.h> 20#include <plat/pl080.h>
24#include <mach/generic.h> 21#include <mach/generic.h>
25#include <mach/spear.h> 22#include <mach/spear.h>
@@ -115,16 +112,3 @@ void __init spear3xx_timer_init(void)
115 112
116 spear_setup_of_timer(); 113 spear_setup_of_timer();
117} 114}
118
119static const struct of_device_id vic_of_match[] __initconst = {
120 { .compatible = "arm,pl190-vic", .data = vic_of_init, },
121 { .compatible = "st,spear300-shirq", .data = spear300_shirq_of_init, },
122 { .compatible = "st,spear310-shirq", .data = spear310_shirq_of_init, },
123 { .compatible = "st,spear320-shirq", .data = spear320_shirq_of_init, },
124 { /* Sentinel */ }
125};
126
127void __init spear3xx_dt_init_irq(void)
128{
129 of_irq_init(vic_of_match);
130}
diff --git a/arch/arm/mach-spear6xx/spear6xx.c b/arch/arm/mach-spear6xx/spear6xx.c
index 1f85bc07c6cb..b8bd33ca88bd 100644
--- a/arch/arm/mach-spear6xx/spear6xx.c
+++ b/arch/arm/mach-spear6xx/spear6xx.c
@@ -16,12 +16,11 @@
16#include <linux/amba/pl08x.h> 16#include <linux/amba/pl08x.h>
17#include <linux/clk.h> 17#include <linux/clk.h>
18#include <linux/err.h> 18#include <linux/err.h>
19#include <linux/irqchip.h>
19#include <linux/of.h> 20#include <linux/of.h>
20#include <linux/of_address.h> 21#include <linux/of_address.h>
21#include <linux/of_irq.h>
22#include <linux/of_platform.h> 22#include <linux/of_platform.h>
23#include <asm/hardware/pl080.h> 23#include <asm/hardware/pl080.h>
24#include <asm/hardware/vic.h>
25#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
26#include <asm/mach/time.h> 25#include <asm/mach/time.h>
27#include <asm/mach/map.h> 26#include <asm/mach/map.h>
@@ -421,20 +420,9 @@ static const char *spear600_dt_board_compat[] = {
421 NULL 420 NULL
422}; 421};
423 422
424static const struct of_device_id vic_of_match[] __initconst = {
425 { .compatible = "arm,pl190-vic", .data = vic_of_init, },
426 { /* Sentinel */ }
427};
428
429static void __init spear6xx_dt_init_irq(void)
430{
431 of_irq_init(vic_of_match);
432}
433
434DT_MACHINE_START(SPEAR600_DT, "ST SPEAr600 (Flattened Device Tree)") 423DT_MACHINE_START(SPEAR600_DT, "ST SPEAr600 (Flattened Device Tree)")
435 .map_io = spear6xx_map_io, 424 .map_io = spear6xx_map_io,
436 .init_irq = spear6xx_dt_init_irq, 425 .init_irq = irqchip_init,
437 .handle_irq = vic_handle_irq,
438 .init_time = spear6xx_timer_init, 426 .init_time = spear6xx_timer_init,
439 .init_machine = spear600_dt_init, 427 .init_machine = spear600_dt_init,
440 .restart = spear_restart, 428 .restart = spear_restart,
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index cba4cd3bf93a..fb8fbcecb17f 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -21,8 +21,6 @@
21 21
22#include <linux/irqchip/sunxi.h> 22#include <linux/irqchip/sunxi.h>
23 23
24#include <asm/hardware/vic.h>
25
26#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
27#include <asm/mach/map.h> 25#include <asm/mach/map.h>
28 26
@@ -80,8 +78,8 @@ static void __init sunxi_dt_init(void)
80} 78}
81 79
82static const char * const sunxi_board_dt_compat[] = { 80static const char * const sunxi_board_dt_compat[] = {
83 "allwinner,sun4i", 81 "allwinner,sun4i-a10",
84 "allwinner,sun5i", 82 "allwinner,sun5i-a13",
85 NULL, 83 NULL,
86}; 84};
87 85
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c
index 3b9956aabf5a..5ed81bab2d4b 100644
--- a/arch/arm/mach-tegra/board-dt-tegra20.c
+++ b/arch/arm/mach-tegra/board-dt-tegra20.c
@@ -25,7 +25,6 @@
25#include <linux/of.h> 25#include <linux/of.h>
26#include <linux/of_address.h> 26#include <linux/of_address.h>
27#include <linux/of_fdt.h> 27#include <linux/of_fdt.h>
28#include <linux/of_irq.h>
29#include <linux/of_platform.h> 28#include <linux/of_platform.h>
30#include <linux/pda_power.h> 29#include <linux/pda_power.h>
31#include <linux/platform_data/tegra_usb.h> 30#include <linux/platform_data/tegra_usb.h>
@@ -34,7 +33,6 @@
34#include <linux/i2c-tegra.h> 33#include <linux/i2c-tegra.h>
35#include <linux/usb/tegra_usb_phy.h> 34#include <linux/usb/tegra_usb_phy.h>
36 35
37#include <asm/hardware/gic.h>
38#include <asm/mach-types.h> 36#include <asm/mach-types.h>
39#include <asm/mach/arch.h> 37#include <asm/mach/arch.h>
40#include <asm/mach/time.h> 38#include <asm/mach/time.h>
@@ -202,7 +200,6 @@ DT_MACHINE_START(TEGRA_DT, "nVidia Tegra20 (Flattened Device Tree)")
202 .smp = smp_ops(tegra_smp_ops), 200 .smp = smp_ops(tegra_smp_ops),
203 .init_early = tegra20_init_early, 201 .init_early = tegra20_init_early,
204 .init_irq = tegra_dt_init_irq, 202 .init_irq = tegra_dt_init_irq,
205 .handle_irq = gic_handle_irq,
206 .init_time = tegra_init_timer, 203 .init_time = tegra_init_timer,
207 .init_machine = tegra_dt_init, 204 .init_machine = tegra_dt_init,
208 .init_late = tegra_dt_init_late, 205 .init_late = tegra_dt_init_late,
diff --git a/arch/arm/mach-tegra/board-dt-tegra30.c b/arch/arm/mach-tegra/board-dt-tegra30.c
index 381b2f25f0b4..12dc2ddeca64 100644
--- a/arch/arm/mach-tegra/board-dt-tegra30.c
+++ b/arch/arm/mach-tegra/board-dt-tegra30.c
@@ -31,7 +31,6 @@
31#include <linux/of_platform.h> 31#include <linux/of_platform.h>
32 32
33#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
34#include <asm/hardware/gic.h>
35 34
36#include "board.h" 35#include "board.h"
37#include "clock.h" 36#include "clock.h"
@@ -112,7 +111,6 @@ DT_MACHINE_START(TEGRA30_DT, "NVIDIA Tegra30 (Flattened Device Tree)")
112 .map_io = tegra_map_common_io, 111 .map_io = tegra_map_common_io,
113 .init_early = tegra30_init_early, 112 .init_early = tegra30_init_early,
114 .init_irq = tegra_dt_init_irq, 113 .init_irq = tegra_dt_init_irq,
115 .handle_irq = gic_handle_irq,
116 .init_time = tegra_init_timer, 114 .init_time = tegra_init_timer,
117 .init_machine = tegra30_dt_init, 115 .init_machine = tegra30_dt_init,
118 .init_late = tegra_init_late, 116 .init_late = tegra_init_late,
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index d54cfc54b9fe..3599959517b3 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -21,10 +21,9 @@
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/clk.h> 22#include <linux/clk.h>
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/of_irq.h> 24#include <linux/irqchip.h>
25 25
26#include <asm/hardware/cache-l2x0.h> 26#include <asm/hardware/cache-l2x0.h>
27#include <asm/hardware/gic.h>
28 27
29#include <mach/powergate.h> 28#include <mach/powergate.h>
30 29
@@ -57,15 +56,10 @@ u32 tegra_uart_config[4] = {
57}; 56};
58 57
59#ifdef CONFIG_OF 58#ifdef CONFIG_OF
60static const struct of_device_id tegra_dt_irq_match[] __initconst = {
61 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init },
62 { }
63};
64
65void __init tegra_dt_init_irq(void) 59void __init tegra_dt_init_irq(void)
66{ 60{
67 tegra_init_irq(); 61 tegra_init_irq();
68 of_irq_init(tegra_dt_irq_match); 62 irqchip_init();
69} 63}
70#endif 64#endif
71 65
diff --git a/arch/arm/mach-tegra/irq.c b/arch/arm/mach-tegra/irq.c
index b7886f183511..2ff2128cb9d8 100644
--- a/arch/arm/mach-tegra/irq.c
+++ b/arch/arm/mach-tegra/irq.c
@@ -22,8 +22,7 @@
22#include <linux/irq.h> 22#include <linux/irq.h>
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/of.h> 24#include <linux/of.h>
25 25#include <linux/irqchip/arm-gic.h>
26#include <asm/hardware/gic.h>
27 26
28#include "board.h" 27#include "board.h"
29#include "iomap.h" 28#include "iomap.h"
diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c
index 53d085871798..bffcd643d7a3 100644
--- a/arch/arm/mach-tegra/pcie.c
+++ b/arch/arm/mach-tegra/pcie.c
@@ -331,7 +331,7 @@ static struct pci_ops tegra_pcie_ops = {
331 .write = tegra_pcie_write_conf, 331 .write = tegra_pcie_write_conf,
332}; 332};
333 333
334static void __devinit tegra_pcie_fixup_bridge(struct pci_dev *dev) 334static void tegra_pcie_fixup_bridge(struct pci_dev *dev)
335{ 335{
336 u16 reg; 336 u16 reg;
337 337
@@ -345,7 +345,7 @@ static void __devinit tegra_pcie_fixup_bridge(struct pci_dev *dev)
345DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, tegra_pcie_fixup_bridge); 345DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, tegra_pcie_fixup_bridge);
346 346
347/* Tegra PCIE root complex wrongly reports device class */ 347/* Tegra PCIE root complex wrongly reports device class */
348static void __devinit tegra_pcie_fixup_class(struct pci_dev *dev) 348static void tegra_pcie_fixup_class(struct pci_dev *dev)
349{ 349{
350 dev->class = PCI_CLASS_BRIDGE_PCI << 8; 350 dev->class = PCI_CLASS_BRIDGE_PCI << 8;
351} 351}
@@ -353,7 +353,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0bf0, tegra_pcie_fixup_class);
353DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0bf1, tegra_pcie_fixup_class); 353DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA, 0x0bf1, tegra_pcie_fixup_class);
354 354
355/* Tegra PCIE requires relaxed ordering */ 355/* Tegra PCIE requires relaxed ordering */
356static void __devinit tegra_pcie_relax_enable(struct pci_dev *dev) 356static void tegra_pcie_relax_enable(struct pci_dev *dev)
357{ 357{
358 pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_RELAX_EN); 358 pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_RELAX_EN);
359} 359}
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
index 1b926df99c4b..18d7290cf93b 100644
--- a/arch/arm/mach-tegra/platsmp.c
+++ b/arch/arm/mach-tegra/platsmp.c
@@ -18,9 +18,9 @@
18#include <linux/jiffies.h> 18#include <linux/jiffies.h>
19#include <linux/smp.h> 19#include <linux/smp.h>
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/irqchip/arm-gic.h>
21 22
22#include <asm/cacheflush.h> 23#include <asm/cacheflush.h>
23#include <asm/hardware/gic.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/smp_scu.h> 25#include <asm/smp_scu.h>
26 26
@@ -159,8 +159,6 @@ static void __init tegra_smp_init_cpus(void)
159 159
160 for (i = 0; i < ncores; i++) 160 for (i = 0; i < ncores; i++)
161 set_cpu_possible(i, true); 161 set_cpu_possible(i, true);
162
163 set_smp_cross_call(gic_raise_softirq);
164} 162}
165 163
166static void __init tegra_smp_prepare_cpus(unsigned int max_cpus) 164static void __init tegra_smp_prepare_cpus(unsigned int max_cpus)
diff --git a/arch/arm/mach-tegra/tegra2_emc.c b/arch/arm/mach-tegra/tegra2_emc.c
index 837c7b9ea63b..e18aa2f83ebf 100644
--- a/arch/arm/mach-tegra/tegra2_emc.c
+++ b/arch/arm/mach-tegra/tegra2_emc.c
@@ -268,7 +268,7 @@ static struct tegra_emc_pdata *tegra_emc_dt_parse_pdata(
268} 268}
269#endif 269#endif
270 270
271static struct tegra_emc_pdata __devinit *tegra_emc_fill_pdata(struct platform_device *pdev) 271static struct tegra_emc_pdata *tegra_emc_fill_pdata(struct platform_device *pdev)
272{ 272{
273 struct clk *c = clk_get_sys(NULL, "emc"); 273 struct clk *c = clk_get_sys(NULL, "emc");
274 struct tegra_emc_pdata *pdata; 274 struct tegra_emc_pdata *pdata;
@@ -296,7 +296,7 @@ static struct tegra_emc_pdata __devinit *tegra_emc_fill_pdata(struct platform_de
296 return pdata; 296 return pdata;
297} 297}
298 298
299static int __devinit tegra_emc_probe(struct platform_device *pdev) 299static int tegra_emc_probe(struct platform_device *pdev)
300{ 300{
301 struct tegra_emc_pdata *pdata; 301 struct tegra_emc_pdata *pdata;
302 struct resource *res; 302 struct resource *res;
@@ -333,7 +333,7 @@ static int __devinit tegra_emc_probe(struct platform_device *pdev)
333 return 0; 333 return 0;
334} 334}
335 335
336static struct of_device_id tegra_emc_of_match[] __devinitdata = { 336static struct of_device_id tegra_emc_of_match[] = {
337 { .compatible = "nvidia,tegra20-emc", }, 337 { .compatible = "nvidia,tegra20-emc", },
338 { }, 338 { },
339}; 339};
diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c
index b0036e519a15..eba0969ded19 100644
--- a/arch/arm/mach-tegra/timer.c
+++ b/arch/arm/mach-tegra/timer.c
@@ -259,14 +259,10 @@ void __init tegra_init_timer(void)
259 BUG(); 259 BUG();
260 } 260 }
261 261
262 clockevents_calc_mult_shift(&tegra_clockevent, 1000000, 5);
263 tegra_clockevent.max_delta_ns =
264 clockevent_delta2ns(0x1fffffff, &tegra_clockevent);
265 tegra_clockevent.min_delta_ns =
266 clockevent_delta2ns(0x1, &tegra_clockevent);
267 tegra_clockevent.cpumask = cpu_all_mask; 262 tegra_clockevent.cpumask = cpu_all_mask;
268 tegra_clockevent.irq = tegra_timer_irq.irq; 263 tegra_clockevent.irq = tegra_timer_irq.irq;
269 clockevents_register_device(&tegra_clockevent); 264 clockevents_config_and_register(&tegra_clockevent, 1000000,
265 0x1, 0x1fffffff);
270#ifdef CONFIG_HAVE_ARM_TWD 266#ifdef CONFIG_HAVE_ARM_TWD
271 twd_local_timer_of_register(); 267 twd_local_timer_of_register();
272#endif 268#endif
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index 100a8b764dad..12060ae4e8f1 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -31,11 +31,11 @@
31#include <linux/dma-mapping.h> 31#include <linux/dma-mapping.h>
32#include <linux/platform_data/clk-u300.h> 32#include <linux/platform_data/clk-u300.h>
33#include <linux/platform_data/pinctrl-coh901.h> 33#include <linux/platform_data/pinctrl-coh901.h>
34#include <linux/irqchip/arm-vic.h>
34 35
35#include <asm/types.h> 36#include <asm/types.h>
36#include <asm/setup.h> 37#include <asm/setup.h>
37#include <asm/memory.h> 38#include <asm/memory.h>
38#include <asm/hardware/vic.h>
39#include <asm/mach/map.h> 39#include <asm/mach/map.h>
40#include <asm/mach-types.h> 40#include <asm/mach-types.h>
41#include <asm/mach/arch.h> 41#include <asm/mach/arch.h>
@@ -1779,7 +1779,6 @@ MACHINE_START(U300, "Ericsson AB U335 S335/B335 Prototype Board")
1779 .map_io = u300_map_io, 1779 .map_io = u300_map_io,
1780 .nr_irqs = 0, 1780 .nr_irqs = 0,
1781 .init_irq = u300_init_irq, 1781 .init_irq = u300_init_irq,
1782 .handle_irq = vic_handle_irq,
1783 .init_time = u300_timer_init, 1782 .init_time = u300_timer_init,
1784 .init_machine = u300_init_machine, 1783 .init_machine = u300_init_machine,
1785 .restart = u300_restart, 1784 .restart = u300_restart,
diff --git a/arch/arm/mach-u300/dummyspichip.c b/arch/arm/mach-u300/dummyspichip.c
index 03f793612594..2785cb67b5e8 100644
--- a/arch/arm/mach-u300/dummyspichip.c
+++ b/arch/arm/mach-u300/dummyspichip.c
@@ -222,7 +222,7 @@ static ssize_t dummy_looptest(struct device *dev,
222 222
223static DEVICE_ATTR(looptest, S_IRUGO, dummy_looptest, NULL); 223static DEVICE_ATTR(looptest, S_IRUGO, dummy_looptest, NULL);
224 224
225static int __devinit pl022_dummy_probe(struct spi_device *spi) 225static int pl022_dummy_probe(struct spi_device *spi)
226{ 226{
227 struct dummy *p_dummy; 227 struct dummy *p_dummy;
228 int status; 228 int status;
@@ -251,7 +251,7 @@ out_dev_create_looptest_failed:
251 return status; 251 return status;
252} 252}
253 253
254static int __devexit pl022_dummy_remove(struct spi_device *spi) 254static int pl022_dummy_remove(struct spi_device *spi)
255{ 255{
256 struct dummy *p_dummy = dev_get_drvdata(&spi->dev); 256 struct dummy *p_dummy = dev_get_drvdata(&spi->dev);
257 257
@@ -269,7 +269,7 @@ static struct spi_driver pl022_dummy_driver = {
269 .owner = THIS_MODULE, 269 .owner = THIS_MODULE,
270 }, 270 },
271 .probe = pl022_dummy_probe, 271 .probe = pl022_dummy_probe,
272 .remove = __devexit_p(pl022_dummy_remove), 272 .remove = pl022_dummy_remove,
273}; 273};
274 274
275static int __init pl022_init_dummy(void) 275static int __init pl022_init_dummy(void)
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index e1dfa24b4fb9..0e928d281759 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -40,7 +40,6 @@
40 40
41#include <asm/mach-types.h> 41#include <asm/mach-types.h>
42#include <asm/mach/arch.h> 42#include <asm/mach/arch.h>
43#include <asm/hardware/gic.h>
44 43
45#include <mach/hardware.h> 44#include <mach/hardware.h>
46#include <mach/setup.h> 45#include <mach/setup.h>
@@ -752,7 +751,6 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
752 .init_irq = ux500_init_irq, 751 .init_irq = ux500_init_irq,
753 /* we re-use nomadik timer here */ 752 /* we re-use nomadik timer here */
754 .init_time = ux500_timer_init, 753 .init_time = ux500_timer_init,
755 .handle_irq = gic_handle_irq,
756 .init_machine = mop500_init_machine, 754 .init_machine = mop500_init_machine,
757 .init_late = ux500_init_late, 755 .init_late = ux500_init_late,
758MACHINE_END 756MACHINE_END
@@ -762,7 +760,6 @@ MACHINE_START(U8520, "ST-Ericsson U8520 Platform HREFP520")
762 .map_io = u8500_map_io, 760 .map_io = u8500_map_io,
763 .init_irq = ux500_init_irq, 761 .init_irq = ux500_init_irq,
764 .init_time = ux500_timer_init, 762 .init_time = ux500_timer_init,
765 .handle_irq = gic_handle_irq,
766 .init_machine = mop500_init_machine, 763 .init_machine = mop500_init_machine,
767 .init_late = ux500_init_late, 764 .init_late = ux500_init_late,
768MACHINE_END 765MACHINE_END
@@ -773,7 +770,6 @@ MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
773 .map_io = u8500_map_io, 770 .map_io = u8500_map_io,
774 .init_irq = ux500_init_irq, 771 .init_irq = ux500_init_irq,
775 .init_time = ux500_timer_init, 772 .init_time = ux500_timer_init,
776 .handle_irq = gic_handle_irq,
777 .init_machine = hrefv60_init_machine, 773 .init_machine = hrefv60_init_machine,
778 .init_late = ux500_init_late, 774 .init_late = ux500_init_late,
779MACHINE_END 775MACHINE_END
@@ -785,7 +781,6 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
785 .init_irq = ux500_init_irq, 781 .init_irq = ux500_init_irq,
786 /* we re-use nomadik timer here */ 782 /* we re-use nomadik timer here */
787 .init_time = ux500_timer_init, 783 .init_time = ux500_timer_init,
788 .handle_irq = gic_handle_irq,
789 .init_machine = snowball_init_machine, 784 .init_machine = snowball_init_machine,
790 .init_late = NULL, 785 .init_late = NULL,
791MACHINE_END 786MACHINE_END
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index 7875d3c85df1..218a6b1ada7e 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -27,7 +27,6 @@
27#include <asm/pmu.h> 27#include <asm/pmu.h>
28#include <asm/mach/map.h> 28#include <asm/mach/map.h>
29#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
30#include <asm/hardware/gic.h>
31 30
32#include <mach/hardware.h> 31#include <mach/hardware.h>
33#include <mach/setup.h> 32#include <mach/setup.h>
@@ -285,7 +284,8 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
285 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL), 284 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL),
286 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL), 285 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
287 /* Requires device name bindings. */ 286 /* Requires device name bindings. */
288 OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL), 287 OF_DEV_AUXDATA("stericsson,nmk_pinctrl", U8500_PRCMU_BASE,
288 "pinctrl-db8500", NULL),
289 /* Requires clock name and DMA bindings. */ 289 /* Requires clock name and DMA bindings. */
290 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000, 290 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000,
291 "ux500-msp-i2s.0", &msp0_platform_data), 291 "ux500-msp-i2s.0", &msp0_platform_data),
@@ -341,7 +341,6 @@ DT_MACHINE_START(U8500_DT, "ST-Ericsson Ux5x0 platform (Device Tree Support)")
341 .init_irq = ux500_init_irq, 341 .init_irq = ux500_init_irq,
342 /* we re-use nomadik timer here */ 342 /* we re-use nomadik timer here */
343 .init_time = ux500_timer_init, 343 .init_time = ux500_timer_init,
344 .handle_irq = gic_handle_irq,
345 .init_machine = u8500_init_machine, 344 .init_machine = u8500_init_machine,
346 .init_late = NULL, 345 .init_late = NULL,
347 .dt_compat = stericsson_dt_platform_compat, 346 .dt_compat = stericsson_dt_platform_compat,
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c
index 721e7b4275f3..5dd90d31ffc3 100644
--- a/arch/arm/mach-ux500/cpu.c
+++ b/arch/arm/mach-ux500/cpu.c
@@ -17,9 +17,10 @@
17#include <linux/of.h> 17#include <linux/of.h>
18#include <linux/of_irq.h> 18#include <linux/of_irq.h>
19#include <linux/irq.h> 19#include <linux/irq.h>
20#include <linux/irqchip.h>
21#include <linux/irqchip/arm-gic.h>
20#include <linux/platform_data/clk-ux500.h> 22#include <linux/platform_data/clk-ux500.h>
21 23
22#include <asm/hardware/gic.h>
23#include <asm/mach/map.h> 24#include <asm/mach/map.h>
24 25
25#include <mach/hardware.h> 26#include <mach/hardware.h>
@@ -42,11 +43,6 @@ void __iomem *_PRCMU_BASE;
42 * This feels fragile because it depends on the gpio device getting probed 43 * This feels fragile because it depends on the gpio device getting probed
43 * _before_ any device uses the gpio interrupts. 44 * _before_ any device uses the gpio interrupts.
44*/ 45*/
45static const struct of_device_id ux500_dt_irq_match[] = {
46 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
47 {},
48};
49
50void __init ux500_init_irq(void) 46void __init ux500_init_irq(void)
51{ 47{
52 void __iomem *dist_base; 48 void __iomem *dist_base;
@@ -62,7 +58,7 @@ void __init ux500_init_irq(void)
62 58
63#ifdef CONFIG_OF 59#ifdef CONFIG_OF
64 if (of_have_populated_dt()) 60 if (of_have_populated_dt())
65 of_irq_init(ux500_dt_irq_match); 61 irqchip_init();
66 else 62 else
67#endif 63#endif
68 gic_init(0, 29, dist_base, cpu_base); 64 gic_init(0, 29, dist_base, cpu_base);
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
index 3db7782f3afb..b8adac93421f 100644
--- a/arch/arm/mach-ux500/platsmp.c
+++ b/arch/arm/mach-ux500/platsmp.c
@@ -16,9 +16,9 @@
16#include <linux/device.h> 16#include <linux/device.h>
17#include <linux/smp.h> 17#include <linux/smp.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <linux/irqchip/arm-gic.h>
19 20
20#include <asm/cacheflush.h> 21#include <asm/cacheflush.h>
21#include <asm/hardware/gic.h>
22#include <asm/smp_plat.h> 22#include <asm/smp_plat.h>
23#include <asm/smp_scu.h> 23#include <asm/smp_scu.h>
24#include <mach/hardware.h> 24#include <mach/hardware.h>
@@ -91,7 +91,7 @@ static int __cpuinit ux500_boot_secondary(unsigned int cpu, struct task_struct *
91 */ 91 */
92 write_pen_release(cpu_logical_map(cpu)); 92 write_pen_release(cpu_logical_map(cpu));
93 93
94 smp_send_reschedule(cpu); 94 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
95 95
96 timeout = jiffies + (1 * HZ); 96 timeout = jiffies + (1 * HZ);
97 while (time_before(jiffies, timeout)) { 97 while (time_before(jiffies, timeout)) {
@@ -155,8 +155,6 @@ static void __init ux500_smp_init_cpus(void)
155 155
156 for (i = 0; i < ncores; i++) 156 for (i = 0; i < ncores; i++)
157 set_cpu_possible(i, true); 157 set_cpu_possible(i, true);
158
159 set_smp_cross_call(gic_raise_softirq);
160} 158}
161 159
162static void __init ux500_smp_prepare_cpus(unsigned int max_cpus) 160static void __init ux500_smp_prepare_cpus(unsigned int max_cpus)
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index d5ddc0c77f5b..a42b89083eb2 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -32,6 +32,7 @@
32#include <linux/amba/mmci.h> 32#include <linux/amba/mmci.h>
33#include <linux/amba/pl022.h> 33#include <linux/amba/pl022.h>
34#include <linux/io.h> 34#include <linux/io.h>
35#include <linux/irqchip/arm-vic.h>
35#include <linux/irqchip/versatile-fpga.h> 36#include <linux/irqchip/versatile-fpga.h>
36#include <linux/gfp.h> 37#include <linux/gfp.h>
37#include <linux/clkdev.h> 38#include <linux/clkdev.h>
@@ -40,7 +41,6 @@
40#include <asm/irq.h> 41#include <asm/irq.h>
41#include <asm/hardware/arm_timer.h> 42#include <asm/hardware/arm_timer.h>
42#include <asm/hardware/icst.h> 43#include <asm/hardware/icst.h>
43#include <asm/hardware/vic.h>
44#include <asm/mach-types.h> 44#include <asm/mach-types.h>
45 45
46#include <asm/mach/arch.h> 46#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-versatile/include/mach/irqs.h b/arch/arm/mach-versatile/include/mach/irqs.h
index bf44c61bd1f6..0fd771ca617b 100644
--- a/arch/arm/mach-versatile/include/mach/irqs.h
+++ b/arch/arm/mach-versatile/include/mach/irqs.h
@@ -25,7 +25,7 @@
25 * IRQ interrupts definitions are the same as the INT definitions 25 * IRQ interrupts definitions are the same as the INT definitions
26 * held within platform.h 26 * held within platform.h
27 */ 27 */
28#define IRQ_VIC_START 0 28#define IRQ_VIC_START 32
29#define IRQ_WDOGINT (IRQ_VIC_START + INT_WDOGINT) 29#define IRQ_WDOGINT (IRQ_VIC_START + INT_WDOGINT)
30#define IRQ_SOFTINT (IRQ_VIC_START + INT_SOFTINT) 30#define IRQ_SOFTINT (IRQ_VIC_START + INT_SOFTINT)
31#define IRQ_COMMRx (IRQ_VIC_START + INT_COMMRx) 31#define IRQ_COMMRx (IRQ_VIC_START + INT_COMMRx)
@@ -100,7 +100,7 @@
100/* 100/*
101 * Secondary interrupt controller 101 * Secondary interrupt controller
102 */ 102 */
103#define IRQ_SIC_START 32 103#define IRQ_SIC_START 64
104#define IRQ_SIC_MMCI0B (IRQ_SIC_START + SIC_INT_MMCI0B) 104#define IRQ_SIC_MMCI0B (IRQ_SIC_START + SIC_INT_MMCI0B)
105#define IRQ_SIC_MMCI1B (IRQ_SIC_START + SIC_INT_MMCI1B) 105#define IRQ_SIC_MMCI1B (IRQ_SIC_START + SIC_INT_MMCI1B)
106#define IRQ_SIC_KMI0 (IRQ_SIC_START + SIC_INT_KMI0) 106#define IRQ_SIC_KMI0 (IRQ_SIC_START + SIC_INT_KMI0)
@@ -120,7 +120,7 @@
120#define IRQ_SIC_PCI1 (IRQ_SIC_START + SIC_INT_PCI1) 120#define IRQ_SIC_PCI1 (IRQ_SIC_START + SIC_INT_PCI1)
121#define IRQ_SIC_PCI2 (IRQ_SIC_START + SIC_INT_PCI2) 121#define IRQ_SIC_PCI2 (IRQ_SIC_START + SIC_INT_PCI2)
122#define IRQ_SIC_PCI3 (IRQ_SIC_START + SIC_INT_PCI3) 122#define IRQ_SIC_PCI3 (IRQ_SIC_START + SIC_INT_PCI3)
123#define IRQ_SIC_END 63 123#define IRQ_SIC_END 95
124 124
125#define IRQ_GPIO0_START (IRQ_SIC_END + 1) 125#define IRQ_GPIO0_START (IRQ_SIC_END + 1)
126#define IRQ_GPIO0_END (IRQ_GPIO0_START + 31) 126#define IRQ_GPIO0_END (IRQ_GPIO0_START + 31)
diff --git a/arch/arm/mach-versatile/versatile_ab.c b/arch/arm/mach-versatile/versatile_ab.c
index 187c1da2c4bb..1caef1093793 100644
--- a/arch/arm/mach-versatile/versatile_ab.c
+++ b/arch/arm/mach-versatile/versatile_ab.c
@@ -26,7 +26,6 @@
26 26
27#include <mach/hardware.h> 27#include <mach/hardware.h>
28#include <asm/irq.h> 28#include <asm/irq.h>
29#include <asm/hardware/vic.h>
30#include <asm/mach-types.h> 29#include <asm/mach-types.h>
31 30
32#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
@@ -39,7 +38,6 @@ MACHINE_START(VERSATILE_AB, "ARM-Versatile AB")
39 .map_io = versatile_map_io, 38 .map_io = versatile_map_io,
40 .init_early = versatile_init_early, 39 .init_early = versatile_init_early,
41 .init_irq = versatile_init_irq, 40 .init_irq = versatile_init_irq,
42 .handle_irq = vic_handle_irq,
43 .init_time = versatile_timer_init, 41 .init_time = versatile_timer_init,
44 .init_machine = versatile_init, 42 .init_machine = versatile_init,
45 .restart = versatile_restart, 43 .restart = versatile_restart,
diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c
index ccf9f8a92067..2558f2e957c3 100644
--- a/arch/arm/mach-versatile/versatile_dt.c
+++ b/arch/arm/mach-versatile/versatile_dt.c
@@ -24,7 +24,6 @@
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/of_irq.h> 25#include <linux/of_irq.h>
26#include <linux/of_platform.h> 26#include <linux/of_platform.h>
27#include <asm/hardware/vic.h>
28#include <asm/mach-types.h> 27#include <asm/mach-types.h>
29#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
30 29
@@ -46,7 +45,6 @@ DT_MACHINE_START(VERSATILE_PB, "ARM-Versatile (Device Tree Support)")
46 .map_io = versatile_map_io, 45 .map_io = versatile_map_io,
47 .init_early = versatile_init_early, 46 .init_early = versatile_init_early,
48 .init_irq = versatile_init_irq, 47 .init_irq = versatile_init_irq,
49 .handle_irq = vic_handle_irq,
50 .init_time = versatile_timer_init, 48 .init_time = versatile_timer_init,
51 .init_machine = versatile_dt_init, 49 .init_machine = versatile_dt_init,
52 .dt_compat = versatile_dt_match, 50 .dt_compat = versatile_dt_match,
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c
index 1cabc0aa569d..611d140c8695 100644
--- a/arch/arm/mach-versatile/versatile_pb.c
+++ b/arch/arm/mach-versatile/versatile_pb.c
@@ -27,7 +27,6 @@
27#include <linux/io.h> 27#include <linux/io.h>
28 28
29#include <mach/hardware.h> 29#include <mach/hardware.h>
30#include <asm/hardware/vic.h>
31#include <asm/irq.h> 30#include <asm/irq.h>
32#include <asm/mach-types.h> 31#include <asm/mach-types.h>
33 32
@@ -107,7 +106,6 @@ MACHINE_START(VERSATILE_PB, "ARM-Versatile PB")
107 .map_io = versatile_map_io, 106 .map_io = versatile_map_io,
108 .init_early = versatile_init_early, 107 .init_early = versatile_init_early,
109 .init_irq = versatile_init_irq, 108 .init_irq = versatile_init_irq,
110 .handle_irq = vic_handle_irq,
111 .init_time = versatile_timer_init, 109 .init_time = versatile_timer_init,
112 .init_machine = versatile_pb_init, 110 .init_machine = versatile_pb_init,
113 .restart = versatile_restart, 111 .restart = versatile_restart,
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index 99e63f5f99d1..52d315b792c8 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -42,7 +42,6 @@ config ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA
42 bool "Enable A5 and A9 only errata work-arounds" 42 bool "Enable A5 and A9 only errata work-arounds"
43 default y 43 default y
44 select ARM_ERRATA_720789 44 select ARM_ERRATA_720789
45 select ARM_ERRATA_751472
46 select PL310_ERRATA_753970 if CACHE_PL310 45 select PL310_ERRATA_753970 if CACHE_PL310
47 help 46 help
48 Provides common dependencies for Versatile Express platforms 47 Provides common dependencies for Versatile Express platforms
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c
index 60838ddb8564..6f34497a4245 100644
--- a/arch/arm/mach-vexpress/ct-ca9x4.c
+++ b/arch/arm/mach-vexpress/ct-ca9x4.c
@@ -10,10 +10,10 @@
10#include <linux/amba/clcd.h> 10#include <linux/amba/clcd.h>
11#include <linux/clkdev.h> 11#include <linux/clkdev.h>
12#include <linux/vexpress.h> 12#include <linux/vexpress.h>
13#include <linux/irqchip/arm-gic.h>
13 14
14#include <asm/hardware/arm_timer.h> 15#include <asm/hardware/arm_timer.h>
15#include <asm/hardware/cache-l2x0.h> 16#include <asm/hardware/cache-l2x0.h>
16#include <asm/hardware/gic.h>
17#include <asm/smp_scu.h> 17#include <asm/smp_scu.h>
18#include <asm/smp_twd.h> 18#include <asm/smp_twd.h>
19 19
@@ -182,8 +182,6 @@ static void __init ct_ca9x4_init_cpu_map(void)
182 182
183 for (i = 0; i < ncores; ++i) 183 for (i = 0; i < ncores; ++i)
184 set_cpu_possible(i, true); 184 set_cpu_possible(i, true);
185
186 set_smp_cross_call(gic_raise_softirq);
187} 185}
188 186
189static void __init ct_ca9x4_smp_enable(unsigned int max_cpus) 187static void __init ct_ca9x4_smp_enable(unsigned int max_cpus)
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c
index c5d70de9bb4e..dc1ace55d557 100644
--- a/arch/arm/mach-vexpress/platsmp.c
+++ b/arch/arm/mach-vexpress/platsmp.c
@@ -16,7 +16,6 @@
16#include <linux/vexpress.h> 16#include <linux/vexpress.h>
17 17
18#include <asm/smp_scu.h> 18#include <asm/smp_scu.h>
19#include <asm/hardware/gic.h>
20#include <asm/mach/map.h> 19#include <asm/mach/map.h>
21 20
22#include <mach/motherboard.h> 21#include <mach/motherboard.h>
@@ -128,8 +127,6 @@ static void __init vexpress_dt_smp_init_cpus(void)
128 127
129 for (i = 0; i < ncores; ++i) 128 for (i = 0; i < ncores; ++i)
130 set_cpu_possible(i, true); 129 set_cpu_possible(i, true);
131
132 set_smp_cross_call(gic_raise_softirq);
133} 130}
134 131
135static void __init vexpress_dt_smp_prepare_cpus(unsigned int max_cpus) 132static void __init vexpress_dt_smp_prepare_cpus(unsigned int max_cpus)
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 08bd548ef144..915683cb67d6 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -7,6 +7,7 @@
7#include <linux/io.h> 7#include <linux/io.h>
8#include <linux/smp.h> 8#include <linux/smp.h>
9#include <linux/init.h> 9#include <linux/init.h>
10#include <linux/irqchip.h>
10#include <linux/of_address.h> 11#include <linux/of_address.h>
11#include <linux/of_fdt.h> 12#include <linux/of_fdt.h>
12#include <linux/of_irq.h> 13#include <linux/of_irq.h>
@@ -30,7 +31,6 @@
30#include <asm/mach/time.h> 31#include <asm/mach/time.h>
31#include <asm/hardware/arm_timer.h> 32#include <asm/hardware/arm_timer.h>
32#include <asm/hardware/cache-l2x0.h> 33#include <asm/hardware/cache-l2x0.h>
33#include <asm/hardware/gic.h>
34#include <asm/hardware/timer-sp.h> 34#include <asm/hardware/timer-sp.h>
35 35
36#include <mach/ct-ca9x4.h> 36#include <mach/ct-ca9x4.h>
@@ -373,7 +373,6 @@ MACHINE_START(VEXPRESS, "ARM-Versatile Express")
373 .init_early = v2m_init_early, 373 .init_early = v2m_init_early,
374 .init_irq = v2m_init_irq, 374 .init_irq = v2m_init_irq,
375 .init_time = v2m_timer_init, 375 .init_time = v2m_timer_init,
376 .handle_irq = gic_handle_irq,
377 .init_machine = v2m_init, 376 .init_machine = v2m_init,
378 .restart = vexpress_restart, 377 .restart = vexpress_restart,
379MACHINE_END 378MACHINE_END
@@ -430,16 +429,6 @@ void __init v2m_dt_init_early(void)
430 } 429 }
431} 430}
432 431
433static struct of_device_id vexpress_irq_match[] __initdata = {
434 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
435 {}
436};
437
438static void __init v2m_dt_init_irq(void)
439{
440 of_irq_init(vexpress_irq_match);
441}
442
443static void __init v2m_dt_timer_init(void) 432static void __init v2m_dt_timer_init(void)
444{ 433{
445 struct device_node *node = NULL; 434 struct device_node *node = NULL;
@@ -489,9 +478,8 @@ DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express")
489 .smp = smp_ops(vexpress_smp_ops), 478 .smp = smp_ops(vexpress_smp_ops),
490 .map_io = v2m_dt_map_io, 479 .map_io = v2m_dt_map_io,
491 .init_early = v2m_dt_init_early, 480 .init_early = v2m_dt_init_early,
492 .init_irq = v2m_dt_init_irq, 481 .init_irq = irqchip_init,
493 .init_time = v2m_dt_timer_init, 482 .init_time = v2m_dt_timer_init,
494 .init_machine = v2m_dt_init, 483 .init_machine = v2m_dt_init,
495 .handle_irq = gic_handle_irq,
496 .restart = vexpress_restart, 484 .restart = vexpress_restart,
497MACHINE_END 485MACHINE_END
diff --git a/arch/arm/mach-vt8500/Kconfig b/arch/arm/mach-vt8500/Kconfig
index 2ed0b7d95db6..c0b1c604ccf8 100644
--- a/arch/arm/mach-vt8500/Kconfig
+++ b/arch/arm/mach-vt8500/Kconfig
@@ -1,12 +1,34 @@
1config ARCH_VT8500 1config ARCH_VT8500
2 bool "VIA/WonderMedia 85xx" if ARCH_MULTI_V5 2 bool
3 default ARCH_VT8500_SINGLE
4 select ARCH_HAS_CPUFREQ 3 select ARCH_HAS_CPUFREQ
5 select ARCH_REQUIRE_GPIOLIB 4 select ARCH_REQUIRE_GPIOLIB
6 select CLKDEV_LOOKUP 5 select CLKDEV_LOOKUP
7 select CPU_ARM926T
8 select GENERIC_CLOCKEVENTS 6 select GENERIC_CLOCKEVENTS
9 select GENERIC_GPIO 7 select GENERIC_GPIO
10 select HAVE_CLK 8 select HAVE_CLK
9 select VT8500_TIMER
11 help 10 help
12 Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip. 11 Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip.
12
13config ARCH_WM8505
14 bool "VIA/Wondermedia 85xx and WM8650"
15 depends on ARCH_MULTI_V5
16 select ARCH_VT8500
17 select CPU_ARM926T
18 help
19
20config ARCH_WM8750
21 bool "WonderMedia WM8750"
22 depends on ARCH_MULTI_V6
23 select ARCH_VT8500
24 select CPU_V6
25 help
26 Support for WonderMedia WM8750 System-on-Chip.
27
28config ARCH_WM8850
29 bool "WonderMedia WM8850"
30 depends on ARCH_MULTI_V7
31 select ARCH_VT8500
32 select CPU_V7
33 help
34 Support for WonderMedia WM8850 System-on-Chip.
diff --git a/arch/arm/mach-vt8500/Makefile b/arch/arm/mach-vt8500/Makefile
index e035251cda48..92ceb2436b60 100644
--- a/arch/arm/mach-vt8500/Makefile
+++ b/arch/arm/mach-vt8500/Makefile
@@ -1 +1 @@
obj-$(CONFIG_ARCH_VT8500) += irq.o timer.o vt8500.o obj-$(CONFIG_ARCH_VT8500) += irq.o vt8500.o
diff --git a/arch/arm/mach-vt8500/common.h b/arch/arm/mach-vt8500/common.h
index 6f2b843115db..77611a6968d6 100644
--- a/arch/arm/mach-vt8500/common.h
+++ b/arch/arm/mach-vt8500/common.h
@@ -18,7 +18,6 @@
18 18
19#include <linux/of.h> 19#include <linux/of.h>
20 20
21void __init vt8500_timer_init(void);
22int __init vt8500_irq_init(struct device_node *node, 21int __init vt8500_irq_init(struct device_node *node,
23 struct device_node *parent); 22 struct device_node *parent);
24 23
diff --git a/arch/arm/mach-vt8500/include/mach/timex.h b/arch/arm/mach-vt8500/include/mach/timex.h
deleted file mode 100644
index 8487e4c690b7..000000000000
--- a/arch/arm/mach-vt8500/include/mach/timex.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * arch/arm/mach-vt8500/include/mach/timex.h
3 *
4 * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
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 MACH_TIMEX_H
22#define MACH_TIMEX_H
23
24#define CLOCK_TICK_RATE (3000000)
25
26#endif /* MACH_TIMEX_H */
diff --git a/arch/arm/mach-vt8500/include/mach/uncompress.h b/arch/arm/mach-vt8500/include/mach/uncompress.h
deleted file mode 100644
index e6e81fdaf109..000000000000
--- a/arch/arm/mach-vt8500/include/mach/uncompress.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/* arch/arm/mach-vt8500/include/mach/uncompress.h
2 *
3 * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
4 *
5 * Based on arch/arm/mach-dove/include/mach/uncompress.h
6 *
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
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
18#define UART0_PHYS 0xd8200000
19#define UART0_ADDR(x) *(volatile unsigned char *)(UART0_PHYS + x)
20
21static void putc(const char c)
22{
23 while (UART0_ADDR(0x1c) & 0x2)
24 /* Tx busy, wait and poll */;
25
26 UART0_ADDR(0) = c;
27}
28
29static void flush(void)
30{
31}
32
33/*
34 * nothing to do
35 */
36#define arch_decomp_setup()
37#define arch_decomp_wdog()
diff --git a/arch/arm/mach-vt8500/timer.c b/arch/arm/mach-vt8500/timer.c
deleted file mode 100644
index 3dd21a47881f..000000000000
--- a/arch/arm/mach-vt8500/timer.c
+++ /dev/null
@@ -1,184 +0,0 @@
1/*
2 * arch/arm/mach-vt8500/timer.c
3 *
4 * Copyright (C) 2012 Tony Prisk <linux@prisktech.co.nz>
5 * Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22/*
23 * This file is copied and modified from the original timer.c provided by
24 * Alexey Charkov. Minor changes have been made for Device Tree Support.
25 */
26
27#include <linux/io.h>
28#include <linux/irq.h>
29#include <linux/interrupt.h>
30#include <linux/clocksource.h>
31#include <linux/clockchips.h>
32#include <linux/delay.h>
33#include <asm/mach/time.h>
34
35#include <linux/of.h>
36#include <linux/of_address.h>
37#include <linux/of_irq.h>
38
39#define VT8500_TIMER_OFFSET 0x0100
40#define VT8500_TIMER_HZ 3000000
41#define TIMER_MATCH_VAL 0x0000
42#define TIMER_COUNT_VAL 0x0010
43#define TIMER_STATUS_VAL 0x0014
44#define TIMER_IER_VAL 0x001c /* interrupt enable */
45#define TIMER_CTRL_VAL 0x0020
46#define TIMER_AS_VAL 0x0024 /* access status */
47#define TIMER_COUNT_R_ACTIVE (1 << 5) /* not ready for read */
48#define TIMER_COUNT_W_ACTIVE (1 << 4) /* not ready for write */
49#define TIMER_MATCH_W_ACTIVE (1 << 0) /* not ready for write */
50
51#define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t)
52
53static void __iomem *regbase;
54
55static cycle_t vt8500_timer_read(struct clocksource *cs)
56{
57 int loops = msecs_to_loops(10);
58 writel(3, regbase + TIMER_CTRL_VAL);
59 while ((readl((regbase + TIMER_AS_VAL)) & TIMER_COUNT_R_ACTIVE)
60 && --loops)
61 cpu_relax();
62 return readl(regbase + TIMER_COUNT_VAL);
63}
64
65static struct clocksource clocksource = {
66 .name = "vt8500_timer",
67 .rating = 200,
68 .read = vt8500_timer_read,
69 .mask = CLOCKSOURCE_MASK(32),
70 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
71};
72
73static int vt8500_timer_set_next_event(unsigned long cycles,
74 struct clock_event_device *evt)
75{
76 int loops = msecs_to_loops(10);
77 cycle_t alarm = clocksource.read(&clocksource) + cycles;
78 while ((readl(regbase + TIMER_AS_VAL) & TIMER_MATCH_W_ACTIVE)
79 && --loops)
80 cpu_relax();
81 writel((unsigned long)alarm, regbase + TIMER_MATCH_VAL);
82
83 if ((signed)(alarm - clocksource.read(&clocksource)) <= 16)
84 return -ETIME;
85
86 writel(1, regbase + TIMER_IER_VAL);
87
88 return 0;
89}
90
91static void vt8500_timer_set_mode(enum clock_event_mode mode,
92 struct clock_event_device *evt)
93{
94 switch (mode) {
95 case CLOCK_EVT_MODE_RESUME:
96 case CLOCK_EVT_MODE_PERIODIC:
97 break;
98 case CLOCK_EVT_MODE_ONESHOT:
99 case CLOCK_EVT_MODE_UNUSED:
100 case CLOCK_EVT_MODE_SHUTDOWN:
101 writel(readl(regbase + TIMER_CTRL_VAL) | 1,
102 regbase + TIMER_CTRL_VAL);
103 writel(0, regbase + TIMER_IER_VAL);
104 break;
105 }
106}
107
108static struct clock_event_device clockevent = {
109 .name = "vt8500_timer",
110 .features = CLOCK_EVT_FEAT_ONESHOT,
111 .rating = 200,
112 .set_next_event = vt8500_timer_set_next_event,
113 .set_mode = vt8500_timer_set_mode,
114};
115
116static irqreturn_t vt8500_timer_interrupt(int irq, void *dev_id)
117{
118 struct clock_event_device *evt = dev_id;
119 writel(0xf, regbase + TIMER_STATUS_VAL);
120 evt->event_handler(evt);
121
122 return IRQ_HANDLED;
123}
124
125static struct irqaction irq = {
126 .name = "vt8500_timer",
127 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
128 .handler = vt8500_timer_interrupt,
129 .dev_id = &clockevent,
130};
131
132static struct of_device_id vt8500_timer_ids[] = {
133 { .compatible = "via,vt8500-timer" },
134 { }
135};
136
137void __init vt8500_timer_init(void)
138{
139 struct device_node *np;
140 int timer_irq;
141
142 np = of_find_matching_node(NULL, vt8500_timer_ids);
143 if (!np) {
144 pr_err("%s: Timer description missing from Device Tree\n",
145 __func__);
146 return;
147 }
148 regbase = of_iomap(np, 0);
149 if (!regbase) {
150 pr_err("%s: Missing iobase description in Device Tree\n",
151 __func__);
152 of_node_put(np);
153 return;
154 }
155 timer_irq = irq_of_parse_and_map(np, 0);
156 if (!timer_irq) {
157 pr_err("%s: Missing irq description in Device Tree\n",
158 __func__);
159 of_node_put(np);
160 return;
161 }
162
163 writel(1, regbase + TIMER_CTRL_VAL);
164 writel(0xf, regbase + TIMER_STATUS_VAL);
165 writel(~0, regbase + TIMER_MATCH_VAL);
166
167 if (clocksource_register_hz(&clocksource, VT8500_TIMER_HZ))
168 pr_err("%s: vt8500_timer_init: clocksource_register failed for %s\n",
169 __func__, clocksource.name);
170
171 clockevents_calc_mult_shift(&clockevent, VT8500_TIMER_HZ, 4);
172
173 /* copy-pasted from mach-msm; no idea */
174 clockevent.max_delta_ns =
175 clockevent_delta2ns(0xf0000000, &clockevent);
176 clockevent.min_delta_ns = clockevent_delta2ns(4, &clockevent);
177 clockevent.cpumask = cpumask_of(0);
178
179 if (setup_irq(timer_irq, &irq))
180 pr_err("%s: setup_irq failed for %s\n", __func__,
181 clockevent.name);
182 clockevents_register_device(&clockevent);
183}
184
diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c
index d5b9c6689c9d..6141868b9a3c 100644
--- a/arch/arm/mach-vt8500/vt8500.c
+++ b/arch/arm/mach-vt8500/vt8500.c
@@ -20,6 +20,7 @@
20 20
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/pm.h> 22#include <linux/pm.h>
23#include <linux/vt8500_timer.h>
23 24
24#include <asm/mach-types.h> 25#include <asm/mach-types.h>
25#include <asm/mach/arch.h> 26#include <asm/mach/arch.h>
@@ -179,6 +180,8 @@ static const char * const vt8500_dt_compat[] = {
179 "via,vt8500", 180 "via,vt8500",
180 "wm,wm8650", 181 "wm,wm8650",
181 "wm,wm8505", 182 "wm,wm8505",
183 "wm,wm8750",
184 "wm,wm8850",
182}; 185};
183 186
184DT_MACHINE_START(WMT_DT, "VIA/Wondermedia SoC (Device Tree Support)") 187DT_MACHINE_START(WMT_DT, "VIA/Wondermedia SoC (Device Tree Support)")
diff --git a/arch/arm/mach-w90x900/time.c b/arch/arm/mach-w90x900/time.c
index d9c3d6b801c7..30fbca844575 100644
--- a/arch/arm/mach-w90x900/time.c
+++ b/arch/arm/mach-w90x900/time.c
@@ -91,7 +91,6 @@ static int nuc900_clockevent_setnextevent(unsigned long evt,
91 91
92static struct clock_event_device nuc900_clockevent_device = { 92static struct clock_event_device nuc900_clockevent_device = {
93 .name = "nuc900-timer0", 93 .name = "nuc900-timer0",
94 .shift = 32,
95 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 94 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
96 .set_mode = nuc900_clockevent_setmode, 95 .set_mode = nuc900_clockevent_setmode,
97 .set_next_event = nuc900_clockevent_setnextevent, 96 .set_next_event = nuc900_clockevent_setnextevent,
@@ -133,15 +132,10 @@ static void __init nuc900_clockevents_init(void)
133 __raw_writel(RESETINT, REG_TISR); 132 __raw_writel(RESETINT, REG_TISR);
134 setup_irq(IRQ_TIMER0, &nuc900_timer0_irq); 133 setup_irq(IRQ_TIMER0, &nuc900_timer0_irq);
135 134
136 nuc900_clockevent_device.mult = div_sc(rate, NSEC_PER_SEC,
137 nuc900_clockevent_device.shift);
138 nuc900_clockevent_device.max_delta_ns = clockevent_delta2ns(0xffffffff,
139 &nuc900_clockevent_device);
140 nuc900_clockevent_device.min_delta_ns = clockevent_delta2ns(0xf,
141 &nuc900_clockevent_device);
142 nuc900_clockevent_device.cpumask = cpumask_of(0); 135 nuc900_clockevent_device.cpumask = cpumask_of(0);
143 136
144 clockevents_register_device(&nuc900_clockevent_device); 137 clockevents_config_and_register(&nuc900_clockevent_device, rate,
138 0xf, 0xffffffff);
145} 139}
146 140
147static void __init nuc900_clocksource_init(void) 141static void __init nuc900_clocksource_init(void)
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index 2ae4bce652b6..6472a69cbfe1 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -31,7 +31,6 @@
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <asm/page.h> 32#include <asm/page.h>
33#include <asm/pgtable.h> 33#include <asm/pgtable.h>
34#include <asm/hardware/gic.h>
35#include <asm/hardware/cache-l2x0.h> 34#include <asm/hardware/cache-l2x0.h>
36 35
37#include "common.h" 36#include "common.h"
@@ -55,19 +54,6 @@ static void __init xilinx_init_machine(void)
55 of_platform_bus_probe(NULL, zynq_of_bus_ids, NULL); 54 of_platform_bus_probe(NULL, zynq_of_bus_ids, NULL);
56} 55}
57 56
58static struct of_device_id irq_match[] __initdata = {
59 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
60 { }
61};
62
63/**
64 * xilinx_irq_init() - Interrupt controller initialization for the GIC.
65 */
66static void __init xilinx_irq_init(void)
67{
68 of_irq_init(irq_match);
69}
70
71#define SCU_PERIPH_PHYS 0xF8F00000 57#define SCU_PERIPH_PHYS 0xF8F00000
72#define SCU_PERIPH_SIZE SZ_8K 58#define SCU_PERIPH_SIZE SZ_8K
73#define SCU_PERIPH_VIRT (VMALLOC_END - SCU_PERIPH_SIZE) 59#define SCU_PERIPH_VIRT (VMALLOC_END - SCU_PERIPH_SIZE)
@@ -110,8 +96,7 @@ static const char *xilinx_dt_match[] = {
110 96
111MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") 97MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform")
112 .map_io = xilinx_map_io, 98 .map_io = xilinx_map_io,
113 .init_irq = xilinx_irq_init, 99 .init_irq = irqchip_init,
114 .handle_irq = gic_handle_irq,
115 .init_machine = xilinx_init_machine, 100 .init_machine = xilinx_init_machine,
116 .init_time = xilinx_zynq_timer_init, 101 .init_time = xilinx_zynq_timer_init,
117 .dt_compat = xilinx_dt_match, 102 .dt_compat = xilinx_dt_match,
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
index 6911b8b2745c..c2f37390308a 100644
--- a/arch/arm/mm/cache-l2x0.c
+++ b/arch/arm/mm/cache-l2x0.c
@@ -352,7 +352,8 @@ void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask)
352 /* Unmapped register. */ 352 /* Unmapped register. */
353 sync_reg_offset = L2X0_DUMMY_REG; 353 sync_reg_offset = L2X0_DUMMY_REG;
354#endif 354#endif
355 outer_cache.set_debug = pl310_set_debug; 355 if ((cache_id & L2X0_CACHE_ID_RTL_MASK) <= L2X0_CACHE_ID_RTL_R3P0)
356 outer_cache.set_debug = pl310_set_debug;
356 break; 357 break;
357 case L2X0_CACHE_ID_PART_L210: 358 case L2X0_CACHE_ID_PART_L210:
358 ways = (aux >> 13) & 0xf; 359 ways = (aux >> 13) & 0xf;
@@ -459,8 +460,8 @@ static void aurora_pa_range(unsigned long start, unsigned long end,
459 unsigned long flags; 460 unsigned long flags;
460 461
461 raw_spin_lock_irqsave(&l2x0_lock, flags); 462 raw_spin_lock_irqsave(&l2x0_lock, flags);
462 writel(start, l2x0_base + AURORA_RANGE_BASE_ADDR_REG); 463 writel_relaxed(start, l2x0_base + AURORA_RANGE_BASE_ADDR_REG);
463 writel(end, l2x0_base + offset); 464 writel_relaxed(end, l2x0_base + offset);
464 raw_spin_unlock_irqrestore(&l2x0_lock, flags); 465 raw_spin_unlock_irqrestore(&l2x0_lock, flags);
465 466
466 cache_sync(); 467 cache_sync();
@@ -505,15 +506,21 @@ static void aurora_clean_range(unsigned long start, unsigned long end)
505 506
506static void aurora_flush_range(unsigned long start, unsigned long end) 507static void aurora_flush_range(unsigned long start, unsigned long end)
507{ 508{
508 if (!l2_wt_override) { 509 start &= ~(CACHE_LINE_SIZE - 1);
509 start &= ~(CACHE_LINE_SIZE - 1); 510 end = ALIGN(end, CACHE_LINE_SIZE);
510 end = ALIGN(end, CACHE_LINE_SIZE); 511 while (start != end) {
511 while (start != end) { 512 unsigned long range_end = calc_range_end(start, end);
512 unsigned long range_end = calc_range_end(start, end); 513 /*
514 * If L2 is forced to WT, the L2 will always be clean and we
515 * just need to invalidate.
516 */
517 if (l2_wt_override)
513 aurora_pa_range(start, range_end - CACHE_LINE_SIZE, 518 aurora_pa_range(start, range_end - CACHE_LINE_SIZE,
514 AURORA_FLUSH_RANGE_REG); 519 AURORA_INVAL_RANGE_REG);
515 start = range_end; 520 else
516 } 521 aurora_pa_range(start, range_end - CACHE_LINE_SIZE,
522 AURORA_FLUSH_RANGE_REG);
523 start = range_end;
517 } 524 }
518} 525}
519 526
@@ -668,8 +675,9 @@ static void pl310_resume(void)
668static void aurora_resume(void) 675static void aurora_resume(void)
669{ 676{
670 if (!(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) { 677 if (!(readl(l2x0_base + L2X0_CTRL) & L2X0_CTRL_EN)) {
671 writel(l2x0_saved_regs.aux_ctrl, l2x0_base + L2X0_AUX_CTRL); 678 writel_relaxed(l2x0_saved_regs.aux_ctrl,
672 writel(l2x0_saved_regs.ctrl, l2x0_base + L2X0_CTRL); 679 l2x0_base + L2X0_AUX_CTRL);
680 writel_relaxed(l2x0_saved_regs.ctrl, l2x0_base + L2X0_CTRL);
673 } 681 }
674} 682}
675 683
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 350f6a74992b..3a3c015f8d5c 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -169,6 +169,7 @@ __v7_ca15mp_setup:
169 orreq r0, r0, r10 @ Enable CPU-specific SMP bits 169 orreq r0, r0, r10 @ Enable CPU-specific SMP bits
170 mcreq p15, 0, r0, c1, c0, 1 170 mcreq p15, 0, r0, c1, c0, 1
171#endif 171#endif
172 b __v7_setup
172 173
173__v7_pj4b_setup: 174__v7_pj4b_setup:
174#ifdef CONFIG_CPU_PJ4B 175#ifdef CONFIG_CPU_PJ4B
@@ -245,7 +246,8 @@ __v7_setup:
245 ldr r10, =0x00000c08 @ Cortex-A8 primary part number 246 ldr r10, =0x00000c08 @ Cortex-A8 primary part number
246 teq r0, r10 247 teq r0, r10
247 bne 2f 248 bne 2f
248#ifdef CONFIG_ARM_ERRATA_430973 249#if defined(CONFIG_ARM_ERRATA_430973) && !defined(CONFIG_ARCH_MULTIPLATFORM)
250
249 teq r5, #0x00100000 @ only present in r1p* 251 teq r5, #0x00100000 @ only present in r1p*
250 mrceq p15, 0, r10, c1, c0, 1 @ read aux control register 252 mrceq p15, 0, r10, c1, c0, 1 @ read aux control register
251 orreq r10, r10, #(1 << 6) @ set IBE to 1 253 orreq r10, r10, #(1 << 6) @ set IBE to 1
diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c
index cbfbbe461788..837a2d52e9db 100644
--- a/arch/arm/plat-iop/time.c
+++ b/arch/arm/plat-iop/time.c
@@ -156,14 +156,9 @@ void __init iop_init_time(unsigned long tick_rate)
156 write_tmr0(timer_ctl & ~IOP_TMR_EN); 156 write_tmr0(timer_ctl & ~IOP_TMR_EN);
157 write_tisr(1); 157 write_tisr(1);
158 setup_irq(IRQ_IOP_TIMER0, &iop_timer_irq); 158 setup_irq(IRQ_IOP_TIMER0, &iop_timer_irq);
159 clockevents_calc_mult_shift(&iop_clockevent,
160 tick_rate, IOP_MIN_RANGE);
161 iop_clockevent.max_delta_ns =
162 clockevent_delta2ns(0xfffffffe, &iop_clockevent);
163 iop_clockevent.min_delta_ns =
164 clockevent_delta2ns(0xf, &iop_clockevent);
165 iop_clockevent.cpumask = cpumask_of(0); 159 iop_clockevent.cpumask = cpumask_of(0);
166 clockevents_register_device(&iop_clockevent); 160 clockevents_config_and_register(&iop_clockevent, tick_rate,
161 0xf, 0xfffffffe);
167 162
168 /* 163 /*
169 * Set up free-running clocksource timer 1. 164 * Set up free-running clocksource timer 1.
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index 9d9aa2f55129..a14a78a2f149 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5# Common support 5# Common support
6obj-y := sram.o dma.o fb.o counter_32k.o 6obj-y := sram.o dma.o counter_32k.o
7obj-m := 7obj-m :=
8obj-n := 8obj-n :=
9obj- := 9obj- :=
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c
index f3771cdb9838..5b0b86bb34bb 100644
--- a/arch/arm/plat-omap/counter_32k.c
+++ b/arch/arm/plat-omap/counter_32k.c
@@ -22,6 +22,8 @@
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 24
25#include <plat/counter-32k.h>
26
25/* OMAP2_32KSYNCNT_CR_OFF: offset of 32ksync counter register */ 27/* OMAP2_32KSYNCNT_CR_OFF: offset of 32ksync counter register */
26#define OMAP2_32KSYNCNT_REV_OFF 0x0 28#define OMAP2_32KSYNCNT_REV_OFF 0x0
27#define OMAP2_32KSYNCNT_REV_SCHEME (0x3 << 30) 29#define OMAP2_32KSYNCNT_REV_SCHEME (0x3 << 30)
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 37a488aaa2ba..4136b20cba3c 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -2000,7 +2000,7 @@ void omap_dma_global_context_restore(void)
2000 omap_clear_dma(ch); 2000 omap_clear_dma(ch);
2001} 2001}
2002 2002
2003static int __devinit omap_system_dma_probe(struct platform_device *pdev) 2003static int omap_system_dma_probe(struct platform_device *pdev)
2004{ 2004{
2005 int ch, ret = 0; 2005 int ch, ret = 0;
2006 int dma_irq; 2006 int dma_irq;
@@ -2116,7 +2116,7 @@ exit_dma_lch_fail:
2116 return ret; 2116 return ret;
2117} 2117}
2118 2118
2119static int __devexit omap_system_dma_remove(struct platform_device *pdev) 2119static int omap_system_dma_remove(struct platform_device *pdev)
2120{ 2120{
2121 int dma_irq; 2121 int dma_irq;
2122 2122
@@ -2140,7 +2140,7 @@ static int __devexit omap_system_dma_remove(struct platform_device *pdev)
2140 2140
2141static struct platform_driver omap_system_dma_driver = { 2141static struct platform_driver omap_system_dma_driver = {
2142 .probe = omap_system_dma_probe, 2142 .probe = omap_system_dma_probe,
2143 .remove = __devexit_p(omap_system_dma_remove), 2143 .remove = omap_system_dma_remove,
2144 .driver = { 2144 .driver = {
2145 .name = "omap_dma_system" 2145 .name = "omap_dma_system"
2146 }, 2146 },
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 89585c293554..7b433f3bddca 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -777,7 +777,7 @@ EXPORT_SYMBOL_GPL(omap_dm_timers_active);
777 * Called by driver framework at the end of device registration for all 777 * Called by driver framework at the end of device registration for all
778 * timer devices. 778 * timer devices.
779 */ 779 */
780static int __devinit omap_dm_timer_probe(struct platform_device *pdev) 780static int omap_dm_timer_probe(struct platform_device *pdev)
781{ 781{
782 unsigned long flags; 782 unsigned long flags;
783 struct omap_dm_timer *timer; 783 struct omap_dm_timer *timer;
@@ -864,7 +864,7 @@ static int __devinit omap_dm_timer_probe(struct platform_device *pdev)
864 * In addition to freeing platform resources it also deletes the timer 864 * In addition to freeing platform resources it also deletes the timer
865 * entry from the local list. 865 * entry from the local list.
866 */ 866 */
867static int __devexit omap_dm_timer_remove(struct platform_device *pdev) 867static int omap_dm_timer_remove(struct platform_device *pdev)
868{ 868{
869 struct omap_dm_timer *timer; 869 struct omap_dm_timer *timer;
870 unsigned long flags; 870 unsigned long flags;
@@ -891,26 +891,15 @@ MODULE_DEVICE_TABLE(of, omap_timer_match);
891 891
892static struct platform_driver omap_dm_timer_driver = { 892static struct platform_driver omap_dm_timer_driver = {
893 .probe = omap_dm_timer_probe, 893 .probe = omap_dm_timer_probe,
894 .remove = __devexit_p(omap_dm_timer_remove), 894 .remove = omap_dm_timer_remove,
895 .driver = { 895 .driver = {
896 .name = "omap_timer", 896 .name = "omap_timer",
897 .of_match_table = of_match_ptr(omap_timer_match), 897 .of_match_table = of_match_ptr(omap_timer_match),
898 }, 898 },
899}; 899};
900 900
901static int __init omap_dm_timer_driver_init(void)
902{
903 return platform_driver_register(&omap_dm_timer_driver);
904}
905
906static void __exit omap_dm_timer_driver_exit(void)
907{
908 platform_driver_unregister(&omap_dm_timer_driver);
909}
910
911early_platform_init("earlytimer", &omap_dm_timer_driver); 901early_platform_init("earlytimer", &omap_dm_timer_driver);
912module_init(omap_dm_timer_driver_init); 902module_platform_driver(omap_dm_timer_driver);
913module_exit(omap_dm_timer_driver_exit);
914 903
915MODULE_DESCRIPTION("OMAP Dual-Mode Timer Driver"); 904MODULE_DESCRIPTION("OMAP Dual-Mode Timer Driver");
916MODULE_LICENSE("GPL"); 905MODULE_LICENSE("GPL");
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h
index b4516aba67ed..c9a66bf36c9a 100644
--- a/arch/arm/plat-omap/include/plat/cpu.h
+++ b/arch/arm/plat-omap/include/plat/cpu.h
@@ -32,8 +32,4 @@
32#include <mach/soc.h> 32#include <mach/soc.h>
33#endif 33#endif
34 34
35#ifdef CONFIG_ARCH_OMAP2PLUS
36#include "../../mach-omap2/soc.h"
37#endif
38
39#endif 35#endif
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 743fc2836f7a..a5bc92d7e476 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -26,6 +26,8 @@
26 26
27#include <asm/mach/map.h> 27#include <asm/mach/map.h>
28 28
29#include <plat/sram.h>
30
29#define ROUND_DOWN(value,boundary) ((value) & (~((boundary)-1))) 31#define ROUND_DOWN(value,boundary) ((value) & (~((boundary)-1)))
30 32
31static void __iomem *omap_sram_base; 33static void __iomem *omap_sram_base;
diff --git a/arch/arm/plat-orion/time.c b/arch/arm/plat-orion/time.c
index 0f4fa863dd55..5d5ac0f05422 100644
--- a/arch/arm/plat-orion/time.c
+++ b/arch/arm/plat-orion/time.c
@@ -156,7 +156,6 @@ orion_clkevt_mode(enum clock_event_mode mode, struct clock_event_device *dev)
156static struct clock_event_device orion_clkevt = { 156static struct clock_event_device orion_clkevt = {
157 .name = "orion_tick", 157 .name = "orion_tick",
158 .features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_PERIODIC, 158 .features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_PERIODIC,
159 .shift = 32,
160 .rating = 300, 159 .rating = 300,
161 .set_next_event = orion_clkevt_next_event, 160 .set_next_event = orion_clkevt_next_event,
162 .set_mode = orion_clkevt_mode, 161 .set_mode = orion_clkevt_mode,
@@ -221,9 +220,6 @@ orion_time_init(void __iomem *_bridge_base, u32 _bridge_timer1_clr_mask,
221 * Setup clockevent timer (interrupt-driven). 220 * Setup clockevent timer (interrupt-driven).
222 */ 221 */
223 setup_irq(irq, &orion_timer_irq); 222 setup_irq(irq, &orion_timer_irq);
224 orion_clkevt.mult = div_sc(tclk, NSEC_PER_SEC, orion_clkevt.shift);
225 orion_clkevt.max_delta_ns = clockevent_delta2ns(0xfffffffe, &orion_clkevt);
226 orion_clkevt.min_delta_ns = clockevent_delta2ns(1, &orion_clkevt);
227 orion_clkevt.cpumask = cpumask_of(0); 223 orion_clkevt.cpumask = cpumask_of(0);
228 clockevents_register_device(&orion_clkevt); 224 clockevents_config_and_register(&orion_clkevt, tclk, 1, 0xfffffffe);
229} 225}
diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c
index 584c9bf8ed2d..8e11e96eab5e 100644
--- a/arch/arm/plat-pxa/ssp.c
+++ b/arch/arm/plat-pxa/ssp.c
@@ -72,7 +72,7 @@ void pxa_ssp_free(struct ssp_device *ssp)
72} 72}
73EXPORT_SYMBOL(pxa_ssp_free); 73EXPORT_SYMBOL(pxa_ssp_free);
74 74
75static int __devinit pxa_ssp_probe(struct platform_device *pdev) 75static int pxa_ssp_probe(struct platform_device *pdev)
76{ 76{
77 const struct platform_device_id *id = platform_get_device_id(pdev); 77 const struct platform_device_id *id = platform_get_device_id(pdev);
78 struct resource *res; 78 struct resource *res;
@@ -164,7 +164,7 @@ err_free:
164 return ret; 164 return ret;
165} 165}
166 166
167static int __devexit pxa_ssp_remove(struct platform_device *pdev) 167static int pxa_ssp_remove(struct platform_device *pdev)
168{ 168{
169 struct resource *res; 169 struct resource *res;
170 struct ssp_device *ssp; 170 struct ssp_device *ssp;
@@ -199,7 +199,7 @@ static const struct platform_device_id ssp_id_table[] = {
199 199
200static struct platform_driver pxa_ssp_driver = { 200static struct platform_driver pxa_ssp_driver = {
201 .probe = pxa_ssp_probe, 201 .probe = pxa_ssp_probe,
202 .remove = __devexit_p(pxa_ssp_remove), 202 .remove = pxa_ssp_remove,
203 .driver = { 203 .driver = {
204 .owner = THIS_MODULE, 204 .owner = THIS_MODULE,
205 .name = "pxa2xx-ssp", 205 .name = "pxa2xx-ssp",
diff --git a/arch/arm/plat-samsung/adc.c b/arch/arm/plat-samsung/adc.c
index 37542c2689a2..2d676ab50f73 100644
--- a/arch/arm/plat-samsung/adc.c
+++ b/arch/arm/plat-samsung/adc.c
@@ -416,7 +416,7 @@ static int s3c_adc_probe(struct platform_device *pdev)
416 return 0; 416 return 0;
417} 417}
418 418
419static int __devexit s3c_adc_remove(struct platform_device *pdev) 419static int s3c_adc_remove(struct platform_device *pdev)
420{ 420{
421 struct adc_device *adc = platform_get_drvdata(pdev); 421 struct adc_device *adc = platform_get_drvdata(pdev);
422 422
@@ -516,7 +516,7 @@ static struct platform_driver s3c_adc_driver = {
516 .pm = &adc_pm_ops, 516 .pm = &adc_pm_ops,
517 }, 517 },
518 .probe = s3c_adc_probe, 518 .probe = s3c_adc_probe,
519 .remove = __devexit_p(s3c_adc_remove), 519 .remove = s3c_adc_remove,
520}; 520};
521 521
522static int __init adc_init(void) 522static int __init adc_init(void)
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-samsung/include/plat/cpu.h
index e0667a1c137c..37703ef6dfc7 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -43,7 +43,7 @@ extern unsigned long samsung_cpu_id;
43#define EXYNOS4_CPU_MASK 0xFFFE0000 43#define EXYNOS4_CPU_MASK 0xFFFE0000
44 44
45#define EXYNOS5250_SOC_ID 0x43520000 45#define EXYNOS5250_SOC_ID 0x43520000
46#define EXYNOS5440_SOC_ID 0x54400000 46#define EXYNOS5440_SOC_ID 0xE5440000
47#define EXYNOS5_SOC_MASK 0xFFFFF000 47#define EXYNOS5_SOC_MASK 0xFFFFF000
48 48
49#define IS_SAMSUNG_CPU(name, id, mask) \ 49#define IS_SAMSUNG_CPU(name, id, mask) \
diff --git a/arch/arm/plat-samsung/s5p-irq-eint.c b/arch/arm/plat-samsung/s5p-irq-eint.c
index 33bd3f3d20f5..faa651602780 100644
--- a/arch/arm/plat-samsung/s5p-irq-eint.c
+++ b/arch/arm/plat-samsung/s5p-irq-eint.c
@@ -15,8 +15,7 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/device.h> 16#include <linux/device.h>
17#include <linux/gpio.h> 17#include <linux/gpio.h>
18 18#include <linux/irqchip/arm-vic.h>
19#include <asm/hardware/vic.h>
20 19
21#include <plat/regs-irqtype.h> 20#include <plat/regs-irqtype.h>
22 21
diff --git a/arch/arm/plat-samsung/s5p-irq.c b/arch/arm/plat-samsung/s5p-irq.c
index dfb47d638f03..103e371f5e35 100644
--- a/arch/arm/plat-samsung/s5p-irq.c
+++ b/arch/arm/plat-samsung/s5p-irq.c
@@ -13,8 +13,7 @@
13#include <linux/interrupt.h> 13#include <linux/interrupt.h>
14#include <linux/irq.h> 14#include <linux/irq.h>
15#include <linux/io.h> 15#include <linux/io.h>
16 16#include <linux/irqchip/arm-vic.h>
17#include <asm/hardware/vic.h>
18 17
19#include <mach/map.h> 18#include <mach/map.h>
20#include <plat/regs-timer.h> 19#include <plat/regs-timer.h>
diff --git a/arch/arm/plat-samsung/s5p-time.c b/arch/arm/plat-samsung/s5p-time.c
index dabede46c0ec..e92510cf82ee 100644
--- a/arch/arm/plat-samsung/s5p-time.c
+++ b/arch/arm/plat-samsung/s5p-time.c
@@ -274,15 +274,8 @@ static void __init s5p_clockevent_init(void)
274 clock_rate = clk_get_rate(tin_event); 274 clock_rate = clk_get_rate(tin_event);
275 clock_count_per_tick = clock_rate / HZ; 275 clock_count_per_tick = clock_rate / HZ;
276 276
277 clockevents_calc_mult_shift(&time_event_device,
278 clock_rate, S5PTIMER_MIN_RANGE);
279 time_event_device.max_delta_ns =
280 clockevent_delta2ns(-1, &time_event_device);
281 time_event_device.min_delta_ns =
282 clockevent_delta2ns(1, &time_event_device);
283
284 time_event_device.cpumask = cpumask_of(0); 277 time_event_device.cpumask = cpumask_of(0);
285 clockevents_register_device(&time_event_device); 278 clockevents_config_and_register(&time_event_device, clock_rate, 1, -1);
286 279
287 irq_number = timer_source.event_id + IRQ_TIMER0; 280 irq_number = timer_source.event_id + IRQ_TIMER0;
288 setup_irq(irq_number, &s5p_clock_event_irq); 281 setup_irq(irq_number, &s5p_clock_event_irq);
diff --git a/arch/arm/plat-spear/time.c b/arch/arm/plat-spear/time.c
index 03321af5de9f..bd5c53cd6962 100644
--- a/arch/arm/plat-spear/time.c
+++ b/arch/arm/plat-spear/time.c
@@ -186,15 +186,9 @@ static void __init spear_clockevent_init(int irq)
186 tick_rate = clk_get_rate(gpt_clk); 186 tick_rate = clk_get_rate(gpt_clk);
187 tick_rate >>= CTRL_PRESCALER16; 187 tick_rate >>= CTRL_PRESCALER16;
188 188
189 clockevents_calc_mult_shift(&clkevt, tick_rate, SPEAR_MIN_RANGE);
190
191 clkevt.max_delta_ns = clockevent_delta2ns(0xfff0,
192 &clkevt);
193 clkevt.min_delta_ns = clockevent_delta2ns(3, &clkevt);
194
195 clkevt.cpumask = cpumask_of(0); 189 clkevt.cpumask = cpumask_of(0);
196 190
197 clockevents_register_device(&clkevt); 191 clockevents_config_and_register(&clkevt, tick_rate, 3, 0xfff0);
198 192
199 setup_irq(irq, &spear_timer_irq); 193 setup_irq(irq, &spear_timer_irq);
200} 194}
diff --git a/arch/arm/plat-versatile/platsmp.c b/arch/arm/plat-versatile/platsmp.c
index 04ca4937d8ca..f2ac15561778 100644
--- a/arch/arm/plat-versatile/platsmp.c
+++ b/arch/arm/plat-versatile/platsmp.c
@@ -14,10 +14,10 @@
14#include <linux/device.h> 14#include <linux/device.h>
15#include <linux/jiffies.h> 15#include <linux/jiffies.h>
16#include <linux/smp.h> 16#include <linux/smp.h>
17#include <linux/irqchip/arm-gic.h>
17 18
18#include <asm/cacheflush.h> 19#include <asm/cacheflush.h>
19#include <asm/smp_plat.h> 20#include <asm/smp_plat.h>
20#include <asm/hardware/gic.h>
21 21
22/* 22/*
23 * Write pen_release in a way that is guaranteed to be visible to all 23 * Write pen_release in a way that is guaranteed to be visible to all
@@ -79,7 +79,7 @@ int __cpuinit versatile_boot_secondary(unsigned int cpu, struct task_struct *idl
79 * the boot monitor to read the system wide flags register, 79 * the boot monitor to read the system wide flags register,
80 * and branch to the address found there. 80 * and branch to the address found there.
81 */ 81 */
82 gic_raise_softirq(cpumask_of(cpu), 0); 82 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
83 83
84 timeout = jiffies + (1 * HZ); 84 timeout = jiffies + (1 * HZ);
85 while (time_before(jiffies, timeout)) { 85 while (time_before(jiffies, timeout)) {
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 9c829b008261..f8f362aafee9 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -2,6 +2,8 @@ config ARM64
2 def_bool y 2 def_bool y
3 select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE 3 select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
4 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION 4 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
5 select ARM_AMBA
6 select CLONE_BACKWARDS
5 select COMMON_CLK 7 select COMMON_CLK
6 select GENERIC_CLOCKEVENTS 8 select GENERIC_CLOCKEVENTS
7 select GENERIC_HARDIRQS_NO_DEPRECATED 9 select GENERIC_HARDIRQS_NO_DEPRECATED
@@ -31,7 +33,6 @@ config ARM64
31 select RTC_LIB 33 select RTC_LIB
32 select SPARSE_IRQ 34 select SPARSE_IRQ
33 select SYSCTL_EXCEPTION_TRACE 35 select SYSCTL_EXCEPTION_TRACE
34 select CLONE_BACKWARDS
35 help 36 help
36 ARM 64-bit (AArch64) Linux support. 37 ARM 64-bit (AArch64) Linux support.
37 38
@@ -90,6 +91,9 @@ config SWIOTLB
90config IOMMU_HELPER 91config IOMMU_HELPER
91 def_bool SWIOTLB 92 def_bool SWIOTLB
92 93
94config GENERIC_GPIO
95 def_bool y
96
93source "init/Kconfig" 97source "init/Kconfig"
94 98
95source "kernel/Kconfig.freezer" 99source "kernel/Kconfig.freezer"
diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h
index d9ec40217a27..618b450e5a1d 100644
--- a/arch/arm64/include/asm/compat.h
+++ b/arch/arm64/include/asm/compat.h
@@ -23,6 +23,7 @@
23 */ 23 */
24#include <linux/types.h> 24#include <linux/types.h>
25#include <linux/sched.h> 25#include <linux/sched.h>
26#include <linux/ptrace.h>
26 27
27#define COMPAT_USER_HZ 100 28#define COMPAT_USER_HZ 100
28#define COMPAT_UTS_MACHINE "armv8l\0\0" 29#define COMPAT_UTS_MACHINE "armv8l\0\0"
diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c
index c76c7241125b..f7073c7b1ca9 100644
--- a/arch/arm64/kernel/perf_event.c
+++ b/arch/arm64/kernel/perf_event.c
@@ -1221,7 +1221,7 @@ static struct of_device_id armpmu_of_device_ids[] = {
1221 {}, 1221 {},
1222}; 1222};
1223 1223
1224static int __devinit armpmu_device_probe(struct platform_device *pdev) 1224static int armpmu_device_probe(struct platform_device *pdev)
1225{ 1225{
1226 if (!cpu_pmu) 1226 if (!cpu_pmu)
1227 return -ENODEV; 1227 return -ENODEV;
diff --git a/arch/avr32/lib/delay.c b/arch/avr32/lib/delay.c
index 9aa8800830f3..c2f4a07dcda1 100644
--- a/arch/avr32/lib/delay.c
+++ b/arch/avr32/lib/delay.c
@@ -20,7 +20,7 @@
20#include <asm/processor.h> 20#include <asm/processor.h>
21#include <asm/sysreg.h> 21#include <asm/sysreg.h>
22 22
23int __devinit read_current_timer(unsigned long *timer_value) 23int read_current_timer(unsigned long *timer_value)
24{ 24{
25 *timer_value = sysreg_read(COUNT); 25 *timer_value = sysreg_read(COUNT);
26 return 0; 26 return 0;
diff --git a/arch/blackfin/mach-common/dpmc.c b/arch/blackfin/mach-common/dpmc.c
index 978bb400be06..724a8c5f5578 100644
--- a/arch/blackfin/mach-common/dpmc.c
+++ b/arch/blackfin/mach-common/dpmc.c
@@ -129,7 +129,7 @@ static struct notifier_block vreg_cpufreq_notifier_block = {
129 * bfin_dpmc_probe - 129 * bfin_dpmc_probe -
130 * 130 *
131 */ 131 */
132static int __devinit bfin_dpmc_probe(struct platform_device *pdev) 132static int bfin_dpmc_probe(struct platform_device *pdev)
133{ 133{
134 if (pdev->dev.platform_data) 134 if (pdev->dev.platform_data)
135 pdata = pdev->dev.platform_data; 135 pdata = pdev->dev.platform_data;
@@ -143,7 +143,7 @@ static int __devinit bfin_dpmc_probe(struct platform_device *pdev)
143/** 143/**
144 * bfin_dpmc_remove - 144 * bfin_dpmc_remove -
145 */ 145 */
146static int __devexit bfin_dpmc_remove(struct platform_device *pdev) 146static int bfin_dpmc_remove(struct platform_device *pdev)
147{ 147{
148 pdata = NULL; 148 pdata = NULL;
149 return cpufreq_unregister_notifier(&vreg_cpufreq_notifier_block, 149 return cpufreq_unregister_notifier(&vreg_cpufreq_notifier_block,
@@ -152,7 +152,7 @@ static int __devexit bfin_dpmc_remove(struct platform_device *pdev)
152 152
153struct platform_driver bfin_dpmc_device_driver = { 153struct platform_driver bfin_dpmc_device_driver = {
154 .probe = bfin_dpmc_probe, 154 .probe = bfin_dpmc_probe,
155 .remove = __devexit_p(bfin_dpmc_remove), 155 .remove = bfin_dpmc_remove,
156 .driver = { 156 .driver = {
157 .name = DRIVER_NAME, 157 .name = DRIVER_NAME,
158 } 158 }
diff --git a/arch/cris/arch-v32/drivers/pci/bios.c b/arch/cris/arch-v32/drivers/pci/bios.c
index e3dfc72d0cfd..64a5fb93767d 100644
--- a/arch/cris/arch-v32/drivers/pci/bios.c
+++ b/arch/cris/arch-v32/drivers/pci/bios.c
@@ -2,7 +2,7 @@
2#include <linux/kernel.h> 2#include <linux/kernel.h>
3#include <arch/hwregs/intr_vect.h> 3#include <arch/hwregs/intr_vect.h>
4 4
5void __devinit pcibios_fixup_bus(struct pci_bus *b) 5void pcibios_fixup_bus(struct pci_bus *b)
6{ 6{
7} 7}
8 8
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c
index ebe2cb30bd11..04a16edd5401 100644
--- a/arch/cris/arch-v32/kernel/smp.c
+++ b/arch/cris/arch-v32/kernel/smp.c
@@ -84,7 +84,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
84 cpumask_set_cpu(i, &phys_cpu_present_map); 84 cpumask_set_cpu(i, &phys_cpu_present_map);
85} 85}
86 86
87void __devinit smp_prepare_boot_cpu(void) 87void smp_prepare_boot_cpu(void)
88{ 88{
89 /* PGD pointer has moved after per_cpu initialization so 89 /* PGD pointer has moved after per_cpu initialization so
90 * update the MMU. 90 * update the MMU.
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c
index 3cb3392f799e..a5136474c6fd 100644
--- a/arch/frv/kernel/setup.c
+++ b/arch/frv/kernel/setup.c
@@ -852,7 +852,7 @@ void __init setup_arch(char **cmdline_p)
852/* 852/*
853 * 853 *
854 */ 854 */
855static int __devinit setup_arch_serial(void) 855static int setup_arch_serial(void)
856{ 856{
857 /* register those serial ports that are available */ 857 /* register those serial ports that are available */
858#ifndef CONFIG_GDBSTUB_UART0 858#ifndef CONFIG_GDBSTUB_UART0
diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c
index 71e9bcf58105..d186b254ce99 100644
--- a/arch/frv/mb93090-mb00/pci-vdk.c
+++ b/arch/frv/mb93090-mb00/pci-vdk.c
@@ -268,7 +268,7 @@ static void __init pci_fixup_umc_ide(struct pci_dev *d)
268 d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO; 268 d->resource[i].flags |= PCI_BASE_ADDRESS_SPACE_IO;
269} 269}
270 270
271static void __devinit pci_fixup_ide_bases(struct pci_dev *d) 271static void pci_fixup_ide_bases(struct pci_dev *d)
272{ 272{
273 int i; 273 int i;
274 274
@@ -287,7 +287,7 @@ static void __devinit pci_fixup_ide_bases(struct pci_dev *d)
287 } 287 }
288} 288}
289 289
290static void __devinit pci_fixup_ide_trash(struct pci_dev *d) 290static void pci_fixup_ide_trash(struct pci_dev *d)
291{ 291{
292 int i; 292 int i;
293 293
@@ -300,7 +300,7 @@ static void __devinit pci_fixup_ide_trash(struct pci_dev *d)
300 d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0; 300 d->resource[i].start = d->resource[i].end = d->resource[i].flags = 0;
301} 301}
302 302
303static void __devinit pci_fixup_latency(struct pci_dev *d) 303static void pci_fixup_latency(struct pci_dev *d)
304{ 304{
305 /* 305 /*
306 * SiS 5597 and 5598 chipsets require latency timer set to 306 * SiS 5597 and 5598 chipsets require latency timer set to
diff --git a/arch/ia64/include/asm/acpi.h b/arch/ia64/include/asm/acpi.h
index 301609c3fcec..359e68a03ca3 100644
--- a/arch/ia64/include/asm/acpi.h
+++ b/arch/ia64/include/asm/acpi.h
@@ -153,7 +153,7 @@ extern int additional_cpus;
153#else 153#else
154#define MAX_PXM_DOMAINS (256) 154#define MAX_PXM_DOMAINS (256)
155#endif 155#endif
156extern int __devinitdata pxm_to_nid_map[MAX_PXM_DOMAINS]; 156extern int pxm_to_nid_map[MAX_PXM_DOMAINS];
157extern int __initdata nid_to_pxm_map[MAX_NUMNODES]; 157extern int __initdata nid_to_pxm_map[MAX_NUMNODES];
158#endif 158#endif
159 159
diff --git a/arch/ia64/include/asm/iosapic.h b/arch/ia64/include/asm/iosapic.h
index b9c102e15f22..94c89a2d97fe 100644
--- a/arch/ia64/include/asm/iosapic.h
+++ b/arch/ia64/include/asm/iosapic.h
@@ -87,18 +87,13 @@ static inline void iosapic_eoi(char __iomem *iosapic, u32 vector)
87} 87}
88 88
89extern void __init iosapic_system_init (int pcat_compat); 89extern void __init iosapic_system_init (int pcat_compat);
90extern int __devinit iosapic_init (unsigned long address, 90extern int iosapic_init (unsigned long address, unsigned int gsi_base);
91 unsigned int gsi_base);
92#ifdef CONFIG_HOTPLUG
93extern int iosapic_remove (unsigned int gsi_base); 91extern int iosapic_remove (unsigned int gsi_base);
94#else
95#define iosapic_remove(gsi_base) (-EINVAL)
96#endif /* CONFIG_HOTPLUG */
97extern int gsi_to_irq (unsigned int gsi); 92extern int gsi_to_irq (unsigned int gsi);
98extern int iosapic_register_intr (unsigned int gsi, unsigned long polarity, 93extern int iosapic_register_intr (unsigned int gsi, unsigned long polarity,
99 unsigned long trigger); 94 unsigned long trigger);
100extern void iosapic_unregister_intr (unsigned int irq); 95extern void iosapic_unregister_intr (unsigned int irq);
101extern void __devinit iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi, 96extern void iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi,
102 unsigned long polarity, 97 unsigned long polarity,
103 unsigned long trigger); 98 unsigned long trigger);
104extern int __init iosapic_register_platform_intr (u32 int_type, 99extern int __init iosapic_register_platform_intr (u32 int_type,
@@ -109,7 +104,7 @@ extern int __init iosapic_register_platform_intr (u32 int_type,
109 unsigned long trigger); 104 unsigned long trigger);
110 105
111#ifdef CONFIG_NUMA 106#ifdef CONFIG_NUMA
112extern void __devinit map_iosapic_to_node (unsigned int, int); 107extern void map_iosapic_to_node (unsigned int, int);
113#endif 108#endif
114#else 109#else
115#define iosapic_system_init(pcat_compat) do { } while (0) 110#define iosapic_system_init(pcat_compat) do { } while (0)
diff --git a/arch/ia64/include/asm/parport.h b/arch/ia64/include/asm/parport.h
index 67e16adfcd25..638b4d271b99 100644
--- a/arch/ia64/include/asm/parport.h
+++ b/arch/ia64/include/asm/parport.h
@@ -9,10 +9,9 @@
9#ifndef _ASM_IA64_PARPORT_H 9#ifndef _ASM_IA64_PARPORT_H
10#define _ASM_IA64_PARPORT_H 1 10#define _ASM_IA64_PARPORT_H 1
11 11
12static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); 12static int parport_pc_find_isa_ports(int autoirq, int autodma);
13 13
14static int __devinit 14static int parport_pc_find_nonpci_ports(int autoirq, int autodma)
15parport_pc_find_nonpci_ports (int autoirq, int autodma)
16{ 15{
17 return parport_pc_find_isa_ports(autoirq, autodma); 16 return parport_pc_find_isa_ports(autoirq, autodma);
18} 17}
diff --git a/arch/ia64/include/asm/smp.h b/arch/ia64/include/asm/smp.h
index 0b3b3997decd..fea21e986022 100644
--- a/arch/ia64/include/asm/smp.h
+++ b/arch/ia64/include/asm/smp.h
@@ -55,7 +55,7 @@ extern struct smp_boot_data {
55 int cpu_phys_id[NR_CPUS]; 55 int cpu_phys_id[NR_CPUS];
56} smp_boot_data __initdata; 56} smp_boot_data __initdata;
57 57
58extern char no_int_routing __devinitdata; 58extern char no_int_routing;
59 59
60extern cpumask_t cpu_core_map[NR_CPUS]; 60extern cpumask_t cpu_core_map[NR_CPUS];
61DECLARE_PER_CPU_SHARED_ALIGNED(cpumask_t, cpu_sibling_map); 61DECLARE_PER_CPU_SHARED_ALIGNED(cpumask_t, cpu_sibling_map);
diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h
index 8b3ff2f5b861..c3cc42a15af1 100644
--- a/arch/ia64/include/asm/unistd.h
+++ b/arch/ia64/include/asm/unistd.h
@@ -11,7 +11,7 @@
11 11
12 12
13 13
14#define NR_syscalls 311 /* length of syscall table */ 14#define NR_syscalls 312 /* length of syscall table */
15 15
16/* 16/*
17 * The following defines stop scripts/checksyscalls.sh from complaining about 17 * The following defines stop scripts/checksyscalls.sh from complaining about
diff --git a/arch/ia64/include/uapi/asm/unistd.h b/arch/ia64/include/uapi/asm/unistd.h
index b706aa54df20..34fd6fe46da1 100644
--- a/arch/ia64/include/uapi/asm/unistd.h
+++ b/arch/ia64/include/uapi/asm/unistd.h
@@ -324,5 +324,6 @@
324#define __NR_process_vm_readv 1332 324#define __NR_process_vm_readv 1332
325#define __NR_process_vm_writev 1333 325#define __NR_process_vm_writev 1333
326#define __NR_accept4 1334 326#define __NR_accept4 1334
327#define __NR_finit_module 1335
327 328
328#endif /* _UAPI_ASM_IA64_UNISTD_H */ 329#endif /* _UAPI_ASM_IA64_UNISTD_H */
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index e9682f5be343..335eb07480fe 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -422,7 +422,7 @@ static int __init acpi_parse_madt(struct acpi_table_header *table)
422#define PXM_FLAG_LEN ((MAX_PXM_DOMAINS + 1)/32) 422#define PXM_FLAG_LEN ((MAX_PXM_DOMAINS + 1)/32)
423 423
424static int __initdata srat_num_cpus; /* number of cpus */ 424static int __initdata srat_num_cpus; /* number of cpus */
425static u32 __devinitdata pxm_flag[PXM_FLAG_LEN]; 425static u32 pxm_flag[PXM_FLAG_LEN];
426#define pxm_bit_set(bit) (set_bit(bit,(void *)pxm_flag)) 426#define pxm_bit_set(bit) (set_bit(bit,(void *)pxm_flag))
427#define pxm_bit_test(bit) (test_bit(bit,(void *)pxm_flag)) 427#define pxm_bit_test(bit) (test_bit(bit,(void *)pxm_flag))
428static struct acpi_table_slit __initdata *slit_table; 428static struct acpi_table_slit __initdata *slit_table;
@@ -956,8 +956,8 @@ EXPORT_SYMBOL(acpi_unmap_lsapic);
956#endif /* CONFIG_ACPI_HOTPLUG_CPU */ 956#endif /* CONFIG_ACPI_HOTPLUG_CPU */
957 957
958#ifdef CONFIG_ACPI_NUMA 958#ifdef CONFIG_ACPI_NUMA
959static acpi_status __devinit 959static acpi_status acpi_map_iosapic(acpi_handle handle, u32 depth,
960acpi_map_iosapic(acpi_handle handle, u32 depth, void *context, void **ret) 960 void *context, void **ret)
961{ 961{
962 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 962 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
963 union acpi_object *obj; 963 union acpi_object *obj;
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index e25b784a2b72..6bfd8429ee0f 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -1785,6 +1785,7 @@ sys_call_table:
1785 data8 sys_process_vm_readv 1785 data8 sys_process_vm_readv
1786 data8 sys_process_vm_writev 1786 data8 sys_process_vm_writev
1787 data8 sys_accept4 1787 data8 sys_accept4
1788 data8 sys_finit_module // 1335
1788 1789
1789 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls 1790 .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls
1790#endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ 1791#endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index ef4b5d877cf2..ee33c3aaa2fc 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -147,7 +147,7 @@ static struct iosapic_intr_info {
147 unsigned char trigger : 1; /* trigger mode (see iosapic.h) */ 147 unsigned char trigger : 1; /* trigger mode (see iosapic.h) */
148} iosapic_intr_info[NR_IRQS]; 148} iosapic_intr_info[NR_IRQS];
149 149
150static unsigned char pcat_compat __devinitdata; /* 8259 compatibility flag */ 150static unsigned char pcat_compat; /* 8259 compatibility flag */
151 151
152static inline void 152static inline void
153iosapic_write(struct iosapic *iosapic, unsigned int reg, u32 val) 153iosapic_write(struct iosapic *iosapic, unsigned int reg, u32 val)
@@ -914,10 +914,8 @@ iosapic_register_platform_intr (u32 int_type, unsigned int gsi,
914/* 914/*
915 * ACPI calls this when it finds an entry for a legacy ISA IRQ override. 915 * ACPI calls this when it finds an entry for a legacy ISA IRQ override.
916 */ 916 */
917void __devinit 917void iosapic_override_isa_irq(unsigned int isa_irq, unsigned int gsi,
918iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi, 918 unsigned long polarity, unsigned long trigger)
919 unsigned long polarity,
920 unsigned long trigger)
921{ 919{
922 int vector, irq; 920 int vector, irq;
923 unsigned int dest = cpu_physical_id(smp_processor_id()); 921 unsigned int dest = cpu_physical_id(smp_processor_id());
@@ -1012,8 +1010,7 @@ iosapic_check_gsi_range (unsigned int gsi_base, unsigned int ver)
1012 return 0; 1010 return 0;
1013} 1011}
1014 1012
1015int __devinit 1013int iosapic_init(unsigned long phys_addr, unsigned int gsi_base)
1016iosapic_init (unsigned long phys_addr, unsigned int gsi_base)
1017{ 1014{
1018 int num_rte, err, index; 1015 int num_rte, err, index;
1019 unsigned int isa_irq, ver; 1016 unsigned int isa_irq, ver;
@@ -1070,9 +1067,7 @@ iosapic_init (unsigned long phys_addr, unsigned int gsi_base)
1070 return 0; 1067 return 0;
1071} 1068}
1072 1069
1073#ifdef CONFIG_HOTPLUG 1070int iosapic_remove(unsigned int gsi_base)
1074int
1075iosapic_remove (unsigned int gsi_base)
1076{ 1071{
1077 int index, err = 0; 1072 int index, err = 0;
1078 unsigned long flags; 1073 unsigned long flags;
@@ -1098,11 +1093,9 @@ iosapic_remove (unsigned int gsi_base)
1098 spin_unlock_irqrestore(&iosapic_lock, flags); 1093 spin_unlock_irqrestore(&iosapic_lock, flags);
1099 return err; 1094 return err;
1100} 1095}
1101#endif /* CONFIG_HOTPLUG */
1102 1096
1103#ifdef CONFIG_NUMA 1097#ifdef CONFIG_NUMA
1104void __devinit 1098void map_iosapic_to_node(unsigned int gsi_base, int node)
1105map_iosapic_to_node(unsigned int gsi_base, int node)
1106{ 1099{
1107 int index; 1100 int index;
1108 1101
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 6a368cb2043e..500f1e4d9f9d 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -347,8 +347,7 @@ ia64_sync_itc (unsigned int master)
347/* 347/*
348 * Ideally sets up per-cpu profiling hooks. Doesn't do much now... 348 * Ideally sets up per-cpu profiling hooks. Doesn't do much now...
349 */ 349 */
350static inline void __devinit 350static inline void smp_setup_percpu_timer(void)
351smp_setup_percpu_timer (void)
352{ 351{
353} 352}
354 353
@@ -563,7 +562,7 @@ smp_prepare_cpus (unsigned int max_cpus)
563 } 562 }
564} 563}
565 564
566void __devinit smp_prepare_boot_cpu(void) 565void smp_prepare_boot_cpu(void)
567{ 566{
568 set_cpu_online(smp_processor_id(), true); 567 set_cpu_online(smp_processor_id(), true);
569 cpu_set(smp_processor_id(), cpu_callin_map); 568 cpu_set(smp_processor_id(), cpu_callin_map);
@@ -713,8 +712,7 @@ smp_cpus_done (unsigned int dummy)
713 (int)num_online_cpus(), bogosum/(500000/HZ), (bogosum/(5000/HZ))%100); 712 (int)num_online_cpus(), bogosum/(500000/HZ), (bogosum/(5000/HZ))%100);
714} 713}
715 714
716static inline void __devinit 715static inline void set_cpu_sibling_map(int cpu)
717set_cpu_sibling_map(int cpu)
718{ 716{
719 int i; 717 int i;
720 718
@@ -793,8 +791,7 @@ init_smp_config(void)
793 * identify_siblings(cpu) gets called from identify_cpu. This populates the 791 * identify_siblings(cpu) gets called from identify_cpu. This populates the
794 * information related to logical execution units in per_cpu_data structure. 792 * information related to logical execution units in per_cpu_data structure.
795 */ 793 */
796void __devinit 794void identify_siblings(struct cpuinfo_ia64 *c)
797identify_siblings(struct cpuinfo_ia64 *c)
798{ 795{
799 long status; 796 long status;
800 u16 pltid; 797 u16 pltid;
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index b1995efbfd21..88a794536bc0 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -243,8 +243,7 @@ static int __init nojitter_setup(char *str)
243__setup("nojitter", nojitter_setup); 243__setup("nojitter", nojitter_setup);
244 244
245 245
246void __devinit 246void ia64_init_itm(void)
247ia64_init_itm (void)
248{ 247{
249 unsigned long platform_base_freq, itc_freq; 248 unsigned long platform_base_freq, itc_freq;
250 struct pal_freq_ratio itc_ratio, proc_ratio; 249 struct pal_freq_ratio itc_ratio, proc_ratio;
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index 082e383c1b6f..b755ea92aea7 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -294,11 +294,10 @@ setup_gate (void)
294 ia64_patch_gate(); 294 ia64_patch_gate();
295} 295}
296 296
297void __devinit 297void ia64_mmu_init(void *my_cpu_data)
298ia64_mmu_init (void *my_cpu_data)
299{ 298{
300 unsigned long pta, impl_va_bits; 299 unsigned long pta, impl_va_bits;
301 extern void __devinit tlb_init (void); 300 extern void tlb_init(void);
302 301
303#ifdef CONFIG_DISABLE_VHPT 302#ifdef CONFIG_DISABLE_VHPT
304# define VHPT_ENABLE_BIT 0 303# define VHPT_ENABLE_BIT 0
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c
index 7b3cdc6c6d91..ed6129768681 100644
--- a/arch/ia64/mm/tlb.c
+++ b/arch/ia64/mm/tlb.c
@@ -337,8 +337,7 @@ flush_tlb_range (struct vm_area_struct *vma, unsigned long start,
337} 337}
338EXPORT_SYMBOL(flush_tlb_range); 338EXPORT_SYMBOL(flush_tlb_range);
339 339
340void __devinit 340void ia64_tlb_init(void)
341ia64_tlb_init (void)
342{ 341{
343 ia64_ptce_info_t uninitialized_var(ptce_info); /* GCC be quiet */ 342 ia64_ptce_info_t uninitialized_var(ptce_info); /* GCC be quiet */
344 u64 tr_pgbits; 343 u64 tr_pgbits;
diff --git a/arch/ia64/pci/fixup.c b/arch/ia64/pci/fixup.c
index eab28e314022..5dc969dd4ac0 100644
--- a/arch/ia64/pci/fixup.c
+++ b/arch/ia64/pci/fixup.c
@@ -24,7 +24,7 @@
24 * video device at this point. 24 * video device at this point.
25 */ 25 */
26 26
27static void __devinit pci_fixup_video(struct pci_dev *pdev) 27static void pci_fixup_video(struct pci_dev *pdev)
28{ 28{
29 struct pci_dev *bridge; 29 struct pci_dev *bridge;
30 struct pci_bus *bus; 30 struct pci_bus *bus;
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 5faa66c5c2a8..55b72ad57329 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -116,8 +116,7 @@ struct pci_ops pci_root_ops = {
116 116
117/* Called by ACPI when it finds a new root bus. */ 117/* Called by ACPI when it finds a new root bus. */
118 118
119static struct pci_controller * __devinit 119static struct pci_controller *alloc_pci_controller(int seg)
120alloc_pci_controller (int seg)
121{ 120{
122 struct pci_controller *controller; 121 struct pci_controller *controller;
123 122
@@ -165,8 +164,8 @@ new_space (u64 phys_base, int sparse)
165 return i; 164 return i;
166} 165}
167 166
168static u64 __devinit 167static u64 add_io_space(struct pci_root_info *info,
169add_io_space (struct pci_root_info *info, struct acpi_resource_address64 *addr) 168 struct acpi_resource_address64 *addr)
170{ 169{
171 struct resource *resource; 170 struct resource *resource;
172 char *name; 171 char *name;
@@ -226,8 +225,8 @@ out:
226 return ~0; 225 return ~0;
227} 226}
228 227
229static acpi_status __devinit resource_to_window(struct acpi_resource *resource, 228static acpi_status resource_to_window(struct acpi_resource *resource,
230 struct acpi_resource_address64 *addr) 229 struct acpi_resource_address64 *addr)
231{ 230{
232 acpi_status status; 231 acpi_status status;
233 232
@@ -249,8 +248,7 @@ static acpi_status __devinit resource_to_window(struct acpi_resource *resource,
249 return AE_ERROR; 248 return AE_ERROR;
250} 249}
251 250
252static acpi_status __devinit 251static acpi_status count_window(struct acpi_resource *resource, void *data)
253count_window (struct acpi_resource *resource, void *data)
254{ 252{
255 unsigned int *windows = (unsigned int *) data; 253 unsigned int *windows = (unsigned int *) data;
256 struct acpi_resource_address64 addr; 254 struct acpi_resource_address64 addr;
@@ -263,7 +261,7 @@ count_window (struct acpi_resource *resource, void *data)
263 return AE_OK; 261 return AE_OK;
264} 262}
265 263
266static __devinit acpi_status add_window(struct acpi_resource *res, void *data) 264static acpi_status add_window(struct acpi_resource *res, void *data)
267{ 265{
268 struct pci_root_info *info = data; 266 struct pci_root_info *info = data;
269 struct pci_window *window; 267 struct pci_window *window;
@@ -324,8 +322,7 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
324 return AE_OK; 322 return AE_OK;
325} 323}
326 324
327struct pci_bus * __devinit 325struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
328pci_acpi_scan_root(struct acpi_pci_root *root)
329{ 326{
330 struct acpi_device *device = root->device; 327 struct acpi_device *device = root->device;
331 int domain = root->segment; 328 int domain = root->segment;
@@ -396,7 +393,7 @@ out1:
396 return NULL; 393 return NULL;
397} 394}
398 395
399static int __devinit is_valid_resource(struct pci_dev *dev, int idx) 396static int is_valid_resource(struct pci_dev *dev, int idx)
400{ 397{
401 unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM; 398 unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM;
402 struct resource *devr = &dev->resource[idx], *busr; 399 struct resource *devr = &dev->resource[idx], *busr;
@@ -414,8 +411,7 @@ static int __devinit is_valid_resource(struct pci_dev *dev, int idx)
414 return 0; 411 return 0;
415} 412}
416 413
417static void __devinit 414static void pcibios_fixup_resources(struct pci_dev *dev, int start, int limit)
418pcibios_fixup_resources(struct pci_dev *dev, int start, int limit)
419{ 415{
420 int i; 416 int i;
421 417
@@ -427,13 +423,13 @@ pcibios_fixup_resources(struct pci_dev *dev, int start, int limit)
427 } 423 }
428} 424}
429 425
430void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) 426void pcibios_fixup_device_resources(struct pci_dev *dev)
431{ 427{
432 pcibios_fixup_resources(dev, 0, PCI_BRIDGE_RESOURCES); 428 pcibios_fixup_resources(dev, 0, PCI_BRIDGE_RESOURCES);
433} 429}
434EXPORT_SYMBOL_GPL(pcibios_fixup_device_resources); 430EXPORT_SYMBOL_GPL(pcibios_fixup_device_resources);
435 431
436static void __devinit pcibios_fixup_bridge_resources(struct pci_dev *dev) 432static void pcibios_fixup_bridge_resources(struct pci_dev *dev)
437{ 433{
438 pcibios_fixup_resources(dev, PCI_BRIDGE_RESOURCES, PCI_NUM_RESOURCES); 434 pcibios_fixup_resources(dev, PCI_BRIDGE_RESOURCES, PCI_NUM_RESOURCES);
439} 435}
@@ -441,8 +437,7 @@ static void __devinit pcibios_fixup_bridge_resources(struct pci_dev *dev)
441/* 437/*
442 * Called after each bus is probed, but before its children are examined. 438 * Called after each bus is probed, but before its children are examined.
443 */ 439 */
444void __devinit 440void pcibios_fixup_bus(struct pci_bus *b)
445pcibios_fixup_bus (struct pci_bus *b)
446{ 441{
447 struct pci_dev *dev; 442 struct pci_dev *dev;
448 443
diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c
index 8630875e74b5..11f2275570fb 100644
--- a/arch/ia64/sn/kernel/io_common.c
+++ b/arch/ia64/sn/kernel/io_common.c
@@ -435,8 +435,7 @@ void sn_generate_path(struct pci_bus *pci_bus, char *address)
435 geo_slot(geoid)); 435 geo_slot(geoid));
436} 436}
437 437
438void __devinit 438void sn_pci_fixup_bus(struct pci_bus *bus)
439sn_pci_fixup_bus(struct pci_bus *bus)
440{ 439{
441 440
442 if (SN_ACPI_BASE_SUPPORT()) 441 if (SN_ACPI_BASE_SUPPORT())
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
index 4554f68b7865..b9992571c036 100644
--- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c
+++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c
@@ -977,7 +977,7 @@ int sn_hwperf_get_nearest_node(cnodeid_t node,
977 return e; 977 return e;
978} 978}
979 979
980static int __devinit sn_hwperf_misc_register_init(void) 980static int sn_hwperf_misc_register_init(void)
981{ 981{
982 int e; 982 int e;
983 983
diff --git a/arch/ia64/xen/irq_xen.c b/arch/ia64/xen/irq_xen.c
index 01f479ee1c43..efb74dafec4d 100644
--- a/arch/ia64/xen/irq_xen.c
+++ b/arch/ia64/xen/irq_xen.c
@@ -273,9 +273,8 @@ xen_bind_early_percpu_irq(void)
273 */ 273 */
274 274
275#ifdef CONFIG_HOTPLUG_CPU 275#ifdef CONFIG_HOTPLUG_CPU
276static int __devinit 276static int unbind_evtchn_callback(struct notifier_block *nfb,
277unbind_evtchn_callback(struct notifier_block *nfb, 277 unsigned long action, void *hcpu)
278 unsigned long action, void *hcpu)
279{ 278{
280 unsigned int cpu = (unsigned long)hcpu; 279 unsigned int cpu = (unsigned long)hcpu;
281 280
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c
index a2cfc0abb05c..13168a769f8f 100644
--- a/arch/m32r/kernel/smpboot.c
+++ b/arch/m32r/kernel/smpboot.c
@@ -127,7 +127,7 @@ static void unmap_cpu_to_physid(int, int);
127/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ 127/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
128/* Boot up APs Routines : BSP */ 128/* Boot up APs Routines : BSP */
129/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/ 129/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
130void __devinit smp_prepare_boot_cpu(void) 130void smp_prepare_boot_cpu(void)
131{ 131{
132 bsp_phys_id = hard_smp_processor_id(); 132 bsp_phys_id = hard_smp_processor_id();
133 physid_set(bsp_phys_id, phys_cpu_present_map); 133 physid_set(bsp_phys_id, phys_cpu_present_map);
diff --git a/arch/m68k/emu/nfeth.c b/arch/m68k/emu/nfeth.c
index a985a7e87d45..695cd737a42e 100644
--- a/arch/m68k/emu/nfeth.c
+++ b/arch/m68k/emu/nfeth.c
@@ -39,7 +39,7 @@ enum {
39#define MAX_UNIT 8 39#define MAX_UNIT 8
40 40
41/* These identify the driver base version and may not be removed. */ 41/* These identify the driver base version and may not be removed. */
42static const char version[] __devinitconst = 42static const char version[] =
43 KERN_INFO KBUILD_MODNAME ".c:v" DRV_VERSION " " DRV_RELDATE 43 KERN_INFO KBUILD_MODNAME ".c:v" DRV_VERSION " " DRV_RELDATE
44 " S.Opichal, M.Jurik, P.Stehlik\n" 44 " S.Opichal, M.Jurik, P.Stehlik\n"
45 KERN_INFO " http://aranym.org/\n"; 45 KERN_INFO " http://aranym.org/\n";
diff --git a/arch/m68k/include/asm/parport.h b/arch/m68k/include/asm/parport.h
index 646b1872f73b..5ea75e6a7399 100644
--- a/arch/m68k/include/asm/parport.h
+++ b/arch/m68k/include/asm/parport.h
@@ -15,8 +15,8 @@
15#define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2) 15#define outsl(port,buf,len) isa_outsb(port,buf,(len)<<2)
16 16
17/* no dma, or IRQ autoprobing */ 17/* no dma, or IRQ autoprobing */
18static int __devinit parport_pc_find_isa_ports (int autoirq, int autodma); 18static int parport_pc_find_isa_ports (int autoirq, int autodma);
19static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) 19static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
20{ 20{
21 if (! (MACH_IS_Q40)) 21 if (! (MACH_IS_Q40))
22 return 0; /* count=0 */ 22 return 0; /* count=0 */
diff --git a/arch/m68k/kernel/pcibios.c b/arch/m68k/kernel/pcibios.c
index 73fa0b56a06c..931a31ff59dd 100644
--- a/arch/m68k/kernel/pcibios.c
+++ b/arch/m68k/kernel/pcibios.c
@@ -87,7 +87,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
87 return 0; 87 return 0;
88} 88}
89 89
90void __devinit pcibios_fixup_bus(struct pci_bus *bus) 90void pcibios_fixup_bus(struct pci_bus *bus)
91{ 91{
92 struct pci_dev *dev; 92 struct pci_dev *dev;
93 93
@@ -97,7 +97,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
97 } 97 }
98} 98}
99 99
100char __devinit *pcibios_setup(char *str) 100char *pcibios_setup(char *str)
101{ 101{
102 return str; 102 return str;
103} 103}
diff --git a/arch/microblaze/configs/mmu_defconfig b/arch/microblaze/configs/mmu_defconfig
index b3f5eecff2a7..d2b097a652d9 100644
--- a/arch/microblaze/configs/mmu_defconfig
+++ b/arch/microblaze/configs/mmu_defconfig
@@ -1,25 +1,22 @@
1CONFIG_EXPERIMENTAL=y 1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y 2CONFIG_SYSVIPC=y
3CONFIG_POSIX_MQUEUE=y
4CONFIG_FHANDLE=y
5CONFIG_AUDIT=y
6CONFIG_AUDIT_LOGINUID_IMMUTABLE=y
3CONFIG_IKCONFIG=y 7CONFIG_IKCONFIG=y
4CONFIG_IKCONFIG_PROC=y 8CONFIG_IKCONFIG_PROC=y
9CONFIG_SYSFS_DEPRECATED=y
5CONFIG_SYSFS_DEPRECATED_V2=y 10CONFIG_SYSFS_DEPRECATED_V2=y
6CONFIG_BLK_DEV_INITRD=y
7CONFIG_INITRAMFS_SOURCE="rootfs.cpio"
8CONFIG_INITRAMFS_COMPRESSION_GZIP=y
9# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
10CONFIG_EXPERT=y
11CONFIG_KALLSYMS_ALL=y 11CONFIG_KALLSYMS_ALL=y
12CONFIG_KALLSYMS_EXTRA_PASS=y
13# CONFIG_HOTPLUG is not set
14# CONFIG_BASE_FULL is not set 12# CONFIG_BASE_FULL is not set
15# CONFIG_FUTEX is not set 13CONFIG_EMBEDDED=y
16# CONFIG_EPOLL is not set
17# CONFIG_SIGNALFD is not set
18# CONFIG_SHMEM is not set
19CONFIG_SLAB=y 14CONFIG_SLAB=y
20CONFIG_MODULES=y 15CONFIG_MODULES=y
21CONFIG_MODULE_UNLOAD=y 16CONFIG_MODULE_UNLOAD=y
22# CONFIG_BLK_DEV_BSG is not set 17# CONFIG_BLK_DEV_BSG is not set
18CONFIG_PARTITION_ADVANCED=y
19# CONFIG_EFI_PARTITION is not set
23CONFIG_OPT_LIB_ASM=y 20CONFIG_OPT_LIB_ASM=y
24CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 21CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1
25CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 22CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1
@@ -31,39 +28,62 @@ CONFIG_HZ_100=y
31CONFIG_MMU=y 28CONFIG_MMU=y
32CONFIG_CMDLINE_BOOL=y 29CONFIG_CMDLINE_BOOL=y
33CONFIG_CMDLINE_FORCE=y 30CONFIG_CMDLINE_FORCE=y
31CONFIG_HIGHMEM=y
32CONFIG_PCI=y
33CONFIG_PCI_XILINX=y
34CONFIG_NET=y 34CONFIG_NET=y
35CONFIG_PACKET=y 35CONFIG_PACKET=y
36CONFIG_UNIX=y 36CONFIG_UNIX=y
37CONFIG_INET=y 37CONFIG_INET=y
38# CONFIG_INET_LRO is not set 38# CONFIG_INET_LRO is not set
39# CONFIG_IPV6 is not set 39# CONFIG_IPV6 is not set
40CONFIG_MTD=y
40CONFIG_PROC_DEVICETREE=y 41CONFIG_PROC_DEVICETREE=y
41CONFIG_BLK_DEV_RAM=y 42CONFIG_BLK_DEV_RAM=y
42CONFIG_BLK_DEV_RAM_SIZE=8192 43CONFIG_BLK_DEV_RAM_SIZE=8192
43CONFIG_NETDEVICES=y 44CONFIG_NETDEVICES=y
44CONFIG_NET_ETHERNET=y
45CONFIG_XILINX_EMACLITE=y 45CONFIG_XILINX_EMACLITE=y
46CONFIG_XILINX_LL_TEMAC=y
46# CONFIG_INPUT is not set 47# CONFIG_INPUT is not set
47# CONFIG_SERIO is not set 48# CONFIG_SERIO is not set
48# CONFIG_VT is not set 49# CONFIG_VT is not set
50CONFIG_SERIAL_8250=y
51CONFIG_SERIAL_8250_CONSOLE=y
49CONFIG_SERIAL_UARTLITE=y 52CONFIG_SERIAL_UARTLITE=y
50CONFIG_SERIAL_UARTLITE_CONSOLE=y 53CONFIG_SERIAL_UARTLITE_CONSOLE=y
51# CONFIG_HW_RANDOM is not set 54# CONFIG_HW_RANDOM is not set
55CONFIG_XILINX_HWICAP=y
56CONFIG_I2C=y
57CONFIG_I2C_XILINX=y
58CONFIG_SPI=y
59CONFIG_SPI_XILINX=y
60CONFIG_GPIOLIB=y
61CONFIG_GPIO_SYSFS=y
62CONFIG_GPIO_XILINX=y
52# CONFIG_HWMON is not set 63# CONFIG_HWMON is not set
64CONFIG_WATCHDOG=y
65CONFIG_XILINX_WATCHDOG=y
66CONFIG_FB=y
67CONFIG_FB_XILINX=y
53# CONFIG_USB_SUPPORT is not set 68# CONFIG_USB_SUPPORT is not set
69CONFIG_UIO=y
70CONFIG_UIO_PDRV=y
71CONFIG_UIO_PDRV_GENIRQ=y
72CONFIG_UIO_DMEM_GENIRQ=y
54CONFIG_EXT2_FS=y 73CONFIG_EXT2_FS=y
55# CONFIG_DNOTIFY is not set 74# CONFIG_DNOTIFY is not set
75CONFIG_CRAMFS=y
76CONFIG_ROMFS_FS=y
56CONFIG_NFS_FS=y 77CONFIG_NFS_FS=y
57CONFIG_NFS_V3=y
58CONFIG_CIFS=y 78CONFIG_CIFS=y
59CONFIG_CIFS_STATS=y 79CONFIG_CIFS_STATS=y
60CONFIG_CIFS_STATS2=y 80CONFIG_CIFS_STATS2=y
61CONFIG_PARTITION_ADVANCED=y
62CONFIG_DEBUG_KERNEL=y
63CONFIG_DETECT_HUNG_TASK=y 81CONFIG_DETECT_HUNG_TASK=y
64CONFIG_DEBUG_SLAB=y 82CONFIG_DEBUG_SLAB=y
65CONFIG_DEBUG_SPINLOCK=y 83CONFIG_DEBUG_SPINLOCK=y
66CONFIG_DEBUG_INFO=y 84CONFIG_DEBUG_INFO=y
67# CONFIG_RCU_CPU_STALL_DETECTOR is not set
68CONFIG_EARLY_PRINTK=y 85CONFIG_EARLY_PRINTK=y
86CONFIG_KEYS=y
87CONFIG_ENCRYPTED_KEYS=y
88CONFIG_KEYS_DEBUG_PROC_KEYS=y
69# CONFIG_CRYPTO_ANSI_CPRNG is not set 89# CONFIG_CRYPTO_ANSI_CPRNG is not set
diff --git a/arch/microblaze/configs/nommu_defconfig b/arch/microblaze/configs/nommu_defconfig
index 0249e4b7e1d3..10b5172283d7 100644
--- a/arch/microblaze/configs/nommu_defconfig
+++ b/arch/microblaze/configs/nommu_defconfig
@@ -1,41 +1,42 @@
1CONFIG_EXPERIMENTAL=y 1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y 2CONFIG_SYSVIPC=y
3CONFIG_POSIX_MQUEUE=y 3CONFIG_POSIX_MQUEUE=y
4CONFIG_FHANDLE=y
5CONFIG_AUDIT=y
6CONFIG_AUDIT_LOGINUID_IMMUTABLE=y
4CONFIG_BSD_PROCESS_ACCT=y 7CONFIG_BSD_PROCESS_ACCT=y
5CONFIG_BSD_PROCESS_ACCT_V3=y 8CONFIG_BSD_PROCESS_ACCT_V3=y
6CONFIG_IKCONFIG=y 9CONFIG_IKCONFIG=y
7CONFIG_IKCONFIG_PROC=y 10CONFIG_IKCONFIG_PROC=y
11CONFIG_SYSFS_DEPRECATED=y
8CONFIG_SYSFS_DEPRECATED_V2=y 12CONFIG_SYSFS_DEPRECATED_V2=y
9CONFIG_EXPERT=y
10CONFIG_KALLSYMS_ALL=y 13CONFIG_KALLSYMS_ALL=y
11CONFIG_KALLSYMS_EXTRA_PASS=y
12# CONFIG_HOTPLUG is not set
13# CONFIG_BASE_FULL is not set 14# CONFIG_BASE_FULL is not set
15CONFIG_EMBEDDED=y
14CONFIG_SLAB=y 16CONFIG_SLAB=y
15CONFIG_MODULES=y 17CONFIG_MODULES=y
16CONFIG_MODULE_UNLOAD=y 18CONFIG_MODULE_UNLOAD=y
17# CONFIG_BLK_DEV_BSG is not set 19# CONFIG_BLK_DEV_BSG is not set
18# CONFIG_OPT_LIB_FUNCTION is not set 20CONFIG_PARTITION_ADVANCED=y
21# CONFIG_EFI_PARTITION is not set
19CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1 22CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1
20CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1 23CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1
21CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1 24CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1
22CONFIG_XILINX_MICROBLAZE0_USE_DIV=1 25CONFIG_XILINX_MICROBLAZE0_USE_DIV=1
23CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=2 26CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=2
24CONFIG_XILINX_MICROBLAZE0_USE_FPU=2 27CONFIG_XILINX_MICROBLAZE0_USE_FPU=2
25CONFIG_HIGH_RES_TIMERS=y
26CONFIG_HZ_100=y 28CONFIG_HZ_100=y
27CONFIG_CMDLINE_BOOL=y 29CONFIG_CMDLINE_BOOL=y
28CONFIG_BINFMT_FLAT=y 30CONFIG_CMDLINE_FORCE=y
31CONFIG_PCI=y
32CONFIG_PCI_XILINX=y
29CONFIG_NET=y 33CONFIG_NET=y
30CONFIG_PACKET=y 34CONFIG_PACKET=y
31CONFIG_UNIX=y 35CONFIG_UNIX=y
32CONFIG_INET=y 36CONFIG_INET=y
33# CONFIG_INET_LRO is not set 37# CONFIG_INET_LRO is not set
34# CONFIG_IPV6 is not set 38# CONFIG_IPV6 is not set
35# CONFIG_PREVENT_FIRMWARE_BUILD is not set
36CONFIG_MTD=y 39CONFIG_MTD=y
37CONFIG_MTD_CONCAT=y
38CONFIG_MTD_PARTITIONS=y
39CONFIG_MTD_CMDLINE_PARTS=y 40CONFIG_MTD_CMDLINE_PARTS=y
40CONFIG_MTD_CHAR=y 41CONFIG_MTD_CHAR=y
41CONFIG_MTD_BLOCK=y 42CONFIG_MTD_BLOCK=y
@@ -45,41 +46,55 @@ CONFIG_MTD_CFI_AMDSTD=y
45CONFIG_MTD_RAM=y 46CONFIG_MTD_RAM=y
46CONFIG_MTD_UCLINUX=y 47CONFIG_MTD_UCLINUX=y
47CONFIG_PROC_DEVICETREE=y 48CONFIG_PROC_DEVICETREE=y
48CONFIG_BLK_DEV_NBD=y
49CONFIG_BLK_DEV_RAM=y 49CONFIG_BLK_DEV_RAM=y
50CONFIG_BLK_DEV_RAM_SIZE=8192
50CONFIG_NETDEVICES=y 51CONFIG_NETDEVICES=y
51CONFIG_NET_ETHERNET=y 52CONFIG_XILINX_EMACLITE=y
53CONFIG_XILINX_LL_TEMAC=y
52# CONFIG_INPUT is not set 54# CONFIG_INPUT is not set
53# CONFIG_SERIO is not set 55# CONFIG_SERIO is not set
54# CONFIG_VT is not set 56# CONFIG_VT is not set
57CONFIG_SERIAL_8250=y
58CONFIG_SERIAL_8250_CONSOLE=y
55CONFIG_SERIAL_UARTLITE=y 59CONFIG_SERIAL_UARTLITE=y
56CONFIG_SERIAL_UARTLITE_CONSOLE=y 60CONFIG_SERIAL_UARTLITE_CONSOLE=y
57CONFIG_HW_RANDOM=y 61# CONFIG_HW_RANDOM is not set
62CONFIG_XILINX_HWICAP=y
63CONFIG_I2C=y
64CONFIG_I2C_XILINX=y
65CONFIG_SPI=y
66CONFIG_SPI_XILINX=y
67CONFIG_GPIOLIB=y
68CONFIG_GPIO_SYSFS=y
69CONFIG_GPIO_XILINX=y
58# CONFIG_HWMON is not set 70# CONFIG_HWMON is not set
59CONFIG_VIDEO_OUTPUT_CONTROL=y 71CONFIG_WATCHDOG=y
72CONFIG_XILINX_WATCHDOG=y
73CONFIG_FB=y
74CONFIG_FB_XILINX=y
75# CONFIG_USB_SUPPORT is not set
76CONFIG_UIO=y
77CONFIG_UIO_PDRV=y
78CONFIG_UIO_PDRV_GENIRQ=y
79CONFIG_UIO_DMEM_GENIRQ=y
60CONFIG_EXT2_FS=y 80CONFIG_EXT2_FS=y
61# CONFIG_DNOTIFY is not set 81# CONFIG_DNOTIFY is not set
62CONFIG_CRAMFS=y 82CONFIG_CRAMFS=y
63CONFIG_ROMFS_FS=y 83CONFIG_ROMFS_FS=y
64CONFIG_NFS_FS=y 84CONFIG_NFS_FS=y
65CONFIG_NFS_V3=y
66CONFIG_NFS_V3_ACL=y 85CONFIG_NFS_V3_ACL=y
67CONFIG_UNUSED_SYMBOLS=y 86CONFIG_NLS=y
68CONFIG_DEBUG_FS=y
69CONFIG_DEBUG_KERNEL=y
70CONFIG_DEBUG_SHIRQ=y
71CONFIG_DETECT_HUNG_TASK=y 87CONFIG_DETECT_HUNG_TASK=y
72CONFIG_SCHEDSTATS=y 88CONFIG_DEBUG_SLAB=y
73CONFIG_TIMER_STATS=y 89CONFIG_DEBUG_SPINLOCK=y
74CONFIG_DEBUG_OBJECTS=y
75CONFIG_DEBUG_OBJECTS_SELFTEST=y
76CONFIG_DEBUG_OBJECTS_FREE=y
77CONFIG_DEBUG_OBJECTS_TIMERS=y
78CONFIG_DEBUG_INFO=y 90CONFIG_DEBUG_INFO=y
79CONFIG_DEBUG_LIST=y
80CONFIG_DEBUG_SG=y
81# CONFIG_RCU_CPU_STALL_DETECTOR is not set
82CONFIG_SYSCTL_SYSCALL_CHECK=y
83CONFIG_EARLY_PRINTK=y 91CONFIG_EARLY_PRINTK=y
92CONFIG_KEYS=y
93CONFIG_ENCRYPTED_KEYS=y
94CONFIG_KEYS_DEBUG_PROC_KEYS=y
95CONFIG_CRYPTO_ECB=y
96CONFIG_CRYPTO_MD4=y
97CONFIG_CRYPTO_MD5=y
98CONFIG_CRYPTO_ARC4=y
99CONFIG_CRYPTO_DES=y
84# CONFIG_CRYPTO_ANSI_CPRNG is not set 100# CONFIG_CRYPTO_ANSI_CPRNG is not set
85# CONFIG_CRC32 is not set
diff --git a/arch/microblaze/include/asm/highmem.h b/arch/microblaze/include/asm/highmem.h
index 2446a73140ac..d04638932438 100644
--- a/arch/microblaze/include/asm/highmem.h
+++ b/arch/microblaze/include/asm/highmem.h
@@ -71,7 +71,7 @@ static inline void kunmap(struct page *page)
71 kunmap_high(page); 71 kunmap_high(page);
72} 72}
73 73
74static inline void *__kmap_atomic(struct page *page) 74static inline void *kmap_atomic(struct page *page)
75{ 75{
76 return kmap_atomic_prot(page, kmap_prot); 76 return kmap_atomic_prot(page, kmap_prot);
77} 77}
diff --git a/arch/microblaze/include/asm/uaccess.h b/arch/microblaze/include/asm/uaccess.h
index 927540d3cb7d..a1ab5f0009ef 100644
--- a/arch/microblaze/include/asm/uaccess.h
+++ b/arch/microblaze/include/asm/uaccess.h
@@ -108,7 +108,7 @@ static inline int ___range_ok(unsigned long addr, unsigned long size)
108# define __EX_TABLE_SECTION ".section __ex_table,\"a\"\n" 108# define __EX_TABLE_SECTION ".section __ex_table,\"a\"\n"
109#else 109#else
110# define __FIXUP_SECTION ".section .discard,\"ax\"\n" 110# define __FIXUP_SECTION ".section .discard,\"ax\"\n"
111# define __EX_TABLE_SECTION ".section .discard,\"a\"\n" 111# define __EX_TABLE_SECTION ".section .discard,\"ax\"\n"
112#endif 112#endif
113 113
114extern unsigned long __copy_tofrom_user(void __user *to, 114extern unsigned long __copy_tofrom_user(void __user *to,
diff --git a/arch/microblaze/include/asm/unistd.h b/arch/microblaze/include/asm/unistd.h
index a5f06ac97113..10f8ac186855 100644
--- a/arch/microblaze/include/asm/unistd.h
+++ b/arch/microblaze/include/asm/unistd.h
@@ -37,9 +37,7 @@
37#define __ARCH_WANT_SYS_RT_SIGSUSPEND 37#define __ARCH_WANT_SYS_RT_SIGSUSPEND
38#define __ARCH_WANT_SYS_CLONE 38#define __ARCH_WANT_SYS_CLONE
39#define __ARCH_WANT_SYS_VFORK 39#define __ARCH_WANT_SYS_VFORK
40#ifdef CONFIG_MMU
41#define __ARCH_WANT_SYS_FORK 40#define __ARCH_WANT_SYS_FORK
42#endif
43 41
44/* 42/*
45 * "Conditional" syscalls 43 * "Conditional" syscalls
diff --git a/arch/microblaze/include/uapi/asm/unistd.h b/arch/microblaze/include/uapi/asm/unistd.h
index ccb6920f3b33..5f7fe7582f3a 100644
--- a/arch/microblaze/include/uapi/asm/unistd.h
+++ b/arch/microblaze/include/uapi/asm/unistd.h
@@ -395,7 +395,8 @@
395#define __NR_process_vm_readv 377 395#define __NR_process_vm_readv 377
396#define __NR_process_vm_writev 378 396#define __NR_process_vm_writev 378
397#define __NR_kcmp 379 397#define __NR_kcmp 379
398#define __NR_finit_module 380
398 399
399#define __NR_syscalls 380 400#define __NR_syscalls 381
400 401
401#endif /* _UAPI_ASM_MICROBLAZE_UNISTD_H */ 402#endif /* _UAPI_ASM_MICROBLAZE_UNISTD_H */
diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S
index 1cbace29b5e2..4fca56cf02f6 100644
--- a/arch/microblaze/kernel/syscall_table.S
+++ b/arch/microblaze/kernel/syscall_table.S
@@ -380,3 +380,4 @@ ENTRY(sys_call_table)
380 .long sys_process_vm_readv 380 .long sys_process_vm_readv
381 .long sys_process_vm_writev 381 .long sys_process_vm_writev
382 .long sys_kcmp 382 .long sys_kcmp
383 .long sys_finit_module
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index a1c5b996d66d..96416553cb36 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -287,7 +287,7 @@ static struct resource *__pci_mmap_make_offset(struct pci_dev *dev,
287 unsigned long io_offset = 0; 287 unsigned long io_offset = 0;
288 int i, res_bit; 288 int i, res_bit;
289 289
290 if (hose == 0) 290 if (!hose)
291 return NULL; /* should never happen */ 291 return NULL; /* should never happen */
292 292
293 /* If memory, add on the PCI bridge address offset */ 293 /* If memory, add on the PCI bridge address offset */
@@ -655,9 +655,8 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar,
655 * - Some 32 bits platforms such as 4xx can have physical space larger than 655 * - Some 32 bits platforms such as 4xx can have physical space larger than
656 * 32 bits so we need to use 64 bits values for the parsing 656 * 32 bits so we need to use 64 bits values for the parsing
657 */ 657 */
658void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, 658void pci_process_bridge_OF_ranges(struct pci_controller *hose,
659 struct device_node *dev, 659 struct device_node *dev, int primary)
660 int primary)
661{ 660{
662 const u32 *ranges; 661 const u32 *ranges;
663 int rlen; 662 int rlen;
@@ -822,15 +821,13 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
822/* Decide whether to display the domain number in /proc */ 821/* Decide whether to display the domain number in /proc */
823int pci_proc_domain(struct pci_bus *bus) 822int pci_proc_domain(struct pci_bus *bus)
824{ 823{
825 struct pci_controller *hose = pci_bus_to_host(bus);
826
827 return 0; 824 return 0;
828} 825}
829 826
830/* This header fixup will do the resource fixup for all devices as they are 827/* This header fixup will do the resource fixup for all devices as they are
831 * probed, but not for bridge ranges 828 * probed, but not for bridge ranges
832 */ 829 */
833static void __devinit pcibios_fixup_resources(struct pci_dev *dev) 830static void pcibios_fixup_resources(struct pci_dev *dev)
834{ 831{
835 struct pci_controller *hose = pci_bus_to_host(dev->bus); 832 struct pci_controller *hose = pci_bus_to_host(dev->bus);
836 int i; 833 int i;
@@ -871,8 +868,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
871 * things go more smoothly when it gets it right. It should covers cases such 868 * things go more smoothly when it gets it right. It should covers cases such
872 * as Apple "closed" bridge resources and bare-metal pSeries unassigned bridges 869 * as Apple "closed" bridge resources and bare-metal pSeries unassigned bridges
873 */ 870 */
874static int __devinit pcibios_uninitialized_bridge_resource(struct pci_bus *bus, 871static int pcibios_uninitialized_bridge_resource(struct pci_bus *bus,
875 struct resource *res) 872 struct resource *res)
876{ 873{
877 struct pci_controller *hose = pci_bus_to_host(bus); 874 struct pci_controller *hose = pci_bus_to_host(bus);
878 struct pci_dev *dev = bus->self; 875 struct pci_dev *dev = bus->self;
@@ -933,7 +930,7 @@ static int __devinit pcibios_uninitialized_bridge_resource(struct pci_bus *bus,
933} 930}
934 931
935/* Fixup resources of a PCI<->PCI bridge */ 932/* Fixup resources of a PCI<->PCI bridge */
936static void __devinit pcibios_fixup_bridge(struct pci_bus *bus) 933static void pcibios_fixup_bridge(struct pci_bus *bus)
937{ 934{
938 struct resource *res; 935 struct resource *res;
939 int i; 936 int i;
@@ -970,14 +967,14 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus)
970 } 967 }
971} 968}
972 969
973void __devinit pcibios_setup_bus_self(struct pci_bus *bus) 970void pcibios_setup_bus_self(struct pci_bus *bus)
974{ 971{
975 /* Fix up the bus resources for P2P bridges */ 972 /* Fix up the bus resources for P2P bridges */
976 if (bus->self != NULL) 973 if (bus->self != NULL)
977 pcibios_fixup_bridge(bus); 974 pcibios_fixup_bridge(bus);
978} 975}
979 976
980void __devinit pcibios_setup_bus_devices(struct pci_bus *bus) 977void pcibios_setup_bus_devices(struct pci_bus *bus)
981{ 978{
982 struct pci_dev *dev; 979 struct pci_dev *dev;
983 980
@@ -1002,7 +999,7 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
1002 } 999 }
1003} 1000}
1004 1001
1005void __devinit pcibios_fixup_bus(struct pci_bus *bus) 1002void pcibios_fixup_bus(struct pci_bus *bus)
1006{ 1003{
1007 /* When called from the generic PCI probe, read PCI<->PCI bridge 1004 /* When called from the generic PCI probe, read PCI<->PCI bridge
1008 * bases. This is -not- called when generating the PCI tree from 1005 * bases. This is -not- called when generating the PCI tree from
@@ -1124,7 +1121,7 @@ static int __init reparent_resources(struct resource *parent,
1124 * as well. 1121 * as well.
1125 */ 1122 */
1126 1123
1127void pcibios_allocate_bus_resources(struct pci_bus *bus) 1124static void pcibios_allocate_bus_resources(struct pci_bus *bus)
1128{ 1125{
1129 struct pci_bus *b; 1126 struct pci_bus *b;
1130 int i; 1127 int i;
@@ -1179,7 +1176,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
1179 } 1176 }
1180 printk(KERN_WARNING "PCI: Cannot allocate resource region " 1177 printk(KERN_WARNING "PCI: Cannot allocate resource region "
1181 "%d of PCI bridge %d, will remap\n", i, bus->number); 1178 "%d of PCI bridge %d, will remap\n", i, bus->number);
1182clear_resource: 1179
1183 res->start = res->end = 0; 1180 res->start = res->end = 0;
1184 res->flags = 0; 1181 res->flags = 0;
1185 } 1182 }
@@ -1188,7 +1185,7 @@ clear_resource:
1188 pcibios_allocate_bus_resources(b); 1185 pcibios_allocate_bus_resources(b);
1189} 1186}
1190 1187
1191static inline void __devinit alloc_resource(struct pci_dev *dev, int idx) 1188static inline void alloc_resource(struct pci_dev *dev, int idx)
1192{ 1189{
1193 struct resource *pr, *r = &dev->resource[idx]; 1190 struct resource *pr, *r = &dev->resource[idx];
1194 1191
@@ -1351,7 +1348,7 @@ void __init pcibios_resource_survey(void)
1351 * rest of the code later, for now, keep it as-is as our main 1348 * rest of the code later, for now, keep it as-is as our main
1352 * resource allocation function doesn't deal with sub-trees yet. 1349 * resource allocation function doesn't deal with sub-trees yet.
1353 */ 1350 */
1354void __devinit pcibios_claim_one_bus(struct pci_bus *bus) 1351void pcibios_claim_one_bus(struct pci_bus *bus)
1355{ 1352{
1356 struct pci_dev *dev; 1353 struct pci_dev *dev;
1357 struct pci_bus *child_bus; 1354 struct pci_bus *child_bus;
@@ -1410,7 +1407,8 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
1410 return pci_enable_resources(dev, mask); 1407 return pci_enable_resources(dev, mask);
1411} 1408}
1412 1409
1413static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, struct list_head *resources) 1410static void pcibios_setup_phb_resources(struct pci_controller *hose,
1411 struct list_head *resources)
1414{ 1412{
1415 unsigned long io_offset; 1413 unsigned long io_offset;
1416 struct resource *res; 1414 struct resource *res;
@@ -1433,7 +1431,8 @@ static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, s
1433 res->end = res->start + IO_SPACE_LIMIT; 1431 res->end = res->start + IO_SPACE_LIMIT;
1434 res->flags = IORESOURCE_IO; 1432 res->flags = IORESOURCE_IO;
1435 } 1433 }
1436 pci_add_resource_offset(resources, res, hose->io_base_virt - _IO_BASE); 1434 pci_add_resource_offset(resources, res,
1435 (__force resource_size_t)(hose->io_base_virt - _IO_BASE));
1437 1436
1438 pr_debug("PCI: PHB IO resource = %016llx-%016llx [%lx]\n", 1437 pr_debug("PCI: PHB IO resource = %016llx-%016llx [%lx]\n",
1439 (unsigned long long)res->start, 1438 (unsigned long long)res->start,
@@ -1477,7 +1476,7 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus)
1477 return of_node_get(hose->dn); 1476 return of_node_get(hose->dn);
1478} 1477}
1479 1478
1480static void __devinit pcibios_scan_phb(struct pci_controller *hose) 1479static void pcibios_scan_phb(struct pci_controller *hose)
1481{ 1480{
1482 LIST_HEAD(resources); 1481 LIST_HEAD(resources);
1483 struct pci_bus *bus; 1482 struct pci_bus *bus;
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index b7dc39c6c849..2ac626ab9d43 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -39,8 +39,8 @@ config MIPS
39 select GENERIC_CLOCKEVENTS 39 select GENERIC_CLOCKEVENTS
40 select GENERIC_CMOS_UPDATE 40 select GENERIC_CMOS_UPDATE
41 select HAVE_MOD_ARCH_SPECIFIC 41 select HAVE_MOD_ARCH_SPECIFIC
42 select MODULES_USE_ELF_REL 42 select MODULES_USE_ELF_REL if MODULES
43 select MODULES_USE_ELF_RELA if 64BIT 43 select MODULES_USE_ELF_RELA if MODULES && 64BIT
44 44
45menu "Machine selection" 45menu "Machine selection"
46 46
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c
index a7193ae13a5d..b67930d19325 100644
--- a/arch/mips/alchemy/common/time.c
+++ b/arch/mips/alchemy/common/time.c
@@ -53,7 +53,7 @@ static struct clocksource au1x_counter1_clocksource = {
53 .read = au1x_counter1_read, 53 .read = au1x_counter1_read,
54 .mask = CLOCKSOURCE_MASK(32), 54 .mask = CLOCKSOURCE_MASK(32),
55 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 55 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
56 .rating = 100, 56 .rating = 1500,
57}; 57};
58 58
59static int au1x_rtcmatch2_set_next_event(unsigned long delta, 59static int au1x_rtcmatch2_set_next_event(unsigned long delta,
@@ -84,7 +84,7 @@ static irqreturn_t au1x_rtcmatch2_irq(int irq, void *dev_id)
84static struct clock_event_device au1x_rtcmatch2_clockdev = { 84static struct clock_event_device au1x_rtcmatch2_clockdev = {
85 .name = "rtcmatch2", 85 .name = "rtcmatch2",
86 .features = CLOCK_EVT_FEAT_ONESHOT, 86 .features = CLOCK_EVT_FEAT_ONESHOT,
87 .rating = 100, 87 .rating = 1500,
88 .set_next_event = au1x_rtcmatch2_set_next_event, 88 .set_next_event = au1x_rtcmatch2_set_next_event,
89 .set_mode = au1x_rtcmatch2_set_mode, 89 .set_mode = au1x_rtcmatch2_set_mode,
90 .cpumask = cpu_all_mask, 90 .cpumask = cpu_all_mask,
@@ -158,20 +158,6 @@ cntr_err:
158 return -1; 158 return -1;
159} 159}
160 160
161static void __init alchemy_setup_c0timer(void)
162{
163 /*
164 * MIPS kernel assigns 'au1k_wait' to 'cpu_wait' before this
165 * function is called. Because the Alchemy counters are unusable
166 * the C0 timekeeping code is installed and use of the 'wait'
167 * instruction must be prohibited, which is done most easily by
168 * assigning NULL to cpu_wait.
169 */
170 cpu_wait = NULL;
171 r4k_clockevent_init();
172 init_r4k_clocksource();
173}
174
175static int alchemy_m2inttab[] __initdata = { 161static int alchemy_m2inttab[] __initdata = {
176 AU1000_RTC_MATCH2_INT, 162 AU1000_RTC_MATCH2_INT,
177 AU1500_RTC_MATCH2_INT, 163 AU1500_RTC_MATCH2_INT,
@@ -186,8 +172,7 @@ void __init plat_time_init(void)
186 int t; 172 int t;
187 173
188 t = alchemy_get_cputype(); 174 t = alchemy_get_cputype();
189 if (t == ALCHEMY_CPU_UNKNOWN) 175 if (t == ALCHEMY_CPU_UNKNOWN ||
190 alchemy_setup_c0timer(); 176 alchemy_time_init(alchemy_m2inttab[t]))
191 else if (alchemy_time_init(alchemy_m2inttab[t])) 177 cpu_wait = NULL; /* wait doesn't work with r4k timer */
192 alchemy_setup_c0timer();
193} 178}
diff --git a/arch/mips/cavium-octeon/serial.c b/arch/mips/cavium-octeon/serial.c
index 569f41bdcc46..f393f65f3923 100644
--- a/arch/mips/cavium-octeon/serial.c
+++ b/arch/mips/cavium-octeon/serial.c
@@ -43,7 +43,7 @@ void octeon_serial_out(struct uart_port *up, int offset, int value)
43 cvmx_write_csr((uint64_t)(up->membase + (offset << 3)), (u8)value); 43 cvmx_write_csr((uint64_t)(up->membase + (offset << 3)), (u8)value);
44} 44}
45 45
46static int __devinit octeon_serial_probe(struct platform_device *pdev) 46static int octeon_serial_probe(struct platform_device *pdev)
47{ 47{
48 int irq, res; 48 int irq, res;
49 struct resource *res_mem; 49 struct resource *res_mem;
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h
index 31ab10f02bad..dbaec94046da 100644
--- a/arch/mips/include/asm/page.h
+++ b/arch/mips/include/asm/page.h
@@ -45,8 +45,6 @@
45#define HUGETLB_PAGE_ORDER ({BUILD_BUG(); 0; }) 45#define HUGETLB_PAGE_ORDER ({BUILD_BUG(); 0; })
46#endif /* CONFIG_MIPS_HUGE_TLB_SUPPORT */ 46#endif /* CONFIG_MIPS_HUGE_TLB_SUPPORT */
47 47
48#ifndef __ASSEMBLY__
49
50#include <linux/pfn.h> 48#include <linux/pfn.h>
51#include <asm/io.h> 49#include <asm/io.h>
52 50
@@ -139,8 +137,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
139 */ 137 */
140#define ptep_buddy(x) ((pte_t *)((unsigned long)(x) ^ sizeof(pte_t))) 138#define ptep_buddy(x) ((pte_t *)((unsigned long)(x) ^ sizeof(pte_t)))
141 139
142#endif /* !__ASSEMBLY__ */
143
144/* 140/*
145 * __pa()/__va() should be used only during mem init. 141 * __pa()/__va() should be used only during mem init.
146 */ 142 */
@@ -202,7 +198,10 @@ typedef struct { unsigned long pgprot; } pgprot_t;
202#endif 198#endif
203 199
204#define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr))) 200#define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr)))
205#define virt_addr_valid(kaddr) pfn_valid(PFN_DOWN(virt_to_phys(kaddr))) 201
202extern int __virt_addr_valid(const volatile void *kaddr);
203#define virt_addr_valid(kaddr) \
204 __virt_addr_valid((const volatile void *) (kaddr))
206 205
207#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 206#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
208 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 207 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
diff --git a/arch/mips/include/asm/pci.h b/arch/mips/include/asm/pci.h
index 90bf3b3fce19..d69ea743272b 100644
--- a/arch/mips/include/asm/pci.h
+++ b/arch/mips/include/asm/pci.h
@@ -145,7 +145,7 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
145extern char * (*pcibios_plat_setup)(char *str); 145extern char * (*pcibios_plat_setup)(char *str);
146 146
147/* this function parses memory ranges from a device node */ 147/* this function parses memory ranges from a device node */
148extern void __devinit pci_load_of_ranges(struct pci_controller *hose, 148extern void pci_load_of_ranges(struct pci_controller *hose,
149 struct device_node *node); 149 struct device_node *node);
150 150
151#endif /* _ASM_PCI_H */ 151#endif /* _ASM_PCI_H */
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h
index 18806a52061c..b2050b9e64b1 100644
--- a/arch/mips/include/asm/thread_info.h
+++ b/arch/mips/include/asm/thread_info.h
@@ -29,10 +29,11 @@ struct thread_info {
29 __u32 cpu; /* current CPU */ 29 __u32 cpu; /* current CPU */
30 int preempt_count; /* 0 => preemptable, <0 => BUG */ 30 int preempt_count; /* 0 => preemptable, <0 => BUG */
31 31
32 mm_segment_t addr_limit; /* thread address space: 32 mm_segment_t addr_limit; /*
33 0-0xBFFFFFFF for user-thead 33 * thread address space limit:
34 0-0xFFFFFFFF for kernel-thread 34 * 0x7fffffff for user-thead
35 */ 35 * 0xffffffff for kernel-thread
36 */
36 struct restart_block restart_block; 37 struct restart_block restart_block;
37 struct pt_regs *regs; 38 struct pt_regs *regs;
38}; 39};
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h
index cc98a9dcb01b..0eebf3c3e03c 100644
--- a/arch/mips/include/uapi/asm/unistd.h
+++ b/arch/mips/include/uapi/asm/unistd.h
@@ -368,16 +368,17 @@
368#define __NR_process_vm_readv (__NR_Linux + 345) 368#define __NR_process_vm_readv (__NR_Linux + 345)
369#define __NR_process_vm_writev (__NR_Linux + 346) 369#define __NR_process_vm_writev (__NR_Linux + 346)
370#define __NR_kcmp (__NR_Linux + 347) 370#define __NR_kcmp (__NR_Linux + 347)
371#define __NR_finit_module (__NR_Linux + 348)
371 372
372/* 373/*
373 * Offset of the last Linux o32 flavoured syscall 374 * Offset of the last Linux o32 flavoured syscall
374 */ 375 */
375#define __NR_Linux_syscalls 347 376#define __NR_Linux_syscalls 348
376 377
377#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ 378#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
378 379
379#define __NR_O32_Linux 4000 380#define __NR_O32_Linux 4000
380#define __NR_O32_Linux_syscalls 347 381#define __NR_O32_Linux_syscalls 348
381 382
382#if _MIPS_SIM == _MIPS_SIM_ABI64 383#if _MIPS_SIM == _MIPS_SIM_ABI64
383 384
@@ -692,16 +693,17 @@
692#define __NR_process_vm_readv (__NR_Linux + 304) 693#define __NR_process_vm_readv (__NR_Linux + 304)
693#define __NR_process_vm_writev (__NR_Linux + 305) 694#define __NR_process_vm_writev (__NR_Linux + 305)
694#define __NR_kcmp (__NR_Linux + 306) 695#define __NR_kcmp (__NR_Linux + 306)
696#define __NR_finit_module (__NR_Linux + 307)
695 697
696/* 698/*
697 * Offset of the last Linux 64-bit flavoured syscall 699 * Offset of the last Linux 64-bit flavoured syscall
698 */ 700 */
699#define __NR_Linux_syscalls 306 701#define __NR_Linux_syscalls 307
700 702
701#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ 703#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
702 704
703#define __NR_64_Linux 5000 705#define __NR_64_Linux 5000
704#define __NR_64_Linux_syscalls 306 706#define __NR_64_Linux_syscalls 307
705 707
706#if _MIPS_SIM == _MIPS_SIM_NABI32 708#if _MIPS_SIM == _MIPS_SIM_NABI32
707 709
@@ -1021,15 +1023,16 @@
1021#define __NR_process_vm_readv (__NR_Linux + 309) 1023#define __NR_process_vm_readv (__NR_Linux + 309)
1022#define __NR_process_vm_writev (__NR_Linux + 310) 1024#define __NR_process_vm_writev (__NR_Linux + 310)
1023#define __NR_kcmp (__NR_Linux + 311) 1025#define __NR_kcmp (__NR_Linux + 311)
1026#define __NR_finit_module (__NR_Linux + 312)
1024 1027
1025/* 1028/*
1026 * Offset of the last N32 flavoured syscall 1029 * Offset of the last N32 flavoured syscall
1027 */ 1030 */
1028#define __NR_Linux_syscalls 311 1031#define __NR_Linux_syscalls 312
1029 1032
1030#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ 1033#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
1031 1034
1032#define __NR_N32_Linux 6000 1035#define __NR_N32_Linux 6000
1033#define __NR_N32_Linux_syscalls 311 1036#define __NR_N32_Linux_syscalls 312
1034 1037
1035#endif /* _UAPI_ASM_UNISTD_H */ 1038#endif /* _UAPI_ASM_UNISTD_H */
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c
index 9690998d4ef3..50285b2c7ffe 100644
--- a/arch/mips/kernel/asm-offsets.c
+++ b/arch/mips/kernel/asm-offsets.c
@@ -200,6 +200,9 @@ void output_mm_defines(void)
200 DEFINE(_PTRS_PER_PMD, PTRS_PER_PMD); 200 DEFINE(_PTRS_PER_PMD, PTRS_PER_PMD);
201 DEFINE(_PTRS_PER_PTE, PTRS_PER_PTE); 201 DEFINE(_PTRS_PER_PTE, PTRS_PER_PTE);
202 BLANK(); 202 BLANK();
203 DEFINE(_PAGE_SHIFT, PAGE_SHIFT);
204 DEFINE(_PAGE_SIZE, PAGE_SIZE);
205 BLANK();
203} 206}
204 207
205#ifdef CONFIG_32BIT 208#ifdef CONFIG_32BIT
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S
index 8882e5766f27..8a0096d62812 100644
--- a/arch/mips/kernel/genex.S
+++ b/arch/mips/kernel/genex.S
@@ -19,7 +19,6 @@
19#include <asm/mipsregs.h> 19#include <asm/mipsregs.h>
20#include <asm/stackframe.h> 20#include <asm/stackframe.h>
21#include <asm/war.h> 21#include <asm/war.h>
22#include <asm/page.h>
23#include <asm/thread_info.h> 22#include <asm/thread_info.h>
24 23
25#define PANIC_PIC(msg) \ 24#define PANIC_PIC(msg) \
@@ -483,8 +482,8 @@ NESTED(nmi_handler, PT_SIZE, sp)
483 MFC0 k1, CP0_ENTRYHI 482 MFC0 k1, CP0_ENTRYHI
484 andi k1, 0xff /* ASID_MASK */ 483 andi k1, 0xff /* ASID_MASK */
485 MFC0 k0, CP0_EPC 484 MFC0 k0, CP0_EPC
486 PTR_SRL k0, PAGE_SHIFT + 1 485 PTR_SRL k0, _PAGE_SHIFT + 1
487 PTR_SLL k0, PAGE_SHIFT + 1 486 PTR_SLL k0, _PAGE_SHIFT + 1
488 or k1, k0 487 or k1, k0
489 MTC0 k1, CP0_ENTRYHI 488 MTC0 k1, CP0_ENTRYHI
490 mtc0_tlbw_hazard 489 mtc0_tlbw_hazard
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
index ea695d9605e9..fcf97312f328 100644
--- a/arch/mips/kernel/head.S
+++ b/arch/mips/kernel/head.S
@@ -21,7 +21,6 @@
21#include <asm/asmmacro.h> 21#include <asm/asmmacro.h>
22#include <asm/irqflags.h> 22#include <asm/irqflags.h>
23#include <asm/regdef.h> 23#include <asm/regdef.h>
24#include <asm/page.h>
25#include <asm/pgtable-bits.h> 24#include <asm/pgtable-bits.h>
26#include <asm/mipsregs.h> 25#include <asm/mipsregs.h>
27#include <asm/stackframe.h> 26#include <asm/stackframe.h>
diff --git a/arch/mips/kernel/octeon_switch.S b/arch/mips/kernel/octeon_switch.S
index 0441f54b2a6a..207f1341578b 100644
--- a/arch/mips/kernel/octeon_switch.S
+++ b/arch/mips/kernel/octeon_switch.S
@@ -15,7 +15,6 @@
15#include <asm/fpregdef.h> 15#include <asm/fpregdef.h>
16#include <asm/mipsregs.h> 16#include <asm/mipsregs.h>
17#include <asm/asm-offsets.h> 17#include <asm/asm-offsets.h>
18#include <asm/page.h>
19#include <asm/pgtable-bits.h> 18#include <asm/pgtable-bits.h>
20#include <asm/regdef.h> 19#include <asm/regdef.h>
21#include <asm/stackframe.h> 20#include <asm/stackframe.h>
diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c
index b14c14d90fc2..d9c81c5a6c90 100644
--- a/arch/mips/kernel/perf_event_mipsxx.c
+++ b/arch/mips/kernel/perf_event_mipsxx.c
@@ -847,7 +847,6 @@ static const struct mips_perf_event xlp_event_map[PERF_COUNT_HW_MAX] = {
847 [PERF_COUNT_HW_CACHE_MISSES] = { 0x07, CNTR_ALL }, /* PAPI_L1_ICM */ 847 [PERF_COUNT_HW_CACHE_MISSES] = { 0x07, CNTR_ALL }, /* PAPI_L1_ICM */
848 [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = { 0x1b, CNTR_ALL }, /* PAPI_BR_CN */ 848 [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = { 0x1b, CNTR_ALL }, /* PAPI_BR_CN */
849 [PERF_COUNT_HW_BRANCH_MISSES] = { 0x1c, CNTR_ALL }, /* PAPI_BR_MSP */ 849 [PERF_COUNT_HW_BRANCH_MISSES] = { 0x1c, CNTR_ALL }, /* PAPI_BR_MSP */
850 [PERF_COUNT_HW_BUS_CYCLES] = { UNSUPPORTED_PERF_EVENT_ID },
851}; 850};
852 851
853/* 24K/34K/1004K cores can share the same cache event map. */ 852/* 24K/34K/1004K cores can share the same cache event map. */
@@ -1115,24 +1114,12 @@ static const struct mips_perf_event xlp_cache_map
1115 [C(RESULT_ACCESS)] = { 0x2f, CNTR_ALL }, /* PAPI_L1_DCW */ 1114 [C(RESULT_ACCESS)] = { 0x2f, CNTR_ALL }, /* PAPI_L1_DCW */
1116 [C(RESULT_MISS)] = { 0x2e, CNTR_ALL }, /* PAPI_L1_STM */ 1115 [C(RESULT_MISS)] = { 0x2e, CNTR_ALL }, /* PAPI_L1_STM */
1117 }, 1116 },
1118 [C(OP_PREFETCH)] = {
1119 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1120 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1121 },
1122}, 1117},
1123[C(L1I)] = { 1118[C(L1I)] = {
1124 [C(OP_READ)] = { 1119 [C(OP_READ)] = {
1125 [C(RESULT_ACCESS)] = { 0x04, CNTR_ALL }, /* PAPI_L1_ICA */ 1120 [C(RESULT_ACCESS)] = { 0x04, CNTR_ALL }, /* PAPI_L1_ICA */
1126 [C(RESULT_MISS)] = { 0x07, CNTR_ALL }, /* PAPI_L1_ICM */ 1121 [C(RESULT_MISS)] = { 0x07, CNTR_ALL }, /* PAPI_L1_ICM */
1127 }, 1122 },
1128 [C(OP_WRITE)] = {
1129 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1130 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1131 },
1132 [C(OP_PREFETCH)] = {
1133 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1134 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1135 },
1136}, 1123},
1137[C(LL)] = { 1124[C(LL)] = {
1138 [C(OP_READ)] = { 1125 [C(OP_READ)] = {
@@ -1143,10 +1130,6 @@ static const struct mips_perf_event xlp_cache_map
1143 [C(RESULT_ACCESS)] = { 0x34, CNTR_ALL }, /* PAPI_L2_DCA */ 1130 [C(RESULT_ACCESS)] = { 0x34, CNTR_ALL }, /* PAPI_L2_DCA */
1144 [C(RESULT_MISS)] = { 0x36, CNTR_ALL }, /* PAPI_L2_DCM */ 1131 [C(RESULT_MISS)] = { 0x36, CNTR_ALL }, /* PAPI_L2_DCM */
1145 }, 1132 },
1146 [C(OP_PREFETCH)] = {
1147 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1148 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1149 },
1150}, 1133},
1151[C(DTLB)] = { 1134[C(DTLB)] = {
1152 /* 1135 /*
@@ -1154,45 +1137,24 @@ static const struct mips_perf_event xlp_cache_map
1154 * read and write. 1137 * read and write.
1155 */ 1138 */
1156 [C(OP_READ)] = { 1139 [C(OP_READ)] = {
1157 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1158 [C(RESULT_MISS)] = { 0x2d, CNTR_ALL }, /* PAPI_TLB_DM */ 1140 [C(RESULT_MISS)] = { 0x2d, CNTR_ALL }, /* PAPI_TLB_DM */
1159 }, 1141 },
1160 [C(OP_WRITE)] = { 1142 [C(OP_WRITE)] = {
1161 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1162 [C(RESULT_MISS)] = { 0x2d, CNTR_ALL }, /* PAPI_TLB_DM */ 1143 [C(RESULT_MISS)] = { 0x2d, CNTR_ALL }, /* PAPI_TLB_DM */
1163 }, 1144 },
1164 [C(OP_PREFETCH)] = {
1165 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1166 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1167 },
1168}, 1145},
1169[C(ITLB)] = { 1146[C(ITLB)] = {
1170 [C(OP_READ)] = { 1147 [C(OP_READ)] = {
1171 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1172 [C(RESULT_MISS)] = { 0x08, CNTR_ALL }, /* PAPI_TLB_IM */ 1148 [C(RESULT_MISS)] = { 0x08, CNTR_ALL }, /* PAPI_TLB_IM */
1173 }, 1149 },
1174 [C(OP_WRITE)] = { 1150 [C(OP_WRITE)] = {
1175 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1176 [C(RESULT_MISS)] = { 0x08, CNTR_ALL }, /* PAPI_TLB_IM */ 1151 [C(RESULT_MISS)] = { 0x08, CNTR_ALL }, /* PAPI_TLB_IM */
1177 }, 1152 },
1178 [C(OP_PREFETCH)] = {
1179 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1180 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1181 },
1182}, 1153},
1183[C(BPU)] = { 1154[C(BPU)] = {
1184 [C(OP_READ)] = { 1155 [C(OP_READ)] = {
1185 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1186 [C(RESULT_MISS)] = { 0x25, CNTR_ALL }, 1156 [C(RESULT_MISS)] = { 0x25, CNTR_ALL },
1187 }, 1157 },
1188 [C(OP_WRITE)] = {
1189 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1190 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1191 },
1192 [C(OP_PREFETCH)] = {
1193 [C(RESULT_ACCESS)] = { UNSUPPORTED_PERF_EVENT_ID },
1194 [C(RESULT_MISS)] = { UNSUPPORTED_PERF_EVENT_ID },
1195 },
1196}, 1158},
1197}; 1159};
1198 1160
diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S
index 9c51be5a163a..8d32d5a6b460 100644
--- a/arch/mips/kernel/r2300_switch.S
+++ b/arch/mips/kernel/r2300_switch.S
@@ -15,7 +15,6 @@
15#include <asm/fpregdef.h> 15#include <asm/fpregdef.h>
16#include <asm/mipsregs.h> 16#include <asm/mipsregs.h>
17#include <asm/asm-offsets.h> 17#include <asm/asm-offsets.h>
18#include <asm/page.h>
19#include <asm/regdef.h> 18#include <asm/regdef.h>
20#include <asm/stackframe.h> 19#include <asm/stackframe.h>
21#include <asm/thread_info.h> 20#include <asm/thread_info.h>
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S
index 42d2a3938420..8decdfacb448 100644
--- a/arch/mips/kernel/r4k_switch.S
+++ b/arch/mips/kernel/r4k_switch.S
@@ -15,7 +15,6 @@
15#include <asm/fpregdef.h> 15#include <asm/fpregdef.h>
16#include <asm/mipsregs.h> 16#include <asm/mipsregs.h>
17#include <asm/asm-offsets.h> 17#include <asm/asm-offsets.h>
18#include <asm/page.h>
19#include <asm/pgtable-bits.h> 18#include <asm/pgtable-bits.h>
20#include <asm/regdef.h> 19#include <asm/regdef.h>
21#include <asm/stackframe.h> 20#include <asm/stackframe.h>
diff --git a/arch/mips/kernel/relocate_kernel.S b/arch/mips/kernel/relocate_kernel.S
index e4142c5f7c2b..804ebb2c34a6 100644
--- a/arch/mips/kernel/relocate_kernel.S
+++ b/arch/mips/kernel/relocate_kernel.S
@@ -9,7 +9,6 @@
9#include <asm/asm.h> 9#include <asm/asm.h>
10#include <asm/asmmacro.h> 10#include <asm/asmmacro.h>
11#include <asm/regdef.h> 11#include <asm/regdef.h>
12#include <asm/page.h>
13#include <asm/mipsregs.h> 12#include <asm/mipsregs.h>
14#include <asm/stackframe.h> 13#include <asm/stackframe.h>
15#include <asm/addrspace.h> 14#include <asm/addrspace.h>
@@ -50,7 +49,7 @@ process_entry:
50 and s3, s2, 0x8 49 and s3, s2, 0x8
51 beq s3, zero, process_entry 50 beq s3, zero, process_entry
52 and s2, s2, ~0x8 51 and s2, s2, ~0x8
53 li s6, (1 << PAGE_SHIFT) / SZREG 52 li s6, (1 << _PAGE_SHIFT) / SZREG
54 53
55copy_word: 54copy_word:
56 /* copy page word by word */ 55 /* copy page word by word */
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index 374f66e05f3d..d20a4bc9ed05 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -583,6 +583,7 @@ einval: li v0, -ENOSYS
583 sys sys_process_vm_readv 6 /* 4345 */ 583 sys sys_process_vm_readv 6 /* 4345 */
584 sys sys_process_vm_writev 6 584 sys sys_process_vm_writev 6
585 sys sys_kcmp 5 585 sys sys_kcmp 5
586 sys sys_finit_module 3
586 .endm 587 .endm
587 588
588 /* We pre-compute the number of _instruction_ bytes needed to 589 /* We pre-compute the number of _instruction_ bytes needed to
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index 169de6a6d916..b64f642da073 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -422,4 +422,5 @@ sys_call_table:
422 PTR sys_process_vm_readv 422 PTR sys_process_vm_readv
423 PTR sys_process_vm_writev /* 5305 */ 423 PTR sys_process_vm_writev /* 5305 */
424 PTR sys_kcmp 424 PTR sys_kcmp
425 PTR sys_finit_module
425 .size sys_call_table,.-sys_call_table 426 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index ad3de9668da9..c29ac197f446 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -416,4 +416,5 @@ EXPORT(sysn32_call_table)
416 PTR compat_sys_process_vm_readv 416 PTR compat_sys_process_vm_readv
417 PTR compat_sys_process_vm_writev /* 6310 */ 417 PTR compat_sys_process_vm_writev /* 6310 */
418 PTR sys_kcmp 418 PTR sys_kcmp
419 PTR sys_finit_module
419 .size sysn32_call_table,.-sysn32_call_table 420 .size sysn32_call_table,.-sysn32_call_table
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 9601be6afa3d..cf3e75e46650 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -540,4 +540,5 @@ sys_call_table:
540 PTR compat_sys_process_vm_readv /* 4345 */ 540 PTR compat_sys_process_vm_readv /* 4345 */
541 PTR compat_sys_process_vm_writev 541 PTR compat_sys_process_vm_writev
542 PTR sys_kcmp 542 PTR sys_kcmp
543 PTR sys_finit_module
543 .size sys_call_table,.-sys_call_table 544 .size sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 2e6374a589ec..66bf4e22d9b9 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -188,7 +188,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
188} 188}
189 189
190/* preload SMP state for boot cpu */ 190/* preload SMP state for boot cpu */
191void __devinit smp_prepare_boot_cpu(void) 191void smp_prepare_boot_cpu(void)
192{ 192{
193 set_cpu_possible(0, true); 193 set_cpu_possible(0, true);
194 set_cpu_online(0, true); 194 set_cpu_online(0, true);
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index 007ccbe1e264..0a4336b803e9 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -1,7 +1,8 @@
1#include <asm/asm-offsets.h> 1#include <asm/asm-offsets.h>
2#include <asm/page.h>
3#include <asm/thread_info.h> 2#include <asm/thread_info.h>
4 3
4#define PAGE_SIZE _PAGE_SIZE
5
5/* 6/*
6 * Put .bss..swapper_pg_dir as the first thing in .bss. This will 7 * Put .bss..swapper_pg_dir as the first thing in .bss. This will
7 * ensure that it has .bss alignment (64K). 8 * ensure that it has .bss alignment (64K).
diff --git a/arch/mips/lantiq/xway/dma.c b/arch/mips/lantiq/xway/dma.c
index 6453962ac898..e44a1866653f 100644
--- a/arch/mips/lantiq/xway/dma.c
+++ b/arch/mips/lantiq/xway/dma.c
@@ -210,7 +210,7 @@ ltq_dma_init_port(int p)
210} 210}
211EXPORT_SYMBOL_GPL(ltq_dma_init_port); 211EXPORT_SYMBOL_GPL(ltq_dma_init_port);
212 212
213static int __devinit 213static int
214ltq_dma_init(struct platform_device *pdev) 214ltq_dma_init(struct platform_device *pdev)
215{ 215{
216 struct clk *clk; 216 struct clk *clk;
diff --git a/arch/mips/lantiq/xway/gptu.c b/arch/mips/lantiq/xway/gptu.c
index cbb56fc022bc..e30b1ed1b936 100644
--- a/arch/mips/lantiq/xway/gptu.c
+++ b/arch/mips/lantiq/xway/gptu.c
@@ -133,7 +133,7 @@ static inline void clkdev_add_gptu(struct device *dev, const char *con,
133 clkdev_add(&clk->cl); 133 clkdev_add(&clk->cl);
134} 134}
135 135
136static int __devinit gptu_probe(struct platform_device *pdev) 136static int gptu_probe(struct platform_device *pdev)
137{ 137{
138 struct clk *clk; 138 struct clk *clk;
139 struct resource *res; 139 struct resource *res;
diff --git a/arch/mips/lantiq/xway/xrx200_phy_fw.c b/arch/mips/lantiq/xway/xrx200_phy_fw.c
index fe808bf5366d..d4d9d31f152e 100644
--- a/arch/mips/lantiq/xway/xrx200_phy_fw.c
+++ b/arch/mips/lantiq/xway/xrx200_phy_fw.c
@@ -54,7 +54,7 @@ static dma_addr_t xway_gphy_load(struct platform_device *pdev)
54 return dev_addr; 54 return dev_addr;
55} 55}
56 56
57static int __devinit xway_phy_fw_probe(struct platform_device *pdev) 57static int xway_phy_fw_probe(struct platform_device *pdev)
58{ 58{
59 dma_addr_t fw_addr; 59 dma_addr_t fw_addr;
60 struct property *pp; 60 struct property *pp;
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c
index cacfd31e8ec9..7657fd21cd3f 100644
--- a/arch/mips/mm/ioremap.c
+++ b/arch/mips/mm/ioremap.c
@@ -190,3 +190,9 @@ void __iounmap(const volatile void __iomem *addr)
190 190
191EXPORT_SYMBOL(__ioremap); 191EXPORT_SYMBOL(__ioremap);
192EXPORT_SYMBOL(__iounmap); 192EXPORT_SYMBOL(__iounmap);
193
194int __virt_addr_valid(const volatile void *kaddr)
195{
196 return pfn_valid(PFN_DOWN(virt_to_phys(kaddr)));
197}
198EXPORT_SYMBOL_GPL(__virt_addr_valid);
diff --git a/arch/mips/mm/tlbex-fault.S b/arch/mips/mm/tlbex-fault.S
index e99eaa1fbedc..318855eb5f80 100644
--- a/arch/mips/mm/tlbex-fault.S
+++ b/arch/mips/mm/tlbex-fault.S
@@ -7,7 +7,6 @@
7 * Copyright (C) 1999 Silicon Graphics, Inc. 7 * Copyright (C) 1999 Silicon Graphics, Inc.
8 */ 8 */
9#include <asm/mipsregs.h> 9#include <asm/mipsregs.h>
10#include <asm/page.h>
11#include <asm/regdef.h> 10#include <asm/regdef.h>
12#include <asm/stackframe.h> 11#include <asm/stackframe.h>
13 12
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 05613355627b..1c8ac49ec72c 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -976,13 +976,6 @@ build_get_pgde32(u32 **p, unsigned int tmp, unsigned int ptr)
976#endif 976#endif
977 uasm_i_mfc0(p, tmp, C0_BADVADDR); /* get faulting address */ 977 uasm_i_mfc0(p, tmp, C0_BADVADDR); /* get faulting address */
978 uasm_i_lw(p, ptr, uasm_rel_lo(pgdc), ptr); 978 uasm_i_lw(p, ptr, uasm_rel_lo(pgdc), ptr);
979
980 if (cpu_has_mips_r2) {
981 uasm_i_ext(p, tmp, tmp, PGDIR_SHIFT, (32 - PGDIR_SHIFT));
982 uasm_i_ins(p, ptr, tmp, PGD_T_LOG2, (32 - PGDIR_SHIFT));
983 return;
984 }
985
986 uasm_i_srl(p, tmp, tmp, PGDIR_SHIFT); /* get pgd only bits */ 979 uasm_i_srl(p, tmp, tmp, PGDIR_SHIFT); /* get pgd only bits */
987 uasm_i_sll(p, tmp, tmp, PGD_T_LOG2); 980 uasm_i_sll(p, tmp, tmp, PGD_T_LOG2);
988 uasm_i_addu(p, ptr, ptr, tmp); /* add in pgd offset */ 981 uasm_i_addu(p, ptr, ptr, tmp); /* add in pgd offset */
@@ -1018,15 +1011,6 @@ static void __cpuinit build_adjust_context(u32 **p, unsigned int ctx)
1018 1011
1019static void __cpuinit build_get_ptep(u32 **p, unsigned int tmp, unsigned int ptr) 1012static void __cpuinit build_get_ptep(u32 **p, unsigned int tmp, unsigned int ptr)
1020{ 1013{
1021 if (cpu_has_mips_r2) {
1022 /* PTE ptr offset is obtained from BadVAddr */
1023 UASM_i_MFC0(p, tmp, C0_BADVADDR);
1024 UASM_i_LW(p, ptr, 0, ptr);
1025 uasm_i_ext(p, tmp, tmp, PAGE_SHIFT+1, PGDIR_SHIFT-PAGE_SHIFT-1);
1026 uasm_i_ins(p, ptr, tmp, PTE_T_LOG2+1, PGDIR_SHIFT-PAGE_SHIFT-1);
1027 return;
1028 }
1029
1030 /* 1014 /*
1031 * Bug workaround for the Nevada. It seems as if under certain 1015 * Bug workaround for the Nevada. It seems as if under certain
1032 * circumstances the move from cp0_context might produce a 1016 * circumstances the move from cp0_context might produce a
diff --git a/arch/mips/mti-sead3/sead3-i2c-drv.c b/arch/mips/mti-sead3/sead3-i2c-drv.c
index 0375ee66bca3..7aa2225e75b9 100644
--- a/arch/mips/mti-sead3/sead3-i2c-drv.c
+++ b/arch/mips/mti-sead3/sead3-i2c-drv.c
@@ -297,7 +297,7 @@ static void sead3_i2c_platform_setup(struct pic32_i2c_platform_data *priv)
297 priv->base + PIC32_I2CxSTATCLR); 297 priv->base + PIC32_I2CxSTATCLR);
298} 298}
299 299
300static int __devinit sead3_i2c_platform_probe(struct platform_device *pdev) 300static int sead3_i2c_platform_probe(struct platform_device *pdev)
301{ 301{
302 struct pic32_i2c_platform_data *priv; 302 struct pic32_i2c_platform_data *priv;
303 struct resource *r; 303 struct resource *r;
@@ -345,7 +345,7 @@ out:
345 return ret; 345 return ret;
346} 346}
347 347
348static int __devexit sead3_i2c_platform_remove(struct platform_device *pdev) 348static int sead3_i2c_platform_remove(struct platform_device *pdev)
349{ 349{
350 struct pic32_i2c_platform_data *priv = platform_get_drvdata(pdev); 350 struct pic32_i2c_platform_data *priv = platform_get_drvdata(pdev);
351 351
@@ -383,7 +383,7 @@ static struct platform_driver sead3_i2c_platform_driver = {
383 .owner = THIS_MODULE, 383 .owner = THIS_MODULE,
384 }, 384 },
385 .probe = sead3_i2c_platform_probe, 385 .probe = sead3_i2c_platform_probe,
386 .remove = __devexit_p(sead3_i2c_platform_remove), 386 .remove = sead3_i2c_platform_remove,
387 .suspend = sead3_i2c_platform_suspend, 387 .suspend = sead3_i2c_platform_suspend,
388 .resume = sead3_i2c_platform_resume, 388 .resume = sead3_i2c_platform_resume,
389}; 389};
diff --git a/arch/mips/mti-sead3/sead3-pic32-i2c-drv.c b/arch/mips/mti-sead3/sead3-pic32-i2c-drv.c
index 46509b0a620d..514675ed0cde 100644
--- a/arch/mips/mti-sead3/sead3-pic32-i2c-drv.c
+++ b/arch/mips/mti-sead3/sead3-pic32-i2c-drv.c
@@ -304,8 +304,7 @@ static void i2c_platform_disable(struct i2c_platform_data *priv)
304 pr_debug("i2c_platform_disable\n"); 304 pr_debug("i2c_platform_disable\n");
305} 305}
306 306
307static int __devinit 307static int i2c_platform_probe(struct platform_device *pdev)
308i2c_platform_probe(struct platform_device *pdev)
309{ 308{
310 struct i2c_platform_data *priv; 309 struct i2c_platform_data *priv;
311 struct resource *r; 310 struct resource *r;
@@ -362,8 +361,7 @@ out:
362 return ret; 361 return ret;
363} 362}
364 363
365static int __devexit 364static int i2c_platform_remove(struct platform_device *pdev)
366i2c_platform_remove(struct platform_device *pdev)
367{ 365{
368 struct i2c_platform_data *priv = platform_get_drvdata(pdev); 366 struct i2c_platform_data *priv = platform_get_drvdata(pdev);
369 367
@@ -408,7 +406,7 @@ static struct platform_driver i2c_platform_driver = {
408 .owner = THIS_MODULE, 406 .owner = THIS_MODULE,
409 }, 407 },
410 .probe = i2c_platform_probe, 408 .probe = i2c_platform_probe,
411 .remove = __devexit_p(i2c_platform_remove), 409 .remove = i2c_platform_remove,
412 .suspend = i2c_platform_suspend, 410 .suspend = i2c_platform_suspend,
413 .resume = i2c_platform_resume, 411 .resume = i2c_platform_resume,
414}; 412};
diff --git a/arch/mips/pci/fixup-cobalt.c b/arch/mips/pci/fixup-cobalt.c
index 3e7ce65d776c..9553b14002dd 100644
--- a/arch/mips/pci/fixup-cobalt.c
+++ b/arch/mips/pci/fixup-cobalt.c
@@ -37,7 +37,7 @@
37#define VIA_COBALT_BRD_ID_REG 0x94 37#define VIA_COBALT_BRD_ID_REG 0x94
38#define VIA_COBALT_BRD_REG_to_ID(reg) ((unsigned char)(reg) >> 4) 38#define VIA_COBALT_BRD_REG_to_ID(reg) ((unsigned char)(reg) >> 4)
39 39
40static void __devinit qube_raq_galileo_early_fixup(struct pci_dev *dev) 40static void qube_raq_galileo_early_fixup(struct pci_dev *dev)
41{ 41{
42 if (dev->devfn == PCI_DEVFN(0, 0) && 42 if (dev->devfn == PCI_DEVFN(0, 0) &&
43 (dev->class >> 8) == PCI_CLASS_MEMORY_OTHER) { 43 (dev->class >> 8) == PCI_CLASS_MEMORY_OTHER) {
@@ -51,7 +51,7 @@ static void __devinit qube_raq_galileo_early_fixup(struct pci_dev *dev)
51DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_GT64111, 51DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_GT64111,
52 qube_raq_galileo_early_fixup); 52 qube_raq_galileo_early_fixup);
53 53
54static void __devinit qube_raq_via_bmIDE_fixup(struct pci_dev *dev) 54static void qube_raq_via_bmIDE_fixup(struct pci_dev *dev)
55{ 55{
56 unsigned short cfgword; 56 unsigned short cfgword;
57 unsigned char lt; 57 unsigned char lt;
@@ -74,7 +74,7 @@ static void __devinit qube_raq_via_bmIDE_fixup(struct pci_dev *dev)
74DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, 74DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1,
75 qube_raq_via_bmIDE_fixup); 75 qube_raq_via_bmIDE_fixup);
76 76
77static void __devinit qube_raq_galileo_fixup(struct pci_dev *dev) 77static void qube_raq_galileo_fixup(struct pci_dev *dev)
78{ 78{
79 if (dev->devfn != PCI_DEVFN(0, 0)) 79 if (dev->devfn != PCI_DEVFN(0, 0))
80 return; 80 return;
@@ -129,7 +129,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_GT64111,
129 129
130int cobalt_board_id; 130int cobalt_board_id;
131 131
132static void __devinit qube_raq_via_board_id_fixup(struct pci_dev *dev) 132static void qube_raq_via_board_id_fixup(struct pci_dev *dev)
133{ 133{
134 u8 id; 134 u8 id;
135 int retval; 135 int retval;
diff --git a/arch/mips/pci/fixup-emma2rh.c b/arch/mips/pci/fixup-emma2rh.c
index 0d9ccf4dfc5a..beaec32b02e5 100644
--- a/arch/mips/pci/fixup-emma2rh.c
+++ b/arch/mips/pci/fixup-emma2rh.c
@@ -52,7 +52,7 @@ static unsigned char irq_map[][5] __initdata = {
52 MARKEINS_PCI_IRQ_INTA, MARKEINS_PCI_IRQ_INTB,}, 52 MARKEINS_PCI_IRQ_INTA, MARKEINS_PCI_IRQ_INTB,},
53}; 53};
54 54
55static void __devinit nec_usb_controller_fixup(struct pci_dev *dev) 55static void nec_usb_controller_fixup(struct pci_dev *dev)
56{ 56{
57 if (PCI_SLOT(dev->devfn) == EMMA2RH_USB_SLOT) 57 if (PCI_SLOT(dev->devfn) == EMMA2RH_USB_SLOT)
58 /* on board USB controller configuration */ 58 /* on board USB controller configuration */
@@ -67,7 +67,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB,
67 * if it is the host bridge by marking it as such. These resources are of 67 * if it is the host bridge by marking it as such. These resources are of
68 * no consequence to the PCI layer (they are handled elsewhere). 68 * no consequence to the PCI layer (they are handled elsewhere).
69 */ 69 */
70static void __devinit emma2rh_pci_host_fixup(struct pci_dev *dev) 70static void emma2rh_pci_host_fixup(struct pci_dev *dev)
71{ 71{
72 int i; 72 int i;
73 73
diff --git a/arch/mips/pci/fixup-fuloong2e.c b/arch/mips/pci/fixup-fuloong2e.c
index 0857ab8c3919..63ab4a042cd6 100644
--- a/arch/mips/pci/fixup-fuloong2e.c
+++ b/arch/mips/pci/fixup-fuloong2e.c
@@ -48,7 +48,7 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
48 return 0; 48 return 0;
49} 49}
50 50
51static void __devinit loongson2e_nec_fixup(struct pci_dev *pdev) 51static void loongson2e_nec_fixup(struct pci_dev *pdev)
52{ 52{
53 unsigned int val; 53 unsigned int val;
54 54
@@ -60,7 +60,7 @@ static void __devinit loongson2e_nec_fixup(struct pci_dev *pdev)
60 pci_write_config_dword(pdev, 0xe4, 1 << 5); 60 pci_write_config_dword(pdev, 0xe4, 1 << 5);
61} 61}
62 62
63static void __devinit loongson2e_686b_func0_fixup(struct pci_dev *pdev) 63static void loongson2e_686b_func0_fixup(struct pci_dev *pdev)
64{ 64{
65 unsigned char c; 65 unsigned char c;
66 66
@@ -135,7 +135,7 @@ static void __devinit loongson2e_686b_func0_fixup(struct pci_dev *pdev)
135 printk(KERN_INFO"via686b fix: ISA bridge done\n"); 135 printk(KERN_INFO"via686b fix: ISA bridge done\n");
136} 136}
137 137
138static void __devinit loongson2e_686b_func1_fixup(struct pci_dev *pdev) 138static void loongson2e_686b_func1_fixup(struct pci_dev *pdev)
139{ 139{
140 printk(KERN_INFO"via686b fix: IDE\n"); 140 printk(KERN_INFO"via686b fix: IDE\n");
141 141
@@ -168,19 +168,19 @@ static void __devinit loongson2e_686b_func1_fixup(struct pci_dev *pdev)
168 printk(KERN_INFO"via686b fix: IDE done\n"); 168 printk(KERN_INFO"via686b fix: IDE done\n");
169} 169}
170 170
171static void __devinit loongson2e_686b_func2_fixup(struct pci_dev *pdev) 171static void loongson2e_686b_func2_fixup(struct pci_dev *pdev)
172{ 172{
173 /* irq routing */ 173 /* irq routing */
174 pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 10); 174 pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 10);
175} 175}
176 176
177static void __devinit loongson2e_686b_func3_fixup(struct pci_dev *pdev) 177static void loongson2e_686b_func3_fixup(struct pci_dev *pdev)
178{ 178{
179 /* irq routing */ 179 /* irq routing */
180 pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 11); 180 pci_write_config_byte(pdev, PCI_INTERRUPT_LINE, 11);
181} 181}
182 182
183static void __devinit loongson2e_686b_func5_fixup(struct pci_dev *pdev) 183static void loongson2e_686b_func5_fixup(struct pci_dev *pdev)
184{ 184{
185 unsigned int val; 185 unsigned int val;
186 unsigned char c; 186 unsigned char c;
diff --git a/arch/mips/pci/fixup-lemote2f.c b/arch/mips/pci/fixup-lemote2f.c
index a7b917dcf604..519daaebb5da 100644
--- a/arch/mips/pci/fixup-lemote2f.c
+++ b/arch/mips/pci/fixup-lemote2f.c
@@ -96,21 +96,21 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
96} 96}
97 97
98/* CS5536 SPEC. fixup */ 98/* CS5536 SPEC. fixup */
99static void __devinit loongson_cs5536_isa_fixup(struct pci_dev *pdev) 99static void loongson_cs5536_isa_fixup(struct pci_dev *pdev)
100{ 100{
101 /* the uart1 and uart2 interrupt in PIC is enabled as default */ 101 /* the uart1 and uart2 interrupt in PIC is enabled as default */
102 pci_write_config_dword(pdev, PCI_UART1_INT_REG, 1); 102 pci_write_config_dword(pdev, PCI_UART1_INT_REG, 1);
103 pci_write_config_dword(pdev, PCI_UART2_INT_REG, 1); 103 pci_write_config_dword(pdev, PCI_UART2_INT_REG, 1);
104} 104}
105 105
106static void __devinit loongson_cs5536_ide_fixup(struct pci_dev *pdev) 106static void loongson_cs5536_ide_fixup(struct pci_dev *pdev)
107{ 107{
108 /* setting the mutex pin as IDE function */ 108 /* setting the mutex pin as IDE function */
109 pci_write_config_dword(pdev, PCI_IDE_CFG_REG, 109 pci_write_config_dword(pdev, PCI_IDE_CFG_REG,
110 CS5536_IDE_FLASH_SIGNATURE); 110 CS5536_IDE_FLASH_SIGNATURE);
111} 111}
112 112
113static void __devinit loongson_cs5536_acc_fixup(struct pci_dev *pdev) 113static void loongson_cs5536_acc_fixup(struct pci_dev *pdev)
114{ 114{
115 /* enable the AUDIO interrupt in PIC */ 115 /* enable the AUDIO interrupt in PIC */
116 pci_write_config_dword(pdev, PCI_ACC_INT_REG, 1); 116 pci_write_config_dword(pdev, PCI_ACC_INT_REG, 1);
@@ -118,14 +118,14 @@ static void __devinit loongson_cs5536_acc_fixup(struct pci_dev *pdev)
118 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xc0); 118 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xc0);
119} 119}
120 120
121static void __devinit loongson_cs5536_ohci_fixup(struct pci_dev *pdev) 121static void loongson_cs5536_ohci_fixup(struct pci_dev *pdev)
122{ 122{
123 /* enable the OHCI interrupt in PIC */ 123 /* enable the OHCI interrupt in PIC */
124 /* THE OHCI, EHCI, UDC, OTG are shared with interrupt in PIC */ 124 /* THE OHCI, EHCI, UDC, OTG are shared with interrupt in PIC */
125 pci_write_config_dword(pdev, PCI_OHCI_INT_REG, 1); 125 pci_write_config_dword(pdev, PCI_OHCI_INT_REG, 1);
126} 126}
127 127
128static void __devinit loongson_cs5536_ehci_fixup(struct pci_dev *pdev) 128static void loongson_cs5536_ehci_fixup(struct pci_dev *pdev)
129{ 129{
130 u32 hi, lo; 130 u32 hi, lo;
131 131
@@ -137,7 +137,7 @@ static void __devinit loongson_cs5536_ehci_fixup(struct pci_dev *pdev)
137 pci_write_config_dword(pdev, PCI_EHCI_FLADJ_REG, 0x2000); 137 pci_write_config_dword(pdev, PCI_EHCI_FLADJ_REG, 0x2000);
138} 138}
139 139
140static void __devinit loongson_nec_fixup(struct pci_dev *pdev) 140static void loongson_nec_fixup(struct pci_dev *pdev)
141{ 141{
142 unsigned int val; 142 unsigned int val;
143 143
diff --git a/arch/mips/pci/fixup-malta.c b/arch/mips/pci/fixup-malta.c
index 9a1a2244522a..75d03f6be3bd 100644
--- a/arch/mips/pci/fixup-malta.c
+++ b/arch/mips/pci/fixup-malta.c
@@ -8,7 +8,7 @@
8#define PCID 4 8#define PCID 4
9 9
10/* This table is filled in by interrogating the PIIX4 chip */ 10/* This table is filled in by interrogating the PIIX4 chip */
11static char pci_irq[5] __devinitdata = { 11static char pci_irq[5] = {
12}; 12};
13 13
14static char irq_tab[][5] __initdata = { 14static char irq_tab[][5] __initdata = {
@@ -50,10 +50,10 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
50 return 0; 50 return 0;
51} 51}
52 52
53static void __devinit malta_piix_func0_fixup(struct pci_dev *pdev) 53static void malta_piix_func0_fixup(struct pci_dev *pdev)
54{ 54{
55 unsigned char reg_val; 55 unsigned char reg_val;
56 static int piixirqmap[16] __devinitdata = { /* PIIX PIRQC[A:D] irq mappings */ 56 static int piixirqmap[16] = { /* PIIX PIRQC[A:D] irq mappings */
57 0, 0, 0, 3, 57 0, 0, 0, 3,
58 4, 5, 6, 7, 58 4, 5, 6, 7,
59 0, 9, 10, 11, 59 0, 9, 10, 11,
@@ -84,7 +84,7 @@ static void __devinit malta_piix_func0_fixup(struct pci_dev *pdev)
84DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_0, 84DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_0,
85 malta_piix_func0_fixup); 85 malta_piix_func0_fixup);
86 86
87static void __devinit malta_piix_func1_fixup(struct pci_dev *pdev) 87static void malta_piix_func1_fixup(struct pci_dev *pdev)
88{ 88{
89 unsigned char reg_val; 89 unsigned char reg_val;
90 90
@@ -104,7 +104,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB,
104 malta_piix_func1_fixup); 104 malta_piix_func1_fixup);
105 105
106/* Enable PCI 2.1 compatibility in PIIX4 */ 106/* Enable PCI 2.1 compatibility in PIIX4 */
107static void __devinit quirk_dlcsetup(struct pci_dev *dev) 107static void quirk_dlcsetup(struct pci_dev *dev)
108{ 108{
109 u8 odlc, ndlc; 109 u8 odlc, ndlc;
110 110
diff --git a/arch/mips/pci/fixup-rc32434.c b/arch/mips/pci/fixup-rc32434.c
index 76bb1be99d43..d0f6ecbf35f7 100644
--- a/arch/mips/pci/fixup-rc32434.c
+++ b/arch/mips/pci/fixup-rc32434.c
@@ -32,12 +32,12 @@
32#include <asm/mach-rc32434/rc32434.h> 32#include <asm/mach-rc32434/rc32434.h>
33#include <asm/mach-rc32434/irq.h> 33#include <asm/mach-rc32434/irq.h>
34 34
35static int __devinitdata irq_map[2][12] = { 35static int irq_map[2][12] = {
36 {0, 0, 2, 3, 2, 3, 0, 0, 0, 0, 0, 1}, 36 {0, 0, 2, 3, 2, 3, 0, 0, 0, 0, 0, 1},
37 {0, 0, 1, 3, 0, 2, 1, 3, 0, 2, 1, 3} 37 {0, 0, 1, 3, 0, 2, 1, 3, 0, 2, 1, 3}
38}; 38};
39 39
40int __devinit pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 40int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
41{ 41{
42 int irq = 0; 42 int irq = 0;
43 43
@@ -47,7 +47,7 @@ int __devinit pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
47 return irq + GROUP4_IRQ_BASE + 4; 47 return irq + GROUP4_IRQ_BASE + 4;
48} 48}
49 49
50static void __devinit rc32434_pci_early_fixup(struct pci_dev *dev) 50static void rc32434_pci_early_fixup(struct pci_dev *dev)
51{ 51{
52 if (PCI_SLOT(dev->devfn) == 6 && dev->bus->number == 0) { 52 if (PCI_SLOT(dev->devfn) == 6 && dev->bus->number == 0) {
53 /* disable prefetched memory range */ 53 /* disable prefetched memory range */
diff --git a/arch/mips/pci/fixup-sb1250.c b/arch/mips/pci/fixup-sb1250.c
index d02900a72916..1441becdcb6c 100644
--- a/arch/mips/pci/fixup-sb1250.c
+++ b/arch/mips/pci/fixup-sb1250.c
@@ -15,7 +15,7 @@
15 * Set the BCM1250, etc. PCI host bridge's TRDY timeout 15 * Set the BCM1250, etc. PCI host bridge's TRDY timeout
16 * to the finite max. 16 * to the finite max.
17 */ 17 */
18static void __devinit quirk_sb1250_pci(struct pci_dev *dev) 18static void quirk_sb1250_pci(struct pci_dev *dev)
19{ 19{
20 pci_write_config_byte(dev, 0x40, 0xff); 20 pci_write_config_byte(dev, 0x40, 0xff);
21} 21}
@@ -25,7 +25,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SIBYTE, PCI_DEVICE_ID_BCM1250_PCI,
25/* 25/*
26 * The BCM1250, etc. PCI/HT bridge reports as a host bridge. 26 * The BCM1250, etc. PCI/HT bridge reports as a host bridge.
27 */ 27 */
28static void __devinit quirk_sb1250_ht(struct pci_dev *dev) 28static void quirk_sb1250_ht(struct pci_dev *dev)
29{ 29{
30 dev->class = PCI_CLASS_BRIDGE_PCI << 8; 30 dev->class = PCI_CLASS_BRIDGE_PCI << 8;
31} 31}
@@ -35,7 +35,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SIBYTE, PCI_DEVICE_ID_BCM1250_HT,
35/* 35/*
36 * Set the SP1011 HT/PCI bridge's TRDY timeout to the finite max. 36 * Set the SP1011 HT/PCI bridge's TRDY timeout to the finite max.
37 */ 37 */
38static void __devinit quirk_sp1011(struct pci_dev *dev) 38static void quirk_sp1011(struct pci_dev *dev)
39{ 39{
40 pci_write_config_byte(dev, 0x64, 0xff); 40 pci_write_config_byte(dev, 0x64, 0xff);
41} 41}
diff --git a/arch/mips/pci/ops-bcm63xx.c b/arch/mips/pci/ops-bcm63xx.c
index 65c7bd100486..4a156629e958 100644
--- a/arch/mips/pci/ops-bcm63xx.c
+++ b/arch/mips/pci/ops-bcm63xx.c
@@ -411,7 +411,7 @@ struct pci_ops bcm63xx_cb_ops = {
411 * only one IO window, so it cannot be shared by PCI and cardbus, use 411 * only one IO window, so it cannot be shared by PCI and cardbus, use
412 * fixup to choose and detect unhandled configuration 412 * fixup to choose and detect unhandled configuration
413 */ 413 */
414static void __devinit bcm63xx_fixup(struct pci_dev *dev) 414static void bcm63xx_fixup(struct pci_dev *dev)
415{ 415{
416 static int io_window = -1; 416 static int io_window = -1;
417 int i, found, new_io_window; 417 int i, found, new_io_window;
diff --git a/arch/mips/pci/ops-tx4927.c b/arch/mips/pci/ops-tx4927.c
index bc13e29d2bb3..0d69d6f4ea44 100644
--- a/arch/mips/pci/ops-tx4927.c
+++ b/arch/mips/pci/ops-tx4927.c
@@ -191,13 +191,13 @@ static struct {
191 u8 trdyto; 191 u8 trdyto;
192 u8 retryto; 192 u8 retryto;
193 u16 gbwc; 193 u16 gbwc;
194} tx4927_pci_opts __devinitdata = { 194} tx4927_pci_opts = {
195 .trdyto = 0, 195 .trdyto = 0,
196 .retryto = 0, 196 .retryto = 0,
197 .gbwc = 0xfe0, /* 4064 GBUSCLK for CCFG.GTOT=0b11 */ 197 .gbwc = 0xfe0, /* 4064 GBUSCLK for CCFG.GTOT=0b11 */
198}; 198};
199 199
200char *__devinit tx4927_pcibios_setup(char *str) 200char *tx4927_pcibios_setup(char *str)
201{ 201{
202 unsigned long val; 202 unsigned long val;
203 203
@@ -495,7 +495,7 @@ irqreturn_t tx4927_pcierr_interrupt(int irq, void *dev_id)
495} 495}
496 496
497#ifdef CONFIG_TOSHIBA_FPCIB0 497#ifdef CONFIG_TOSHIBA_FPCIB0
498static void __devinit tx4927_quirk_slc90e66_bridge(struct pci_dev *dev) 498static void tx4927_quirk_slc90e66_bridge(struct pci_dev *dev)
499{ 499{
500 struct tx4927_pcic_reg __iomem *pcicptr = pci_bus_to_pcicptr(dev->bus); 500 struct tx4927_pcic_reg __iomem *pcicptr = pci_bus_to_pcicptr(dev->bus);
501 501
diff --git a/arch/mips/pci/pci-alchemy.c b/arch/mips/pci/pci-alchemy.c
index ec125bed721c..c4ea6cc55f94 100644
--- a/arch/mips/pci/pci-alchemy.c
+++ b/arch/mips/pci/pci-alchemy.c
@@ -356,7 +356,7 @@ static struct syscore_ops alchemy_pci_pmops = {
356 .resume = alchemy_pci_resume, 356 .resume = alchemy_pci_resume,
357}; 357};
358 358
359static int __devinit alchemy_pci_probe(struct platform_device *pdev) 359static int alchemy_pci_probe(struct platform_device *pdev)
360{ 360{
361 struct alchemy_pci_platdata *pd = pdev->dev.platform_data; 361 struct alchemy_pci_platdata *pd = pdev->dev.platform_data;
362 struct alchemy_pci_context *ctx; 362 struct alchemy_pci_context *ctx;
diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c
index fdc24440294c..7f4f49b09b5b 100644
--- a/arch/mips/pci/pci-ip27.c
+++ b/arch/mips/pci/pci-ip27.c
@@ -143,7 +143,7 @@ int __cpuinit bridge_probe(nasid_t nasid, int widget_id, int masterwid)
143 * A given PCI device, in general, should be able to intr any of the cpus 143 * A given PCI device, in general, should be able to intr any of the cpus
144 * on any one of the hubs connected to its xbow. 144 * on any one of the hubs connected to its xbow.
145 */ 145 */
146int __devinit pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 146int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
147{ 147{
148 return 0; 148 return 0;
149} 149}
@@ -212,7 +212,7 @@ static inline void pci_enable_swapping(struct pci_dev *dev)
212 bridge->b_widget.w_tflush; /* Flush */ 212 bridge->b_widget.w_tflush; /* Flush */
213} 213}
214 214
215static void __devinit pci_fixup_ioc3(struct pci_dev *d) 215static void pci_fixup_ioc3(struct pci_dev *d)
216{ 216{
217 pci_disable_swapping(d); 217 pci_disable_swapping(d);
218} 218}
diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c
index 075d87acd12a..95681789b51e 100644
--- a/arch/mips/pci/pci-lantiq.c
+++ b/arch/mips/pci/pci-lantiq.c
@@ -95,7 +95,7 @@ static inline u32 ltq_calc_bar11mask(void)
95 return bar11mask; 95 return bar11mask;
96} 96}
97 97
98static int __devinit ltq_pci_startup(struct platform_device *pdev) 98static int ltq_pci_startup(struct platform_device *pdev)
99{ 99{
100 struct device_node *node = pdev->dev.of_node; 100 struct device_node *node = pdev->dev.of_node;
101 const __be32 *req_mask, *bus_clk; 101 const __be32 *req_mask, *bus_clk;
@@ -201,7 +201,7 @@ static int __devinit ltq_pci_startup(struct platform_device *pdev)
201 return 0; 201 return 0;
202} 202}
203 203
204static int __devinit ltq_pci_probe(struct platform_device *pdev) 204static int ltq_pci_probe(struct platform_device *pdev)
205{ 205{
206 struct resource *res_cfg, *res_bridge; 206 struct resource *res_cfg, *res_bridge;
207 207
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 4040416e0603..a1843448fad3 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -76,7 +76,7 @@ pcibios_align_resource(void *data, const struct resource *res,
76 return start; 76 return start;
77} 77}
78 78
79static void __devinit pcibios_scanbus(struct pci_controller *hose) 79static void pcibios_scanbus(struct pci_controller *hose)
80{ 80{
81 static int next_busno; 81 static int next_busno;
82 static int need_domain_info; 82 static int need_domain_info;
@@ -120,8 +120,7 @@ static void __devinit pcibios_scanbus(struct pci_controller *hose)
120} 120}
121 121
122#ifdef CONFIG_OF 122#ifdef CONFIG_OF
123void __devinit pci_load_of_ranges(struct pci_controller *hose, 123void pci_load_of_ranges(struct pci_controller *hose, struct device_node *node)
124 struct device_node *node)
125{ 124{
126 const __be32 *ranges; 125 const __be32 *ranges;
127 int rlen; 126 int rlen;
@@ -174,7 +173,7 @@ void __devinit pci_load_of_ranges(struct pci_controller *hose,
174 173
175static DEFINE_MUTEX(pci_scan_mutex); 174static DEFINE_MUTEX(pci_scan_mutex);
176 175
177void __devinit register_pci_controller(struct pci_controller *hose) 176void register_pci_controller(struct pci_controller *hose)
178{ 177{
179 if (request_resource(&iomem_resource, hose->mem_resource) < 0) 178 if (request_resource(&iomem_resource, hose->mem_resource) < 0)
180 goto out; 179 goto out;
@@ -303,7 +302,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
303 return pcibios_plat_dev_init(dev); 302 return pcibios_plat_dev_init(dev);
304} 303}
305 304
306void __devinit pcibios_fixup_bus(struct pci_bus *bus) 305void pcibios_fixup_bus(struct pci_bus *bus)
307{ 306{
308 struct pci_dev *dev = bus->self; 307 struct pci_dev *dev = bus->self;
309 308
diff --git a/arch/mips/power/hibernate.S b/arch/mips/power/hibernate.S
index f8a751c03282..61e2558a2dcb 100644
--- a/arch/mips/power/hibernate.S
+++ b/arch/mips/power/hibernate.S
@@ -8,7 +8,6 @@
8 * Wu Zhangjin <wuzhangjin@gmail.com> 8 * Wu Zhangjin <wuzhangjin@gmail.com>
9 */ 9 */
10#include <asm/asm-offsets.h> 10#include <asm/asm-offsets.h>
11#include <asm/page.h>
12#include <asm/regdef.h> 11#include <asm/regdef.h>
13#include <asm/asm.h> 12#include <asm/asm.h>
14 13
@@ -35,7 +34,7 @@ LEAF(swsusp_arch_resume)
350: 340:
36 PTR_L t1, PBE_ADDRESS(t0) /* source */ 35 PTR_L t1, PBE_ADDRESS(t0) /* source */
37 PTR_L t2, PBE_ORIG_ADDRESS(t0) /* destination */ 36 PTR_L t2, PBE_ORIG_ADDRESS(t0) /* destination */
38 PTR_ADDU t3, t1, PAGE_SIZE 37 PTR_ADDU t3, t1, _PAGE_SIZE
391: 381:
40 REG_L t8, (t1) 39 REG_L t8, (t1)
41 REG_S t8, (t2) 40 REG_S t8, (t2)
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c
index d6c7bd4b5ab0..2e9c283b8e68 100644
--- a/arch/mips/sni/setup.c
+++ b/arch/mips/sni/setup.c
@@ -236,7 +236,7 @@ void __init plat_mem_setup(void)
236#include <video/vga.h> 236#include <video/vga.h>
237#include <video/cirrus.h> 237#include <video/cirrus.h>
238 238
239static void __devinit quirk_cirrus_ram_size(struct pci_dev *dev) 239static void quirk_cirrus_ram_size(struct pci_dev *dev)
240{ 240{
241 u16 cmd; 241 u16 cmd;
242 242
diff --git a/arch/mips/txx9/generic/pci.c b/arch/mips/txx9/generic/pci.c
index b14ee53581a9..ce8f8b9b930c 100644
--- a/arch/mips/txx9/generic/pci.c
+++ b/arch/mips/txx9/generic/pci.c
@@ -256,8 +256,7 @@ static irqreturn_t i8259_interrupt(int irq, void *dev_id)
256 return IRQ_HANDLED; 256 return IRQ_HANDLED;
257} 257}
258 258
259static int __devinit 259static int txx9_i8259_irq_setup(int irq)
260txx9_i8259_irq_setup(int irq)
261{ 260{
262 int err; 261 int err;
263 262
@@ -269,7 +268,7 @@ txx9_i8259_irq_setup(int irq)
269 return err; 268 return err;
270} 269}
271 270
272static void __devinit quirk_slc90e66_bridge(struct pci_dev *dev) 271static void quirk_slc90e66_bridge(struct pci_dev *dev)
273{ 272{
274 int irq; /* PCI/ISA Bridge interrupt */ 273 int irq; /* PCI/ISA Bridge interrupt */
275 u8 reg_64; 274 u8 reg_64;
@@ -304,7 +303,7 @@ static void __devinit quirk_slc90e66_bridge(struct pci_dev *dev)
304 smsc_fdc37m81x_config_end(); 303 smsc_fdc37m81x_config_end();
305} 304}
306 305
307static void __devinit quirk_slc90e66_ide(struct pci_dev *dev) 306static void quirk_slc90e66_ide(struct pci_dev *dev)
308{ 307{
309 unsigned char dat; 308 unsigned char dat;
310 int regs[2] = {0x41, 0x43}; 309 int regs[2] = {0x41, 0x43};
@@ -339,7 +338,7 @@ static void __devinit quirk_slc90e66_ide(struct pci_dev *dev)
339} 338}
340#endif /* CONFIG_TOSHIBA_FPCIB0 */ 339#endif /* CONFIG_TOSHIBA_FPCIB0 */
341 340
342static void __devinit tc35815_fixup(struct pci_dev *dev) 341static void tc35815_fixup(struct pci_dev *dev)
343{ 342{
344 /* This device may have PM registers but not they are not supported. */ 343 /* This device may have PM registers but not they are not supported. */
345 if (dev->pm_cap) { 344 if (dev->pm_cap) {
@@ -348,7 +347,7 @@ static void __devinit tc35815_fixup(struct pci_dev *dev)
348 } 347 }
349} 348}
350 349
351static void __devinit final_fixup(struct pci_dev *dev) 350static void final_fixup(struct pci_dev *dev)
352{ 351{
353 unsigned char bist; 352 unsigned char bist;
354 353
diff --git a/arch/mn10300/kernel/smp.c b/arch/mn10300/kernel/smp.c
index 95983cd21e77..5d7e152a23b7 100644
--- a/arch/mn10300/kernel/smp.c
+++ b/arch/mn10300/kernel/smp.c
@@ -905,7 +905,7 @@ void __init smp_cpus_done(unsigned int max_cpus)
905 * Set up the cpu_online_mask, cpu_callout_map and cpu_callin_map of the boot 905 * Set up the cpu_online_mask, cpu_callout_map and cpu_callin_map of the boot
906 * processor (CPU 0). 906 * processor (CPU 0).
907 */ 907 */
908void __devinit smp_prepare_boot_cpu(void) 908void smp_prepare_boot_cpu(void)
909{ 909{
910 cpumask_set_cpu(0, &cpu_callout_map); 910 cpumask_set_cpu(0, &cpu_callout_map);
911 cpumask_set_cpu(0, &cpu_callin_map); 911 cpumask_set_cpu(0, &cpu_callin_map);
@@ -930,7 +930,7 @@ void initialize_secondary(void)
930 * __cpu_up - Set smp_commenced_mask for the nominated CPU 930 * __cpu_up - Set smp_commenced_mask for the nominated CPU
931 * @cpu: The target CPU. 931 * @cpu: The target CPU.
932 */ 932 */
933int __devinit __cpu_up(unsigned int cpu, struct task_struct *tidle) 933int __cpu_up(unsigned int cpu, struct task_struct *tidle)
934{ 934{
935 int timeout; 935 int timeout;
936 936
diff --git a/arch/mn10300/unit-asb2305/pci.c b/arch/mn10300/unit-asb2305/pci.c
index e2059486d3f8..6911e845b8cd 100644
--- a/arch/mn10300/unit-asb2305/pci.c
+++ b/arch/mn10300/unit-asb2305/pci.c
@@ -282,7 +282,7 @@ static int __init pci_check_direct(void)
282 return -ENODEV; 282 return -ENODEV;
283} 283}
284 284
285static int __devinit is_valid_resource(struct pci_dev *dev, int idx) 285static int is_valid_resource(struct pci_dev *dev, int idx)
286{ 286{
287 unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM; 287 unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM;
288 struct resource *devr = &dev->resource[idx], *busr; 288 struct resource *devr = &dev->resource[idx], *busr;
@@ -302,7 +302,7 @@ static int __devinit is_valid_resource(struct pci_dev *dev, int idx)
302 return 0; 302 return 0;
303} 303}
304 304
305static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) 305static void pcibios_fixup_device_resources(struct pci_dev *dev)
306{ 306{
307 int limit, i; 307 int limit, i;
308 308
@@ -325,7 +325,7 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
325 * Called after each bus is probed, but before its children 325 * Called after each bus is probed, but before its children
326 * are examined. 326 * are examined.
327 */ 327 */
328void __devinit pcibios_fixup_bus(struct pci_bus *bus) 328void pcibios_fixup_bus(struct pci_bus *bus)
329{ 329{
330 struct pci_dev *dev; 330 struct pci_dev *dev;
331 331
diff --git a/arch/openrisc/lib/delay.c b/arch/openrisc/lib/delay.c
index c330767c9217..c82b09f4a106 100644
--- a/arch/openrisc/lib/delay.c
+++ b/arch/openrisc/lib/delay.c
@@ -22,7 +22,7 @@
22#include <asm/timex.h> 22#include <asm/timex.h>
23#include <asm/processor.h> 23#include <asm/processor.h>
24 24
25int __devinit read_current_timer(unsigned long *timer_value) 25int read_current_timer(unsigned long *timer_value)
26{ 26{
27 *timer_value = mfspr(SPR_TTCR); 27 *timer_value = mfspr(SPR_TTCR);
28 return 0; 28 return 0;
diff --git a/arch/parisc/include/asm/parport.h b/arch/parisc/include/asm/parport.h
index 00d9cc3e7b97..c391d7cbc223 100644
--- a/arch/parisc/include/asm/parport.h
+++ b/arch/parisc/include/asm/parport.h
@@ -8,7 +8,7 @@
8#define _ASM_PARPORT_H 1 8#define _ASM_PARPORT_H 1
9 9
10 10
11static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) 11static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
12{ 12{
13 /* nothing ! */ 13 /* nothing ! */
14 return 0; 14 return 0;
diff --git a/arch/parisc/kernel/hardware.c b/arch/parisc/kernel/hardware.c
index f48a640b55fb..f7752f6af29e 100644
--- a/arch/parisc/kernel/hardware.c
+++ b/arch/parisc/kernel/hardware.c
@@ -38,7 +38,7 @@
38 * so don't reference this table after starting the init process 38 * so don't reference this table after starting the init process
39 */ 39 */
40 40
41static struct hp_hardware hp_hardware_list[] __devinitdata = { 41static struct hp_hardware hp_hardware_list[] = {
42 {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"}, 42 {HPHW_NPROC,0x01,0x4,0x0,"Indigo (840, 930)"},
43 {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"}, 43 {HPHW_NPROC,0x8,0x4,0x01,"Firefox(825,925)"},
44 {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"}, 44 {HPHW_NPROC,0xA,0x4,0x01,"Top Gun (835,834,935,635)"},
@@ -1230,7 +1230,7 @@ static struct hp_cpu_type_mask {
1230 unsigned short model; 1230 unsigned short model;
1231 unsigned short mask; 1231 unsigned short mask;
1232 enum cpu_type cpu; 1232 enum cpu_type cpu;
1233} hp_cpu_type_mask_list[] __devinitdata = { 1233} hp_cpu_type_mask_list[] = {
1234 1234
1235 { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */ 1235 { 0x0000, 0x0ff0, pcx }, /* 0x0000 - 0x000f */
1236 { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */ 1236 { 0x0048, 0x0ff0, pcxl }, /* 0x0040 - 0x004f */
@@ -1327,8 +1327,7 @@ const char * const cpu_name_version[][2] = {
1327 [mako2] = { "PA8900 (Shortfin)", "2.0" } 1327 [mako2] = { "PA8900 (Shortfin)", "2.0" }
1328}; 1328};
1329 1329
1330const char * __devinit 1330const char *parisc_hardware_description(struct parisc_device_id *id)
1331parisc_hardware_description(struct parisc_device_id *id)
1332{ 1331{
1333 struct hp_hardware *listptr; 1332 struct hp_hardware *listptr;
1334 1333
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
index b0ef73882b38..a8fb03e22770 100644
--- a/arch/powerpc/include/asm/eeh.h
+++ b/arch/powerpc/include/asm/eeh.h
@@ -183,7 +183,7 @@ static inline void eeh_unlock(void)
183#define EEH_MAX_ALLOWED_FREEZES 5 183#define EEH_MAX_ALLOWED_FREEZES 5
184 184
185typedef void *(*eeh_traverse_func)(void *data, void *flag); 185typedef void *(*eeh_traverse_func)(void *data, void *flag);
186int __devinit eeh_phb_pe_create(struct pci_controller *phb); 186int eeh_phb_pe_create(struct pci_controller *phb);
187int eeh_add_to_parent_pe(struct eeh_dev *edev); 187int eeh_add_to_parent_pe(struct eeh_dev *edev);
188int eeh_rmv_from_parent_pe(struct eeh_dev *edev, int purge_pe); 188int eeh_rmv_from_parent_pe(struct eeh_dev *edev, int purge_pe);
189void *eeh_pe_dev_traverse(struct eeh_pe *root, 189void *eeh_pe_dev_traverse(struct eeh_pe *root,
@@ -191,8 +191,8 @@ void *eeh_pe_dev_traverse(struct eeh_pe *root,
191void eeh_pe_restore_bars(struct eeh_pe *pe); 191void eeh_pe_restore_bars(struct eeh_pe *pe);
192struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe); 192struct pci_bus *eeh_pe_bus_get(struct eeh_pe *pe);
193 193
194void * __devinit eeh_dev_init(struct device_node *dn, void *data); 194void *eeh_dev_init(struct device_node *dn, void *data);
195void __devinit eeh_dev_phb_init_dynamic(struct pci_controller *phb); 195void eeh_dev_phb_init_dynamic(struct pci_controller *phb);
196int __init eeh_ops_register(struct eeh_ops *ops); 196int __init eeh_ops_register(struct eeh_ops *ops);
197int __exit eeh_ops_unregister(const char *name); 197int __exit eeh_ops_unregister(const char *name);
198unsigned long eeh_check_failure(const volatile void __iomem *token, 198unsigned long eeh_check_failure(const volatile void __iomem *token,
diff --git a/arch/powerpc/include/asm/io-workarounds.h b/arch/powerpc/include/asm/io-workarounds.h
index fbae49286926..f96dd096ff4e 100644
--- a/arch/powerpc/include/asm/io-workarounds.h
+++ b/arch/powerpc/include/asm/io-workarounds.h
@@ -31,8 +31,8 @@ struct iowa_bus {
31 void *private; 31 void *private;
32}; 32};
33 33
34void __devinit iowa_register_bus(struct pci_controller *, struct ppc_pci_io *, 34void iowa_register_bus(struct pci_controller *, struct ppc_pci_io *,
35 int (*)(struct iowa_bus *, void *), void *); 35 int (*)(struct iowa_bus *, void *), void *);
36struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR); 36struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR);
37struct iowa_bus *iowa_pio_find_bus(unsigned long); 37struct iowa_bus *iowa_pio_find_bus(unsigned long);
38 38
diff --git a/arch/powerpc/include/asm/parport.h b/arch/powerpc/include/asm/parport.h
index 1ca1102b4a2f..6dc2577932b1 100644
--- a/arch/powerpc/include/asm/parport.h
+++ b/arch/powerpc/include/asm/parport.h
@@ -12,7 +12,7 @@
12 12
13#include <asm/prom.h> 13#include <asm/prom.h>
14 14
15static int __devinit parport_pc_find_nonpci_ports (int autoirq, int autodma) 15static int parport_pc_find_nonpci_ports (int autoirq, int autodma)
16{ 16{
17 struct device_node *np; 17 struct device_node *np;
18 const u32 *prop; 18 const u32 *prop;
diff --git a/arch/powerpc/include/asm/smp.h b/arch/powerpc/include/asm/smp.h
index 5a4e437c238d..195ce2ac5691 100644
--- a/arch/powerpc/include/asm/smp.h
+++ b/arch/powerpc/include/asm/smp.h
@@ -54,8 +54,8 @@ struct smp_ops_t {
54 54
55extern void smp_send_debugger_break(void); 55extern void smp_send_debugger_break(void);
56extern void start_secondary_resume(void); 56extern void start_secondary_resume(void);
57extern void __devinit smp_generic_give_timebase(void); 57extern void smp_generic_give_timebase(void);
58extern void __devinit smp_generic_take_timebase(void); 58extern void smp_generic_take_timebase(void);
59 59
60DECLARE_PER_CPU(unsigned int, cpu_pvr); 60DECLARE_PER_CPU(unsigned int, cpu_pvr);
61 61
diff --git a/arch/powerpc/include/asm/vio.h b/arch/powerpc/include/asm/vio.h
index df81cb72d1e0..68d0cc998b1b 100644
--- a/arch/powerpc/include/asm/vio.h
+++ b/arch/powerpc/include/asm/vio.h
@@ -139,7 +139,7 @@ extern void vio_unregister_driver(struct vio_driver *drv);
139extern int vio_cmo_entitlement_update(size_t); 139extern int vio_cmo_entitlement_update(size_t);
140extern void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired); 140extern void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired);
141 141
142extern void __devinit vio_unregister_device(struct vio_dev *dev); 142extern void vio_unregister_device(struct vio_dev *dev);
143 143
144extern int vio_h_cop_sync(struct vio_dev *vdev, struct vio_pfo_op *op); 144extern int vio_h_cop_sync(struct vio_dev *vdev, struct vio_pfo_op *op);
145 145
diff --git a/arch/powerpc/kernel/io-workarounds.c b/arch/powerpc/kernel/io-workarounds.c
index 12d329bcbb98..50e90b7e7139 100644
--- a/arch/powerpc/kernel/io-workarounds.c
+++ b/arch/powerpc/kernel/io-workarounds.c
@@ -118,7 +118,7 @@ static void iowa_##name at \
118#undef DEF_PCI_AC_RET 118#undef DEF_PCI_AC_RET
119#undef DEF_PCI_AC_NORET 119#undef DEF_PCI_AC_NORET
120 120
121static const struct ppc_pci_io __devinitconst iowa_pci_io = { 121static const struct ppc_pci_io iowa_pci_io = {
122 122
123#define DEF_PCI_AC_RET(name, ret, at, al, space, aa) .name = iowa_##name, 123#define DEF_PCI_AC_RET(name, ret, at, al, space, aa) .name = iowa_##name,
124#define DEF_PCI_AC_NORET(name, at, al, space, aa) .name = iowa_##name, 124#define DEF_PCI_AC_NORET(name, at, al, space, aa) .name = iowa_##name,
@@ -146,7 +146,7 @@ static void __iomem *iowa_ioremap(phys_addr_t addr, unsigned long size,
146} 146}
147 147
148/* Enable IO workaround */ 148/* Enable IO workaround */
149static void __devinit io_workaround_init(void) 149static void io_workaround_init(void)
150{ 150{
151 static int io_workaround_inited; 151 static int io_workaround_inited;
152 152
@@ -158,9 +158,8 @@ static void __devinit io_workaround_init(void)
158} 158}
159 159
160/* Register new bus to support workaround */ 160/* Register new bus to support workaround */
161void __devinit iowa_register_bus(struct pci_controller *phb, 161void iowa_register_bus(struct pci_controller *phb, struct ppc_pci_io *ops,
162 struct ppc_pci_io *ops, 162 int (*initfunc)(struct iowa_bus *, void *), void *data)
163 int (*initfunc)(struct iowa_bus *, void *), void *data)
164{ 163{
165 struct iowa_bus *bus; 164 struct iowa_bus *bus;
166 struct device_node *np = phb->dn; 165 struct device_node *np = phb->dn;
diff --git a/arch/powerpc/kernel/isa-bridge.c b/arch/powerpc/kernel/isa-bridge.c
index d45ec58703ce..0f1997097960 100644
--- a/arch/powerpc/kernel/isa-bridge.c
+++ b/arch/powerpc/kernel/isa-bridge.c
@@ -41,8 +41,8 @@ EXPORT_SYMBOL_GPL(isa_bridge_pcidev);
41#define ISA_SPACE_MASK 0x1 41#define ISA_SPACE_MASK 0x1
42#define ISA_SPACE_IO 0x1 42#define ISA_SPACE_IO 0x1
43 43
44static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node, 44static void pci_process_ISA_OF_ranges(struct device_node *isa_node,
45 unsigned long phb_io_base_phys) 45 unsigned long phb_io_base_phys)
46{ 46{
47 /* We should get some saner parsing here and remove these structs */ 47 /* We should get some saner parsing here and remove these structs */
48 struct pci_address { 48 struct pci_address {
@@ -170,8 +170,8 @@ void __init isa_bridge_find_early(struct pci_controller *hose)
170 * isa_bridge_find_late - Find and map the ISA IO space upon discovery of 170 * isa_bridge_find_late - Find and map the ISA IO space upon discovery of
171 * a new ISA bridge 171 * a new ISA bridge
172 */ 172 */
173static void __devinit isa_bridge_find_late(struct pci_dev *pdev, 173static void isa_bridge_find_late(struct pci_dev *pdev,
174 struct device_node *devnode) 174 struct device_node *devnode)
175{ 175{
176 struct pci_controller *hose = pci_bus_to_host(pdev->bus); 176 struct pci_controller *hose = pci_bus_to_host(pdev->bus);
177 177
@@ -215,8 +215,8 @@ static void isa_bridge_remove(void)
215/** 215/**
216 * isa_bridge_notify - Get notified of PCI devices addition/removal 216 * isa_bridge_notify - Get notified of PCI devices addition/removal
217 */ 217 */
218static int __devinit isa_bridge_notify(struct notifier_block *nb, 218static int isa_bridge_notify(struct notifier_block *nb, unsigned long action,
219 unsigned long action, void *data) 219 void *data)
220{ 220{
221 struct device *dev = data; 221 struct device *dev = data;
222 struct pci_dev *pdev = to_pci_dev(dev); 222 struct pci_dev *pdev = to_pci_dev(dev);
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c
index 9db8ec07ec94..07c12697d708 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -37,7 +37,7 @@
37 * lacking some bits needed here. 37 * lacking some bits needed here.
38 */ 38 */
39 39
40static int __devinit of_pci_phb_probe(struct platform_device *dev) 40static int of_pci_phb_probe(struct platform_device *dev)
41{ 41{
42 struct pci_controller *phb; 42 struct pci_controller *phb;
43 43
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index abc0d0856994..7c37379ea9b1 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -673,9 +673,8 @@ void pci_resource_to_user(const struct pci_dev *dev, int bar,
673 * - Some 32 bits platforms such as 4xx can have physical space larger than 673 * - Some 32 bits platforms such as 4xx can have physical space larger than
674 * 32 bits so we need to use 64 bits values for the parsing 674 * 32 bits so we need to use 64 bits values for the parsing
675 */ 675 */
676void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, 676void pci_process_bridge_OF_ranges(struct pci_controller *hose,
677 struct device_node *dev, 677 struct device_node *dev, int primary)
678 int primary)
679{ 678{
680 const u32 *ranges; 679 const u32 *ranges;
681 int rlen; 680 int rlen;
@@ -848,7 +847,7 @@ int pci_proc_domain(struct pci_bus *bus)
848/* This header fixup will do the resource fixup for all devices as they are 847/* This header fixup will do the resource fixup for all devices as they are
849 * probed, but not for bridge ranges 848 * probed, but not for bridge ranges
850 */ 849 */
851static void __devinit pcibios_fixup_resources(struct pci_dev *dev) 850static void pcibios_fixup_resources(struct pci_dev *dev)
852{ 851{
853 struct pci_controller *hose = pci_bus_to_host(dev->bus); 852 struct pci_controller *hose = pci_bus_to_host(dev->bus);
854 int i; 853 int i;
@@ -902,8 +901,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, pcibios_fixup_resources);
902 * things go more smoothly when it gets it right. It should covers cases such 901 * things go more smoothly when it gets it right. It should covers cases such
903 * as Apple "closed" bridge resources and bare-metal pSeries unassigned bridges 902 * as Apple "closed" bridge resources and bare-metal pSeries unassigned bridges
904 */ 903 */
905static int __devinit pcibios_uninitialized_bridge_resource(struct pci_bus *bus, 904static int pcibios_uninitialized_bridge_resource(struct pci_bus *bus,
906 struct resource *res) 905 struct resource *res)
907{ 906{
908 struct pci_controller *hose = pci_bus_to_host(bus); 907 struct pci_controller *hose = pci_bus_to_host(bus);
909 struct pci_dev *dev = bus->self; 908 struct pci_dev *dev = bus->self;
@@ -967,7 +966,7 @@ static int __devinit pcibios_uninitialized_bridge_resource(struct pci_bus *bus,
967} 966}
968 967
969/* Fixup resources of a PCI<->PCI bridge */ 968/* Fixup resources of a PCI<->PCI bridge */
970static void __devinit pcibios_fixup_bridge(struct pci_bus *bus) 969static void pcibios_fixup_bridge(struct pci_bus *bus)
971{ 970{
972 struct resource *res; 971 struct resource *res;
973 int i; 972 int i;
@@ -1007,7 +1006,7 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus)
1007 } 1006 }
1008} 1007}
1009 1008
1010void __devinit pcibios_setup_bus_self(struct pci_bus *bus) 1009void pcibios_setup_bus_self(struct pci_bus *bus)
1011{ 1010{
1012 /* Fix up the bus resources for P2P bridges */ 1011 /* Fix up the bus resources for P2P bridges */
1013 if (bus->self != NULL) 1012 if (bus->self != NULL)
@@ -1024,7 +1023,7 @@ void __devinit pcibios_setup_bus_self(struct pci_bus *bus)
1024 ppc_md.pci_dma_bus_setup(bus); 1023 ppc_md.pci_dma_bus_setup(bus);
1025} 1024}
1026 1025
1027void __devinit pcibios_setup_bus_devices(struct pci_bus *bus) 1026void pcibios_setup_bus_devices(struct pci_bus *bus)
1028{ 1027{
1029 struct pci_dev *dev; 1028 struct pci_dev *dev;
1030 1029
@@ -1063,7 +1062,7 @@ void pcibios_set_master(struct pci_dev *dev)
1063 /* No special bus mastering setup handling */ 1062 /* No special bus mastering setup handling */
1064} 1063}
1065 1064
1066void __devinit pcibios_fixup_bus(struct pci_bus *bus) 1065void pcibios_fixup_bus(struct pci_bus *bus)
1067{ 1066{
1068 /* When called from the generic PCI probe, read PCI<->PCI bridge 1067 /* When called from the generic PCI probe, read PCI<->PCI bridge
1069 * bases. This is -not- called when generating the PCI tree from 1068 * bases. This is -not- called when generating the PCI tree from
@@ -1080,7 +1079,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
1080} 1079}
1081EXPORT_SYMBOL(pcibios_fixup_bus); 1080EXPORT_SYMBOL(pcibios_fixup_bus);
1082 1081
1083void __devinit pci_fixup_cardbus(struct pci_bus *bus) 1082void pci_fixup_cardbus(struct pci_bus *bus)
1084{ 1083{
1085 /* Now fixup devices on that bus */ 1084 /* Now fixup devices on that bus */
1086 pcibios_setup_bus_devices(bus); 1085 pcibios_setup_bus_devices(bus);
@@ -1264,7 +1263,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus)
1264 pcibios_allocate_bus_resources(b); 1263 pcibios_allocate_bus_resources(b);
1265} 1264}
1266 1265
1267static inline void __devinit alloc_resource(struct pci_dev *dev, int idx) 1266static inline void alloc_resource(struct pci_dev *dev, int idx)
1268{ 1267{
1269 struct resource *pr, *r = &dev->resource[idx]; 1268 struct resource *pr, *r = &dev->resource[idx];
1270 1269
@@ -1500,7 +1499,8 @@ resource_size_t pcibios_io_space_offset(struct pci_controller *hose)
1500 return (unsigned long) hose->io_base_virt - _IO_BASE; 1499 return (unsigned long) hose->io_base_virt - _IO_BASE;
1501} 1500}
1502 1501
1503static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, struct list_head *resources) 1502static void pcibios_setup_phb_resources(struct pci_controller *hose,
1503 struct list_head *resources)
1504{ 1504{
1505 struct resource *res; 1505 struct resource *res;
1506 int i; 1506 int i;
@@ -1639,7 +1639,7 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus)
1639 * pci_scan_phb - Given a pci_controller, setup and scan the PCI bus 1639 * pci_scan_phb - Given a pci_controller, setup and scan the PCI bus
1640 * @hose: Pointer to the PCI host controller instance structure 1640 * @hose: Pointer to the PCI host controller instance structure
1641 */ 1641 */
1642void __devinit pcibios_scan_phb(struct pci_controller *hose) 1642void pcibios_scan_phb(struct pci_controller *hose)
1643{ 1643{
1644 LIST_HEAD(resources); 1644 LIST_HEAD(resources);
1645 struct pci_bus *bus; 1645 struct pci_bus *bus;
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 64f526a321f5..e37c2152acf4 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -213,7 +213,7 @@ pci_create_OF_bus_map(void)
213 } 213 }
214} 214}
215 215
216void __devinit pcibios_setup_phb_io_space(struct pci_controller *hose) 216void pcibios_setup_phb_io_space(struct pci_controller *hose)
217{ 217{
218 unsigned long io_offset; 218 unsigned long io_offset;
219 struct resource *res = &hose->io_resource; 219 struct resource *res = &hose->io_resource;
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 2cbe6768fddd..51a133a78a09 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -122,7 +122,7 @@ int pcibios_unmap_io_space(struct pci_bus *bus)
122} 122}
123EXPORT_SYMBOL_GPL(pcibios_unmap_io_space); 123EXPORT_SYMBOL_GPL(pcibios_unmap_io_space);
124 124
125static int __devinit pcibios_map_phb_io_space(struct pci_controller *hose) 125static int pcibios_map_phb_io_space(struct pci_controller *hose)
126{ 126{
127 struct vm_struct *area; 127 struct vm_struct *area;
128 unsigned long phys_page; 128 unsigned long phys_page;
@@ -173,7 +173,7 @@ static int __devinit pcibios_map_phb_io_space(struct pci_controller *hose)
173 return 0; 173 return 0;
174} 174}
175 175
176int __devinit pcibios_map_io_space(struct pci_bus *bus) 176int pcibios_map_io_space(struct pci_bus *bus)
177{ 177{
178 WARN_ON(bus == NULL); 178 WARN_ON(bus == NULL);
179 179
@@ -193,7 +193,7 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus)
193} 193}
194EXPORT_SYMBOL_GPL(pcibios_map_io_space); 194EXPORT_SYMBOL_GPL(pcibios_map_io_space);
195 195
196void __devinit pcibios_setup_phb_io_space(struct pci_controller *hose) 196void pcibios_setup_phb_io_space(struct pci_controller *hose)
197{ 197{
198 pcibios_map_phb_io_space(hose); 198 pcibios_map_phb_io_space(hose);
199} 199}
diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c
index dd9e4a04bf79..e7af165f8b9d 100644
--- a/arch/powerpc/kernel/pci_dn.c
+++ b/arch/powerpc/kernel/pci_dn.c
@@ -36,7 +36,7 @@
36 * Traverse_func that inits the PCI fields of the device node. 36 * Traverse_func that inits the PCI fields of the device node.
37 * NOTE: this *must* be done before read/write config to the device. 37 * NOTE: this *must* be done before read/write config to the device.
38 */ 38 */
39void * __devinit update_dn_pci_info(struct device_node *dn, void *data) 39void *update_dn_pci_info(struct device_node *dn, void *data)
40{ 40{
41 struct pci_controller *phb = data; 41 struct pci_controller *phb = data;
42 const int *type = 42 const int *type =
@@ -129,7 +129,7 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre,
129 * subsystem is set up, before kmalloc is valid) and during the 129 * subsystem is set up, before kmalloc is valid) and during the
130 * dynamic lpar operation of adding a PHB to a running system. 130 * dynamic lpar operation of adding a PHB to a running system.
131 */ 131 */
132void __devinit pci_devs_phb_init_dynamic(struct pci_controller *phb) 132void pci_devs_phb_init_dynamic(struct pci_controller *phb)
133{ 133{
134 struct device_node *dn = phb->dn; 134 struct device_node *dn = phb->dn;
135 struct pci_dn *pdn; 135 struct pci_dn *pdn;
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c
index 30378a19f65d..2a67e9baa59f 100644
--- a/arch/powerpc/kernel/pci_of_scan.c
+++ b/arch/powerpc/kernel/pci_of_scan.c
@@ -204,7 +204,7 @@ EXPORT_SYMBOL(of_create_pci_dev);
204 * this routine in turn call of_scan_bus() recusively to scan for more child 204 * this routine in turn call of_scan_bus() recusively to scan for more child
205 * devices. 205 * devices.
206 */ 206 */
207void __devinit of_scan_pci_bridge(struct pci_dev *dev) 207void of_scan_pci_bridge(struct pci_dev *dev)
208{ 208{
209 struct device_node *node = dev->dev.of_node; 209 struct device_node *node = dev->dev.of_node;
210 struct pci_bus *bus; 210 struct pci_bus *bus;
@@ -299,8 +299,8 @@ EXPORT_SYMBOL(of_scan_pci_bridge);
299 * @bus: pci_bus structure for the PCI bus 299 * @bus: pci_bus structure for the PCI bus
300 * @rescan_existing: Flag indicating bus has already been set up 300 * @rescan_existing: Flag indicating bus has already been set up
301 */ 301 */
302static void __devinit __of_scan_bus(struct device_node *node, 302static void __of_scan_bus(struct device_node *node, struct pci_bus *bus,
303 struct pci_bus *bus, int rescan_existing) 303 int rescan_existing)
304{ 304{
305 struct device_node *child; 305 struct device_node *child;
306 const u32 *reg; 306 const u32 *reg;
@@ -348,8 +348,7 @@ static void __devinit __of_scan_bus(struct device_node *node,
348 * @node: device tree node for the PCI bus 348 * @node: device tree node for the PCI bus
349 * @bus: pci_bus structure for the PCI bus 349 * @bus: pci_bus structure for the PCI bus
350 */ 350 */
351void __devinit of_scan_bus(struct device_node *node, 351void of_scan_bus(struct device_node *node, struct pci_bus *bus)
352 struct pci_bus *bus)
353{ 352{
354 __of_scan_bus(node, bus, 0); 353 __of_scan_bus(node, bus, 0);
355} 354}
@@ -363,8 +362,7 @@ EXPORT_SYMBOL_GPL(of_scan_bus);
363 * Same as of_scan_bus, but for a pci_bus structure that has already been 362 * Same as of_scan_bus, but for a pci_bus structure that has already been
364 * setup. 363 * setup.
365 */ 364 */
366void __devinit of_rescan_bus(struct device_node *node, 365void of_rescan_bus(struct device_node *node, struct pci_bus *bus)
367 struct pci_bus *bus)
368{ 366{
369 __of_scan_bus(node, bus, 1); 367 __of_scan_bus(node, bus, 1);
370} 368}
diff --git a/arch/powerpc/kernel/rtas_pci.c b/arch/powerpc/kernel/rtas_pci.c
index 6de63e3250bb..71cb20d6ec61 100644
--- a/arch/powerpc/kernel/rtas_pci.c
+++ b/arch/powerpc/kernel/rtas_pci.c
@@ -209,7 +209,7 @@ void __init init_pci_config_tokens (void)
209 ibm_write_pci_config = rtas_token("ibm,write-pci-config"); 209 ibm_write_pci_config = rtas_token("ibm,write-pci-config");
210} 210}
211 211
212unsigned long __devinit get_phb_buid (struct device_node *phb) 212unsigned long get_phb_buid (struct device_node *phb)
213{ 213{
214 struct resource r; 214 struct resource r;
215 215
@@ -237,7 +237,7 @@ static int phb_set_bus_ranges(struct device_node *dev,
237 return 0; 237 return 0;
238} 238}
239 239
240int __devinit rtas_setup_phb(struct pci_controller *phb) 240int rtas_setup_phb(struct pci_controller *phb)
241{ 241{
242 struct device_node *dev = phb->dn; 242 struct device_node *dev = phb->dn;
243 243
diff --git a/arch/powerpc/kernel/smp-tbsync.c b/arch/powerpc/kernel/smp-tbsync.c
index 640de836e466..e68fd1ae727a 100644
--- a/arch/powerpc/kernel/smp-tbsync.c
+++ b/arch/powerpc/kernel/smp-tbsync.c
@@ -36,13 +36,13 @@ static struct {
36 36
37static volatile int running; 37static volatile int running;
38 38
39static void __devinit enter_contest(u64 mark, long add) 39static void enter_contest(u64 mark, long add)
40{ 40{
41 while (get_tb() < mark) 41 while (get_tb() < mark)
42 tbsync->race_result = add; 42 tbsync->race_result = add;
43} 43}
44 44
45void __devinit smp_generic_take_timebase(void) 45void smp_generic_take_timebase(void)
46{ 46{
47 int cmd; 47 int cmd;
48 u64 tb; 48 u64 tb;
@@ -75,7 +75,7 @@ void __devinit smp_generic_take_timebase(void)
75 local_irq_restore(flags); 75 local_irq_restore(flags);
76} 76}
77 77
78static int __devinit start_contest(int cmd, long offset, int num) 78static int start_contest(int cmd, long offset, int num)
79{ 79{
80 int i, score=0; 80 int i, score=0;
81 u64 tb; 81 u64 tb;
@@ -110,7 +110,7 @@ static int __devinit start_contest(int cmd, long offset, int num)
110 return score; 110 return score;
111} 111}
112 112
113void __devinit smp_generic_give_timebase(void) 113void smp_generic_give_timebase(void)
114{ 114{
115 int i, score, score2, old, min=0, max=5000, offset=1000; 115 int i, score, score2, old, min=0, max=5000, offset=1000;
116 116
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index e5b133ebd8a5..793401e65088 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -82,7 +82,7 @@ int smt_enabled_at_boot = 1;
82static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL; 82static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL;
83 83
84#ifdef CONFIG_PPC64 84#ifdef CONFIG_PPC64
85int __devinit smp_generic_kick_cpu(int nr) 85int smp_generic_kick_cpu(int nr)
86{ 86{
87 BUG_ON(nr < 0 || nr >= NR_CPUS); 87 BUG_ON(nr < 0 || nr >= NR_CPUS);
88 88
@@ -311,7 +311,7 @@ void smp_send_stop(void)
311 311
312struct thread_info *current_set[NR_CPUS]; 312struct thread_info *current_set[NR_CPUS];
313 313
314static void __devinit smp_store_cpu_info(int id) 314static void smp_store_cpu_info(int id)
315{ 315{
316 per_cpu(cpu_pvr, id) = mfspr(SPRN_PVR); 316 per_cpu(cpu_pvr, id) = mfspr(SPRN_PVR);
317#ifdef CONFIG_PPC_FSL_BOOK3E 317#ifdef CONFIG_PPC_FSL_BOOK3E
@@ -355,7 +355,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
355 max_cpus = 1; 355 max_cpus = 1;
356} 356}
357 357
358void __devinit smp_prepare_boot_cpu(void) 358void smp_prepare_boot_cpu(void)
359{ 359{
360 BUG_ON(smp_processor_id() != boot_cpuid); 360 BUG_ON(smp_processor_id() != boot_cpuid);
361#ifdef CONFIG_PPC64 361#ifdef CONFIG_PPC64
@@ -610,7 +610,7 @@ static struct device_node *cpu_to_l2cache(int cpu)
610} 610}
611 611
612/* Activate a secondary processor. */ 612/* Activate a secondary processor. */
613void __devinit start_secondary(void *unused) 613void start_secondary(void *unused)
614{ 614{
615 unsigned int cpu = smp_processor_id(); 615 unsigned int cpu = smp_processor_id();
616 struct device_node *l2_cache; 616 struct device_node *l2_cache;
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index b3b14352b05e..6f6b1cccc916 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -770,13 +770,8 @@ void update_vsyscall_old(struct timespec *wall_time, struct timespec *wtm,
770 770
771void update_vsyscall_tz(void) 771void update_vsyscall_tz(void)
772{ 772{
773 /* Make userspace gettimeofday spin until we're done. */
774 ++vdso_data->tb_update_count;
775 smp_mb();
776 vdso_data->tz_minuteswest = sys_tz.tz_minuteswest; 773 vdso_data->tz_minuteswest = sys_tz.tz_minuteswest;
777 vdso_data->tz_dsttime = sys_tz.tz_dsttime; 774 vdso_data->tz_dsttime = sys_tz.tz_dsttime;
778 smp_mb();
779 ++vdso_data->tb_update_count;
780} 775}
781 776
782static void __init clocksource_init(void) 777static void __init clocksource_init(void)
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 201ba59738be..536016d792ba 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -1289,7 +1289,7 @@ void vio_unregister_driver(struct vio_driver *viodrv)
1289EXPORT_SYMBOL(vio_unregister_driver); 1289EXPORT_SYMBOL(vio_unregister_driver);
1290 1290
1291/* vio_dev refcount hit 0 */ 1291/* vio_dev refcount hit 0 */
1292static void __devinit vio_dev_release(struct device *dev) 1292static void vio_dev_release(struct device *dev)
1293{ 1293{
1294 struct iommu_table *tbl = get_iommu_table_base(dev); 1294 struct iommu_table *tbl = get_iommu_table_base(dev);
1295 1295
@@ -1545,7 +1545,7 @@ static struct device_attribute vio_dev_attrs[] = {
1545 __ATTR_NULL 1545 __ATTR_NULL
1546}; 1546};
1547 1547
1548void __devinit vio_unregister_device(struct vio_dev *viodev) 1548void vio_unregister_device(struct vio_dev *viodev)
1549{ 1549{
1550 device_unregister(&viodev->dev); 1550 device_unregister(&viodev->dev);
1551} 1551}
diff --git a/arch/powerpc/mm/tlb_hash64.c b/arch/powerpc/mm/tlb_hash64.c
index ae758b3ff72c..0d82ef50dc3f 100644
--- a/arch/powerpc/mm/tlb_hash64.c
+++ b/arch/powerpc/mm/tlb_hash64.c
@@ -186,8 +186,6 @@ void tlb_flush(struct mmu_gather *tlb)
186 * Because of that usage pattern, it's only available with CONFIG_HOTPLUG 186 * Because of that usage pattern, it's only available with CONFIG_HOTPLUG
187 * and is implemented for small size rather than speed. 187 * and is implemented for small size rather than speed.
188 */ 188 */
189#ifdef CONFIG_HOTPLUG
190
191void __flush_hash_table_range(struct mm_struct *mm, unsigned long start, 189void __flush_hash_table_range(struct mm_struct *mm, unsigned long start,
192 unsigned long end) 190 unsigned long end)
193{ 191{
@@ -221,5 +219,3 @@ void __flush_hash_table_range(struct mm_struct *mm, unsigned long start,
221 arch_leave_lazy_mmu_mode(); 219 arch_leave_lazy_mmu_mode();
222 local_irq_restore(flags); 220 local_irq_restore(flags);
223} 221}
224
225#endif /* CONFIG_HOTPLUG */
diff --git a/arch/powerpc/platforms/40x/ppc40x_simple.c b/arch/powerpc/platforms/40x/ppc40x_simple.c
index 969dddcf3320..8f3920e5a046 100644
--- a/arch/powerpc/platforms/40x/ppc40x_simple.c
+++ b/arch/powerpc/platforms/40x/ppc40x_simple.c
@@ -57,7 +57,8 @@ static const char * const board[] __initconst = {
57 "amcc,makalu", 57 "amcc,makalu",
58 "apm,klondike", 58 "apm,klondike",
59 "est,hotfoot", 59 "est,hotfoot",
60 "plathome,obs600" 60 "plathome,obs600",
61 NULL
61}; 62};
62 63
63static int __init ppc40x_probe(void) 64static int __init ppc40x_probe(void)
diff --git a/arch/powerpc/platforms/44x/currituck.c b/arch/powerpc/platforms/44x/currituck.c
index 6bd89a0e0dea..ecd3890c40d7 100644
--- a/arch/powerpc/platforms/44x/currituck.c
+++ b/arch/powerpc/platforms/44x/currituck.c
@@ -46,7 +46,7 @@ static __initdata struct of_device_id ppc47x_of_bus[] = {
46 46
47/* The EEPROM is missing and the default values are bogus. This forces USB in 47/* The EEPROM is missing and the default values are bogus. This forces USB in
48 * to EHCI mode */ 48 * to EHCI mode */
49static void __devinit quirk_ppc_currituck_usb_fixup(struct pci_dev *dev) 49static void quirk_ppc_currituck_usb_fixup(struct pci_dev *dev)
50{ 50{
51 if (of_machine_is_compatible("ibm,currituck")) { 51 if (of_machine_is_compatible("ibm,currituck")) {
52 pci_write_config_dword(dev, 0xe0, 0x0114231f); 52 pci_write_config_dword(dev, 0xe0, 0x0114231f);
diff --git a/arch/powerpc/platforms/44x/virtex_ml510.c b/arch/powerpc/platforms/44x/virtex_ml510.c
index ba4a6e388a46..1fdb8748638d 100644
--- a/arch/powerpc/platforms/44x/virtex_ml510.c
+++ b/arch/powerpc/platforms/44x/virtex_ml510.c
@@ -5,7 +5,7 @@
5/** 5/**
6 * ml510_ail_quirk 6 * ml510_ail_quirk
7 */ 7 */
8static void __devinit ml510_ali_quirk(struct pci_dev *dev) 8static void ml510_ali_quirk(struct pci_dev *dev)
9{ 9{
10 /* Enable the IDE controller */ 10 /* Enable the IDE controller */
11 pci_write_config_byte(dev, 0x58, 0x4c); 11 pci_write_config_byte(dev, 0x58, 0x4c);
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
index a51cb07bd663..692998244d2c 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
@@ -669,7 +669,7 @@ static struct miscdevice mpc52xx_wdt_miscdev = {
669 .fops = &mpc52xx_wdt_fops, 669 .fops = &mpc52xx_wdt_fops,
670}; 670};
671 671
672static int __devinit mpc52xx_gpt_wdt_init(void) 672static int mpc52xx_gpt_wdt_init(void)
673{ 673{
674 int err; 674 int err;
675 675
@@ -704,7 +704,7 @@ static int mpc52xx_gpt_wdt_setup(struct mpc52xx_gpt_priv *gpt,
704 704
705#else 705#else
706 706
707static int __devinit mpc52xx_gpt_wdt_init(void) 707static int mpc52xx_gpt_wdt_init(void)
708{ 708{
709 return 0; 709 return 0;
710} 710}
@@ -720,7 +720,7 @@ static inline int mpc52xx_gpt_wdt_setup(struct mpc52xx_gpt_priv *gpt,
720/* --------------------------------------------------------------------- 720/* ---------------------------------------------------------------------
721 * of_platform bus binding code 721 * of_platform bus binding code
722 */ 722 */
723static int __devinit mpc52xx_gpt_probe(struct platform_device *ofdev) 723static int mpc52xx_gpt_probe(struct platform_device *ofdev)
724{ 724{
725 struct mpc52xx_gpt_priv *gpt; 725 struct mpc52xx_gpt_priv *gpt;
726 726
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
index 16150fa430f9..f9f4537f546d 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
@@ -470,7 +470,7 @@ void mpc52xx_lpbfifo_abort(struct mpc52xx_lpbfifo_request *req)
470} 470}
471EXPORT_SYMBOL(mpc52xx_lpbfifo_abort); 471EXPORT_SYMBOL(mpc52xx_lpbfifo_abort);
472 472
473static int __devinit mpc52xx_lpbfifo_probe(struct platform_device *op) 473static int mpc52xx_lpbfifo_probe(struct platform_device *op)
474{ 474{
475 struct resource res; 475 struct resource res;
476 int rc = -ENOMEM; 476 int rc = -ENOMEM;
@@ -540,7 +540,7 @@ static int __devinit mpc52xx_lpbfifo_probe(struct platform_device *op)
540} 540}
541 541
542 542
543static int __devexit mpc52xx_lpbfifo_remove(struct platform_device *op) 543static int mpc52xx_lpbfifo_remove(struct platform_device *op)
544{ 544{
545 if (lpbfifo.dev != &op->dev) 545 if (lpbfifo.dev != &op->dev)
546 return 0; 546 return 0;
@@ -564,7 +564,7 @@ static int __devexit mpc52xx_lpbfifo_remove(struct platform_device *op)
564 return 0; 564 return 0;
565} 565}
566 566
567static struct of_device_id mpc52xx_lpbfifo_match[] __devinitconst = { 567static struct of_device_id mpc52xx_lpbfifo_match[] = {
568 { .compatible = "fsl,mpc5200-lpbfifo", }, 568 { .compatible = "fsl,mpc5200-lpbfifo", },
569 {}, 569 {},
570}; 570};
@@ -576,6 +576,6 @@ static struct platform_driver mpc52xx_lpbfifo_driver = {
576 .of_match_table = mpc52xx_lpbfifo_match, 576 .of_match_table = mpc52xx_lpbfifo_match,
577 }, 577 },
578 .probe = mpc52xx_lpbfifo_probe, 578 .probe = mpc52xx_lpbfifo_probe,
579 .remove = __devexit_p(mpc52xx_lpbfifo_remove), 579 .remove = mpc52xx_lpbfifo_remove,
580}; 580};
581module_platform_driver(mpc52xx_lpbfifo_driver); 581module_platform_driver(mpc52xx_lpbfifo_driver);
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c
index 10ff526cd046..79799b29ffe2 100644
--- a/arch/powerpc/platforms/82xx/ep8248e.c
+++ b/arch/powerpc/platforms/82xx/ep8248e.c
@@ -111,7 +111,7 @@ static struct mdiobb_ctrl ep8248e_mdio_ctrl = {
111 .ops = &ep8248e_mdio_ops, 111 .ops = &ep8248e_mdio_ops,
112}; 112};
113 113
114static int __devinit ep8248e_mdio_probe(struct platform_device *ofdev) 114static int ep8248e_mdio_probe(struct platform_device *ofdev)
115{ 115{
116 struct mii_bus *bus; 116 struct mii_bus *bus;
117 struct resource res; 117 struct resource res;
diff --git a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
index ef6537b8ed33..624cb51d19c9 100644
--- a/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
+++ b/arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
@@ -145,8 +145,7 @@ static int mcu_gpiochip_remove(struct mcu *mcu)
145 return gpiochip_remove(&mcu->gc); 145 return gpiochip_remove(&mcu->gc);
146} 146}
147 147
148static int __devinit mcu_probe(struct i2c_client *client, 148static int mcu_probe(struct i2c_client *client, const struct i2c_device_id *id)
149 const struct i2c_device_id *id)
150{ 149{
151 struct mcu *mcu; 150 struct mcu *mcu;
152 int ret; 151 int ret;
@@ -188,7 +187,7 @@ err:
188 return ret; 187 return ret;
189} 188}
190 189
191static int __devexit mcu_remove(struct i2c_client *client) 190static int mcu_remove(struct i2c_client *client)
192{ 191{
193 struct mcu *mcu = i2c_get_clientdata(client); 192 struct mcu *mcu = i2c_get_clientdata(client);
194 int ret; 193 int ret;
@@ -216,7 +215,7 @@ static const struct i2c_device_id mcu_ids[] = {
216}; 215};
217MODULE_DEVICE_TABLE(i2c, mcu_ids); 216MODULE_DEVICE_TABLE(i2c, mcu_ids);
218 217
219static struct of_device_id mcu_of_match_table[] __devinitdata = { 218static struct of_device_id mcu_of_match_table[] = {
220 { .compatible = "fsl,mcu-mpc8349emitx", }, 219 { .compatible = "fsl,mcu-mpc8349emitx", },
221 { }, 220 { },
222}; 221};
@@ -228,7 +227,7 @@ static struct i2c_driver mcu_driver = {
228 .of_match_table = mcu_of_match_table, 227 .of_match_table = mcu_of_match_table,
229 }, 228 },
230 .probe = mcu_probe, 229 .probe = mcu_probe,
231 .remove = __devexit_p(mcu_remove), 230 .remove = mcu_remove,
232 .id_table = mcu_ids, 231 .id_table = mcu_ids,
233}; 232};
234 233
diff --git a/arch/powerpc/platforms/85xx/corenet_ds.c b/arch/powerpc/platforms/85xx/corenet_ds.c
index ed69c9250717..6f355d8c92f6 100644
--- a/arch/powerpc/platforms/85xx/corenet_ds.c
+++ b/arch/powerpc/platforms/85xx/corenet_ds.c
@@ -64,7 +64,7 @@ void __init corenet_ds_setup_arch(void)
64 pr_info("%s board from Freescale Semiconductor\n", ppc_md.name); 64 pr_info("%s board from Freescale Semiconductor\n", ppc_md.name);
65} 65}
66 66
67static const struct of_device_id of_device_ids[] __devinitconst = { 67static const struct of_device_id of_device_ids[] = {
68 { 68 {
69 .compatible = "simple-bus" 69 .compatible = "simple-bus"
70 }, 70 },
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index c474505ad0d0..7a31a0e1df29 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -154,7 +154,7 @@ static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev)
154 } 154 }
155} 155}
156 156
157static void __devinit skip_fake_bridge(struct pci_dev *dev) 157static void skip_fake_bridge(struct pci_dev *dev)
158{ 158{
159 /* Make it an error to skip the fake bridge 159 /* Make it an error to skip the fake bridge
160 * in pci_setup_device() in probe.c */ 160 * in pci_setup_device() in probe.c */
diff --git a/arch/powerpc/platforms/85xx/tqm85xx.c b/arch/powerpc/platforms/85xx/tqm85xx.c
index b4e58cdc09a5..ec0b7272fae2 100644
--- a/arch/powerpc/platforms/85xx/tqm85xx.c
+++ b/arch/powerpc/platforms/85xx/tqm85xx.c
@@ -85,7 +85,7 @@ static void tqm85xx_show_cpuinfo(struct seq_file *m)
85 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f)); 85 seq_printf(m, "PLL setting\t: 0x%x\n", ((phid1 >> 24) & 0x3f));
86} 86}
87 87
88static void __devinit tqm85xx_ti1520_fixup(struct pci_dev *pdev) 88static void tqm85xx_ti1520_fixup(struct pci_dev *pdev)
89{ 89{
90 unsigned int val; 90 unsigned int val;
91 91
diff --git a/arch/powerpc/platforms/86xx/gef_ppc9a.c b/arch/powerpc/platforms/86xx/gef_ppc9a.c
index bf5338754c5a..c23f3443880a 100644
--- a/arch/powerpc/platforms/86xx/gef_ppc9a.c
+++ b/arch/powerpc/platforms/86xx/gef_ppc9a.c
@@ -159,7 +159,7 @@ static void gef_ppc9a_show_cpuinfo(struct seq_file *m)
159 gef_ppc9a_get_vme_is_syscon() ? "yes" : "no"); 159 gef_ppc9a_get_vme_is_syscon() ? "yes" : "no");
160} 160}
161 161
162static void __devinit gef_ppc9a_nec_fixup(struct pci_dev *pdev) 162static void gef_ppc9a_nec_fixup(struct pci_dev *pdev)
163{ 163{
164 unsigned int val; 164 unsigned int val;
165 165
diff --git a/arch/powerpc/platforms/86xx/gef_sbc310.c b/arch/powerpc/platforms/86xx/gef_sbc310.c
index 0b7851330a07..8a6ac20686ea 100644
--- a/arch/powerpc/platforms/86xx/gef_sbc310.c
+++ b/arch/powerpc/platforms/86xx/gef_sbc310.c
@@ -146,7 +146,7 @@ static void gef_sbc310_show_cpuinfo(struct seq_file *m)
146 146
147} 147}
148 148
149static void __devinit gef_sbc310_nec_fixup(struct pci_dev *pdev) 149static void gef_sbc310_nec_fixup(struct pci_dev *pdev)
150{ 150{
151 unsigned int val; 151 unsigned int val;
152 152
diff --git a/arch/powerpc/platforms/86xx/gef_sbc610.c b/arch/powerpc/platforms/86xx/gef_sbc610.c
index b9eb174897b1..06c72636f299 100644
--- a/arch/powerpc/platforms/86xx/gef_sbc610.c
+++ b/arch/powerpc/platforms/86xx/gef_sbc610.c
@@ -136,7 +136,7 @@ static void gef_sbc610_show_cpuinfo(struct seq_file *m)
136 seq_printf(m, "SVR\t\t: 0x%x\n", svid); 136 seq_printf(m, "SVR\t\t: 0x%x\n", svid);
137} 137}
138 138
139static void __devinit gef_sbc610_nec_fixup(struct pci_dev *pdev) 139static void gef_sbc610_nec_fixup(struct pci_dev *pdev)
140{ 140{
141 unsigned int val; 141 unsigned int val;
142 142
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index 4ab087671185..6ae25fb62015 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -117,7 +117,7 @@ static void cell_fixup_pcie_rootcomplex(struct pci_dev *dev)
117} 117}
118DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, cell_fixup_pcie_rootcomplex); 118DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, cell_fixup_pcie_rootcomplex);
119 119
120static int __devinit cell_setup_phb(struct pci_controller *phb) 120static int cell_setup_phb(struct pci_controller *phb)
121{ 121{
122 const char *model; 122 const char *model;
123 struct device_node *np; 123 struct device_node *np;
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c
index 49a65e2dfc71..d35dbbc8ec79 100644
--- a/arch/powerpc/platforms/cell/smp.c
+++ b/arch/powerpc/platforms/cell/smp.c
@@ -67,7 +67,7 @@ static cpumask_t of_spin_map;
67 * 0 - failure 67 * 0 - failure
68 * 1 - success 68 * 1 - success
69 */ 69 */
70static inline int __devinit smp_startup_cpu(unsigned int lcpu) 70static inline int smp_startup_cpu(unsigned int lcpu)
71{ 71{
72 int status; 72 int status;
73 unsigned long start_here = __pa((u32)*((unsigned long *) 73 unsigned long start_here = __pa((u32)*((unsigned long *)
@@ -108,7 +108,7 @@ static int __init smp_iic_probe(void)
108 return cpumask_weight(cpu_possible_mask); 108 return cpumask_weight(cpu_possible_mask);
109} 109}
110 110
111static void __devinit smp_cell_setup_cpu(int cpu) 111static void smp_cell_setup_cpu(int cpu)
112{ 112{
113 if (cpu != boot_cpuid) 113 if (cpu != boot_cpuid)
114 iic_setup_cpu(); 114 iic_setup_cpu();
@@ -119,7 +119,7 @@ static void __devinit smp_cell_setup_cpu(int cpu)
119 mtspr(SPRN_DABRX, DABRX_KERNEL | DABRX_USER); 119 mtspr(SPRN_DABRX, DABRX_KERNEL | DABRX_USER);
120} 120}
121 121
122static int __devinit smp_cell_kick_cpu(int nr) 122static int smp_cell_kick_cpu(int nr)
123{ 123{
124 BUG_ON(nr < 0 || nr >= NR_CPUS); 124 BUG_ON(nr < 0 || nr >= NR_CPUS);
125 125
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
index 83285c5a2049..1b87e198faa7 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -323,7 +323,7 @@ chrp_find_bridges(void)
323 * ATA controller to be set to fully native mode or bad things 323 * ATA controller to be set to fully native mode or bad things
324 * will happen. 324 * will happen.
325 */ 325 */
326static void __devinit chrp_pci_fixup_winbond_ata(struct pci_dev *sl82c105) 326static void chrp_pci_fixup_winbond_ata(struct pci_dev *sl82c105)
327{ 327{
328 u8 progif; 328 u8 progif;
329 329
diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c
index feab30bbae23..dead91b177b9 100644
--- a/arch/powerpc/platforms/chrp/smp.c
+++ b/arch/powerpc/platforms/chrp/smp.c
@@ -30,7 +30,7 @@
30#include <asm/mpic.h> 30#include <asm/mpic.h>
31#include <asm/rtas.h> 31#include <asm/rtas.h>
32 32
33static int __devinit smp_chrp_kick_cpu(int nr) 33static int smp_chrp_kick_cpu(int nr)
34{ 34{
35 *(unsigned long *)KERNELBASE = nr; 35 *(unsigned long *)KERNELBASE = nr;
36 asm volatile("dcbf 0,%0"::"r"(KERNELBASE):"memory"); 36 asm volatile("dcbf 0,%0"::"r"(KERNELBASE):"memory");
@@ -38,7 +38,7 @@ static int __devinit smp_chrp_kick_cpu(int nr)
38 return 0; 38 return 0;
39} 39}
40 40
41static void __devinit smp_chrp_setup_cpu(int cpu_nr) 41static void smp_chrp_setup_cpu(int cpu_nr)
42{ 42{
43 mpic_setup_this_cpu(); 43 mpic_setup_this_cpu();
44} 44}
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c
index 64fde058e545..92ac9b52b32d 100644
--- a/arch/powerpc/platforms/fsl_uli1575.c
+++ b/arch/powerpc/platforms/fsl_uli1575.c
@@ -59,7 +59,7 @@ static inline bool is_quirk_valid(void)
59} 59}
60 60
61/* Bridge */ 61/* Bridge */
62static void __devinit early_uli5249(struct pci_dev *dev) 62static void early_uli5249(struct pci_dev *dev)
63{ 63{
64 unsigned char temp; 64 unsigned char temp;
65 65
@@ -82,7 +82,7 @@ static void __devinit early_uli5249(struct pci_dev *dev)
82} 82}
83 83
84 84
85static void __devinit quirk_uli1575(struct pci_dev *dev) 85static void quirk_uli1575(struct pci_dev *dev)
86{ 86{
87 int i; 87 int i;
88 88
@@ -139,7 +139,7 @@ static void __devinit quirk_uli1575(struct pci_dev *dev)
139 pci_write_config_byte(dev, 0x75, ULI_8259_IRQ15); 139 pci_write_config_byte(dev, 0x75, ULI_8259_IRQ15);
140} 140}
141 141
142static void __devinit quirk_final_uli1575(struct pci_dev *dev) 142static void quirk_final_uli1575(struct pci_dev *dev)
143{ 143{
144 /* Set i8259 interrupt trigger 144 /* Set i8259 interrupt trigger
145 * IRQ 3: Level 145 * IRQ 3: Level
@@ -175,7 +175,7 @@ static void __devinit quirk_final_uli1575(struct pci_dev *dev)
175} 175}
176 176
177/* SATA */ 177/* SATA */
178static void __devinit quirk_uli5288(struct pci_dev *dev) 178static void quirk_uli5288(struct pci_dev *dev)
179{ 179{
180 unsigned char c; 180 unsigned char c;
181 unsigned int d; 181 unsigned int d;
@@ -200,7 +200,7 @@ static void __devinit quirk_uli5288(struct pci_dev *dev)
200} 200}
201 201
202/* PATA */ 202/* PATA */
203static void __devinit quirk_uli5229(struct pci_dev *dev) 203static void quirk_uli5229(struct pci_dev *dev)
204{ 204{
205 unsigned short temp; 205 unsigned short temp;
206 206
@@ -216,7 +216,7 @@ static void __devinit quirk_uli5229(struct pci_dev *dev)
216} 216}
217 217
218/* We have to do a dummy read on the P2P for the RTC to work, WTF */ 218/* We have to do a dummy read on the P2P for the RTC to work, WTF */
219static void __devinit quirk_final_uli5249(struct pci_dev *dev) 219static void quirk_final_uli5249(struct pci_dev *dev)
220{ 220{
221 int i; 221 int i;
222 u8 *dummy; 222 u8 *dummy;
@@ -253,7 +253,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5249, quirk_final_uli5249);
253DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x1575, quirk_final_uli1575); 253DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x1575, quirk_final_uli1575);
254DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229); 254DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229);
255 255
256static void __devinit hpcd_quirk_uli1575(struct pci_dev *dev) 256static void hpcd_quirk_uli1575(struct pci_dev *dev)
257{ 257{
258 u32 temp32; 258 u32 temp32;
259 259
@@ -269,7 +269,7 @@ static void __devinit hpcd_quirk_uli1575(struct pci_dev *dev)
269 pci_write_config_dword(dev, 0x90, (temp32 | 1<<22)); 269 pci_write_config_dword(dev, 0x90, (temp32 | 1<<22));
270} 270}
271 271
272static void __devinit hpcd_quirk_uli5288(struct pci_dev *dev) 272static void hpcd_quirk_uli5288(struct pci_dev *dev)
273{ 273{
274 unsigned char c; 274 unsigned char c;
275 275
@@ -295,7 +295,7 @@ static void __devinit hpcd_quirk_uli5288(struct pci_dev *dev)
295 * IRQ14 is a sideband interrupt from IDE device to CPU and we use this 295 * IRQ14 is a sideband interrupt from IDE device to CPU and we use this
296 * as the interrupt for IDE device. 296 * as the interrupt for IDE device.
297 */ 297 */
298static void __devinit hpcd_quirk_uli5229(struct pci_dev *dev) 298static void hpcd_quirk_uli5229(struct pci_dev *dev)
299{ 299{
300 unsigned char c; 300 unsigned char c;
301 301
@@ -317,7 +317,7 @@ static void __devinit hpcd_quirk_uli5229(struct pci_dev *dev)
317 * bug by re-assigning a correct irq to 5288. 317 * bug by re-assigning a correct irq to 5288.
318 * 318 *
319 */ 319 */
320static void __devinit hpcd_final_uli5288(struct pci_dev *dev) 320static void hpcd_final_uli5288(struct pci_dev *dev)
321{ 321{
322 struct pci_controller *hose = pci_bus_to_host(dev->bus); 322 struct pci_controller *hose = pci_bus_to_host(dev->bus);
323 struct device_node *hosenode = hose ? hose->dn : NULL; 323 struct device_node *hosenode = hose ? hose->dn : NULL;
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 465ee8f5c086..f7136aae8bbf 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -543,7 +543,7 @@ static int __init maple_add_bridge(struct device_node *dev)
543} 543}
544 544
545 545
546void __devinit maple_pci_irq_fixup(struct pci_dev *dev) 546void maple_pci_irq_fixup(struct pci_dev *dev)
547{ 547{
548 DBG(" -> maple_pci_irq_fixup\n"); 548 DBG(" -> maple_pci_irq_fixup\n");
549 549
@@ -648,7 +648,7 @@ int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel)
648 return irq; 648 return irq;
649} 649}
650 650
651static void __devinit quirk_ipr_msi(struct pci_dev *dev) 651static void quirk_ipr_msi(struct pci_dev *dev)
652{ 652{
653 /* Something prevents MSIs from the IPR from working on Bimini, 653 /* Something prevents MSIs from the IPR from working on Bimini,
654 * and the driver has no smarts to recover. So disable MSI 654 * and the driver has no smarts to recover. So disable MSI
diff --git a/arch/powerpc/platforms/pasemi/gpio_mdio.c b/arch/powerpc/platforms/pasemi/gpio_mdio.c
index 9886296e08da..0237ab782fb8 100644
--- a/arch/powerpc/platforms/pasemi/gpio_mdio.c
+++ b/arch/powerpc/platforms/pasemi/gpio_mdio.c
@@ -216,7 +216,7 @@ static int gpio_mdio_reset(struct mii_bus *bus)
216} 216}
217 217
218 218
219static int __devinit gpio_mdio_probe(struct platform_device *ofdev) 219static int gpio_mdio_probe(struct platform_device *ofdev)
220{ 220{
221 struct device *dev = &ofdev->dev; 221 struct device *dev = &ofdev->dev;
222 struct device_node *np = ofdev->dev.of_node; 222 struct device_node *np = ofdev->dev.of_node;
diff --git a/arch/powerpc/platforms/pasemi/pasemi.h b/arch/powerpc/platforms/pasemi/pasemi.h
index b1e524f7489d..ea65bf0eb897 100644
--- a/arch/powerpc/platforms/pasemi/pasemi.h
+++ b/arch/powerpc/platforms/pasemi/pasemi.h
@@ -3,8 +3,8 @@
3 3
4extern unsigned long pas_get_boot_time(void); 4extern unsigned long pas_get_boot_time(void);
5extern void pas_pci_init(void); 5extern void pas_pci_init(void);
6extern void __devinit pas_pci_irq_fixup(struct pci_dev *dev); 6extern void pas_pci_irq_fixup(struct pci_dev *dev);
7extern void __devinit pas_pci_dma_dev_setup(struct pci_dev *dev); 7extern void pas_pci_dma_dev_setup(struct pci_dev *dev);
8 8
9extern void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset); 9extern void __iomem *pasemi_pci_getcfgaddr(struct pci_dev *dev, int offset);
10 10
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c
index 2ed9212d7d59..8c54de6d8ec4 100644
--- a/arch/powerpc/platforms/pasemi/setup.c
+++ b/arch/powerpc/platforms/pasemi/setup.c
@@ -76,7 +76,7 @@ static void pas_restart(char *cmd)
76static arch_spinlock_t timebase_lock; 76static arch_spinlock_t timebase_lock;
77static unsigned long timebase; 77static unsigned long timebase;
78 78
79static void __devinit pas_give_timebase(void) 79static void pas_give_timebase(void)
80{ 80{
81 unsigned long flags; 81 unsigned long flags;
82 82
@@ -94,7 +94,7 @@ static void __devinit pas_give_timebase(void)
94 local_irq_restore(flags); 94 local_irq_restore(flags);
95} 95}
96 96
97static void __devinit pas_take_timebase(void) 97static void pas_take_timebase(void)
98{ 98{
99 while (!timebase) 99 while (!timebase)
100 smp_rmb(); 100 smp_rmb();
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index 43bbe1bda939..2b8af75abc23 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -561,7 +561,7 @@ static struct pci_ops u4_pcie_pci_ops =
561 .write = u4_pcie_write_config, 561 .write = u4_pcie_write_config,
562}; 562};
563 563
564static void __devinit pmac_pci_fixup_u4_of_node(struct pci_dev *dev) 564static void pmac_pci_fixup_u4_of_node(struct pci_dev *dev)
565{ 565{
566 /* Apple's device-tree "hides" the root complex virtual P2P bridge 566 /* Apple's device-tree "hides" the root complex virtual P2P bridge
567 * on U4. However, Linux sees it, causing the PCI <-> OF matching 567 * on U4. However, Linux sees it, causing the PCI <-> OF matching
@@ -988,7 +988,7 @@ static int __init pmac_add_bridge(struct device_node *dev)
988 return 0; 988 return 0;
989} 989}
990 990
991void __devinit pmac_pci_irq_fixup(struct pci_dev *dev) 991void pmac_pci_irq_fixup(struct pci_dev *dev)
992{ 992{
993#ifdef CONFIG_PPC32 993#ifdef CONFIG_PPC32
994 /* Fixup interrupt for the modem/ethernet combo controller. 994 /* Fixup interrupt for the modem/ethernet combo controller.
@@ -1138,7 +1138,7 @@ int pmac_pci_enable_device_hook(struct pci_dev *dev)
1138 return 0; 1138 return 0;
1139} 1139}
1140 1140
1141void __devinit pmac_pci_fixup_ohci(struct pci_dev *dev) 1141void pmac_pci_fixup_ohci(struct pci_dev *dev)
1142{ 1142{
1143 struct device_node *node = pci_device_to_OF_node(dev); 1143 struct device_node *node = pci_device_to_OF_node(dev);
1144 1144
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index b4ddaa3fbb29..bdb738a69e41 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -484,7 +484,7 @@ static void smp_core99_give_timebase(void)
484} 484}
485 485
486 486
487static void __devinit smp_core99_take_timebase(void) 487static void smp_core99_take_timebase(void)
488{ 488{
489 unsigned long flags; 489 unsigned long flags;
490 490
@@ -669,7 +669,7 @@ static void smp_core99_gpio_tb_freeze(int freeze)
669volatile static long int core99_l2_cache; 669volatile static long int core99_l2_cache;
670volatile static long int core99_l3_cache; 670volatile static long int core99_l3_cache;
671 671
672static void __devinit core99_init_caches(int cpu) 672static void core99_init_caches(int cpu)
673{ 673{
674#ifndef CONFIG_PPC64 674#ifndef CONFIG_PPC64
675 if (!cpu_has_feature(CPU_FTR_L2CR)) 675 if (!cpu_has_feature(CPU_FTR_L2CR))
@@ -801,7 +801,7 @@ static int __init smp_core99_probe(void)
801 return ncpus; 801 return ncpus;
802} 802}
803 803
804static int __devinit smp_core99_kick_cpu(int nr) 804static int smp_core99_kick_cpu(int nr)
805{ 805{
806 unsigned int save_vector; 806 unsigned int save_vector;
807 unsigned long target, flags; 807 unsigned long target, flags;
@@ -844,7 +844,7 @@ static int __devinit smp_core99_kick_cpu(int nr)
844 return 0; 844 return 0;
845} 845}
846 846
847static void __devinit smp_core99_setup_cpu(int cpu_nr) 847static void smp_core99_setup_cpu(int cpu_nr)
848{ 848{
849 /* Setup L2/L3 */ 849 /* Setup L2/L3 */
850 if (cpu_nr != 0) 850 if (cpu_nr != 0)
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 53d052e95cfc..8e90e8906df3 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -76,7 +76,7 @@ static struct pci_dn *pnv_ioda_get_pdn(struct pci_dev *dev)
76 return PCI_DN(np); 76 return PCI_DN(np);
77} 77}
78 78
79static int __devinit pnv_ioda_alloc_pe(struct pnv_phb *phb) 79static int pnv_ioda_alloc_pe(struct pnv_phb *phb)
80{ 80{
81 unsigned long pe; 81 unsigned long pe;
82 82
@@ -91,7 +91,7 @@ static int __devinit pnv_ioda_alloc_pe(struct pnv_phb *phb)
91 return pe; 91 return pe;
92} 92}
93 93
94static void __devinit pnv_ioda_free_pe(struct pnv_phb *phb, int pe) 94static void pnv_ioda_free_pe(struct pnv_phb *phb, int pe)
95{ 95{
96 WARN_ON(phb->ioda.pe_array[pe].pdev); 96 WARN_ON(phb->ioda.pe_array[pe].pdev);
97 97
@@ -103,7 +103,7 @@ static void __devinit pnv_ioda_free_pe(struct pnv_phb *phb, int pe)
103 * but in the meantime, we need to protect them to avoid warnings 103 * but in the meantime, we need to protect them to avoid warnings
104 */ 104 */
105#ifdef CONFIG_PCI_MSI 105#ifdef CONFIG_PCI_MSI
106static struct pnv_ioda_pe * __devinit pnv_ioda_get_pe(struct pci_dev *dev) 106static struct pnv_ioda_pe *pnv_ioda_get_pe(struct pci_dev *dev)
107{ 107{
108 struct pci_controller *hose = pci_bus_to_host(dev->bus); 108 struct pci_controller *hose = pci_bus_to_host(dev->bus);
109 struct pnv_phb *phb = hose->private_data; 109 struct pnv_phb *phb = hose->private_data;
@@ -117,8 +117,7 @@ static struct pnv_ioda_pe * __devinit pnv_ioda_get_pe(struct pci_dev *dev)
117} 117}
118#endif /* CONFIG_PCI_MSI */ 118#endif /* CONFIG_PCI_MSI */
119 119
120static int __devinit pnv_ioda_configure_pe(struct pnv_phb *phb, 120static int pnv_ioda_configure_pe(struct pnv_phb *phb, struct pnv_ioda_pe *pe)
121 struct pnv_ioda_pe *pe)
122{ 121{
123 struct pci_dev *parent; 122 struct pci_dev *parent;
124 uint8_t bcomp, dcomp, fcomp; 123 uint8_t bcomp, dcomp, fcomp;
@@ -207,8 +206,8 @@ static int __devinit pnv_ioda_configure_pe(struct pnv_phb *phb,
207 return 0; 206 return 0;
208} 207}
209 208
210static void __devinit pnv_ioda_link_pe_by_weight(struct pnv_phb *phb, 209static void pnv_ioda_link_pe_by_weight(struct pnv_phb *phb,
211 struct pnv_ioda_pe *pe) 210 struct pnv_ioda_pe *pe)
212{ 211{
213 struct pnv_ioda_pe *lpe; 212 struct pnv_ioda_pe *lpe;
214 213
@@ -246,7 +245,7 @@ static unsigned int pnv_ioda_dma_weight(struct pci_dev *dev)
246} 245}
247 246
248#if 0 247#if 0
249static struct pnv_ioda_pe * __devinit pnv_ioda_setup_dev_PE(struct pci_dev *dev) 248static struct pnv_ioda_pe *pnv_ioda_setup_dev_PE(struct pci_dev *dev)
250{ 249{
251 struct pci_controller *hose = pci_bus_to_host(dev->bus); 250 struct pci_controller *hose = pci_bus_to_host(dev->bus);
252 struct pnv_phb *phb = hose->private_data; 251 struct pnv_phb *phb = hose->private_data;
@@ -343,7 +342,7 @@ static void pnv_ioda_setup_same_PE(struct pci_bus *bus, struct pnv_ioda_pe *pe)
343 * subordinate PCI devices and buses. The second type of PE is normally 342 * subordinate PCI devices and buses. The second type of PE is normally
344 * orgiriated by PCIe-to-PCI bridge or PLX switch downstream ports. 343 * orgiriated by PCIe-to-PCI bridge or PLX switch downstream ports.
345 */ 344 */
346static void __devinit pnv_ioda_setup_bus_PE(struct pci_bus *bus, int all) 345static void pnv_ioda_setup_bus_PE(struct pci_bus *bus, int all)
347{ 346{
348 struct pci_controller *hose = pci_bus_to_host(bus); 347 struct pci_controller *hose = pci_bus_to_host(bus);
349 struct pnv_phb *phb = hose->private_data; 348 struct pnv_phb *phb = hose->private_data;
@@ -399,7 +398,7 @@ static void __devinit pnv_ioda_setup_bus_PE(struct pci_bus *bus, int all)
399 pnv_ioda_link_pe_by_weight(phb, pe); 398 pnv_ioda_link_pe_by_weight(phb, pe);
400} 399}
401 400
402static void __devinit pnv_ioda_setup_PEs(struct pci_bus *bus) 401static void pnv_ioda_setup_PEs(struct pci_bus *bus)
403{ 402{
404 struct pci_dev *dev; 403 struct pci_dev *dev;
405 404
@@ -423,7 +422,7 @@ static void __devinit pnv_ioda_setup_PEs(struct pci_bus *bus)
423 * port to PE# here. The game rule here is expected to be changed 422 * port to PE# here. The game rule here is expected to be changed
424 * as soon as we can detected PLX bridge correctly. 423 * as soon as we can detected PLX bridge correctly.
425 */ 424 */
426static void __devinit pnv_pci_ioda_setup_PEs(void) 425static void pnv_pci_ioda_setup_PEs(void)
427{ 426{
428 struct pci_controller *hose, *tmp; 427 struct pci_controller *hose, *tmp;
429 428
@@ -432,14 +431,12 @@ static void __devinit pnv_pci_ioda_setup_PEs(void)
432 } 431 }
433} 432}
434 433
435static void __devinit pnv_pci_ioda_dma_dev_setup(struct pnv_phb *phb, 434static void pnv_pci_ioda_dma_dev_setup(struct pnv_phb *phb, struct pci_dev *dev)
436 struct pci_dev *dev)
437{ 435{
438 /* We delay DMA setup after we have assigned all PE# */ 436 /* We delay DMA setup after we have assigned all PE# */
439} 437}
440 438
441static void __devinit pnv_ioda_setup_bus_dma(struct pnv_ioda_pe *pe, 439static void pnv_ioda_setup_bus_dma(struct pnv_ioda_pe *pe, struct pci_bus *bus)
442 struct pci_bus *bus)
443{ 440{
444 struct pci_dev *dev; 441 struct pci_dev *dev;
445 442
@@ -450,10 +447,9 @@ static void __devinit pnv_ioda_setup_bus_dma(struct pnv_ioda_pe *pe,
450 } 447 }
451} 448}
452 449
453static void __devinit pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb, 450static void pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb,
454 struct pnv_ioda_pe *pe, 451 struct pnv_ioda_pe *pe, unsigned int base,
455 unsigned int base, 452 unsigned int segs)
456 unsigned int segs)
457{ 453{
458 454
459 struct page *tce_mem = NULL; 455 struct page *tce_mem = NULL;
@@ -541,7 +537,7 @@ static void __devinit pnv_pci_ioda_setup_dma_pe(struct pnv_phb *phb,
541 __free_pages(tce_mem, get_order(TCE32_TABLE_SIZE * segs)); 537 __free_pages(tce_mem, get_order(TCE32_TABLE_SIZE * segs));
542} 538}
543 539
544static void __devinit pnv_ioda_setup_dma(struct pnv_phb *phb) 540static void pnv_ioda_setup_dma(struct pnv_phb *phb)
545{ 541{
546 struct pci_controller *hose = phb->hose; 542 struct pci_controller *hose = phb->hose;
547 unsigned int residual, remaining, segs, tw, base; 543 unsigned int residual, remaining, segs, tw, base;
@@ -684,8 +680,8 @@ static void pnv_pci_init_ioda_msis(struct pnv_phb *phb) { }
684 * to bottom style. So the the I/O or MMIO segment assigned to 680 * to bottom style. So the the I/O or MMIO segment assigned to
685 * parent PE could be overrided by its child PEs if necessary. 681 * parent PE could be overrided by its child PEs if necessary.
686 */ 682 */
687static void __devinit pnv_ioda_setup_pe_seg(struct pci_controller *hose, 683static void pnv_ioda_setup_pe_seg(struct pci_controller *hose,
688 struct pnv_ioda_pe *pe) 684 struct pnv_ioda_pe *pe)
689{ 685{
690 struct pnv_phb *phb = hose->private_data; 686 struct pnv_phb *phb = hose->private_data;
691 struct pci_bus_region region; 687 struct pci_bus_region region;
@@ -753,7 +749,7 @@ static void __devinit pnv_ioda_setup_pe_seg(struct pci_controller *hose,
753 } 749 }
754} 750}
755 751
756static void __devinit pnv_pci_ioda_setup_seg(void) 752static void pnv_pci_ioda_setup_seg(void)
757{ 753{
758 struct pci_controller *tmp, *hose; 754 struct pci_controller *tmp, *hose;
759 struct pnv_phb *phb; 755 struct pnv_phb *phb;
@@ -767,7 +763,7 @@ static void __devinit pnv_pci_ioda_setup_seg(void)
767 } 763 }
768} 764}
769 765
770static void __devinit pnv_pci_ioda_setup_DMA(void) 766static void pnv_pci_ioda_setup_DMA(void)
771{ 767{
772 struct pci_controller *hose, *tmp; 768 struct pci_controller *hose, *tmp;
773 struct pnv_phb *phb; 769 struct pnv_phb *phb;
@@ -781,7 +777,7 @@ static void __devinit pnv_pci_ioda_setup_DMA(void)
781 } 777 }
782} 778}
783 779
784static void __devinit pnv_pci_ioda_fixup(void) 780static void pnv_pci_ioda_fixup(void)
785{ 781{
786 pnv_pci_ioda_setup_PEs(); 782 pnv_pci_ioda_setup_PEs();
787 pnv_pci_ioda_setup_seg(); 783 pnv_pci_ioda_setup_seg();
@@ -829,7 +825,7 @@ static resource_size_t pnv_pci_window_alignment(struct pci_bus *bus,
829/* Prevent enabling devices for which we couldn't properly 825/* Prevent enabling devices for which we couldn't properly
830 * assign a PE 826 * assign a PE
831 */ 827 */
832static int __devinit pnv_pci_enable_device_hook(struct pci_dev *dev) 828static int pnv_pci_enable_device_hook(struct pci_dev *dev)
833{ 829{
834 struct pci_controller *hose = pci_bus_to_host(dev->bus); 830 struct pci_controller *hose = pci_bus_to_host(dev->bus);
835 struct pnv_phb *phb = hose->private_data; 831 struct pnv_phb *phb = hose->private_data;
diff --git a/arch/powerpc/platforms/powernv/pci-p5ioc2.c b/arch/powerpc/platforms/powernv/pci-p5ioc2.c
index 6b4bef4e9d82..7db8771a40f5 100644
--- a/arch/powerpc/platforms/powernv/pci-p5ioc2.c
+++ b/arch/powerpc/platforms/powernv/pci-p5ioc2.c
@@ -84,8 +84,8 @@ static void pnv_pci_init_p5ioc2_msis(struct pnv_phb *phb)
84static void pnv_pci_init_p5ioc2_msis(struct pnv_phb *phb) { } 84static void pnv_pci_init_p5ioc2_msis(struct pnv_phb *phb) { }
85#endif /* CONFIG_PCI_MSI */ 85#endif /* CONFIG_PCI_MSI */
86 86
87static void __devinit pnv_pci_p5ioc2_dma_dev_setup(struct pnv_phb *phb, 87static void pnv_pci_p5ioc2_dma_dev_setup(struct pnv_phb *phb,
88 struct pci_dev *pdev) 88 struct pci_dev *pdev)
89{ 89{
90 if (phb->p5ioc2.iommu_table.it_map == NULL) 90 if (phb->p5ioc2.iommu_table.it_map == NULL)
91 iommu_init_table(&phb->p5ioc2.iommu_table, phb->hose->node); 91 iommu_init_table(&phb->p5ioc2.iommu_table, phb->hose->node);
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c
index c01688a1a741..b8b8e0bd9897 100644
--- a/arch/powerpc/platforms/powernv/pci.c
+++ b/arch/powerpc/platforms/powernv/pci.c
@@ -464,8 +464,7 @@ void pnv_pci_setup_iommu_table(struct iommu_table *tbl,
464 tbl->it_type = TCE_PCI; 464 tbl->it_type = TCE_PCI;
465} 465}
466 466
467static struct iommu_table * __devinit 467static struct iommu_table *pnv_pci_setup_bml_iommu(struct pci_controller *hose)
468pnv_pci_setup_bml_iommu(struct pci_controller *hose)
469{ 468{
470 struct iommu_table *tbl; 469 struct iommu_table *tbl;
471 const __be64 *basep, *swinvp; 470 const __be64 *basep, *swinvp;
@@ -496,8 +495,8 @@ pnv_pci_setup_bml_iommu(struct pci_controller *hose)
496 return tbl; 495 return tbl;
497} 496}
498 497
499static void __devinit pnv_pci_dma_fallback_setup(struct pci_controller *hose, 498static void pnv_pci_dma_fallback_setup(struct pci_controller *hose,
500 struct pci_dev *pdev) 499 struct pci_dev *pdev)
501{ 500{
502 struct device_node *np = pci_bus_to_OF_node(hose->bus); 501 struct device_node *np = pci_bus_to_OF_node(hose->bus);
503 struct pci_dn *pdn; 502 struct pci_dn *pdn;
@@ -512,7 +511,7 @@ static void __devinit pnv_pci_dma_fallback_setup(struct pci_controller *hose,
512 set_iommu_table_base(&pdev->dev, pdn->iommu_table); 511 set_iommu_table_base(&pdev->dev, pdn->iommu_table);
513} 512}
514 513
515static void __devinit pnv_pci_dma_dev_setup(struct pci_dev *pdev) 514static void pnv_pci_dma_dev_setup(struct pci_dev *pdev)
516{ 515{
517 struct pci_controller *hose = pci_bus_to_host(pdev->bus); 516 struct pci_controller *hose = pci_bus_to_host(pdev->bus);
518 struct pnv_phb *phb = hose->private_data; 517 struct pnv_phb *phb = hose->private_data;
@@ -527,7 +526,7 @@ static void __devinit pnv_pci_dma_dev_setup(struct pci_dev *pdev)
527} 526}
528 527
529/* Fixup wrong class code in p7ioc root complex */ 528/* Fixup wrong class code in p7ioc root complex */
530static void __devinit pnv_p7ioc_rc_quirk(struct pci_dev *dev) 529static void pnv_p7ioc_rc_quirk(struct pci_dev *dev)
531{ 530{
532 dev->class = PCI_CLASS_BRIDGE_PCI << 8; 531 dev->class = PCI_CLASS_BRIDGE_PCI << 8;
533} 532}
diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c
index 7698b6e13c57..0bdc735db16f 100644
--- a/arch/powerpc/platforms/powernv/smp.c
+++ b/arch/powerpc/platforms/powernv/smp.c
@@ -62,7 +62,7 @@ static int pnv_smp_cpu_bootable(unsigned int nr)
62 return 1; 62 return 1;
63} 63}
64 64
65int __devinit pnv_smp_kick_cpu(int nr) 65int pnv_smp_kick_cpu(int nr)
66{ 66{
67 unsigned int pcpu = get_hard_smp_processor_id(nr); 67 unsigned int pcpu = get_hard_smp_processor_id(nr);
68 unsigned long start_here = __pa(*((unsigned long *) 68 unsigned long start_here = __pa(*((unsigned long *)
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c
index 9b47ba7a5de7..bfccdc7cb85f 100644
--- a/arch/powerpc/platforms/ps3/repository.c
+++ b/arch/powerpc/platforms/ps3/repository.c
@@ -437,7 +437,7 @@ found_dev:
437 return 0; 437 return 0;
438} 438}
439 439
440int __devinit ps3_repository_find_devices(enum ps3_bus_type bus_type, 440int ps3_repository_find_devices(enum ps3_bus_type bus_type,
441 int (*callback)(const struct ps3_repository_device *repo)) 441 int (*callback)(const struct ps3_repository_device *repo))
442{ 442{
443 int result = 0; 443 int result = 0;
diff --git a/arch/powerpc/platforms/pseries/eeh_dev.c b/arch/powerpc/platforms/pseries/eeh_dev.c
index 66442341d3a6..1efa28f5fc54 100644
--- a/arch/powerpc/platforms/pseries/eeh_dev.c
+++ b/arch/powerpc/platforms/pseries/eeh_dev.c
@@ -49,7 +49,7 @@
49 * It will create EEH device according to the given OF node. The function 49 * It will create EEH device according to the given OF node. The function
50 * might be called by PCI emunation, DR, PHB hotplug. 50 * might be called by PCI emunation, DR, PHB hotplug.
51 */ 51 */
52void * __devinit eeh_dev_init(struct device_node *dn, void *data) 52void *eeh_dev_init(struct device_node *dn, void *data)
53{ 53{
54 struct pci_controller *phb = data; 54 struct pci_controller *phb = data;
55 struct eeh_dev *edev; 55 struct eeh_dev *edev;
@@ -77,7 +77,7 @@ void * __devinit eeh_dev_init(struct device_node *dn, void *data)
77 * Scan the PHB OF node and its child association, then create the 77 * Scan the PHB OF node and its child association, then create the
78 * EEH devices accordingly 78 * EEH devices accordingly
79 */ 79 */
80void __devinit eeh_dev_phb_init_dynamic(struct pci_controller *phb) 80void eeh_dev_phb_init_dynamic(struct pci_controller *phb)
81{ 81{
82 struct device_node *dn = phb->dn; 82 struct device_node *dn = phb->dn;
83 83
diff --git a/arch/powerpc/platforms/pseries/eeh_pe.c b/arch/powerpc/platforms/pseries/eeh_pe.c
index d16c8ded1084..fe43d1aa2cf1 100644
--- a/arch/powerpc/platforms/pseries/eeh_pe.c
+++ b/arch/powerpc/platforms/pseries/eeh_pe.c
@@ -66,7 +66,7 @@ static struct eeh_pe *eeh_pe_alloc(struct pci_controller *phb, int type)
66 * The function should be called while the PHB is detected during 66 * The function should be called while the PHB is detected during
67 * system boot or PCI hotplug in order to create PHB PE. 67 * system boot or PCI hotplug in order to create PHB PE.
68 */ 68 */
69int __devinit eeh_phb_pe_create(struct pci_controller *phb) 69int eeh_phb_pe_create(struct pci_controller *phb)
70{ 70{
71 struct eeh_pe *pe; 71 struct eeh_pe *pe;
72 72
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c
index 261a577a3dd2..c91b22be9288 100644
--- a/arch/powerpc/platforms/pseries/pci_dlpar.c
+++ b/arch/powerpc/platforms/pseries/pci_dlpar.c
@@ -149,7 +149,7 @@ void pcibios_add_pci_devices(struct pci_bus * bus)
149} 149}
150EXPORT_SYMBOL_GPL(pcibios_add_pci_devices); 150EXPORT_SYMBOL_GPL(pcibios_add_pci_devices);
151 151
152struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn) 152struct pci_controller *init_phb_dynamic(struct device_node *dn)
153{ 153{
154 struct pci_controller *phb; 154 struct pci_controller *phb;
155 155
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 9fc0a4941908..80cd0be71e06 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -87,7 +87,7 @@ int smp_query_cpu_stopped(unsigned int pcpu)
87 * 0 - failure 87 * 0 - failure
88 * 1 - success 88 * 1 - success
89 */ 89 */
90static inline int __devinit smp_startup_cpu(unsigned int lcpu) 90static inline int smp_startup_cpu(unsigned int lcpu)
91{ 91{
92 int status; 92 int status;
93 unsigned long start_here = __pa((u32)*((unsigned long *) 93 unsigned long start_here = __pa((u32)*((unsigned long *)
@@ -133,7 +133,7 @@ out:
133 return 1; 133 return 1;
134} 134}
135 135
136static void __devinit smp_xics_setup_cpu(int cpu) 136static void smp_xics_setup_cpu(int cpu)
137{ 137{
138 if (cpu != boot_cpuid) 138 if (cpu != boot_cpuid)
139 xics_setup_cpu(); 139 xics_setup_cpu();
@@ -148,7 +148,7 @@ static void __devinit smp_xics_setup_cpu(int cpu)
148#endif 148#endif
149} 149}
150 150
151static int __devinit smp_pSeries_kick_cpu(int nr) 151static int smp_pSeries_kick_cpu(int nr)
152{ 152{
153 BUG_ON(nr < 0 || nr >= NR_CPUS); 153 BUG_ON(nr < 0 || nr >= NR_CPUS);
154 154
diff --git a/arch/powerpc/platforms/wsp/scom_smp.c b/arch/powerpc/platforms/wsp/scom_smp.c
index 141e78032097..b56b70aeb497 100644
--- a/arch/powerpc/platforms/wsp/scom_smp.c
+++ b/arch/powerpc/platforms/wsp/scom_smp.c
@@ -337,8 +337,7 @@ scom_fail:
337 return rc; 337 return rc;
338} 338}
339 339
340int __devinit a2_scom_startup_cpu(unsigned int lcpu, int thr_idx, 340int a2_scom_startup_cpu(unsigned int lcpu, int thr_idx, struct device_node *np)
341 struct device_node *np)
342{ 341{
343 u64 init_iar, init_msr, init_ccr2; 342 u64 init_iar, init_msr, init_ccr2;
344 unsigned long start_here; 343 unsigned long start_here;
diff --git a/arch/powerpc/platforms/wsp/smp.c b/arch/powerpc/platforms/wsp/smp.c
index 0ba103ae83a5..332a18b81403 100644
--- a/arch/powerpc/platforms/wsp/smp.c
+++ b/arch/powerpc/platforms/wsp/smp.c
@@ -23,7 +23,7 @@
23#include "ics.h" 23#include "ics.h"
24#include "wsp.h" 24#include "wsp.h"
25 25
26static void __devinit smp_a2_setup_cpu(int cpu) 26static void smp_a2_setup_cpu(int cpu)
27{ 27{
28 doorbell_setup_this_cpu(); 28 doorbell_setup_this_cpu();
29 29
@@ -31,7 +31,7 @@ static void __devinit smp_a2_setup_cpu(int cpu)
31 xics_setup_cpu(); 31 xics_setup_cpu();
32} 32}
33 33
34int __devinit smp_a2_kick_cpu(int nr) 34int smp_a2_kick_cpu(int nr)
35{ 35{
36 const char *enable_method; 36 const char *enable_method;
37 struct device_node *np; 37 struct device_node *np;
diff --git a/arch/powerpc/platforms/wsp/wsp.h b/arch/powerpc/platforms/wsp/wsp.h
index 10c1d1fff362..62ef21afb89a 100644
--- a/arch/powerpc/platforms/wsp/wsp.h
+++ b/arch/powerpc/platforms/wsp/wsp.h
@@ -18,7 +18,7 @@ extern void a2_setup_smp(void);
18extern int a2_scom_startup_cpu(unsigned int lcpu, int thr_idx, 18extern int a2_scom_startup_cpu(unsigned int lcpu, int thr_idx,
19 struct device_node *np); 19 struct device_node *np);
20extern int smp_a2_cpu_bootable(unsigned int nr); 20extern int smp_a2_cpu_bootable(unsigned int nr);
21extern int __devinit smp_a2_kick_cpu(int nr); 21extern int smp_a2_kick_cpu(int nr);
22 22
23extern void opb_pic_init(void); 23extern void opb_pic_init(void);
24 24
diff --git a/arch/powerpc/platforms/wsp/wsp_pci.c b/arch/powerpc/platforms/wsp/wsp_pci.c
index 1526551f9fe6..8e22f561d171 100644
--- a/arch/powerpc/platforms/wsp/wsp_pci.c
+++ b/arch/powerpc/platforms/wsp/wsp_pci.c
@@ -402,7 +402,7 @@ static struct wsp_dma_table *wsp_pci_create_dma32_table(struct wsp_phb *phb,
402 return ERR_PTR(-ENOMEM); 402 return ERR_PTR(-ENOMEM);
403} 403}
404 404
405static void __devinit wsp_pci_dma_dev_setup(struct pci_dev *pdev) 405static void wsp_pci_dma_dev_setup(struct pci_dev *pdev)
406{ 406{
407 struct dev_archdata *archdata = &pdev->dev.archdata; 407 struct dev_archdata *archdata = &pdev->dev.archdata;
408 struct pci_controller *hose = pci_bus_to_host(pdev->bus); 408 struct pci_controller *hose = pci_bus_to_host(pdev->bus);
diff --git a/arch/powerpc/sysdev/bestcomm/bestcomm.c b/arch/powerpc/sysdev/bestcomm/bestcomm.c
index b3fbb271be87..d9130630f7ef 100644
--- a/arch/powerpc/sysdev/bestcomm/bestcomm.c
+++ b/arch/powerpc/sysdev/bestcomm/bestcomm.c
@@ -30,7 +30,7 @@
30#define DRIVER_NAME "bestcomm-core" 30#define DRIVER_NAME "bestcomm-core"
31 31
32/* MPC5200 device tree match tables */ 32/* MPC5200 device tree match tables */
33static struct of_device_id mpc52xx_sram_ids[] __devinitdata = { 33static struct of_device_id mpc52xx_sram_ids[] = {
34 { .compatible = "fsl,mpc5200-sram", }, 34 { .compatible = "fsl,mpc5200-sram", },
35 { .compatible = "mpc5200-sram", }, 35 { .compatible = "mpc5200-sram", },
36 {} 36 {}
@@ -273,8 +273,7 @@ static u32 fdt_ops[] = {
273}; 273};
274 274
275 275
276static int __devinit 276static int bcom_engine_init(void)
277bcom_engine_init(void)
278{ 277{
279 int task; 278 int task;
280 phys_addr_t tdt_pa, ctx_pa, var_pa, fdt_pa; 279 phys_addr_t tdt_pa, ctx_pa, var_pa, fdt_pa;
@@ -365,7 +364,7 @@ bcom_engine_cleanup(void)
365/* OF platform driver */ 364/* OF platform driver */
366/* ======================================================================== */ 365/* ======================================================================== */
367 366
368static int __devinit mpc52xx_bcom_probe(struct platform_device *op) 367static int mpc52xx_bcom_probe(struct platform_device *op)
369{ 368{
370 struct device_node *ofn_sram; 369 struct device_node *ofn_sram;
371 struct resource res_bcom; 370 struct resource res_bcom;
diff --git a/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c b/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c
index d131c8a1cb15..8cf93f029e17 100644
--- a/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c
+++ b/arch/powerpc/sysdev/fsl_85xx_l2ctlr.c
@@ -69,7 +69,7 @@ static int __init get_offset_from_cmdline(char *str)
69__setup("cache-sram-size=", get_size_from_cmdline); 69__setup("cache-sram-size=", get_size_from_cmdline);
70__setup("cache-sram-offset=", get_offset_from_cmdline); 70__setup("cache-sram-offset=", get_offset_from_cmdline);
71 71
72static int __devinit mpc85xx_l2ctlr_of_probe(struct platform_device *dev) 72static int mpc85xx_l2ctlr_of_probe(struct platform_device *dev)
73{ 73{
74 long rval; 74 long rval;
75 unsigned int rem; 75 unsigned int rem;
@@ -160,7 +160,7 @@ static int __devinit mpc85xx_l2ctlr_of_probe(struct platform_device *dev)
160 return 0; 160 return 0;
161} 161}
162 162
163static int __devexit mpc85xx_l2ctlr_of_remove(struct platform_device *dev) 163static int mpc85xx_l2ctlr_of_remove(struct platform_device *dev)
164{ 164{
165 BUG_ON(!l2ctlr); 165 BUG_ON(!l2ctlr);
166 166
@@ -213,7 +213,7 @@ static struct platform_driver mpc85xx_l2ctlr_of_platform_driver = {
213 .of_match_table = mpc85xx_l2ctlr_of_match, 213 .of_match_table = mpc85xx_l2ctlr_of_match,
214 }, 214 },
215 .probe = mpc85xx_l2ctlr_of_probe, 215 .probe = mpc85xx_l2ctlr_of_probe,
216 .remove = __devexit_p(mpc85xx_l2ctlr_of_remove), 216 .remove = mpc85xx_l2ctlr_of_remove,
217}; 217};
218 218
219static __init int mpc85xx_l2ctlr_of_init(void) 219static __init int mpc85xx_l2ctlr_of_init(void)
diff --git a/arch/powerpc/sysdev/fsl_ifc.c b/arch/powerpc/sysdev/fsl_ifc.c
index 097cc9d2585b..2a36fd6a9583 100644
--- a/arch/powerpc/sysdev/fsl_ifc.c
+++ b/arch/powerpc/sysdev/fsl_ifc.c
@@ -73,7 +73,7 @@ int fsl_ifc_find(phys_addr_t addr_base)
73} 73}
74EXPORT_SYMBOL(fsl_ifc_find); 74EXPORT_SYMBOL(fsl_ifc_find);
75 75
76static int __devinit fsl_ifc_ctrl_init(struct fsl_ifc_ctrl *ctrl) 76static int fsl_ifc_ctrl_init(struct fsl_ifc_ctrl *ctrl)
77{ 77{
78 struct fsl_ifc_regs __iomem *ifc = ctrl->regs; 78 struct fsl_ifc_regs __iomem *ifc = ctrl->regs;
79 79
@@ -211,7 +211,7 @@ static irqreturn_t fsl_ifc_ctrl_irq(int irqno, void *data)
211 * resources for the NAND banks themselves are allocated 211 * resources for the NAND banks themselves are allocated
212 * in the chip probe function. 212 * in the chip probe function.
213*/ 213*/
214static int __devinit fsl_ifc_ctrl_probe(struct platform_device *dev) 214static int fsl_ifc_ctrl_probe(struct platform_device *dev)
215{ 215{
216 int ret = 0; 216 int ret = 0;
217 217
diff --git a/arch/powerpc/sysdev/fsl_lbc.c b/arch/powerpc/sysdev/fsl_lbc.c
index 483126d7b3c0..300be2d06a26 100644
--- a/arch/powerpc/sysdev/fsl_lbc.c
+++ b/arch/powerpc/sysdev/fsl_lbc.c
@@ -185,8 +185,8 @@ int fsl_upm_run_pattern(struct fsl_upm *upm, void __iomem *io_base, u32 mar)
185} 185}
186EXPORT_SYMBOL(fsl_upm_run_pattern); 186EXPORT_SYMBOL(fsl_upm_run_pattern);
187 187
188static int __devinit fsl_lbc_ctrl_init(struct fsl_lbc_ctrl *ctrl, 188static int fsl_lbc_ctrl_init(struct fsl_lbc_ctrl *ctrl,
189 struct device_node *node) 189 struct device_node *node)
190{ 190{
191 struct fsl_lbc_regs __iomem *lbc = ctrl->regs; 191 struct fsl_lbc_regs __iomem *lbc = ctrl->regs;
192 192
@@ -273,7 +273,7 @@ static irqreturn_t fsl_lbc_ctrl_irq(int irqno, void *data)
273 * in the chip probe function. 273 * in the chip probe function.
274*/ 274*/
275 275
276static int __devinit fsl_lbc_ctrl_probe(struct platform_device *dev) 276static int fsl_lbc_ctrl_probe(struct platform_device *dev)
277{ 277{
278 int ret; 278 int ret;
279 279
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index 63c5f04ea580..6e53d97abd3f 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -333,9 +333,8 @@ static int fsl_of_msi_remove(struct platform_device *ofdev)
333 return 0; 333 return 0;
334} 334}
335 335
336static int __devinit fsl_msi_setup_hwirq(struct fsl_msi *msi, 336static int fsl_msi_setup_hwirq(struct fsl_msi *msi, struct platform_device *dev,
337 struct platform_device *dev, 337 int offset, int irq_index)
338 int offset, int irq_index)
339{ 338{
340 struct fsl_msi_cascade_data *cascade_data = NULL; 339 struct fsl_msi_cascade_data *cascade_data = NULL;
341 int virt_msir; 340 int virt_msir;
@@ -363,7 +362,7 @@ static int __devinit fsl_msi_setup_hwirq(struct fsl_msi *msi,
363} 362}
364 363
365static const struct of_device_id fsl_of_msi_ids[]; 364static const struct of_device_id fsl_of_msi_ids[];
366static int __devinit fsl_of_msi_probe(struct platform_device *dev) 365static int fsl_of_msi_probe(struct platform_device *dev)
367{ 366{
368 const struct of_device_id *match; 367 const struct of_device_id *match;
369 struct fsl_msi *msi; 368 struct fsl_msi *msi;
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 5ba325bff3a2..92a5915b1827 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -36,7 +36,7 @@
36 36
37static int fsl_pcie_bus_fixup, is_mpc83xx_pci; 37static int fsl_pcie_bus_fixup, is_mpc83xx_pci;
38 38
39static void __devinit quirk_fsl_pcie_header(struct pci_dev *dev) 39static void quirk_fsl_pcie_header(struct pci_dev *dev)
40{ 40{
41 u8 hdr_type; 41 u8 hdr_type;
42 42
@@ -871,7 +871,7 @@ void fsl_pci_assign_primary(void)
871 } 871 }
872} 872}
873 873
874static int __devinit fsl_pci_probe(struct platform_device *pdev) 874static int fsl_pci_probe(struct platform_device *pdev)
875{ 875{
876 int ret; 876 int ret;
877 struct device_node *node; 877 struct device_node *node;
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index 5b6f556094dd..e2fb3171f41b 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -644,7 +644,7 @@ err_rio_regs:
644 644
645/* The probe function for RapidIO peer-to-peer network. 645/* The probe function for RapidIO peer-to-peer network.
646 */ 646 */
647static int __devinit fsl_of_rio_rpn_probe(struct platform_device *dev) 647static int fsl_of_rio_rpn_probe(struct platform_device *dev)
648{ 648{
649 printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n", 649 printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n",
650 dev->dev.of_node->full_name); 650 dev->dev.of_node->full_name);
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 9c6e535daad2..3b2efd41abf2 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1864,7 +1864,7 @@ int __init smp_mpic_probe(void)
1864 return nr_cpus; 1864 return nr_cpus;
1865} 1865}
1866 1866
1867void __devinit smp_mpic_setup_cpu(int cpu) 1867void smp_mpic_setup_cpu(int cpu)
1868{ 1868{
1869 mpic_setup_this_cpu(); 1869 mpic_setup_this_cpu();
1870} 1870}
diff --git a/arch/powerpc/sysdev/mpic_msgr.c b/arch/powerpc/sysdev/mpic_msgr.c
index e961f8c4a8f0..c75325865a85 100644
--- a/arch/powerpc/sysdev/mpic_msgr.c
+++ b/arch/powerpc/sysdev/mpic_msgr.c
@@ -160,7 +160,7 @@ static int mpic_msgr_block_number(struct device_node *node)
160 160
161/* The probe function for a single message register block. 161/* The probe function for a single message register block.
162 */ 162 */
163static __devinit int mpic_msgr_probe(struct platform_device *dev) 163static int mpic_msgr_probe(struct platform_device *dev)
164{ 164{
165 void __iomem *msgr_block_addr; 165 void __iomem *msgr_block_addr;
166 int block_number; 166 int block_number;
diff --git a/arch/powerpc/sysdev/mv64x60_pci.c b/arch/powerpc/sysdev/mv64x60_pci.c
index 364b14d4754b..330d56613c5a 100644
--- a/arch/powerpc/sysdev/mv64x60_pci.c
+++ b/arch/powerpc/sysdev/mv64x60_pci.c
@@ -104,7 +104,7 @@ subsys_initcall(mv64x60_sysfs_init);
104 104
105#endif /* CONFIG_SYSFS */ 105#endif /* CONFIG_SYSFS */
106 106
107static void __devinit mv64x60_pci_fixup_early(struct pci_dev *dev) 107static void mv64x60_pci_fixup_early(struct pci_dev *dev)
108{ 108{
109 /* 109 /*
110 * Set the host bridge hdr_type to an invalid value so that 110 * Set the host bridge hdr_type to an invalid value so that
diff --git a/arch/powerpc/sysdev/ppc4xx_msi.c b/arch/powerpc/sysdev/ppc4xx_msi.c
index 82c6702dcbab..43948da837a7 100644
--- a/arch/powerpc/sysdev/ppc4xx_msi.c
+++ b/arch/powerpc/sysdev/ppc4xx_msi.c
@@ -220,7 +220,7 @@ static int ppc4xx_of_msi_remove(struct platform_device *dev)
220 return 0; 220 return 0;
221} 221}
222 222
223static int __devinit ppc4xx_msi_probe(struct platform_device *dev) 223static int ppc4xx_msi_probe(struct platform_device *dev)
224{ 224{
225 struct ppc4xx_msi *msi; 225 struct ppc4xx_msi *msi;
226 struct resource res; 226 struct resource res;
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index ea431e551c6b..0b45baa55438 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -623,10 +623,9 @@ static struct sclp_cpu_info *smp_get_cpu_info(void)
623 return info; 623 return info;
624} 624}
625 625
626static int __devinit smp_add_present_cpu(int cpu); 626static int smp_add_present_cpu(int cpu);
627 627
628static int __devinit __smp_rescan_cpus(struct sclp_cpu_info *info, 628static int __smp_rescan_cpus(struct sclp_cpu_info *info, int sysfs_add)
629 int sysfs_add)
630{ 629{
631 struct pcpu *pcpu; 630 struct pcpu *pcpu;
632 cpumask_t avail; 631 cpumask_t avail;
@@ -986,7 +985,7 @@ static int __cpuinit smp_cpu_notify(struct notifier_block *self,
986 return notifier_from_errno(err); 985 return notifier_from_errno(err);
987} 986}
988 987
989static int __devinit smp_add_present_cpu(int cpu) 988static int smp_add_present_cpu(int cpu)
990{ 989{
991 struct cpu *c = &pcpu_devices[cpu].cpu; 990 struct cpu *c = &pcpu_devices[cpu].cpu;
992 struct device *s = &c->dev; 991 struct device *s = &c->dev;
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index 8fa416b8775f..ff49427e9941 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -385,7 +385,7 @@ unsigned int probe_irq_mask(unsigned long val)
385} 385}
386EXPORT_SYMBOL_GPL(probe_irq_mask); 386EXPORT_SYMBOL_GPL(probe_irq_mask);
387 387
388void __devinit pcibios_fixup_bus(struct pci_bus *bus) 388void pcibios_fixup_bus(struct pci_bus *bus)
389{ 389{
390} 390}
391 391
diff --git a/arch/score/mm/cache.c b/arch/score/mm/cache.c
index b25e95743600..f85ec1a7c88e 100644
--- a/arch/score/mm/cache.c
+++ b/arch/score/mm/cache.c
@@ -113,7 +113,7 @@ static inline void setup_protection_map(void)
113 protection_map[15] = PAGE_SHARED; 113 protection_map[15] = PAGE_SHARED;
114} 114}
115 115
116void __devinit cpu_cache_init(void) 116void cpu_cache_init(void)
117{ 117{
118 setup_protection_map(); 118 setup_protection_map();
119} 119}
diff --git a/arch/sh/drivers/pci/fixups-dreamcast.c b/arch/sh/drivers/pci/fixups-dreamcast.c
index a5fe1b54c952..d6cde700e316 100644
--- a/arch/sh/drivers/pci/fixups-dreamcast.c
+++ b/arch/sh/drivers/pci/fixups-dreamcast.c
@@ -28,7 +28,7 @@
28#include <asm/irq.h> 28#include <asm/irq.h>
29#include <mach/pci.h> 29#include <mach/pci.h>
30 30
31static void __devinit gapspci_fixup_resources(struct pci_dev *dev) 31static void gapspci_fixup_resources(struct pci_dev *dev)
32{ 32{
33 struct pci_channel *p = dev->sysdata; 33 struct pci_channel *p = dev->sysdata;
34 34
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index 81e5dafed3e4..102f5d58b037 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -32,7 +32,7 @@ static struct pci_channel *hose_head, **hose_tail = &hose_head;
32 32
33static int pci_initialized; 33static int pci_initialized;
34 34
35static void __devinit pcibios_scanbus(struct pci_channel *hose) 35static void pcibios_scanbus(struct pci_channel *hose)
36{ 36{
37 static int next_busno; 37 static int next_busno;
38 static int need_domain_info; 38 static int need_domain_info;
@@ -82,7 +82,7 @@ static void __devinit pcibios_scanbus(struct pci_channel *hose)
82DEFINE_RAW_SPINLOCK(pci_config_lock); 82DEFINE_RAW_SPINLOCK(pci_config_lock);
83static DEFINE_MUTEX(pci_scan_mutex); 83static DEFINE_MUTEX(pci_scan_mutex);
84 84
85int __devinit register_pci_controller(struct pci_channel *hose) 85int register_pci_controller(struct pci_channel *hose)
86{ 86{
87 int i; 87 int i;
88 88
@@ -156,7 +156,7 @@ subsys_initcall(pcibios_init);
156 * Called after each bus is probed, but before its children 156 * Called after each bus is probed, but before its children
157 * are examined. 157 * are examined.
158 */ 158 */
159void __devinit pcibios_fixup_bus(struct pci_bus *bus) 159void pcibios_fixup_bus(struct pci_bus *bus)
160{ 160{
161} 161}
162 162
diff --git a/arch/sh/drivers/pci/pcie-sh7786.c b/arch/sh/drivers/pci/pcie-sh7786.c
index 9e702f2f8045..c2c85f6cd738 100644
--- a/arch/sh/drivers/pci/pcie-sh7786.c
+++ b/arch/sh/drivers/pci/pcie-sh7786.c
@@ -132,7 +132,7 @@ static struct clk fixed_pciexclkp = {
132 .rate = 100000000, /* 100 MHz reference clock */ 132 .rate = 100000000, /* 100 MHz reference clock */
133}; 133};
134 134
135static void __devinit sh7786_pci_fixup(struct pci_dev *dev) 135static void sh7786_pci_fixup(struct pci_dev *dev)
136{ 136{
137 /* 137 /*
138 * Prevent enumeration of root complex resources. 138 * Prevent enumeration of root complex resources.
diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h
index cb33608cc68f..c55291e5b83e 100644
--- a/arch/sparc/include/asm/parport.h
+++ b/arch/sparc/include/asm/parport.h
@@ -103,7 +103,7 @@ static inline unsigned int get_dma_residue(unsigned int dmanr)
103 return ebus_dma_residue(&sparc_ebus_dmas[dmanr].info); 103 return ebus_dma_residue(&sparc_ebus_dmas[dmanr].info);
104} 104}
105 105
106static int __devinit ecpp_probe(struct platform_device *op) 106static int ecpp_probe(struct platform_device *op)
107{ 107{
108 unsigned long base = op->resource[0].start; 108 unsigned long base = op->resource[0].start;
109 unsigned long config = op->resource[1].start; 109 unsigned long config = op->resource[1].start;
@@ -192,7 +192,7 @@ out_err:
192 return err; 192 return err;
193} 193}
194 194
195static int __devexit ecpp_remove(struct platform_device *op) 195static int ecpp_remove(struct platform_device *op)
196{ 196{
197 struct parport *p = dev_get_drvdata(&op->dev); 197 struct parport *p = dev_get_drvdata(&op->dev);
198 int slot = p->dma; 198 int slot = p->dma;
@@ -242,7 +242,7 @@ static struct platform_driver ecpp_driver = {
242 .of_match_table = ecpp_match, 242 .of_match_table = ecpp_match,
243 }, 243 },
244 .probe = ecpp_probe, 244 .probe = ecpp_probe,
245 .remove = __devexit_p(ecpp_remove), 245 .remove = ecpp_remove,
246}; 246};
247 247
248static int parport_pc_find_nonpci_ports(int autoirq, int autodma) 248static int parport_pc_find_nonpci_ports(int autoirq, int autodma)
diff --git a/arch/sparc/include/asm/timer_64.h b/arch/sparc/include/asm/timer_64.h
index ef3c3682debf..01197d8215c4 100644
--- a/arch/sparc/include/asm/timer_64.h
+++ b/arch/sparc/include/asm/timer_64.h
@@ -24,7 +24,7 @@ struct sparc64_tick_ops {
24extern struct sparc64_tick_ops *tick_ops; 24extern struct sparc64_tick_ops *tick_ops;
25 25
26extern unsigned long sparc64_get_clock_tick(unsigned int cpu); 26extern unsigned long sparc64_get_clock_tick(unsigned int cpu);
27extern void __devinit setup_sparc64_timer(void); 27extern void setup_sparc64_timer(void);
28extern void __init time_init(void); 28extern void __init time_init(void);
29 29
30#endif /* _SPARC64_TIMER_H */ 30#endif /* _SPARC64_TIMER_H */
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c
index 812e10bbb0b3..348fa1aeabce 100644
--- a/arch/sparc/kernel/apc.c
+++ b/arch/sparc/kernel/apc.c
@@ -31,7 +31,7 @@
31#define APC_DEVNAME "apc" 31#define APC_DEVNAME "apc"
32 32
33static u8 __iomem *regs; 33static u8 __iomem *regs;
34static int apc_no_idle __devinitdata = 0; 34static int apc_no_idle = 0;
35 35
36#define apc_readb(offs) (sbus_readb(regs+offs)) 36#define apc_readb(offs) (sbus_readb(regs+offs))
37#define apc_writeb(val, offs) (sbus_writeb(val, regs+offs)) 37#define apc_writeb(val, offs) (sbus_writeb(val, regs+offs))
@@ -138,7 +138,7 @@ static const struct file_operations apc_fops = {
138 138
139static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops }; 139static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops };
140 140
141static int __devinit apc_probe(struct platform_device *op) 141static int apc_probe(struct platform_device *op)
142{ 142{
143 int err; 143 int err;
144 144
diff --git a/arch/sparc/kernel/auxio_64.c b/arch/sparc/kernel/auxio_64.c
index 773091ac71a3..86e55778e4af 100644
--- a/arch/sparc/kernel/auxio_64.c
+++ b/arch/sparc/kernel/auxio_64.c
@@ -102,7 +102,7 @@ static const struct of_device_id auxio_match[] = {
102 102
103MODULE_DEVICE_TABLE(of, auxio_match); 103MODULE_DEVICE_TABLE(of, auxio_match);
104 104
105static int __devinit auxio_probe(struct platform_device *dev) 105static int auxio_probe(struct platform_device *dev)
106{ 106{
107 struct device_node *dp = dev->dev.of_node; 107 struct device_node *dp = dev->dev.of_node;
108 unsigned long size; 108 unsigned long size;
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c
index 9708851a8b9f..052b5a44318f 100644
--- a/arch/sparc/kernel/central.c
+++ b/arch/sparc/kernel/central.c
@@ -33,7 +33,7 @@ struct fhc {
33 struct platform_device leds_pdev; 33 struct platform_device leds_pdev;
34}; 34};
35 35
36static int __devinit clock_board_calc_nslots(struct clock_board *p) 36static int clock_board_calc_nslots(struct clock_board *p)
37{ 37{
38 u8 reg = upa_readb(p->clock_regs + CLOCK_STAT1) & 0xc0; 38 u8 reg = upa_readb(p->clock_regs + CLOCK_STAT1) & 0xc0;
39 39
@@ -60,7 +60,7 @@ static int __devinit clock_board_calc_nslots(struct clock_board *p)
60 } 60 }
61} 61}
62 62
63static int __devinit clock_board_probe(struct platform_device *op) 63static int clock_board_probe(struct platform_device *op)
64{ 64{
65 struct clock_board *p = kzalloc(sizeof(*p), GFP_KERNEL); 65 struct clock_board *p = kzalloc(sizeof(*p), GFP_KERNEL);
66 int err = -ENOMEM; 66 int err = -ENOMEM;
@@ -157,7 +157,7 @@ static struct platform_driver clock_board_driver = {
157 }, 157 },
158}; 158};
159 159
160static int __devinit fhc_probe(struct platform_device *op) 160static int fhc_probe(struct platform_device *op)
161{ 161{
162 struct fhc *p = kzalloc(sizeof(*p), GFP_KERNEL); 162 struct fhc *p = kzalloc(sizeof(*p), GFP_KERNEL);
163 int err = -ENOMEM; 163 int err = -ENOMEM;
diff --git a/arch/sparc/kernel/chmc.c b/arch/sparc/kernel/chmc.c
index 5f450260981d..dbb210d74e21 100644
--- a/arch/sparc/kernel/chmc.c
+++ b/arch/sparc/kernel/chmc.c
@@ -336,9 +336,9 @@ static int jbusmc_print_dimm(int syndrome_code,
336 return 0; 336 return 0;
337} 337}
338 338
339static u64 __devinit jbusmc_dimm_group_size(u64 base, 339static u64 jbusmc_dimm_group_size(u64 base,
340 const struct linux_prom64_registers *mem_regs, 340 const struct linux_prom64_registers *mem_regs,
341 int num_mem_regs) 341 int num_mem_regs)
342{ 342{
343 u64 max = base + (8UL * 1024 * 1024 * 1024); 343 u64 max = base + (8UL * 1024 * 1024 * 1024);
344 u64 max_seen = base; 344 u64 max_seen = base;
@@ -363,10 +363,10 @@ static u64 __devinit jbusmc_dimm_group_size(u64 base,
363 return max_seen - base; 363 return max_seen - base;
364} 364}
365 365
366static void __devinit jbusmc_construct_one_dimm_group(struct jbusmc *p, 366static void jbusmc_construct_one_dimm_group(struct jbusmc *p,
367 unsigned long index, 367 unsigned long index,
368 const struct linux_prom64_registers *mem_regs, 368 const struct linux_prom64_registers *mem_regs,
369 int num_mem_regs) 369 int num_mem_regs)
370{ 370{
371 struct jbusmc_dimm_group *dp = &p->dimm_groups[index]; 371 struct jbusmc_dimm_group *dp = &p->dimm_groups[index];
372 372
@@ -378,9 +378,9 @@ static void __devinit jbusmc_construct_one_dimm_group(struct jbusmc *p,
378 dp->size = jbusmc_dimm_group_size(dp->base_addr, mem_regs, num_mem_regs); 378 dp->size = jbusmc_dimm_group_size(dp->base_addr, mem_regs, num_mem_regs);
379} 379}
380 380
381static void __devinit jbusmc_construct_dimm_groups(struct jbusmc *p, 381static void jbusmc_construct_dimm_groups(struct jbusmc *p,
382 const struct linux_prom64_registers *mem_regs, 382 const struct linux_prom64_registers *mem_regs,
383 int num_mem_regs) 383 int num_mem_regs)
384{ 384{
385 if (p->mc_reg_1 & JB_MC_REG1_DIMM1_BANK0) { 385 if (p->mc_reg_1 & JB_MC_REG1_DIMM1_BANK0) {
386 jbusmc_construct_one_dimm_group(p, 0, mem_regs, num_mem_regs); 386 jbusmc_construct_one_dimm_group(p, 0, mem_regs, num_mem_regs);
@@ -392,7 +392,7 @@ static void __devinit jbusmc_construct_dimm_groups(struct jbusmc *p,
392 } 392 }
393} 393}
394 394
395static int __devinit jbusmc_probe(struct platform_device *op) 395static int jbusmc_probe(struct platform_device *op)
396{ 396{
397 const struct linux_prom64_registers *mem_regs; 397 const struct linux_prom64_registers *mem_regs;
398 struct device_node *mem_node; 398 struct device_node *mem_node;
@@ -689,7 +689,7 @@ static void chmc_fetch_decode_regs(struct chmc *p)
689 chmc_read_mcreg(p, CHMCTRL_DECODE4)); 689 chmc_read_mcreg(p, CHMCTRL_DECODE4));
690} 690}
691 691
692static int __devinit chmc_probe(struct platform_device *op) 692static int chmc_probe(struct platform_device *op)
693{ 693{
694 struct device_node *dp = op->dev.of_node; 694 struct device_node *dp = op->dev.of_node;
695 unsigned long ver; 695 unsigned long ver;
@@ -763,7 +763,7 @@ out_free:
763 goto out; 763 goto out;
764} 764}
765 765
766static int __devinit us3mc_probe(struct platform_device *op) 766static int us3mc_probe(struct platform_device *op)
767{ 767{
768 if (mc_type == MC_TYPE_SAFARI) 768 if (mc_type == MC_TYPE_SAFARI)
769 return chmc_probe(op); 769 return chmc_probe(op);
@@ -772,21 +772,21 @@ static int __devinit us3mc_probe(struct platform_device *op)
772 return -ENODEV; 772 return -ENODEV;
773} 773}
774 774
775static void __devexit chmc_destroy(struct platform_device *op, struct chmc *p) 775static void chmc_destroy(struct platform_device *op, struct chmc *p)
776{ 776{
777 list_del(&p->list); 777 list_del(&p->list);
778 of_iounmap(&op->resource[0], p->regs, 0x48); 778 of_iounmap(&op->resource[0], p->regs, 0x48);
779 kfree(p); 779 kfree(p);
780} 780}
781 781
782static void __devexit jbusmc_destroy(struct platform_device *op, struct jbusmc *p) 782static void jbusmc_destroy(struct platform_device *op, struct jbusmc *p)
783{ 783{
784 mc_list_del(&p->list); 784 mc_list_del(&p->list);
785 of_iounmap(&op->resource[0], p->regs, JBUSMC_REGS_SIZE); 785 of_iounmap(&op->resource[0], p->regs, JBUSMC_REGS_SIZE);
786 kfree(p); 786 kfree(p);
787} 787}
788 788
789static int __devexit us3mc_remove(struct platform_device *op) 789static int us3mc_remove(struct platform_device *op)
790{ 790{
791 void *p = dev_get_drvdata(&op->dev); 791 void *p = dev_get_drvdata(&op->dev);
792 792
@@ -814,7 +814,7 @@ static struct platform_driver us3mc_driver = {
814 .of_match_table = us3mc_match, 814 .of_match_table = us3mc_match,
815 }, 815 },
816 .probe = us3mc_probe, 816 .probe = us3mc_probe,
817 .remove = __devexit_p(us3mc_remove), 817 .remove = us3mc_remove,
818}; 818};
819 819
820static inline bool us3mc_platform(void) 820static inline bool us3mc_platform(void)
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c
index f09257c86107..75bb608c423e 100644
--- a/arch/sparc/kernel/ds.c
+++ b/arch/sparc/kernel/ds.c
@@ -29,7 +29,7 @@
29#define DRV_MODULE_VERSION "1.0" 29#define DRV_MODULE_VERSION "1.0"
30#define DRV_MODULE_RELDATE "Jul 11, 2007" 30#define DRV_MODULE_RELDATE "Jul 11, 2007"
31 31
32static char version[] __devinitdata = 32static char version[] =
33 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 33 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
34MODULE_AUTHOR("David S. Miller (davem@davemloft.net)"); 34MODULE_AUTHOR("David S. Miller (davem@davemloft.net)");
35MODULE_DESCRIPTION("Sun LDOM domain services driver"); 35MODULE_DESCRIPTION("Sun LDOM domain services driver");
@@ -1146,8 +1146,7 @@ static void ds_event(void *arg, int event)
1146 spin_unlock_irqrestore(&ds_lock, flags); 1146 spin_unlock_irqrestore(&ds_lock, flags);
1147} 1147}
1148 1148
1149static int __devinit ds_probe(struct vio_dev *vdev, 1149static int ds_probe(struct vio_dev *vdev, const struct vio_device_id *id)
1150 const struct vio_device_id *id)
1151{ 1150{
1152 static int ds_version_printed; 1151 static int ds_version_printed;
1153 struct ldc_channel_config ds_cfg = { 1152 struct ldc_channel_config ds_cfg = {
diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c
index 81d92fc9983b..9fcc6b4e93b3 100644
--- a/arch/sparc/kernel/ldc.c
+++ b/arch/sparc/kernel/ldc.c
@@ -27,7 +27,7 @@
27#define DRV_MODULE_VERSION "1.1" 27#define DRV_MODULE_VERSION "1.1"
28#define DRV_MODULE_RELDATE "July 22, 2008" 28#define DRV_MODULE_RELDATE "July 22, 2008"
29 29
30static char version[] __devinitdata = 30static char version[] =
31 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 31 DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
32#define LDC_PACKET_SIZE 64 32#define LDC_PACKET_SIZE 64
33 33
diff --git a/arch/sparc/kernel/leon_pci.c b/arch/sparc/kernel/leon_pci.c
index fc0521161568..852dc8430528 100644
--- a/arch/sparc/kernel/leon_pci.c
+++ b/arch/sparc/kernel/leon_pci.c
@@ -43,7 +43,7 @@ void leon_pci_init(struct platform_device *ofdev, struct leon_pci_info *info)
43 } 43 }
44} 44}
45 45
46void __devinit pcibios_fixup_bus(struct pci_bus *pbus) 46void pcibios_fixup_bus(struct pci_bus *pbus)
47{ 47{
48 struct pci_dev *dev; 48 struct pci_dev *dev;
49 int i, has_io, has_mem; 49 int i, has_io, has_mem;
diff --git a/arch/sparc/kernel/leon_pci_grpci2.c b/arch/sparc/kernel/leon_pci_grpci2.c
index b1bc38853a3d..fc4320886a3a 100644
--- a/arch/sparc/kernel/leon_pci_grpci2.c
+++ b/arch/sparc/kernel/leon_pci_grpci2.c
@@ -668,7 +668,7 @@ static irqreturn_t grpci2_err_interrupt(int irq, void *arg)
668 return IRQ_HANDLED; 668 return IRQ_HANDLED;
669} 669}
670 670
671static int __devinit grpci2_of_probe(struct platform_device *ofdev) 671static int grpci2_of_probe(struct platform_device *ofdev)
672{ 672{
673 struct grpci2_regs *regs; 673 struct grpci2_regs *regs;
674 struct grpci2_priv *priv; 674 struct grpci2_priv *priv;
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 75b31bcdeadf..04bacce76fe6 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -356,7 +356,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
356 return dev; 356 return dev;
357} 357}
358 358
359static void __devinit apb_calc_first_last(u8 map, u32 *first_p, u32 *last_p) 359static void apb_calc_first_last(u8 map, u32 *first_p, u32 *last_p)
360{ 360{
361 u32 idx, first, last; 361 u32 idx, first, last;
362 362
@@ -378,9 +378,8 @@ static void __devinit apb_calc_first_last(u8 map, u32 *first_p, u32 *last_p)
378/* Cook up fake bus resources for SUNW,simba PCI bridges which lack 378/* Cook up fake bus resources for SUNW,simba PCI bridges which lack
379 * a proper 'ranges' property. 379 * a proper 'ranges' property.
380 */ 380 */
381static void __devinit apb_fake_ranges(struct pci_dev *dev, 381static void apb_fake_ranges(struct pci_dev *dev, struct pci_bus *bus,
382 struct pci_bus *bus, 382 struct pci_pbm_info *pbm)
383 struct pci_pbm_info *pbm)
384{ 383{
385 struct pci_bus_region region; 384 struct pci_bus_region region;
386 struct resource *res; 385 struct resource *res;
@@ -404,15 +403,13 @@ static void __devinit apb_fake_ranges(struct pci_dev *dev,
404 pcibios_bus_to_resource(dev, res, &region); 403 pcibios_bus_to_resource(dev, res, &region);
405} 404}
406 405
407static void __devinit pci_of_scan_bus(struct pci_pbm_info *pbm, 406static void pci_of_scan_bus(struct pci_pbm_info *pbm, struct device_node *node,
408 struct device_node *node, 407 struct pci_bus *bus);
409 struct pci_bus *bus);
410 408
411#define GET_64BIT(prop, i) ((((u64) (prop)[(i)]) << 32) | (prop)[(i)+1]) 409#define GET_64BIT(prop, i) ((((u64) (prop)[(i)]) << 32) | (prop)[(i)+1])
412 410
413static void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm, 411static void of_scan_pci_bridge(struct pci_pbm_info *pbm,
414 struct device_node *node, 412 struct device_node *node, struct pci_dev *dev)
415 struct pci_dev *dev)
416{ 413{
417 struct pci_bus *bus; 414 struct pci_bus *bus;
418 const u32 *busrange, *ranges; 415 const u32 *busrange, *ranges;
@@ -503,9 +500,8 @@ after_ranges:
503 pci_of_scan_bus(pbm, node, bus); 500 pci_of_scan_bus(pbm, node, bus);
504} 501}
505 502
506static void __devinit pci_of_scan_bus(struct pci_pbm_info *pbm, 503static void pci_of_scan_bus(struct pci_pbm_info *pbm, struct device_node *node,
507 struct device_node *node, 504 struct pci_bus *bus)
508 struct pci_bus *bus)
509{ 505{
510 struct device_node *child; 506 struct device_node *child;
511 const u32 *reg; 507 const u32 *reg;
@@ -564,7 +560,7 @@ show_pciobppath_attr(struct device * dev, struct device_attribute * attr, char *
564 560
565static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH, show_pciobppath_attr, NULL); 561static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH, show_pciobppath_attr, NULL);
566 562
567static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus) 563static void pci_bus_register_of_sysfs(struct pci_bus *bus)
568{ 564{
569 struct pci_dev *dev; 565 struct pci_dev *dev;
570 struct pci_bus *child_bus; 566 struct pci_bus *child_bus;
@@ -585,8 +581,8 @@ static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus)
585 pci_bus_register_of_sysfs(child_bus); 581 pci_bus_register_of_sysfs(child_bus);
586} 582}
587 583
588struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm, 584struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm,
589 struct device *parent) 585 struct device *parent)
590{ 586{
591 LIST_HEAD(resources); 587 LIST_HEAD(resources);
592 struct device_node *node = pbm->op->dev.of_node; 588 struct device_node *node = pbm->op->dev.of_node;
@@ -618,7 +614,7 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm,
618 return bus; 614 return bus;
619} 615}
620 616
621void __devinit pcibios_fixup_bus(struct pci_bus *pbus) 617void pcibios_fixup_bus(struct pci_bus *pbus)
622{ 618{
623} 619}
624 620
@@ -949,8 +945,7 @@ static int __init pcibios_init(void)
949subsys_initcall(pcibios_init); 945subsys_initcall(pcibios_init);
950 946
951#ifdef CONFIG_SYSFS 947#ifdef CONFIG_SYSFS
952static void __devinit pci_bus_slot_names(struct device_node *node, 948static void pci_bus_slot_names(struct device_node *node, struct pci_bus *bus)
953 struct pci_bus *bus)
954{ 949{
955 const struct pci_slot_names { 950 const struct pci_slot_names {
956 u32 slot_mask; 951 u32 slot_mask;
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c
index 188f935276fd..e60fc6a67e9b 100644
--- a/arch/sparc/kernel/pci_fire.c
+++ b/arch/sparc/kernel/pci_fire.c
@@ -408,8 +408,8 @@ static void pci_fire_hw_init(struct pci_pbm_info *pbm)
408 upa_writeq(~(u64)0, pbm->pbm_regs + FIRE_PEC_IENAB); 408 upa_writeq(~(u64)0, pbm->pbm_regs + FIRE_PEC_IENAB);
409} 409}
410 410
411static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm, 411static int pci_fire_pbm_init(struct pci_pbm_info *pbm,
412 struct platform_device *op, u32 portid) 412 struct platform_device *op, u32 portid)
413{ 413{
414 const struct linux_prom64_registers *regs; 414 const struct linux_prom64_registers *regs;
415 struct device_node *dp = op->dev.of_node; 415 struct device_node *dp = op->dev.of_node;
@@ -454,7 +454,7 @@ static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm,
454 return 0; 454 return 0;
455} 455}
456 456
457static int __devinit fire_probe(struct platform_device *op) 457static int fire_probe(struct platform_device *op)
458{ 458{
459 struct device_node *dp = op->dev.of_node; 459 struct device_node *dp = op->dev.of_node;
460 struct pci_pbm_info *pbm; 460 struct pci_pbm_info *pbm;
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c
index f4d29e15ce71..b85238289717 100644
--- a/arch/sparc/kernel/pci_psycho.c
+++ b/arch/sparc/kernel/pci_psycho.c
@@ -366,8 +366,7 @@ static void pbm_config_busmastering(struct pci_pbm_info *pbm)
366 pci_config_write8(addr, 64); 366 pci_config_write8(addr, 64);
367} 367}
368 368
369static void __devinit psycho_scan_bus(struct pci_pbm_info *pbm, 369static void psycho_scan_bus(struct pci_pbm_info *pbm, struct device *parent)
370 struct device *parent)
371{ 370{
372 pbm_config_busmastering(pbm); 371 pbm_config_busmastering(pbm);
373 pbm->is_66mhz_capable = 0; 372 pbm->is_66mhz_capable = 0;
@@ -483,15 +482,15 @@ static void psycho_pbm_strbuf_init(struct pci_pbm_info *pbm,
483#define PSYCHO_MEMSPACE_B 0x180000000UL 482#define PSYCHO_MEMSPACE_B 0x180000000UL
484#define PSYCHO_MEMSPACE_SIZE 0x07fffffffUL 483#define PSYCHO_MEMSPACE_SIZE 0x07fffffffUL
485 484
486static void __devinit psycho_pbm_init(struct pci_pbm_info *pbm, 485static void psycho_pbm_init(struct pci_pbm_info *pbm,
487 struct platform_device *op, int is_pbm_a) 486 struct platform_device *op, int is_pbm_a)
488{ 487{
489 psycho_pbm_init_common(pbm, op, "PSYCHO", PBM_CHIP_TYPE_PSYCHO); 488 psycho_pbm_init_common(pbm, op, "PSYCHO", PBM_CHIP_TYPE_PSYCHO);
490 psycho_pbm_strbuf_init(pbm, is_pbm_a); 489 psycho_pbm_strbuf_init(pbm, is_pbm_a);
491 psycho_scan_bus(pbm, &op->dev); 490 psycho_scan_bus(pbm, &op->dev);
492} 491}
493 492
494static struct pci_pbm_info * __devinit psycho_find_sibling(u32 upa_portid) 493static struct pci_pbm_info *psycho_find_sibling(u32 upa_portid)
495{ 494{
496 struct pci_pbm_info *pbm; 495 struct pci_pbm_info *pbm;
497 496
@@ -504,7 +503,7 @@ static struct pci_pbm_info * __devinit psycho_find_sibling(u32 upa_portid)
504 503
505#define PSYCHO_CONFIGSPACE 0x001000000UL 504#define PSYCHO_CONFIGSPACE 0x001000000UL
506 505
507static int __devinit psycho_probe(struct platform_device *op) 506static int psycho_probe(struct platform_device *op)
508{ 507{
509 const struct linux_prom64_registers *pr_regs; 508 const struct linux_prom64_registers *pr_regs;
510 struct device_node *dp = op->dev.of_node; 509 struct device_node *dp = op->dev.of_node;
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c
index 3efaa4644d60..531186d7c9ab 100644
--- a/arch/sparc/kernel/pci_sabre.c
+++ b/arch/sparc/kernel/pci_sabre.c
@@ -403,8 +403,7 @@ static void apb_init(struct pci_bus *sabre_bus)
403 } 403 }
404} 404}
405 405
406static void __devinit sabre_scan_bus(struct pci_pbm_info *pbm, 406static void sabre_scan_bus(struct pci_pbm_info *pbm, struct device *parent)
407 struct device *parent)
408{ 407{
409 static int once; 408 static int once;
410 409
@@ -443,8 +442,7 @@ static void __devinit sabre_scan_bus(struct pci_pbm_info *pbm,
443 sabre_register_error_handlers(pbm); 442 sabre_register_error_handlers(pbm);
444} 443}
445 444
446static void __devinit sabre_pbm_init(struct pci_pbm_info *pbm, 445static void sabre_pbm_init(struct pci_pbm_info *pbm, struct platform_device *op)
447 struct platform_device *op)
448{ 446{
449 psycho_pbm_init_common(pbm, op, "SABRE", PBM_CHIP_TYPE_SABRE); 447 psycho_pbm_init_common(pbm, op, "SABRE", PBM_CHIP_TYPE_SABRE);
450 pbm->pci_afsr = pbm->controller_regs + SABRE_PIOAFSR; 448 pbm->pci_afsr = pbm->controller_regs + SABRE_PIOAFSR;
@@ -454,7 +452,7 @@ static void __devinit sabre_pbm_init(struct pci_pbm_info *pbm,
454} 452}
455 453
456static const struct of_device_id sabre_match[]; 454static const struct of_device_id sabre_match[];
457static int __devinit sabre_probe(struct platform_device *op) 455static int sabre_probe(struct platform_device *op)
458{ 456{
459 const struct of_device_id *match; 457 const struct of_device_id *match;
460 const struct linux_prom64_registers *pr_regs; 458 const struct linux_prom64_registers *pr_regs;
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c
index 13d4aa20b5a5..29e888158ae6 100644
--- a/arch/sparc/kernel/pci_schizo.c
+++ b/arch/sparc/kernel/pci_schizo.c
@@ -1064,8 +1064,7 @@ static void pbm_config_busmastering(struct pci_pbm_info *pbm)
1064 pci_config_write8(addr, 64); 1064 pci_config_write8(addr, 64);
1065} 1065}
1066 1066
1067static void __devinit schizo_scan_bus(struct pci_pbm_info *pbm, 1067static void schizo_scan_bus(struct pci_pbm_info *pbm, struct device *parent)
1068 struct device *parent)
1069{ 1068{
1070 pbm_config_busmastering(pbm); 1069 pbm_config_busmastering(pbm);
1071 pbm->is_66mhz_capable = 1070 pbm->is_66mhz_capable =
@@ -1307,9 +1306,8 @@ static void schizo_pbm_hw_init(struct pci_pbm_info *pbm)
1307 } 1306 }
1308} 1307}
1309 1308
1310static int __devinit schizo_pbm_init(struct pci_pbm_info *pbm, 1309static int schizo_pbm_init(struct pci_pbm_info *pbm, struct platform_device *op,
1311 struct platform_device *op, u32 portid, 1310 u32 portid, int chip_type)
1312 int chip_type)
1313{ 1311{
1314 const struct linux_prom64_registers *regs; 1312 const struct linux_prom64_registers *regs;
1315 struct device_node *dp = op->dev.of_node; 1313 struct device_node *dp = op->dev.of_node;
@@ -1400,8 +1398,7 @@ static inline int portid_compare(u32 x, u32 y, int chip_type)
1400 return (x == y); 1398 return (x == y);
1401} 1399}
1402 1400
1403static struct pci_pbm_info * __devinit schizo_find_sibling(u32 portid, 1401static struct pci_pbm_info *schizo_find_sibling(u32 portid, int chip_type)
1404 int chip_type)
1405{ 1402{
1406 struct pci_pbm_info *pbm; 1403 struct pci_pbm_info *pbm;
1407 1404
@@ -1412,7 +1409,7 @@ static struct pci_pbm_info * __devinit schizo_find_sibling(u32 portid,
1412 return NULL; 1409 return NULL;
1413} 1410}
1414 1411
1415static int __devinit __schizo_init(struct platform_device *op, unsigned long chip_type) 1412static int __schizo_init(struct platform_device *op, unsigned long chip_type)
1416{ 1413{
1417 struct device_node *dp = op->dev.of_node; 1414 struct device_node *dp = op->dev.of_node;
1418 struct pci_pbm_info *pbm; 1415 struct pci_pbm_info *pbm;
@@ -1460,7 +1457,7 @@ out_err:
1460} 1457}
1461 1458
1462static const struct of_device_id schizo_match[]; 1459static const struct of_device_id schizo_match[];
1463static int __devinit schizo_probe(struct platform_device *op) 1460static int schizo_probe(struct platform_device *op)
1464{ 1461{
1465 const struct of_device_id *match; 1462 const struct of_device_id *match;
1466 1463
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c
index 051b69caeffd..d07f6b29aed8 100644
--- a/arch/sparc/kernel/pci_sun4v.c
+++ b/arch/sparc/kernel/pci_sun4v.c
@@ -536,8 +536,7 @@ static struct dma_map_ops sun4v_dma_ops = {
536 .unmap_sg = dma_4v_unmap_sg, 536 .unmap_sg = dma_4v_unmap_sg,
537}; 537};
538 538
539static void __devinit pci_sun4v_scan_bus(struct pci_pbm_info *pbm, 539static void pci_sun4v_scan_bus(struct pci_pbm_info *pbm, struct device *parent)
540 struct device *parent)
541{ 540{
542 struct property *prop; 541 struct property *prop;
543 struct device_node *dp; 542 struct device_node *dp;
@@ -550,8 +549,8 @@ static void __devinit pci_sun4v_scan_bus(struct pci_pbm_info *pbm,
550 /* XXX register error interrupt handlers XXX */ 549 /* XXX register error interrupt handlers XXX */
551} 550}
552 551
553static unsigned long __devinit probe_existing_entries(struct pci_pbm_info *pbm, 552static unsigned long probe_existing_entries(struct pci_pbm_info *pbm,
554 struct iommu *iommu) 553 struct iommu *iommu)
555{ 554{
556 struct iommu_arena *arena = &iommu->arena; 555 struct iommu_arena *arena = &iommu->arena;
557 unsigned long i, cnt = 0; 556 unsigned long i, cnt = 0;
@@ -578,7 +577,7 @@ static unsigned long __devinit probe_existing_entries(struct pci_pbm_info *pbm,
578 return cnt; 577 return cnt;
579} 578}
580 579
581static int __devinit pci_sun4v_iommu_init(struct pci_pbm_info *pbm) 580static int pci_sun4v_iommu_init(struct pci_pbm_info *pbm)
582{ 581{
583 static const u32 vdma_default[] = { 0x80000000, 0x80000000 }; 582 static const u32 vdma_default[] = { 0x80000000, 0x80000000 };
584 struct iommu *iommu = pbm->iommu; 583 struct iommu *iommu = pbm->iommu;
@@ -879,8 +878,8 @@ static void pci_sun4v_msi_init(struct pci_pbm_info *pbm)
879} 878}
880#endif /* !(CONFIG_PCI_MSI) */ 879#endif /* !(CONFIG_PCI_MSI) */
881 880
882static int __devinit pci_sun4v_pbm_init(struct pci_pbm_info *pbm, 881static int pci_sun4v_pbm_init(struct pci_pbm_info *pbm,
883 struct platform_device *op, u32 devhandle) 882 struct platform_device *op, u32 devhandle)
884{ 883{
885 struct device_node *dp = op->dev.of_node; 884 struct device_node *dp = op->dev.of_node;
886 int err; 885 int err;
@@ -919,7 +918,7 @@ static int __devinit pci_sun4v_pbm_init(struct pci_pbm_info *pbm,
919 return 0; 918 return 0;
920} 919}
921 920
922static int __devinit pci_sun4v_probe(struct platform_device *op) 921static int pci_sun4v_probe(struct platform_device *op)
923{ 922{
924 const struct linux_prom64_registers *regs; 923 const struct linux_prom64_registers *regs;
925 static int hvapi_negotiated = 0; 924 static int hvapi_negotiated = 0;
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c
index 521fdf1b20e5..09f4fdd8d808 100644
--- a/arch/sparc/kernel/pcic.c
+++ b/arch/sparc/kernel/pcic.c
@@ -439,8 +439,7 @@ int pcic_present(void)
439 return pcic0_up; 439 return pcic0_up;
440} 440}
441 441
442static int __devinit pdev_to_pnode(struct linux_pbm_info *pbm, 442static int pdev_to_pnode(struct linux_pbm_info *pbm, struct pci_dev *pdev)
443 struct pci_dev *pdev)
444{ 443{
445 struct linux_prom_pci_registers regs[PROMREG_MAX]; 444 struct linux_prom_pci_registers regs[PROMREG_MAX];
446 int err; 445 int err;
@@ -595,7 +594,7 @@ pcic_fill_irq(struct linux_pcic *pcic, struct pci_dev *dev, int node)
595/* 594/*
596 * Normally called from {do_}pci_scan_bus... 595 * Normally called from {do_}pci_scan_bus...
597 */ 596 */
598void __devinit pcibios_fixup_bus(struct pci_bus *bus) 597void pcibios_fixup_bus(struct pci_bus *bus)
599{ 598{
600 struct pci_dev *dev; 599 struct pci_dev *dev;
601 int i, has_io, has_mem; 600 int i, has_io, has_mem;
diff --git a/arch/sparc/kernel/pmc.c b/arch/sparc/kernel/pmc.c
index 0e3202239ff5..dcbb62f63068 100644
--- a/arch/sparc/kernel/pmc.c
+++ b/arch/sparc/kernel/pmc.c
@@ -52,7 +52,7 @@ static void pmc_swift_idle(void)
52#endif 52#endif
53} 53}
54 54
55static int __devinit pmc_probe(struct platform_device *op) 55static int pmc_probe(struct platform_device *op)
56{ 56{
57 regs = of_ioremap(&op->resource[0], 0, 57 regs = of_ioremap(&op->resource[0], 0,
58 resource_size(&op->resource[0]), PMC_OBPNAME); 58 resource_size(&op->resource[0]), PMC_OBPNAME);
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c
index 0d39075063b2..4cb23c41553f 100644
--- a/arch/sparc/kernel/power.c
+++ b/arch/sparc/kernel/power.c
@@ -23,7 +23,7 @@ static irqreturn_t power_handler(int irq, void *dev_id)
23 return IRQ_HANDLED; 23 return IRQ_HANDLED;
24} 24}
25 25
26static int __devinit has_button_interrupt(unsigned int irq, struct device_node *dp) 26static int has_button_interrupt(unsigned int irq, struct device_node *dp)
27{ 27{
28 if (irq == 0xffffffff) 28 if (irq == 0xffffffff)
29 return 0; 29 return 0;
@@ -33,7 +33,7 @@ static int __devinit has_button_interrupt(unsigned int irq, struct device_node *
33 return 1; 33 return 1;
34} 34}
35 35
36static int __devinit power_probe(struct platform_device *op) 36static int power_probe(struct platform_device *op)
37{ 37{
38 struct resource *res = &op->resource[0]; 38 struct resource *res = &op->resource[0];
39 unsigned int irq = op->archdata.irqs[0]; 39 unsigned int irq = op->archdata.irqs[0];
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
index d94b878577b7..537eb66abd06 100644
--- a/arch/sparc/kernel/smp_64.c
+++ b/arch/sparc/kernel/smp_64.c
@@ -1180,7 +1180,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
1180{ 1180{
1181} 1181}
1182 1182
1183void __devinit smp_prepare_boot_cpu(void) 1183void smp_prepare_boot_cpu(void)
1184{ 1184{
1185} 1185}
1186 1186
@@ -1194,7 +1194,7 @@ void __init smp_setup_processor_id(void)
1194 xcall_deliver_impl = hypervisor_xcall_deliver; 1194 xcall_deliver_impl = hypervisor_xcall_deliver;
1195} 1195}
1196 1196
1197void __devinit smp_fill_in_sib_core_maps(void) 1197void smp_fill_in_sib_core_maps(void)
1198{ 1198{
1199 unsigned int i; 1199 unsigned int i;
1200 1200
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c
index 953641549e82..c4c27b0f9063 100644
--- a/arch/sparc/kernel/time_32.c
+++ b/arch/sparc/kernel/time_32.c
@@ -278,7 +278,7 @@ static struct platform_device m48t59_rtc = {
278 }, 278 },
279}; 279};
280 280
281static int __devinit clock_probe(struct platform_device *op) 281static int clock_probe(struct platform_device *op)
282{ 282{
283 struct device_node *dp = op->dev.of_node; 283 struct device_node *dp = op->dev.of_node;
284 const char *model = of_get_property(dp, "model", NULL); 284 const char *model = of_get_property(dp, "model", NULL);
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c
index e861072b9c52..c3d82b5f54ca 100644
--- a/arch/sparc/kernel/time_64.c
+++ b/arch/sparc/kernel/time_64.c
@@ -419,7 +419,7 @@ static struct platform_device rtc_cmos_device = {
419 .num_resources = 1, 419 .num_resources = 1,
420}; 420};
421 421
422static int __devinit rtc_probe(struct platform_device *op) 422static int rtc_probe(struct platform_device *op)
423{ 423{
424 struct resource *r; 424 struct resource *r;
425 425
@@ -477,7 +477,7 @@ static struct platform_device rtc_bq4802_device = {
477 .num_resources = 1, 477 .num_resources = 1,
478}; 478};
479 479
480static int __devinit bq4802_probe(struct platform_device *op) 480static int bq4802_probe(struct platform_device *op)
481{ 481{
482 482
483 printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n", 483 printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n",
@@ -534,7 +534,7 @@ static struct platform_device m48t59_rtc = {
534 }, 534 },
535}; 535};
536 536
537static int __devinit mostek_probe(struct platform_device *op) 537static int mostek_probe(struct platform_device *op)
538{ 538{
539 struct device_node *dp = op->dev.of_node; 539 struct device_node *dp = op->dev.of_node;
540 540
@@ -746,7 +746,7 @@ void __irq_entry timer_interrupt(int irq, struct pt_regs *regs)
746 set_irq_regs(old_regs); 746 set_irq_regs(old_regs);
747} 747}
748 748
749void __devinit setup_sparc64_timer(void) 749void setup_sparc64_timer(void)
750{ 750{
751 struct clock_event_device *sevt; 751 struct clock_event_device *sevt;
752 unsigned long pstate; 752 unsigned long pstate;
@@ -844,7 +844,7 @@ unsigned long long sched_clock(void)
844 >> SPARC64_NSEC_PER_CYC_SHIFT; 844 >> SPARC64_NSEC_PER_CYC_SHIFT;
845} 845}
846 846
847int __devinit read_current_timer(unsigned long *timer_val) 847int read_current_timer(unsigned long *timer_val)
848{ 848{
849 *timer_val = tick_ops->get_tick(); 849 *timer_val = tick_ops->get_tick();
850 return 0; 850 return 0;
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 85be1ca539b2..c3b72423c846 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -87,8 +87,8 @@ static unsigned long cpu_pgsz_mask;
87 87
88#define MAX_BANKS 32 88#define MAX_BANKS 32
89 89
90static struct linux_prom64_registers pavail[MAX_BANKS] __devinitdata; 90static struct linux_prom64_registers pavail[MAX_BANKS];
91static int pavail_ents __devinitdata; 91static int pavail_ents;
92 92
93static int cmp_p64(const void *a, const void *b) 93static int cmp_p64(const void *a, const void *b)
94{ 94{
@@ -1931,7 +1931,7 @@ void __init paging_init(void)
1931 printk("Booting Linux...\n"); 1931 printk("Booting Linux...\n");
1932} 1932}
1933 1933
1934int __devinit page_in_phys_avail(unsigned long paddr) 1934int page_in_phys_avail(unsigned long paddr)
1935{ 1935{
1936 int i; 1936 int i;
1937 1937
diff --git a/arch/tile/include/asm/pci.h b/arch/tile/include/asm/pci.h
index 302cdf71ceed..54a924208d3c 100644
--- a/arch/tile/include/asm/pci.h
+++ b/arch/tile/include/asm/pci.h
@@ -188,7 +188,7 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
188int __init tile_pci_init(void); 188int __init tile_pci_init(void);
189int __init pcibios_init(void); 189int __init pcibios_init(void);
190 190
191void __devinit pcibios_fixup_bus(struct pci_bus *bus); 191void pcibios_fixup_bus(struct pci_bus *bus);
192 192
193#define pci_domain_nr(bus) (((struct pci_controller *)(bus)->sysdata)->index) 193#define pci_domain_nr(bus) (((struct pci_controller *)(bus)->sysdata)->index)
194 194
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c
index aac1cd586966..67237d34c2e2 100644
--- a/arch/tile/kernel/pci.c
+++ b/arch/tile/kernel/pci.c
@@ -81,7 +81,7 @@ EXPORT_SYMBOL(pcibios_align_resource);
81 * controller_id is the controller number, config type is 0 or 1 for 81 * controller_id is the controller number, config type is 0 or 1 for
82 * config0 or config1 operations. 82 * config0 or config1 operations.
83 */ 83 */
84static int __devinit tile_pcie_open(int controller_id, int config_type) 84static int tile_pcie_open(int controller_id, int config_type)
85{ 85{
86 char filename[32]; 86 char filename[32];
87 int fd; 87 int fd;
@@ -97,8 +97,7 @@ static int __devinit tile_pcie_open(int controller_id, int config_type)
97/* 97/*
98 * Get the IRQ numbers from the HV and set up the handlers for them. 98 * Get the IRQ numbers from the HV and set up the handlers for them.
99 */ 99 */
100static int __devinit tile_init_irqs(int controller_id, 100static int tile_init_irqs(int controller_id, struct pci_controller *controller)
101 struct pci_controller *controller)
102{ 101{
103 char filename[32]; 102 char filename[32];
104 int fd; 103 int fd;
@@ -237,7 +236,7 @@ static int tile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
237} 236}
238 237
239 238
240static void __devinit fixup_read_and_payload_sizes(void) 239static void fixup_read_and_payload_sizes(void)
241{ 240{
242 struct pci_dev *dev = NULL; 241 struct pci_dev *dev = NULL;
243 int smallest_max_payload = 0x1; /* Tile maxes out at 256 bytes. */ 242 int smallest_max_payload = 0x1; /* Tile maxes out at 256 bytes. */
@@ -379,7 +378,7 @@ subsys_initcall(pcibios_init);
379/* 378/*
380 * No bus fixups needed. 379 * No bus fixups needed.
381 */ 380 */
382void __devinit pcibios_fixup_bus(struct pci_bus *bus) 381void pcibios_fixup_bus(struct pci_bus *bus)
383{ 382{
384 /* Nothing needs to be done. */ 383 /* Nothing needs to be done. */
385} 384}
@@ -458,11 +457,8 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
458 * specified bus & slot. 457 * specified bus & slot.
459 */ 458 */
460 459
461static int __devinit tile_cfg_read(struct pci_bus *bus, 460static int tile_cfg_read(struct pci_bus *bus, unsigned int devfn, int offset,
462 unsigned int devfn, 461 int size, u32 *val)
463 int offset,
464 int size,
465 u32 *val)
466{ 462{
467 struct pci_controller *controller = bus->sysdata; 463 struct pci_controller *controller = bus->sysdata;
468 int busnum = bus->number & 0xff; 464 int busnum = bus->number & 0xff;
@@ -504,11 +500,8 @@ static int __devinit tile_cfg_read(struct pci_bus *bus,
504 * See tile_cfg_read() for relevant comments. 500 * See tile_cfg_read() for relevant comments.
505 * Note that "val" is the value to write, not a pointer to that value. 501 * Note that "val" is the value to write, not a pointer to that value.
506 */ 502 */
507static int __devinit tile_cfg_write(struct pci_bus *bus, 503static int tile_cfg_write(struct pci_bus *bus, unsigned int devfn, int offset,
508 unsigned int devfn, 504 int size, u32 val)
509 int offset,
510 int size,
511 u32 val)
512{ 505{
513 struct pci_controller *controller = bus->sysdata; 506 struct pci_controller *controller = bus->sysdata;
514 int busnum = bus->number & 0xff; 507 int busnum = bus->number & 0xff;
diff --git a/arch/tile/kernel/pci_gx.c b/arch/tile/kernel/pci_gx.c
index 94810d4a6332..11425633b2d7 100644
--- a/arch/tile/kernel/pci_gx.c
+++ b/arch/tile/kernel/pci_gx.c
@@ -58,10 +58,10 @@
58#define TRACE_CFG_RD(...) 58#define TRACE_CFG_RD(...)
59#endif 59#endif
60 60
61static int __devinitdata pci_probe = 1; 61static int pci_probe = 1;
62 62
63/* Information on the PCIe RC ports configuration. */ 63/* Information on the PCIe RC ports configuration. */
64static int __devinitdata pcie_rc[TILEGX_NUM_TRIO][TILEGX_TRIO_PCIES]; 64static int pcie_rc[TILEGX_NUM_TRIO][TILEGX_TRIO_PCIES];
65 65
66/* 66/*
67 * On some platforms with one or more Gx endpoint ports, we need to 67 * On some platforms with one or more Gx endpoint ports, we need to
@@ -72,7 +72,7 @@ static int __devinitdata pcie_rc[TILEGX_NUM_TRIO][TILEGX_TRIO_PCIES];
72 * the delay in seconds. If the delay is not provided, the value 72 * the delay in seconds. If the delay is not provided, the value
73 * will be DEFAULT_RC_DELAY. 73 * will be DEFAULT_RC_DELAY.
74 */ 74 */
75static int __devinitdata rc_delay[TILEGX_NUM_TRIO][TILEGX_TRIO_PCIES]; 75static int rc_delay[TILEGX_NUM_TRIO][TILEGX_TRIO_PCIES];
76 76
77/* Default number of seconds that the PCIe RC port probe can be delayed. */ 77/* Default number of seconds that the PCIe RC port probe can be delayed. */
78#define DEFAULT_RC_DELAY 10 78#define DEFAULT_RC_DELAY 10
@@ -137,7 +137,7 @@ static int tile_irq_cpu(int irq)
137/* 137/*
138 * Open a file descriptor to the TRIO shim. 138 * Open a file descriptor to the TRIO shim.
139 */ 139 */
140static int __devinit tile_pcie_open(int trio_index) 140static int tile_pcie_open(int trio_index)
141{ 141{
142 gxio_trio_context_t *context = &trio_contexts[trio_index]; 142 gxio_trio_context_t *context = &trio_contexts[trio_index];
143 int ret; 143 int ret;
@@ -265,7 +265,7 @@ trio_handle_level_irq(unsigned int irq, struct irq_desc *desc)
265 * Create kernel irqs and set up the handlers for the legacy interrupts. 265 * Create kernel irqs and set up the handlers for the legacy interrupts.
266 * Also some minimum initialization for the MSI support. 266 * Also some minimum initialization for the MSI support.
267 */ 267 */
268static int __devinit tile_init_irqs(struct pci_controller *controller) 268static int tile_init_irqs(struct pci_controller *controller)
269{ 269{
270 int i; 270 int i;
271 int j; 271 int j;
@@ -459,8 +459,7 @@ static int tile_map_irq(const struct pci_dev *dev, u8 device, u8 pin)
459} 459}
460 460
461 461
462static void __devinit fixup_read_and_payload_sizes(struct pci_controller * 462static void fixup_read_and_payload_sizes(struct pci_controller *controller)
463 controller)
464{ 463{
465 gxio_trio_context_t *trio_context = controller->trio; 464 gxio_trio_context_t *trio_context = controller->trio;
466 struct pci_bus *root_bus = controller->root_bus; 465 struct pci_bus *root_bus = controller->root_bus;
@@ -541,7 +540,7 @@ static void __devinit fixup_read_and_payload_sizes(struct pci_controller *
541 } 540 }
542} 541}
543 542
544static int __devinit setup_pcie_rc_delay(char *str) 543static int setup_pcie_rc_delay(char *str)
545{ 544{
546 unsigned long delay = 0; 545 unsigned long delay = 0;
547 unsigned long trio_index; 546 unsigned long trio_index;
@@ -1016,7 +1015,7 @@ alloc_mem_map_failed:
1016subsys_initcall(pcibios_init); 1015subsys_initcall(pcibios_init);
1017 1016
1018/* Note: to be deleted after Linux 3.6 merge. */ 1017/* Note: to be deleted after Linux 3.6 merge. */
1019void __devinit pcibios_fixup_bus(struct pci_bus *bus) 1018void pcibios_fixup_bus(struct pci_bus *bus)
1020{ 1019{
1021} 1020}
1022 1021
@@ -1024,7 +1023,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
1024 * This can be called from the generic PCI layer, but doesn't need to 1023 * This can be called from the generic PCI layer, but doesn't need to
1025 * do anything. 1024 * do anything.
1026 */ 1025 */
1027char __devinit *pcibios_setup(char *str) 1026char *pcibios_setup(char *str)
1028{ 1027{
1029 if (!strcmp(str, "off")) { 1028 if (!strcmp(str, "off")) {
1030 pci_probe = 0; 1029 pci_probe = 0;
@@ -1143,11 +1142,8 @@ EXPORT_SYMBOL(pci_iounmap);
1143 * specified bus & device. 1142 * specified bus & device.
1144 */ 1143 */
1145 1144
1146static int __devinit tile_cfg_read(struct pci_bus *bus, 1145static int tile_cfg_read(struct pci_bus *bus, unsigned int devfn, int offset,
1147 unsigned int devfn, 1146 int size, u32 *val)
1148 int offset,
1149 int size,
1150 u32 *val)
1151{ 1147{
1152 struct pci_controller *controller = bus->sysdata; 1148 struct pci_controller *controller = bus->sysdata;
1153 gxio_trio_context_t *trio_context = controller->trio; 1149 gxio_trio_context_t *trio_context = controller->trio;
@@ -1271,11 +1267,8 @@ invalid_device:
1271 * See tile_cfg_read() for relevent comments. 1267 * See tile_cfg_read() for relevent comments.
1272 * Note that "val" is the value to write, not a pointer to that value. 1268 * Note that "val" is the value to write, not a pointer to that value.
1273 */ 1269 */
1274static int __devinit tile_cfg_write(struct pci_bus *bus, 1270static int tile_cfg_write(struct pci_bus *bus, unsigned int devfn, int offset,
1275 unsigned int devfn, 1271 int size, u32 val)
1276 int offset,
1277 int size,
1278 u32 val)
1279{ 1272{
1280 struct pci_controller *controller = bus->sysdata; 1273 struct pci_controller *controller = bus->sysdata;
1281 gxio_trio_context_t *trio_context = controller->trio; 1274 gxio_trio_context_t *trio_context = controller->trio;
diff --git a/arch/unicore32/kernel/pci.c b/arch/unicore32/kernel/pci.c
index 7c4359240b81..ef69c0c82825 100644
--- a/arch/unicore32/kernel/pci.c
+++ b/arch/unicore32/kernel/pci.c
@@ -167,7 +167,7 @@ static inline int pdev_bad_for_parity(struct pci_dev *dev)
167 * pcibios_fixup_bus - Called after each bus is probed, 167 * pcibios_fixup_bus - Called after each bus is probed,
168 * but before its children are examined. 168 * but before its children are examined.
169 */ 169 */
170void __devinit pcibios_fixup_bus(struct pci_bus *bus) 170void pcibios_fixup_bus(struct pci_bus *bus)
171{ 171{
172 struct pci_dev *dev; 172 struct pci_dev *dev;
173 u16 features = PCI_COMMAND_SERR 173 u16 features = PCI_COMMAND_SERR
diff --git a/arch/x86/include/asm/parport.h b/arch/x86/include/asm/parport.h
index 3c4ffeb467e9..0d2d3b29118f 100644
--- a/arch/x86/include/asm/parport.h
+++ b/arch/x86/include/asm/parport.h
@@ -1,8 +1,8 @@
1#ifndef _ASM_X86_PARPORT_H 1#ifndef _ASM_X86_PARPORT_H
2#define _ASM_X86_PARPORT_H 2#define _ASM_X86_PARPORT_H
3 3
4static int __devinit parport_pc_find_isa_ports(int autoirq, int autodma); 4static int parport_pc_find_isa_ports(int autoirq, int autodma);
5static int __devinit parport_pc_find_nonpci_ports(int autoirq, int autodma) 5static int parport_pc_find_nonpci_ports(int autoirq, int autodma)
6{ 6{
7 return parport_pc_find_isa_ports(autoirq, autodma); 7 return parport_pc_find_isa_ports(autoirq, autodma);
8} 8}
diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h
index 73e8eeff22ee..747e5a38b590 100644
--- a/arch/x86/include/asm/pci_x86.h
+++ b/arch/x86/include/asm/pci_x86.h
@@ -140,11 +140,10 @@ struct pci_mmcfg_region {
140 140
141extern int __init pci_mmcfg_arch_init(void); 141extern int __init pci_mmcfg_arch_init(void);
142extern void __init pci_mmcfg_arch_free(void); 142extern void __init pci_mmcfg_arch_free(void);
143extern int __devinit pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg); 143extern int pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg);
144extern void pci_mmcfg_arch_unmap(struct pci_mmcfg_region *cfg); 144extern void pci_mmcfg_arch_unmap(struct pci_mmcfg_region *cfg);
145extern int __devinit pci_mmconfig_insert(struct device *dev, 145extern int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end,
146 u16 seg, u8 start, 146 phys_addr_t addr);
147 u8 end, phys_addr_t addr);
148extern int pci_mmconfig_delete(u16 seg, u8 start, u8 end); 147extern int pci_mmconfig_delete(u16 seg, u8 start, u8 end);
149extern struct pci_mmcfg_region *pci_mmconfig_lookup(int segment, int bus); 148extern struct pci_mmcfg_region *pci_mmconfig_lookup(int segment, int bus);
150 149
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index 3cf3d97cce3a..b43200dbfe7e 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -2500,7 +2500,7 @@ static bool pcidrv_registered;
2500/* 2500/*
2501 * add a pci uncore device 2501 * add a pci uncore device
2502 */ 2502 */
2503static int __devinit uncore_pci_add(struct intel_uncore_type *type, struct pci_dev *pdev) 2503static int uncore_pci_add(struct intel_uncore_type *type, struct pci_dev *pdev)
2504{ 2504{
2505 struct intel_uncore_pmu *pmu; 2505 struct intel_uncore_pmu *pmu;
2506 struct intel_uncore_box *box; 2506 struct intel_uncore_box *box;
@@ -2571,8 +2571,8 @@ static void uncore_pci_remove(struct pci_dev *pdev)
2571 kfree(box); 2571 kfree(box);
2572} 2572}
2573 2573
2574static int __devinit uncore_pci_probe(struct pci_dev *pdev, 2574static int uncore_pci_probe(struct pci_dev *pdev,
2575 const struct pci_device_id *id) 2575 const struct pci_device_id *id)
2576{ 2576{
2577 struct intel_uncore_type *type; 2577 struct intel_uncore_type *type;
2578 2578
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index de2b7ad70273..0f5dec5c80e0 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -265,7 +265,7 @@ rootfs_initcall(pci_iommu_init);
265#ifdef CONFIG_PCI 265#ifdef CONFIG_PCI
266/* Many VIA bridges seem to corrupt data for DAC. Disable it here */ 266/* Many VIA bridges seem to corrupt data for DAC. Disable it here */
267 267
268static __devinit void via_no_dac(struct pci_dev *dev) 268static void via_no_dac(struct pci_dev *dev)
269{ 269{
270 if (forbid_dac == 0) { 270 if (forbid_dac == 0) {
271 dev_info(&dev->dev, "disabling DAC on VIA PCI bridge\n"); 271 dev_info(&dev->dev, "disabling DAC on VIA PCI bridge\n");
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c
index 1b27de563561..26ee48a33dc4 100644
--- a/arch/x86/kernel/quirks.c
+++ b/arch/x86/kernel/quirks.c
@@ -8,7 +8,7 @@
8 8
9#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI) 9#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI)
10 10
11static void __devinit quirk_intel_irqbalance(struct pci_dev *dev) 11static void quirk_intel_irqbalance(struct pci_dev *dev)
12{ 12{
13 u8 config; 13 u8 config;
14 u16 word; 14 u16 word;
@@ -512,7 +512,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS,
512 512
513#if defined(CONFIG_PCI) && defined(CONFIG_NUMA) 513#if defined(CONFIG_PCI) && defined(CONFIG_NUMA)
514/* Set correct numa_node information for AMD NB functions */ 514/* Set correct numa_node information for AMD NB functions */
515static void __devinit quirk_amd_nb_node(struct pci_dev *dev) 515static void quirk_amd_nb_node(struct pci_dev *dev)
516{ 516{
517 struct pci_dev *nb_ht; 517 struct pci_dev *nb_ht;
518 unsigned int devfn; 518 unsigned int devfn;
diff --git a/arch/x86/lib/delay.c b/arch/x86/lib/delay.c
index e395693abdb1..7c3bee636e2f 100644
--- a/arch/x86/lib/delay.c
+++ b/arch/x86/lib/delay.c
@@ -98,7 +98,7 @@ void use_tsc_delay(void)
98 delay_fn = delay_tsc; 98 delay_fn = delay_tsc;
99} 99}
100 100
101int __devinit read_current_timer(unsigned long *timer_val) 101int read_current_timer(unsigned long *timer_val)
102{ 102{
103 if (delay_fn == delay_tsc) { 103 if (delay_fn == delay_tsc) {
104 rdtscll(*timer_val); 104 rdtscll(*timer_val);
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index 0c01261fe5a8..53ea60458e01 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -145,7 +145,7 @@ void __init pci_acpi_crs_quirks(void)
145} 145}
146 146
147#ifdef CONFIG_PCI_MMCONFIG 147#ifdef CONFIG_PCI_MMCONFIG
148static int __devinit check_segment(u16 seg, struct device *dev, char *estr) 148static int check_segment(u16 seg, struct device *dev, char *estr)
149{ 149{
150 if (seg) { 150 if (seg) {
151 dev_err(dev, 151 dev_err(dev,
@@ -168,9 +168,8 @@ static int __devinit check_segment(u16 seg, struct device *dev, char *estr)
168 return 0; 168 return 0;
169} 169}
170 170
171static int __devinit setup_mcfg_map(struct pci_root_info *info, 171static int setup_mcfg_map(struct pci_root_info *info, u16 seg, u8 start,
172 u16 seg, u8 start, u8 end, 172 u8 end, phys_addr_t addr)
173 phys_addr_t addr)
174{ 173{
175 int result; 174 int result;
176 struct device *dev = &info->bridge->dev; 175 struct device *dev = &info->bridge->dev;
@@ -208,7 +207,7 @@ static void teardown_mcfg_map(struct pci_root_info *info)
208 } 207 }
209} 208}
210#else 209#else
211static int __devinit setup_mcfg_map(struct pci_root_info *info, 210static int setup_mcfg_map(struct pci_root_info *info,
212 u16 seg, u8 start, u8 end, 211 u16 seg, u8 start, u8 end,
213 phys_addr_t addr) 212 phys_addr_t addr)
214{ 213{
@@ -474,7 +473,7 @@ probe_pci_root_info(struct pci_root_info *info, struct acpi_device *device,
474 info); 473 info);
475} 474}
476 475
477struct pci_bus * __devinit pci_acpi_scan_root(struct acpi_pci_root *root) 476struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
478{ 477{
479 struct acpi_device *device = root->device; 478 struct acpi_device *device = root->device;
480 struct pci_root_info *info = NULL; 479 struct pci_root_info *info = NULL;
diff --git a/arch/x86/pci/bus_numa.c b/arch/x86/pci/bus_numa.c
index d37e2fec97e5..c2735feb2508 100644
--- a/arch/x86/pci/bus_numa.c
+++ b/arch/x86/pci/bus_numa.c
@@ -93,8 +93,8 @@ struct pci_root_info __init *alloc_pci_root_info(int bus_min, int bus_max,
93 return info; 93 return info;
94} 94}
95 95
96void __devinit update_res(struct pci_root_info *info, resource_size_t start, 96void update_res(struct pci_root_info *info, resource_size_t start,
97 resource_size_t end, unsigned long flags, int merge) 97 resource_size_t end, unsigned long flags, int merge)
98{ 98{
99 struct resource *res; 99 struct resource *res;
100 struct pci_root_res *root_res; 100 struct pci_root_res *root_res;
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 1b1dda90a945..ccd0ab3ab899 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -81,14 +81,14 @@ struct pci_ops pci_root_ops = {
81 */ 81 */
82DEFINE_RAW_SPINLOCK(pci_config_lock); 82DEFINE_RAW_SPINLOCK(pci_config_lock);
83 83
84static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d) 84static int can_skip_ioresource_align(const struct dmi_system_id *d)
85{ 85{
86 pci_probe |= PCI_CAN_SKIP_ISA_ALIGN; 86 pci_probe |= PCI_CAN_SKIP_ISA_ALIGN;
87 printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident); 87 printk(KERN_INFO "PCI: %s detected, can skip ISA alignment\n", d->ident);
88 return 0; 88 return 0;
89} 89}
90 90
91static const struct dmi_system_id can_skip_pciprobe_dmi_table[] __devinitconst = { 91static const struct dmi_system_id can_skip_pciprobe_dmi_table[] = {
92/* 92/*
93 * Systems where PCI IO resource ISA alignment can be skipped 93 * Systems where PCI IO resource ISA alignment can be skipped
94 * when the ISA enable bit in the bridge control is not set 94 * when the ISA enable bit in the bridge control is not set
@@ -125,7 +125,7 @@ void __init dmi_check_skip_isa_align(void)
125 dmi_check_system(can_skip_pciprobe_dmi_table); 125 dmi_check_system(can_skip_pciprobe_dmi_table);
126} 126}
127 127
128static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev) 128static void pcibios_fixup_device_resources(struct pci_dev *dev)
129{ 129{
130 struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE]; 130 struct resource *rom_r = &dev->resource[PCI_ROM_RESOURCE];
131 struct resource *bar_r; 131 struct resource *bar_r;
@@ -162,7 +162,7 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
162 * are examined. 162 * are examined.
163 */ 163 */
164 164
165void __devinit pcibios_fixup_bus(struct pci_bus *b) 165void pcibios_fixup_bus(struct pci_bus *b)
166{ 166{
167 struct pci_dev *dev; 167 struct pci_dev *dev;
168 168
@@ -176,7 +176,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *b)
176 * on the kernel command line (which was parsed earlier). 176 * on the kernel command line (which was parsed earlier).
177 */ 177 */
178 178
179static int __devinit set_bf_sort(const struct dmi_system_id *d) 179static int set_bf_sort(const struct dmi_system_id *d)
180{ 180{
181 if (pci_bf_sort == pci_bf_sort_default) { 181 if (pci_bf_sort == pci_bf_sort_default) {
182 pci_bf_sort = pci_dmi_bf; 182 pci_bf_sort = pci_dmi_bf;
@@ -185,7 +185,7 @@ static int __devinit set_bf_sort(const struct dmi_system_id *d)
185 return 0; 185 return 0;
186} 186}
187 187
188static void __devinit read_dmi_type_b1(const struct dmi_header *dm, 188static void read_dmi_type_b1(const struct dmi_header *dm,
189 void *private_data) 189 void *private_data)
190{ 190{
191 u8 *d = (u8 *)dm + 4; 191 u8 *d = (u8 *)dm + 4;
@@ -207,7 +207,7 @@ static void __devinit read_dmi_type_b1(const struct dmi_header *dm,
207 } 207 }
208} 208}
209 209
210static int __devinit find_sort_method(const struct dmi_system_id *d) 210static int find_sort_method(const struct dmi_system_id *d)
211{ 211{
212 dmi_walk(read_dmi_type_b1, NULL); 212 dmi_walk(read_dmi_type_b1, NULL);
213 213
@@ -222,7 +222,7 @@ static int __devinit find_sort_method(const struct dmi_system_id *d)
222 * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus) 222 * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus)
223 */ 223 */
224#ifdef __i386__ 224#ifdef __i386__
225static int __devinit assign_all_busses(const struct dmi_system_id *d) 225static int assign_all_busses(const struct dmi_system_id *d)
226{ 226{
227 pci_probe |= PCI_ASSIGN_ALL_BUSSES; 227 pci_probe |= PCI_ASSIGN_ALL_BUSSES;
228 printk(KERN_INFO "%s detected: enabling PCI bus# renumbering" 228 printk(KERN_INFO "%s detected: enabling PCI bus# renumbering"
@@ -231,7 +231,7 @@ static int __devinit assign_all_busses(const struct dmi_system_id *d)
231} 231}
232#endif 232#endif
233 233
234static int __devinit set_scan_all(const struct dmi_system_id *d) 234static int set_scan_all(const struct dmi_system_id *d)
235{ 235{
236 printk(KERN_INFO "PCI: %s detected, enabling pci=pcie_scan_all\n", 236 printk(KERN_INFO "PCI: %s detected, enabling pci=pcie_scan_all\n",
237 d->ident); 237 d->ident);
@@ -239,7 +239,7 @@ static int __devinit set_scan_all(const struct dmi_system_id *d)
239 return 0; 239 return 0;
240} 240}
241 241
242static const struct dmi_system_id __devinitconst pciprobe_dmi_table[] = { 242static const struct dmi_system_id pciprobe_dmi_table[] = {
243#ifdef __i386__ 243#ifdef __i386__
244/* 244/*
245 * Laptops which need pci=assign-busses to see Cardbus cards 245 * Laptops which need pci=assign-busses to see Cardbus cards
@@ -434,7 +434,8 @@ static const struct dmi_system_id __devinitconst pciprobe_dmi_table[] = {
434 .callback = set_scan_all, 434 .callback = set_scan_all,
435 .ident = "Stratus/NEC ftServer", 435 .ident = "Stratus/NEC ftServer",
436 .matches = { 436 .matches = {
437 DMI_MATCH(DMI_SYS_VENDOR, "ftServer"), 437 DMI_MATCH(DMI_SYS_VENDOR, "Stratus"),
438 DMI_MATCH(DMI_PRODUCT_NAME, "ftServer"),
438 }, 439 },
439 }, 440 },
440 {} 441 {}
@@ -445,7 +446,7 @@ void __init dmi_check_pciprobe(void)
445 dmi_check_system(pciprobe_dmi_table); 446 dmi_check_system(pciprobe_dmi_table);
446} 447}
447 448
448struct pci_bus * __devinit pcibios_scan_root(int busnum) 449struct pci_bus *pcibios_scan_root(int busnum)
449{ 450{
450 struct pci_bus *bus = NULL; 451 struct pci_bus *bus = NULL;
451 452
@@ -664,7 +665,7 @@ int pci_ext_cfg_avail(void)
664 return 0; 665 return 0;
665} 666}
666 667
667struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) 668struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
668{ 669{
669 LIST_HEAD(resources); 670 LIST_HEAD(resources);
670 struct pci_bus *bus = NULL; 671 struct pci_bus *bus = NULL;
@@ -692,7 +693,7 @@ struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops,
692 return bus; 693 return bus;
693} 694}
694 695
695struct pci_bus * __devinit pci_scan_bus_with_sysdata(int busno) 696struct pci_bus *pci_scan_bus_with_sysdata(int busno)
696{ 697{
697 return pci_scan_bus_on_node(busno, &pci_root_ops, -1); 698 return pci_scan_bus_on_node(busno, &pci_root_ops, -1);
698} 699}
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index af8a224db216..f5809fa2753e 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -9,7 +9,7 @@
9#include <linux/vgaarb.h> 9#include <linux/vgaarb.h>
10#include <asm/pci_x86.h> 10#include <asm/pci_x86.h>
11 11
12static void __devinit pci_fixup_i450nx(struct pci_dev *d) 12static void pci_fixup_i450nx(struct pci_dev *d)
13{ 13{
14 /* 14 /*
15 * i450NX -- Find and scan all secondary buses on all PXB's. 15 * i450NX -- Find and scan all secondary buses on all PXB's.
@@ -34,7 +34,7 @@ static void __devinit pci_fixup_i450nx(struct pci_dev *d)
34} 34}
35DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx); 35DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx);
36 36
37static void __devinit pci_fixup_i450gx(struct pci_dev *d) 37static void pci_fixup_i450gx(struct pci_dev *d)
38{ 38{
39 /* 39 /*
40 * i450GX and i450KX -- Find and scan all secondary buses. 40 * i450GX and i450KX -- Find and scan all secondary buses.
@@ -48,7 +48,7 @@ static void __devinit pci_fixup_i450gx(struct pci_dev *d)
48} 48}
49DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx); 49DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454GX, pci_fixup_i450gx);
50 50
51static void __devinit pci_fixup_umc_ide(struct pci_dev *d) 51static void pci_fixup_umc_ide(struct pci_dev *d)
52{ 52{
53 /* 53 /*
54 * UM8886BF IDE controller sets region type bits incorrectly, 54 * UM8886BF IDE controller sets region type bits incorrectly,
@@ -62,7 +62,7 @@ static void __devinit pci_fixup_umc_ide(struct pci_dev *d)
62} 62}
63DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, pci_fixup_umc_ide); 63DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, pci_fixup_umc_ide);
64 64
65static void __devinit pci_fixup_ncr53c810(struct pci_dev *d) 65static void pci_fixup_ncr53c810(struct pci_dev *d)
66{ 66{
67 /* 67 /*
68 * NCR 53C810 returns class code 0 (at least on some systems). 68 * NCR 53C810 returns class code 0 (at least on some systems).
@@ -75,7 +75,7 @@ static void __devinit pci_fixup_ncr53c810(struct pci_dev *d)
75} 75}
76DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, pci_fixup_ncr53c810); 76DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, pci_fixup_ncr53c810);
77 77
78static void __devinit pci_fixup_latency(struct pci_dev *d) 78static void pci_fixup_latency(struct pci_dev *d)
79{ 79{
80 /* 80 /*
81 * SiS 5597 and 5598 chipsets require latency timer set to 81 * SiS 5597 and 5598 chipsets require latency timer set to
@@ -87,7 +87,7 @@ static void __devinit pci_fixup_latency(struct pci_dev *d)
87DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, pci_fixup_latency); 87DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, pci_fixup_latency);
88DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5598, pci_fixup_latency); 88DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5598, pci_fixup_latency);
89 89
90static void __devinit pci_fixup_piix4_acpi(struct pci_dev *d) 90static void pci_fixup_piix4_acpi(struct pci_dev *d)
91{ 91{
92 /* 92 /*
93 * PIIX4 ACPI device: hardwired IRQ9 93 * PIIX4 ACPI device: hardwired IRQ9
@@ -163,7 +163,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8367_0, pci_fixup_
163 * system to PCI bus no matter what are their window settings, so they are 163 * system to PCI bus no matter what are their window settings, so they are
164 * "transparent" (or subtractive decoding) from programmers point of view. 164 * "transparent" (or subtractive decoding) from programmers point of view.
165 */ 165 */
166static void __devinit pci_fixup_transparent_bridge(struct pci_dev *dev) 166static void pci_fixup_transparent_bridge(struct pci_dev *dev)
167{ 167{
168 if ((dev->device & 0xff00) == 0x2400) 168 if ((dev->device & 0xff00) == 0x2400)
169 dev->transparent = 1; 169 dev->transparent = 1;
@@ -317,7 +317,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MCH_PC1, pcie_r
317 * video device at this point. 317 * video device at this point.
318 */ 318 */
319 319
320static void __devinit pci_fixup_video(struct pci_dev *pdev) 320static void pci_fixup_video(struct pci_dev *pdev)
321{ 321{
322 struct pci_dev *bridge; 322 struct pci_dev *bridge;
323 struct pci_bus *bus; 323 struct pci_bus *bus;
@@ -357,7 +357,7 @@ DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
357 PCI_CLASS_DISPLAY_VGA, 8, pci_fixup_video); 357 PCI_CLASS_DISPLAY_VGA, 8, pci_fixup_video);
358 358
359 359
360static const struct dmi_system_id __devinitconst msi_k8t_dmi_table[] = { 360static const struct dmi_system_id msi_k8t_dmi_table[] = {
361 { 361 {
362 .ident = "MSI-K8T-Neo2Fir", 362 .ident = "MSI-K8T-Neo2Fir",
363 .matches = { 363 .matches = {
@@ -378,7 +378,7 @@ static const struct dmi_system_id __devinitconst msi_k8t_dmi_table[] = {
378 * The soundcard is only enabled, if the mainborad is identified 378 * The soundcard is only enabled, if the mainborad is identified
379 * via DMI-tables and the soundcard is detected to be off. 379 * via DMI-tables and the soundcard is detected to be off.
380 */ 380 */
381static void __devinit pci_fixup_msi_k8t_onboard_sound(struct pci_dev *dev) 381static void pci_fixup_msi_k8t_onboard_sound(struct pci_dev *dev)
382{ 382{
383 unsigned char val; 383 unsigned char val;
384 if (!dmi_check_system(msi_k8t_dmi_table)) 384 if (!dmi_check_system(msi_k8t_dmi_table))
@@ -414,7 +414,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237,
414 */ 414 */
415static u16 toshiba_line_size; 415static u16 toshiba_line_size;
416 416
417static const struct dmi_system_id __devinitconst toshiba_ohci1394_dmi_table[] = { 417static const struct dmi_system_id toshiba_ohci1394_dmi_table[] = {
418 { 418 {
419 .ident = "Toshiba PS5 based laptop", 419 .ident = "Toshiba PS5 based laptop",
420 .matches = { 420 .matches = {
@@ -439,7 +439,7 @@ static const struct dmi_system_id __devinitconst toshiba_ohci1394_dmi_table[] =
439 { } 439 { }
440}; 440};
441 441
442static void __devinit pci_pre_fixup_toshiba_ohci1394(struct pci_dev *dev) 442static void pci_pre_fixup_toshiba_ohci1394(struct pci_dev *dev)
443{ 443{
444 if (!dmi_check_system(toshiba_ohci1394_dmi_table)) 444 if (!dmi_check_system(toshiba_ohci1394_dmi_table))
445 return; /* only applies to certain Toshibas (so far) */ 445 return; /* only applies to certain Toshibas (so far) */
@@ -450,7 +450,7 @@ static void __devinit pci_pre_fixup_toshiba_ohci1394(struct pci_dev *dev)
450DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, 0x8032, 450DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, 0x8032,
451 pci_pre_fixup_toshiba_ohci1394); 451 pci_pre_fixup_toshiba_ohci1394);
452 452
453static void __devinit pci_post_fixup_toshiba_ohci1394(struct pci_dev *dev) 453static void pci_post_fixup_toshiba_ohci1394(struct pci_dev *dev)
454{ 454{
455 if (!dmi_check_system(toshiba_ohci1394_dmi_table)) 455 if (!dmi_check_system(toshiba_ohci1394_dmi_table))
456 return; /* only applies to certain Toshibas (so far) */ 456 return; /* only applies to certain Toshibas (so far) */
@@ -488,7 +488,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_LEGACY,
488 * Siemens Nixdorf AG FSC Multiprocessor Interrupt Controller: 488 * Siemens Nixdorf AG FSC Multiprocessor Interrupt Controller:
489 * prevent update of the BAR0, which doesn't look like a normal BAR. 489 * prevent update of the BAR0, which doesn't look like a normal BAR.
490 */ 490 */
491static void __devinit pci_siemens_interrupt_controller(struct pci_dev *dev) 491static void pci_siemens_interrupt_controller(struct pci_dev *dev)
492{ 492{
493 dev->resource[0].flags |= IORESOURCE_PCI_FIXED; 493 dev->resource[0].flags |= IORESOURCE_PCI_FIXED;
494} 494}
@@ -531,7 +531,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATI, 0x4385, sb600_disable_hpet_bar);
531 * 531 *
532 * Match off the LPC and svid/sdid (older kernels lose the bridge subvendor) 532 * Match off the LPC and svid/sdid (older kernels lose the bridge subvendor)
533 */ 533 */
534static void __devinit twinhead_reserve_killing_zone(struct pci_dev *dev) 534static void twinhead_reserve_killing_zone(struct pci_dev *dev)
535{ 535{
536 if (dev->subsystem_vendor == 0x14FF && dev->subsystem_device == 0xA003) { 536 if (dev->subsystem_vendor == 0x14FF && dev->subsystem_device == 0xA003) {
537 pr_info("Reserving memory on Twinhead H12Y\n"); 537 pr_info("Reserving memory on Twinhead H12Y\n");
diff --git a/arch/x86/pci/legacy.c b/arch/x86/pci/legacy.c
index a1df191129d3..4a2ab9cb3659 100644
--- a/arch/x86/pci/legacy.c
+++ b/arch/x86/pci/legacy.c
@@ -10,7 +10,7 @@
10 * Discover remaining PCI buses in case there are peer host bridges. 10 * Discover remaining PCI buses in case there are peer host bridges.
11 * We use the number of last PCI bus provided by the PCI BIOS. 11 * We use the number of last PCI bus provided by the PCI BIOS.
12 */ 12 */
13static void __devinit pcibios_fixup_peer_bridges(void) 13static void pcibios_fixup_peer_bridges(void)
14{ 14{
15 int n; 15 int n;
16 16
@@ -34,7 +34,7 @@ int __init pci_legacy_init(void)
34 return 0; 34 return 0;
35} 35}
36 36
37void __devinit pcibios_scan_specific_bus(int busn) 37void pcibios_scan_specific_bus(int busn)
38{ 38{
39 int devfn; 39 int devfn;
40 long node; 40 long node;
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c
index 704b9ec043d7..fb29968a7cd5 100644
--- a/arch/x86/pci/mmconfig-shared.c
+++ b/arch/x86/pci/mmconfig-shared.c
@@ -49,7 +49,7 @@ static __init void free_all_mmcfg(void)
49 pci_mmconfig_remove(cfg); 49 pci_mmconfig_remove(cfg);
50} 50}
51 51
52static __devinit void list_add_sorted(struct pci_mmcfg_region *new) 52static void list_add_sorted(struct pci_mmcfg_region *new)
53{ 53{
54 struct pci_mmcfg_region *cfg; 54 struct pci_mmcfg_region *cfg;
55 55
@@ -65,9 +65,8 @@ static __devinit void list_add_sorted(struct pci_mmcfg_region *new)
65 list_add_tail_rcu(&new->list, &pci_mmcfg_list); 65 list_add_tail_rcu(&new->list, &pci_mmcfg_list);
66} 66}
67 67
68static __devinit struct pci_mmcfg_region *pci_mmconfig_alloc(int segment, 68static struct pci_mmcfg_region *pci_mmconfig_alloc(int segment, int start,
69 int start, 69 int end, u64 addr)
70 int end, u64 addr)
71{ 70{
72 struct pci_mmcfg_region *new; 71 struct pci_mmcfg_region *new;
73 struct resource *res; 72 struct resource *res;
@@ -371,8 +370,7 @@ static int __init pci_mmcfg_check_hostbridge(void)
371 return !list_empty(&pci_mmcfg_list); 370 return !list_empty(&pci_mmcfg_list);
372} 371}
373 372
374static acpi_status __devinit check_mcfg_resource(struct acpi_resource *res, 373static acpi_status check_mcfg_resource(struct acpi_resource *res, void *data)
375 void *data)
376{ 374{
377 struct resource *mcfg_res = data; 375 struct resource *mcfg_res = data;
378 struct acpi_resource_address64 address; 376 struct acpi_resource_address64 address;
@@ -408,8 +406,8 @@ static acpi_status __devinit check_mcfg_resource(struct acpi_resource *res,
408 return AE_OK; 406 return AE_OK;
409} 407}
410 408
411static acpi_status __devinit find_mboard_resource(acpi_handle handle, u32 lvl, 409static acpi_status find_mboard_resource(acpi_handle handle, u32 lvl,
412 void *context, void **rv) 410 void *context, void **rv)
413{ 411{
414 struct resource *mcfg_res = context; 412 struct resource *mcfg_res = context;
415 413
@@ -422,7 +420,7 @@ static acpi_status __devinit find_mboard_resource(acpi_handle handle, u32 lvl,
422 return AE_OK; 420 return AE_OK;
423} 421}
424 422
425static int __devinit is_acpi_reserved(u64 start, u64 end, unsigned not_used) 423static int is_acpi_reserved(u64 start, u64 end, unsigned not_used)
426{ 424{
427 struct resource mcfg_res; 425 struct resource mcfg_res;
428 426
@@ -693,9 +691,8 @@ static int __init pci_mmcfg_late_insert_resources(void)
693late_initcall(pci_mmcfg_late_insert_resources); 691late_initcall(pci_mmcfg_late_insert_resources);
694 692
695/* Add MMCFG information for host bridges */ 693/* Add MMCFG information for host bridges */
696int __devinit pci_mmconfig_insert(struct device *dev, 694int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end,
697 u16 seg, u8 start, u8 end, 695 phys_addr_t addr)
698 phys_addr_t addr)
699{ 696{
700 int rc; 697 int rc;
701 struct resource *tmp = NULL; 698 struct resource *tmp = NULL;
diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c
index db63ac23e3d9..5c90975cdf0f 100644
--- a/arch/x86/pci/mmconfig_32.c
+++ b/arch/x86/pci/mmconfig_32.c
@@ -142,7 +142,7 @@ void __init pci_mmcfg_arch_free(void)
142{ 142{
143} 143}
144 144
145int __devinit pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg) 145int pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg)
146{ 146{
147 return 0; 147 return 0;
148} 148}
diff --git a/arch/x86/pci/mmconfig_64.c b/arch/x86/pci/mmconfig_64.c
index d4ebd07c306d..bea52496aea6 100644
--- a/arch/x86/pci/mmconfig_64.c
+++ b/arch/x86/pci/mmconfig_64.c
@@ -95,7 +95,7 @@ const struct pci_raw_ops pci_mmcfg = {
95 .write = pci_mmcfg_write, 95 .write = pci_mmcfg_write,
96}; 96};
97 97
98static void __iomem * __devinit mcfg_ioremap(struct pci_mmcfg_region *cfg) 98static void __iomem *mcfg_ioremap(struct pci_mmcfg_region *cfg)
99{ 99{
100 void __iomem *addr; 100 void __iomem *addr;
101 u64 start, size; 101 u64 start, size;
@@ -133,7 +133,7 @@ void __init pci_mmcfg_arch_free(void)
133 pci_mmcfg_arch_unmap(cfg); 133 pci_mmcfg_arch_unmap(cfg);
134} 134}
135 135
136int __devinit pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg) 136int pci_mmcfg_arch_map(struct pci_mmcfg_region *cfg)
137{ 137{
138 cfg->virt = mcfg_ioremap(cfg); 138 cfg->virt = mcfg_ioremap(cfg);
139 if (!cfg->virt) { 139 if (!cfg->virt) {
diff --git a/arch/x86/pci/mrst.c b/arch/x86/pci/mrst.c
index e14a2ff708b5..6eb18c42a28a 100644
--- a/arch/x86/pci/mrst.c
+++ b/arch/x86/pci/mrst.c
@@ -247,7 +247,7 @@ int __init pci_mrst_init(void)
247/* Langwell devices are not true pci devices, they are not subject to 10 ms 247/* Langwell devices are not true pci devices, they are not subject to 10 ms
248 * d3 to d0 delay required by pci spec. 248 * d3 to d0 delay required by pci spec.
249 */ 249 */
250static void __devinit pci_d3delay_fixup(struct pci_dev *dev) 250static void pci_d3delay_fixup(struct pci_dev *dev)
251{ 251{
252 /* PCI fixups are effectively decided compile time. If we have a dual 252 /* PCI fixups are effectively decided compile time. If we have a dual
253 SoC/non-SoC kernel we don't want to mangle d3 on non SoC devices */ 253 SoC/non-SoC kernel we don't want to mangle d3 on non SoC devices */
@@ -262,7 +262,7 @@ static void __devinit pci_d3delay_fixup(struct pci_dev *dev)
262} 262}
263DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_d3delay_fixup); 263DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_d3delay_fixup);
264 264
265static void __devinit mrst_power_off_unused_dev(struct pci_dev *dev) 265static void mrst_power_off_unused_dev(struct pci_dev *dev)
266{ 266{
267 pci_set_power_state(dev, PCI_D3hot); 267 pci_set_power_state(dev, PCI_D3hot);
268} 268}
@@ -275,7 +275,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0815, mrst_power_off_unused_dev);
275/* 275/*
276 * Langwell devices reside at fixed offsets, don't try to move them. 276 * Langwell devices reside at fixed offsets, don't try to move them.
277 */ 277 */
278static void __devinit pci_fixed_bar_fixup(struct pci_dev *dev) 278static void pci_fixed_bar_fixup(struct pci_dev *dev)
279{ 279{
280 unsigned long offset; 280 unsigned long offset;
281 u32 size; 281 u32 size;
diff --git a/arch/x86/pci/numaq_32.c b/arch/x86/pci/numaq_32.c
index 83e125b95ca6..b96b14c250b6 100644
--- a/arch/x86/pci/numaq_32.c
+++ b/arch/x86/pci/numaq_32.c
@@ -116,7 +116,7 @@ static const struct pci_raw_ops pci_direct_conf1_mq = {
116}; 116};
117 117
118 118
119static void __devinit pci_fixup_i450nx(struct pci_dev *d) 119static void pci_fixup_i450nx(struct pci_dev *d)
120{ 120{
121 /* 121 /*
122 * i450NX -- Find and scan all secondary buses on all PXB's. 122 * i450NX -- Find and scan all secondary buses on all PXB's.
diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c
index da8fe0535ff4..c77b24a8b2da 100644
--- a/arch/x86/pci/pcbios.c
+++ b/arch/x86/pci/pcbios.c
@@ -124,7 +124,7 @@ static struct {
124 124
125static int pci_bios_present; 125static int pci_bios_present;
126 126
127static int __devinit check_pcibios(void) 127static int check_pcibios(void)
128{ 128{
129 u32 signature, eax, ebx, ecx; 129 u32 signature, eax, ebx, ecx;
130 u8 status, major_ver, minor_ver, hw_mech; 130 u8 status, major_ver, minor_ver, hw_mech;
@@ -312,7 +312,7 @@ static const struct pci_raw_ops pci_bios_access = {
312 * Try to find PCI BIOS. 312 * Try to find PCI BIOS.
313 */ 313 */
314 314
315static const struct pci_raw_ops * __devinit pci_find_bios(void) 315static const struct pci_raw_ops *pci_find_bios(void)
316{ 316{
317 union bios32 *check; 317 union bios32 *check;
318 unsigned char sum; 318 unsigned char sum;
diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c
index fd41a9262d65..e31bcd8f2eee 100644
--- a/arch/x86/platform/mrst/mrst.c
+++ b/arch/x86/platform/mrst/mrst.c
@@ -782,7 +782,7 @@ BLOCKING_NOTIFIER_HEAD(intel_scu_notifier);
782EXPORT_SYMBOL_GPL(intel_scu_notifier); 782EXPORT_SYMBOL_GPL(intel_scu_notifier);
783 783
784/* Called by IPC driver */ 784/* Called by IPC driver */
785void __devinit intel_scu_devices_create(void) 785void intel_scu_devices_create(void)
786{ 786{
787 int i; 787 int i;
788 788
diff --git a/arch/x86/platform/olpc/olpc-xo1-pm.c b/arch/x86/platform/olpc/olpc-xo1-pm.c
index d75582d1aa55..ff0174dda810 100644
--- a/arch/x86/platform/olpc/olpc-xo1-pm.c
+++ b/arch/x86/platform/olpc/olpc-xo1-pm.c
@@ -121,7 +121,7 @@ static const struct platform_suspend_ops xo1_suspend_ops = {
121 .enter = xo1_power_state_enter, 121 .enter = xo1_power_state_enter,
122}; 122};
123 123
124static int __devinit xo1_pm_probe(struct platform_device *pdev) 124static int xo1_pm_probe(struct platform_device *pdev)
125{ 125{
126 struct resource *res; 126 struct resource *res;
127 int err; 127 int err;
@@ -154,7 +154,7 @@ static int __devinit xo1_pm_probe(struct platform_device *pdev)
154 return 0; 154 return 0;
155} 155}
156 156
157static int __devexit xo1_pm_remove(struct platform_device *pdev) 157static int xo1_pm_remove(struct platform_device *pdev)
158{ 158{
159 mfd_cell_disable(pdev); 159 mfd_cell_disable(pdev);
160 160
@@ -173,7 +173,7 @@ static struct platform_driver cs5535_pms_driver = {
173 .owner = THIS_MODULE, 173 .owner = THIS_MODULE,
174 }, 174 },
175 .probe = xo1_pm_probe, 175 .probe = xo1_pm_probe,
176 .remove = __devexit_p(xo1_pm_remove), 176 .remove = xo1_pm_remove,
177}; 177};
178 178
179static struct platform_driver cs5535_acpi_driver = { 179static struct platform_driver cs5535_acpi_driver = {
@@ -182,7 +182,7 @@ static struct platform_driver cs5535_acpi_driver = {
182 .owner = THIS_MODULE, 182 .owner = THIS_MODULE,
183 }, 183 },
184 .probe = xo1_pm_probe, 184 .probe = xo1_pm_probe,
185 .remove = __devexit_p(xo1_pm_remove), 185 .remove = xo1_pm_remove,
186}; 186};
187 187
188static int __init xo1_pm_init(void) 188static int __init xo1_pm_init(void)
diff --git a/arch/x86/platform/olpc/olpc-xo1-sci.c b/arch/x86/platform/olpc/olpc-xo1-sci.c
index 63d4aa40956e..74704be7b1fe 100644
--- a/arch/x86/platform/olpc/olpc-xo1-sci.c
+++ b/arch/x86/platform/olpc/olpc-xo1-sci.c
@@ -309,7 +309,7 @@ static int xo1_sci_resume(struct platform_device *pdev)
309 return 0; 309 return 0;
310} 310}
311 311
312static int __devinit setup_sci_interrupt(struct platform_device *pdev) 312static int setup_sci_interrupt(struct platform_device *pdev)
313{ 313{
314 u32 lo, hi; 314 u32 lo, hi;
315 u32 sts; 315 u32 sts;
@@ -351,7 +351,7 @@ static int __devinit setup_sci_interrupt(struct platform_device *pdev)
351 return r; 351 return r;
352} 352}
353 353
354static int __devinit setup_ec_sci(void) 354static int setup_ec_sci(void)
355{ 355{
356 int r; 356 int r;
357 357
@@ -395,7 +395,7 @@ static void free_ec_sci(void)
395 gpio_free(OLPC_GPIO_ECSCI); 395 gpio_free(OLPC_GPIO_ECSCI);
396} 396}
397 397
398static int __devinit setup_lid_events(void) 398static int setup_lid_events(void)
399{ 399{
400 int r; 400 int r;
401 401
@@ -432,7 +432,7 @@ static void free_lid_events(void)
432 gpio_free(OLPC_GPIO_LID); 432 gpio_free(OLPC_GPIO_LID);
433} 433}
434 434
435static int __devinit setup_power_button(struct platform_device *pdev) 435static int setup_power_button(struct platform_device *pdev)
436{ 436{
437 int r; 437 int r;
438 438
@@ -463,7 +463,7 @@ static void free_power_button(void)
463 input_free_device(power_button_idev); 463 input_free_device(power_button_idev);
464} 464}
465 465
466static int __devinit setup_ebook_switch(struct platform_device *pdev) 466static int setup_ebook_switch(struct platform_device *pdev)
467{ 467{
468 int r; 468 int r;
469 469
@@ -494,7 +494,7 @@ static void free_ebook_switch(void)
494 input_free_device(ebook_switch_idev); 494 input_free_device(ebook_switch_idev);
495} 495}
496 496
497static int __devinit setup_lid_switch(struct platform_device *pdev) 497static int setup_lid_switch(struct platform_device *pdev)
498{ 498{
499 int r; 499 int r;
500 500
@@ -538,7 +538,7 @@ static void free_lid_switch(void)
538 input_free_device(lid_switch_idev); 538 input_free_device(lid_switch_idev);
539} 539}
540 540
541static int __devinit xo1_sci_probe(struct platform_device *pdev) 541static int xo1_sci_probe(struct platform_device *pdev)
542{ 542{
543 struct resource *res; 543 struct resource *res;
544 int r; 544 int r;
@@ -613,7 +613,7 @@ err_ebook:
613 return r; 613 return r;
614} 614}
615 615
616static int __devexit xo1_sci_remove(struct platform_device *pdev) 616static int xo1_sci_remove(struct platform_device *pdev)
617{ 617{
618 mfd_cell_disable(pdev); 618 mfd_cell_disable(pdev);
619 free_irq(sci_irq, pdev); 619 free_irq(sci_irq, pdev);
@@ -632,7 +632,7 @@ static struct platform_driver xo1_sci_driver = {
632 .name = "olpc-xo1-sci-acpi", 632 .name = "olpc-xo1-sci-acpi",
633 }, 633 },
634 .probe = xo1_sci_probe, 634 .probe = xo1_sci_probe,
635 .remove = __devexit_p(xo1_sci_remove), 635 .remove = xo1_sci_remove,
636 .suspend = xo1_sci_suspend, 636 .suspend = xo1_sci_suspend,
637 .resume = xo1_sci_resume, 637 .resume = xo1_sci_resume,
638}; 638};
diff --git a/arch/x86/platform/scx200/scx200_32.c b/arch/x86/platform/scx200/scx200_32.c
index 7a9ad30d6c9f..3dc9aee41d91 100644
--- a/arch/x86/platform/scx200/scx200_32.c
+++ b/arch/x86/platform/scx200/scx200_32.c
@@ -35,7 +35,7 @@ static struct pci_device_id scx200_tbl[] = {
35}; 35};
36MODULE_DEVICE_TABLE(pci,scx200_tbl); 36MODULE_DEVICE_TABLE(pci,scx200_tbl);
37 37
38static int __devinit scx200_probe(struct pci_dev *, const struct pci_device_id *); 38static int scx200_probe(struct pci_dev *, const struct pci_device_id *);
39 39
40static struct pci_driver scx200_pci_driver = { 40static struct pci_driver scx200_pci_driver = {
41 .name = "scx200", 41 .name = "scx200",
@@ -45,7 +45,7 @@ static struct pci_driver scx200_pci_driver = {
45 45
46static DEFINE_MUTEX(scx200_gpio_config_lock); 46static DEFINE_MUTEX(scx200_gpio_config_lock);
47 47
48static void __devinit scx200_init_shadow(void) 48static void scx200_init_shadow(void)
49{ 49{
50 int bank; 50 int bank;
51 51
@@ -54,7 +54,7 @@ static void __devinit scx200_init_shadow(void)
54 scx200_gpio_shadow[bank] = inl(scx200_gpio_base + 0x10 * bank); 54 scx200_gpio_shadow[bank] = inl(scx200_gpio_base + 0x10 * bank);
55} 55}
56 56
57static int __devinit scx200_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 57static int scx200_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
58{ 58{
59 unsigned base; 59 unsigned base;
60 60