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/Kconfig17
-rw-r--r--arch/arm/Kconfig.debug10
-rw-r--r--arch/arm/boot/dts/Makefile1
-rw-r--r--arch/arm/boot/dts/armada-370-db.dts2
-rw-r--r--arch/arm/boot/dts/armada-370-xp.dtsi6
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78230.dtsi23
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78260.dtsi29
-rw-r--r--arch/arm/boot/dts/armada-xp-mv78460.dtsi29
-rw-r--r--arch/arm/boot/dts/armada-xp.dtsi14
-rw-r--r--arch/arm/boot/dts/at91rm9200.dtsi4
-rw-r--r--arch/arm/boot/dts/at91sam9260.dtsi18
-rw-r--r--arch/arm/boot/dts/at91sam9263.dtsi36
-rw-r--r--arch/arm/boot/dts/at91sam9g45.dtsi36
-rw-r--r--arch/arm/boot/dts/at91sam9n12.dtsi26
-rw-r--r--arch/arm/boot/dts/at91sam9x5.dtsi92
-rw-r--r--arch/arm/boot/dts/cros5250-common.dtsi12
-rw-r--r--arch/arm/boot/dts/dbx5x0.dtsi4
-rw-r--r--arch/arm/boot/dts/dove-cubox.dts14
-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-smdk5250.dts8
-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-ns2-common.dtsi16
-rw-r--r--arch/arm/boot/dts/kirkwood-topkick.dts17
-rw-r--r--arch/arm/boot/dts/kirkwood.dtsi3
-rw-r--r--arch/arm/boot/dts/kizbox.dts2
-rw-r--r--arch/arm/boot/dts/sunxi.dtsi6
-rw-r--r--arch/arm/boot/dts/twl4030.dtsi4
-rw-r--r--arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts2
-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/at91_dt_defconfig3
-rw-r--r--arch/arm/configs/imx_v6_v7_defconfig1
-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/arch.h3
-rw-r--r--arch/arm/include/asm/mach/irq.h1
-rw-r--r--arch/arm/include/asm/mach/time.h30
-rw-r--r--arch/arm/include/debug/imx.S2
-rw-r--r--arch/arm/kernel/bios32.c18
-rw-r--r--arch/arm/kernel/debug.S2
-rw-r--r--arch/arm/kernel/etm.c4
-rw-r--r--arch/arm/kernel/head.S5
-rw-r--r--arch/arm/kernel/hyp-stub.S18
-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/kernel/time.c53
-rw-r--r--arch/arm/mach-at91/at91rm9200_time.c12
-rw-r--r--arch/arm/mach-at91/at91sam926x_time.c53
-rw-r--r--arch/arm/mach-at91/at91x40_time.c13
-rw-r--r--arch/arm/mach-at91/board-1arm.c2
-rw-r--r--arch/arm/mach-at91/board-afeb-9260v1.c2
-rw-r--r--arch/arm/mach-at91/board-cam60.c2
-rw-r--r--arch/arm/mach-at91/board-carmeva.c2
-rw-r--r--arch/arm/mach-at91/board-cpu9krea.c2
-rw-r--r--arch/arm/mach-at91/board-cpuat91.c2
-rw-r--r--arch/arm/mach-at91/board-csb337.c2
-rw-r--r--arch/arm/mach-at91/board-csb637.c2
-rw-r--r--arch/arm/mach-at91/board-dt.c2
-rw-r--r--arch/arm/mach-at91/board-eb01.c2
-rw-r--r--arch/arm/mach-at91/board-eb9200.c2
-rw-r--r--arch/arm/mach-at91/board-ecbat91.c2
-rw-r--r--arch/arm/mach-at91/board-eco920.c2
-rw-r--r--arch/arm/mach-at91/board-flexibity.c2
-rw-r--r--arch/arm/mach-at91/board-foxg20.c2
-rw-r--r--arch/arm/mach-at91/board-gsia18s.c2
-rw-r--r--arch/arm/mach-at91/board-kafa.c2
-rw-r--r--arch/arm/mach-at91/board-kb9202.c2
-rw-r--r--arch/arm/mach-at91/board-neocore926.c2
-rw-r--r--arch/arm/mach-at91/board-pcontrol-g20.c2
-rw-r--r--arch/arm/mach-at91/board-picotux200.c2
-rw-r--r--arch/arm/mach-at91/board-qil-a9260.c2
-rw-r--r--arch/arm/mach-at91/board-rm9200-dt.c2
-rw-r--r--arch/arm/mach-at91/board-rm9200dk.c2
-rw-r--r--arch/arm/mach-at91/board-rm9200ek.c2
-rw-r--r--arch/arm/mach-at91/board-rsi-ews.c2
-rw-r--r--arch/arm/mach-at91/board-sam9-l9260.c2
-rw-r--r--arch/arm/mach-at91/board-sam9260ek.c2
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c2
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c2
-rw-r--r--arch/arm/mach-at91/board-sam9g20ek.c4
-rw-r--r--arch/arm/mach-at91/board-sam9m10g45ek.c2
-rw-r--r--arch/arm/mach-at91/board-sam9rlek.c2
-rw-r--r--arch/arm/mach-at91/board-snapper9260.c2
-rw-r--r--arch/arm/mach-at91/board-stamp9g20.c4
-rw-r--r--arch/arm/mach-at91/board-usb-a926x.c6
-rw-r--r--arch/arm/mach-at91/board-yl-9200.c2
-rw-r--r--arch/arm/mach-at91/generic.h7
-rw-r--r--arch/arm/mach-at91/setup.c2
-rw-r--r--arch/arm/mach-bcm/Kconfig1
-rw-r--r--arch/arm/mach-bcm/board_bcm.c22
-rw-r--r--arch/arm/mach-bcm2835/bcm2835.c4
-rw-r--r--arch/arm/mach-clps711x/board-autcpu12.c2
-rw-r--r--arch/arm/mach-clps711x/board-cdb89712.c2
-rw-r--r--arch/arm/mach-clps711x/board-clep7312.c2
-rw-r--r--arch/arm/mach-clps711x/board-edb7211.c2
-rw-r--r--arch/arm/mach-clps711x/board-fortunet.c2
-rw-r--r--arch/arm/mach-clps711x/board-p720t.c2
-rw-r--r--arch/arm/mach-clps711x/common.c6
-rw-r--r--arch/arm/mach-clps711x/common.h4
-rw-r--r--arch/arm/mach-cns3xxx/cns3420vb.c4
-rw-r--r--arch/arm/mach-cns3xxx/core.c21
-rw-r--r--arch/arm/mach-cns3xxx/core.h2
-rw-r--r--arch/arm/mach-davinci/board-da830-evm.c2
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c2
-rw-r--r--arch/arm/mach-davinci/board-dm355-evm.c2
-rw-r--r--arch/arm/mach-davinci/board-dm355-leopard.c2
-rw-r--r--arch/arm/mach-davinci/board-dm365-evm.c2
-rw-r--r--arch/arm/mach-davinci/board-dm644x-evm.c2
-rw-r--r--arch/arm/mach-davinci/board-dm646x-evm.c6
-rw-r--r--arch/arm/mach-davinci/board-mityomapl138.c2
-rw-r--r--arch/arm/mach-davinci/board-neuros-osd2.c2
-rw-r--r--arch/arm/mach-davinci/board-omapl138-hawk.c2
-rw-r--r--arch/arm/mach-davinci/board-sffsdr.c2
-rw-r--r--arch/arm/mach-davinci/board-tnetv107x-evm.c2
-rw-r--r--arch/arm/mach-davinci/cdce949.c4
-rw-r--r--arch/arm/mach-davinci/da8xx-dt.c2
-rw-r--r--arch/arm/mach-davinci/include/mach/common.h4
-rw-r--r--arch/arm/mach-davinci/time.c7
-rw-r--r--arch/arm/mach-dove/cm-a510.c2
-rw-r--r--arch/arm/mach-dove/common.c37
-rw-r--r--arch/arm/mach-dove/common.h2
-rw-r--r--arch/arm/mach-dove/dove-db-setup.c2
-rw-r--r--arch/arm/mach-dove/pcie.c2
-rw-r--r--arch/arm/mach-ebsa110/core.c15
-rw-r--r--arch/arm/mach-ep93xx/adssphere.c4
-rw-r--r--arch/arm/mach-ep93xx/core.c38
-rw-r--r--arch/arm/mach-ep93xx/edb93xx.c25
-rw-r--r--arch/arm/mach-ep93xx/gesbc9312.c4
-rw-r--r--arch/arm/mach-ep93xx/include/mach/platform.h2
-rw-r--r--arch/arm/mach-ep93xx/micro9.c13
-rw-r--r--arch/arm/mach-ep93xx/simone.c4
-rw-r--r--arch/arm/mach-ep93xx/snappercl15.c4
-rw-r--r--arch/arm/mach-ep93xx/ts72xx.c4
-rw-r--r--arch/arm/mach-ep93xx/vision_ep9307.c4
-rw-r--r--arch/arm/mach-exynos/Kconfig2
-rw-r--r--arch/arm/mach-exynos/common.c18
-rw-r--r--arch/arm/mach-exynos/common.h22
-rw-r--r--arch/arm/mach-exynos/cpuidle.c3
-rw-r--r--arch/arm/mach-exynos/dev-audio.c3
-rw-r--r--arch/arm/mach-exynos/include/mach/cpufreq.h36
-rw-r--r--arch/arm/mach-exynos/include/mach/pmu.h34
-rw-r--r--arch/arm/mach-exynos/include/mach/regs-audss.h18
-rw-r--r--arch/arm/mach-exynos/include/mach/regs-irq.h2
-rw-r--r--arch/arm/mach-exynos/mach-armlex4210.c4
-rw-r--r--arch/arm/mach-exynos/mach-exynos4-dt.c4
-rw-r--r--arch/arm/mach-exynos/mach-exynos5-dt.c4
-rw-r--r--arch/arm/mach-exynos/mach-nuri.c4
-rw-r--r--arch/arm/mach-exynos/mach-origen.c4
-rw-r--r--arch/arm/mach-exynos/mach-smdk4x12.c7
-rw-r--r--arch/arm/mach-exynos/mach-smdkv310.c7
-rw-r--r--arch/arm/mach-exynos/mach-universal_c210.c4
-rw-r--r--arch/arm/mach-exynos/mct.c25
-rw-r--r--arch/arm/mach-exynos/platsmp.c6
-rw-r--r--arch/arm/mach-exynos/pm.c3
-rw-r--r--arch/arm/mach-exynos/pmu.c3
-rw-r--r--arch/arm/mach-footbridge/cats-hw.c2
-rw-r--r--arch/arm/mach-footbridge/common.h4
-rw-r--r--arch/arm/mach-footbridge/dc21285-timer.c12
-rw-r--r--arch/arm/mach-footbridge/ebsa285.c2
-rw-r--r--arch/arm/mach-footbridge/isa-timer.c6
-rw-r--r--arch/arm/mach-footbridge/netwinder-hw.c2
-rw-r--r--arch/arm/mach-footbridge/personal.c2
-rw-r--r--arch/arm/mach-gemini/board-nas4220b.c6
-rw-r--r--arch/arm/mach-gemini/board-rut1xx.c6
-rw-r--r--arch/arm/mach-gemini/board-wbd111.c6
-rw-r--r--arch/arm/mach-gemini/board-wbd222.c6
-rw-r--r--arch/arm/mach-h720x/common.c6
-rw-r--r--arch/arm/mach-h720x/common.h6
-rw-r--r--arch/arm/mach-h720x/cpu-h7201.c9
-rw-r--r--arch/arm/mach-h720x/cpu-h7202.c9
-rw-r--r--arch/arm/mach-h720x/h7201-eval.c2
-rw-r--r--arch/arm/mach-h720x/h7202-eval.c2
-rw-r--r--arch/arm/mach-highbank/highbank.c19
-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/Kconfig39
-rw-r--r--arch/arm/mach-imx/Makefile3
-rw-r--r--arch/arm/mach-imx/Makefile.boot4
-rw-r--r--arch/arm/mach-imx/clk-imx25.c6
-rw-r--r--arch/arm/mach-imx/clk-imx27.c6
-rw-r--r--arch/arm/mach-imx/clk-imx31.c6
-rw-r--r--arch/arm/mach-imx/clk-imx35.c6
-rw-r--r--arch/arm/mach-imx/clk-imx51-imx53.c6
-rw-r--r--arch/arm/mach-imx/clk-imx6q.c5
-rw-r--r--arch/arm/mach-imx/common.h13
-rw-r--r--arch/arm/mach-imx/cpu-imx5.c39
-rw-r--r--arch/arm/mach-imx/cpufreq.c2
-rw-r--r--arch/arm/mach-imx/devices-imx50.h33
-rw-r--r--arch/arm/mach-imx/devices/Kconfig2
-rw-r--r--arch/arm/mach-imx/devices/devices-common.h1
-rw-r--r--arch/arm/mach-imx/devices/platform-fec.c6
-rw-r--r--arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c15
-rw-r--r--arch/arm/mach-imx/devices/platform-imx-fb.c2
-rw-r--r--arch/arm/mach-imx/devices/platform-imx-i2c.c10
-rw-r--r--arch/arm/mach-imx/devices/platform-imx-uart.c12
-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/hardware.h6
-rw-r--r--arch/arm/mach-imx/hotplug.c10
-rw-r--r--arch/arm/mach-imx/imx25-dt.c11
-rw-r--r--arch/arm/mach-imx/imx27-dt.c16
-rw-r--r--arch/arm/mach-imx/imx31-dt.c16
-rw-r--r--arch/arm/mach-imx/imx51-dt.c16
-rw-r--r--arch/arm/mach-imx/iomux-mx50.h977
-rw-r--r--arch/arm/mach-imx/iram.h41
-rw-r--r--arch/arm/mach-imx/iram_alloc.c3
-rw-r--r--arch/arm/mach-imx/lluart.c47
-rw-r--r--arch/arm/mach-imx/mach-apf9328.c6
-rw-r--r--arch/arm/mach-imx/mach-armadillo5x0.c6
-rw-r--r--arch/arm/mach-imx/mach-bug.c6
-rw-r--r--arch/arm/mach-imx/mach-cpuimx27.c6
-rw-r--r--arch/arm/mach-imx/mach-cpuimx35.c6
-rw-r--r--arch/arm/mach-imx/mach-cpuimx51sd.c6
-rw-r--r--arch/arm/mach-imx/mach-eukrea_cpuimx25.c6
-rw-r--r--arch/arm/mach-imx/mach-imx27_visstrim_m10.c6
-rw-r--r--arch/arm/mach-imx/mach-imx27ipcam.c6
-rw-r--r--arch/arm/mach-imx/mach-imx27lite.c6
-rw-r--r--arch/arm/mach-imx/mach-imx53.c16
-rw-r--r--arch/arm/mach-imx/mach-imx6q.c20
-rw-r--r--arch/arm/mach-imx/mach-kzm_arm11_01.c6
-rw-r--r--arch/arm/mach-imx/mach-mx1ads.c8
-rw-r--r--arch/arm/mach-imx/mach-mx21ads.c6
-rw-r--r--arch/arm/mach-imx/mach-mx25_3ds.c6
-rw-r--r--arch/arm/mach-imx/mach-mx27_3ds.c6
-rw-r--r--arch/arm/mach-imx/mach-mx27ads.c6
-rw-r--r--arch/arm/mach-imx/mach-mx31_3ds.c6
-rw-r--r--arch/arm/mach-imx/mach-mx31ads.c6
-rw-r--r--arch/arm/mach-imx/mach-mx31lilly.c6
-rw-r--r--arch/arm/mach-imx/mach-mx31lite.c6
-rw-r--r--arch/arm/mach-imx/mach-mx31moboard.c6
-rw-r--r--arch/arm/mach-imx/mach-mx35_3ds.c6
-rw-r--r--arch/arm/mach-imx/mach-mx50_rdp.c225
-rw-r--r--arch/arm/mach-imx/mach-mx51_3ds.c178
-rw-r--r--arch/arm/mach-imx/mach-mx51_babbage.c6
-rw-r--r--arch/arm/mach-imx/mach-mxt_td60.c6
-rw-r--r--arch/arm/mach-imx/mach-pca100.c6
-rw-r--r--arch/arm/mach-imx/mach-pcm037.c6
-rw-r--r--arch/arm/mach-imx/mach-pcm038.c6
-rw-r--r--arch/arm/mach-imx/mach-pcm043.c6
-rw-r--r--arch/arm/mach-imx/mach-qong.c6
-rw-r--r--arch/arm/mach-imx/mach-scb9328.c6
-rw-r--r--arch/arm/mach-imx/mach-vpr200.c6
-rw-r--r--arch/arm/mach-imx/mm-imx5.c48
-rw-r--r--arch/arm/mach-imx/mmdc.c2
-rw-r--r--arch/arm/mach-imx/mx50.h290
-rw-r--r--arch/arm/mach-imx/mxc.h13
-rw-r--r--arch/arm/mach-imx/platsmp.c5
-rw-r--r--arch/arm/mach-imx/pm-imx5.c7
-rw-r--r--arch/arm/mach-imx/pm-imx6q.c1
-rw-r--r--arch/arm/mach-imx/time.c15
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c16
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c16
-rw-r--r--arch/arm/mach-integrator/pci_v3.c14
-rw-r--r--arch/arm/mach-iop13xx/iq81340mc.c6
-rw-r--r--arch/arm/mach-iop13xx/iq81340sc.c6
-rw-r--r--arch/arm/mach-iop13xx/pci.c2
-rw-r--r--arch/arm/mach-iop32x/em7210.c6
-rw-r--r--arch/arm/mach-iop32x/glantank.c6
-rw-r--r--arch/arm/mach-iop32x/iq31244.c8
-rw-r--r--arch/arm/mach-iop32x/iq80321.c6
-rw-r--r--arch/arm/mach-iop32x/n2100.c6
-rw-r--r--arch/arm/mach-iop33x/iq80331.c6
-rw-r--r--arch/arm/mach-iop33x/iq80332.c6
-rw-r--r--arch/arm/mach-ixp4xx/avila-setup.c4
-rw-r--r--arch/arm/mach-ixp4xx/common.c15
-rw-r--r--arch/arm/mach-ixp4xx/coyote-setup.c4
-rw-r--r--arch/arm/mach-ixp4xx/dsmg600-setup.c6
-rw-r--r--arch/arm/mach-ixp4xx/fsg-setup.c2
-rw-r--r--arch/arm/mach-ixp4xx/gateway7001-setup.c2
-rw-r--r--arch/arm/mach-ixp4xx/goramo_mlr.c2
-rw-r--r--arch/arm/mach-ixp4xx/gtwx5715-setup.c2
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/platform.h3
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-setup.c8
-rw-r--r--arch/arm/mach-ixp4xx/nas100d-setup.c2
-rw-r--r--arch/arm/mach-ixp4xx/nslu2-setup.c6
-rw-r--r--arch/arm/mach-ixp4xx/omixp-setup.c6
-rw-r--r--arch/arm/mach-ixp4xx/vulcan-setup.c2
-rw-r--r--arch/arm/mach-ixp4xx/wg302v2-setup.c2
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c6
-rw-r--r--arch/arm/mach-kirkwood/board-ib62x0.c1
-rw-r--r--arch/arm/mach-kirkwood/board-mplcec4.c1
-rw-r--r--arch/arm/mach-kirkwood/board-ns2.c38
-rw-r--r--arch/arm/mach-kirkwood/board-nsa310.c9
-rw-r--r--arch/arm/mach-kirkwood/board-usi_topkick.c4
-rw-r--r--arch/arm/mach-kirkwood/common.c6
-rw-r--r--arch/arm/mach-kirkwood/common.h2
-rw-r--r--arch/arm/mach-kirkwood/d2net_v2-setup.c2
-rw-r--r--arch/arm/mach-kirkwood/db88f6281-bp-setup.c2
-rw-r--r--arch/arm/mach-kirkwood/dockstar-setup.c3
-rw-r--r--arch/arm/mach-kirkwood/guruplug-setup.c2
-rw-r--r--arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c2
-rw-r--r--arch/arm/mach-kirkwood/netspace_v2-setup.c6
-rw-r--r--arch/arm/mach-kirkwood/netxbig_v2-setup.c4
-rw-r--r--arch/arm/mach-kirkwood/openrd-setup.c6
-rw-r--r--arch/arm/mach-kirkwood/pcie.c2
-rw-r--r--arch/arm/mach-kirkwood/rd88f6192-nas-setup.c2
-rw-r--r--arch/arm/mach-kirkwood/rd88f6281-setup.c2
-rw-r--r--arch/arm/mach-kirkwood/sheevaplug-setup.c4
-rw-r--r--arch/arm/mach-kirkwood/t5325-setup.c2
-rw-r--r--arch/arm/mach-kirkwood/ts219-setup.c2
-rw-r--r--arch/arm/mach-kirkwood/ts41x-setup.c2
-rw-r--r--arch/arm/mach-ks8695/board-acs5k.c4
-rw-r--r--arch/arm/mach-ks8695/board-dsm320.c2
-rw-r--r--arch/arm/mach-ks8695/board-micrel.c2
-rw-r--r--arch/arm/mach-ks8695/board-og.c10
-rw-r--r--arch/arm/mach-ks8695/board-sg.c6
-rw-r--r--arch/arm/mach-ks8695/generic.h2
-rw-r--r--arch/arm/mach-ks8695/time.c6
-rw-r--r--arch/arm/mach-lpc32xx/common.h2
-rw-r--r--arch/arm/mach-lpc32xx/phy3250.c2
-rw-r--r--arch/arm/mach-lpc32xx/timer.c16
-rw-r--r--arch/arm/mach-mmp/aspenite.c4
-rw-r--r--arch/arm/mach-mmp/avengers_lite.c2
-rw-r--r--arch/arm/mach-mmp/brownstone.c2
-rw-r--r--arch/arm/mach-mmp/common.h2
-rw-r--r--arch/arm/mach-mmp/flint.c2
-rw-r--r--arch/arm/mach-mmp/gplugd.c2
-rw-r--r--arch/arm/mach-mmp/include/mach/mmp2.h4
-rw-r--r--arch/arm/mach-mmp/include/mach/pxa168.h4
-rw-r--r--arch/arm/mach-mmp/include/mach/pxa910.h4
-rw-r--r--arch/arm/mach-mmp/jasper.c2
-rw-r--r--arch/arm/mach-mmp/mmp-dt.c8
-rw-r--r--arch/arm/mach-mmp/mmp2-dt.c6
-rw-r--r--arch/arm/mach-mmp/mmp2.c6
-rw-r--r--arch/arm/mach-mmp/pxa168.c6
-rw-r--r--arch/arm/mach-mmp/pxa910.c6
-rw-r--r--arch/arm/mach-mmp/sram.c4
-rw-r--r--arch/arm/mach-mmp/tavorevb.c2
-rw-r--r--arch/arm/mach-mmp/teton_bga.c2
-rw-r--r--arch/arm/mach-mmp/time.c7
-rw-r--r--arch/arm/mach-mmp/ttc_dkb.c2
-rw-r--r--arch/arm/mach-msm/board-dt-8660.c18
-rw-r--r--arch/arm/mach-msm/board-dt-8960.c18
-rw-r--r--arch/arm/mach-msm/board-halibut.c2
-rw-r--r--arch/arm/mach-msm/board-mahimahi.c4
-rw-r--r--arch/arm/mach-msm/board-msm7x30.c6
-rw-r--r--arch/arm/mach-msm/board-qsd8x50.c4
-rw-r--r--arch/arm/mach-msm/board-sapphire.c4
-rw-r--r--arch/arm/mach-msm/board-trout.c2
-rw-r--r--arch/arm/mach-msm/common.h8
-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.c31
-rw-r--r--arch/arm/mach-mv78xx0/buffalo-wxl-setup.c2
-rw-r--r--arch/arm/mach-mv78xx0/common.c6
-rw-r--r--arch/arm/mach-mv78xx0/common.h2
-rw-r--r--arch/arm/mach-mv78xx0/db78x00-bp-setup.c2
-rw-r--r--arch/arm/mach-mv78xx0/pcie.c2
-rw-r--r--arch/arm/mach-mv78xx0/rd78x00-masa-setup.c2
-rw-r--r--arch/arm/mach-mvebu/Makefile2
-rw-r--r--arch/arm/mach-mvebu/armada-370-xp.c6
-rw-r--r--arch/arm/mach-mxs/mach-mxs.c12
-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/generic.h3
-rw-r--r--arch/arm/mach-netx/nxdb500.c4
-rw-r--r--arch/arm/mach-netx/nxdkn.c4
-rw-r--r--arch/arm/mach-netx/nxeb500hmi.c4
-rw-r--r--arch/arm/mach-netx/time.c16
-rw-r--r--arch/arm/mach-nomadik/board-nhk8815.c9
-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.c4
-rw-r--r--arch/arm/mach-omap1/board-fsample.c2
-rw-r--r--arch/arm/mach-omap1/board-generic.c2
-rw-r--r--arch/arm/mach-omap1/board-h2.c2
-rw-r--r--arch/arm/mach-omap1/board-h3.c2
-rw-r--r--arch/arm/mach-omap1/board-htcherald.c2
-rw-r--r--arch/arm/mach-omap1/board-innovator.c2
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c2
-rw-r--r--arch/arm/mach-omap1/board-osk.c2
-rw-r--r--arch/arm/mach-omap1/board-palmte.c2
-rw-r--r--arch/arm/mach-omap1/board-palmtt.c2
-rw-r--r--arch/arm/mach-omap1/board-palmz71.c2
-rw-r--r--arch/arm/mach-omap1/board-perseus2.c2
-rw-r--r--arch/arm/mach-omap1/board-sx1.c2
-rw-r--r--arch/arm/mach-omap1/board-voiceblue.c2
-rw-r--r--arch/arm/mach-omap1/common.h2
-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.c17
-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-2430sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-3630sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c5
-rw-r--r--arch/arm/mach-omap2/board-am3517crane.c2
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c2
-rw-r--r--arch/arm/mach-omap2/board-apollon.c2
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c4
-rw-r--r--arch/arm/mach-omap2/board-cm-t3517.c2
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c2
-rw-r--r--arch/arm/mach-omap2/board-generic.c17
-rw-r--r--arch/arm/mach-omap2/board-h4.c2
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c4
-rw-r--r--arch/arm/mach-omap2/board-ldp.c2
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c6
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3logic.c4
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c2
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c11
-rw-r--r--arch/arm/mach-omap2/board-overo.c2
-rw-r--r--arch/arm/mach-omap2/board-rm680.c4
-rw-r--r--arch/arm/mach-omap2/board-rx51.c2
-rw-r--r--arch/arm/mach-omap2/board-ti8168evm.c4
-rw-r--r--arch/arm/mach-omap2/board-zoom.c4
-rw-r--r--arch/arm/mach-omap2/cclock2420_data.c2
-rw-r--r--arch/arm/mach-omap2/cclock2430_data.c2
-rw-r--r--arch/arm/mach-omap2/cclock3xxx_data.c2
-rw-r--r--arch/arm/mach-omap2/cclock44xx_data.c13
-rw-r--r--arch/arm/mach-omap2/common.h14
-rw-r--r--arch/arm/mach-omap2/control.h2
-rw-r--r--arch/arm/mach-omap2/devices.c2
-rw-r--r--arch/arm/mach-omap2/dpll3xxx.c3
-rw-r--r--arch/arm/mach-omap2/drm.c4
-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.c7
-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.c43
-rw-r--r--arch/arm/mach-orion5x/board-dt.c2
-rw-r--r--arch/arm/mach-orion5x/common.c6
-rw-r--r--arch/arm/mach-orion5x/common.h2
-rw-r--r--arch/arm/mach-orion5x/d2net-setup.c4
-rw-r--r--arch/arm/mach-orion5x/db88f5281-setup.c2
-rw-r--r--arch/arm/mach-orion5x/dns323-setup.c2
-rw-r--r--arch/arm/mach-orion5x/kurobox_pro-setup.c4
-rw-r--r--arch/arm/mach-orion5x/ls-chl-setup.c2
-rw-r--r--arch/arm/mach-orion5x/ls_hgl-setup.c2
-rw-r--r--arch/arm/mach-orion5x/lsmini-setup.c2
-rw-r--r--arch/arm/mach-orion5x/mss2-setup.c2
-rw-r--r--arch/arm/mach-orion5x/mv2120-setup.c2
-rw-r--r--arch/arm/mach-orion5x/net2big-setup.c2
-rw-r--r--arch/arm/mach-orion5x/pci.c2
-rw-r--r--arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c2
-rw-r--r--arch/arm/mach-orion5x/rd88f5181l-ge-setup.c2
-rw-r--r--arch/arm/mach-orion5x/rd88f5182-setup.c2
-rw-r--r--arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c2
-rw-r--r--arch/arm/mach-orion5x/terastation_pro2-setup.c2
-rw-r--r--arch/arm/mach-orion5x/ts209-setup.c2
-rw-r--r--arch/arm/mach-orion5x/ts409-setup.c2
-rw-r--r--arch/arm/mach-orion5x/ts78xx-setup.c2
-rw-r--r--arch/arm/mach-orion5x/wnr854t-setup.c2
-rw-r--r--arch/arm/mach-orion5x/wrt350n-v2-setup.c2
-rw-r--r--arch/arm/mach-picoxcell/Kconfig1
-rw-r--r--arch/arm/mach-picoxcell/common.c17
-rw-r--r--arch/arm/mach-picoxcell/common.h2
-rw-r--r--arch/arm/mach-prima2/common.c2
-rw-r--r--arch/arm/mach-prima2/common.h2
-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.c18
-rw-r--r--arch/arm/mach-pxa/balloon3.c2
-rw-r--r--arch/arm/mach-pxa/capc7117.c2
-rw-r--r--arch/arm/mach-pxa/cm-x2xx.c2
-rw-r--r--arch/arm/mach-pxa/cm-x300.c2
-rw-r--r--arch/arm/mach-pxa/colibri-pxa270.c4
-rw-r--r--arch/arm/mach-pxa/colibri-pxa300.c2
-rw-r--r--arch/arm/mach-pxa/colibri-pxa320.c2
-rw-r--r--arch/arm/mach-pxa/corgi.c6
-rw-r--r--arch/arm/mach-pxa/corgi_pm.c2
-rw-r--r--arch/arm/mach-pxa/csb726.c2
-rw-r--r--arch/arm/mach-pxa/em-x270.c4
-rw-r--r--arch/arm/mach-pxa/eseries.c12
-rw-r--r--arch/arm/mach-pxa/ezx.c12
-rw-r--r--arch/arm/mach-pxa/generic.h3
-rw-r--r--arch/arm/mach-pxa/gumstix.c2
-rw-r--r--arch/arm/mach-pxa/h5000.c2
-rw-r--r--arch/arm/mach-pxa/himalaya.c2
-rw-r--r--arch/arm/mach-pxa/hx4700.c2
-rw-r--r--arch/arm/mach-pxa/icontrol.c2
-rw-r--r--arch/arm/mach-pxa/idp.c2
-rw-r--r--arch/arm/mach-pxa/include/mach/mfp-pxa27x.h3
-rw-r--r--arch/arm/mach-pxa/include/mach/palmtreo.h5
-rw-r--r--arch/arm/mach-pxa/include/mach/smemc.h1
-rw-r--r--arch/arm/mach-pxa/littleton.c2
-rw-r--r--arch/arm/mach-pxa/lpd270.c2
-rw-r--r--arch/arm/mach-pxa/lubbock.c2
-rw-r--r--arch/arm/mach-pxa/magician.c2
-rw-r--r--arch/arm/mach-pxa/mainstone.c2
-rw-r--r--arch/arm/mach-pxa/mioa701.c2
-rw-r--r--arch/arm/mach-pxa/mp900.c2
-rw-r--r--arch/arm/mach-pxa/palmld.c2
-rw-r--r--arch/arm/mach-pxa/palmt5.c2
-rw-r--r--arch/arm/mach-pxa/palmtc.c2
-rw-r--r--arch/arm/mach-pxa/palmte2.c2
-rw-r--r--arch/arm/mach-pxa/palmtreo.c74
-rw-r--r--arch/arm/mach-pxa/palmtx.c2
-rw-r--r--arch/arm/mach-pxa/palmz72.c2
-rw-r--r--arch/arm/mach-pxa/pcm027.c2
-rw-r--r--arch/arm/mach-pxa/poodle.c2
-rw-r--r--arch/arm/mach-pxa/pxa-dt.c2
-rw-r--r--arch/arm/mach-pxa/pxa27x.c4
-rw-r--r--arch/arm/mach-pxa/raumfeld.c6
-rw-r--r--arch/arm/mach-pxa/saar.c2
-rw-r--r--arch/arm/mach-pxa/sharpsl_pm.c4
-rw-r--r--arch/arm/mach-pxa/smemc.c15
-rw-r--r--arch/arm/mach-pxa/spitz.c10
-rw-r--r--arch/arm/mach-pxa/spitz_pm.c2
-rw-r--r--arch/arm/mach-pxa/stargate2.c4
-rw-r--r--arch/arm/mach-pxa/tavorevb.c2
-rw-r--r--arch/arm/mach-pxa/time.c76
-rw-r--r--arch/arm/mach-pxa/tosa-bt.c4
-rw-r--r--arch/arm/mach-pxa/tosa.c2
-rw-r--r--arch/arm/mach-pxa/trizeps4.c4
-rw-r--r--arch/arm/mach-pxa/viper.c2
-rw-r--r--arch/arm/mach-pxa/vpac270.c2
-rw-r--r--arch/arm/mach-pxa/xcep.c2
-rw-r--r--arch/arm/mach-pxa/z2.c2
-rw-r--r--arch/arm/mach-pxa/zeus.c2
-rw-r--r--arch/arm/mach-pxa/zylonite.c2
-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.c9
-rw-r--r--arch/arm/mach-realview/realview_pb1176.c9
-rw-r--r--arch/arm/mach-realview/realview_pb11mp.c9
-rw-r--r--arch/arm/mach-realview/realview_pba8.c9
-rw-r--r--arch/arm/mach-realview/realview_pbx.c9
-rw-r--r--arch/arm/mach-rpc/riscpc.c4
-rw-r--r--arch/arm/mach-rpc/time.c13
-rw-r--r--arch/arm/mach-s3c2440/Makefile2
-rw-r--r--arch/arm/mach-s3c2440/dsc.c54
-rw-r--r--arch/arm/mach-s3c24xx/anubis.h53
-rw-r--r--arch/arm/mach-s3c24xx/bast-ide.c18
-rw-r--r--arch/arm/mach-s3c24xx/bast-irq.c19
-rw-r--r--arch/arm/mach-s3c24xx/bast.h197
-rw-r--r--arch/arm/mach-s3c24xx/gta02.h (renamed from arch/arm/mach-s3c24xx/include/mach/gta02.h)14
-rw-r--r--arch/arm/mach-s3c24xx/h1940-bluetooth.c8
-rw-r--r--arch/arm/mach-s3c24xx/h1940.h (renamed from arch/arm/mach-s3c24xx/include/mach/h1940-latch.h)22
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/anubis-cpld.h25
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/anubis-irq.h21
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/anubis-map.h38
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/bast-cpld.h53
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/bast-irq.h29
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/bast-map.h146
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/gpio-fns.h1
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h97
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/gpio-track.h33
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/gpio.h87
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/h1940.h24
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/idle.h24
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/osiris-cpld.h30
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/regs-gpio.h2
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/regs-s3c2412.h23
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/regs-s3c2416-mem.h30
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/regs-s3c2416.h24
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/vr1000-cpld.h18
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/vr1000-irq.h26
-rw-r--r--arch/arm/mach-s3c24xx/include/mach/vr1000-map.h110
-rw-r--r--arch/arm/mach-s3c24xx/mach-amlm5900.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-anubis.c15
-rw-r--r--arch/arm/mach-s3c24xx/mach-at2440evb.c3
-rw-r--r--arch/arm/mach-s3c24xx/mach-bast.c54
-rw-r--r--arch/arm/mach-s3c24xx/mach-gta02.c61
-rw-r--r--arch/arm/mach-s3c24xx/mach-h1940.c39
-rw-r--r--arch/arm/mach-s3c24xx/mach-jive.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-mini2440.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-n30.c4
-rw-r--r--arch/arm/mach-s3c24xx/mach-nexcoder.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-osiris-dvs.c6
-rw-r--r--arch/arm/mach-s3c24xx/mach-osiris.c29
-rw-r--r--arch/arm/mach-s3c24xx/mach-otom.c22
-rw-r--r--arch/arm/mach-s3c24xx/mach-qt2410.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-rx1950.c33
-rw-r--r--arch/arm/mach-s3c24xx/mach-rx3715.c18
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2410.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2413.c7
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2416.c3
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2440.c3
-rw-r--r--arch/arm/mach-s3c24xx/mach-smdk2443.c3
-rw-r--r--arch/arm/mach-s3c24xx/mach-tct_hammer.c2
-rw-r--r--arch/arm/mach-s3c24xx/mach-vr1000.c39
-rw-r--r--arch/arm/mach-s3c24xx/mach-vstms.c3
-rw-r--r--arch/arm/mach-s3c24xx/osiris.h (renamed from arch/arm/mach-s3c24xx/include/mach/osiris-map.h)23
-rw-r--r--arch/arm/mach-s3c24xx/otom.h (renamed from arch/arm/mach-s3c24xx/include/mach/otom-map.h)20
-rw-r--r--arch/arm/mach-s3c24xx/pm-s3c2410.c6
-rw-r--r--arch/arm/mach-s3c24xx/pm-s3c2412.c8
-rw-r--r--arch/arm/mach-s3c24xx/regs-dsc.h (renamed from arch/arm/mach-s3c24xx/include/mach/regs-dsc.h)0
-rw-r--r--arch/arm/mach-s3c24xx/s3c2412.c29
-rw-r--r--arch/arm/mach-s3c24xx/s3c244x.c3
-rw-r--r--arch/arm/mach-s3c24xx/simtec-audio.c5
-rw-r--r--arch/arm/mach-s3c24xx/simtec-nor.c3
-rw-r--r--arch/arm/mach-s3c24xx/simtec-usb.c8
-rw-r--r--arch/arm/mach-s3c24xx/vr1000.h118
-rw-r--r--arch/arm/mach-s3c64xx/clock.c3
-rw-r--r--arch/arm/mach-s3c64xx/common.c2
-rw-r--r--arch/arm/mach-s3c64xx/cpuidle.c4
-rw-r--r--arch/arm/mach-s3c64xx/crag6410.h (renamed from arch/arm/mach-s3c64xx/include/mach/crag6410.h)0
-rw-r--r--arch/arm/mach-s3c64xx/dma.c4
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/regs-irq.h1
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/regs-sys.h31
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/tick.h2
-rw-r--r--arch/arm/mach-s3c64xx/mach-anw6410.c6
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410-module.c10
-rw-r--r--arch/arm/mach-s3c64xx/mach-crag6410.c81
-rw-r--r--arch/arm/mach-s3c64xx/mach-hmt.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-mini6410.c8
-rw-r--r--arch/arm/mach-s3c64xx/mach-ncp.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-real6410.c8
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq.c2
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq5.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-smartq7.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6400.c4
-rw-r--r--arch/arm/mach-s3c64xx/mach-smdk6410.c10
-rw-r--r--arch/arm/mach-s3c64xx/pm.c11
-rw-r--r--arch/arm/mach-s3c64xx/regs-gpio-memport.h (renamed from arch/arm/mach-s3c64xx/include/mach/regs-gpio-memport.h)9
-rw-r--r--arch/arm/mach-s3c64xx/regs-modem.h (renamed from arch/arm/mach-s3c64xx/include/mach/regs-modem.h)11
-rw-r--r--arch/arm/mach-s3c64xx/regs-srom.h (renamed from arch/arm/mach-s3c64xx/include/mach/regs-srom.h)11
-rw-r--r--arch/arm/mach-s3c64xx/regs-sys.h30
-rw-r--r--arch/arm/mach-s3c64xx/regs-syscon-power.h (renamed from arch/arm/mach-s3c64xx/include/mach/regs-syscon-power.h)9
-rw-r--r--arch/arm/mach-s3c64xx/setup-usb-phy.c3
-rw-r--r--arch/arm/mach-s5p64x0/clock-s5p6440.c2
-rw-r--r--arch/arm/mach-s5p64x0/clock-s5p6450.c2
-rw-r--r--arch/arm/mach-s5p64x0/clock.h (renamed from arch/arm/mach-s5p64x0/include/mach/s5p64x0-clock.h)9
-rw-r--r--arch/arm/mach-s5p64x0/gpiolib.c508
-rw-r--r--arch/arm/mach-s5p64x0/i2c.h (renamed from arch/arm/mach-s5p64x0/include/mach/i2c.h)3
-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.c6
-rw-r--r--arch/arm/mach-s5p64x0/mach-smdk6450.c6
-rw-r--r--arch/arm/mach-s5p64x0/setup-i2c0.c2
-rw-r--r--arch/arm/mach-s5p64x0/setup-i2c1.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.c4
-rw-r--r--arch/arm/mach-s5pv210/dev-audio.c3
-rw-r--r--arch/arm/mach-s5pv210/include/mach/regs-audss.h18
-rw-r--r--arch/arm/mach-s5pv210/include/mach/regs-irq.h1
-rw-r--r--arch/arm/mach-s5pv210/include/mach/regs-sys.h15
-rw-r--r--arch/arm/mach-s5pv210/include/mach/tick.h26
-rw-r--r--arch/arm/mach-s5pv210/mach-aquila.c4
-rw-r--r--arch/arm/mach-s5pv210/mach-goni.c4
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkc110.c4
-rw-r--r--arch/arm/mach-s5pv210/mach-smdkv210.c4
-rw-r--r--arch/arm/mach-s5pv210/mach-torbreck.c4
-rw-r--r--arch/arm/mach-s5pv210/setup-usb-phy.c7
-rw-r--r--arch/arm/mach-sa1100/assabet.c2
-rw-r--r--arch/arm/mach-sa1100/badge4.c2
-rw-r--r--arch/arm/mach-sa1100/cerf.c2
-rw-r--r--arch/arm/mach-sa1100/collie.c2
-rw-r--r--arch/arm/mach-sa1100/generic.h4
-rw-r--r--arch/arm/mach-sa1100/h3100.c2
-rw-r--r--arch/arm/mach-sa1100/h3600.c2
-rw-r--r--arch/arm/mach-sa1100/hackkit.c2
-rw-r--r--arch/arm/mach-sa1100/jornada720.c2
-rw-r--r--arch/arm/mach-sa1100/jornada720_ssp.c2
-rw-r--r--arch/arm/mach-sa1100/lart.c2
-rw-r--r--arch/arm/mach-sa1100/nanoengine.c2
-rw-r--r--arch/arm/mach-sa1100/neponset.c8
-rw-r--r--arch/arm/mach-sa1100/pleb.c2
-rw-r--r--arch/arm/mach-sa1100/shannon.c2
-rw-r--r--arch/arm/mach-sa1100/simpad.c2
-rw-r--r--arch/arm/mach-sa1100/time.c72
-rw-r--r--arch/arm/mach-shark/core.c6
-rw-r--r--arch/arm/mach-shmobile/board-ag5evm.c5
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c2
-rw-r--r--arch/arm/mach-shmobile/board-armadillo800eva.c5
-rw-r--r--arch/arm/mach-shmobile/board-bonito.c5
-rw-r--r--arch/arm/mach-shmobile/board-kota2.c5
-rw-r--r--arch/arm/mach-shmobile/board-kzm9d.c4
-rw-r--r--arch/arm/mach-shmobile/board-kzm9g.c5
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c2
-rw-r--r--arch/arm/mach-shmobile/board-marzen.c4
-rw-r--r--arch/arm/mach-shmobile/include/mach/common.h5
-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.c19
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7740.c11
-rw-r--r--arch/arm/mach-shmobile/setup-r8a7779.c5
-rw-r--r--arch/arm/mach-shmobile/setup-sh7372.c7
-rw-r--r--arch/arm/mach-shmobile/setup-sh73a0.c5
-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-shmobile/timer.c6
-rw-r--r--arch/arm/mach-socfpga/platsmp.c4
-rw-r--r--arch/arm/mach-socfpga/socfpga.c16
-rw-r--r--arch/arm/mach-spear13xx/include/mach/generic.h3
-rw-r--r--arch/arm/mach-spear13xx/platsmp.c4
-rw-r--r--arch/arm/mach-spear13xx/spear1310.c7
-rw-r--r--arch/arm/mach-spear13xx/spear1340.c7
-rw-r--r--arch/arm/mach-spear13xx/spear13xx.c19
-rw-r--r--arch/arm/mach-spear3xx/include/mach/generic.h3
-rw-r--r--arch/arm/mach-spear3xx/spear300.c7
-rw-r--r--arch/arm/mach-spear3xx/spear310.c7
-rw-r--r--arch/arm/mach-spear3xx/spear320.c7
-rw-r--r--arch/arm/mach-spear3xx/spear3xx.c22
-rw-r--r--arch/arm/mach-spear6xx/spear6xx.c24
-rw-r--r--arch/arm/mach-sunxi/sunxi.c8
-rw-r--r--arch/arm/mach-tegra/board-dt-tegra20.c5
-rw-r--r--arch/arm/mach-tegra/board-dt-tegra30.c4
-rw-r--r--arch/arm/mach-tegra/board.h2
-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.c14
-rw-r--r--arch/arm/mach-u300/core.c5
-rw-r--r--arch/arm/mach-u300/dummyspichip.c6
-rw-r--r--arch/arm/mach-u300/timer.c10
-rw-r--r--arch/arm/mach-u300/timer.h2
-rw-r--r--arch/arm/mach-ux500/board-mop500-uib.c1
-rw-r--r--arch/arm/mach-ux500/board-mop500.c13
-rw-r--r--arch/arm/mach-ux500/cache-l2x0.c3
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c9
-rw-r--r--arch/arm/mach-ux500/cpu.c11
-rw-r--r--arch/arm/mach-ux500/id.c2
-rw-r--r--arch/arm/mach-ux500/id.h (renamed from arch/arm/mach-ux500/include/mach/id.h)21
-rw-r--r--arch/arm/mach-ux500/include/mach/hardware.h1
-rw-r--r--arch/arm/mach-ux500/include/mach/setup.h3
-rw-r--r--arch/arm/mach-ux500/platsmp.c9
-rw-r--r--arch/arm/mach-ux500/timer.c15
-rw-r--r--arch/arm/mach-versatile/core.c9
-rw-r--r--arch/arm/mach-versatile/core.h2
-rw-r--r--arch/arm/mach-versatile/include/mach/irqs.h6
-rw-r--r--arch/arm/mach-versatile/versatile_ab.c4
-rw-r--r--arch/arm/mach-versatile/versatile_dt.c4
-rw-r--r--arch/arm/mach-versatile/versatile_pb.c4
-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.c28
-rw-r--r--arch/arm/mach-vt8500/Kconfig3
-rw-r--r--arch/arm/mach-vt8500/Makefile2
-rw-r--r--arch/arm/mach-vt8500/common.h1
-rw-r--r--arch/arm/mach-vt8500/timer.c184
-rw-r--r--arch/arm/mach-vt8500/vt8500.c7
-rw-r--r--arch/arm/mach-w90x900/mach-nuc910evb.c2
-rw-r--r--arch/arm/mach-w90x900/mach-nuc950evb.c2
-rw-r--r--arch/arm/mach-w90x900/mach-nuc960evb.c2
-rw-r--r--arch/arm/mach-w90x900/nuc9xx.h3
-rw-r--r--arch/arm/mach-w90x900/time.c16
-rw-r--r--arch/arm/mach-zynq/common.c29
-rw-r--r--arch/arm/mach-zynq/common.h2
-rw-r--r--arch/arm/mach-zynq/timer.c150
-rw-r--r--arch/arm/mm/cache-l2x0.c34
-rw-r--r--arch/arm/mm/dma-mapping.c18
-rw-r--r--arch/arm/mm/mmu.c2
-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.h5
-rw-r--r--arch/arm/plat-samsung/include/plat/gpio-core.h13
-rw-r--r--arch/arm/plat-samsung/include/plat/gpio-fns.h1
-rw-r--r--arch/arm/plat-samsung/include/plat/s5p-time.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.c15
-rw-r--r--arch/arm/plat-samsung/time.c20
-rw-r--r--arch/arm/plat-spear/time.c8
-rw-r--r--arch/arm/plat-versatile/headsmp.S2
-rw-r--r--arch/arm/plat-versatile/platsmp.c4
-rw-r--r--arch/arm/vfp/entry.S6
-rw-r--r--arch/arm/vfp/vfphw.S4
-rw-r--r--arch/arm64/Kconfig6
-rw-r--r--arch/arm64/boot/dts/Makefile1
-rw-r--r--arch/arm64/include/asm/compat.h1
-rw-r--r--arch/arm64/include/asm/elf.h5
-rw-r--r--arch/arm64/include/asm/pgtable.h36
-rw-r--r--arch/arm64/include/asm/unistd32.h7
-rw-r--r--arch/arm64/kernel/perf_event.c2
-rw-r--r--arch/arm64/kernel/vdso.c4
-rw-r--r--arch/arm64/kernel/vdso/gettimeofday.S2
-rw-r--r--arch/avr32/lib/delay.c2
-rw-r--r--arch/blackfin/kernel/time.c6
-rw-r--r--arch/blackfin/mach-common/dpmc.c6
-rw-r--r--arch/cris/arch-v10/kernel/time.c10
-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/cris/kernel/time.c11
-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/ptrace.c27
-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/m32r/kernel/time.c4
-rw-r--r--arch/m68k/amiga/config.c10
-rw-r--r--arch/m68k/apollo/config.c9
-rw-r--r--arch/m68k/atari/config.c4
-rw-r--r--arch/m68k/atari/time.c6
-rw-r--r--arch/m68k/bvme6000/config.c10
-rw-r--r--arch/m68k/emu/nfeth.c2
-rw-r--r--arch/m68k/hp300/config.c2
-rw-r--r--arch/m68k/hp300/time.c4
-rw-r--r--arch/m68k/hp300/time.h2
-rw-r--r--arch/m68k/include/asm/dma-mapping.h16
-rw-r--r--arch/m68k/include/asm/machdep.h2
-rw-r--r--arch/m68k/include/asm/parport.h4
-rw-r--r--arch/m68k/include/asm/pgtable_no.h2
-rw-r--r--arch/m68k/include/asm/unistd.h2
-rw-r--r--arch/m68k/include/uapi/asm/unistd.h1
-rw-r--r--arch/m68k/kernel/pcibios.c4
-rw-r--r--arch/m68k/kernel/setup_mm.c1
-rw-r--r--arch/m68k/kernel/syscalltable.S1
-rw-r--r--arch/m68k/kernel/time.c15
-rw-r--r--arch/m68k/mac/config.c4
-rw-r--r--arch/m68k/mac/via.c4
-rw-r--r--arch/m68k/mm/init.c8
-rw-r--r--arch/m68k/mvme147/config.c8
-rw-r--r--arch/m68k/mvme16x/config.c8
-rw-r--r--arch/m68k/q40/config.c8
-rw-r--r--arch/m68k/sun3/config.c4
-rw-r--r--arch/m68k/sun3/intersil.c4
-rw-r--r--arch/m68k/sun3x/config.c2
-rw-r--r--arch/m68k/sun3x/time.c2
-rw-r--r--arch/m68k/sun3x/time.h2
-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/Kconfig1
-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/entry.S18
-rw-r--r--arch/parisc/kernel/hardware.c7
-rw-r--r--arch/parisc/kernel/irq.c6
-rw-r--r--arch/parisc/kernel/ptrace.c2
-rw-r--r--arch/parisc/kernel/signal.c4
-rw-r--r--arch/parisc/math-emu/cnv_float.h11
-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/include/uapi/asm/kvm_para.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/kvm/book3s_hv_ras.c4
-rw-r--r--arch/powerpc/kvm/emulate.c2
-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/Makefile4
-rw-r--r--arch/s390/include/asm/dma.h6
-rw-r--r--arch/s390/include/asm/io.h5
-rw-r--r--arch/s390/include/asm/irq.h78
-rw-r--r--arch/s390/include/asm/pgtable.h5
-rw-r--r--arch/s390/include/asm/timex.h28
-rw-r--r--arch/s390/include/uapi/asm/unistd.h3
-rw-r--r--arch/s390/kernel/compat_wrapper.S6
-rw-r--r--arch/s390/kernel/debug.c11
-rw-r--r--arch/s390/kernel/irq.c124
-rw-r--r--arch/s390/kernel/nmi.c2
-rw-r--r--arch/s390/kernel/perf_cpum_cf.c2
-rw-r--r--arch/s390/kernel/runtime_instr.c2
-rw-r--r--arch/s390/kernel/setup.c3
-rw-r--r--arch/s390/kernel/smp.c11
-rw-r--r--arch/s390/kernel/syscalls.S1
-rw-r--r--arch/s390/kernel/time.c6
-rw-r--r--arch/s390/kernel/topology.c2
-rw-r--r--arch/s390/kvm/interrupt.c2
-rw-r--r--arch/s390/kvm/kvm-s390.c2
-rw-r--r--arch/s390/mm/fault.c2
-rw-r--r--arch/s390/oprofile/hwsampler.c2
-rw-r--r--arch/s390/pci/pci.c35
-rw-r--r--arch/s390/pci/pci_dma.c2
-rw-r--r--arch/score/mm/cache.c2
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c10
-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/sh/include/asm/elf.h4
-rw-r--r--arch/sh/include/asm/processor_32.h2
-rw-r--r--arch/sh/include/asm/processor_64.h2
-rw-r--r--arch/sh/include/uapi/asm/unistd_32.h3
-rw-r--r--arch/sh/include/uapi/asm/unistd_64.h3
-rw-r--r--arch/sh/kernel/syscalls_32.S1
-rw-r--r--arch/sh/kernel/syscalls_64.S1
-rw-r--r--arch/sh/lib/mcount.S2
-rw-r--r--arch/sparc/include/asm/parport.h6
-rw-r--r--arch/sparc/include/asm/timer_64.h2
-rw-r--r--arch/sparc/include/uapi/asm/unistd.h3
-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.c37
-rw-r--r--arch/sparc/kernel/pci_fire.c6
-rw-r--r--arch/sparc/kernel/pci_psycho.c12
-rw-r--r--arch/sparc/kernel/pci_sabre.c9
-rw-r--r--arch/sparc/kernel/pci_schizo.c16
-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/systbls_32.S2
-rw-r--r--arch/sparc/kernel/systbls_64.S4
-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/boot/compressed/eboot.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.c6
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel_uncore.c6
-rw-r--r--arch/x86/kernel/entry_32.S1
-rw-r--r--arch/x86/kernel/kvm.c12
-rw-r--r--arch/x86/kernel/pci-dma.c2
-rw-r--r--arch/x86/kernel/quirks.c4
-rw-r--r--arch/x86/kernel/setup.c80
-rw-r--r--arch/x86/kernel/step.c9
-rw-r--r--arch/x86/kvm/x86.c24
-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
-rw-r--r--arch/x86/xen/smp.c7
1109 files changed, 4093 insertions, 9264 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 f95ba14ae3d0..af74b0fc4faa 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -344,10 +344,10 @@ config ARCH_BCM2835
344 select ARM_ERRATA_411920 344 select ARM_ERRATA_411920
345 select ARM_TIMER_SP804 345 select ARM_TIMER_SP804
346 select CLKDEV_LOOKUP 346 select CLKDEV_LOOKUP
347 select CLKSRC_OF
347 select COMMON_CLK 348 select COMMON_CLK
348 select CPU_V6 349 select CPU_V6
349 select GENERIC_CLOCKEVENTS 350 select GENERIC_CLOCKEVENTS
350 select GENERIC_GPIO
351 select MULTI_IRQ_HANDLER 351 select MULTI_IRQ_HANDLER
352 select PINCTRL 352 select PINCTRL
353 select PINCTRL_BCM2835 353 select PINCTRL_BCM2835
@@ -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
@@ -645,7 +644,6 @@ config ARCH_TEGRA
645 select CLKSRC_MMIO 644 select CLKSRC_MMIO
646 select COMMON_CLK 645 select COMMON_CLK
647 select GENERIC_CLOCKEVENTS 646 select GENERIC_CLOCKEVENTS
648 select GENERIC_GPIO
649 select HAVE_CLK 647 select HAVE_CLK
650 select HAVE_SMP 648 select HAVE_SMP
651 select MIGHT_HAVE_CACHE_L2X0 649 select MIGHT_HAVE_CACHE_L2X0
@@ -745,7 +743,6 @@ config ARCH_S3C24XX
745 select ARCH_HAS_CPUFREQ 743 select ARCH_HAS_CPUFREQ
746 select ARCH_USES_GETTIMEOFFSET 744 select ARCH_USES_GETTIMEOFFSET
747 select CLKDEV_LOOKUP 745 select CLKDEV_LOOKUP
748 select GENERIC_GPIO
749 select HAVE_CLK 746 select HAVE_CLK
750 select HAVE_S3C2410_I2C if I2C 747 select HAVE_S3C2410_I2C if I2C
751 select HAVE_S3C2410_WATCHDOG if WATCHDOG 748 select HAVE_S3C2410_WATCHDOG if WATCHDOG
@@ -788,7 +785,6 @@ config ARCH_S5P64X0
788 select CLKSRC_MMIO 785 select CLKSRC_MMIO
789 select CPU_V6 786 select CPU_V6
790 select GENERIC_CLOCKEVENTS 787 select GENERIC_CLOCKEVENTS
791 select GENERIC_GPIO
792 select HAVE_CLK 788 select HAVE_CLK
793 select HAVE_S3C2410_I2C if I2C 789 select HAVE_S3C2410_I2C if I2C
794 select HAVE_S3C2410_WATCHDOG if WATCHDOG 790 select HAVE_S3C2410_WATCHDOG if WATCHDOG
@@ -803,7 +799,6 @@ config ARCH_S5PC100
803 select ARCH_USES_GETTIMEOFFSET 799 select ARCH_USES_GETTIMEOFFSET
804 select CLKDEV_LOOKUP 800 select CLKDEV_LOOKUP
805 select CPU_V7 801 select CPU_V7
806 select GENERIC_GPIO
807 select HAVE_CLK 802 select HAVE_CLK
808 select HAVE_S3C2410_I2C if I2C 803 select HAVE_S3C2410_I2C if I2C
809 select HAVE_S3C2410_WATCHDOG if WATCHDOG 804 select HAVE_S3C2410_WATCHDOG if WATCHDOG
@@ -821,7 +816,6 @@ config ARCH_S5PV210
821 select CLKSRC_MMIO 816 select CLKSRC_MMIO
822 select CPU_V7 817 select CPU_V7
823 select GENERIC_CLOCKEVENTS 818 select GENERIC_CLOCKEVENTS
824 select GENERIC_GPIO
825 select HAVE_CLK 819 select HAVE_CLK
826 select HAVE_S3C2410_I2C if I2C 820 select HAVE_S3C2410_I2C if I2C
827 select HAVE_S3C2410_WATCHDOG if WATCHDOG 821 select HAVE_S3C2410_WATCHDOG if WATCHDOG
@@ -839,7 +833,6 @@ config ARCH_EXYNOS
839 select CLKDEV_LOOKUP 833 select CLKDEV_LOOKUP
840 select CPU_V7 834 select CPU_V7
841 select GENERIC_CLOCKEVENTS 835 select GENERIC_CLOCKEVENTS
842 select GENERIC_GPIO
843 select HAVE_CLK 836 select HAVE_CLK
844 select HAVE_S3C2410_I2C if I2C 837 select HAVE_S3C2410_I2C if I2C
845 select HAVE_S3C2410_WATCHDOG if WATCHDOG 838 select HAVE_S3C2410_WATCHDOG if WATCHDOG
@@ -874,7 +867,6 @@ config ARCH_U300
874 select COMMON_CLK 867 select COMMON_CLK
875 select CPU_ARM926T 868 select CPU_ARM926T
876 select GENERIC_CLOCKEVENTS 869 select GENERIC_CLOCKEVENTS
877 select GENERIC_GPIO
878 select HAVE_TCM 870 select HAVE_TCM
879 select SPARSE_IRQ 871 select SPARSE_IRQ
880 help 872 help
@@ -958,7 +950,6 @@ config ARCH_VT8500_SINGLE
958 select COMMON_CLK 950 select COMMON_CLK
959 select CPU_ARM926T 951 select CPU_ARM926T
960 select GENERIC_CLOCKEVENTS 952 select GENERIC_CLOCKEVENTS
961 select GENERIC_GPIO
962 select HAVE_CLK 953 select HAVE_CLK
963 select MULTI_IRQ_HANDLER 954 select MULTI_IRQ_HANDLER
964 select SPARSE_IRQ 955 select SPARSE_IRQ
@@ -1230,6 +1221,7 @@ config ARM_ERRATA_430973
1230config ARM_ERRATA_458693 1221config ARM_ERRATA_458693
1231 bool "ARM errata: Processor deadlock when a false hazard is created" 1222 bool "ARM errata: Processor deadlock when a false hazard is created"
1232 depends on CPU_V7 1223 depends on CPU_V7
1224 depends on !ARCH_MULTIPLATFORM
1233 help 1225 help
1234 This option enables the workaround for the 458693 Cortex-A8 (r2p0) 1226 This option enables the workaround for the 458693 Cortex-A8 (r2p0)
1235 erratum. For very specific sequences of memory operations, it is 1227 erratum. For very specific sequences of memory operations, it is
@@ -1243,6 +1235,7 @@ config ARM_ERRATA_458693
1243config ARM_ERRATA_460075 1235config ARM_ERRATA_460075
1244 bool "ARM errata: Data written to the L2 cache can be overwritten with stale data" 1236 bool "ARM errata: Data written to the L2 cache can be overwritten with stale data"
1245 depends on CPU_V7 1237 depends on CPU_V7
1238 depends on !ARCH_MULTIPLATFORM
1246 help 1239 help
1247 This option enables the workaround for the 460075 Cortex-A8 (r2p0) 1240 This option enables the workaround for the 460075 Cortex-A8 (r2p0)
1248 erratum. Any asynchronous access to the L2 cache may encounter a 1241 erratum. Any asynchronous access to the L2 cache may encounter a
@@ -1255,6 +1248,7 @@ config ARM_ERRATA_460075
1255config ARM_ERRATA_742230 1248config ARM_ERRATA_742230
1256 bool "ARM errata: DMB operation may be faulty" 1249 bool "ARM errata: DMB operation may be faulty"
1257 depends on CPU_V7 && SMP 1250 depends on CPU_V7 && SMP
1251 depends on !ARCH_MULTIPLATFORM
1258 help 1252 help
1259 This option enables the workaround for the 742230 Cortex-A9 1253 This option enables the workaround for the 742230 Cortex-A9
1260 (r1p0..r2p2) erratum. Under rare circumstances, a DMB instruction 1254 (r1p0..r2p2) erratum. Under rare circumstances, a DMB instruction
@@ -1267,6 +1261,7 @@ config ARM_ERRATA_742230
1267config ARM_ERRATA_742231 1261config ARM_ERRATA_742231
1268 bool "ARM errata: Incorrect hazard handling in the SCU may lead to data corruption" 1262 bool "ARM errata: Incorrect hazard handling in the SCU may lead to data corruption"
1269 depends on CPU_V7 && SMP 1263 depends on CPU_V7 && SMP
1264 depends on !ARCH_MULTIPLATFORM
1270 help 1265 help
1271 This option enables the workaround for the 742231 Cortex-A9 1266 This option enables the workaround for the 742231 Cortex-A9
1272 (r2p0..r2p2) erratum. Under certain conditions, specific to the 1267 (r2p0..r2p2) erratum. Under certain conditions, specific to the
@@ -1317,6 +1312,7 @@ config PL310_ERRATA_727915
1317config ARM_ERRATA_743622 1312config ARM_ERRATA_743622
1318 bool "ARM errata: Faulty hazard checking in the Store Buffer may lead to data corruption" 1313 bool "ARM errata: Faulty hazard checking in the Store Buffer may lead to data corruption"
1319 depends on CPU_V7 1314 depends on CPU_V7
1315 depends on !ARCH_MULTIPLATFORM
1320 help 1316 help
1321 This option enables the workaround for the 743622 Cortex-A9 1317 This option enables the workaround for the 743622 Cortex-A9
1322 (r2p*) erratum. Under very rare conditions, a faulty 1318 (r2p*) erratum. Under very rare conditions, a faulty
@@ -1330,6 +1326,7 @@ config ARM_ERRATA_743622
1330config ARM_ERRATA_751472 1326config ARM_ERRATA_751472
1331 bool "ARM errata: Interrupted ICIALLUIS may prevent completion of broadcasted operation" 1327 bool "ARM errata: Interrupted ICIALLUIS may prevent completion of broadcasted operation"
1332 depends on CPU_V7 1328 depends on CPU_V7
1329 depends on !ARCH_MULTIPLATFORM
1333 help 1330 help
1334 This option enables the workaround for the 751472 Cortex-A9 (prior 1331 This option enables the workaround for the 751472 Cortex-A9 (prior
1335 to r3p0) erratum. An interrupted ICIALLUIS operation may prevent the 1332 to r3p0) erratum. An interrupted ICIALLUIS operation may prevent the
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 661030d6bc6c..1dceb8e31618 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -219,12 +219,12 @@ choice
219 Say Y here if you want kernel low-level debugging support 219 Say Y here if you want kernel low-level debugging support
220 on i.MX51. 220 on i.MX51.
221 221
222 config DEBUG_IMX50_IMX53_UART 222 config DEBUG_IMX53_UART
223 bool "i.MX50 and i.MX53 Debug UART" 223 bool "i.MX53 Debug UART"
224 depends on SOC_IMX50 || SOC_IMX53 224 depends on SOC_IMX53
225 help 225 help
226 Say Y here if you want kernel low-level debugging support 226 Say Y here if you want kernel low-level debugging support
227 on i.MX50 or i.MX53. 227 on i.MX53.
228 228
229 config DEBUG_IMX6Q_UART 229 config DEBUG_IMX6Q_UART
230 bool "i.MX6Q Debug UART" 230 bool "i.MX6Q Debug UART"
@@ -497,7 +497,7 @@ config DEBUG_LL_INCLUDE
497 DEBUG_IMX21_IMX27_UART || \ 497 DEBUG_IMX21_IMX27_UART || \
498 DEBUG_IMX31_IMX35_UART || \ 498 DEBUG_IMX31_IMX35_UART || \
499 DEBUG_IMX51_UART || \ 499 DEBUG_IMX51_UART || \
500 DEBUG_IMX50_IMX53_UART ||\ 500 DEBUG_IMX53_UART ||\
501 DEBUG_IMX6Q_UART 501 DEBUG_IMX6Q_UART
502 default "debug/highbank.S" if DEBUG_HIGHBANK_UART 502 default "debug/highbank.S" if DEBUG_HIGHBANK_UART
503 default "debug/mvebu.S" if DEBUG_MVEBU_UART 503 default "debug/mvebu.S" if DEBUG_MVEBU_UART
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e44da40d984f..5ebb44fe826a 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -155,6 +155,7 @@ dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \
155dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb 155dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb
156 156
157targets += dtbs 157targets += dtbs
158targets += $(dtb-y)
158endif 159endif
159 160
160# *.dtb used to be generated in the directory above. Clean out the 161# *.dtb used to be generated in the directory above. Clean out the
diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts
index 00044026ef1f..9b82facb2561 100644
--- a/arch/arm/boot/dts/armada-370-db.dts
+++ b/arch/arm/boot/dts/armada-370-db.dts
@@ -26,7 +26,7 @@
26 26
27 memory { 27 memory {
28 device_type = "memory"; 28 device_type = "memory";
29 reg = <0x00000000 0x20000000>; /* 512 MB */ 29 reg = <0x00000000 0x40000000>; /* 1 GB */
30 }; 30 };
31 31
32 soc { 32 soc {
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..e041f42ed711 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 {
@@ -43,27 +50,25 @@
43 }; 50 };
44 51
45 gpio0: gpio@d0018100 { 52 gpio0: gpio@d0018100 {
46 compatible = "marvell,armadaxp-gpio"; 53 compatible = "marvell,orion-gpio";
47 reg = <0xd0018100 0x40>, 54 reg = <0xd0018100 0x40>;
48 <0xd0018800 0x30>;
49 ngpios = <32>; 55 ngpios = <32>;
50 gpio-controller; 56 gpio-controller;
51 #gpio-cells = <2>; 57 #gpio-cells = <2>;
52 interrupt-controller; 58 interrupt-controller;
53 #interrupts-cells = <2>; 59 #interrupts-cells = <2>;
54 interrupts = <16>, <17>, <18>, <19>; 60 interrupts = <82>, <83>, <84>, <85>;
55 }; 61 };
56 62
57 gpio1: gpio@d0018140 { 63 gpio1: gpio@d0018140 {
58 compatible = "marvell,armadaxp-gpio"; 64 compatible = "marvell,orion-gpio";
59 reg = <0xd0018140 0x40>, 65 reg = <0xd0018140 0x40>;
60 <0xd0018840 0x30>;
61 ngpios = <17>; 66 ngpios = <17>;
62 gpio-controller; 67 gpio-controller;
63 #gpio-cells = <2>; 68 #gpio-cells = <2>;
64 interrupt-controller; 69 interrupt-controller;
65 #interrupts-cells = <2>; 70 #interrupts-cells = <2>;
66 interrupts = <20>, <21>, <22>; 71 interrupts = <87>, <88>, <89>;
67 }; 72 };
68 }; 73 };
69}; 74};
diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
index a2aee5707377..9e23bd8c9536 100644
--- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
@@ -51,39 +51,44 @@
51 }; 51 };
52 52
53 gpio0: gpio@d0018100 { 53 gpio0: gpio@d0018100 {
54 compatible = "marvell,armadaxp-gpio"; 54 compatible = "marvell,orion-gpio";
55 reg = <0xd0018100 0x40>, 55 reg = <0xd0018100 0x40>;
56 <0xd0018800 0x30>;
57 ngpios = <32>; 56 ngpios = <32>;
58 gpio-controller; 57 gpio-controller;
59 #gpio-cells = <2>; 58 #gpio-cells = <2>;
60 interrupt-controller; 59 interrupt-controller;
61 #interrupts-cells = <2>; 60 #interrupts-cells = <2>;
62 interrupts = <16>, <17>, <18>, <19>; 61 interrupts = <82>, <83>, <84>, <85>;
63 }; 62 };
64 63
65 gpio1: gpio@d0018140 { 64 gpio1: gpio@d0018140 {
66 compatible = "marvell,armadaxp-gpio"; 65 compatible = "marvell,orion-gpio";
67 reg = <0xd0018140 0x40>, 66 reg = <0xd0018140 0x40>;
68 <0xd0018840 0x30>;
69 ngpios = <32>; 67 ngpios = <32>;
70 gpio-controller; 68 gpio-controller;
71 #gpio-cells = <2>; 69 #gpio-cells = <2>;
72 interrupt-controller; 70 interrupt-controller;
73 #interrupts-cells = <2>; 71 #interrupts-cells = <2>;
74 interrupts = <20>, <21>, <22>, <23>; 72 interrupts = <87>, <88>, <89>, <90>;
75 }; 73 };
76 74
77 gpio2: gpio@d0018180 { 75 gpio2: gpio@d0018180 {
78 compatible = "marvell,armadaxp-gpio"; 76 compatible = "marvell,orion-gpio";
79 reg = <0xd0018180 0x40>, 77 reg = <0xd0018180 0x40>;
80 <0xd0018870 0x30>;
81 ngpios = <3>; 78 ngpios = <3>;
82 gpio-controller; 79 gpio-controller;
83 #gpio-cells = <2>; 80 #gpio-cells = <2>;
84 interrupt-controller; 81 interrupt-controller;
85 #interrupts-cells = <2>; 82 #interrupts-cells = <2>;
86 interrupts = <24>; 83 interrupts = <91>;
84 };
85
86 ethernet@d0034000 {
87 compatible = "marvell,armada-370-neta";
88 reg = <0xd0034000 0x2500>;
89 interrupts = <14>;
90 clocks = <&gateclk 1>;
91 status = "disabled";
87 }; 92 };
88 }; 93 };
89}; 94};
diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
index da03a129243a..965966110e38 100644
--- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi
+++ b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
@@ -66,39 +66,44 @@
66 }; 66 };
67 67
68 gpio0: gpio@d0018100 { 68 gpio0: gpio@d0018100 {
69 compatible = "marvell,armadaxp-gpio"; 69 compatible = "marvell,orion-gpio";
70 reg = <0xd0018100 0x40>, 70 reg = <0xd0018100 0x40>;
71 <0xd0018800 0x30>;
72 ngpios = <32>; 71 ngpios = <32>;
73 gpio-controller; 72 gpio-controller;
74 #gpio-cells = <2>; 73 #gpio-cells = <2>;
75 interrupt-controller; 74 interrupt-controller;
76 #interrupts-cells = <2>; 75 #interrupts-cells = <2>;
77 interrupts = <16>, <17>, <18>, <19>; 76 interrupts = <82>, <83>, <84>, <85>;
78 }; 77 };
79 78
80 gpio1: gpio@d0018140 { 79 gpio1: gpio@d0018140 {
81 compatible = "marvell,armadaxp-gpio"; 80 compatible = "marvell,orion-gpio";
82 reg = <0xd0018140 0x40>, 81 reg = <0xd0018140 0x40>;
83 <0xd0018840 0x30>;
84 ngpios = <32>; 82 ngpios = <32>;
85 gpio-controller; 83 gpio-controller;
86 #gpio-cells = <2>; 84 #gpio-cells = <2>;
87 interrupt-controller; 85 interrupt-controller;
88 #interrupts-cells = <2>; 86 #interrupts-cells = <2>;
89 interrupts = <20>, <21>, <22>, <23>; 87 interrupts = <87>, <88>, <89>, <90>;
90 }; 88 };
91 89
92 gpio2: gpio@d0018180 { 90 gpio2: gpio@d0018180 {
93 compatible = "marvell,armadaxp-gpio"; 91 compatible = "marvell,orion-gpio";
94 reg = <0xd0018180 0x40>, 92 reg = <0xd0018180 0x40>;
95 <0xd0018870 0x30>;
96 ngpios = <3>; 93 ngpios = <3>;
97 gpio-controller; 94 gpio-controller;
98 #gpio-cells = <2>; 95 #gpio-cells = <2>;
99 interrupt-controller; 96 interrupt-controller;
100 #interrupts-cells = <2>; 97 #interrupts-cells = <2>;
101 interrupts = <24>; 98 interrupts = <91>;
99 };
100
101 ethernet@d0034000 {
102 compatible = "marvell,armada-370-neta";
103 reg = <0xd0034000 0x2500>;
104 interrupts = <14>;
105 clocks = <&gateclk 1>;
106 status = "disabled";
102 }; 107 };
103 }; 108 };
104 }; 109 };
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/at91rm9200.dtsi b/arch/arm/boot/dts/at91rm9200.dtsi
index e154f242c680..222047f1ece9 100644
--- a/arch/arm/boot/dts/at91rm9200.dtsi
+++ b/arch/arm/boot/dts/at91rm9200.dtsi
@@ -336,8 +336,8 @@
336 336
337 i2c@0 { 337 i2c@0 {
338 compatible = "i2c-gpio"; 338 compatible = "i2c-gpio";
339 gpios = <&pioA 23 0 /* sda */ 339 gpios = <&pioA 25 0 /* sda */
340 &pioA 24 0 /* scl */ 340 &pioA 26 0 /* scl */
341 >; 341 >;
342 i2c-gpio,sda-open-drain; 342 i2c-gpio,sda-open-drain;
343 i2c-gpio,scl-open-drain; 343 i2c-gpio,scl-open-drain;
diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
index 68bccf41a2c6..cb7bcc51608d 100644
--- a/arch/arm/boot/dts/at91sam9260.dtsi
+++ b/arch/arm/boot/dts/at91sam9260.dtsi
@@ -306,6 +306,22 @@
306 }; 306 };
307 }; 307 };
308 308
309 ssc0 {
310 pinctrl_ssc0_tx: ssc0_tx-0 {
311 atmel,pins =
312 <1 16 0x1 0x0 /* PB16 periph A */
313 1 17 0x1 0x0 /* PB17 periph A */
314 1 18 0x1 0x0>; /* PB18 periph A */
315 };
316
317 pinctrl_ssc0_rx: ssc0_rx-0 {
318 atmel,pins =
319 <1 19 0x1 0x0 /* PB19 periph A */
320 1 20 0x1 0x0 /* PB20 periph A */
321 1 21 0x1 0x0>; /* PB21 periph A */
322 };
323 };
324
309 pioA: gpio@fffff400 { 325 pioA: gpio@fffff400 {
310 compatible = "atmel,at91rm9200-gpio"; 326 compatible = "atmel,at91rm9200-gpio";
311 reg = <0xfffff400 0x200>; 327 reg = <0xfffff400 0x200>;
@@ -450,6 +466,8 @@
450 compatible = "atmel,at91rm9200-ssc"; 466 compatible = "atmel,at91rm9200-ssc";
451 reg = <0xfffbc000 0x4000>; 467 reg = <0xfffbc000 0x4000>;
452 interrupts = <14 4 5>; 468 interrupts = <14 4 5>;
469 pinctrl-names = "default";
470 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
453 status = "disabled"; 471 status = "disabled";
454 }; 472 };
455 473
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi
index 32ec62cf5385..271d4de026e9 100644
--- a/arch/arm/boot/dts/at91sam9263.dtsi
+++ b/arch/arm/boot/dts/at91sam9263.dtsi
@@ -271,6 +271,38 @@
271 }; 271 };
272 }; 272 };
273 273
274 ssc0 {
275 pinctrl_ssc0_tx: ssc0_tx-0 {
276 atmel,pins =
277 <1 0 0x2 0x0 /* PB0 periph B */
278 1 1 0x2 0x0 /* PB1 periph B */
279 1 2 0x2 0x0>; /* PB2 periph B */
280 };
281
282 pinctrl_ssc0_rx: ssc0_rx-0 {
283 atmel,pins =
284 <1 3 0x2 0x0 /* PB3 periph B */
285 1 4 0x2 0x0 /* PB4 periph B */
286 1 5 0x2 0x0>; /* PB5 periph B */
287 };
288 };
289
290 ssc1 {
291 pinctrl_ssc1_tx: ssc1_tx-0 {
292 atmel,pins =
293 <1 6 0x1 0x0 /* PB6 periph A */
294 1 7 0x1 0x0 /* PB7 periph A */
295 1 8 0x1 0x0>; /* PB8 periph A */
296 };
297
298 pinctrl_ssc1_rx: ssc1_rx-0 {
299 atmel,pins =
300 <1 9 0x1 0x0 /* PB9 periph A */
301 1 10 0x1 0x0 /* PB10 periph A */
302 1 11 0x1 0x0>; /* PB11 periph A */
303 };
304 };
305
274 pioA: gpio@fffff200 { 306 pioA: gpio@fffff200 {
275 compatible = "atmel,at91rm9200-gpio"; 307 compatible = "atmel,at91rm9200-gpio";
276 reg = <0xfffff200 0x200>; 308 reg = <0xfffff200 0x200>;
@@ -368,6 +400,8 @@
368 compatible = "atmel,at91rm9200-ssc"; 400 compatible = "atmel,at91rm9200-ssc";
369 reg = <0xfff98000 0x4000>; 401 reg = <0xfff98000 0x4000>;
370 interrupts = <16 4 5>; 402 interrupts = <16 4 5>;
403 pinctrl-names = "default";
404 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
371 status = "disabled"; 405 status = "disabled";
372 }; 406 };
373 407
@@ -375,6 +409,8 @@
375 compatible = "atmel,at91rm9200-ssc"; 409 compatible = "atmel,at91rm9200-ssc";
376 reg = <0xfff9c000 0x4000>; 410 reg = <0xfff9c000 0x4000>;
377 interrupts = <17 4 5>; 411 interrupts = <17 4 5>;
412 pinctrl-names = "default";
413 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
378 status = "disabled"; 414 status = "disabled";
379 }; 415 };
380 416
diff --git a/arch/arm/boot/dts/at91sam9g45.dtsi b/arch/arm/boot/dts/at91sam9g45.dtsi
index 231858ffd850..6b1d4cab24c2 100644
--- a/arch/arm/boot/dts/at91sam9g45.dtsi
+++ b/arch/arm/boot/dts/at91sam9g45.dtsi
@@ -290,6 +290,38 @@
290 }; 290 };
291 }; 291 };
292 292
293 ssc0 {
294 pinctrl_ssc0_tx: ssc0_tx-0 {
295 atmel,pins =
296 <3 0 0x1 0x0 /* PD0 periph A */
297 3 1 0x1 0x0 /* PD1 periph A */
298 3 2 0x1 0x0>; /* PD2 periph A */
299 };
300
301 pinctrl_ssc0_rx: ssc0_rx-0 {
302 atmel,pins =
303 <3 3 0x1 0x0 /* PD3 periph A */
304 3 4 0x1 0x0 /* PD4 periph A */
305 3 5 0x1 0x0>; /* PD5 periph A */
306 };
307 };
308
309 ssc1 {
310 pinctrl_ssc1_tx: ssc1_tx-0 {
311 atmel,pins =
312 <3 10 0x1 0x0 /* PD10 periph A */
313 3 11 0x1 0x0 /* PD11 periph A */
314 3 12 0x1 0x0>; /* PD12 periph A */
315 };
316
317 pinctrl_ssc1_rx: ssc1_rx-0 {
318 atmel,pins =
319 <3 13 0x1 0x0 /* PD13 periph A */
320 3 14 0x1 0x0 /* PD14 periph A */
321 3 15 0x1 0x0>; /* PD15 periph A */
322 };
323 };
324
293 pioA: gpio@fffff200 { 325 pioA: gpio@fffff200 {
294 compatible = "atmel,at91rm9200-gpio"; 326 compatible = "atmel,at91rm9200-gpio";
295 reg = <0xfffff200 0x200>; 327 reg = <0xfffff200 0x200>;
@@ -425,6 +457,8 @@
425 compatible = "atmel,at91sam9g45-ssc"; 457 compatible = "atmel,at91sam9g45-ssc";
426 reg = <0xfff9c000 0x4000>; 458 reg = <0xfff9c000 0x4000>;
427 interrupts = <16 4 5>; 459 interrupts = <16 4 5>;
460 pinctrl-names = "default";
461 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
428 status = "disabled"; 462 status = "disabled";
429 }; 463 };
430 464
@@ -432,6 +466,8 @@
432 compatible = "atmel,at91sam9g45-ssc"; 466 compatible = "atmel,at91sam9g45-ssc";
433 reg = <0xfffa0000 0x4000>; 467 reg = <0xfffa0000 0x4000>;
434 interrupts = <17 4 5>; 468 interrupts = <17 4 5>;
469 pinctrl-names = "default";
470 pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
435 status = "disabled"; 471 status = "disabled";
436 }; 472 };
437 473
diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi
index e9efb34f4379..80e29c605d4e 100644
--- a/arch/arm/boot/dts/at91sam9n12.dtsi
+++ b/arch/arm/boot/dts/at91sam9n12.dtsi
@@ -28,6 +28,7 @@
28 tcb1 = &tcb1; 28 tcb1 = &tcb1;
29 i2c0 = &i2c0; 29 i2c0 = &i2c0;
30 i2c1 = &i2c1; 30 i2c1 = &i2c1;
31 ssc0 = &ssc0;
31 }; 32 };
32 cpus { 33 cpus {
33 cpu@0 { 34 cpu@0 {
@@ -244,6 +245,22 @@
244 }; 245 };
245 }; 246 };
246 247
248 ssc0 {
249 pinctrl_ssc0_tx: ssc0_tx-0 {
250 atmel,pins =
251 <0 24 0x2 0x0 /* PA24 periph B */
252 0 25 0x2 0x0 /* PA25 periph B */
253 0 26 0x2 0x0>; /* PA26 periph B */
254 };
255
256 pinctrl_ssc0_rx: ssc0_rx-0 {
257 atmel,pins =
258 <0 27 0x2 0x0 /* PA27 periph B */
259 0 28 0x2 0x0 /* PA28 periph B */
260 0 29 0x2 0x0>; /* PA29 periph B */
261 };
262 };
263
247 pioA: gpio@fffff400 { 264 pioA: gpio@fffff400 {
248 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 265 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
249 reg = <0xfffff400 0x200>; 266 reg = <0xfffff400 0x200>;
@@ -294,6 +311,15 @@
294 status = "disabled"; 311 status = "disabled";
295 }; 312 };
296 313
314 ssc0: ssc@f0010000 {
315 compatible = "atmel,at91sam9g45-ssc";
316 reg = <0xf0010000 0x4000>;
317 interrupts = <28 4 5>;
318 pinctrl-names = "default";
319 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
320 status = "disabled";
321 };
322
297 usart0: serial@f801c000 { 323 usart0: serial@f801c000 {
298 compatible = "atmel,at91sam9260-usart"; 324 compatible = "atmel,at91sam9260-usart";
299 reg = <0xf801c000 0x4000>; 325 reg = <0xf801c000 0x4000>;
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index 40ac3a4eb1ab..8ecca6948d81 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -88,13 +88,6 @@
88 interrupts = <1 4 7>; 88 interrupts = <1 4 7>;
89 }; 89 };
90 90
91 ssc0: ssc@f0010000 {
92 compatible = "atmel,at91sam9g45-ssc";
93 reg = <0xf0010000 0x4000>;
94 interrupts = <28 4 5>;
95 status = "disabled";
96 };
97
98 tcb0: timer@f8008000 { 91 tcb0: timer@f8008000 {
99 compatible = "atmel,at91sam9x5-tcb"; 92 compatible = "atmel,at91sam9x5-tcb";
100 reg = <0xf8008000 0x100>; 93 reg = <0xf8008000 0x100>;
@@ -150,6 +143,11 @@
150 atmel,pins = 143 atmel,pins =
151 <0 3 0x1 0x0>; /* PA3 periph A */ 144 <0 3 0x1 0x0>; /* PA3 periph A */
152 }; 145 };
146
147 pinctrl_usart0_sck: usart0_sck-0 {
148 atmel,pins =
149 <0 4 0x1 0x0>; /* PA4 periph A */
150 };
153 }; 151 };
154 152
155 usart1 { 153 usart1 {
@@ -161,12 +159,17 @@
161 159
162 pinctrl_usart1_rts: usart1_rts-0 { 160 pinctrl_usart1_rts: usart1_rts-0 {
163 atmel,pins = 161 atmel,pins =
164 <3 27 0x3 0x0>; /* PC27 periph C */ 162 <2 27 0x3 0x0>; /* PC27 periph C */
165 }; 163 };
166 164
167 pinctrl_usart1_cts: usart1_cts-0 { 165 pinctrl_usart1_cts: usart1_cts-0 {
168 atmel,pins = 166 atmel,pins =
169 <3 28 0x3 0x0>; /* PC28 periph C */ 167 <2 28 0x3 0x0>; /* PC28 periph C */
168 };
169
170 pinctrl_usart1_sck: usart1_sck-0 {
171 atmel,pins =
172 <2 28 0x3 0x0>; /* PC29 periph C */
170 }; 173 };
171 }; 174 };
172 175
@@ -179,46 +182,56 @@
179 182
180 pinctrl_uart2_rts: uart2_rts-0 { 183 pinctrl_uart2_rts: uart2_rts-0 {
181 atmel,pins = 184 atmel,pins =
182 <0 0 0x2 0x0>; /* PB0 periph B */ 185 <1 0 0x2 0x0>; /* PB0 periph B */
183 }; 186 };
184 187
185 pinctrl_uart2_cts: uart2_cts-0 { 188 pinctrl_uart2_cts: uart2_cts-0 {
186 atmel,pins = 189 atmel,pins =
187 <0 1 0x2 0x0>; /* PB1 periph B */ 190 <1 1 0x2 0x0>; /* PB1 periph B */
191 };
192
193 pinctrl_usart2_sck: usart2_sck-0 {
194 atmel,pins =
195 <1 2 0x2 0x0>; /* PB2 periph B */
188 }; 196 };
189 }; 197 };
190 198
191 usart3 { 199 usart3 {
192 pinctrl_uart3: usart3-0 { 200 pinctrl_uart3: usart3-0 {
193 atmel,pins = 201 atmel,pins =
194 <3 23 0x2 0x1 /* PC22 periph B with pullup */ 202 <2 23 0x2 0x1 /* PC22 periph B with pullup */
195 3 23 0x2 0x0>; /* PC23 periph B */ 203 2 23 0x2 0x0>; /* PC23 periph B */
196 }; 204 };
197 205
198 pinctrl_usart3_rts: usart3_rts-0 { 206 pinctrl_usart3_rts: usart3_rts-0 {
199 atmel,pins = 207 atmel,pins =
200 <3 24 0x2 0x0>; /* PC24 periph B */ 208 <2 24 0x2 0x0>; /* PC24 periph B */
201 }; 209 };
202 210
203 pinctrl_usart3_cts: usart3_cts-0 { 211 pinctrl_usart3_cts: usart3_cts-0 {
204 atmel,pins = 212 atmel,pins =
205 <3 25 0x2 0x0>; /* PC25 periph B */ 213 <2 25 0x2 0x0>; /* PC25 periph B */
214 };
215
216 pinctrl_usart3_sck: usart3_sck-0 {
217 atmel,pins =
218 <2 26 0x2 0x0>; /* PC26 periph B */
206 }; 219 };
207 }; 220 };
208 221
209 uart0 { 222 uart0 {
210 pinctrl_uart0: uart0-0 { 223 pinctrl_uart0: uart0-0 {
211 atmel,pins = 224 atmel,pins =
212 <3 8 0x3 0x0 /* PC8 periph C */ 225 <2 8 0x3 0x0 /* PC8 periph C */
213 3 9 0x3 0x1>; /* PC9 periph C with pullup */ 226 2 9 0x3 0x1>; /* PC9 periph C with pullup */
214 }; 227 };
215 }; 228 };
216 229
217 uart1 { 230 uart1 {
218 pinctrl_uart1: uart1-0 { 231 pinctrl_uart1: uart1-0 {
219 atmel,pins = 232 atmel,pins =
220 <3 16 0x3 0x0 /* PC16 periph C */ 233 <2 16 0x3 0x0 /* PC16 periph C */
221 3 17 0x3 0x1>; /* PC17 periph C with pullup */ 234 2 17 0x3 0x1>; /* PC17 periph C with pullup */
222 }; 235 };
223 }; 236 };
224 237
@@ -247,14 +260,14 @@
247 260
248 pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 { 261 pinctrl_macb0_rmii_mii: macb0_rmii_mii-0 {
249 atmel,pins = 262 atmel,pins =
250 <1 8 0x1 0x0 /* PA8 periph A */ 263 <1 8 0x1 0x0 /* PB8 periph A */
251 1 11 0x1 0x0 /* PA11 periph A */ 264 1 11 0x1 0x0 /* PB11 periph A */
252 1 12 0x1 0x0 /* PA12 periph A */ 265 1 12 0x1 0x0 /* PB12 periph A */
253 1 13 0x1 0x0 /* PA13 periph A */ 266 1 13 0x1 0x0 /* PB13 periph A */
254 1 14 0x1 0x0 /* PA14 periph A */ 267 1 14 0x1 0x0 /* PB14 periph A */
255 1 15 0x1 0x0 /* PA15 periph A */ 268 1 15 0x1 0x0 /* PB15 periph A */
256 1 16 0x1 0x0 /* PA16 periph A */ 269 1 16 0x1 0x0 /* PB16 periph A */
257 1 17 0x1 0x0>; /* PA17 periph A */ 270 1 17 0x1 0x0>; /* PB17 periph A */
258 }; 271 };
259 }; 272 };
260 273
@@ -290,6 +303,22 @@
290 }; 303 };
291 }; 304 };
292 305
306 ssc0 {
307 pinctrl_ssc0_tx: ssc0_tx-0 {
308 atmel,pins =
309 <0 24 0x2 0x0 /* PA24 periph B */
310 0 25 0x2 0x0 /* PA25 periph B */
311 0 26 0x2 0x0>; /* PA26 periph B */
312 };
313
314 pinctrl_ssc0_rx: ssc0_rx-0 {
315 atmel,pins =
316 <0 27 0x2 0x0 /* PA27 periph B */
317 0 28 0x2 0x0 /* PA28 periph B */
318 0 29 0x2 0x0>; /* PA29 periph B */
319 };
320 };
321
293 pioA: gpio@fffff400 { 322 pioA: gpio@fffff400 {
294 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio"; 323 compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
295 reg = <0xfffff400 0x200>; 324 reg = <0xfffff400 0x200>;
@@ -333,6 +362,15 @@
333 }; 362 };
334 }; 363 };
335 364
365 ssc0: ssc@f0010000 {
366 compatible = "atmel,at91sam9g45-ssc";
367 reg = <0xf0010000 0x4000>;
368 interrupts = <28 4 5>;
369 pinctrl-names = "default";
370 pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
371 status = "disabled";
372 };
373
336 mmc0: mmc@f0008000 { 374 mmc0: mmc@f0008000 {
337 compatible = "atmel,hsmci"; 375 compatible = "atmel,hsmci";
338 reg = <0xf0008000 0x600>; 376 reg = <0xf0008000 0x600>;
diff --git a/arch/arm/boot/dts/cros5250-common.dtsi b/arch/arm/boot/dts/cros5250-common.dtsi
index fddd17417433..46c098017036 100644
--- a/arch/arm/boot/dts/cros5250-common.dtsi
+++ b/arch/arm/boot/dts/cros5250-common.dtsi
@@ -96,8 +96,8 @@
96 fifo-depth = <0x80>; 96 fifo-depth = <0x80>;
97 card-detect-delay = <200>; 97 card-detect-delay = <200>;
98 samsung,dw-mshc-ciu-div = <3>; 98 samsung,dw-mshc-ciu-div = <3>;
99 samsung,dw-mshc-sdr-timing = <2 3 3>; 99 samsung,dw-mshc-sdr-timing = <2 3>;
100 samsung,dw-mshc-ddr-timing = <1 2 3>; 100 samsung,dw-mshc-ddr-timing = <1 2>;
101 101
102 slot@0 { 102 slot@0 {
103 reg = <0>; 103 reg = <0>;
@@ -120,8 +120,8 @@
120 fifo-depth = <0x80>; 120 fifo-depth = <0x80>;
121 card-detect-delay = <200>; 121 card-detect-delay = <200>;
122 samsung,dw-mshc-ciu-div = <3>; 122 samsung,dw-mshc-ciu-div = <3>;
123 samsung,dw-mshc-sdr-timing = <2 3 3>; 123 samsung,dw-mshc-sdr-timing = <2 3>;
124 samsung,dw-mshc-ddr-timing = <1 2 3>; 124 samsung,dw-mshc-ddr-timing = <1 2>;
125 125
126 slot@0 { 126 slot@0 {
127 reg = <0>; 127 reg = <0>;
@@ -141,8 +141,8 @@
141 fifo-depth = <0x80>; 141 fifo-depth = <0x80>;
142 card-detect-delay = <200>; 142 card-detect-delay = <200>;
143 samsung,dw-mshc-ciu-div = <3>; 143 samsung,dw-mshc-ciu-div = <3>;
144 samsung,dw-mshc-sdr-timing = <2 3 3>; 144 samsung,dw-mshc-sdr-timing = <2 3>;
145 samsung,dw-mshc-ddr-timing = <1 2 3>; 145 samsung,dw-mshc-ddr-timing = <1 2>;
146 146
147 slot@0 { 147 slot@0 {
148 reg = <0>; 148 reg = <0>;
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-cubox.dts b/arch/arm/boot/dts/dove-cubox.dts
index fed7d3f9f431..cdee96fca6e2 100644
--- a/arch/arm/boot/dts/dove-cubox.dts
+++ b/arch/arm/boot/dts/dove-cubox.dts
@@ -26,10 +26,15 @@
26}; 26};
27 27
28&uart0 { status = "okay"; }; 28&uart0 { status = "okay"; };
29&sdio0 { status = "okay"; };
30&sata0 { status = "okay"; }; 29&sata0 { status = "okay"; };
31&i2c0 { status = "okay"; }; 30&i2c0 { status = "okay"; };
32 31
32&sdio0 {
33 status = "okay";
34 /* sdio0 card detect is connected to wrong pin on CuBox */
35 cd-gpios = <&gpio0 12 1>;
36};
37
33&spi0 { 38&spi0 {
34 status = "okay"; 39 status = "okay";
35 40
@@ -42,9 +47,14 @@
42}; 47};
43 48
44&pinctrl { 49&pinctrl {
45 pinctrl-0 = <&pmx_gpio_18>; 50 pinctrl-0 = <&pmx_gpio_12 &pmx_gpio_18>;
46 pinctrl-names = "default"; 51 pinctrl-names = "default";
47 52
53 pmx_gpio_12: pmx-gpio-12 {
54 marvell,pins = "mpp12";
55 marvell,function = "gpio";
56 };
57
48 pmx_gpio_18: pmx-gpio-18 { 58 pmx_gpio_18: pmx-gpio-18 {
49 marvell,pins = "mpp18"; 59 marvell,pins = "mpp18";
50 marvell,function = "gpio"; 60 marvell,function = "gpio";
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-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts
index 942d5761ca97..e05b18f3c33d 100644
--- a/arch/arm/boot/dts/exynos5250-smdk5250.dts
+++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts
@@ -115,8 +115,8 @@
115 fifo-depth = <0x80>; 115 fifo-depth = <0x80>;
116 card-detect-delay = <200>; 116 card-detect-delay = <200>;
117 samsung,dw-mshc-ciu-div = <3>; 117 samsung,dw-mshc-ciu-div = <3>;
118 samsung,dw-mshc-sdr-timing = <2 3 3>; 118 samsung,dw-mshc-sdr-timing = <2 3>;
119 samsung,dw-mshc-ddr-timing = <1 2 3>; 119 samsung,dw-mshc-ddr-timing = <1 2>;
120 120
121 slot@0 { 121 slot@0 {
122 reg = <0>; 122 reg = <0>;
@@ -139,8 +139,8 @@
139 fifo-depth = <0x80>; 139 fifo-depth = <0x80>;
140 card-detect-delay = <200>; 140 card-detect-delay = <200>;
141 samsung,dw-mshc-ciu-div = <3>; 141 samsung,dw-mshc-ciu-div = <3>;
142 samsung,dw-mshc-sdr-timing = <2 3 3>; 142 samsung,dw-mshc-sdr-timing = <2 3>;
143 samsung,dw-mshc-ddr-timing = <1 2 3>; 143 samsung,dw-mshc-ddr-timing = <1 2>;
144 144
145 slot@0 { 145 slot@0 {
146 reg = <0>; 146 reg = <0>;
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-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
index 9bc6785ad228..77d21abfcdf7 100644
--- a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
+++ b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
@@ -1,4 +1,5 @@
1/include/ "kirkwood.dtsi" 1/include/ "kirkwood.dtsi"
2/include/ "kirkwood-6281.dtsi"
2 3
3/ { 4/ {
4 chosen { 5 chosen {
@@ -6,6 +7,21 @@
6 }; 7 };
7 8
8 ocp@f1000000 { 9 ocp@f1000000 {
10 pinctrl: pinctrl@10000 {
11 pinctrl-0 = < &pmx_spi &pmx_twsi0 &pmx_uart0
12 &pmx_ns2_sata0 &pmx_ns2_sata1>;
13 pinctrl-names = "default";
14
15 pmx_ns2_sata0: pmx-ns2-sata0 {
16 marvell,pins = "mpp21";
17 marvell,function = "sata0";
18 };
19 pmx_ns2_sata1: pmx-ns2-sata1 {
20 marvell,pins = "mpp20";
21 marvell,function = "sata1";
22 };
23 };
24
9 serial@12000 { 25 serial@12000 {
10 clock-frequency = <166666667>; 26 clock-frequency = <166666667>;
11 status = "okay"; 27 status = "okay";
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..d6ab442b7011 100644
--- a/arch/arm/boot/dts/kirkwood.dtsi
+++ b/arch/arm/boot/dts/kirkwood.dtsi
@@ -36,6 +36,7 @@
36 reg = <0x10100 0x40>; 36 reg = <0x10100 0x40>;
37 ngpios = <32>; 37 ngpios = <32>;
38 interrupt-controller; 38 interrupt-controller;
39 #interrupt-cells = <2>;
39 interrupts = <35>, <36>, <37>, <38>; 40 interrupts = <35>, <36>, <37>, <38>;
40 }; 41 };
41 42
@@ -46,6 +47,7 @@
46 reg = <0x10140 0x40>; 47 reg = <0x10140 0x40>;
47 ngpios = <18>; 48 ngpios = <18>;
48 interrupt-controller; 49 interrupt-controller;
50 #interrupt-cells = <2>;
49 interrupts = <39>, <40>, <41>; 51 interrupts = <39>, <40>, <41>;
50 }; 52 };
51 53
@@ -144,6 +146,7 @@
144 compatible = "marvell,orion-ehci"; 146 compatible = "marvell,orion-ehci";
145 reg = <0x50000 0x1000>; 147 reg = <0x50000 0x1000>;
146 interrupts = <19>; 148 interrupts = <19>;
149 clocks = <&gate_clk 3>;
147 status = "okay"; 150 status = "okay";
148 }; 151 };
149 152
diff --git a/arch/arm/boot/dts/kizbox.dts b/arch/arm/boot/dts/kizbox.dts
index e8814fe0e277..b4dc3ed9a3ec 100644
--- a/arch/arm/boot/dts/kizbox.dts
+++ b/arch/arm/boot/dts/kizbox.dts
@@ -48,6 +48,8 @@
48 48
49 macb0: ethernet@fffc4000 { 49 macb0: ethernet@fffc4000 {
50 phy-mode = "mii"; 50 phy-mode = "mii";
51 pinctrl-0 = <&pinctrl_macb_rmii
52 &pinctrl_macb_rmii_mii_alt>;
51 status = "okay"; 53 status = "okay";
52 }; 54 };
53 55
diff --git a/arch/arm/boot/dts/sunxi.dtsi b/arch/arm/boot/dts/sunxi.dtsi
index 8bbc2bfef221..8b36abea9f2e 100644
--- a/arch/arm/boot/dts/sunxi.dtsi
+++ b/arch/arm/boot/dts/sunxi.dtsi
@@ -60,19 +60,21 @@
60 }; 60 };
61 61
62 uart0: uart@01c28000 { 62 uart0: uart@01c28000 {
63 compatible = "ns8250"; 63 compatible = "snps,dw-apb-uart";
64 reg = <0x01c28000 0x400>; 64 reg = <0x01c28000 0x400>;
65 interrupts = <1>; 65 interrupts = <1>;
66 reg-shift = <2>; 66 reg-shift = <2>;
67 reg-io-width = <4>;
67 clock-frequency = <24000000>; 68 clock-frequency = <24000000>;
68 status = "disabled"; 69 status = "disabled";
69 }; 70 };
70 71
71 uart1: uart@01c28400 { 72 uart1: uart@01c28400 {
72 compatible = "ns8250"; 73 compatible = "snps,dw-apb-uart";
73 reg = <0x01c28400 0x400>; 74 reg = <0x01c28400 0x400>;
74 interrupts = <2>; 75 interrupts = <2>;
75 reg-shift = <2>; 76 reg-shift = <2>;
77 reg-io-width = <4>;
76 clock-frequency = <24000000>; 78 clock-frequency = <24000000>;
77 status = "disabled"; 79 status = "disabled";
78 }; 80 };
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/vexpress-v2p-ca15_a7.dts b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
index 1fc405a9ecfb..cf8071ad22d5 100644
--- a/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
+++ b/arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts
@@ -45,7 +45,6 @@
45 reg = <1>; 45 reg = <1>;
46 }; 46 };
47 47
48/* A7s disabled till big.LITTLE patches are available...
49 cpu2: cpu@2 { 48 cpu2: cpu@2 {
50 device_type = "cpu"; 49 device_type = "cpu";
51 compatible = "arm,cortex-a7"; 50 compatible = "arm,cortex-a7";
@@ -63,7 +62,6 @@
63 compatible = "arm,cortex-a7"; 62 compatible = "arm,cortex-a7";
64 reg = <0x102>; 63 reg = <0x102>;
65 }; 64 };
66*/
67 }; 65 };
68 66
69 memory@80000000 { 67 memory@80000000 {
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/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig
index b175577d7abb..1ea959019fcd 100644
--- a/arch/arm/configs/at91_dt_defconfig
+++ b/arch/arm/configs/at91_dt_defconfig
@@ -19,6 +19,7 @@ CONFIG_SOC_AT91SAM9260=y
19CONFIG_SOC_AT91SAM9263=y 19CONFIG_SOC_AT91SAM9263=y
20CONFIG_SOC_AT91SAM9G45=y 20CONFIG_SOC_AT91SAM9G45=y
21CONFIG_SOC_AT91SAM9X5=y 21CONFIG_SOC_AT91SAM9X5=y
22CONFIG_SOC_AT91SAM9N12=y
22CONFIG_MACH_AT91SAM_DT=y 23CONFIG_MACH_AT91SAM_DT=y
23CONFIG_AT91_PROGRAMMABLE_CLOCKS=y 24CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
24CONFIG_AT91_TIMER_HZ=128 25CONFIG_AT91_TIMER_HZ=128
@@ -31,7 +32,7 @@ CONFIG_ZBOOT_ROM_TEXT=0x0
31CONFIG_ZBOOT_ROM_BSS=0x0 32CONFIG_ZBOOT_ROM_BSS=0x0
32CONFIG_ARM_APPENDED_DTB=y 33CONFIG_ARM_APPENDED_DTB=y
33CONFIG_ARM_ATAG_DTB_COMPAT=y 34CONFIG_ARM_ATAG_DTB_COMPAT=y
34CONFIG_CMDLINE="mem=128M console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw" 35CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw"
35CONFIG_KEXEC=y 36CONFIG_KEXEC=y
36CONFIG_AUTO_ZRELADDR=y 37CONFIG_AUTO_ZRELADDR=y
37# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set 38# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index 69667133321f..6dddbf877b0c 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -32,7 +32,6 @@ CONFIG_MACH_PCM043=y
32CONFIG_MACH_MX35_3DS=y 32CONFIG_MACH_MX35_3DS=y
33CONFIG_MACH_VPR200=y 33CONFIG_MACH_VPR200=y
34CONFIG_MACH_IMX51_DT=y 34CONFIG_MACH_IMX51_DT=y
35CONFIG_MACH_MX51_3DS=y
36CONFIG_MACH_EUKREA_CPUIMX51SD=y 35CONFIG_MACH_EUKREA_CPUIMX51SD=y
37CONFIG_SOC_IMX53=y 36CONFIG_SOC_IMX53=y
38CONFIG_SOC_IMX6Q=y 37CONFIG_SOC_IMX6Q=y
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/arch.h b/arch/arm/include/asm/mach/arch.h
index 917d4fcfd9b4..308ad7d6f98b 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -12,7 +12,6 @@
12 12
13struct tag; 13struct tag;
14struct meminfo; 14struct meminfo;
15struct sys_timer;
16struct pt_regs; 15struct pt_regs;
17struct smp_operations; 16struct smp_operations;
18#ifdef CONFIG_SMP 17#ifdef CONFIG_SMP
@@ -48,7 +47,7 @@ struct machine_desc {
48 void (*map_io)(void);/* IO mapping function */ 47 void (*map_io)(void);/* IO mapping function */
49 void (*init_early)(void); 48 void (*init_early)(void);
50 void (*init_irq)(void); 49 void (*init_irq)(void);
51 struct sys_timer *timer; /* system tick timer */ 50 void (*init_time)(void);
52 void (*init_machine)(void); 51 void (*init_machine)(void);
53 void (*init_late)(void); 52 void (*init_late)(void);
54#ifdef CONFIG_MULTI_IRQ_HANDLER 53#ifdef CONFIG_MULTI_IRQ_HANDLER
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/include/asm/mach/time.h b/arch/arm/include/asm/mach/time.h
index 6ca945f534ab..90c12e1e695c 100644
--- a/arch/arm/include/asm/mach/time.h
+++ b/arch/arm/include/asm/mach/time.h
@@ -10,36 +10,6 @@
10#ifndef __ASM_ARM_MACH_TIME_H 10#ifndef __ASM_ARM_MACH_TIME_H
11#define __ASM_ARM_MACH_TIME_H 11#define __ASM_ARM_MACH_TIME_H
12 12
13/*
14 * This is our kernel timer structure.
15 *
16 * - init
17 * Initialise the kernels jiffy timer source, claim interrupt
18 * using setup_irq. This is called early on during initialisation
19 * while interrupts are still disabled on the local CPU.
20 * - suspend
21 * Suspend the kernel jiffy timer source, if necessary. This
22 * is called with interrupts disabled, after all normal devices
23 * have been suspended. If no action is required, set this to
24 * NULL.
25 * - resume
26 * Resume the kernel jiffy timer source, if necessary. This
27 * is called with interrupts disabled before any normal devices
28 * are resumed. If no action is required, set this to NULL.
29 * - offset
30 * Return the timer offset in microseconds since the last timer
31 * interrupt. Note: this must take account of any unprocessed
32 * timer interrupt which may be pending.
33 */
34struct sys_timer {
35 void (*init)(void);
36 void (*suspend)(void);
37 void (*resume)(void);
38#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
39 unsigned long (*offset)(void);
40#endif
41};
42
43extern void timer_tick(void); 13extern void timer_tick(void);
44 14
45struct timespec; 15struct timespec;
diff --git a/arch/arm/include/debug/imx.S b/arch/arm/include/debug/imx.S
index 0c4e17d4d359..c6f294cf18f0 100644
--- a/arch/arm/include/debug/imx.S
+++ b/arch/arm/include/debug/imx.S
@@ -34,7 +34,7 @@
34#define UART_PADDR 0x43f90000 34#define UART_PADDR 0x43f90000
35#elif defined (CONFIG_DEBUG_IMX51_UART) 35#elif defined (CONFIG_DEBUG_IMX51_UART)
36#define UART_PADDR 0x73fbc000 36#define UART_PADDR 0x73fbc000
37#elif defined (CONFIG_DEBUG_IMX50_IMX53_UART) 37#elif defined (CONFIG_DEBUG_IMX53_UART)
38#define UART_PADDR 0x53fbc000 38#define UART_PADDR 0x53fbc000
39#elif defined (CONFIG_DEBUG_IMX6Q_UART) 39#elif defined (CONFIG_DEBUG_IMX6Q_UART)
40#define UART_PADDR IMX6Q_DEBUG_UART_BASE 40#define UART_PADDR IMX6Q_DEBUG_UART_BASE
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/debug.S b/arch/arm/kernel/debug.S
index 6809200c31fb..14f7c3b14632 100644
--- a/arch/arm/kernel/debug.S
+++ b/arch/arm/kernel/debug.S
@@ -100,12 +100,14 @@ ENTRY(printch)
100 b 1b 100 b 1b
101ENDPROC(printch) 101ENDPROC(printch)
102 102
103#ifdef CONFIG_MMU
103ENTRY(debug_ll_addr) 104ENTRY(debug_ll_addr)
104 addruart r2, r3, ip 105 addruart r2, r3, ip
105 str r2, [r0] 106 str r2, [r0]
106 str r3, [r1] 107 str r3, [r1]
107 mov pc, lr 108 mov pc, lr
108ENDPROC(debug_ll_addr) 109ENDPROC(debug_ll_addr)
110#endif
109 111
110#else 112#else
111 113
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/head.S b/arch/arm/kernel/head.S
index 4eee351f4668..486a15ae9011 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -246,6 +246,7 @@ __create_page_tables:
246 246
247 /* 247 /*
248 * Then map boot params address in r2 if specified. 248 * Then map boot params address in r2 if specified.
249 * We map 2 sections in case the ATAGs/DTB crosses a section boundary.
249 */ 250 */
250 mov r0, r2, lsr #SECTION_SHIFT 251 mov r0, r2, lsr #SECTION_SHIFT
251 movs r0, r0, lsl #SECTION_SHIFT 252 movs r0, r0, lsl #SECTION_SHIFT
@@ -253,6 +254,8 @@ __create_page_tables:
253 addne r3, r3, #PAGE_OFFSET 254 addne r3, r3, #PAGE_OFFSET
254 addne r3, r4, r3, lsr #(SECTION_SHIFT - PMD_ORDER) 255 addne r3, r4, r3, lsr #(SECTION_SHIFT - PMD_ORDER)
255 orrne r6, r7, r0 256 orrne r6, r7, r0
257 strne r6, [r3], #1 << PMD_ORDER
258 addne r6, r6, #1 << SECTION_SHIFT
256 strne r6, [r3] 259 strne r6, [r3]
257 260
258#ifdef CONFIG_DEBUG_LL 261#ifdef CONFIG_DEBUG_LL
@@ -331,7 +334,7 @@ ENTRY(secondary_startup)
331 * as it has already been validated by the primary processor. 334 * as it has already been validated by the primary processor.
332 */ 335 */
333#ifdef CONFIG_ARM_VIRT_EXT 336#ifdef CONFIG_ARM_VIRT_EXT
334 bl __hyp_stub_install 337 bl __hyp_stub_install_secondary
335#endif 338#endif
336 safe_svcmode_maskall r9 339 safe_svcmode_maskall r9
337 340
diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S
index 65b2417aebce..1315c4ccfa56 100644
--- a/arch/arm/kernel/hyp-stub.S
+++ b/arch/arm/kernel/hyp-stub.S
@@ -99,7 +99,7 @@ ENTRY(__hyp_stub_install_secondary)
99 * immediately. 99 * immediately.
100 */ 100 */
101 compare_cpu_mode_with_primary r4, r5, r6, r7 101 compare_cpu_mode_with_primary r4, r5, r6, r7
102 bxne lr 102 movne pc, lr
103 103
104 /* 104 /*
105 * Once we have given up on one CPU, we do not try to install the 105 * Once we have given up on one CPU, we do not try to install the
@@ -111,7 +111,7 @@ ENTRY(__hyp_stub_install_secondary)
111 */ 111 */
112 112
113 cmp r4, #HYP_MODE 113 cmp r4, #HYP_MODE
114 bxne lr @ give up if the CPU is not in HYP mode 114 movne pc, lr @ give up if the CPU is not in HYP mode
115 115
116/* 116/*
117 * Configure HSCTLR to set correct exception endianness/instruction set 117 * Configure HSCTLR to set correct exception endianness/instruction set
@@ -120,7 +120,8 @@ ENTRY(__hyp_stub_install_secondary)
120 * Eventually, CPU-specific code might be needed -- assume not for now 120 * Eventually, CPU-specific code might be needed -- assume not for now
121 * 121 *
122 * This code relies on the "eret" instruction to synchronize the 122 * This code relies on the "eret" instruction to synchronize the
123 * various coprocessor accesses. 123 * various coprocessor accesses. This is done when we switch to SVC
124 * (see safe_svcmode_maskall).
124 */ 125 */
125 @ Now install the hypervisor stub: 126 @ Now install the hypervisor stub:
126 adr r7, __hyp_stub_vectors 127 adr r7, __hyp_stub_vectors
@@ -155,14 +156,7 @@ THUMB( orr r7, #(1 << 30) ) @ HSCTLR.TE
1551: 1561:
156#endif 157#endif
157 158
158 bic r7, r4, #MODE_MASK 159 bx lr @ The boot CPU mode is left in r4.
159 orr r7, r7, #SVC_MODE
160THUMB( orr r7, r7, #PSR_T_BIT )
161 msr spsr_cxsf, r7 @ This is SPSR_hyp.
162
163 __MSR_ELR_HYP(14) @ msr elr_hyp, lr
164 __ERET @ return, switching to SVC mode
165 @ The boot CPU mode is left in r4.
166ENDPROC(__hyp_stub_install_secondary) 160ENDPROC(__hyp_stub_install_secondary)
167 161
168__hyp_stub_do_trap: 162__hyp_stub_do_trap:
@@ -200,7 +194,7 @@ ENDPROC(__hyp_get_vectors)
200 @ fall through 194 @ fall through
201ENTRY(__hyp_set_vectors) 195ENTRY(__hyp_set_vectors)
202 __HVC(0) 196 __HVC(0)
203 bx lr 197 mov pc, lr
204ENDPROC(__hyp_set_vectors) 198ENDPROC(__hyp_set_vectors)
205 199
206#ifndef ZIMAGE 200#ifndef ZIMAGE
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/kernel/time.c b/arch/arm/kernel/time.c
index 09be0c3c9069..955d92d265e5 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -21,7 +21,6 @@
21#include <linux/timex.h> 21#include <linux/timex.h>
22#include <linux/errno.h> 22#include <linux/errno.h>
23#include <linux/profile.h> 23#include <linux/profile.h>
24#include <linux/syscore_ops.h>
25#include <linux/timer.h> 24#include <linux/timer.h>
26#include <linux/irq.h> 25#include <linux/irq.h>
27 26
@@ -31,11 +30,6 @@
31#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
32#include <asm/mach/time.h> 31#include <asm/mach/time.h>
33 32
34/*
35 * Our system timer.
36 */
37static struct sys_timer *system_timer;
38
39#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \ 33#if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \
40 defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE) 34 defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE)
41/* this needs a better home */ 35/* this needs a better home */
@@ -69,16 +63,6 @@ unsigned long profile_pc(struct pt_regs *regs)
69EXPORT_SYMBOL(profile_pc); 63EXPORT_SYMBOL(profile_pc);
70#endif 64#endif
71 65
72#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
73u32 arch_gettimeoffset(void)
74{
75 if (system_timer->offset != NULL)
76 return system_timer->offset() * 1000;
77
78 return 0;
79}
80#endif /* CONFIG_ARCH_USES_GETTIMEOFFSET */
81
82#ifndef CONFIG_GENERIC_CLOCKEVENTS 66#ifndef CONFIG_GENERIC_CLOCKEVENTS
83/* 67/*
84 * Kernel system timer support. 68 * Kernel system timer support.
@@ -129,43 +113,8 @@ int __init register_persistent_clock(clock_access_fn read_boot,
129 return -EINVAL; 113 return -EINVAL;
130} 114}
131 115
132#if defined(CONFIG_PM) && !defined(CONFIG_GENERIC_CLOCKEVENTS)
133static int timer_suspend(void)
134{
135 if (system_timer->suspend)
136 system_timer->suspend();
137
138 return 0;
139}
140
141static void timer_resume(void)
142{
143 if (system_timer->resume)
144 system_timer->resume();
145}
146#else
147#define timer_suspend NULL
148#define timer_resume NULL
149#endif
150
151static struct syscore_ops timer_syscore_ops = {
152 .suspend = timer_suspend,
153 .resume = timer_resume,
154};
155
156static int __init timer_init_syscore_ops(void)
157{
158 register_syscore_ops(&timer_syscore_ops);
159
160 return 0;
161}
162
163device_initcall(timer_init_syscore_ops);
164
165void __init time_init(void) 116void __init time_init(void)
166{ 117{
167 system_timer = machine_desc->timer; 118 machine_desc->init_time();
168 system_timer->init();
169 sched_clock_postinit(); 119 sched_clock_postinit();
170} 120}
171
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c
index cafe98836c8a..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,17 +264,10 @@ 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);
276} 273}
277
278struct sys_timer at91rm9200_timer = {
279 .init = at91rm9200_timer_init,
280};
281
diff --git a/arch/arm/mach-at91/at91sam926x_time.c b/arch/arm/mach-at91/at91sam926x_time.c
index 358412f1f5f8..3a4bc2e1a65e 100644
--- a/arch/arm/mach-at91/at91sam926x_time.c
+++ b/arch/arm/mach-at91/at91sam926x_time.c
@@ -104,12 +104,38 @@ pit_clkevt_mode(enum clock_event_mode mode, struct clock_event_device *dev)
104 } 104 }
105} 105}
106 106
107static void at91sam926x_pit_suspend(struct clock_event_device *cedev)
108{
109 /* Disable timer */
110 pit_write(AT91_PIT_MR, 0);
111}
112
113static void at91sam926x_pit_reset(void)
114{
115 /* Disable timer and irqs */
116 pit_write(AT91_PIT_MR, 0);
117
118 /* Clear any pending interrupts, wait for PIT to stop counting */
119 while (PIT_CPIV(pit_read(AT91_PIT_PIVR)) != 0)
120 cpu_relax();
121
122 /* Start PIT but don't enable IRQ */
123 pit_write(AT91_PIT_MR, (pit_cycle - 1) | AT91_PIT_PITEN);
124}
125
126static void at91sam926x_pit_resume(struct clock_event_device *cedev)
127{
128 at91sam926x_pit_reset();
129}
130
107static struct clock_event_device pit_clkevt = { 131static struct clock_event_device pit_clkevt = {
108 .name = "pit", 132 .name = "pit",
109 .features = CLOCK_EVT_FEAT_PERIODIC, 133 .features = CLOCK_EVT_FEAT_PERIODIC,
110 .shift = 32, 134 .shift = 32,
111 .rating = 100, 135 .rating = 100,
112 .set_mode = pit_clkevt_mode, 136 .set_mode = pit_clkevt_mode,
137 .suspend = at91sam926x_pit_suspend,
138 .resume = at91sam926x_pit_resume,
113}; 139};
114 140
115 141
@@ -150,19 +176,6 @@ static struct irqaction at91sam926x_pit_irq = {
150 .irq = NR_IRQS_LEGACY + AT91_ID_SYS, 176 .irq = NR_IRQS_LEGACY + AT91_ID_SYS,
151}; 177};
152 178
153static void at91sam926x_pit_reset(void)
154{
155 /* Disable timer and irqs */
156 pit_write(AT91_PIT_MR, 0);
157
158 /* Clear any pending interrupts, wait for PIT to stop counting */
159 while (PIT_CPIV(pit_read(AT91_PIT_PIVR)) != 0)
160 cpu_relax();
161
162 /* Start PIT but don't enable IRQ */
163 pit_write(AT91_PIT_MR, (pit_cycle - 1) | AT91_PIT_PITEN);
164}
165
166#ifdef CONFIG_OF 179#ifdef CONFIG_OF
167static struct of_device_id pit_timer_ids[] = { 180static struct of_device_id pit_timer_ids[] = {
168 { .compatible = "atmel,at91sam9260-pit" }, 181 { .compatible = "atmel,at91sam9260-pit" },
@@ -211,7 +224,7 @@ static int __init of_at91sam926x_pit_init(void)
211/* 224/*
212 * Set up both clocksource and clockevent support. 225 * Set up both clocksource and clockevent support.
213 */ 226 */
214static void __init at91sam926x_pit_init(void) 227void __init at91sam926x_pit_init(void)
215{ 228{
216 unsigned long pit_rate; 229 unsigned long pit_rate;
217 unsigned bits; 230 unsigned bits;
@@ -250,12 +263,6 @@ static void __init at91sam926x_pit_init(void)
250 clockevents_register_device(&pit_clkevt); 263 clockevents_register_device(&pit_clkevt);
251} 264}
252 265
253static void at91sam926x_pit_suspend(void)
254{
255 /* Disable timer */
256 pit_write(AT91_PIT_MR, 0);
257}
258
259void __init at91sam926x_ioremap_pit(u32 addr) 266void __init at91sam926x_ioremap_pit(u32 addr)
260{ 267{
261#if defined(CONFIG_OF) 268#if defined(CONFIG_OF)
@@ -272,9 +279,3 @@ void __init at91sam926x_ioremap_pit(u32 addr)
272 if (!pit_base_addr) 279 if (!pit_base_addr)
273 panic("Impossible to ioremap PIT\n"); 280 panic("Impossible to ioremap PIT\n");
274} 281}
275
276struct sys_timer at91sam926x_timer = {
277 .init = at91sam926x_pit_init,
278 .suspend = at91sam926x_pit_suspend,
279 .resume = at91sam926x_pit_reset,
280};
diff --git a/arch/arm/mach-at91/at91x40_time.c b/arch/arm/mach-at91/at91x40_time.c
index 0e57e440c061..0c07a4459cb2 100644
--- a/arch/arm/mach-at91/at91x40_time.c
+++ b/arch/arm/mach-at91/at91x40_time.c
@@ -42,9 +42,10 @@
42#define AT91_TC_CLK1BASE 0x40 42#define AT91_TC_CLK1BASE 0x40
43#define AT91_TC_CLK2BASE 0x80 43#define AT91_TC_CLK2BASE 0x80
44 44
45static unsigned long at91x40_gettimeoffset(void) 45static u32 at91x40_gettimeoffset(void)
46{ 46{
47 return (at91_tc_read(AT91_TC_CLK1BASE + AT91_TC_CV) * 1000000 / (AT91X40_MASTER_CLOCK / 128)); 47 return (at91_tc_read(AT91_TC_CLK1BASE + AT91_TC_CV) * 1000000 /
48 (AT91X40_MASTER_CLOCK / 128)) * 1000;
48} 49}
49 50
50static irqreturn_t at91x40_timer_interrupt(int irq, void *dev_id) 51static irqreturn_t at91x40_timer_interrupt(int irq, void *dev_id)
@@ -64,6 +65,8 @@ void __init at91x40_timer_init(void)
64{ 65{
65 unsigned int v; 66 unsigned int v;
66 67
68 arch_gettimeoffset = at91x40_gettimeoffset;
69
67 at91_tc_write(AT91_TC_BCR, 0); 70 at91_tc_write(AT91_TC_BCR, 0);
68 v = at91_tc_read(AT91_TC_BMR); 71 v = at91_tc_read(AT91_TC_BMR);
69 v = (v & ~AT91_TC_TC1XC1S) | AT91_TC_TC1XC1S_NONE; 72 v = (v & ~AT91_TC_TC1XC1S) | AT91_TC_TC1XC1S_NONE;
@@ -79,9 +82,3 @@ void __init at91x40_timer_init(void)
79 82
80 at91_tc_write(AT91_TC_CLK1BASE + AT91_TC_CCR, (AT91_TC_SWTRG | AT91_TC_CLKEN)); 83 at91_tc_write(AT91_TC_CLK1BASE + AT91_TC_CCR, (AT91_TC_SWTRG | AT91_TC_CLKEN));
81} 84}
82
83struct sys_timer at91x40_timer = {
84 .init = at91x40_timer_init,
85 .offset = at91x40_gettimeoffset,
86};
87
diff --git a/arch/arm/mach-at91/board-1arm.c b/arch/arm/mach-at91/board-1arm.c
index b99b5752cc10..35ab632bbf68 100644
--- a/arch/arm/mach-at91/board-1arm.c
+++ b/arch/arm/mach-at91/board-1arm.c
@@ -90,7 +90,7 @@ static void __init onearm_board_init(void)
90 90
91MACHINE_START(ONEARM, "Ajeco 1ARM single board computer") 91MACHINE_START(ONEARM, "Ajeco 1ARM single board computer")
92 /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ 92 /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
93 .timer = &at91rm9200_timer, 93 .init_time = at91rm9200_timer_init,
94 .map_io = at91_map_io, 94 .map_io = at91_map_io,
95 .handle_irq = at91_aic_handle_irq, 95 .handle_irq = at91_aic_handle_irq,
96 .init_early = onearm_init_early, 96 .init_early = onearm_init_early,
diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c
index 854b97974287..f95e31cda4b3 100644
--- a/arch/arm/mach-at91/board-afeb-9260v1.c
+++ b/arch/arm/mach-at91/board-afeb-9260v1.c
@@ -210,7 +210,7 @@ static void __init afeb9260_board_init(void)
210 210
211MACHINE_START(AFEB9260, "Custom afeb9260 board") 211MACHINE_START(AFEB9260, "Custom afeb9260 board")
212 /* Maintainer: Sergey Lapin <slapin@ossfans.org> */ 212 /* Maintainer: Sergey Lapin <slapin@ossfans.org> */
213 .timer = &at91sam926x_timer, 213 .init_time = at91sam926x_pit_init,
214 .map_io = at91_map_io, 214 .map_io = at91_map_io,
215 .handle_irq = at91_aic_handle_irq, 215 .handle_irq = at91_aic_handle_irq,
216 .init_early = afeb9260_init_early, 216 .init_early = afeb9260_init_early,
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c
index 28a18ce6d914..ade948b82662 100644
--- a/arch/arm/mach-at91/board-cam60.c
+++ b/arch/arm/mach-at91/board-cam60.c
@@ -187,7 +187,7 @@ static void __init cam60_board_init(void)
187 187
188MACHINE_START(CAM60, "KwikByte CAM60") 188MACHINE_START(CAM60, "KwikByte CAM60")
189 /* Maintainer: KwikByte */ 189 /* Maintainer: KwikByte */
190 .timer = &at91sam926x_timer, 190 .init_time = at91sam926x_pit_init,
191 .map_io = at91_map_io, 191 .map_io = at91_map_io,
192 .handle_irq = at91_aic_handle_irq, 192 .handle_irq = at91_aic_handle_irq,
193 .init_early = cam60_init_early, 193 .init_early = cam60_init_early,
diff --git a/arch/arm/mach-at91/board-carmeva.c b/arch/arm/mach-at91/board-carmeva.c
index c17bb533a949..92983050a9bd 100644
--- a/arch/arm/mach-at91/board-carmeva.c
+++ b/arch/arm/mach-at91/board-carmeva.c
@@ -157,7 +157,7 @@ static void __init carmeva_board_init(void)
157 157
158MACHINE_START(CARMEVA, "Carmeva") 158MACHINE_START(CARMEVA, "Carmeva")
159 /* Maintainer: Conitec Datasystems */ 159 /* Maintainer: Conitec Datasystems */
160 .timer = &at91rm9200_timer, 160 .init_time = at91rm9200_timer_init,
161 .map_io = at91_map_io, 161 .map_io = at91_map_io,
162 .handle_irq = at91_aic_handle_irq, 162 .handle_irq = at91_aic_handle_irq,
163 .init_early = carmeva_init_early, 163 .init_early = carmeva_init_early,
diff --git a/arch/arm/mach-at91/board-cpu9krea.c b/arch/arm/mach-at91/board-cpu9krea.c
index 847432441ecc..008527efdbcf 100644
--- a/arch/arm/mach-at91/board-cpu9krea.c
+++ b/arch/arm/mach-at91/board-cpu9krea.c
@@ -374,7 +374,7 @@ MACHINE_START(CPUAT9260, "Eukrea CPU9260")
374MACHINE_START(CPUAT9G20, "Eukrea CPU9G20") 374MACHINE_START(CPUAT9G20, "Eukrea CPU9G20")
375#endif 375#endif
376 /* Maintainer: Eric Benard - EUKREA Electromatique */ 376 /* Maintainer: Eric Benard - EUKREA Electromatique */
377 .timer = &at91sam926x_timer, 377 .init_time = at91sam926x_pit_init,
378 .map_io = at91_map_io, 378 .map_io = at91_map_io,
379 .handle_irq = at91_aic_handle_irq, 379 .handle_irq = at91_aic_handle_irq,
380 .init_early = cpu9krea_init_early, 380 .init_early = cpu9krea_init_early,
diff --git a/arch/arm/mach-at91/board-cpuat91.c b/arch/arm/mach-at91/board-cpuat91.c
index 2a7af7868747..42f1353a4baf 100644
--- a/arch/arm/mach-at91/board-cpuat91.c
+++ b/arch/arm/mach-at91/board-cpuat91.c
@@ -178,7 +178,7 @@ static void __init cpuat91_board_init(void)
178 178
179MACHINE_START(CPUAT91, "Eukrea") 179MACHINE_START(CPUAT91, "Eukrea")
180 /* Maintainer: Eric Benard - EUKREA Electromatique */ 180 /* Maintainer: Eric Benard - EUKREA Electromatique */
181 .timer = &at91rm9200_timer, 181 .init_time = at91rm9200_timer_init,
182 .map_io = at91_map_io, 182 .map_io = at91_map_io,
183 .handle_irq = at91_aic_handle_irq, 183 .handle_irq = at91_aic_handle_irq,
184 .init_early = cpuat91_init_early, 184 .init_early = cpuat91_init_early,
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c
index 48a531e05be3..e5fde215225b 100644
--- a/arch/arm/mach-at91/board-csb337.c
+++ b/arch/arm/mach-at91/board-csb337.c
@@ -251,7 +251,7 @@ static void __init csb337_board_init(void)
251 251
252MACHINE_START(CSB337, "Cogent CSB337") 252MACHINE_START(CSB337, "Cogent CSB337")
253 /* Maintainer: Bill Gatliff */ 253 /* Maintainer: Bill Gatliff */
254 .timer = &at91rm9200_timer, 254 .init_time = at91rm9200_timer_init,
255 .map_io = at91_map_io, 255 .map_io = at91_map_io,
256 .handle_irq = at91_aic_handle_irq, 256 .handle_irq = at91_aic_handle_irq,
257 .init_early = csb337_init_early, 257 .init_early = csb337_init_early,
diff --git a/arch/arm/mach-at91/board-csb637.c b/arch/arm/mach-at91/board-csb637.c
index ec0f3abd504b..fdf11061c577 100644
--- a/arch/arm/mach-at91/board-csb637.c
+++ b/arch/arm/mach-at91/board-csb637.c
@@ -132,7 +132,7 @@ static void __init csb637_board_init(void)
132 132
133MACHINE_START(CSB637, "Cogent CSB637") 133MACHINE_START(CSB637, "Cogent CSB637")
134 /* Maintainer: Bill Gatliff */ 134 /* Maintainer: Bill Gatliff */
135 .timer = &at91rm9200_timer, 135 .init_time = at91rm9200_timer_init,
136 .map_io = at91_map_io, 136 .map_io = at91_map_io,
137 .handle_irq = at91_aic_handle_irq, 137 .handle_irq = at91_aic_handle_irq,
138 .init_early = csb637_init_early, 138 .init_early = csb637_init_early,
diff --git a/arch/arm/mach-at91/board-dt.c b/arch/arm/mach-at91/board-dt.c
index 881170ce61dd..8db30132abed 100644
--- a/arch/arm/mach-at91/board-dt.c
+++ b/arch/arm/mach-at91/board-dt.c
@@ -49,7 +49,7 @@ static const char *at91_dt_board_compat[] __initdata = {
49 49
50DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)") 50DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)")
51 /* Maintainer: Atmel */ 51 /* Maintainer: Atmel */
52 .timer = &at91sam926x_timer, 52 .init_time = at91sam926x_pit_init,
53 .map_io = at91_map_io, 53 .map_io = at91_map_io,
54 .handle_irq = at91_aic_handle_irq, 54 .handle_irq = at91_aic_handle_irq,
55 .init_early = at91_dt_initialize, 55 .init_early = at91_dt_initialize,
diff --git a/arch/arm/mach-at91/board-eb01.c b/arch/arm/mach-at91/board-eb01.c
index b489388a6f84..becf0a6a289e 100644
--- a/arch/arm/mach-at91/board-eb01.c
+++ b/arch/arm/mach-at91/board-eb01.c
@@ -44,7 +44,7 @@ static void __init at91eb01_init_early(void)
44 44
45MACHINE_START(AT91EB01, "Atmel AT91 EB01") 45MACHINE_START(AT91EB01, "Atmel AT91 EB01")
46 /* Maintainer: Greg Ungerer <gerg@snapgear.com> */ 46 /* Maintainer: Greg Ungerer <gerg@snapgear.com> */
47 .timer = &at91x40_timer, 47 .init_time = at91x40_timer_init,
48 .handle_irq = at91_aic_handle_irq, 48 .handle_irq = at91_aic_handle_irq,
49 .init_early = at91eb01_init_early, 49 .init_early = at91eb01_init_early,
50 .init_irq = at91eb01_init_irq, 50 .init_irq = at91eb01_init_irq,
diff --git a/arch/arm/mach-at91/board-eb9200.c b/arch/arm/mach-at91/board-eb9200.c
index 9f5e71c95f05..f9be8161bbfa 100644
--- a/arch/arm/mach-at91/board-eb9200.c
+++ b/arch/arm/mach-at91/board-eb9200.c
@@ -116,7 +116,7 @@ static void __init eb9200_board_init(void)
116} 116}
117 117
118MACHINE_START(ATEB9200, "Embest ATEB9200") 118MACHINE_START(ATEB9200, "Embest ATEB9200")
119 .timer = &at91rm9200_timer, 119 .init_time = at91rm9200_timer_init,
120 .map_io = at91_map_io, 120 .map_io = at91_map_io,
121 .handle_irq = at91_aic_handle_irq, 121 .handle_irq = at91_aic_handle_irq,
122 .init_early = eb9200_init_early, 122 .init_early = eb9200_init_early,
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c
index ef69e0ebe949..b2fcd71262ba 100644
--- a/arch/arm/mach-at91/board-ecbat91.c
+++ b/arch/arm/mach-at91/board-ecbat91.c
@@ -181,7 +181,7 @@ static void __init ecb_at91board_init(void)
181 181
182MACHINE_START(ECBAT91, "emQbit's ECB_AT91") 182MACHINE_START(ECBAT91, "emQbit's ECB_AT91")
183 /* Maintainer: emQbit.com */ 183 /* Maintainer: emQbit.com */
184 .timer = &at91rm9200_timer, 184 .init_time = at91rm9200_timer_init,
185 .map_io = at91_map_io, 185 .map_io = at91_map_io,
186 .handle_irq = at91_aic_handle_irq, 186 .handle_irq = at91_aic_handle_irq,
187 .init_early = ecb_at91init_early, 187 .init_early = ecb_at91init_early,
diff --git a/arch/arm/mach-at91/board-eco920.c b/arch/arm/mach-at91/board-eco920.c
index 50f3d3795c05..77de410efc90 100644
--- a/arch/arm/mach-at91/board-eco920.c
+++ b/arch/arm/mach-at91/board-eco920.c
@@ -149,7 +149,7 @@ static void __init eco920_board_init(void)
149 149
150MACHINE_START(ECO920, "eco920") 150MACHINE_START(ECO920, "eco920")
151 /* Maintainer: Sascha Hauer */ 151 /* Maintainer: Sascha Hauer */
152 .timer = &at91rm9200_timer, 152 .init_time = at91rm9200_timer_init,
153 .map_io = at91_map_io, 153 .map_io = at91_map_io,
154 .handle_irq = at91_aic_handle_irq, 154 .handle_irq = at91_aic_handle_irq,
155 .init_early = eco920_init_early, 155 .init_early = eco920_init_early,
diff --git a/arch/arm/mach-at91/board-flexibity.c b/arch/arm/mach-at91/board-flexibity.c
index 5d44eba0f20f..737c08563628 100644
--- a/arch/arm/mach-at91/board-flexibity.c
+++ b/arch/arm/mach-at91/board-flexibity.c
@@ -159,7 +159,7 @@ static void __init flexibity_board_init(void)
159 159
160MACHINE_START(FLEXIBITY, "Flexibity Connect") 160MACHINE_START(FLEXIBITY, "Flexibity Connect")
161 /* Maintainer: Maxim Osipov */ 161 /* Maintainer: Maxim Osipov */
162 .timer = &at91sam926x_timer, 162 .init_time = at91sam926x_pit_init,
163 .map_io = at91_map_io, 163 .map_io = at91_map_io,
164 .handle_irq = at91_aic_handle_irq, 164 .handle_irq = at91_aic_handle_irq,
165 .init_early = flexibity_init_early, 165 .init_early = flexibity_init_early,
diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c
index 191d37c16bab..2ea7059b840b 100644
--- a/arch/arm/mach-at91/board-foxg20.c
+++ b/arch/arm/mach-at91/board-foxg20.c
@@ -261,7 +261,7 @@ static void __init foxg20_board_init(void)
261 261
262MACHINE_START(ACMENETUSFOXG20, "Acme Systems srl FOX Board G20") 262MACHINE_START(ACMENETUSFOXG20, "Acme Systems srl FOX Board G20")
263 /* Maintainer: Sergio Tanzilli */ 263 /* Maintainer: Sergio Tanzilli */
264 .timer = &at91sam926x_timer, 264 .init_time = at91sam926x_pit_init,
265 .map_io = at91_map_io, 265 .map_io = at91_map_io,
266 .handle_irq = at91_aic_handle_irq, 266 .handle_irq = at91_aic_handle_irq,
267 .init_early = foxg20_init_early, 267 .init_early = foxg20_init_early,
diff --git a/arch/arm/mach-at91/board-gsia18s.c b/arch/arm/mach-at91/board-gsia18s.c
index 23a2fa17ab29..c1d61d247790 100644
--- a/arch/arm/mach-at91/board-gsia18s.c
+++ b/arch/arm/mach-at91/board-gsia18s.c
@@ -574,7 +574,7 @@ static void __init gsia18s_board_init(void)
574} 574}
575 575
576MACHINE_START(GSIA18S, "GS_IA18_S") 576MACHINE_START(GSIA18S, "GS_IA18_S")
577 .timer = &at91sam926x_timer, 577 .init_time = at91sam926x_pit_init,
578 .map_io = at91_map_io, 578 .map_io = at91_map_io,
579 .handle_irq = at91_aic_handle_irq, 579 .handle_irq = at91_aic_handle_irq,
580 .init_early = gsia18s_init_early, 580 .init_early = gsia18s_init_early,
diff --git a/arch/arm/mach-at91/board-kafa.c b/arch/arm/mach-at91/board-kafa.c
index 9a43d1e1a037..88e2f5d2d16d 100644
--- a/arch/arm/mach-at91/board-kafa.c
+++ b/arch/arm/mach-at91/board-kafa.c
@@ -103,7 +103,7 @@ static void __init kafa_board_init(void)
103 103
104MACHINE_START(KAFA, "Sperry-Sun KAFA") 104MACHINE_START(KAFA, "Sperry-Sun KAFA")
105 /* Maintainer: Sergei Sharonov */ 105 /* Maintainer: Sergei Sharonov */
106 .timer = &at91rm9200_timer, 106 .init_time = at91rm9200_timer_init,
107 .map_io = at91_map_io, 107 .map_io = at91_map_io,
108 .handle_irq = at91_aic_handle_irq, 108 .handle_irq = at91_aic_handle_irq,
109 .init_early = kafa_init_early, 109 .init_early = kafa_init_early,
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c
index f168bec2369f..0c519d9ebffc 100644
--- a/arch/arm/mach-at91/board-kb9202.c
+++ b/arch/arm/mach-at91/board-kb9202.c
@@ -149,7 +149,7 @@ static void __init kb9202_board_init(void)
149 149
150MACHINE_START(KB9200, "KB920x") 150MACHINE_START(KB9200, "KB920x")
151 /* Maintainer: KwikByte, Inc. */ 151 /* Maintainer: KwikByte, Inc. */
152 .timer = &at91rm9200_timer, 152 .init_time = at91rm9200_timer_init,
153 .map_io = at91_map_io, 153 .map_io = at91_map_io,
154 .handle_irq = at91_aic_handle_irq, 154 .handle_irq = at91_aic_handle_irq,
155 .init_early = kb9202_init_early, 155 .init_early = kb9202_init_early,
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c
index bc7a1c4a1f6a..5b4760fe53de 100644
--- a/arch/arm/mach-at91/board-neocore926.c
+++ b/arch/arm/mach-at91/board-neocore926.c
@@ -378,7 +378,7 @@ static void __init neocore926_board_init(void)
378 378
379MACHINE_START(NEOCORE926, "ADENEO NEOCORE 926") 379MACHINE_START(NEOCORE926, "ADENEO NEOCORE 926")
380 /* Maintainer: ADENEO */ 380 /* Maintainer: ADENEO */
381 .timer = &at91sam926x_timer, 381 .init_time = at91sam926x_pit_init,
382 .map_io = at91_map_io, 382 .map_io = at91_map_io,
383 .handle_irq = at91_aic_handle_irq, 383 .handle_irq = at91_aic_handle_irq,
384 .init_early = neocore926_init_early, 384 .init_early = neocore926_init_early,
diff --git a/arch/arm/mach-at91/board-pcontrol-g20.c b/arch/arm/mach-at91/board-pcontrol-g20.c
index 0299554495dd..65c0d6b5ecba 100644
--- a/arch/arm/mach-at91/board-pcontrol-g20.c
+++ b/arch/arm/mach-at91/board-pcontrol-g20.c
@@ -217,7 +217,7 @@ static void __init pcontrol_g20_board_init(void)
217 217
218MACHINE_START(PCONTROL_G20, "PControl G20") 218MACHINE_START(PCONTROL_G20, "PControl G20")
219 /* Maintainer: pgsellmann@portner-elektronik.at */ 219 /* Maintainer: pgsellmann@portner-elektronik.at */
220 .timer = &at91sam926x_timer, 220 .init_time = at91sam926x_pit_init,
221 .map_io = at91_map_io, 221 .map_io = at91_map_io,
222 .handle_irq = at91_aic_handle_irq, 222 .handle_irq = at91_aic_handle_irq,
223 .init_early = pcontrol_g20_init_early, 223 .init_early = pcontrol_g20_init_early,
diff --git a/arch/arm/mach-at91/board-picotux200.c b/arch/arm/mach-at91/board-picotux200.c
index 4938f1cd5e13..ab2b2ec36c14 100644
--- a/arch/arm/mach-at91/board-picotux200.c
+++ b/arch/arm/mach-at91/board-picotux200.c
@@ -119,7 +119,7 @@ static void __init picotux200_board_init(void)
119 119
120MACHINE_START(PICOTUX2XX, "picotux 200") 120MACHINE_START(PICOTUX2XX, "picotux 200")
121 /* Maintainer: Kleinhenz Elektronik GmbH */ 121 /* Maintainer: Kleinhenz Elektronik GmbH */
122 .timer = &at91rm9200_timer, 122 .init_time = at91rm9200_timer_init,
123 .map_io = at91_map_io, 123 .map_io = at91_map_io,
124 .handle_irq = at91_aic_handle_irq, 124 .handle_irq = at91_aic_handle_irq,
125 .init_early = picotux200_init_early, 125 .init_early = picotux200_init_early,
diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c
index 33b1628467ea..aa3bc9b0f150 100644
--- a/arch/arm/mach-at91/board-qil-a9260.c
+++ b/arch/arm/mach-at91/board-qil-a9260.c
@@ -257,7 +257,7 @@ static void __init ek_board_init(void)
257 257
258MACHINE_START(QIL_A9260, "CALAO QIL_A9260") 258MACHINE_START(QIL_A9260, "CALAO QIL_A9260")
259 /* Maintainer: calao-systems */ 259 /* Maintainer: calao-systems */
260 .timer = &at91sam926x_timer, 260 .init_time = at91sam926x_pit_init,
261 .map_io = at91_map_io, 261 .map_io = at91_map_io,
262 .handle_irq = at91_aic_handle_irq, 262 .handle_irq = at91_aic_handle_irq,
263 .init_early = ek_init_early, 263 .init_early = ek_init_early,
diff --git a/arch/arm/mach-at91/board-rm9200-dt.c b/arch/arm/mach-at91/board-rm9200-dt.c
index 5f9ce3da3fde..3fcb6623a33e 100644
--- a/arch/arm/mach-at91/board-rm9200-dt.c
+++ b/arch/arm/mach-at91/board-rm9200-dt.c
@@ -47,7 +47,7 @@ static const char *at91rm9200_dt_board_compat[] __initdata = {
47}; 47};
48 48
49DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200 (Device Tree)") 49DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200 (Device Tree)")
50 .timer = &at91rm9200_timer, 50 .init_time = at91rm9200_timer_init,
51 .map_io = at91_map_io, 51 .map_io = at91_map_io,
52 .handle_irq = at91_aic_handle_irq, 52 .handle_irq = at91_aic_handle_irq,
53 .init_early = at91rm9200_dt_initialize, 53 .init_early = at91rm9200_dt_initialize,
diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c
index 9e5061bef0d0..690541b18cbc 100644
--- a/arch/arm/mach-at91/board-rm9200dk.c
+++ b/arch/arm/mach-at91/board-rm9200dk.c
@@ -219,7 +219,7 @@ static void __init dk_board_init(void)
219 219
220MACHINE_START(AT91RM9200DK, "Atmel AT91RM9200-DK") 220MACHINE_START(AT91RM9200DK, "Atmel AT91RM9200-DK")
221 /* Maintainer: SAN People/Atmel */ 221 /* Maintainer: SAN People/Atmel */
222 .timer = &at91rm9200_timer, 222 .init_time = at91rm9200_timer_init,
223 .map_io = at91_map_io, 223 .map_io = at91_map_io,
224 .handle_irq = at91_aic_handle_irq, 224 .handle_irq = at91_aic_handle_irq,
225 .init_early = dk_init_early, 225 .init_early = dk_init_early,
diff --git a/arch/arm/mach-at91/board-rm9200ek.c b/arch/arm/mach-at91/board-rm9200ek.c
index 58277dbc718f..8b17dadc1aba 100644
--- a/arch/arm/mach-at91/board-rm9200ek.c
+++ b/arch/arm/mach-at91/board-rm9200ek.c
@@ -186,7 +186,7 @@ static void __init ek_board_init(void)
186 186
187MACHINE_START(AT91RM9200EK, "Atmel AT91RM9200-EK") 187MACHINE_START(AT91RM9200EK, "Atmel AT91RM9200-EK")
188 /* Maintainer: SAN People/Atmel */ 188 /* Maintainer: SAN People/Atmel */
189 .timer = &at91rm9200_timer, 189 .init_time = at91rm9200_timer_init,
190 .map_io = at91_map_io, 190 .map_io = at91_map_io,
191 .handle_irq = at91_aic_handle_irq, 191 .handle_irq = at91_aic_handle_irq,
192 .init_early = ek_init_early, 192 .init_early = ek_init_early,
diff --git a/arch/arm/mach-at91/board-rsi-ews.c b/arch/arm/mach-at91/board-rsi-ews.c
index 2e8b8339a206..f6d7f1958c7e 100644
--- a/arch/arm/mach-at91/board-rsi-ews.c
+++ b/arch/arm/mach-at91/board-rsi-ews.c
@@ -222,7 +222,7 @@ static void __init rsi_ews_board_init(void)
222 222
223MACHINE_START(RSI_EWS, "RSI EWS") 223MACHINE_START(RSI_EWS, "RSI EWS")
224 /* Maintainer: Josef Holzmayr <holzmayr@rsi-elektrotechnik.de> */ 224 /* Maintainer: Josef Holzmayr <holzmayr@rsi-elektrotechnik.de> */
225 .timer = &at91rm9200_timer, 225 .init_time = at91rm9200_timer_init,
226 .map_io = at91_map_io, 226 .map_io = at91_map_io,
227 .handle_irq = at91_aic_handle_irq, 227 .handle_irq = at91_aic_handle_irq,
228 .init_early = rsi_ews_init_early, 228 .init_early = rsi_ews_init_early,
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c
index b75fbf6003a1..43ee4dc43b50 100644
--- a/arch/arm/mach-at91/board-sam9-l9260.c
+++ b/arch/arm/mach-at91/board-sam9-l9260.c
@@ -218,7 +218,7 @@ static void __init ek_board_init(void)
218 218
219MACHINE_START(SAM9_L9260, "Olimex SAM9-L9260") 219MACHINE_START(SAM9_L9260, "Olimex SAM9-L9260")
220 /* Maintainer: Olimex */ 220 /* Maintainer: Olimex */
221 .timer = &at91sam926x_timer, 221 .init_time = at91sam926x_pit_init,
222 .map_io = at91_map_io, 222 .map_io = at91_map_io,
223 .handle_irq = at91_aic_handle_irq, 223 .handle_irq = at91_aic_handle_irq,
224 .init_early = ek_init_early, 224 .init_early = ek_init_early,
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
index f0135cd1d858..0b153c87521d 100644
--- a/arch/arm/mach-at91/board-sam9260ek.c
+++ b/arch/arm/mach-at91/board-sam9260ek.c
@@ -343,7 +343,7 @@ static void __init ek_board_init(void)
343 343
344MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK") 344MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK")
345 /* Maintainer: Atmel */ 345 /* Maintainer: Atmel */
346 .timer = &at91sam926x_timer, 346 .init_time = at91sam926x_pit_init,
347 .map_io = at91_map_io, 347 .map_io = at91_map_io,
348 .handle_irq = at91_aic_handle_irq, 348 .handle_irq = at91_aic_handle_irq,
349 .init_early = ek_init_early, 349 .init_early = ek_init_early,
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index 13ebaa8e4100..b446645c7727 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -612,7 +612,7 @@ MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK")
612MACHINE_START(AT91SAM9G10EK, "Atmel AT91SAM9G10-EK") 612MACHINE_START(AT91SAM9G10EK, "Atmel AT91SAM9G10-EK")
613#endif 613#endif
614 /* Maintainer: Atmel */ 614 /* Maintainer: Atmel */
615 .timer = &at91sam926x_timer, 615 .init_time = at91sam926x_pit_init,
616 .map_io = at91_map_io, 616 .map_io = at91_map_io,
617 .handle_irq = at91_aic_handle_irq, 617 .handle_irq = at91_aic_handle_irq,
618 .init_early = ek_init_early, 618 .init_early = ek_init_early,
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 89b9608742a7..3284df05df14 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -443,7 +443,7 @@ static void __init ek_board_init(void)
443 443
444MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK") 444MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK")
445 /* Maintainer: Atmel */ 445 /* Maintainer: Atmel */
446 .timer = &at91sam926x_timer, 446 .init_time = at91sam926x_pit_init,
447 .map_io = at91_map_io, 447 .map_io = at91_map_io,
448 .handle_irq = at91_aic_handle_irq, 448 .handle_irq = at91_aic_handle_irq,
449 .init_early = ek_init_early, 449 .init_early = ek_init_early,
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c
index 1b7dd9f688d3..f9cd1f2c7146 100644
--- a/arch/arm/mach-at91/board-sam9g20ek.c
+++ b/arch/arm/mach-at91/board-sam9g20ek.c
@@ -409,7 +409,7 @@ static void __init ek_board_init(void)
409 409
410MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK") 410MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK")
411 /* Maintainer: Atmel */ 411 /* Maintainer: Atmel */
412 .timer = &at91sam926x_timer, 412 .init_time = at91sam926x_pit_init,
413 .map_io = at91_map_io, 413 .map_io = at91_map_io,
414 .handle_irq = at91_aic_handle_irq, 414 .handle_irq = at91_aic_handle_irq,
415 .init_early = ek_init_early, 415 .init_early = ek_init_early,
@@ -419,7 +419,7 @@ MACHINE_END
419 419
420MACHINE_START(AT91SAM9G20EK_2MMC, "Atmel AT91SAM9G20-EK 2 MMC Slot Mod") 420MACHINE_START(AT91SAM9G20EK_2MMC, "Atmel AT91SAM9G20-EK 2 MMC Slot Mod")
421 /* Maintainer: Atmel */ 421 /* Maintainer: Atmel */
422 .timer = &at91sam926x_timer, 422 .init_time = at91sam926x_pit_init,
423 .map_io = at91_map_io, 423 .map_io = at91_map_io,
424 .handle_irq = at91_aic_handle_irq, 424 .handle_irq = at91_aic_handle_irq,
425 .init_early = ek_init_early, 425 .init_early = ek_init_early,
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
index e4cc375e3a32..2a94896a1375 100644
--- a/arch/arm/mach-at91/board-sam9m10g45ek.c
+++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
@@ -502,7 +502,7 @@ static void __init ek_board_init(void)
502 502
503MACHINE_START(AT91SAM9M10G45EK, "Atmel AT91SAM9M10G45-EK") 503MACHINE_START(AT91SAM9M10G45EK, "Atmel AT91SAM9M10G45-EK")
504 /* Maintainer: Atmel */ 504 /* Maintainer: Atmel */
505 .timer = &at91sam926x_timer, 505 .init_time = at91sam926x_pit_init,
506 .map_io = at91_map_io, 506 .map_io = at91_map_io,
507 .handle_irq = at91_aic_handle_irq, 507 .handle_irq = at91_aic_handle_irq,
508 .init_early = ek_init_early, 508 .init_early = ek_init_early,
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
index 377a1097afa7..aa265dcf2128 100644
--- a/arch/arm/mach-at91/board-sam9rlek.c
+++ b/arch/arm/mach-at91/board-sam9rlek.c
@@ -320,7 +320,7 @@ static void __init ek_board_init(void)
320 320
321MACHINE_START(AT91SAM9RLEK, "Atmel AT91SAM9RL-EK") 321MACHINE_START(AT91SAM9RLEK, "Atmel AT91SAM9RL-EK")
322 /* Maintainer: Atmel */ 322 /* Maintainer: Atmel */
323 .timer = &at91sam926x_timer, 323 .init_time = at91sam926x_pit_init,
324 .map_io = at91_map_io, 324 .map_io = at91_map_io,
325 .handle_irq = at91_aic_handle_irq, 325 .handle_irq = at91_aic_handle_irq,
326 .init_early = ek_init_early, 326 .init_early = ek_init_early,
diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c
index 98771500ddb9..3aaa9784cf0e 100644
--- a/arch/arm/mach-at91/board-snapper9260.c
+++ b/arch/arm/mach-at91/board-snapper9260.c
@@ -177,7 +177,7 @@ static void __init snapper9260_board_init(void)
177} 177}
178 178
179MACHINE_START(SNAPPER_9260, "Bluewater Systems Snapper 9260/9G20 module") 179MACHINE_START(SNAPPER_9260, "Bluewater Systems Snapper 9260/9G20 module")
180 .timer = &at91sam926x_timer, 180 .init_time = at91sam926x_pit_init,
181 .map_io = at91_map_io, 181 .map_io = at91_map_io,
182 .handle_irq = at91_aic_handle_irq, 182 .handle_irq = at91_aic_handle_irq,
183 .init_early = snapper9260_init_early, 183 .init_early = snapper9260_init_early,
diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c
index 48a962b61fa3..a033b8df9fb2 100644
--- a/arch/arm/mach-at91/board-stamp9g20.c
+++ b/arch/arm/mach-at91/board-stamp9g20.c
@@ -272,7 +272,7 @@ static void __init stamp9g20evb_board_init(void)
272 272
273MACHINE_START(PORTUXG20, "taskit PortuxG20") 273MACHINE_START(PORTUXG20, "taskit PortuxG20")
274 /* Maintainer: taskit GmbH */ 274 /* Maintainer: taskit GmbH */
275 .timer = &at91sam926x_timer, 275 .init_time = at91sam926x_pit_init,
276 .map_io = at91_map_io, 276 .map_io = at91_map_io,
277 .handle_irq = at91_aic_handle_irq, 277 .handle_irq = at91_aic_handle_irq,
278 .init_early = stamp9g20_init_early, 278 .init_early = stamp9g20_init_early,
@@ -282,7 +282,7 @@ MACHINE_END
282 282
283MACHINE_START(STAMP9G20, "taskit Stamp9G20") 283MACHINE_START(STAMP9G20, "taskit Stamp9G20")
284 /* Maintainer: taskit GmbH */ 284 /* Maintainer: taskit GmbH */
285 .timer = &at91sam926x_timer, 285 .init_time = at91sam926x_pit_init,
286 .map_io = at91_map_io, 286 .map_io = at91_map_io,
287 .handle_irq = at91_aic_handle_irq, 287 .handle_irq = at91_aic_handle_irq,
288 .init_early = stamp9g20_init_early, 288 .init_early = stamp9g20_init_early,
diff --git a/arch/arm/mach-at91/board-usb-a926x.c b/arch/arm/mach-at91/board-usb-a926x.c
index c1060f96e589..2487d944a1bc 100644
--- a/arch/arm/mach-at91/board-usb-a926x.c
+++ b/arch/arm/mach-at91/board-usb-a926x.c
@@ -355,7 +355,7 @@ static void __init ek_board_init(void)
355 355
356MACHINE_START(USB_A9263, "CALAO USB_A9263") 356MACHINE_START(USB_A9263, "CALAO USB_A9263")
357 /* Maintainer: calao-systems */ 357 /* Maintainer: calao-systems */
358 .timer = &at91sam926x_timer, 358 .init_time = at91sam926x_pit_init,
359 .map_io = at91_map_io, 359 .map_io = at91_map_io,
360 .handle_irq = at91_aic_handle_irq, 360 .handle_irq = at91_aic_handle_irq,
361 .init_early = ek_init_early, 361 .init_early = ek_init_early,
@@ -365,7 +365,7 @@ MACHINE_END
365 365
366MACHINE_START(USB_A9260, "CALAO USB_A9260") 366MACHINE_START(USB_A9260, "CALAO USB_A9260")
367 /* Maintainer: calao-systems */ 367 /* Maintainer: calao-systems */
368 .timer = &at91sam926x_timer, 368 .init_time = at91sam926x_pit_init,
369 .map_io = at91_map_io, 369 .map_io = at91_map_io,
370 .handle_irq = at91_aic_handle_irq, 370 .handle_irq = at91_aic_handle_irq,
371 .init_early = ek_init_early, 371 .init_early = ek_init_early,
@@ -375,7 +375,7 @@ MACHINE_END
375 375
376MACHINE_START(USB_A9G20, "CALAO USB_A92G0") 376MACHINE_START(USB_A9G20, "CALAO USB_A92G0")
377 /* Maintainer: Jean-Christophe PLAGNIOL-VILLARD */ 377 /* Maintainer: Jean-Christophe PLAGNIOL-VILLARD */
378 .timer = &at91sam926x_timer, 378 .init_time = at91sam926x_pit_init,
379 .map_io = at91_map_io, 379 .map_io = at91_map_io,
380 .handle_irq = at91_aic_handle_irq, 380 .handle_irq = at91_aic_handle_irq,
381 .init_early = ek_init_early, 381 .init_early = ek_init_early,
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c
index 8673aebcb85d..be083771df2e 100644
--- a/arch/arm/mach-at91/board-yl-9200.c
+++ b/arch/arm/mach-at91/board-yl-9200.c
@@ -587,7 +587,7 @@ static void __init yl9200_board_init(void)
587 587
588MACHINE_START(YL9200, "uCdragon YL-9200") 588MACHINE_START(YL9200, "uCdragon YL-9200")
589 /* Maintainer: S.Birtles */ 589 /* Maintainer: S.Birtles */
590 .timer = &at91rm9200_timer, 590 .init_time = at91rm9200_timer_init,
591 .map_io = at91_map_io, 591 .map_io = at91_map_io,
592 .handle_irq = at91_aic_handle_irq, 592 .handle_irq = at91_aic_handle_irq,
593 .init_early = yl9200_init_early, 593 .init_early = yl9200_init_early,
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h
index fc593d615e7d..78ab06548658 100644
--- a/arch/arm/mach-at91/generic.h
+++ b/arch/arm/mach-at91/generic.h
@@ -36,12 +36,11 @@ extern int __init at91_aic5_of_init(struct device_node *node,
36 36
37 37
38 /* Timer */ 38 /* Timer */
39struct sys_timer;
40extern void at91rm9200_ioremap_st(u32 addr); 39extern void at91rm9200_ioremap_st(u32 addr);
41extern struct sys_timer at91rm9200_timer; 40extern void at91rm9200_timer_init(void);
42extern void at91sam926x_ioremap_pit(u32 addr); 41extern void at91sam926x_ioremap_pit(u32 addr);
43extern struct sys_timer at91sam926x_timer; 42extern void at91sam926x_pit_init(void);
44extern struct sys_timer at91x40_timer; 43extern void at91x40_timer_init(void);
45 44
46 /* Clocks */ 45 /* Clocks */
47#ifdef CONFIG_AT91_PMC_UNIT 46#ifdef CONFIG_AT91_PMC_UNIT
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
index 9ee866ce0478..4b678478cf95 100644
--- a/arch/arm/mach-at91/setup.c
+++ b/arch/arm/mach-at91/setup.c
@@ -105,6 +105,8 @@ static void __init soc_detect(u32 dbgu_base)
105 switch (socid) { 105 switch (socid) {
106 case ARCH_ID_AT91RM9200: 106 case ARCH_ID_AT91RM9200:
107 at91_soc_initdata.type = AT91_SOC_RM9200; 107 at91_soc_initdata.type = AT91_SOC_RM9200;
108 if (at91_soc_initdata.subtype == AT91_SOC_SUBTYPE_NONE)
109 at91_soc_initdata.subtype = AT91_SOC_RM9200_BGA;
108 at91_boot_soc = at91rm9200_soc; 110 at91_boot_soc = at91rm9200_soc;
109 break; 111 break;
110 112
diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
index 48705c10a0fe..bf02471d7e7c 100644
--- a/arch/arm/mach-bcm/Kconfig
+++ b/arch/arm/mach-bcm/Kconfig
@@ -7,7 +7,6 @@ config ARCH_BCM
7 select ARM_GIC 7 select ARM_GIC
8 select CPU_V7 8 select CPU_V7
9 select GENERIC_CLOCKEVENTS 9 select GENERIC_CLOCKEVENTS
10 select GENERIC_GPIO
11 select GENERIC_TIME 10 select GENERIC_TIME
12 select GPIO_BCM 11 select GPIO_BCM
13 select SPARSE_IRQ 12 select SPARSE_IRQ
diff --git a/arch/arm/mach-bcm/board_bcm.c b/arch/arm/mach-bcm/board_bcm.c
index 3a62f1b1cabc..f0f9abafad29 100644
--- a/arch/arm/mach-bcm/board_bcm.c
+++ b/arch/arm/mach-bcm/board_bcm.c
@@ -11,34 +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 struct sys_timer timer = {
35 .init = timer_init,
36};
37
38static void __init init_irq(void)
39{
40 of_irq_init(irq_match);
41}
42 27
43static void __init board_init(void) 28static void __init board_init(void)
44{ 29{
@@ -49,9 +34,8 @@ static void __init board_init(void)
49static const char * const bcm11351_dt_compat[] = { "bcm,bcm11351", NULL, }; 34static const char * const bcm11351_dt_compat[] = { "bcm,bcm11351", NULL, };
50 35
51DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor") 36DT_MACHINE_START(BCM11351_DT, "Broadcom Application Processor")
52 .init_irq = init_irq, 37 .init_irq = irqchip_init,
53 .timer = &timer, 38 .init_time = timer_init,
54 .init_machine = board_init, 39 .init_machine = board_init,
55 .dt_compat = bcm11351_dt_compat, 40 .dt_compat = bcm11351_dt_compat,
56 .handle_irq = gic_handle_irq,
57MACHINE_END 41MACHINE_END
diff --git a/arch/arm/mach-bcm2835/bcm2835.c b/arch/arm/mach-bcm2835/bcm2835.c
index f0d739f4b7a3..d615a61e902c 100644
--- a/arch/arm/mach-bcm2835/bcm2835.c
+++ b/arch/arm/mach-bcm2835/bcm2835.c
@@ -17,8 +17,8 @@
17#include <linux/irqchip/bcm2835.h> 17#include <linux/irqchip/bcm2835.h>
18#include <linux/of_address.h> 18#include <linux/of_address.h>
19#include <linux/of_platform.h> 19#include <linux/of_platform.h>
20#include <linux/bcm2835_timer.h>
21#include <linux/clk/bcm2835.h> 20#include <linux/clk/bcm2835.h>
21#include <linux/clocksource.h>
22 22
23#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
24#include <asm/mach/map.h> 24#include <asm/mach/map.h>
@@ -104,7 +104,7 @@ DT_MACHINE_START(BCM2835, "BCM2835")
104 .init_irq = bcm2835_init_irq, 104 .init_irq = bcm2835_init_irq,
105 .handle_irq = bcm2835_handle_irq, 105 .handle_irq = bcm2835_handle_irq,
106 .init_machine = bcm2835_init, 106 .init_machine = bcm2835_init,
107 .timer = &bcm2835_timer, 107 .init_time = clocksource_of_init,
108 .restart = bcm2835_restart, 108 .restart = bcm2835_restart,
109 .dt_compat = bcm2835_compat 109 .dt_compat = bcm2835_compat
110MACHINE_END 110MACHINE_END
diff --git a/arch/arm/mach-clps711x/board-autcpu12.c b/arch/arm/mach-clps711x/board-autcpu12.c
index 3fbf43f72589..f38584709df7 100644
--- a/arch/arm/mach-clps711x/board-autcpu12.c
+++ b/arch/arm/mach-clps711x/board-autcpu12.c
@@ -170,7 +170,7 @@ MACHINE_START(AUTCPU12, "autronix autcpu12")
170 .nr_irqs = CLPS711X_NR_IRQS, 170 .nr_irqs = CLPS711X_NR_IRQS,
171 .map_io = clps711x_map_io, 171 .map_io = clps711x_map_io,
172 .init_irq = clps711x_init_irq, 172 .init_irq = clps711x_init_irq,
173 .timer = &clps711x_timer, 173 .init_time = clps711x_timer_init,
174 .init_machine = autcpu12_init, 174 .init_machine = autcpu12_init,
175 .init_late = autcpu12_init_late, 175 .init_late = autcpu12_init_late,
176 .handle_irq = clps711x_handle_irq, 176 .handle_irq = clps711x_handle_irq,
diff --git a/arch/arm/mach-clps711x/board-cdb89712.c b/arch/arm/mach-clps711x/board-cdb89712.c
index 60900ddf97c9..baab7da33c9b 100644
--- a/arch/arm/mach-clps711x/board-cdb89712.c
+++ b/arch/arm/mach-clps711x/board-cdb89712.c
@@ -140,7 +140,7 @@ MACHINE_START(CDB89712, "Cirrus-CDB89712")
140 .nr_irqs = CLPS711X_NR_IRQS, 140 .nr_irqs = CLPS711X_NR_IRQS,
141 .map_io = clps711x_map_io, 141 .map_io = clps711x_map_io,
142 .init_irq = clps711x_init_irq, 142 .init_irq = clps711x_init_irq,
143 .timer = &clps711x_timer, 143 .init_time = clps711x_timer_init,
144 .init_machine = cdb89712_init, 144 .init_machine = cdb89712_init,
145 .handle_irq = clps711x_handle_irq, 145 .handle_irq = clps711x_handle_irq,
146 .restart = clps711x_restart, 146 .restart = clps711x_restart,
diff --git a/arch/arm/mach-clps711x/board-clep7312.c b/arch/arm/mach-clps711x/board-clep7312.c
index 0b32a487183b..014aa3c19a03 100644
--- a/arch/arm/mach-clps711x/board-clep7312.c
+++ b/arch/arm/mach-clps711x/board-clep7312.c
@@ -40,7 +40,7 @@ MACHINE_START(CLEP7212, "Cirrus Logic 7212/7312")
40 .fixup = fixup_clep7312, 40 .fixup = fixup_clep7312,
41 .map_io = clps711x_map_io, 41 .map_io = clps711x_map_io,
42 .init_irq = clps711x_init_irq, 42 .init_irq = clps711x_init_irq,
43 .timer = &clps711x_timer, 43 .init_time = clps711x_timer_init,
44 .handle_irq = clps711x_handle_irq, 44 .handle_irq = clps711x_handle_irq,
45 .restart = clps711x_restart, 45 .restart = clps711x_restart,
46MACHINE_END 46MACHINE_END
diff --git a/arch/arm/mach-clps711x/board-edb7211.c b/arch/arm/mach-clps711x/board-edb7211.c
index 71aa5cf2c0d3..5f928e9ed2ef 100644
--- a/arch/arm/mach-clps711x/board-edb7211.c
+++ b/arch/arm/mach-clps711x/board-edb7211.c
@@ -173,7 +173,7 @@ MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)")
173 .reserve = edb7211_reserve, 173 .reserve = edb7211_reserve,
174 .map_io = edb7211_map_io, 174 .map_io = edb7211_map_io,
175 .init_irq = clps711x_init_irq, 175 .init_irq = clps711x_init_irq,
176 .timer = &clps711x_timer, 176 .init_time = clps711x_timer_init,
177 .init_machine = edb7211_init, 177 .init_machine = edb7211_init,
178 .handle_irq = clps711x_handle_irq, 178 .handle_irq = clps711x_handle_irq,
179 .restart = clps711x_restart, 179 .restart = clps711x_restart,
diff --git a/arch/arm/mach-clps711x/board-fortunet.c b/arch/arm/mach-clps711x/board-fortunet.c
index 7d0125580366..c5675efc8c6a 100644
--- a/arch/arm/mach-clps711x/board-fortunet.c
+++ b/arch/arm/mach-clps711x/board-fortunet.c
@@ -78,7 +78,7 @@ MACHINE_START(FORTUNET, "ARM-FortuNet")
78 .fixup = fortunet_fixup, 78 .fixup = fortunet_fixup,
79 .map_io = clps711x_map_io, 79 .map_io = clps711x_map_io,
80 .init_irq = clps711x_init_irq, 80 .init_irq = clps711x_init_irq,
81 .timer = &clps711x_timer, 81 .init_time = clps711x_timer_init,
82 .handle_irq = clps711x_handle_irq, 82 .handle_irq = clps711x_handle_irq,
83 .restart = clps711x_restart, 83 .restart = clps711x_restart,
84MACHINE_END 84MACHINE_END
diff --git a/arch/arm/mach-clps711x/board-p720t.c b/arch/arm/mach-clps711x/board-p720t.c
index 1518fc83babd..8d3ee6771135 100644
--- a/arch/arm/mach-clps711x/board-p720t.c
+++ b/arch/arm/mach-clps711x/board-p720t.c
@@ -224,7 +224,7 @@ MACHINE_START(P720T, "ARM-Prospector720T")
224 .map_io = p720t_map_io, 224 .map_io = p720t_map_io,
225 .init_early = p720t_init_early, 225 .init_early = p720t_init_early,
226 .init_irq = clps711x_init_irq, 226 .init_irq = clps711x_init_irq,
227 .timer = &clps711x_timer, 227 .init_time = clps711x_timer_init,
228 .init_machine = p720t_init, 228 .init_machine = p720t_init,
229 .init_late = p720t_init_late, 229 .init_late = p720t_init_late,
230 .handle_irq = clps711x_handle_irq, 230 .handle_irq = clps711x_handle_irq,
diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c
index e046439573ee..20ff50f3ccf0 100644
--- a/arch/arm/mach-clps711x/common.c
+++ b/arch/arm/mach-clps711x/common.c
@@ -282,7 +282,7 @@ static void add_fixed_clk(struct clk *clk, const char *name, int rate)
282 clk_register_clkdev(clk, name, NULL); 282 clk_register_clkdev(clk, name, NULL);
283} 283}
284 284
285static void __init clps711x_timer_init(void) 285void __init clps711x_timer_init(void)
286{ 286{
287 int osc, ext, pll, cpu, bus, timl, timh, uart, spi; 287 int osc, ext, pll, cpu, bus, timl, timh, uart, spi;
288 u32 tmp; 288 u32 tmp;
@@ -345,10 +345,6 @@ static void __init clps711x_timer_init(void)
345 setup_irq(IRQ_TC2OI, &clps711x_timer_irq); 345 setup_irq(IRQ_TC2OI, &clps711x_timer_irq);
346} 346}
347 347
348struct sys_timer clps711x_timer = {
349 .init = clps711x_timer_init,
350};
351
352void clps711x_restart(char mode, const char *cmd) 348void clps711x_restart(char mode, const char *cmd)
353{ 349{
354 soft_restart(0); 350 soft_restart(0);
diff --git a/arch/arm/mach-clps711x/common.h b/arch/arm/mach-clps711x/common.h
index b7c0c75c90c0..f84a7292c70e 100644
--- a/arch/arm/mach-clps711x/common.h
+++ b/arch/arm/mach-clps711x/common.h
@@ -8,10 +8,8 @@
8#define CLPS711X_NR_GPIO (4 * 8 + 3) 8#define CLPS711X_NR_GPIO (4 * 8 + 3)
9#define CLPS711X_GPIO(prt, bit) ((prt) * 8 + (bit)) 9#define CLPS711X_GPIO(prt, bit) ((prt) * 8 + (bit))
10 10
11struct sys_timer;
12
13extern void clps711x_map_io(void); 11extern void clps711x_map_io(void);
14extern void clps711x_init_irq(void); 12extern void clps711x_init_irq(void);
13extern void clps711x_timer_init(void);
15extern void clps711x_handle_irq(struct pt_regs *regs); 14extern void clps711x_handle_irq(struct pt_regs *regs);
16extern void clps711x_restart(char mode, const char *cmd); 15extern void clps711x_restart(char mode, const char *cmd);
17extern struct sys_timer clps711x_timer;
diff --git a/arch/arm/mach-cns3xxx/cns3420vb.c b/arch/arm/mach-cns3xxx/cns3420vb.c
index ae305397003c..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>
@@ -250,8 +249,7 @@ MACHINE_START(CNS3420VB, "Cavium Networks CNS3420 Validation Board")
250 .atag_offset = 0x100, 249 .atag_offset = 0x100,
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 .timer = &cns3xxx_timer, 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 031805b1428d..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/*
@@ -235,17 +228,13 @@ static void __init __cns3xxx_timer_init(unsigned int timer_irq)
235 cns3xxx_clockevents_init(timer_irq); 228 cns3xxx_clockevents_init(timer_irq);
236} 229}
237 230
238static void __init cns3xxx_timer_init(void) 231void __init cns3xxx_timer_init(void)
239{ 232{
240 cns3xxx_tmr1 = IOMEM(CNS3XXX_TIMER1_2_3_BASE_VIRT); 233 cns3xxx_tmr1 = IOMEM(CNS3XXX_TIMER1_2_3_BASE_VIRT);
241 234
242 __cns3xxx_timer_init(IRQ_CNS3XXX_TIMER0); 235 __cns3xxx_timer_init(IRQ_CNS3XXX_TIMER0);
243} 236}
244 237
245struct sys_timer cns3xxx_timer = {
246 .init = cns3xxx_timer_init,
247};
248
249#ifdef CONFIG_CACHE_L2X0 238#ifdef CONFIG_CACHE_L2X0
250 239
251void __init cns3xxx_l2x0_init(void) 240void __init cns3xxx_l2x0_init(void)
diff --git a/arch/arm/mach-cns3xxx/core.h b/arch/arm/mach-cns3xxx/core.h
index 4894b8c17151..b23b17b4da10 100644
--- a/arch/arm/mach-cns3xxx/core.h
+++ b/arch/arm/mach-cns3xxx/core.h
@@ -11,7 +11,7 @@
11#ifndef __CNS3XXX_CORE_H 11#ifndef __CNS3XXX_CORE_H
12#define __CNS3XXX_CORE_H 12#define __CNS3XXX_CORE_H
13 13
14extern struct sys_timer cns3xxx_timer; 14extern void cns3xxx_timer_init(void);
15 15
16#ifdef CONFIG_CACHE_L2X0 16#ifdef CONFIG_CACHE_L2X0
17void __init cns3xxx_l2x0_init(void); 17void __init cns3xxx_l2x0_init(void);
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index 95b5e102ceb1..e3742716cbaa 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -679,7 +679,7 @@ MACHINE_START(DAVINCI_DA830_EVM, "DaVinci DA830/OMAP-L137/AM17x EVM")
679 .atag_offset = 0x100, 679 .atag_offset = 0x100,
680 .map_io = da830_evm_map_io, 680 .map_io = da830_evm_map_io,
681 .init_irq = cp_intc_init, 681 .init_irq = cp_intc_init,
682 .timer = &davinci_timer, 682 .init_time = davinci_timer_init,
683 .init_machine = da830_evm_init, 683 .init_machine = da830_evm_init,
684 .init_late = davinci_init_late, 684 .init_late = davinci_init_late,
685 .dma_zone_size = SZ_128M, 685 .dma_zone_size = SZ_128M,
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 0299915575a8..3b3356097bb0 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1599,7 +1599,7 @@ MACHINE_START(DAVINCI_DA850_EVM, "DaVinci DA850/OMAP-L138/AM18x EVM")
1599 .atag_offset = 0x100, 1599 .atag_offset = 0x100,
1600 .map_io = da850_evm_map_io, 1600 .map_io = da850_evm_map_io,
1601 .init_irq = cp_intc_init, 1601 .init_irq = cp_intc_init,
1602 .timer = &davinci_timer, 1602 .init_time = davinci_timer_init,
1603 .init_machine = da850_evm_init, 1603 .init_machine = da850_evm_init,
1604 .init_late = davinci_init_late, 1604 .init_late = davinci_init_late,
1605 .dma_zone_size = SZ_128M, 1605 .dma_zone_size = SZ_128M,
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
index cdf8d0746e79..147b8e1a4407 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -355,7 +355,7 @@ MACHINE_START(DAVINCI_DM355_EVM, "DaVinci DM355 EVM")
355 .atag_offset = 0x100, 355 .atag_offset = 0x100,
356 .map_io = dm355_evm_map_io, 356 .map_io = dm355_evm_map_io,
357 .init_irq = davinci_irq_init, 357 .init_irq = davinci_irq_init,
358 .timer = &davinci_timer, 358 .init_time = davinci_timer_init,
359 .init_machine = dm355_evm_init, 359 .init_machine = dm355_evm_init,
360 .init_late = davinci_init_late, 360 .init_late = davinci_init_late,
361 .dma_zone_size = SZ_128M, 361 .dma_zone_size = SZ_128M,
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c
index d41954507fc2..dff4ddc5ef81 100644
--- a/arch/arm/mach-davinci/board-dm355-leopard.c
+++ b/arch/arm/mach-davinci/board-dm355-leopard.c
@@ -274,7 +274,7 @@ MACHINE_START(DM355_LEOPARD, "DaVinci DM355 leopard")
274 .atag_offset = 0x100, 274 .atag_offset = 0x100,
275 .map_io = dm355_leopard_map_io, 275 .map_io = dm355_leopard_map_io,
276 .init_irq = davinci_irq_init, 276 .init_irq = davinci_irq_init,
277 .timer = &davinci_timer, 277 .init_time = davinci_timer_init,
278 .init_machine = dm355_leopard_init, 278 .init_machine = dm355_leopard_init,
279 .init_late = davinci_init_late, 279 .init_late = davinci_init_late,
280 .dma_zone_size = SZ_128M, 280 .dma_zone_size = SZ_128M,
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
index 5d49c75388ca..c2d4958a0cb6 100644
--- a/arch/arm/mach-davinci/board-dm365-evm.c
+++ b/arch/arm/mach-davinci/board-dm365-evm.c
@@ -616,7 +616,7 @@ MACHINE_START(DAVINCI_DM365_EVM, "DaVinci DM365 EVM")
616 .atag_offset = 0x100, 616 .atag_offset = 0x100,
617 .map_io = dm365_evm_map_io, 617 .map_io = dm365_evm_map_io,
618 .init_irq = davinci_irq_init, 618 .init_irq = davinci_irq_init,
619 .timer = &davinci_timer, 619 .init_time = davinci_timer_init,
620 .init_machine = dm365_evm_init, 620 .init_machine = dm365_evm_init,
621 .init_late = davinci_init_late, 621 .init_late = davinci_init_late,
622 .dma_zone_size = SZ_128M, 622 .dma_zone_size = SZ_128M,
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index f5e018de7fa5..e4a16f98e6a2 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -825,7 +825,7 @@ MACHINE_START(DAVINCI_EVM, "DaVinci DM644x EVM")
825 .atag_offset = 0x100, 825 .atag_offset = 0x100,
826 .map_io = davinci_evm_map_io, 826 .map_io = davinci_evm_map_io,
827 .init_irq = davinci_irq_init, 827 .init_irq = davinci_irq_init,
828 .timer = &davinci_timer, 828 .init_time = davinci_timer_init,
829 .init_machine = davinci_evm_init, 829 .init_machine = davinci_evm_init,
830 .init_late = davinci_init_late, 830 .init_late = davinci_init_late,
831 .dma_zone_size = SZ_128M, 831 .dma_zone_size = SZ_128M,
diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
index 9211e8800c79..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;
@@ -818,7 +818,7 @@ MACHINE_START(DAVINCI_DM6467_EVM, "DaVinci DM646x EVM")
818 .atag_offset = 0x100, 818 .atag_offset = 0x100,
819 .map_io = davinci_map_io, 819 .map_io = davinci_map_io,
820 .init_irq = davinci_irq_init, 820 .init_irq = davinci_irq_init,
821 .timer = &davinci_timer, 821 .init_time = davinci_timer_init,
822 .init_machine = evm_init, 822 .init_machine = evm_init,
823 .init_late = davinci_init_late, 823 .init_late = davinci_init_late,
824 .dma_zone_size = SZ_128M, 824 .dma_zone_size = SZ_128M,
@@ -829,7 +829,7 @@ MACHINE_START(DAVINCI_DM6467TEVM, "DaVinci DM6467T EVM")
829 .atag_offset = 0x100, 829 .atag_offset = 0x100,
830 .map_io = davinci_map_io, 830 .map_io = davinci_map_io,
831 .init_irq = davinci_irq_init, 831 .init_irq = davinci_irq_init,
832 .timer = &davinci_timer, 832 .init_time = davinci_timer_init,
833 .init_machine = evm_init, 833 .init_machine = evm_init,
834 .init_late = davinci_init_late, 834 .init_late = davinci_init_late,
835 .dma_zone_size = SZ_128M, 835 .dma_zone_size = SZ_128M,
diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c
index 43e4a0d663fa..b0df578bf744 100644
--- a/arch/arm/mach-davinci/board-mityomapl138.c
+++ b/arch/arm/mach-davinci/board-mityomapl138.c
@@ -570,7 +570,7 @@ MACHINE_START(MITYOMAPL138, "MityDSP-L138/MityARM-1808")
570 .atag_offset = 0x100, 570 .atag_offset = 0x100,
571 .map_io = mityomapl138_map_io, 571 .map_io = mityomapl138_map_io,
572 .init_irq = cp_intc_init, 572 .init_irq = cp_intc_init,
573 .timer = &davinci_timer, 573 .init_time = davinci_timer_init,
574 .init_machine = mityomapl138_init, 574 .init_machine = mityomapl138_init,
575 .init_late = davinci_init_late, 575 .init_late = davinci_init_late,
576 .dma_zone_size = SZ_128M, 576 .dma_zone_size = SZ_128M,
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c
index 3e3e3afebf88..1c98107527fa 100644
--- a/arch/arm/mach-davinci/board-neuros-osd2.c
+++ b/arch/arm/mach-davinci/board-neuros-osd2.c
@@ -237,7 +237,7 @@ MACHINE_START(NEUROS_OSD2, "Neuros OSD2")
237 .atag_offset = 0x100, 237 .atag_offset = 0x100,
238 .map_io = davinci_ntosd2_map_io, 238 .map_io = davinci_ntosd2_map_io,
239 .init_irq = davinci_irq_init, 239 .init_irq = davinci_irq_init,
240 .timer = &davinci_timer, 240 .init_time = davinci_timer_init,
241 .init_machine = davinci_ntosd2_init, 241 .init_machine = davinci_ntosd2_init,
242 .init_late = davinci_init_late, 242 .init_late = davinci_init_late,
243 .dma_zone_size = SZ_128M, 243 .dma_zone_size = SZ_128M,
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
index dc1208e9e664..deb3922612b9 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
@@ -341,7 +341,7 @@ MACHINE_START(OMAPL138_HAWKBOARD, "AM18x/OMAP-L138 Hawkboard")
341 .atag_offset = 0x100, 341 .atag_offset = 0x100,
342 .map_io = omapl138_hawk_map_io, 342 .map_io = omapl138_hawk_map_io,
343 .init_irq = cp_intc_init, 343 .init_irq = cp_intc_init,
344 .timer = &davinci_timer, 344 .init_time = davinci_timer_init,
345 .init_machine = omapl138_hawk_init, 345 .init_machine = omapl138_hawk_init,
346 .init_late = davinci_init_late, 346 .init_late = davinci_init_late,
347 .dma_zone_size = SZ_128M, 347 .dma_zone_size = SZ_128M,
diff --git a/arch/arm/mach-davinci/board-sffsdr.c b/arch/arm/mach-davinci/board-sffsdr.c
index 6957787fa7f3..739be7e738fe 100644
--- a/arch/arm/mach-davinci/board-sffsdr.c
+++ b/arch/arm/mach-davinci/board-sffsdr.c
@@ -155,7 +155,7 @@ MACHINE_START(SFFSDR, "Lyrtech SFFSDR")
155 .atag_offset = 0x100, 155 .atag_offset = 0x100,
156 .map_io = davinci_sffsdr_map_io, 156 .map_io = davinci_sffsdr_map_io,
157 .init_irq = davinci_irq_init, 157 .init_irq = davinci_irq_init,
158 .timer = &davinci_timer, 158 .init_time = davinci_timer_init,
159 .init_machine = davinci_sffsdr_init, 159 .init_machine = davinci_sffsdr_init,
160 .init_late = davinci_init_late, 160 .init_late = davinci_init_late,
161 .dma_zone_size = SZ_128M, 161 .dma_zone_size = SZ_128M,
diff --git a/arch/arm/mach-davinci/board-tnetv107x-evm.c b/arch/arm/mach-davinci/board-tnetv107x-evm.c
index be3099733b1f..4f416023d4e2 100644
--- a/arch/arm/mach-davinci/board-tnetv107x-evm.c
+++ b/arch/arm/mach-davinci/board-tnetv107x-evm.c
@@ -280,7 +280,7 @@ MACHINE_START(TNETV107X, "TNETV107X EVM")
280 .atag_offset = 0x100, 280 .atag_offset = 0x100,
281 .map_io = tnetv107x_init, 281 .map_io = tnetv107x_init,
282 .init_irq = cp_intc_init, 282 .init_irq = cp_intc_init,
283 .timer = &davinci_timer, 283 .init_time = davinci_timer_init,
284 .init_machine = tnetv107x_evm_board_init, 284 .init_machine = tnetv107x_evm_board_init,
285 .init_late = davinci_init_late, 285 .init_late = davinci_init_late,
286 .dma_zone_size = SZ_128M, 286 .dma_zone_size = SZ_128M,
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-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
index 37c27af18fa0..9a7c76efc8f8 100644
--- a/arch/arm/mach-davinci/da8xx-dt.c
+++ b/arch/arm/mach-davinci/da8xx-dt.c
@@ -56,7 +56,7 @@ static const char *da850_boards_compat[] __initdata = {
56DT_MACHINE_START(DA850_DT, "Generic DA850/OMAP-L138/AM18x") 56DT_MACHINE_START(DA850_DT, "Generic DA850/OMAP-L138/AM18x")
57 .map_io = da850_init, 57 .map_io = da850_init,
58 .init_irq = da8xx_init_irq, 58 .init_irq = da8xx_init_irq,
59 .timer = &davinci_timer, 59 .init_time = davinci_timer_init,
60 .init_machine = da850_init_machine, 60 .init_machine = da850_init_machine,
61 .dt_compat = da850_boards_compat, 61 .dt_compat = da850_boards_compat,
62 .init_late = davinci_init_late, 62 .init_late = davinci_init_late,
diff --git a/arch/arm/mach-davinci/include/mach/common.h b/arch/arm/mach-davinci/include/mach/common.h
index 046c7238a3d6..b124b77c90c5 100644
--- a/arch/arm/mach-davinci/include/mach/common.h
+++ b/arch/arm/mach-davinci/include/mach/common.h
@@ -15,9 +15,7 @@
15#include <linux/compiler.h> 15#include <linux/compiler.h>
16#include <linux/types.h> 16#include <linux/types.h>
17 17
18struct sys_timer; 18extern void davinci_timer_init(void);
19
20extern struct sys_timer davinci_timer;
21 19
22extern void davinci_irq_init(void); 20extern void davinci_irq_init(void);
23extern void __iomem *davinci_intc_base; 21extern void __iomem *davinci_intc_base;
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index 9847938785ca..bad361ec1666 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -337,7 +337,7 @@ static struct clock_event_device clockevent_davinci = {
337}; 337};
338 338
339 339
340static void __init davinci_timer_init(void) 340void __init davinci_timer_init(void)
341{ 341{
342 struct clk *timer_clk; 342 struct clk *timer_clk;
343 struct davinci_soc_info *soc_info = &davinci_soc_info; 343 struct davinci_soc_info *soc_info = &davinci_soc_info;
@@ -410,11 +410,6 @@ static void __init davinci_timer_init(void)
410 timer32_config(&timers[i]); 410 timer32_config(&timers[i]);
411} 411}
412 412
413struct sys_timer davinci_timer = {
414 .init = davinci_timer_init,
415};
416
417
418/* reset board using watchdog timer */ 413/* reset board using watchdog timer */
419void davinci_watchdog_reset(struct platform_device *pdev) 414void davinci_watchdog_reset(struct platform_device *pdev)
420{ 415{
diff --git a/arch/arm/mach-dove/cm-a510.c b/arch/arm/mach-dove/cm-a510.c
index 792b4e2e24f1..0dc39cf30fdd 100644
--- a/arch/arm/mach-dove/cm-a510.c
+++ b/arch/arm/mach-dove/cm-a510.c
@@ -92,6 +92,6 @@ MACHINE_START(CM_A510, "Compulab CM-A510 Board")
92 .map_io = dove_map_io, 92 .map_io = dove_map_io,
93 .init_early = dove_init_early, 93 .init_early = dove_init_early,
94 .init_irq = dove_init_irq, 94 .init_irq = dove_init_irq,
95 .timer = &dove_timer, 95 .init_time = dove_timer_init,
96 .restart = dove_restart, 96 .restart = dove_restart,
97MACHINE_END 97MACHINE_END
diff --git a/arch/arm/mach-dove/common.c b/arch/arm/mach-dove/common.c
index 89f4f993cd03..ea84c535a110 100644
--- a/arch/arm/mach-dove/common.c
+++ b/arch/arm/mach-dove/common.c
@@ -8,35 +8,24 @@
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10 10
11#include <linux/kernel.h>
12#include <linux/delay.h>
13#include <linux/init.h>
14#include <linux/platform_device.h>
15#include <linux/pci.h>
16#include <linux/clk-provider.h> 11#include <linux/clk-provider.h>
17#include <linux/clk/mvebu.h> 12#include <linux/clk/mvebu.h>
18#include <linux/ata_platform.h> 13#include <linux/dma-mapping.h>
19#include <linux/gpio.h> 14#include <linux/init.h>
20#include <linux/of.h> 15#include <linux/of.h>
21#include <linux/of_platform.h> 16#include <linux/of_platform.h>
22#include <asm/page.h> 17#include <linux/platform_data/dma-mv_xor.h>
23#include <asm/setup.h> 18#include <linux/platform_data/usb-ehci-orion.h>
24#include <asm/timex.h> 19#include <linux/platform_device.h>
25#include <asm/hardware/cache-tauros2.h> 20#include <asm/hardware/cache-tauros2.h>
21#include <asm/mach/arch.h>
26#include <asm/mach/map.h> 22#include <asm/mach/map.h>
27#include <asm/mach/time.h> 23#include <asm/mach/time.h>
28#include <asm/mach/pci.h>
29#include <mach/dove.h>
30#include <mach/pm.h>
31#include <mach/bridge-regs.h> 24#include <mach/bridge-regs.h>
32#include <asm/mach/arch.h> 25#include <mach/pm.h>
33#include <linux/irq.h>
34#include <plat/time.h>
35#include <linux/platform_data/usb-ehci-orion.h>
36#include <linux/platform_data/dma-mv_xor.h>
37#include <plat/irq.h>
38#include <plat/common.h> 26#include <plat/common.h>
39#include <plat/addr-map.h> 27#include <plat/irq.h>
28#include <plat/time.h>
40#include "common.h" 29#include "common.h"
41 30
42/***************************************************************************** 31/*****************************************************************************
@@ -242,17 +231,13 @@ static int __init dove_find_tclk(void)
242 return 166666667; 231 return 166666667;
243} 232}
244 233
245static void __init dove_timer_init(void) 234void __init dove_timer_init(void)
246{ 235{
247 dove_tclk = dove_find_tclk(); 236 dove_tclk = dove_find_tclk();
248 orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, 237 orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
249 IRQ_DOVE_BRIDGE, dove_tclk); 238 IRQ_DOVE_BRIDGE, dove_tclk);
250} 239}
251 240
252struct sys_timer dove_timer = {
253 .init = dove_timer_init,
254};
255
256/***************************************************************************** 241/*****************************************************************************
257 * Cryptographic Engines and Security Accelerator (CESA) 242 * Cryptographic Engines and Security Accelerator (CESA)
258 ****************************************************************************/ 243 ****************************************************************************/
@@ -454,7 +439,7 @@ DT_MACHINE_START(DOVE_DT, "Marvell Dove (Flattened Device Tree)")
454 .map_io = dove_map_io, 439 .map_io = dove_map_io,
455 .init_early = dove_init_early, 440 .init_early = dove_init_early,
456 .init_irq = orion_dt_init_irq, 441 .init_irq = orion_dt_init_irq,
457 .timer = &dove_timer, 442 .init_time = dove_timer_init,
458 .init_machine = dove_dt_init, 443 .init_machine = dove_dt_init,
459 .restart = dove_restart, 444 .restart = dove_restart,
460 .dt_compat = dove_dt_board_compat, 445 .dt_compat = dove_dt_board_compat,
diff --git a/arch/arm/mach-dove/common.h b/arch/arm/mach-dove/common.h
index 1a233404b735..ee59fba4c6d1 100644
--- a/arch/arm/mach-dove/common.h
+++ b/arch/arm/mach-dove/common.h
@@ -14,7 +14,7 @@
14struct mv643xx_eth_platform_data; 14struct mv643xx_eth_platform_data;
15struct mv_sata_platform_data; 15struct mv_sata_platform_data;
16 16
17extern struct sys_timer dove_timer; 17extern void dove_timer_init(void);
18 18
19/* 19/*
20 * Basic Dove init functions used early by machine-setup. 20 * Basic Dove init functions used early by machine-setup.
diff --git a/arch/arm/mach-dove/dove-db-setup.c b/arch/arm/mach-dove/dove-db-setup.c
index bc2867f11346..76e26f949c27 100644
--- a/arch/arm/mach-dove/dove-db-setup.c
+++ b/arch/arm/mach-dove/dove-db-setup.c
@@ -98,6 +98,6 @@ MACHINE_START(DOVE_DB, "Marvell DB-MV88AP510-BP Development Board")
98 .map_io = dove_map_io, 98 .map_io = dove_map_io,
99 .init_early = dove_init_early, 99 .init_early = dove_init_early,
100 .init_irq = dove_init_irq, 100 .init_irq = dove_init_irq,
101 .timer = &dove_timer, 101 .init_time = dove_timer_init,
102 .restart = dove_restart, 102 .restart = dove_restart,
103MACHINE_END 103MACHINE_END
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-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index f0fe6b5350e2..b13cc74114db 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -158,7 +158,7 @@ static void __init ebsa110_init_early(void)
158 * interrupt, then the PIT counter will roll over (ie, be negative). 158 * interrupt, then the PIT counter will roll over (ie, be negative).
159 * This actually works out to be convenient. 159 * This actually works out to be convenient.
160 */ 160 */
161static unsigned long ebsa110_gettimeoffset(void) 161static u32 ebsa110_gettimeoffset(void)
162{ 162{
163 unsigned long offset, count; 163 unsigned long offset, count;
164 164
@@ -181,7 +181,7 @@ static unsigned long ebsa110_gettimeoffset(void)
181 */ 181 */
182 offset = offset * (1000000 / HZ) / COUNT; 182 offset = offset * (1000000 / HZ) / COUNT;
183 183
184 return offset; 184 return offset * 1000;
185} 185}
186 186
187static irqreturn_t 187static irqreturn_t
@@ -213,8 +213,10 @@ static struct irqaction ebsa110_timer_irq = {
213/* 213/*
214 * Set up timer interrupt. 214 * Set up timer interrupt.
215 */ 215 */
216static void __init ebsa110_timer_init(void) 216void __init ebsa110_timer_init(void)
217{ 217{
218 arch_gettimeoffset = ebsa110_gettimeoffset;
219
218 /* 220 /*
219 * Timer 1, mode 2, LSB/MSB 221 * Timer 1, mode 2, LSB/MSB
220 */ 222 */
@@ -225,11 +227,6 @@ static void __init ebsa110_timer_init(void)
225 setup_irq(IRQ_EBSA110_TIMER0, &ebsa110_timer_irq); 227 setup_irq(IRQ_EBSA110_TIMER0, &ebsa110_timer_irq);
226} 228}
227 229
228static struct sys_timer ebsa110_timer = {
229 .init = ebsa110_timer_init,
230 .offset = ebsa110_gettimeoffset,
231};
232
233static struct plat_serial8250_port serial_platform_data[] = { 230static struct plat_serial8250_port serial_platform_data[] = {
234 { 231 {
235 .iobase = 0x3f8, 232 .iobase = 0x3f8,
@@ -328,6 +325,6 @@ MACHINE_START(EBSA110, "EBSA110")
328 .map_io = ebsa110_map_io, 325 .map_io = ebsa110_map_io,
329 .init_early = ebsa110_init_early, 326 .init_early = ebsa110_init_early,
330 .init_irq = ebsa110_init_irq, 327 .init_irq = ebsa110_init_irq,
331 .timer = &ebsa110_timer, 328 .init_time = ebsa110_timer_init,
332 .restart = ebsa110_restart, 329 .restart = ebsa110_restart,
333MACHINE_END 330MACHINE_END
diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c
index 41383bf03d4b..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,8 +38,7 @@ 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, 41 .init_time = ep93xx_timer_init,
43 .timer = &ep93xx_timer,
44 .init_machine = adssphere_init_machine, 42 .init_machine = adssphere_init_machine,
45 .init_late = ep93xx_init_late, 43 .init_late = ep93xx_init_late,
46 .restart = ep93xx_restart, 44 .restart = ep93xx_restart,
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index e85bf17f2d2a..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/*************************************************************************
@@ -140,11 +139,29 @@ static struct irqaction ep93xx_timer_irq = {
140 .handler = ep93xx_timer_interrupt, 139 .handler = ep93xx_timer_interrupt,
141}; 140};
142 141
143static void __init ep93xx_timer_init(void) 142static u32 ep93xx_gettimeoffset(void)
143{
144 int offset;
145
146 offset = __raw_readl(EP93XX_TIMER4_VALUE_LOW) - last_jiffy_time;
147
148 /*
149 * Timer 4 is based on a 983.04 kHz reference clock,
150 * so dividing by 983040 gives the fraction of a second,
151 * so dividing by 0.983040 converts to uS.
152 * Refactor the calculation to avoid overflow.
153 * Finally, multiply by 1000 to give nS.
154 */
155 return (offset + (53 * offset / 3072)) * 1000;
156}
157
158void __init ep93xx_timer_init(void)
144{ 159{
145 u32 tmode = EP93XX_TIMER123_CONTROL_MODE | 160 u32 tmode = EP93XX_TIMER123_CONTROL_MODE |
146 EP93XX_TIMER123_CONTROL_CLKSEL; 161 EP93XX_TIMER123_CONTROL_CLKSEL;
147 162
163 arch_gettimeoffset = ep93xx_gettimeoffset;
164
148 /* Enable periodic HZ timer. */ 165 /* Enable periodic HZ timer. */
149 __raw_writel(tmode, EP93XX_TIMER1_CONTROL); 166 __raw_writel(tmode, EP93XX_TIMER1_CONTROL);
150 __raw_writel(TIMER1_RELOAD, EP93XX_TIMER1_LOAD); 167 __raw_writel(TIMER1_RELOAD, EP93XX_TIMER1_LOAD);
@@ -158,21 +175,6 @@ static void __init ep93xx_timer_init(void)
158 setup_irq(IRQ_EP93XX_TIMER1, &ep93xx_timer_irq); 175 setup_irq(IRQ_EP93XX_TIMER1, &ep93xx_timer_irq);
159} 176}
160 177
161static unsigned long ep93xx_gettimeoffset(void)
162{
163 int offset;
164
165 offset = __raw_readl(EP93XX_TIMER4_VALUE_LOW) - last_jiffy_time;
166
167 /* Calculate (1000000 / 983040) * offset. */
168 return offset + (53 * offset / 3072);
169}
170
171struct sys_timer ep93xx_timer = {
172 .init = ep93xx_timer_init,
173 .offset = ep93xx_gettimeoffset,
174};
175
176 178
177/************************************************************************* 179/*************************************************************************
178 * EP93xx IRQ handling 180 * EP93xx IRQ handling
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c
index b8f53d57a299..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,8 +275,7 @@ 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, 278 .init_time = ep93xx_timer_init,
280 .timer = &ep93xx_timer,
281 .init_machine = edb93xx_init_machine, 279 .init_machine = edb93xx_init_machine,
282 .init_late = ep93xx_init_late, 280 .init_late = ep93xx_init_late,
283 .restart = ep93xx_restart, 281 .restart = ep93xx_restart,
@@ -290,8 +288,7 @@ 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, 291 .init_time = ep93xx_timer_init,
294 .timer = &ep93xx_timer,
295 .init_machine = edb93xx_init_machine, 292 .init_machine = edb93xx_init_machine,
296 .init_late = ep93xx_init_late, 293 .init_late = ep93xx_init_late,
297 .restart = ep93xx_restart, 294 .restart = ep93xx_restart,
@@ -304,8 +301,7 @@ 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, 304 .init_time = ep93xx_timer_init,
308 .timer = &ep93xx_timer,
309 .init_machine = edb93xx_init_machine, 305 .init_machine = edb93xx_init_machine,
310 .init_late = ep93xx_init_late, 306 .init_late = ep93xx_init_late,
311 .restart = ep93xx_restart, 307 .restart = ep93xx_restart,
@@ -318,8 +314,7 @@ 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, 317 .init_time = ep93xx_timer_init,
322 .timer = &ep93xx_timer,
323 .init_machine = edb93xx_init_machine, 318 .init_machine = edb93xx_init_machine,
324 .init_late = ep93xx_init_late, 319 .init_late = ep93xx_init_late,
325 .restart = ep93xx_restart, 320 .restart = ep93xx_restart,
@@ -332,8 +327,7 @@ 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, 330 .init_time = ep93xx_timer_init,
336 .timer = &ep93xx_timer,
337 .init_machine = edb93xx_init_machine, 331 .init_machine = edb93xx_init_machine,
338 .init_late = ep93xx_init_late, 332 .init_late = ep93xx_init_late,
339 .restart = ep93xx_restart, 333 .restart = ep93xx_restart,
@@ -346,8 +340,7 @@ 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, 343 .init_time = ep93xx_timer_init,
350 .timer = &ep93xx_timer,
351 .init_machine = edb93xx_init_machine, 344 .init_machine = edb93xx_init_machine,
352 .init_late = ep93xx_init_late, 345 .init_late = ep93xx_init_late,
353 .restart = ep93xx_restart, 346 .restart = ep93xx_restart,
@@ -360,8 +353,7 @@ 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, 356 .init_time = ep93xx_timer_init,
364 .timer = &ep93xx_timer,
365 .init_machine = edb93xx_init_machine, 357 .init_machine = edb93xx_init_machine,
366 .init_late = ep93xx_init_late, 358 .init_late = ep93xx_init_late,
367 .restart = ep93xx_restart, 359 .restart = ep93xx_restart,
@@ -374,8 +366,7 @@ 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, 369 .init_time = ep93xx_timer_init,
378 .timer = &ep93xx_timer,
379 .init_machine = edb93xx_init_machine, 370 .init_machine = edb93xx_init_machine,
380 .init_late = ep93xx_init_late, 371 .init_late = ep93xx_init_late,
381 .restart = ep93xx_restart, 372 .restart = ep93xx_restart,
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c
index 7fd705b5efe4..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,8 +38,7 @@ 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, 41 .init_time = ep93xx_timer_init,
43 .timer = &ep93xx_timer,
44 .init_machine = gesbc9312_init_machine, 42 .init_machine = gesbc9312_init_machine,
45 .init_late = ep93xx_init_late, 43 .init_late = ep93xx_init_late,
46 .restart = ep93xx_restart, 44 .restart = ep93xx_restart,
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h
index 33a5122c6dc8..a14e1b37beff 100644
--- a/arch/arm/mach-ep93xx/include/mach/platform.h
+++ b/arch/arm/mach-ep93xx/include/mach/platform.h
@@ -53,7 +53,7 @@ int ep93xx_ide_acquire_gpio(struct platform_device *pdev);
53void ep93xx_ide_release_gpio(struct platform_device *pdev); 53void ep93xx_ide_release_gpio(struct platform_device *pdev);
54 54
55void ep93xx_init_devices(void); 55void ep93xx_init_devices(void);
56extern struct sys_timer ep93xx_timer; 56extern void ep93xx_timer_init(void);
57 57
58void ep93xx_restart(char, const char *); 58void ep93xx_restart(char, const char *);
59void ep93xx_init_late(void); 59void ep93xx_init_late(void);
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c
index 3d7cdab725b2..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,8 +81,7 @@ 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, 84 .init_time = ep93xx_timer_init,
86 .timer = &ep93xx_timer,
87 .init_machine = micro9_init_machine, 85 .init_machine = micro9_init_machine,
88 .init_late = ep93xx_init_late, 86 .init_late = ep93xx_init_late,
89 .restart = ep93xx_restart, 87 .restart = ep93xx_restart,
@@ -96,8 +94,7 @@ 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, 97 .init_time = ep93xx_timer_init,
100 .timer = &ep93xx_timer,
101 .init_machine = micro9_init_machine, 98 .init_machine = micro9_init_machine,
102 .init_late = ep93xx_init_late, 99 .init_late = ep93xx_init_late,
103 .restart = ep93xx_restart, 100 .restart = ep93xx_restart,
@@ -110,8 +107,7 @@ 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, 110 .init_time = ep93xx_timer_init,
114 .timer = &ep93xx_timer,
115 .init_machine = micro9_init_machine, 111 .init_machine = micro9_init_machine,
116 .init_late = ep93xx_init_late, 112 .init_late = ep93xx_init_late,
117 .restart = ep93xx_restart, 113 .restart = ep93xx_restart,
@@ -124,8 +120,7 @@ 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, 123 .init_time = ep93xx_timer_init,
128 .timer = &ep93xx_timer,
129 .init_machine = micro9_init_machine, 124 .init_machine = micro9_init_machine,
130 .init_late = ep93xx_init_late, 125 .init_late = ep93xx_init_late,
131 .restart = ep93xx_restart, 126 .restart = ep93xx_restart,
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c
index 0eb3f17a6fa2..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,8 +82,7 @@ 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, 85 .init_time = ep93xx_timer_init,
87 .timer = &ep93xx_timer,
88 .init_machine = simone_init_machine, 86 .init_machine = simone_init_machine,
89 .init_late = ep93xx_init_late, 87 .init_late = ep93xx_init_late,
90 .restart = ep93xx_restart, 88 .restart = ep93xx_restart,
diff --git a/arch/arm/mach-ep93xx/snappercl15.c b/arch/arm/mach-ep93xx/snappercl15.c
index 50043eef1cf2..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,8 +175,7 @@ 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, 178 .init_time = ep93xx_timer_init,
180 .timer = &ep93xx_timer,
181 .init_machine = snappercl15_init_machine, 179 .init_machine = snappercl15_init_machine,
182 .init_late = ep93xx_init_late, 180 .init_late = ep93xx_init_late,
183 .restart = ep93xx_restart, 181 .restart = ep93xx_restart,
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index 3c4c233391dc..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,8 +245,7 @@ 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, 248 .init_time = ep93xx_timer_init,
250 .timer = &ep93xx_timer,
251 .init_machine = ts72xx_init_machine, 249 .init_machine = ts72xx_init_machine,
252 .init_late = ep93xx_init_late, 250 .init_late = ep93xx_init_late,
253 .restart = ep93xx_restart, 251 .restart = ep93xx_restart,
diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c b/arch/arm/mach-ep93xx/vision_ep9307.c
index ba92e25e3016..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,8 +363,7 @@ 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, 366 .init_time = ep93xx_timer_init,
368 .timer = &ep93xx_timer,
369 .init_machine = vision_init_machine, 367 .init_machine = vision_init_machine,
370 .init_late = ep93xx_init_late, 368 .init_late = ep93xx_init_late,
371 .restart = ep93xx_restart, 369 .restart = ep93xx_restart,
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..9ce3e54a77c4 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>
@@ -35,7 +36,6 @@
35#include <mach/regs-irq.h> 36#include <mach/regs-irq.h>
36#include <mach/regs-pmu.h> 37#include <mach/regs-pmu.h>
37#include <mach/regs-gpio.h> 38#include <mach/regs-gpio.h>
38#include <mach/pmu.h>
39 39
40#include <plat/cpu.h> 40#include <plat/cpu.h>
41#include <plat/clock.h> 41#include <plat/clock.h>
@@ -424,11 +424,18 @@ static void __init exynos5_init_clocks(int xtal)
424{ 424{
425 printk(KERN_DEBUG "%s: initializing clocks\n", __func__); 425 printk(KERN_DEBUG "%s: initializing clocks\n", __func__);
426 426
427 /* EXYNOS5440 can support only common clock framework */
428
429 if (soc_is_exynos5440())
430 return;
431
432#ifdef CONFIG_SOC_EXYNOS5250
427 s3c24xx_register_baseclocks(xtal); 433 s3c24xx_register_baseclocks(xtal);
428 s5p_register_clocks(xtal); 434 s5p_register_clocks(xtal);
429 435
430 exynos5_register_clocks(); 436 exynos5_register_clocks();
431 exynos5_setup_clocks(); 437 exynos5_setup_clocks();
438#endif
432} 439}
433 440
434#define COMBINER_ENABLE_SET 0x0 441#define COMBINER_ENABLE_SET 0x0
@@ -637,8 +644,6 @@ static int __init combiner_of_init(struct device_node *np,
637} 644}
638 645
639static const struct of_device_id exynos_dt_irq_match[] = { 646static 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", 647 { .compatible = "samsung,exynos4210-combiner",
643 .data = combiner_of_init, }, 648 .data = combiner_of_init, },
644 {}, 649 {},
@@ -654,8 +659,10 @@ void __init exynos4_init_irq(void)
654 if (!of_have_populated_dt()) 659 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); 660 gic_init_bases(0, IRQ_PPI(0), S5P_VA_GIC_DIST, S5P_VA_GIC_CPU, gic_bank_offset, NULL);
656#ifdef CONFIG_OF 661#ifdef CONFIG_OF
657 else 662 else {
663 irqchip_init();
658 of_irq_init(exynos_dt_irq_match); 664 of_irq_init(exynos_dt_irq_match);
665 }
659#endif 666#endif
660 667
661 if (!of_have_populated_dt()) 668 if (!of_have_populated_dt())
@@ -672,6 +679,7 @@ void __init exynos4_init_irq(void)
672void __init exynos5_init_irq(void) 679void __init exynos5_init_irq(void)
673{ 680{
674#ifdef CONFIG_OF 681#ifdef CONFIG_OF
682 irqchip_init();
675 of_irq_init(exynos_dt_irq_match); 683 of_irq_init(exynos_dt_irq_match);
676#endif 684#endif
677 /* 685 /*
diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h
index 04744f9c120f..feefc86293c2 100644
--- a/arch/arm/mach-exynos/common.h
+++ b/arch/arm/mach-exynos/common.h
@@ -12,7 +12,7 @@
12#ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H 12#ifndef __ARCH_ARM_MACH_EXYNOS_COMMON_H
13#define __ARCH_ARM_MACH_EXYNOS_COMMON_H 13#define __ARCH_ARM_MACH_EXYNOS_COMMON_H
14 14
15extern struct sys_timer exynos4_timer; 15extern void exynos4_timer_init(void);
16 16
17struct map_desc; 17struct map_desc;
18void exynos_init_io(struct map_desc *mach_desc, int size); 18void exynos_init_io(struct map_desc *mach_desc, int size);
@@ -64,4 +64,24 @@ extern struct smp_operations exynos_smp_ops;
64 64
65extern void exynos_cpu_die(unsigned int cpu); 65extern void exynos_cpu_die(unsigned int cpu);
66 66
67/* PMU(Power Management Unit) support */
68
69#define PMU_TABLE_END NULL
70
71enum sys_powerdown {
72 SYS_AFTR,
73 SYS_LPA,
74 SYS_SLEEP,
75 NUM_SYS_POWERDOWN,
76};
77
78extern unsigned long l2x0_regs_phys;
79struct exynos_pmu_conf {
80 void __iomem *reg;
81 unsigned int val[NUM_SYS_POWERDOWN];
82};
83
84extern void exynos_sys_powerdown_conf(enum sys_powerdown mode);
85extern void s3c_cpu_resume(void);
86
67#endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */ 87#endif /* __ARCH_ARM_MACH_EXYNOS_COMMON_H */
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index 050924152776..fcfe0251aa3e 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -23,10 +23,11 @@
23#include <asm/cpuidle.h> 23#include <asm/cpuidle.h>
24#include <mach/regs-clock.h> 24#include <mach/regs-clock.h>
25#include <mach/regs-pmu.h> 25#include <mach/regs-pmu.h>
26#include <mach/pmu.h>
27 26
28#include <plat/cpu.h> 27#include <plat/cpu.h>
29 28
29#include "common.h"
30
30#define REG_DIRECTGO_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \ 31#define REG_DIRECTGO_ADDR (samsung_rev() == EXYNOS4210_REV_1_1 ? \
31 S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \ 32 S5P_INFORM7 : (samsung_rev() == EXYNOS4210_REV_1_0 ? \
32 (S5P_VA_SYSRAM + 0x24) : S5P_INFORM0)) 33 (S5P_VA_SYSRAM + 0x24) : S5P_INFORM0))
diff --git a/arch/arm/mach-exynos/dev-audio.c b/arch/arm/mach-exynos/dev-audio.c
index 9d1a60951d7b..c662c89794b2 100644
--- a/arch/arm/mach-exynos/dev-audio.c
+++ b/arch/arm/mach-exynos/dev-audio.c
@@ -21,7 +21,8 @@
21#include <mach/map.h> 21#include <mach/map.h>
22#include <mach/dma.h> 22#include <mach/dma.h>
23#include <mach/irqs.h> 23#include <mach/irqs.h>
24#include <mach/regs-audss.h> 24
25#define EXYNOS4_AUDSS_INT_MEM (0x03000000)
25 26
26static int exynos4_cfg_i2s(struct platform_device *pdev) 27static int exynos4_cfg_i2s(struct platform_device *pdev)
27{ 28{
diff --git a/arch/arm/mach-exynos/include/mach/cpufreq.h b/arch/arm/mach-exynos/include/mach/cpufreq.h
deleted file mode 100644
index 7517c3f417af..000000000000
--- a/arch/arm/mach-exynos/include/mach/cpufreq.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/* linux/arch/arm/mach-exynos/include/mach/cpufreq.h
2 *
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * EXYNOS - CPUFreq support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13enum cpufreq_level_index {
14 L0, L1, L2, L3, L4,
15 L5, L6, L7, L8, L9,
16 L10, L11, L12, L13, L14,
17 L15, L16, L17, L18, L19,
18 L20,
19};
20
21struct exynos_dvfs_info {
22 unsigned long mpll_freq_khz;
23 unsigned int pll_safe_idx;
24 unsigned int pm_lock_idx;
25 unsigned int max_support_idx;
26 unsigned int min_support_idx;
27 struct clk *cpu_clk;
28 unsigned int *volt_table;
29 struct cpufreq_frequency_table *freq_table;
30 void (*set_freq)(unsigned int, unsigned int);
31 bool (*need_apll_change)(unsigned int, unsigned int);
32};
33
34extern int exynos4210_cpufreq_init(struct exynos_dvfs_info *);
35extern int exynos4x12_cpufreq_init(struct exynos_dvfs_info *);
36extern int exynos5250_cpufreq_init(struct exynos_dvfs_info *);
diff --git a/arch/arm/mach-exynos/include/mach/pmu.h b/arch/arm/mach-exynos/include/mach/pmu.h
deleted file mode 100644
index 7c27c2d4bf44..000000000000
--- a/arch/arm/mach-exynos/include/mach/pmu.h
+++ /dev/null
@@ -1,34 +0,0 @@
1/* linux/arch/arm/mach-exynos4/include/mach/pmu.h
2 *
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
5 *
6 * EXYNOS4210 - PMU(Power Management Unit) support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_PMU_H
14#define __ASM_ARCH_PMU_H __FILE__
15
16#define PMU_TABLE_END NULL
17
18enum sys_powerdown {
19 SYS_AFTR,
20 SYS_LPA,
21 SYS_SLEEP,
22 NUM_SYS_POWERDOWN,
23};
24
25extern unsigned long l2x0_regs_phys;
26struct exynos_pmu_conf {
27 void __iomem *reg;
28 unsigned int val[NUM_SYS_POWERDOWN];
29};
30
31extern void exynos_sys_powerdown_conf(enum sys_powerdown mode);
32extern void s3c_cpu_resume(void);
33
34#endif /* __ASM_ARCH_PMU_H */
diff --git a/arch/arm/mach-exynos/include/mach/regs-audss.h b/arch/arm/mach-exynos/include/mach/regs-audss.h
deleted file mode 100644
index ca5a8b64218a..000000000000
--- a/arch/arm/mach-exynos/include/mach/regs-audss.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/* arch/arm/mach-exynos4/include/mach/regs-audss.h
2 *
3 * Copyright (c) 2011 Samsung Electronics
4 * http://www.samsung.com
5 *
6 * Exynos4 Audio SubSystem clock register definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __PLAT_REGS_AUDSS_H
14#define __PLAT_REGS_AUDSS_H __FILE__
15
16#define EXYNOS4_AUDSS_INT_MEM (0x03000000)
17
18#endif /* _PLAT_REGS_AUDSS_H */
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 b938f9fc1dd1..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,9 +200,8 @@ 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 .timer = &exynos4_timer, 205 .init_time = exynos4_timer_init,
208 .restart = exynos4_restart, 206 .restart = exynos4_restart,
209MACHINE_END 207MACHINE_END
diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c
index 92757ff817ae..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,10 +106,9 @@ 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 .timer = &exynos4_timer, 111 .init_time = exynos4_timer_init,
114 .dt_compat = exynos4_dt_compat, 112 .dt_compat = exynos4_dt_compat,
115 .restart = exynos4_restart, 113 .restart = exynos4_restart,
116MACHINE_END 114MACHINE_END
diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c
index e99d3d8f2bcf..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,10 +178,9 @@ 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 .timer = &exynos4_timer, 183 .init_time = exynos4_timer_init,
186 .dt_compat = exynos5_dt_compat, 184 .dt_compat = exynos5_dt_compat,
187 .restart = exynos5_restart, 185 .restart = exynos5_restart,
188 .reserve = exynos5_reserve, 186 .reserve = exynos5_reserve,
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index 27d4ed8b116e..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,10 +1378,9 @@ 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 .timer = &exynos4_timer, 1383 .init_time = exynos4_timer_init,
1386 .reserve = &nuri_reserve, 1384 .reserve = &nuri_reserve,
1387 .restart = exynos4_restart, 1385 .restart = exynos4_restart,
1388MACHINE_END 1386MACHINE_END
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index 5e34b9c16196..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,10 +813,9 @@ 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 .timer = &exynos4_timer, 818 .init_time = exynos4_timer_init,
821 .reserve = &origen_reserve, 819 .reserve = &origen_reserve,
822 .restart = exynos4_restart, 820 .restart = exynos4_restart,
823MACHINE_END 821MACHINE_END
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c
index ae6da40c2aa9..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,9 +375,8 @@ 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 .timer = &exynos4_timer, 379 .init_time = exynos4_timer_init,
382 .restart = exynos4_restart, 380 .restart = exynos4_restart,
383 .reserve = &smdk4x12_reserve, 381 .reserve = &smdk4x12_reserve,
384MACHINE_END 382MACHINE_END
@@ -390,10 +388,9 @@ 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 .timer = &exynos4_timer, 393 .init_time = exynos4_timer_init,
397 .restart = exynos4_restart, 394 .restart = exynos4_restart,
398 .reserve = &smdk4x12_reserve, 395 .reserve = &smdk4x12_reserve,
399MACHINE_END 396MACHINE_END
diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c
index 35548e3c097d..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,9 +422,8 @@ 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 .timer = &exynos4_timer, 426 .init_time = exynos4_timer_init,
429 .reserve = &smdkv310_reserve, 427 .reserve = &smdkv310_reserve,
430 .restart = exynos4_restart, 428 .restart = exynos4_restart,
431MACHINE_END 429MACHINE_END
@@ -436,10 +434,9 @@ 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 .timer = &exynos4_timer, 439 .init_time = exynos4_timer_init,
443 .reserve = &smdkv310_reserve, 440 .reserve = &smdkv310_reserve,
444 .restart = exynos4_restart, 441 .restart = exynos4_restart,
445MACHINE_END 442MACHINE_END
diff --git a/arch/arm/mach-exynos/mach-universal_c210.c b/arch/arm/mach-exynos/mach-universal_c210.c
index 9e3340f18950..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,10 +1150,9 @@ 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 .timer = &s5p_timer, 1155 .init_time = s5p_timer_init,
1158 .reserve = &universal_reserve, 1156 .reserve = &universal_reserve,
1159 .restart = exynos4_restart, 1157 .restart = exynos4_restart,
1160MACHINE_END 1158MACHINE_END
diff --git a/arch/arm/mach-exynos/mct.c b/arch/arm/mach-exynos/mct.c
index 57668eb68e75..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
@@ -478,7 +467,7 @@ static void __init exynos4_timer_resources(void)
478#endif /* CONFIG_LOCAL_TIMERS */ 467#endif /* CONFIG_LOCAL_TIMERS */
479} 468}
480 469
481static void __init exynos_timer_init(void) 470void __init exynos4_timer_init(void)
482{ 471{
483 if (soc_is_exynos5440()) { 472 if (soc_is_exynos5440()) {
484 arch_timer_of_register(); 473 arch_timer_of_register();
@@ -494,7 +483,3 @@ static void __init exynos_timer_init(void)
494 exynos4_clocksource_init(); 483 exynos4_clocksource_init();
495 exynos4_clockevent_init(); 484 exynos4_clockevent_init();
496} 485}
497
498struct sys_timer exynos4_timer = {
499 .init = exynos_timer_init,
500};
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-exynos/pm.c b/arch/arm/mach-exynos/pm.c
index b9b539cac81e..f459afda822a 100644
--- a/arch/arm/mach-exynos/pm.c
+++ b/arch/arm/mach-exynos/pm.c
@@ -34,7 +34,8 @@
34#include <mach/regs-clock.h> 34#include <mach/regs-clock.h>
35#include <mach/regs-pmu.h> 35#include <mach/regs-pmu.h>
36#include <mach/pm-core.h> 36#include <mach/pm-core.h>
37#include <mach/pmu.h> 37
38#include "common.h"
38 39
39static struct sleep_save exynos4_set_clksrc[] = { 40static struct sleep_save exynos4_set_clksrc[] = {
40 { .reg = EXYNOS4_CLKSRC_MASK_TOP , .val = 0x00000001, }, 41 { .reg = EXYNOS4_CLKSRC_MASK_TOP , .val = 0x00000001, },
diff --git a/arch/arm/mach-exynos/pmu.c b/arch/arm/mach-exynos/pmu.c
index 3a48c852be6c..daebc1abc966 100644
--- a/arch/arm/mach-exynos/pmu.c
+++ b/arch/arm/mach-exynos/pmu.c
@@ -14,7 +14,8 @@
14#include <linux/bug.h> 14#include <linux/bug.h>
15 15
16#include <mach/regs-clock.h> 16#include <mach/regs-clock.h>
17#include <mach/pmu.h> 17
18#include "common.h"
18 19
19static struct exynos_pmu_conf *exynos_pmu_config; 20static struct exynos_pmu_conf *exynos_pmu_config;
20 21
diff --git a/arch/arm/mach-footbridge/cats-hw.c b/arch/arm/mach-footbridge/cats-hw.c
index 25b453601acc..6987a09ec219 100644
--- a/arch/arm/mach-footbridge/cats-hw.c
+++ b/arch/arm/mach-footbridge/cats-hw.c
@@ -90,6 +90,6 @@ MACHINE_START(CATS, "Chalice-CATS")
90 .fixup = fixup_cats, 90 .fixup = fixup_cats,
91 .map_io = footbridge_map_io, 91 .map_io = footbridge_map_io,
92 .init_irq = footbridge_init_irq, 92 .init_irq = footbridge_init_irq,
93 .timer = &isa_timer, 93 .init_time = isa_timer_init,
94 .restart = footbridge_restart, 94 .restart = footbridge_restart,
95MACHINE_END 95MACHINE_END
diff --git a/arch/arm/mach-footbridge/common.h b/arch/arm/mach-footbridge/common.h
index c9767b892cb2..a846e50a07b8 100644
--- a/arch/arm/mach-footbridge/common.h
+++ b/arch/arm/mach-footbridge/common.h
@@ -1,6 +1,6 @@
1 1
2extern struct sys_timer footbridge_timer; 2extern void footbridge_timer_init(void);
3extern struct sys_timer isa_timer; 3extern void isa_timer_init(void);
4 4
5extern void isa_rtc_init(void); 5extern void isa_rtc_init(void);
6 6
diff --git a/arch/arm/mach-footbridge/dc21285-timer.c b/arch/arm/mach-footbridge/dc21285-timer.c
index 3b54196447c7..9ee78f7b4990 100644
--- a/arch/arm/mach-footbridge/dc21285-timer.c
+++ b/arch/arm/mach-footbridge/dc21285-timer.c
@@ -93,7 +93,7 @@ static struct irqaction footbridge_timer_irq = {
93/* 93/*
94 * Set up timer interrupt. 94 * Set up timer interrupt.
95 */ 95 */
96static void __init footbridge_timer_init(void) 96void __init footbridge_timer_init(void)
97{ 97{
98 struct clock_event_device *ce = &ckevt_dc21285; 98 struct clock_event_device *ce = &ckevt_dc21285;
99 99
@@ -101,14 +101,6 @@ static 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}
111
112struct sys_timer footbridge_timer = {
113 .init = footbridge_timer_init,
114};
diff --git a/arch/arm/mach-footbridge/ebsa285.c b/arch/arm/mach-footbridge/ebsa285.c
index b09551ef89ca..b08243500e2e 100644
--- a/arch/arm/mach-footbridge/ebsa285.c
+++ b/arch/arm/mach-footbridge/ebsa285.c
@@ -101,7 +101,7 @@ MACHINE_START(EBSA285, "EBSA285")
101 .video_end = 0x000bffff, 101 .video_end = 0x000bffff,
102 .map_io = footbridge_map_io, 102 .map_io = footbridge_map_io,
103 .init_irq = footbridge_init_irq, 103 .init_irq = footbridge_init_irq,
104 .timer = &footbridge_timer, 104 .init_time = footbridge_timer_init,
105 .restart = footbridge_restart, 105 .restart = footbridge_restart,
106MACHINE_END 106MACHINE_END
107 107
diff --git a/arch/arm/mach-footbridge/isa-timer.c b/arch/arm/mach-footbridge/isa-timer.c
index c40bb415f4b5..d9301dd56354 100644
--- a/arch/arm/mach-footbridge/isa-timer.c
+++ b/arch/arm/mach-footbridge/isa-timer.c
@@ -31,14 +31,10 @@ static struct irqaction pit_timer_irq = {
31 .dev_id = &i8253_clockevent, 31 .dev_id = &i8253_clockevent,
32}; 32};
33 33
34static void __init isa_timer_init(void) 34void __init isa_timer_init(void)
35{ 35{
36 clocksource_i8253_init(); 36 clocksource_i8253_init();
37 37
38 setup_irq(i8253_clockevent.irq, &pit_timer_irq); 38 setup_irq(i8253_clockevent.irq, &pit_timer_irq);
39 clockevent_i8253_init(false); 39 clockevent_i8253_init(false);
40} 40}
41
42struct sys_timer isa_timer = {
43 .init = isa_timer_init,
44};
diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c
index d2d14339c6c4..90ea23fdce4c 100644
--- a/arch/arm/mach-footbridge/netwinder-hw.c
+++ b/arch/arm/mach-footbridge/netwinder-hw.c
@@ -766,6 +766,6 @@ MACHINE_START(NETWINDER, "Rebel-NetWinder")
766 .fixup = fixup_netwinder, 766 .fixup = fixup_netwinder,
767 .map_io = footbridge_map_io, 767 .map_io = footbridge_map_io,
768 .init_irq = footbridge_init_irq, 768 .init_irq = footbridge_init_irq,
769 .timer = &isa_timer, 769 .init_time = isa_timer_init,
770 .restart = netwinder_restart, 770 .restart = netwinder_restart,
771MACHINE_END 771MACHINE_END
diff --git a/arch/arm/mach-footbridge/personal.c b/arch/arm/mach-footbridge/personal.c
index e1e9990fa957..7bdeabdcd4d8 100644
--- a/arch/arm/mach-footbridge/personal.c
+++ b/arch/arm/mach-footbridge/personal.c
@@ -18,7 +18,7 @@ MACHINE_START(PERSONAL_SERVER, "Compaq-PersonalServer")
18 .atag_offset = 0x100, 18 .atag_offset = 0x100,
19 .map_io = footbridge_map_io, 19 .map_io = footbridge_map_io,
20 .init_irq = footbridge_init_irq, 20 .init_irq = footbridge_init_irq,
21 .timer = &footbridge_timer, 21 .init_time = footbridge_timer_init,
22 .restart = footbridge_restart, 22 .restart = footbridge_restart,
23MACHINE_END 23MACHINE_END
24 24
diff --git a/arch/arm/mach-gemini/board-nas4220b.c b/arch/arm/mach-gemini/board-nas4220b.c
index 5927d3c253aa..08bd650c42f3 100644
--- a/arch/arm/mach-gemini/board-nas4220b.c
+++ b/arch/arm/mach-gemini/board-nas4220b.c
@@ -31,10 +31,6 @@
31 31
32#include "common.h" 32#include "common.h"
33 33
34static struct sys_timer ib4220b_timer = {
35 .init = gemini_timer_init,
36};
37
38static struct gpio_led ib4220b_leds[] = { 34static struct gpio_led ib4220b_leds[] = {
39 { 35 {
40 .name = "nas4220b:orange:hdd", 36 .name = "nas4220b:orange:hdd",
@@ -105,6 +101,6 @@ MACHINE_START(NAS4220B, "Raidsonic NAS IB-4220-B")
105 .atag_offset = 0x100, 101 .atag_offset = 0x100,
106 .map_io = gemini_map_io, 102 .map_io = gemini_map_io,
107 .init_irq = gemini_init_irq, 103 .init_irq = gemini_init_irq,
108 .timer = &ib4220b_timer, 104 .init_time = gemini_timer_init,
109 .init_machine = ib4220b_init, 105 .init_machine = ib4220b_init,
110MACHINE_END 106MACHINE_END
diff --git a/arch/arm/mach-gemini/board-rut1xx.c b/arch/arm/mach-gemini/board-rut1xx.c
index cd7437a1cea0..fa0a36337f4d 100644
--- a/arch/arm/mach-gemini/board-rut1xx.c
+++ b/arch/arm/mach-gemini/board-rut1xx.c
@@ -71,10 +71,6 @@ static struct platform_device rut1xx_leds = {
71 }, 71 },
72}; 72};
73 73
74static struct sys_timer rut1xx_timer = {
75 .init = gemini_timer_init,
76};
77
78static void __init rut1xx_init(void) 74static void __init rut1xx_init(void)
79{ 75{
80 gemini_gpio_init(); 76 gemini_gpio_init();
@@ -89,6 +85,6 @@ MACHINE_START(RUT100, "Teltonika RUT100")
89 .atag_offset = 0x100, 85 .atag_offset = 0x100,
90 .map_io = gemini_map_io, 86 .map_io = gemini_map_io,
91 .init_irq = gemini_init_irq, 87 .init_irq = gemini_init_irq,
92 .timer = &rut1xx_timer, 88 .init_time = gemini_timer_init,
93 .init_machine = rut1xx_init, 89 .init_machine = rut1xx_init,
94MACHINE_END 90MACHINE_END
diff --git a/arch/arm/mach-gemini/board-wbd111.c b/arch/arm/mach-gemini/board-wbd111.c
index a367880368f1..3321cd6cc1f3 100644
--- a/arch/arm/mach-gemini/board-wbd111.c
+++ b/arch/arm/mach-gemini/board-wbd111.c
@@ -80,10 +80,6 @@ static struct platform_device wbd111_leds_device = {
80 }, 80 },
81}; 81};
82 82
83static struct sys_timer wbd111_timer = {
84 .init = gemini_timer_init,
85};
86
87static struct mtd_partition wbd111_partitions[] = { 83static struct mtd_partition wbd111_partitions[] = {
88 { 84 {
89 .name = "RedBoot", 85 .name = "RedBoot",
@@ -132,6 +128,6 @@ MACHINE_START(WBD111, "Wiliboard WBD-111")
132 .atag_offset = 0x100, 128 .atag_offset = 0x100,
133 .map_io = gemini_map_io, 129 .map_io = gemini_map_io,
134 .init_irq = gemini_init_irq, 130 .init_irq = gemini_init_irq,
135 .timer = &wbd111_timer, 131 .init_time = gemini_timer_init,
136 .init_machine = wbd111_init, 132 .init_machine = wbd111_init,
137MACHINE_END 133MACHINE_END
diff --git a/arch/arm/mach-gemini/board-wbd222.c b/arch/arm/mach-gemini/board-wbd222.c
index f382811c1319..fe33c825fdaf 100644
--- a/arch/arm/mach-gemini/board-wbd222.c
+++ b/arch/arm/mach-gemini/board-wbd222.c
@@ -80,10 +80,6 @@ static struct platform_device wbd222_leds_device = {
80 }, 80 },
81}; 81};
82 82
83static struct sys_timer wbd222_timer = {
84 .init = gemini_timer_init,
85};
86
87static struct mtd_partition wbd222_partitions[] = { 83static struct mtd_partition wbd222_partitions[] = {
88 { 84 {
89 .name = "RedBoot", 85 .name = "RedBoot",
@@ -132,6 +128,6 @@ MACHINE_START(WBD222, "Wiliboard WBD-222")
132 .atag_offset = 0x100, 128 .atag_offset = 0x100,
133 .map_io = gemini_map_io, 129 .map_io = gemini_map_io,
134 .init_irq = gemini_init_irq, 130 .init_irq = gemini_init_irq,
135 .timer = &wbd222_timer, 131 .init_time = gemini_timer_init,
136 .init_machine = wbd222_init, 132 .init_machine = wbd222_init,
137MACHINE_END 133MACHINE_END
diff --git a/arch/arm/mach-h720x/common.c b/arch/arm/mach-h720x/common.c
index aa1331e86bcf..17ef91fa3d56 100644
--- a/arch/arm/mach-h720x/common.c
+++ b/arch/arm/mach-h720x/common.c
@@ -42,12 +42,12 @@ void __init arch_dma_init(dma_t *dma)
42} 42}
43 43
44/* 44/*
45 * Return usecs since last timer reload 45 * Return nsecs since last timer reload
46 * (timercount * (usecs perjiffie)) / (ticks per jiffie) 46 * (timercount * (usecs perjiffie)) / (ticks per jiffie)
47 */ 47 */
48unsigned long h720x_gettimeoffset(void) 48u32 h720x_gettimeoffset(void)
49{ 49{
50 return (CPU_REG (TIMER_VIRT, TM0_COUNT) * tick_usec) / LATCH; 50 return ((CPU_REG(TIMER_VIRT, TM0_COUNT) * tick_usec) / LATCH) * 1000;
51} 51}
52 52
53/* 53/*
diff --git a/arch/arm/mach-h720x/common.h b/arch/arm/mach-h720x/common.h
index 2489537d33dd..7e738410ca93 100644
--- a/arch/arm/mach-h720x/common.h
+++ b/arch/arm/mach-h720x/common.h
@@ -13,18 +13,18 @@
13 * 13 *
14 */ 14 */
15 15
16extern unsigned long h720x_gettimeoffset(void); 16extern u32 h720x_gettimeoffset(void);
17extern void __init h720x_init_irq(void); 17extern void __init h720x_init_irq(void);
18extern void __init h720x_map_io(void); 18extern void __init h720x_map_io(void);
19extern void h720x_restart(char, const char *); 19extern void h720x_restart(char, const char *);
20 20
21#ifdef CONFIG_ARCH_H7202 21#ifdef CONFIG_ARCH_H7202
22extern struct sys_timer h7202_timer; 22extern void h7202_timer_init(void);
23extern void __init init_hw_h7202(void); 23extern void __init init_hw_h7202(void);
24extern void __init h7202_init_irq(void); 24extern void __init h7202_init_irq(void);
25extern void __init h7202_init_time(void); 25extern void __init h7202_init_time(void);
26#endif 26#endif
27 27
28#ifdef CONFIG_ARCH_H7201 28#ifdef CONFIG_ARCH_H7201
29extern struct sys_timer h7201_timer; 29extern void h7201_timer_init(void);
30#endif 30#endif
diff --git a/arch/arm/mach-h720x/cpu-h7201.c b/arch/arm/mach-h720x/cpu-h7201.c
index 24df2a349a98..13c741215387 100644
--- a/arch/arm/mach-h720x/cpu-h7201.c
+++ b/arch/arm/mach-h720x/cpu-h7201.c
@@ -44,8 +44,10 @@ static struct irqaction h7201_timer_irq = {
44/* 44/*
45 * Setup TIMER0 as system timer 45 * Setup TIMER0 as system timer
46 */ 46 */
47void __init h7201_init_time(void) 47void __init h7201_timer_init(void)
48{ 48{
49 arch_gettimeoffset = h720x_gettimeoffset;
50
49 CPU_REG (TIMER_VIRT, TM0_PERIOD) = LATCH; 51 CPU_REG (TIMER_VIRT, TM0_PERIOD) = LATCH;
50 CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_RESET; 52 CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_RESET;
51 CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_REPEAT | TM_START; 53 CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_REPEAT | TM_START;
@@ -53,8 +55,3 @@ void __init h7201_init_time(void)
53 55
54 setup_irq(IRQ_TIMER0, &h7201_timer_irq); 56 setup_irq(IRQ_TIMER0, &h7201_timer_irq);
55} 57}
56
57struct sys_timer h7201_timer = {
58 .init = h7201_init_time,
59 .offset = h720x_gettimeoffset,
60};
diff --git a/arch/arm/mach-h720x/cpu-h7202.c b/arch/arm/mach-h720x/cpu-h7202.c
index c37d570b852d..e2ae7e898f9d 100644
--- a/arch/arm/mach-h720x/cpu-h7202.c
+++ b/arch/arm/mach-h720x/cpu-h7202.c
@@ -178,8 +178,10 @@ static struct irqaction h7202_timer_irq = {
178/* 178/*
179 * Setup TIMER0 as system timer 179 * Setup TIMER0 as system timer
180 */ 180 */
181void __init h7202_init_time(void) 181void __init h7202_timer_init(void)
182{ 182{
183 arch_gettimeoffset = h720x_gettimeoffset;
184
183 CPU_REG (TIMER_VIRT, TM0_PERIOD) = LATCH; 185 CPU_REG (TIMER_VIRT, TM0_PERIOD) = LATCH;
184 CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_RESET; 186 CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_RESET;
185 CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_REPEAT | TM_START; 187 CPU_REG (TIMER_VIRT, TM0_CTRL) = TM_REPEAT | TM_START;
@@ -188,11 +190,6 @@ void __init h7202_init_time(void)
188 setup_irq(IRQ_TIMER0, &h7202_timer_irq); 190 setup_irq(IRQ_TIMER0, &h7202_timer_irq);
189} 191}
190 192
191struct sys_timer h7202_timer = {
192 .init = h7202_init_time,
193 .offset = h720x_gettimeoffset,
194};
195
196void __init h7202_init_irq (void) 193void __init h7202_init_irq (void)
197{ 194{
198 int irq; 195 int irq;
diff --git a/arch/arm/mach-h720x/h7201-eval.c b/arch/arm/mach-h720x/h7201-eval.c
index 5fdb20c855e2..4fdeb686c0a9 100644
--- a/arch/arm/mach-h720x/h7201-eval.c
+++ b/arch/arm/mach-h720x/h7201-eval.c
@@ -32,7 +32,7 @@ MACHINE_START(H7201, "Hynix GMS30C7201")
32 .atag_offset = 0x1000, 32 .atag_offset = 0x1000,
33 .map_io = h720x_map_io, 33 .map_io = h720x_map_io,
34 .init_irq = h720x_init_irq, 34 .init_irq = h720x_init_irq,
35 .timer = &h7201_timer, 35 .init_time = h7201_timer_init,
36 .dma_zone_size = SZ_256M, 36 .dma_zone_size = SZ_256M,
37 .restart = h720x_restart, 37 .restart = h720x_restart,
38MACHINE_END 38MACHINE_END
diff --git a/arch/arm/mach-h720x/h7202-eval.c b/arch/arm/mach-h720x/h7202-eval.c
index 169673036c59..f68e967a2062 100644
--- a/arch/arm/mach-h720x/h7202-eval.c
+++ b/arch/arm/mach-h720x/h7202-eval.c
@@ -74,7 +74,7 @@ MACHINE_START(H7202, "Hynix HMS30C7202")
74 .atag_offset = 0x100, 74 .atag_offset = 0x100,
75 .map_io = h720x_map_io, 75 .map_io = h720x_map_io,
76 .init_irq = h7202_init_irq, 76 .init_irq = h7202_init_irq,
77 .timer = &h7202_timer, 77 .init_time = h7202_timer_init,
78 .init_machine = init_eval_h7202, 78 .init_machine = init_eval_h7202,
79 .dma_zone_size = SZ_256M, 79 .dma_zone_size = SZ_256M,
80 .restart = h720x_restart, 80 .restart = h720x_restart,
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index dc248167d206..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();
@@ -129,13 +123,9 @@ static void __init highbank_timer_init(void)
129 arch_timer_sched_clock_init(); 123 arch_timer_sched_clock_init();
130} 124}
131 125
132static struct sys_timer highbank_timer = {
133 .init = highbank_timer_init,
134};
135
136static void highbank_power_off(void) 126static void highbank_power_off(void)
137{ 127{
138 hignbank_set_pwr_shutdown(); 128 highbank_set_pwr_shutdown();
139 129
140 while (1) 130 while (1)
141 cpu_do_idle(); 131 cpu_do_idle();
@@ -209,8 +199,7 @@ DT_MACHINE_START(HIGHBANK, "Highbank")
209 .smp = smp_ops(highbank_smp_ops), 199 .smp = smp_ops(highbank_smp_ops),
210 .map_io = debug_ll_io_init, 200 .map_io = debug_ll_io_init,
211 .init_irq = highbank_init_irq, 201 .init_irq = highbank_init_irq,
212 .timer = &highbank_timer, 202 .init_time = highbank_timer_init,
213 .handle_irq = gic_handle_irq,
214 .init_machine = highbank_init, 203 .init_machine = highbank_init,
215 .dt_compat = highbank_match, 204 .dt_compat = highbank_match,
216 .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..7b11d3329e81 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -95,9 +95,6 @@ config MACH_MX27
95config ARCH_MX5 95config ARCH_MX5
96 bool 96 bool
97 97
98config ARCH_MX50
99 bool
100
101config ARCH_MX51 98config ARCH_MX51
102 bool 99 bool
103 100
@@ -164,11 +161,6 @@ config SOC_IMX5
164 select CPU_V7 161 select CPU_V7
165 select MXC_TZIC 162 select MXC_TZIC
166 163
167config SOC_IMX50
168 bool
169 select ARCH_MX50
170 select SOC_IMX5
171
172config SOC_IMX51 164config SOC_IMX51
173 bool 165 bool
174 select ARCH_MX5 166 select ARCH_MX5
@@ -738,25 +730,10 @@ endif
738 730
739if ARCH_MULTI_V7 731if ARCH_MULTI_V7
740 732
741comment "i.MX5 platforms:"
742
743config MACH_MX50_RDP
744 bool "Support MX50 reference design platform"
745 depends on BROKEN
746 select IMX_HAVE_PLATFORM_IMX_I2C
747 select IMX_HAVE_PLATFORM_IMX_UART
748 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
749 select IMX_HAVE_PLATFORM_SPI_IMX
750 select SOC_IMX50
751 help
752 Include support for MX50 reference design platform (RDP) board. This
753 includes specific configurations for the board and its peripherals.
754
755comment "i.MX51 machines:" 733comment "i.MX51 machines:"
756 734
757config MACH_IMX51_DT 735config MACH_IMX51_DT
758 bool "Support i.MX51 platforms from device tree" 736 bool "Support i.MX51 platforms from device tree"
759 select MACH_MX51_BABBAGE
760 select SOC_IMX51 737 select SOC_IMX51
761 help 738 help
762 Include support for Freescale i.MX51 based platforms 739 Include support for Freescale i.MX51 based platforms
@@ -777,19 +754,6 @@ config MACH_MX51_BABBAGE
777 u-boot. This includes specific configurations for the board and its 754 u-boot. This includes specific configurations for the board and its
778 peripherals. 755 peripherals.
779 756
780config MACH_MX51_3DS
781 bool "Support MX51PDK (3DS)"
782 select IMX_HAVE_PLATFORM_IMX2_WDT
783 select IMX_HAVE_PLATFORM_IMX_KEYPAD
784 select IMX_HAVE_PLATFORM_IMX_UART
785 select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
786 select IMX_HAVE_PLATFORM_SPI_IMX
787 select MXC_DEBUG_BOARD
788 select SOC_IMX51
789 help
790 Include support for MX51PDK (3DS) platform. This includes specific
791 configurations for the board and its peripherals.
792
793config MACH_EUKREA_CPUIMX51SD 757config MACH_EUKREA_CPUIMX51SD
794 bool "Support Eukrea CPUIMX51SD module" 758 bool "Support Eukrea CPUIMX51SD module"
795 select IMX_HAVE_PLATFORM_FSL_USB2_UDC 759 select IMX_HAVE_PLATFORM_FSL_USB2_UDC
@@ -841,8 +805,6 @@ config SOC_IMX6Q
841 select ARCH_HAS_CPUFREQ 805 select ARCH_HAS_CPUFREQ
842 select ARCH_HAS_OPP 806 select ARCH_HAS_OPP
843 select ARM_CPU_SUSPEND if PM 807 select ARM_CPU_SUSPEND if PM
844 select ARM_ERRATA_743622
845 select ARM_ERRATA_751472
846 select ARM_ERRATA_754322 808 select ARM_ERRATA_754322
847 select ARM_ERRATA_764369 if SMP 809 select ARM_ERRATA_764369 if SMP
848 select ARM_ERRATA_775420 810 select ARM_ERRATA_775420
@@ -853,6 +815,7 @@ config SOC_IMX6Q
853 select HAVE_CAN_FLEXCAN if CAN 815 select HAVE_CAN_FLEXCAN if CAN
854 select HAVE_IMX_GPC 816 select HAVE_IMX_GPC
855 select HAVE_IMX_MMDC 817 select HAVE_IMX_MMDC
818 select HAVE_IMX_SRC
856 select HAVE_SMP 819 select HAVE_SMP
857 select MFD_SYSCON 820 select MFD_SYSCON
858 select PINCTRL 821 select PINCTRL
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 0634b3152c24..240e0294c372 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -88,7 +88,6 @@ obj-$(CONFIG_MACH_EUKREA_CPUIMX35SD) += mach-cpuimx35.o
88obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o 88obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD) += eukrea_mbimxsd35-baseboard.o
89obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o 89obj-$(CONFIG_MACH_VPR200) += mach-vpr200.o
90 90
91obj-$(CONFIG_DEBUG_LL) += lluart.o
92obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o 91obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
93obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o 92obj-$(CONFIG_HAVE_IMX_MMDC) += mmdc.o
94obj-$(CONFIG_HAVE_IMX_SRC) += src.o 93obj-$(CONFIG_HAVE_IMX_SRC) += src.o
@@ -103,10 +102,8 @@ endif
103 102
104# i.MX5 based machines 103# i.MX5 based machines
105obj-$(CONFIG_MACH_MX51_BABBAGE) += mach-mx51_babbage.o 104obj-$(CONFIG_MACH_MX51_BABBAGE) += mach-mx51_babbage.o
106obj-$(CONFIG_MACH_MX51_3DS) += mach-mx51_3ds.o
107obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += mach-cpuimx51sd.o 105obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += mach-cpuimx51sd.o
108obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd51-baseboard.o 106obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd51-baseboard.o
109obj-$(CONFIG_MACH_MX50_RDP) += mach-mx50_rdp.o
110 107
111obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o 108obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o
112obj-$(CONFIG_SOC_IMX53) += mach-imx53.o 109obj-$(CONFIG_SOC_IMX53) += mach-imx53.o
diff --git a/arch/arm/mach-imx/Makefile.boot b/arch/arm/mach-imx/Makefile.boot
index b27815de8473..41ba1bb0437b 100644
--- a/arch/arm/mach-imx/Makefile.boot
+++ b/arch/arm/mach-imx/Makefile.boot
@@ -22,10 +22,6 @@ zreladdr-$(CONFIG_SOC_IMX35) += 0x80008000
22params_phys-$(CONFIG_SOC_IMX35) := 0x80000100 22params_phys-$(CONFIG_SOC_IMX35) := 0x80000100
23initrd_phys-$(CONFIG_SOC_IMX35) := 0x80800000 23initrd_phys-$(CONFIG_SOC_IMX35) := 0x80800000
24 24
25zreladdr-$(CONFIG_SOC_IMX50) += 0x70008000
26params_phys-$(CONFIG_SOC_IMX50) := 0x70000100
27initrd_phys-$(CONFIG_SOC_IMX50) := 0x70800000
28
29zreladdr-$(CONFIG_SOC_IMX51) += 0x90008000 25zreladdr-$(CONFIG_SOC_IMX51) += 0x90008000
30params_phys-$(CONFIG_SOC_IMX51) := 0x90000100 26params_phys-$(CONFIG_SOC_IMX51) := 0x90000100
31initrd_phys-$(CONFIG_SOC_IMX51) := 0x90800000 27initrd_phys-$(CONFIG_SOC_IMX51) := 0x90800000
diff --git a/arch/arm/mach-imx/clk-imx25.c b/arch/arm/mach-imx/clk-imx25.c
index b197aa73dc4b..2c570cdaae7b 100644
--- a/arch/arm/mach-imx/clk-imx25.c
+++ b/arch/arm/mach-imx/clk-imx25.c
@@ -254,9 +254,9 @@ int __init mx25_clocks_init(void)
254 clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); 254 clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2");
255 clk_register_clkdev(clk[usbotg_ahb], "ahb", "mxc-ehci.2"); 255 clk_register_clkdev(clk[usbotg_ahb], "ahb", "mxc-ehci.2");
256 clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2"); 256 clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2");
257 clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc"); 257 clk_register_clkdev(clk[ipg], "ipg", "imx-udc-mx27");
258 clk_register_clkdev(clk[usbotg_ahb], "ahb", "fsl-usb2-udc"); 258 clk_register_clkdev(clk[usbotg_ahb], "ahb", "imx-udc-mx27");
259 clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); 259 clk_register_clkdev(clk[usb_div], "per", "imx-udc-mx27");
260 clk_register_clkdev(clk[nfc_ipg_per], NULL, "imx25-nand.0"); 260 clk_register_clkdev(clk[nfc_ipg_per], NULL, "imx25-nand.0");
261 /* i.mx25 has the i.mx35 type cspi */ 261 /* i.mx25 has the i.mx35 type cspi */
262 clk_register_clkdev(clk[cspi1_ipg], NULL, "imx35-cspi.0"); 262 clk_register_clkdev(clk[cspi1_ipg], NULL, "imx35-cspi.0");
diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c
index 4c1d1e4efc74..1ffe3b534e51 100644
--- a/arch/arm/mach-imx/clk-imx27.c
+++ b/arch/arm/mach-imx/clk-imx27.c
@@ -236,9 +236,9 @@ int __init mx27_clocks_init(unsigned long fref)
236 clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0"); 236 clk_register_clkdev(clk[lcdc_ahb_gate], "ahb", "imx21-fb.0");
237 clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0"); 237 clk_register_clkdev(clk[csi_ahb_gate], "ahb", "imx27-camera.0");
238 clk_register_clkdev(clk[per4_gate], "per", "imx27-camera.0"); 238 clk_register_clkdev(clk[per4_gate], "per", "imx27-camera.0");
239 clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); 239 clk_register_clkdev(clk[usb_div], "per", "imx-udc-mx27");
240 clk_register_clkdev(clk[usb_ipg_gate], "ipg", "fsl-usb2-udc"); 240 clk_register_clkdev(clk[usb_ipg_gate], "ipg", "imx-udc-mx27");
241 clk_register_clkdev(clk[usb_ahb_gate], "ahb", "fsl-usb2-udc"); 241 clk_register_clkdev(clk[usb_ahb_gate], "ahb", "imx-udc-mx27");
242 clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.0"); 242 clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.0");
243 clk_register_clkdev(clk[usb_ipg_gate], "ipg", "mxc-ehci.0"); 243 clk_register_clkdev(clk[usb_ipg_gate], "ipg", "mxc-ehci.0");
244 clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.0"); 244 clk_register_clkdev(clk[usb_ahb_gate], "ahb", "mxc-ehci.0");
diff --git a/arch/arm/mach-imx/clk-imx31.c b/arch/arm/mach-imx/clk-imx31.c
index 8be64e0a4ace..16ccbd41dea9 100644
--- a/arch/arm/mach-imx/clk-imx31.c
+++ b/arch/arm/mach-imx/clk-imx31.c
@@ -139,9 +139,9 @@ int __init mx31_clocks_init(unsigned long fref)
139 clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.2"); 139 clk_register_clkdev(clk[usb_div_post], "per", "mxc-ehci.2");
140 clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.2"); 140 clk_register_clkdev(clk[usb_gate], "ahb", "mxc-ehci.2");
141 clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); 141 clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2");
142 clk_register_clkdev(clk[usb_div_post], "per", "fsl-usb2-udc"); 142 clk_register_clkdev(clk[usb_div_post], "per", "imx-udc-mx27");
143 clk_register_clkdev(clk[usb_gate], "ahb", "fsl-usb2-udc"); 143 clk_register_clkdev(clk[usb_gate], "ahb", "imx-udc-mx27");
144 clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc"); 144 clk_register_clkdev(clk[ipg], "ipg", "imx-udc-mx27");
145 clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0"); 145 clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0");
146 /* i.mx31 has the i.mx21 type uart */ 146 /* i.mx31 has the i.mx21 type uart */
147 clk_register_clkdev(clk[uart1_gate], "per", "imx21-uart.0"); 147 clk_register_clkdev(clk[uart1_gate], "per", "imx21-uart.0");
diff --git a/arch/arm/mach-imx/clk-imx35.c b/arch/arm/mach-imx/clk-imx35.c
index 66f3d65ea275..f0727e80815d 100644
--- a/arch/arm/mach-imx/clk-imx35.c
+++ b/arch/arm/mach-imx/clk-imx35.c
@@ -251,9 +251,9 @@ int __init mx35_clocks_init()
251 clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2"); 251 clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2");
252 clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); 252 clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2");
253 clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.2"); 253 clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.2");
254 clk_register_clkdev(clk[usb_div], "per", "fsl-usb2-udc"); 254 clk_register_clkdev(clk[usb_div], "per", "imx-udc-mx27");
255 clk_register_clkdev(clk[ipg], "ipg", "fsl-usb2-udc"); 255 clk_register_clkdev(clk[ipg], "ipg", "imx-udc-mx27");
256 clk_register_clkdev(clk[usbotg_gate], "ahb", "fsl-usb2-udc"); 256 clk_register_clkdev(clk[usbotg_gate], "ahb", "imx-udc-mx27");
257 clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0"); 257 clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0");
258 clk_register_clkdev(clk[nfc_div], NULL, "imx25-nand.0"); 258 clk_register_clkdev(clk[nfc_div], NULL, "imx25-nand.0");
259 clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0"); 259 clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0");
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c
index 579023f59dc1..fb7cb841b64c 100644
--- a/arch/arm/mach-imx/clk-imx51-imx53.c
+++ b/arch/arm/mach-imx/clk-imx51-imx53.c
@@ -269,9 +269,9 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
269 clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.2"); 269 clk_register_clkdev(clk[usboh3_per_gate], "per", "mxc-ehci.2");
270 clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.2"); 270 clk_register_clkdev(clk[usboh3_gate], "ipg", "mxc-ehci.2");
271 clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.2"); 271 clk_register_clkdev(clk[usboh3_gate], "ahb", "mxc-ehci.2");
272 clk_register_clkdev(clk[usboh3_per_gate], "per", "fsl-usb2-udc"); 272 clk_register_clkdev(clk[usboh3_per_gate], "per", "imx-udc-mx51");
273 clk_register_clkdev(clk[usboh3_gate], "ipg", "fsl-usb2-udc"); 273 clk_register_clkdev(clk[usboh3_gate], "ipg", "imx-udc-mx51");
274 clk_register_clkdev(clk[usboh3_gate], "ahb", "fsl-usb2-udc"); 274 clk_register_clkdev(clk[usboh3_gate], "ahb", "imx-udc-mx51");
275 clk_register_clkdev(clk[nfc_gate], NULL, "imx51-nand"); 275 clk_register_clkdev(clk[nfc_gate], NULL, "imx51-nand");
276 clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0"); 276 clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0");
277 clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); 277 clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1");
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index 7f2c10c7413a..19644f6524dc 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -56,8 +56,6 @@
56 56
57static void __iomem *ccm_base; 57static void __iomem *ccm_base;
58 58
59void __init imx6q_clock_map_io(void) { }
60
61int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode) 59int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode)
62{ 60{
63 u32 val = readl_relaxed(ccm_base + CLPCR); 61 u32 val = readl_relaxed(ccm_base + CLPCR);
@@ -436,6 +434,9 @@ int __init mx6q_clocks_init(void)
436 for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) 434 for (i = 0; i < ARRAY_SIZE(clks_init_on); i++)
437 clk_prepare_enable(clk[clks_init_on[i]]); 435 clk_prepare_enable(clk[clks_init_on[i]]);
438 436
437 /* Set initial power mode */
438 imx6q_set_lpm(WAIT_CLOCKED);
439
439 np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt"); 440 np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-gpt");
440 base = of_iomap(np, 0); 441 base = of_iomap(np, 0);
441 WARN_ON(!base); 442 WARN_ON(!base);
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h
index 7191ab4434e5..76c420043289 100644
--- a/arch/arm/mach-imx/common.h
+++ b/arch/arm/mach-imx/common.h
@@ -21,7 +21,6 @@ extern void mx25_map_io(void);
21extern void mx27_map_io(void); 21extern void mx27_map_io(void);
22extern void mx31_map_io(void); 22extern void mx31_map_io(void);
23extern void mx35_map_io(void); 23extern void mx35_map_io(void);
24extern void mx50_map_io(void);
25extern void mx51_map_io(void); 24extern void mx51_map_io(void);
26extern void mx53_map_io(void); 25extern void mx53_map_io(void);
27extern void imx1_init_early(void); 26extern void imx1_init_early(void);
@@ -30,7 +29,6 @@ extern void imx25_init_early(void);
30extern void imx27_init_early(void); 29extern void imx27_init_early(void);
31extern void imx31_init_early(void); 30extern void imx31_init_early(void);
32extern void imx35_init_early(void); 31extern void imx35_init_early(void);
33extern void imx50_init_early(void);
34extern void imx51_init_early(void); 32extern void imx51_init_early(void);
35extern void imx53_init_early(void); 33extern void imx53_init_early(void);
36extern void mxc_init_irq(void __iomem *); 34extern void mxc_init_irq(void __iomem *);
@@ -41,7 +39,6 @@ extern void mx25_init_irq(void);
41extern void mx27_init_irq(void); 39extern void mx27_init_irq(void);
42extern void mx31_init_irq(void); 40extern void mx31_init_irq(void);
43extern void mx35_init_irq(void); 41extern void mx35_init_irq(void);
44extern void mx50_init_irq(void);
45extern void mx51_init_irq(void); 42extern void mx51_init_irq(void);
46extern void mx53_init_irq(void); 43extern void mx53_init_irq(void);
47extern void imx1_soc_init(void); 44extern void imx1_soc_init(void);
@@ -50,7 +47,6 @@ extern void imx25_soc_init(void);
50extern void imx27_soc_init(void); 47extern void imx27_soc_init(void);
51extern void imx31_soc_init(void); 48extern void imx31_soc_init(void);
52extern void imx35_soc_init(void); 49extern void imx35_soc_init(void);
53extern void imx50_soc_init(void);
54extern void imx51_soc_init(void); 50extern void imx51_soc_init(void);
55extern void imx51_init_late(void); 51extern void imx51_init_late(void);
56extern void imx53_init_late(void); 52extern void imx53_init_late(void);
@@ -109,18 +105,11 @@ void tzic_handle_irq(struct pt_regs *);
109#define imx27_handle_irq avic_handle_irq 105#define imx27_handle_irq avic_handle_irq
110#define imx31_handle_irq avic_handle_irq 106#define imx31_handle_irq avic_handle_irq
111#define imx35_handle_irq avic_handle_irq 107#define imx35_handle_irq avic_handle_irq
112#define imx50_handle_irq tzic_handle_irq
113#define imx51_handle_irq tzic_handle_irq 108#define imx51_handle_irq tzic_handle_irq
114#define imx53_handle_irq tzic_handle_irq 109#define imx53_handle_irq tzic_handle_irq
115#define imx6q_handle_irq gic_handle_irq
116 110
117extern void imx_enable_cpu(int cpu, bool enable); 111extern void imx_enable_cpu(int cpu, bool enable);
118extern void imx_set_cpu_jump(int cpu, void *jump_addr); 112extern void imx_set_cpu_jump(int cpu, void *jump_addr);
119#ifdef CONFIG_DEBUG_LL
120extern void imx_lluart_map_io(void);
121#else
122static inline void imx_lluart_map_io(void) {}
123#endif
124extern void v7_cpu_resume(void); 113extern void v7_cpu_resume(void);
125extern u32 *pl310_get_save_ptr(void); 114extern u32 *pl310_get_save_ptr(void);
126#ifdef CONFIG_SMP 115#ifdef CONFIG_SMP
@@ -139,9 +128,9 @@ extern void imx_gpc_init(void);
139extern void imx_gpc_pre_suspend(void); 128extern void imx_gpc_pre_suspend(void);
140extern void imx_gpc_post_resume(void); 129extern void imx_gpc_post_resume(void);
141extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode); 130extern int imx6q_set_lpm(enum mxc_cpu_pwr_mode mode);
142extern void imx6q_clock_map_io(void);
143 131
144extern void imx_cpu_die(unsigned int cpu); 132extern void imx_cpu_die(unsigned int cpu);
133extern int imx_cpu_kill(unsigned int cpu);
145 134
146#ifdef CONFIG_PM 135#ifdef CONFIG_PM
147extern void imx6q_pm_init(void); 136extern void imx6q_pm_init(void);
diff --git a/arch/arm/mach-imx/cpu-imx5.c b/arch/arm/mach-imx/cpu-imx5.c
index d88760014ff9..d7ce72252a4e 100644
--- a/arch/arm/mach-imx/cpu-imx5.c
+++ b/arch/arm/mach-imx/cpu-imx5.c
@@ -22,7 +22,6 @@
22static int mx5_cpu_rev = -1; 22static int mx5_cpu_rev = -1;
23 23
24#define IIM_SREV 0x24 24#define IIM_SREV 0x24
25#define MX50_HW_ADADIG_DIGPROG 0xB0
26 25
27static int get_mx51_srev(void) 26static int get_mx51_srev(void)
28{ 27{
@@ -108,41 +107,3 @@ int mx53_revision(void)
108 return mx5_cpu_rev; 107 return mx5_cpu_rev;
109} 108}
110EXPORT_SYMBOL(mx53_revision); 109EXPORT_SYMBOL(mx53_revision);
111
112static int get_mx50_srev(void)
113{
114 void __iomem *anatop = ioremap(MX50_ANATOP_BASE_ADDR, SZ_8K);
115 u32 rev;
116
117 if (!anatop) {
118 mx5_cpu_rev = -EINVAL;
119 return 0;
120 }
121
122 rev = readl(anatop + MX50_HW_ADADIG_DIGPROG);
123 rev &= 0xff;
124
125 iounmap(anatop);
126 if (rev == 0x0)
127 return IMX_CHIP_REVISION_1_0;
128 else if (rev == 0x1)
129 return IMX_CHIP_REVISION_1_1;
130 return 0;
131}
132
133/*
134 * Returns:
135 * the silicon revision of the cpu
136 * -EINVAL - not a mx50
137 */
138int mx50_revision(void)
139{
140 if (!cpu_is_mx50())
141 return -EINVAL;
142
143 if (mx5_cpu_rev == -1)
144 mx5_cpu_rev = get_mx50_srev();
145
146 return mx5_cpu_rev;
147}
148EXPORT_SYMBOL(mx50_revision);
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/devices-imx50.h b/arch/arm/mach-imx/devices-imx50.h
deleted file mode 100644
index 2c290391f298..000000000000
--- a/arch/arm/mach-imx/devices-imx50.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved.
3 */
4
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 along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include "devices/devices-common.h"
22
23extern const struct imx_imx_uart_1irq_data imx50_imx_uart_data[];
24#define imx50_add_imx_uart(id, pdata) \
25 imx_add_imx_uart_1irq(&imx50_imx_uart_data[id], pdata)
26
27extern const struct imx_fec_data imx50_fec_data;
28#define imx50_add_fec(pdata) \
29 imx_add_fec(&imx50_fec_data, pdata)
30
31extern const struct imx_imx_i2c_data imx50_imx_i2c_data[];
32#define imx50_add_imx_i2c(id, pdata) \
33 imx_add_imx_i2c(&imx50_imx_i2c_data[id], pdata)
diff --git a/arch/arm/mach-imx/devices/Kconfig b/arch/arm/mach-imx/devices/Kconfig
index 9a8f1ca7bcb1..9b9ba1f4ffe1 100644
--- a/arch/arm/mach-imx/devices/Kconfig
+++ b/arch/arm/mach-imx/devices/Kconfig
@@ -1,6 +1,6 @@
1config IMX_HAVE_PLATFORM_FEC 1config IMX_HAVE_PLATFORM_FEC
2 bool 2 bool
3 default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX50 || SOC_IMX51 || SOC_IMX53 3 default y if ARCH_MX25 || SOC_IMX27 || SOC_IMX35 || SOC_IMX51 || SOC_IMX53
4 4
5config IMX_HAVE_PLATFORM_FLEXCAN 5config IMX_HAVE_PLATFORM_FLEXCAN
6 bool 6 bool
diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h
index 6277baf1b7be..9bd5777ff0e7 100644
--- a/arch/arm/mach-imx/devices/devices-common.h
+++ b/arch/arm/mach-imx/devices/devices-common.h
@@ -63,6 +63,7 @@ struct platform_device *__init imx_add_flexcan(
63 63
64#include <linux/fsl_devices.h> 64#include <linux/fsl_devices.h>
65struct imx_fsl_usb2_udc_data { 65struct imx_fsl_usb2_udc_data {
66 const char *devid;
66 resource_size_t iobase; 67 resource_size_t iobase;
67 resource_size_t irq; 68 resource_size_t irq;
68}; 69};
diff --git a/arch/arm/mach-imx/devices/platform-fec.c b/arch/arm/mach-imx/devices/platform-fec.c
index 2cb188ad9a0a..63eba08f87b1 100644
--- a/arch/arm/mach-imx/devices/platform-fec.c
+++ b/arch/arm/mach-imx/devices/platform-fec.c
@@ -35,12 +35,6 @@ const struct imx_fec_data imx35_fec_data __initconst =
35 imx_fec_data_entry_single(MX35, "imx27-fec"); 35 imx_fec_data_entry_single(MX35, "imx27-fec");
36#endif 36#endif
37 37
38#ifdef CONFIG_SOC_IMX50
39/* i.mx50 has the i.mx25 type fec */
40const struct imx_fec_data imx50_fec_data __initconst =
41 imx_fec_data_entry_single(MX50, "imx25-fec");
42#endif
43
44#ifdef CONFIG_SOC_IMX51 38#ifdef CONFIG_SOC_IMX51
45/* i.mx51 has the i.mx27 type fec */ 39/* i.mx51 has the i.mx27 type fec */
46const struct imx_fec_data imx51_fec_data __initconst = 40const struct imx_fec_data imx51_fec_data __initconst =
diff --git a/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c b/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c
index 37e44398197b..3c06bd96e9cc 100644
--- a/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c
+++ b/arch/arm/mach-imx/devices/platform-fsl-usb2-udc.c
@@ -11,35 +11,36 @@
11#include "../hardware.h" 11#include "../hardware.h"
12#include "devices-common.h" 12#include "devices-common.h"
13 13
14#define imx_fsl_usb2_udc_data_entry_single(soc) \ 14#define imx_fsl_usb2_udc_data_entry_single(soc, _devid) \
15 { \ 15 { \
16 .devid = _devid, \
16 .iobase = soc ## _USB_OTG_BASE_ADDR, \ 17 .iobase = soc ## _USB_OTG_BASE_ADDR, \
17 .irq = soc ## _INT_USB_OTG, \ 18 .irq = soc ## _INT_USB_OTG, \
18 } 19 }
19 20
20#ifdef CONFIG_SOC_IMX25 21#ifdef CONFIG_SOC_IMX25
21const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data __initconst = 22const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data __initconst =
22 imx_fsl_usb2_udc_data_entry_single(MX25); 23 imx_fsl_usb2_udc_data_entry_single(MX25, "imx-udc-mx27");
23#endif /* ifdef CONFIG_SOC_IMX25 */ 24#endif /* ifdef CONFIG_SOC_IMX25 */
24 25
25#ifdef CONFIG_SOC_IMX27 26#ifdef CONFIG_SOC_IMX27
26const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst = 27const struct imx_fsl_usb2_udc_data imx27_fsl_usb2_udc_data __initconst =
27 imx_fsl_usb2_udc_data_entry_single(MX27); 28 imx_fsl_usb2_udc_data_entry_single(MX27, "imx-udc-mx27");
28#endif /* ifdef CONFIG_SOC_IMX27 */ 29#endif /* ifdef CONFIG_SOC_IMX27 */
29 30
30#ifdef CONFIG_SOC_IMX31 31#ifdef CONFIG_SOC_IMX31
31const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst = 32const struct imx_fsl_usb2_udc_data imx31_fsl_usb2_udc_data __initconst =
32 imx_fsl_usb2_udc_data_entry_single(MX31); 33 imx_fsl_usb2_udc_data_entry_single(MX31, "imx-udc-mx27");
33#endif /* ifdef CONFIG_SOC_IMX31 */ 34#endif /* ifdef CONFIG_SOC_IMX31 */
34 35
35#ifdef CONFIG_SOC_IMX35 36#ifdef CONFIG_SOC_IMX35
36const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst = 37const struct imx_fsl_usb2_udc_data imx35_fsl_usb2_udc_data __initconst =
37 imx_fsl_usb2_udc_data_entry_single(MX35); 38 imx_fsl_usb2_udc_data_entry_single(MX35, "imx-udc-mx27");
38#endif /* ifdef CONFIG_SOC_IMX35 */ 39#endif /* ifdef CONFIG_SOC_IMX35 */
39 40
40#ifdef CONFIG_SOC_IMX51 41#ifdef CONFIG_SOC_IMX51
41const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data __initconst = 42const struct imx_fsl_usb2_udc_data imx51_fsl_usb2_udc_data __initconst =
42 imx_fsl_usb2_udc_data_entry_single(MX51); 43 imx_fsl_usb2_udc_data_entry_single(MX51, "imx-udc-mx51");
43#endif 44#endif
44 45
45struct platform_device *__init imx_add_fsl_usb2_udc( 46struct platform_device *__init imx_add_fsl_usb2_udc(
@@ -57,7 +58,7 @@ struct platform_device *__init imx_add_fsl_usb2_udc(
57 .flags = IORESOURCE_IRQ, 58 .flags = IORESOURCE_IRQ,
58 }, 59 },
59 }; 60 };
60 return imx_add_platform_device_dmamask("fsl-usb2-udc", -1, 61 return imx_add_platform_device_dmamask(data->devid, -1,
61 res, ARRAY_SIZE(res), 62 res, ARRAY_SIZE(res),
62 pdata, sizeof(*pdata), DMA_BIT_MASK(32)); 63 pdata, sizeof(*pdata), DMA_BIT_MASK(32));
63} 64}
diff --git a/arch/arm/mach-imx/devices/platform-imx-fb.c b/arch/arm/mach-imx/devices/platform-imx-fb.c
index 10b0ed39f07f..25a47c616b2d 100644
--- a/arch/arm/mach-imx/devices/platform-imx-fb.c
+++ b/arch/arm/mach-imx/devices/platform-imx-fb.c
@@ -54,7 +54,7 @@ struct platform_device *__init imx_add_imx_fb(
54 .flags = IORESOURCE_IRQ, 54 .flags = IORESOURCE_IRQ,
55 }, 55 },
56 }; 56 };
57 return imx_add_platform_device_dmamask("imx-fb", 0, 57 return imx_add_platform_device_dmamask(data->devid, 0,
58 res, ARRAY_SIZE(res), 58 res, ARRAY_SIZE(res),
59 pdata, sizeof(*pdata), DMA_BIT_MASK(32)); 59 pdata, sizeof(*pdata), DMA_BIT_MASK(32));
60} 60}
diff --git a/arch/arm/mach-imx/devices/platform-imx-i2c.c b/arch/arm/mach-imx/devices/platform-imx-i2c.c
index 8e30e5703cd2..57d342e85c2f 100644
--- a/arch/arm/mach-imx/devices/platform-imx-i2c.c
+++ b/arch/arm/mach-imx/devices/platform-imx-i2c.c
@@ -70,16 +70,6 @@ const struct imx_imx_i2c_data imx35_imx_i2c_data[] __initconst = {
70}; 70};
71#endif /* ifdef CONFIG_SOC_IMX35 */ 71#endif /* ifdef CONFIG_SOC_IMX35 */
72 72
73#ifdef CONFIG_SOC_IMX50
74const struct imx_imx_i2c_data imx50_imx_i2c_data[] __initconst = {
75#define imx50_imx_i2c_data_entry(_id, _hwid) \
76 imx_imx_i2c_data_entry(MX50, "imx21-i2c", _id, _hwid, SZ_4K)
77 imx50_imx_i2c_data_entry(0, 1),
78 imx50_imx_i2c_data_entry(1, 2),
79 imx50_imx_i2c_data_entry(2, 3),
80};
81#endif /* ifdef CONFIG_SOC_IMX51 */
82
83#ifdef CONFIG_SOC_IMX51 73#ifdef CONFIG_SOC_IMX51
84const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = { 74const struct imx_imx_i2c_data imx51_imx_i2c_data[] __initconst = {
85#define imx51_imx_i2c_data_entry(_id, _hwid) \ 75#define imx51_imx_i2c_data_entry(_id, _hwid) \
diff --git a/arch/arm/mach-imx/devices/platform-imx-uart.c b/arch/arm/mach-imx/devices/platform-imx-uart.c
index 67bf866a2cb6..faac4aa6ca6d 100644
--- a/arch/arm/mach-imx/devices/platform-imx-uart.c
+++ b/arch/arm/mach-imx/devices/platform-imx-uart.c
@@ -94,18 +94,6 @@ const struct imx_imx_uart_1irq_data imx35_imx_uart_data[] __initconst = {
94}; 94};
95#endif /* ifdef CONFIG_SOC_IMX35 */ 95#endif /* ifdef CONFIG_SOC_IMX35 */
96 96
97#ifdef CONFIG_SOC_IMX50
98const struct imx_imx_uart_1irq_data imx50_imx_uart_data[] __initconst = {
99#define imx50_imx_uart_data_entry(_id, _hwid) \
100 imx_imx_uart_1irq_data_entry(MX50, _id, _hwid, SZ_4K)
101 imx50_imx_uart_data_entry(0, 1),
102 imx50_imx_uart_data_entry(1, 2),
103 imx50_imx_uart_data_entry(2, 3),
104 imx50_imx_uart_data_entry(3, 4),
105 imx50_imx_uart_data_entry(4, 5),
106};
107#endif /* ifdef CONFIG_SOC_IMX50 */
108
109#ifdef CONFIG_SOC_IMX51 97#ifdef CONFIG_SOC_IMX51
110const struct imx_imx_uart_1irq_data imx51_imx_uart_data[] __initconst = { 98const struct imx_imx_uart_1irq_data imx51_imx_uart_data[] __initconst = {
111#define imx51_imx_uart_data_entry(_id, _hwid) \ 99#define imx51_imx_uart_data_entry(_id, _hwid) \
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/hardware.h b/arch/arm/mach-imx/hardware.h
index 3ce7fa3bd43f..911e9b31b03f 100644
--- a/arch/arm/mach-imx/hardware.h
+++ b/arch/arm/mach-imx/hardware.h
@@ -72,11 +72,6 @@
72 * AVIC 0x68000000+0x100000 -> 0xf5800000+0x100000 72 * AVIC 0x68000000+0x100000 -> 0xf5800000+0x100000
73 * X_MEMC 0xb8000000+0x010000 -> 0xf5c00000+0x010000 73 * X_MEMC 0xb8000000+0x010000 -> 0xf5c00000+0x010000
74 * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000 74 * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000
75 * mx50:
76 * TZIC 0x0fffc000+0x004000 -> 0xf4bfc000+0x004000
77 * AIPS1 0x53f00000+0x100000 -> 0xf5700000+0x100000
78 * SPBA0 0x50000000+0x100000 -> 0xf5400000+0x100000
79 * AIPS2 0x63f00000+0x100000 -> 0xf5300000+0x100000
80 * mx51: 75 * mx51:
81 * TZIC 0x0fffc000+0x004000 -> 0xf4bfc000+0x004000 76 * TZIC 0x0fffc000+0x004000 -> 0xf4bfc000+0x004000
82 * IRAM 0x1ffe0000+0x020000 -> 0xf4fe0000+0x020000 77 * IRAM 0x1ffe0000+0x020000 -> 0xf4fe0000+0x020000
@@ -108,7 +103,6 @@
108#include "mxc.h" 103#include "mxc.h"
109 104
110#include "mx6q.h" 105#include "mx6q.h"
111#include "mx50.h"
112#include "mx51.h" 106#include "mx51.h"
113#include "mx53.h" 107#include "mx53.h"
114#include "mx3x.h" 108#include "mx3x.h"
diff --git a/arch/arm/mach-imx/hotplug.c b/arch/arm/mach-imx/hotplug.c
index 3dec962b0770..7bc5fe15dda2 100644
--- a/arch/arm/mach-imx/hotplug.c
+++ b/arch/arm/mach-imx/hotplug.c
@@ -46,9 +46,11 @@ static inline void cpu_enter_lowpower(void)
46void imx_cpu_die(unsigned int cpu) 46void imx_cpu_die(unsigned int cpu)
47{ 47{
48 cpu_enter_lowpower(); 48 cpu_enter_lowpower();
49 imx_enable_cpu(cpu, false); 49 cpu_do_idle();
50}
50 51
51 /* spin here until hardware takes it down */ 52int imx_cpu_kill(unsigned int cpu)
52 while (1) 53{
53 ; 54 imx_enable_cpu(cpu, false);
55 return 1;
54} 56}
diff --git a/arch/arm/mach-imx/imx25-dt.c b/arch/arm/mach-imx/imx25-dt.c
index e17dfbc42192..03b65e5ea541 100644
--- a/arch/arm/mach-imx/imx25-dt.c
+++ b/arch/arm/mach-imx/imx25-dt.c
@@ -22,15 +22,6 @@ static void __init imx25_dt_init(void)
22 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 22 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
23} 23}
24 24
25static void __init imx25_timer_init(void)
26{
27 mx25_clocks_init_dt();
28}
29
30static struct sys_timer imx25_timer = {
31 .init = imx25_timer_init,
32};
33
34static const char * const imx25_dt_board_compat[] __initconst = { 25static const char * const imx25_dt_board_compat[] __initconst = {
35 "fsl,imx25", 26 "fsl,imx25",
36 NULL 27 NULL
@@ -41,7 +32,7 @@ DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)")
41 .init_early = imx25_init_early, 32 .init_early = imx25_init_early,
42 .init_irq = mx25_init_irq, 33 .init_irq = mx25_init_irq,
43 .handle_irq = imx25_handle_irq, 34 .handle_irq = imx25_handle_irq,
44 .timer = &imx25_timer, 35 .init_time = imx25_timer_init,
45 .init_machine = imx25_dt_init, 36 .init_machine = imx25_dt_init,
46 .dt_compat = imx25_dt_board_compat, 37 .dt_compat = imx25_dt_board_compat,
47 .restart = mxc_restart, 38 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/imx27-dt.c b/arch/arm/mach-imx/imx27-dt.c
index ebfae96543c4..c915a490a11c 100644
--- a/arch/arm/mach-imx/imx27-dt.c
+++ b/arch/arm/mach-imx/imx27-dt.c
@@ -39,26 +39,22 @@ static void __init imx27_dt_init(void)
39 imx27_auxdata_lookup, NULL); 39 imx27_auxdata_lookup, NULL);
40} 40}
41 41
42static void __init imx27_timer_init(void)
43{
44 mx27_clocks_init_dt();
45}
46
47static struct sys_timer imx27_timer = {
48 .init = imx27_timer_init,
49};
50
51static const char * const imx27_dt_board_compat[] __initconst = { 42static const char * const imx27_dt_board_compat[] __initconst = {
52 "fsl,imx27", 43 "fsl,imx27",
53 NULL 44 NULL
54}; 45};
55 46
47static void __init imx27_timer_init(void)
48{
49 mx27_clocks_init_dt();
50}
51
56DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)") 52DT_MACHINE_START(IMX27_DT, "Freescale i.MX27 (Device Tree Support)")
57 .map_io = mx27_map_io, 53 .map_io = mx27_map_io,
58 .init_early = imx27_init_early, 54 .init_early = imx27_init_early,
59 .init_irq = mx27_init_irq, 55 .init_irq = mx27_init_irq,
60 .handle_irq = imx27_handle_irq, 56 .handle_irq = imx27_handle_irq,
61 .timer = &imx27_timer, 57 .init_time = imx27_timer_init,
62 .init_machine = imx27_dt_init, 58 .init_machine = imx27_dt_init,
63 .dt_compat = imx27_dt_board_compat, 59 .dt_compat = imx27_dt_board_compat,
64 .restart = mxc_restart, 60 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/imx31-dt.c b/arch/arm/mach-imx/imx31-dt.c
index af476de2570e..b5c04eece780 100644
--- a/arch/arm/mach-imx/imx31-dt.c
+++ b/arch/arm/mach-imx/imx31-dt.c
@@ -38,26 +38,22 @@ static void __init imx31_dt_init(void)
38 imx31_auxdata_lookup, NULL); 38 imx31_auxdata_lookup, NULL);
39} 39}
40 40
41static void __init imx31_timer_init(void)
42{
43 mx31_clocks_init_dt();
44}
45
46static struct sys_timer imx31_timer = {
47 .init = imx31_timer_init,
48};
49
50static const char *imx31_dt_board_compat[] __initdata = { 41static const char *imx31_dt_board_compat[] __initdata = {
51 "fsl,imx31", 42 "fsl,imx31",
52 NULL 43 NULL
53}; 44};
54 45
46static void __init imx31_dt_timer_init(void)
47{
48 mx31_clocks_init_dt();
49}
50
55DT_MACHINE_START(IMX31_DT, "Freescale i.MX31 (Device Tree Support)") 51DT_MACHINE_START(IMX31_DT, "Freescale i.MX31 (Device Tree Support)")
56 .map_io = mx31_map_io, 52 .map_io = mx31_map_io,
57 .init_early = imx31_init_early, 53 .init_early = imx31_init_early,
58 .init_irq = mx31_init_irq, 54 .init_irq = mx31_init_irq,
59 .handle_irq = imx31_handle_irq, 55 .handle_irq = imx31_handle_irq,
60 .timer = &imx31_timer, 56 .init_time = imx31_dt_timer_init,
61 .init_machine = imx31_dt_init, 57 .init_machine = imx31_dt_init,
62 .dt_compat = imx31_dt_board_compat, 58 .dt_compat = imx31_dt_board_compat,
63 .restart = mxc_restart, 59 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c
index 5ffa40c673f8..e2926a8863f8 100644
--- a/arch/arm/mach-imx/imx51-dt.c
+++ b/arch/arm/mach-imx/imx51-dt.c
@@ -24,26 +24,22 @@ static void __init imx51_dt_init(void)
24 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 24 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
25} 25}
26 26
27static void __init imx51_timer_init(void)
28{
29 mx51_clocks_init_dt();
30}
31
32static struct sys_timer imx51_timer = {
33 .init = imx51_timer_init,
34};
35
36static const char *imx51_dt_board_compat[] __initdata = { 27static const char *imx51_dt_board_compat[] __initdata = {
37 "fsl,imx51", 28 "fsl,imx51",
38 NULL 29 NULL
39}; 30};
40 31
32static void __init imx51_timer_init(void)
33{
34 mx51_clocks_init_dt();
35}
36
41DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)") 37DT_MACHINE_START(IMX51_DT, "Freescale i.MX51 (Device Tree Support)")
42 .map_io = mx51_map_io, 38 .map_io = mx51_map_io,
43 .init_early = imx51_init_early, 39 .init_early = imx51_init_early,
44 .init_irq = mx51_init_irq, 40 .init_irq = mx51_init_irq,
45 .handle_irq = imx51_handle_irq, 41 .handle_irq = imx51_handle_irq,
46 .timer = &imx51_timer, 42 .init_time = imx51_timer_init,
47 .init_machine = imx51_dt_init, 43 .init_machine = imx51_dt_init,
48 .init_late = imx51_init_late, 44 .init_late = imx51_init_late,
49 .dt_compat = imx51_dt_board_compat, 45 .dt_compat = imx51_dt_board_compat,
diff --git a/arch/arm/mach-imx/iomux-mx50.h b/arch/arm/mach-imx/iomux-mx50.h
deleted file mode 100644
index 00f56e0e8009..000000000000
--- a/arch/arm/mach-imx/iomux-mx50.h
+++ /dev/null
@@ -1,977 +0,0 @@
1/*
2 * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19#ifndef __MACH_IOMUX_MX50_H__
20#define __MACH_IOMUX_MX50_H__
21
22#include "iomux-v3.h"
23
24#define MX50_ELCDIF_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_DSE_HIGH)
25
26#define MX50_SD_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PKE | PAD_CTL_PUE | \
27 PAD_CTL_PUS_47K_UP | PAD_CTL_DSE_HIGH)
28
29#define MX50_UART_PAD_CTRL (PAD_CTL_DSE_HIGH | PAD_CTL_PKE)
30
31#define MX50_I2C_PAD_CTRL (PAD_CTL_ODE | PAD_CTL_DSE_HIGH | \
32 PAD_CTL_PUS_100K_UP | PAD_CTL_HYS)
33
34#define MX50_USB_PAD_CTRL (PAD_CTL_PKE | PAD_CTL_PUE | \
35 PAD_CTL_DSE_HIGH | PAD_CTL_PUS_47K_UP)
36
37#define MX50_FEC_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PKE | PAD_CTL_PUE | \
38 PAD_CTL_PUS_22K_UP | PAD_CTL_ODE | \
39 PAD_CTL_DSE_HIGH)
40
41#define MX50_OWIRE_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PKE | PAD_CTL_PUE | \
42 PAD_CTL_PUS_100K_UP | PAD_CTL_ODE | \
43 PAD_CTL_DSE_HIGH | PAD_CTL_SRE_FAST)
44
45#define MX50_KEYPAD_CTRL (PAD_CTL_HYS | PAD_CTL_PKE | PAD_CTL_PUE | \
46 PAD_CTL_PUS_100K_UP | PAD_CTL_DSE_HIGH)
47
48#define MX50_CSPI_SS_PAD (PAD_CTL_PKE | PAD_CTL_PUE | \
49 PAD_CTL_PUS_22K_UP | PAD_CTL_DSE_HIGH)
50
51#define MX50_PAD_KEY_COL0__KEY_COL0 IOMUX_PAD(0x2CC, 0x20, 0, 0x0, 0, NO_PAD_CTRL)
52#define MX50_PAD_KEY_COL0__GPIO_4_0 IOMUX_PAD(0x2CC, 0x20, 1, 0x0, 0, NO_PAD_CTRL)
53#define MX50_PAD_KEY_COL0__NANDF_CLE IOMUX_PAD(0x2CC, 0x20, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
54
55#define MX50_PAD_KEY_ROW0__KEY_ROW0 IOMUX_PAD(0x2D0, 0x24, 0, 0x0, 0, MX50_KEYPAD_CTRL)
56#define MX50_PAD_KEY_ROW0__GPIO_4_1 IOMUX_PAD(0x2D0, 0x24, 1, 0x0, 0, NO_PAD_CTRL)
57#define MX50_PAD_KEY_ROW0__NANDF_ALE IOMUX_PAD(0x2D0, 0x24, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
58
59#define MX50_PAD_KEY_COL1__KEY_COL1 IOMUX_PAD(0x2D4, 0x28, 0, 0x0, 0, NO_PAD_CTRL)
60#define MX50_PAD_KEY_COL1__GPIO_4_2 IOMUX_PAD(0x2D4, 0x28, 1, 0x0, 0, NO_PAD_CTRL)
61#define MX50_PAD_KEY_COL1__NANDF_CE0 IOMUX_PAD(0x2D4, 0x28, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
62
63#define MX50_PAD_KEY_ROW1__KEY_ROW1 IOMUX_PAD(0x2D8, 0x2C, 0, 0x0, 0, MX50_KEYPAD_CTRL)
64#define MX50_PAD_KEY_ROW1__GPIO_4_3 IOMUX_PAD(0x2D8, 0x2C, 1, 0x0, 0, NO_PAD_CTRL)
65#define MX50_PAD_KEY_ROW1__NANDF_CE1 IOMUX_PAD(0x2D8, 0x2C, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
66
67#define MX50_PAD_KEY_COL2__KEY_COL2 IOMUX_PAD(0x2DC, 0x30, 0, 0x0, 0, MX50_KEYPAD_CTRL)
68#define MX50_PAD_KEY_COL2__GPIO_4_4 IOMUX_PAD(0x2DC, 0x30, 1, 0x0, 0, NO_PAD_CTRL)
69#define MX50_PAD_KEY_COL2__NANDF_CE2 IOMUX_PAD(0x2DC, 0x30, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
70
71#define MX50_PAD_KEY_ROW2__KEY_ROW2 IOMUX_PAD(0x2E0, 0x34, 0, 0x0, 0, MX50_KEYPAD_CTRL)
72#define MX50_PAD_KEY_ROW2__GPIO_4_5 IOMUX_PAD(0x2E0, 0x34, 1, 0x0, 0, NO_PAD_CTRL)
73#define MX50_PAD_KEY_ROW2__NANDF_CE3 IOMUX_PAD(0x2E0, 0x34, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
74
75#define MX50_PAD_KEY_COL3__KEY_COL3 IOMUX_PAD(0x2E4, 0x38, 0, 0x0, 0, NO_PAD_CTRL)
76#define MX50_PAD_KEY_COL3__GPIO_4_6 IOMUX_PAD(0x2E4, 0x38, 1, 0x0, 0, NO_PAD_CTRL)
77#define MX50_PAD_KEY_COL3__NANDF_READY IOMUX_PAD(0x2E4, 0x38, 2, 0x7b4, 0, PAD_CTL_PKE | \
78 PAD_CTL_PUE | PAD_CTL_PUS_100K_UP)
79#define MX50_PAD_KEY_COL3__SDMA_EXT0 IOMUX_PAD(0x2E4, 0x38, 6, 0x7b8, 0, NO_PAD_CTRL)
80
81#define MX50_PAD_KEY_ROW3__KEY_ROW3 IOMUX_PAD(0x2E8, 0x3C, 0, 0x0, 0, MX50_KEYPAD_CTRL)
82#define MX50_PAD_KEY_ROW3__GPIO_4_7 IOMUX_PAD(0x2E8, 0x3C, 1, 0x0, 0, NO_PAD_CTRL)
83#define MX50_PAD_KEY_ROW3__NANDF_DQS IOMUX_PAD(0x2E8, 0x3C, 2, 0x7b0, 0, PAD_CTL_DSE_HIGH)
84#define MX50_PAD_KEY_ROW3__SDMA_EXT1 IOMUX_PAD(0x2E8, 0x3C, 6, 0x7bc, 0, NO_PAD_CTRL)
85
86#define MX50_PAD_I2C1_SCL__I2C1_SCL IOMUX_PAD(0x2EC, 0x40, IOMUX_CONFIG_SION, 0x0, 0, \
87 MX50_I2C_PAD_CTRL)
88#define MX50_PAD_I2C1_SCL__GPIO_6_18 IOMUX_PAD(0x2EC, 0x40, 1, 0x0, 0, NO_PAD_CTRL)
89#define MX50_PAD_I2C1_SCL__UART2_TXD IOMUX_PAD(0x2EC, 0x40, 2, 0x0, 0, MX50_UART_PAD_CTRL)
90
91#define MX50_PAD_I2C1_SDA__I2C1_SDA IOMUX_PAD(0x2F0, 0x44, IOMUX_CONFIG_SION, 0x0, 0, \
92 MX50_I2C_PAD_CTRL)
93#define MX50_PAD_I2C1_SDA__GPIO_6_19 IOMUX_PAD(0x2F0, 0x44, 1, 0x0, 0, NO_PAD_CTRL)
94#define MX50_PAD_I2C1_SDA__UART2_RXD IOMUX_PAD(0x2F0, 0x44, 2, 0x7cc, 1, MX50_UART_PAD_CTRL)
95
96#define MX50_PAD_I2C2_SCL__I2C2_SCL IOMUX_PAD(0x2F4, 0x48, IOMUX_CONFIG_SION, 0x0, 0, \
97 MX50_I2C_PAD_CTRL)
98#define MX50_PAD_I2C2_SCL__GPIO_6_20 IOMUX_PAD(0x2F4, 0x48, 1, 0x0, 0, NO_PAD_CTRL)
99#define MX50_PAD_I2C2_SCL__UART2_CTS IOMUX_PAD(0x2F4, 0x48, 2, 0x0, 0, MX50_UART_PAD_CTRL)
100#define MX50_PAD_I2C2_SCL__DCDC_OK IOMUX_PAD(0x2F4, 0x48, 7, 0x0, 0, NO_PAD_CTRL)
101
102#define MX50_PAD_I2C2_SDA__I2C2_SDA IOMUX_PAD(0x2F8, 0x4C, IOMUX_CONFIG_SION, 0x0, 0, \
103 MX50_I2C_PAD_CTRL)
104#define MX50_PAD_I2C2_SDA__GPIO_6_21 IOMUX_PAD(0x2F8, 0x4C, 1, 0x0, 0, NO_PAD_CTRL)
105#define MX50_PAD_I2C2_SDA__UART2_RTS IOMUX_PAD(0x2F8, 0x4C, 2, 0x7c8, 1, MX50_UART_PAD_CTRL)
106#define MX50_PAD_I2C2_SDA__PWRSTABLE IOMUX_PAD(0x2F8, 0x4C, 7, 0x0, 0, NO_PAD_CTRL)
107
108#define MX50_PAD_I2C3_SCL__I2C3_SCL IOMUX_PAD(0x2FC, 0x50, IOMUX_CONFIG_SION, 0x0, 0, \
109 MX50_I2C_PAD_CTRL)
110#define MX50_PAD_I2C3_SCL__GPIO_6_22 IOMUX_PAD(0x2FC, 0x50, 1, 0x0, 0, NO_PAD_CTRL)
111#define MX50_PAD_I2C3_SCL__FEC_MDC IOMUX_PAD(0x2FC, 0x50, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
112#define MX50_PAD_I2C3_SCL__PMIC_RDY IOMUX_PAD(0x2FC, 0x50, 3, 0x0, 0, NO_PAD_CTRL)
113#define MX50_PAD_I2C3_SCL__GPT_CAPIN1 IOMUX_PAD(0x2FC, 0x50, 5, 0x0, 0, NO_PAD_CTRL)
114#define MX50_PAD_I2C3_SCL__USBOTG_OC IOMUX_PAD(0x2FC, 0x50, 7, 0x7E8, 0, MX50_USB_PAD_CTRL)
115
116#define MX50_PAD_I2C3_SDA__I2C3_SDA IOMUX_PAD(0x300, 0x54, IOMUX_CONFIG_SION, 0x0, 0, \
117 MX50_I2C_PAD_CTRL)
118#define MX50_PAD_I2C3_SDA__GPIO_6_23 IOMUX_PAD(0x300, 0x54, 1, 0x0, 0, NO_PAD_CTRL)
119#define MX50_PAD_I2C3_SDA__FEC_MDIO IOMUX_PAD(0x300, 0x54, 2, 0x774, 0, MX50_FEC_PAD_CTRL)
120#define MX50_PAD_I2C3_SDA__PWRFAIL_INT IOMUX_PAD(0x300, 0x54, 3, 0x0, 0, NO_PAD_CTRL)
121#define MX50_PAD_I2C3_SDA__ALARM_DEB IOMUX_PAD(0x300, 0x54, 4, 0x0, 0, NO_PAD_CTRL)
122#define MX50_PAD_I2C3_SDA__GPT_CAPIN1 IOMUX_PAD(0x300, 0x54, 5, 0x0, 0, NO_PAD_CTRL)
123#define MX50_PAD_I2C3_SDA__USBOTG_PWR IOMUX_PAD(0x300, 0x54, 7, 0x0, 0, \
124 PAD_CTL_PKE | PAD_CTL_DSE_HIGH)
125
126#define MX50_PAD_PWM1__PWM1_PWMO IOMUX_PAD(0x304, 0x58, 0, 0x0, 0, NO_PAD_CTRL)
127#define MX50_PAD_PWM1__GPIO_6_24 IOMUX_PAD(0x304, 0x58, 1, 0x0, 0, NO_PAD_CTRL)
128#define MX50_PAD_PWM1__USBOTG_OC IOMUX_PAD(0x304, 0x58, 2, 0x7E8, 1, MX50_USB_PAD_CTRL)
129#define MX50_PAD_PWM1__GPT_CMPOUT1 IOMUX_PAD(0x304, 0x58, 5, 0x0, 0, NO_PAD_CTRL)
130
131#define MX50_PAD_PWM2__PWM2_PWMO IOMUX_PAD(0x308, 0x5C, 0, 0x0, 0, NO_PAD_CTRL)
132#define MX50_PAD_PWM2__GPIO_6_25 IOMUX_PAD(0x308, 0x5C, 1, 0x0, 0, NO_PAD_CTRL)
133#define MX50_PAD_PWM2__USBOTG_PWR IOMUX_PAD(0x308, 0x5C, 2, 0x0, 0, \
134 PAD_CTL_PKE | PAD_CTL_DSE_HIGH)
135#define MX50_PAD_PWM2__DCDC_PWM IOMUX_PAD(0x308, 0x5C, 4, 0x0, 0, NO_PAD_CTRL)
136#define MX50_PAD_PWM2__GPT_CMPOUT2 IOMUX_PAD(0x308, 0x5C, 5, 0x0, 0, NO_PAD_CTRL)
137#define MX50_PAD_PWM2__ANY_PU_RST IOMUX_PAD(0x308, 0x5C, 7, 0x0, 0, NO_PAD_CTRL)
138
139#define MX50_PAD_OWIRE__OWIRE IOMUX_PAD(0x30C, 0x60, 0, 0x0, 0, MX50_OWIRE_PAD_CTRL)
140#define MX50_PAD_OWIRE__GPIO_6_26 IOMUX_PAD(0x30C, 0x60, 1, 0x0, 0, NO_PAD_CTRL)
141#define MX50_PAD_OWIRE__USBH1_OC IOMUX_PAD(0x30C, 0x60, 2, 0x0, 0, MX50_USB_PAD_CTRL)
142#define MX50_PAD_OWIRE__SSI_EXT1_CLK IOMUX_PAD(0x30C, 0x60, 3, 0x0, 0, NO_PAD_CTRL)
143#define MX50_PAD_OWIRE__EPDC_PWRIRQ IOMUX_PAD(0x30C, 0x60, 4, 0x0, 0, NO_PAD_CTRL)
144#define MX50_PAD_OWIRE__GPT_CMPOUT3 IOMUX_PAD(0x30C, 0x60, 5, 0x0, 0, NO_PAD_CTRL)
145
146#define MX50_PAD_EPITO__EPITO IOMUX_PAD(0x310, 0x64, 0, 0x0, 0, NO_PAD_CTRL)
147#define MX50_PAD_EPITO__GPIO_6_27 IOMUX_PAD(0x310, 0x64, 1, 0x0, 0, NO_PAD_CTRL)
148#define MX50_PAD_EPITO__USBH1_PWR IOMUX_PAD(0x310, 0x64, 2, 0x0, 0, \
149 PAD_CTL_PKE | PAD_CTL_DSE_HIGH)
150#define MX50_PAD_EPITO__SSI_EXT2_CLK IOMUX_PAD(0x310, 0x64, 3, 0x0, 0, NO_PAD_CTRL)
151#define MX50_PAD_EPITO__TOG_EN IOMUX_PAD(0x310, 0x64, 4, 0x0, 0, NO_PAD_CTRL)
152#define MX50_PAD_EPITO__GPT_CLKIN IOMUX_PAD(0x310, 0x64, 5, 0x0, 0, NO_PAD_CTRL)
153
154#define MX50_PAD_WDOG__WDOG IOMUX_PAD(0x314, 0x68, 0, 0x0, 0, NO_PAD_CTRL)
155#define MX50_PAD_WDOG__GPIO_6_28 IOMUX_PAD(0x314, 0x68, 1, 0x0, 0, NO_PAD_CTRL)
156#define MX50_PAD_WDOG__WDOG_RST IOMUX_PAD(0x314, 0x68, 2, 0x0, 0, NO_PAD_CTRL)
157#define MX50_PAD_WDOG__XTAL32K IOMUX_PAD(0x314, 0x68, 6, 0x0, 0, NO_PAD_CTRL)
158
159#define MX50_PAD_SSI_TXFS__SSI_TXFS IOMUX_PAD(0x318, 0x6C, 0, 0x0, 0, NO_PAD_CTRL)
160#define MX50_PAD_SSI_TXFS__GPIO_6_0 IOMUX_PAD(0x318, 0x6C, 1, 0x0, 0, NO_PAD_CTRL)
161
162#define MX50_PAD_SSI_TXC__SSI_TXC IOMUX_PAD(0x31C, 0x70, 0, 0x0, 0, NO_PAD_CTRL)
163#define MX50_PAD_SSI_TXC__GPIO_6_1 IOMUX_PAD(0x31C, 0x70, 1, 0x0, 0, NO_PAD_CTRL)
164
165#define MX50_PAD_SSI_TXD__SSI_TXD IOMUX_PAD(0x320, 0x74, 0, 0x0, 0, NO_PAD_CTRL)
166#define MX50_PAD_SSI_TXD__GPIO_6_2 IOMUX_PAD(0x320, 0x74, 1, 0x0, 0, NO_PAD_CTRL)
167#define MX50_PAD_SSI_TXD__CSPI_RDY IOMUX_PAD(0x320, 0x74, 4, 0x6e8, 0, NO_PAD_CTRL)
168
169#define MX50_PAD_SSI_RXD__SSI_RXD IOMUX_PAD(0x324, 0x78, 0, 0x0, 0, NO_PAD_CTRL)
170#define MX50_PAD_SSI_RXD__GPIO_6_3 IOMUX_PAD(0x324, 0x78, 1, 0x0, 0, NO_PAD_CTRL)
171#define MX50_PAD_SSI_RXD__CSPI_SS3 IOMUX_PAD(0x324, 0x78, 4, 0x6f4, 0, MX50_CSPI_SS_PAD)
172
173#define MX50_PAD_SSI_RXFS__AUD3_RXFS IOMUX_PAD(0x328, 0x7C, 0, 0x0, 0, NO_PAD_CTRL)
174#define MX50_PAD_SSI_RXFS__GPIO_6_4 IOMUX_PAD(0x328, 0x7C, 1, 0x0, 0, NO_PAD_CTRL)
175#define MX50_PAD_SSI_RXFS__UART5_TXD IOMUX_PAD(0x328, 0x7C, 2, 0x0, 0, MX50_UART_PAD_CTRL)
176#define MX50_PAD_SSI_RXFS__WEIM_D6 IOMUX_PAD(0x328, 0x7C, 3, 0x804, 0, NO_PAD_CTRL)
177#define MX50_PAD_SSI_RXFS__CSPI_SS2 IOMUX_PAD(0x328, 0x7C, 4, 0x6f0, 0, MX50_CSPI_SS_PAD)
178#define MX50_PAD_SSI_RXFS__FEC_COL IOMUX_PAD(0x328, 0x7C, 5, 0x770, 0, PAD_CTL_DSE_HIGH)
179#define MX50_PAD_SSI_RXFS__FEC_MDC IOMUX_PAD(0x328, 0x7C, 6, 0x0, 0, PAD_CTL_DSE_HIGH)
180
181#define MX50_PAD_SSI_RXC__AUD3_RXC IOMUX_PAD(0x32C, 0x80, 0, 0x0, 0, NO_PAD_CTRL)
182#define MX50_PAD_SSI_RXC__GPIO_6_5 IOMUX_PAD(0x32C, 0x80, 1, 0x0, 0, NO_PAD_CTRL)
183#define MX50_PAD_SSI_RXC__UART5_RXD IOMUX_PAD(0x32C, 0x80, 2, 0x7e4, 1, MX50_UART_PAD_CTRL)
184#define MX50_PAD_SSI_RXC__WEIM_D7 IOMUX_PAD(0x32C, 0x80, 3, 0x808, 0, NO_PAD_CTRL)
185#define MX50_PAD_SSI_RXC__CSPI_SS1 IOMUX_PAD(0x32C, 0x80, 4, 0x6ec, 0, MX50_CSPI_SS_PAD)
186#define MX50_PAD_SSI_RXC__FEC_RX_CLK IOMUX_PAD(0x32C, 0x80, 5, 0x780, 0, NO_PAD_CTRL)
187#define MX50_PAD_SSI_RXC__FEC_MDIO IOMUX_PAD(0x32C, 0x80, 6, 0x774, 1, MX50_FEC_PAD_CTRL)
188
189#define MX50_PAD_UART1_TXD__UART1_TXD IOMUX_PAD(0x330, 0x84, 0, 0x0, 0, MX50_UART_PAD_CTRL)
190#define MX50_PAD_UART1_TXD__GPIO_6_6 IOMUX_PAD(0x330, 0x84, 1, 0x0, 0, NO_PAD_CTRL)
191
192#define MX50_PAD_UART1_RXD__UART1_RXD IOMUX_PAD(0x334, 0x88, 0, 0x7c4, 1, MX50_UART_PAD_CTRL)
193#define MX50_PAD_UART1_RXD__GPIO_6_7 IOMUX_PAD(0x334, 0x88, 1, 0x0, 0, NO_PAD_CTRL)
194
195#define MX50_PAD_UART1_CTS__UART1_CTS IOMUX_PAD(0x338, 0x8C, 0, 0x0, 0, MX50_UART_PAD_CTRL)
196#define MX50_PAD_UART1_CTS__GPIO_6_8 IOMUX_PAD(0x338, 0x8C, 1, 0x0, 0, NO_PAD_CTRL)
197#define MX50_PAD_UART1_CTS__UART5_TXD IOMUX_PAD(0x338, 0x8C, 2, 0x0, 0, MX50_UART_PAD_CTRL)
198#define MX50_PAD_UART1_CTS__SD4_D4 IOMUX_PAD(0x338, 0x8C, 4, 0x760, 0, MX50_SD_PAD_CTRL)
199#define MX50_PAD_UART1_CTS__SD4_CMD IOMUX_PAD(0x338, 0x8C, 5, 0x74c, 0, MX50_SD_PAD_CTRL)
200
201#define MX50_PAD_UART1_RTS__UART1_RTS IOMUX_PAD(0x33C, 0x90, 0, 0x7c0, 1, MX50_UART_PAD_CTRL)
202#define MX50_PAD_UART1_RTS__GPIO_6_9 IOMUX_PAD(0x33C, 0x90, 1, 0x0, 0, NO_PAD_CTRL)
203#define MX50_PAD_UART1_RTS__UART5_RXD IOMUX_PAD(0x33C, 0x90, 2, 0x7e4, 3, MX50_UART_PAD_CTRL)
204#define MX50_PAD_UART1_RTS__SD4_D5 IOMUX_PAD(0x33C, 0x90, 4, 0x764, 0, MX50_SD_PAD_CTRL)
205#define MX50_PAD_UART1_RTS__SD4_CLK IOMUX_PAD(0x33C, 0x90, 5, 0x748, 0, MX50_SD_PAD_CTRL)
206
207#define MX50_PAD_UART2_TXD__UART2_TXD IOMUX_PAD(0x340, 0x94, 0, 0x0, 0, MX50_UART_PAD_CTRL)
208#define MX50_PAD_UART2_TXD__GPIO_6_10 IOMUX_PAD(0x340, 0x94, 1, 0x0, 0, NO_PAD_CTRL)
209#define MX50_PAD_UART2_TXD__SD4_D6 IOMUX_PAD(0x340, 0x94, 4, 0x768, 0, MX50_SD_PAD_CTRL)
210#define MX50_PAD_UART2_TXD__SD4_D4 IOMUX_PAD(0x340, 0x94, 5, 0x760, 1, MX50_SD_PAD_CTRL)
211
212#define MX50_PAD_UART2_RXD__UART2_RXD IOMUX_PAD(0x344, 0x98, 0, 0x7cc, 3, MX50_UART_PAD_CTRL)
213#define MX50_PAD_UART2_RXD__GPIO_6_11 IOMUX_PAD(0x344, 0x98, 1, 0x0, 0, NO_PAD_CTRL)
214#define MX50_PAD_UART2_RXD__SD4_D7 IOMUX_PAD(0x344, 0x98, 4, 0x76c, 0, MX50_SD_PAD_CTRL)
215#define MX50_PAD_UART2_RXD__SD4_D5 IOMUX_PAD(0x344, 0x98, 5, 0x764, 1, MX50_SD_PAD_CTRL)
216
217#define MX50_PAD_UART2_CTS__UART2_CTS IOMUX_PAD(0x348, 0x9C, 0, 0x0, 0, MX50_UART_PAD_CTRL)
218#define MX50_PAD_UART2_CTS__GPIO_6_12 IOMUX_PAD(0x348, 0x9C, 1, 0x0, 0, NO_PAD_CTRL)
219#define MX50_PAD_UART2_CTS__SD4_CMD IOMUX_PAD(0x348, 0x9C, 4, 0x74c, 1, MX50_SD_PAD_CTRL)
220#define MX50_PAD_UART2_CTS__SD4_D6 IOMUX_PAD(0x348, 0x9C, 5, 0x768, 1, MX50_SD_PAD_CTRL)
221
222#define MX50_PAD_UART2_RTS__UART2_RTS IOMUX_PAD(0x34C, 0xA0, 0, 0x7c8, 3, MX50_UART_PAD_CTRL)
223#define MX50_PAD_UART2_RTS__GPIO_6_13 IOMUX_PAD(0x34C, 0xA0, 1, 0x0, 0, NO_PAD_CTRL)
224#define MX50_PAD_UART2_RTS__SD4_CLK IOMUX_PAD(0x34C, 0xA0, 4, 0x748, 1, MX50_SD_PAD_CTRL)
225#define MX50_PAD_UART2_RTS__SD4_D7 IOMUX_PAD(0x34C, 0xA0, 5, 0x76c, 1, MX50_SD_PAD_CTRL)
226
227#define MX50_PAD_UART3_TXD__UART3_TXD IOMUX_PAD(0x350, 0xA4, 0, 0x0, 0, MX50_UART_PAD_CTRL)
228#define MX50_PAD_UART3_TXD__GPIO_6_14 IOMUX_PAD(0x350, 0xA4, 1, 0x0, 0, NO_PAD_CTRL)
229#define MX50_PAD_UART3_TXD__SD1_D4 IOMUX_PAD(0x350, 0xA4, 3, 0x0, 0, MX50_SD_PAD_CTRL)
230#define MX50_PAD_UART3_TXD__SD4_D0 IOMUX_PAD(0x350, 0xA4, 4, 0x750, 0, MX50_SD_PAD_CTRL)
231#define MX50_PAD_UART3_TXD__SD2_WP IOMUX_PAD(0x350, 0xA4, 5, 0x744, 0, MX50_SD_PAD_CTRL)
232#define MX50_PAD_UART3_TXD__WEIM_D12 IOMUX_PAD(0x350, 0xA4, 6, 0x81c, 0, NO_PAD_CTRL)
233
234#define MX50_PAD_UART3_RXD__UART3_RXD IOMUX_PAD(0x354, 0xA8, 0, 0x7d4, 1, MX50_UART_PAD_CTRL)
235#define MX50_PAD_UART3_RXD__GPIO_6_15 IOMUX_PAD(0x354, 0xA8, 1, 0x0, 0, NO_PAD_CTRL)
236#define MX50_PAD_UART3_RXD__SD1_D5 IOMUX_PAD(0x354, 0xA8, 3, 0x0, 0, MX50_SD_PAD_CTRL)
237#define MX50_PAD_UART3_RXD__SD4_D1 IOMUX_PAD(0x354, 0xA8, 4, 0x754, 0, MX50_SD_PAD_CTRL)
238#define MX50_PAD_UART3_RXD__SD2_CD IOMUX_PAD(0x354, 0xA8, 5, 0x740, 0, MX50_SD_PAD_CTRL)
239#define MX50_PAD_UART3_RXD__WEIM_D13 IOMUX_PAD(0x354, 0xA8, 6, 0x820, 0, NO_PAD_CTRL)
240
241#define MX50_PAD_UART4_TXD__UART4_TXD IOMUX_PAD(0x358, 0xAC, 0, 0x0, 0, MX50_UART_PAD_CTRL)
242#define MX50_PAD_UART4_TXD__GPIO_6_16 IOMUX_PAD(0x358, 0xAC, 1, 0x0, 0, NO_PAD_CTRL)
243#define MX50_PAD_UART4_TXD__UART3_CTS IOMUX_PAD(0x358, 0xAC, 2, 0x0, 0, MX50_UART_PAD_CTRL)
244#define MX50_PAD_UART4_TXD__SD1_D6 IOMUX_PAD(0x358, 0xAC, 3, 0x0, 0, MX50_SD_PAD_CTRL)
245#define MX50_PAD_UART4_TXD__SD4_D2 IOMUX_PAD(0x358, 0xAC, 4, 0x758, 0, MX50_SD_PAD_CTRL)
246#define MX50_PAD_UART4_TXD__SD2_LCTL IOMUX_PAD(0x358, 0xAC, 5, 0x0, 0, MX50_SD_PAD_CTRL)
247#define MX50_PAD_UART4_TXD__WEIM_D14 IOMUX_PAD(0x358, 0xAC, 6, 0x824, 0, NO_PAD_CTRL)
248
249#define MX50_PAD_UART4_RXD__UART4_RXD IOMUX_PAD(0x35C, 0xB0, 0, 0x7dc, 1, MX50_UART_PAD_CTRL)
250#define MX50_PAD_UART4_RXD__GPIO_6_17 IOMUX_PAD(0x35C, 0xB0, 1, 0x0, 0, NO_PAD_CTRL)
251#define MX50_PAD_UART4_RXD__UART3_RTS IOMUX_PAD(0x35C, 0xB0, 2, 0x7d0, 1, MX50_UART_PAD_CTRL)
252#define MX50_PAD_UART4_RXD__SD1_D7 IOMUX_PAD(0x35C, 0xB0, 3, 0x0, 0, MX50_SD_PAD_CTRL)
253#define MX50_PAD_UART4_RXD__SD4_D3 IOMUX_PAD(0x35C, 0xB0, 4, 0x75c, 0, MX50_SD_PAD_CTRL)
254#define MX50_PAD_UART4_RXD__SD1_LCTL IOMUX_PAD(0x35C, 0xB0, 5, 0x0, 0, MX50_SD_PAD_CTRL)
255#define MX50_PAD_UART4_RXD__WEIM_D15 IOMUX_PAD(0x35C, 0xB0, 6, 0x828, 0, NO_PAD_CTRL)
256
257#define MX50_PAD_CSPI_SCLK__CSPI_SCLK IOMUX_PAD(0x360, 0xB4, 0, 0x0, 0, NO_PAD_CTRL)
258#define MX50_PAD_CSPI_SCLK__GPIO_4_8 IOMUX_PAD(0x360, 0xB4, 1, 0x0, 0, NO_PAD_CTRL)
259
260#define MX50_PAD_CSPI_MOSI__CSPI_MOSI IOMUX_PAD(0x364, 0xB8, 0, 0x0, 0, NO_PAD_CTRL)
261#define MX50_PAD_CSPI_MOSI__GPIO_4_9 IOMUX_PAD(0x364, 0xB8, 1, 0x0, 0, NO_PAD_CTRL)
262
263#define MX50_PAD_CSPI_MISO__CSPI_MISO IOMUX_PAD(0x368, 0xBC, 0, 0x0, 0, NO_PAD_CTRL)
264#define MX50_PAD_CSPI_MISO__GPIO_4_10 IOMUX_PAD(0x368, 0xBC, 1, 0x0, 0, NO_PAD_CTRL)
265
266#define MX50_PAD_CSPI_SS0__CSPI_SS0 IOMUX_PAD(0x36C, 0xC0, 0, 0x0, 0, MX50_CSPI_SS_PAD)
267#define MX50_PAD_CSPI_SS0__GPIO_4_11 IOMUX_PAD(0x36C, 0xC0, 1, 0x0, 0, NO_PAD_CTRL)
268
269#define MX50_PAD_ECSPI1_SCLK__ECSPI1_SCLK IOMUX_PAD(0x370, 0xC4, 0, 0x0, 0, NO_PAD_CTRL)
270#define MX50_PAD_ECSPI1_SCLK__GPIO_4_12 IOMUX_PAD(0x370, 0xC4, 1, 0x0, 0, NO_PAD_CTRL)
271#define MX50_PAD_ECSPI1_SCLK__CSPI_RDY IOMUX_PAD(0x370, 0xC4, 2, 0x6e8, 1, NO_PAD_CTRL)
272#define MX50_PAD_ECSPI1_SCLK__ECSPI2_RDY IOMUX_PAD(0x370, 0xC4, 3, 0x0, 0, NO_PAD_CTRL)
273#define MX50_PAD_ECSPI1_SCLK__UART3_RTS IOMUX_PAD(0x370, 0xC4, 4, 0x7d0, 2, MX50_UART_PAD_CTRL)
274#define MX50_PAD_ECSPI1_SCLK__EPDC_SDCE6 IOMUX_PAD(0x370, 0xC4, 5, 0x0, 0, NO_PAD_CTRL)
275#define MX50_PAD_ECSPI1_SCLK__WEIM_D8 IOMUX_PAD(0x370, 0xC4, 7, 0x80c, 0, NO_PAD_CTRL)
276
277#define MX50_PAD_ECSPI1_MOSI__ECSPI1_MOSI IOMUX_PAD(0x374, 0xC8, 0, 0x0, 0, NO_PAD_CTRL)
278#define MX50_PAD_ECSPI1_MOSI__GPIO_4_13 IOMUX_PAD(0x374, 0xC8, 1, 0x0, 0, NO_PAD_CTRL)
279#define MX50_PAD_ECSPI1_MOSI__CSPI_SS1 IOMUX_PAD(0x374, 0xC8, 2, 0x6ec, 1, MX50_CSPI_SS_PAD)
280#define MX50_PAD_ECSPI1_MOSI__ECSPI2_SS1 IOMUX_PAD(0x374, 0xC8, 3, 0x0, 0, MX50_CSPI_SS_PAD)
281#define MX50_PAD_ECSPI1_MOSI__UART3_CTS IOMUX_PAD(0x374, 0xC8, 4, 0x0, 0, MX50_UART_PAD_CTRL)
282#define MX50_PAD_ECSPI1_MOSI__EPDC_SDCE7 IOMUX_PAD(0x374, 0xC8, 5, 0x0, 0, NO_PAD_CTRL)
283#define MX50_PAD_ECSPI1_MOSI__WEIM_D9 IOMUX_PAD(0x374, 0xC8, 7, 0x810, 0, NO_PAD_CTRL)
284
285#define MX50_PAD_ECSPI1_MISO__ECSPI1_MISO IOMUX_PAD(0x378, 0xCC, 0, 0x0, 0, NO_PAD_CTRL)
286#define MX50_PAD_ECSPI1_MISO__GPIO_4_14 IOMUX_PAD(0x378, 0xCC, 1, 0x0, 0, NO_PAD_CTRL)
287#define MX50_PAD_ECSPI1_MISO__CSPI_SS2 IOMUX_PAD(0x378, 0xCC, 2, 0x6f0, 1, MX50_CSPI_SS_PAD)
288#define MX50_PAD_ECSPI1_MISO__ECSPI2_SS2 IOMUX_PAD(0x378, 0xCC, 3, 0x0, 0, MX50_CSPI_SS_PAD)
289#define MX50_PAD_ECSPI1_MISO__UART4_RTS IOMUX_PAD(0x378, 0xCC, 4, 0x7d8, 0, MX50_UART_PAD_CTRL)
290#define MX50_PAD_ECSPI1_MISO__EPDC_SDCE8 IOMUX_PAD(0x378, 0xCC, 5, 0x0, 0, NO_PAD_CTRL)
291#define MX50_PAD_ECSPI1_MISO__WEIM_D10 IOMUX_PAD(0x378, 0xCC, 7, 0x814, 0, NO_PAD_CTRL)
292
293#define MX50_PAD_ECSPI1_SS0__ECSPI1_SS0 IOMUX_PAD(0x37C, 0xD0, 0, 0x0, 0, MX50_CSPI_SS_PAD)
294#define MX50_PAD_ECSPI1_SS0__GPIO_4_15 IOMUX_PAD(0x37C, 0xD0, 1, 0x0, 0, PAD_CTL_PUS_100K_UP)
295#define MX50_PAD_ECSPI1_SS0__CSPI_SS3 IOMUX_PAD(0x37C, 0xD0, 2, 0x6f4, 1, MX50_CSPI_SS_PAD)
296#define MX50_PAD_ECSPI1_SS0__ECSPI2_SS3 IOMUX_PAD(0x37C, 0xD0, 3, 0x0, 0, MX50_CSPI_SS_PAD)
297#define MX50_PAD_ECSPI1_SS0__UART4_CTS IOMUX_PAD(0x37C, 0xD0, 4, 0x0, 0, MX50_UART_PAD_CTRL)
298#define MX50_PAD_ECSPI1_SS0__EPDC_SDCE9 IOMUX_PAD(0x37C, 0xD0, 5, 0x0, 0, NO_PAD_CTRL)
299#define MX50_PAD_ECSPI1_SS0__WEIM_D11 IOMUX_PAD(0x37C, 0xD0, 7, 0x818, 0, NO_PAD_CTRL)
300
301#define MX50_PAD_ECSPI2_SCLK__ECSPI2_SCLK IOMUX_PAD(0x380, 0xD4, 0, 0x0, 0, NO_PAD_CTRL)
302#define MX50_PAD_ECSPI2_SCLK__GPIO_4_16 IOMUX_PAD(0x380, 0xD4, 1, 0x0, 0, NO_PAD_CTRL)
303#define MX50_PAD_ECSPI2_SCLK__ELCDIF_WR IOMUX_PAD(0x380, 0xD4, 2, 0x0, 0, NO_PAD_CTRL)
304#define MX50_PAD_ECSPI2_SCLK__ECSPI1_RDY IOMUX_PAD(0x380, 0xD4, 3, 0x0, 0, NO_PAD_CTRL)
305#define MX50_PAD_ECSPI2_SCLK__UART5_RTS IOMUX_PAD(0x380, 0xD4, 4, 0x7e0, 0, MX50_UART_PAD_CTRL)
306#define MX50_PAD_ECSPI2_SCLK__ELCDIF_DOTCLK IOMUX_PAD(0x380, 0xD4, 5, 0x0, 0, NO_PAD_CTRL)
307#define MX50_PAD_ECSPI2_SCLK__NANDF_CEN4 IOMUX_PAD(0x380, 0xD4, 6, 0x0, 0, NO_PAD_CTRL)
308#define MX50_PAD_ECSPI2_SCLK__WEIM_D8 IOMUX_PAD(0x380, 0xD4, 7, 0x80c, 1, NO_PAD_CTRL)
309
310#define MX50_PAD_ECSPI2_MOSI__ECSPI2_MOSI IOMUX_PAD(0x384, 0xD8, 0, 0x0, 0, NO_PAD_CTRL)
311#define MX50_PAD_ECSPI2_MOSI__GPIO_4_17 IOMUX_PAD(0x384, 0xD8, 1, 0x0, 0, NO_PAD_CTRL)
312#define MX50_PAD_ECSPI2_MOSI__ELCDIF_RD IOMUX_PAD(0x384, 0xD8, 2, 0x0, 0, NO_PAD_CTRL)
313#define MX50_PAD_ECSPI2_MOSI__ECSPI1_SS1 IOMUX_PAD(0x384, 0xD8, 3, 0x0, 0, MX50_CSPI_SS_PAD)
314#define MX50_PAD_ECSPI2_MOSI__UART5_CTS IOMUX_PAD(0x384, 0xD8, 4, 0x0, 0, MX50_UART_PAD_CTRL)
315#define MX50_PAD_ECSPI2_MOSI__ELCDIF_EN IOMUX_PAD(0x384, 0xD8, 5, 0x0, 0, NO_PAD_CTRL)
316#define MX50_PAD_ECSPI2_MOSI__NANDF_CEN5 IOMUX_PAD(0x384, 0xD8, 6, 0x0, 0, NO_PAD_CTRL)
317#define MX50_PAD_ECSPI2_MOSI__WEIM_D9 IOMUX_PAD(0x384, 0xD8, 7, 0x810, 1, NO_PAD_CTRL)
318
319#define MX50_PAD_ECSPI2_MISO__ECSPI2_MISO IOMUX_PAD(0x388, 0xDC, 0, 0x0, 0, NO_PAD_CTRL)
320#define MX50_PAD_ECSPI2_MISO__GPIO_4_18 IOMUX_PAD(0x388, 0xDC, 1, 0x0, 0, PAD_CTL_PUS_100K_UP)
321#define MX50_PAD_ECSPI2_MISO__ELCDIF_RS IOMUX_PAD(0x388, 0xDC, 2, 0x0, 0, NO_PAD_CTRL)
322#define MX50_PAD_ECSPI2_MISO__ECSPI1_SS2 IOMUX_PAD(0x388, 0xDC, 3, 0x0, 0, MX50_CSPI_SS_PAD)
323#define MX50_PAD_ECSPI2_MISO__UART5_TXD IOMUX_PAD(0x388, 0xDC, 4, 0x0, 0, MX50_UART_PAD_CTRL)
324#define MX50_PAD_ECSPI2_MISO__ELCDIF_VSYNC IOMUX_PAD(0x388, 0xDC, 5, 0x73c, 0, NO_PAD_CTRL)
325#define MX50_PAD_ECSPI2_MISO__NANDF_CEN6 IOMUX_PAD(0x388, 0xDC, 6, 0x0, 0, NO_PAD_CTRL)
326#define MX50_PAD_ECSPI2_MISO__WEIM_D10 IOMUX_PAD(0x388, 0xDC, 7, 0x814, 1, NO_PAD_CTRL)
327
328#define MX50_PAD_ECSPI2_SS0__ECSPI2_SS0 IOMUX_PAD(0x38C, 0xE0, 0, 0x0, 0, MX50_CSPI_SS_PAD)
329#define MX50_PAD_ECSPI2_SS0__GPIO_4_19 IOMUX_PAD(0x38C, 0xE0, 1, 0x0, 0, NO_PAD_CTRL)
330#define MX50_PAD_ECSPI2_SS0__ELCDIF_CS IOMUX_PAD(0x38C, 0xE0, 2, 0x0, 0, NO_PAD_CTRL)
331#define MX50_PAD_ECSPI2_SS0__ECSPI1_SS3 IOMUX_PAD(0x38C, 0xE0, 3, 0x0, 0, MX50_CSPI_SS_PAD)
332#define MX50_PAD_ECSPI2_SS0__UART5_RXD IOMUX_PAD(0x38C, 0xE0, 4, 0x7e4, 5, MX50_UART_PAD_CTRL)
333#define MX50_PAD_ECSPI2_SS0__ELCDIF_HSYNC IOMUX_PAD(0x38C, 0xE0, 5, 0x6f8, 0, NO_PAD_CTRL)
334#define MX50_PAD_ECSPI2_SS0__NANDF_CEN7 IOMUX_PAD(0x38C, 0xE0, 6, 0x0, 0, NO_PAD_CTRL)
335#define MX50_PAD_ECSPI2_SS0__WEIM_D11 IOMUX_PAD(0x38C, 0xE0, 7, 0x818, 1, NO_PAD_CTRL)
336
337#define MX50_PAD_SD1_CLK__SD1_CLK IOMUX_PAD(0x390, 0xE4, IOMUX_CONFIG_SION, 0x0, 0, MX50_SD_PAD_CTRL)
338#define MX50_PAD_SD1_CLK__GPIO_5_0 IOMUX_PAD(0x390, 0xE4, 1, 0x0, 0, NO_PAD_CTRL)
339#define MX50_PAD_SD1_CLK__CLKO IOMUX_PAD(0x390, 0xE4, 7, 0x0, 0, NO_PAD_CTRL)
340
341#define MX50_PAD_SD1_CMD__SD1_CMD IOMUX_PAD(0x394, 0xE8, IOMUX_CONFIG_SION, 0x0, 0, MX50_SD_PAD_CTRL)
342#define MX50_PAD_SD1_CMD__GPIO_5_1 IOMUX_PAD(0x394, 0xE8, 1, 0x0, 0, NO_PAD_CTRL)
343#define MX50_PAD_SD1_CMD__CLKO2 IOMUX_PAD(0x394, 0xE8, 7, 0x0, 0, NO_PAD_CTRL)
344
345#define MX50_PAD_SD1_D0__SD1_D0 IOMUX_PAD(0x398, 0xEC, 0, 0x0, 0, MX50_SD_PAD_CTRL)
346#define MX50_PAD_SD1_D0__GPIO_5_2 IOMUX_PAD(0x398, 0xEC, 1, 0x0, 0, NO_PAD_CTRL)
347#define MX50_PAD_SD1_D0__PLL1_BYP IOMUX_PAD(0x398, 0xEC, 7, 0x6dc, 0, NO_PAD_CTRL)
348
349#define MX50_PAD_SD1_D1__SD1_D1 IOMUX_PAD(0x39C, 0xF0, 0, 0x0, 0, MX50_SD_PAD_CTRL)
350#define MX50_PAD_SD1_D1__GPIO_5_3 IOMUX_PAD(0x39C, 0xF0, 1, 0x0, 0, NO_PAD_CTRL)
351#define MX50_PAD_SD1_D1__PLL2_BYP IOMUX_PAD(0x39C, 0xF0, 7, 0x6e0, 0, NO_PAD_CTRL)
352
353#define MX50_PAD_SD1_D2__SD1_D2 IOMUX_PAD(0x3A0, 0xF4, 0, 0x0, 0, MX50_SD_PAD_CTRL)
354#define MX50_PAD_SD1_D2__GPIO_5_4 IOMUX_PAD(0x3A0, 0xF4, 1, 0x0, 0, NO_PAD_CTRL)
355#define MX50_PAD_SD1_D2__PLL3_BYP IOMUX_PAD(0x3A0, 0xF4, 7, 0x6e4, 0, NO_PAD_CTRL)
356
357#define MX50_PAD_SD1_D3__SD1_D3 IOMUX_PAD(0x3A4, 0xF8, 0, 0x0, 0, MX50_SD_PAD_CTRL)
358#define MX50_PAD_SD1_D3__GPIO_5_5 IOMUX_PAD(0x3A4, 0xF8, 1, 0x0, 0, NO_PAD_CTRL)
359
360#define MX50_PAD_SD2_CLK__SD2_CLK IOMUX_PAD(0x3A8, 0xFC, IOMUX_CONFIG_SION, 0x0, 0, MX50_SD_PAD_CTRL)
361#define MX50_PAD_SD2_CLK__GPIO_5_6 IOMUX_PAD(0x3A8, 0xFC, 1, 0x0, 0, NO_PAD_CTRL)
362#define MX50_PAD_SD2_CLK__MSHC_SCLK IOMUX_PAD(0x3A8, 0xFC, 2, 0x0, 0, MX50_SD_PAD_CTRL)
363
364#define MX50_PAD_SD2_CMD__SD2_CMD IOMUX_PAD(0x3AC, 0x100, IOMUX_CONFIG_SION, 0x0, 0, MX50_SD_PAD_CTRL)
365#define MX50_PAD_SD2_CMD__GPIO_5_7 IOMUX_PAD(0x3AC, 0x100, 1, 0x0, 0, NO_PAD_CTRL)
366#define MX50_PAD_SD2_CMD__MSHC_BS IOMUX_PAD(0x3AC, 0x100, 2, 0x0, 0, MX50_SD_PAD_CTRL)
367
368#define MX50_PAD_SD2_D0__SD2_D0 IOMUX_PAD(0x3B0, 0x104, 0, 0x0, 0, MX50_SD_PAD_CTRL)
369#define MX50_PAD_SD2_D0__GPIO_5_8 IOMUX_PAD(0x3B0, 0x104, 1, 0x0, 0, NO_PAD_CTRL)
370#define MX50_PAD_SD2_D0__MSHC_D0 IOMUX_PAD(0x3B0, 0x104, 2, 0x0, 0, MX50_SD_PAD_CTRL)
371#define MX50_PAD_SD2_D0__KEY_COL4 IOMUX_PAD(0x3B0, 0x104, 3, 0x790, 0, NO_PAD_CTRL)
372
373#define MX50_PAD_SD2_D1__SD2_D1 IOMUX_PAD(0x3B4, 0x108, 0, 0x0, 0, MX50_SD_PAD_CTRL)
374#define MX50_PAD_SD2_D1__GPIO_5_9 IOMUX_PAD(0x3B4, 0x108, 1, 0x0, 0, NO_PAD_CTRL)
375#define MX50_PAD_SD2_D1__MSHC_D1 IOMUX_PAD(0x3B4, 0x108, 2, 0x0, 0, MX50_SD_PAD_CTRL)
376#define MX50_PAD_SD2_D1__KEY_ROW4 IOMUX_PAD(0x3B4, 0x108, 3, 0x7a0, 0, NO_PAD_CTRL)
377
378#define MX50_PAD_SD2_D2__SD2_D2 IOMUX_PAD(0x3B8, 0x10C, 0, 0x0, 0, MX50_SD_PAD_CTRL)
379#define MX50_PAD_SD2_D2__GPIO_5_10 IOMUX_PAD(0x3B8, 0x10C, 1, 0x0, 0, NO_PAD_CTRL)
380#define MX50_PAD_SD2_D2__MSHC_D2 IOMUX_PAD(0x3B8, 0x10C, 2, 0x0, 0, MX50_SD_PAD_CTRL)
381#define MX50_PAD_SD2_D2__KEY_COL5 IOMUX_PAD(0x3B8, 0x10C, 3, 0x794, 0, NO_PAD_CTRL)
382
383#define MX50_PAD_SD2_D3__SD2_D3 IOMUX_PAD(0x3BC, 0x110, 0, 0x0, 0, MX50_SD_PAD_CTRL)
384#define MX50_PAD_SD2_D3__GPIO_5_11 IOMUX_PAD(0x3BC, 0x110, 1, 0x0, 0, NO_PAD_CTRL)
385#define MX50_PAD_SD2_D3__MSHC_D3 IOMUX_PAD(0x3BC, 0x110, 2, 0x0, 0, MX50_SD_PAD_CTRL)
386#define MX50_PAD_SD2_D3__KEY_ROW5 IOMUX_PAD(0x3BC, 0x110, 3, 0x7a4, 0, NO_PAD_CTRL)
387
388#define MX50_PAD_SD2_D4__SD2_D4 IOMUX_PAD(0x3C0, 0x114, 0, 0x0, 0, MX50_SD_PAD_CTRL)
389#define MX50_PAD_SD2_D4__GPIO_5_12 IOMUX_PAD(0x3C0, 0x114, 1, 0x0, 0, NO_PAD_CTRL)
390#define MX50_PAD_SD2_D4__AUD4_RXFS IOMUX_PAD(0x3C0, 0x114, 2, 0x6d0, 0, NO_PAD_CTRL)
391#define MX50_PAD_SD2_D4__KEY_COL6 IOMUX_PAD(0x3C0, 0x114, 3, 0x798, 0, NO_PAD_CTRL)
392#define MX50_PAD_SD2_D4__WEIM_D0 IOMUX_PAD(0x3C0, 0x114, 4, 0x7ec, 0, NO_PAD_CTRL)
393#define MX50_PAD_SD2_D4__CCM_OUT0 IOMUX_PAD(0x3C0, 0x114, 7, 0x0, 0, NO_PAD_CTRL)
394
395#define MX50_PAD_SD2_D5__SD2_D5 IOMUX_PAD(0x3C4, 0x118, 0, 0x0, 0, MX50_SD_PAD_CTRL)
396#define MX50_PAD_SD2_D5__GPIO_5_13 IOMUX_PAD(0x3C4, 0x118, 1, 0x0, 0, NO_PAD_CTRL)
397#define MX50_PAD_SD2_D5__AUD4_RXC IOMUX_PAD(0x3C4, 0x118, 2, 0x6cc, 0, NO_PAD_CTRL)
398#define MX50_PAD_SD2_D5__KEY_ROW6 IOMUX_PAD(0x3C4, 0x118, 3, 0x7a8, 0, NO_PAD_CTRL)
399#define MX50_PAD_SD2_D5__WEIM_D1 IOMUX_PAD(0x3C4, 0x118, 4, 0x7f0, 0, NO_PAD_CTRL)
400#define MX50_PAD_SD2_D5__CCM_OUT1 IOMUX_PAD(0x3C4, 0x118, 7, 0x0, 0, NO_PAD_CTRL)
401
402#define MX50_PAD_SD2_D6__SD2_D6 IOMUX_PAD(0x3C8, 0x11C, 0, 0x0, 0, MX50_SD_PAD_CTRL)
403#define MX50_PAD_SD2_D6__GPIO_5_14 IOMUX_PAD(0x3C8, 0x11C, 1, 0x0, 0, NO_PAD_CTRL)
404#define MX50_PAD_SD2_D6__AUD4_RXD IOMUX_PAD(0x3C8, 0x11C, 2, 0x6c4, 0, NO_PAD_CTRL)
405#define MX50_PAD_SD2_D6__KEY_COL7 IOMUX_PAD(0x3C8, 0x11C, 3, 0x79c, 0, NO_PAD_CTRL)
406#define MX50_PAD_SD2_D6__WEIM_D2 IOMUX_PAD(0x3C8, 0x11C, 4, 0x7f4, 0, NO_PAD_CTRL)
407#define MX50_PAD_SD2_D6__CCM_OUT2 IOMUX_PAD(0x3C8, 0x11C, 7, 0x0, 0, NO_PAD_CTRL)
408
409#define MX50_PAD_SD2_D7__SD2_D7 IOMUX_PAD(0x3CC, 0x120, 0, 0x0, 0, MX50_SD_PAD_CTRL)
410#define MX50_PAD_SD2_D7__GPIO_5_15 IOMUX_PAD(0x3CC, 0x120, 1, 0x0, 0, NO_PAD_CTRL)
411#define MX50_PAD_SD2_D7__AUD4_TXFS IOMUX_PAD(0x3CC, 0x120, 2, 0x6d8, 0, NO_PAD_CTRL)
412#define MX50_PAD_SD2_D7__KEY_ROW7 IOMUX_PAD(0x3CC, 0x120, 3, 0x7ac, 0, NO_PAD_CTRL)
413#define MX50_PAD_SD2_D7__WEIM_D3 IOMUX_PAD(0x3CC, 0x120, 4, 0x7f8, 0, NO_PAD_CTRL)
414#define MX50_PAD_SD2_D7__CCM_STOP IOMUX_PAD(0x3CC, 0x120, 7, 0x0, 0, NO_PAD_CTRL)
415
416#define MX50_PAD_SD2_WP__SD2_WP IOMUX_PAD(0x3D0, 0x124, 0, 0x744, 1, MX50_SD_PAD_CTRL)
417#define MX50_PAD_SD2_WP__GPIO_5_16 IOMUX_PAD(0x3D0, 0x124, 1, 0x0, 0, NO_PAD_CTRL)
418#define MX50_PAD_SD2_WP__AUD4_TXD IOMUX_PAD(0x3D0, 0x124, 2, 0x6c8, 0, NO_PAD_CTRL)
419#define MX50_PAD_SD2_WP__WEIM_D4 IOMUX_PAD(0x3D0, 0x124, 4, 0x7fc, 0, NO_PAD_CTRL)
420#define MX50_PAD_SD2_WP__CCM_WAIT IOMUX_PAD(0x3D0, 0x124, 7, 0x0, 0, NO_PAD_CTRL)
421
422#define MX50_PAD_SD2_CD__SD2_CD IOMUX_PAD(0x3D4, 0x128, 0, 0x740, 1, MX50_SD_PAD_CTRL)
423#define MX50_PAD_SD2_CD__GPIO_5_17 IOMUX_PAD(0x3D4, 0x128, 1, 0x0, 0, NO_PAD_CTRL)
424#define MX50_PAD_SD2_CD__AUD4_TXC IOMUX_PAD(0x3D4, 0x128, 2, 0x6d4, 0, NO_PAD_CTRL)
425#define MX50_PAD_SD2_CD__WEIM_D5 IOMUX_PAD(0x3D4, 0x128, 4, 0x800, 0, NO_PAD_CTRL)
426#define MX50_PAD_SD2_CD__CCM_REF_EN IOMUX_PAD(0x3D4, 0x128, 7, 0x0, 0, NO_PAD_CTRL)
427
428#define MX50_PAD_PMIC_ON_REQ__PMIC_ON_REQ IOMUX_PAD(0x3D8, 0, 0, 0x0, 0, NO_PAD_CTRL)
429
430#define MX50_PAD_PMIC_STBY_REQ__PMIC_STBY_REQ IOMUX_PAD(0x3DC, 0, 0, 0x0, 0, NO_PAD_CTRL)
431
432#define MX50_PAD_PMIC_PORT_B__PMIC_PORT_B IOMUX_PAD(0x3E0, 0, 0, 0x0, 0, NO_PAD_CTRL)
433
434#define MX50_PAD_PMIC_BOOT_MODE1__PMIC_BOOT_MODE1 IOMUX_PAD(0x3E4, 0, 0, 0x0, 0, NO_PAD_CTRL)
435
436#define MX50_PAD_PMIC_RESET_IN_B__PMIC_RESET_IN_B IOMUX_PAD(0x3E8, 0, 0, 0x0, 0, NO_PAD_CTRL)
437
438#define MX50_PAD_PMIC_BOOT_MODE0__PMIC_BOOT_MODE0 IOMUX_PAD(0x3EC, 0, 0, 0x0, 0, NO_PAD_CTRL)
439
440#define MX50_PAD_PMIC_TEST_MODE__PMIC_TEST_MODE IOMUX_PAD(0x3F0, 0, 0, 0x0, 0, NO_PAD_CTRL)
441
442#define MX50_PAD_PMIC_JTAG_TMS__PMIC_JTAG_TMS IOMUX_PAD(0x3F4, 0, 0, 0x0, 0, NO_PAD_CTRL)
443
444#define MX50_PAD_PMIC_JTAG_MOD__PMIC_JTAG_MOD IOMUX_PAD(0x3F8, 0, 0, 0x0, 0, NO_PAD_CTRL)
445
446#define MX50_PAD_PMIC_JTAG_TRSTB__PMIC_JTAG_TRSTB IOMUX_PAD(0x3FC, 0, 0, 0x0, 0, NO_PAD_CTRL)
447
448#define MX50_PAD_PMIC_JTAG_TDI__PMIC_JTAG_TDI IOMUX_PAD(0x400, 0, 0, 0x0, 0, NO_PAD_CTRL)
449
450#define MX50_PAD_PMIC_JTAG_TCK__PMIC_JTAG_TCK IOMUX_PAD(0x404, 0, 0, 0x0, 0, NO_PAD_CTRL)
451
452#define MX50_PAD_PMIC_JTAG_TDO__PMIC_JTAG_TDO IOMUX_PAD(0x408, 0, 0, 0x0, 0, NO_PAD_CTRL)
453
454#define MX50_PAD_DISP_D0__DISP_D0 IOMUX_PAD(0x40C, 0x12C, 0, 0x6fc, 0, MX50_ELCDIF_PAD_CTRL)
455#define MX50_PAD_DISP_D0__GPIO_2_0 IOMUX_PAD(0x40C, 0x12C, 1, 0x0, 0, NO_PAD_CTRL)
456#define MX50_PAD_DISP_D0__FEC_TXCLK IOMUX_PAD(0x40C, 0x12C, 2, 0x78c, 0, PAD_CTL_HYS | PAD_CTL_PKE)
457
458#define MX50_PAD_DISP_D1__DISP_D1 IOMUX_PAD(0x410, 0x130, 0, 0x700, 0, MX50_ELCDIF_PAD_CTRL)
459#define MX50_PAD_DISP_D1__GPIO_2_1 IOMUX_PAD(0x410, 0x130, 1, 0x0, 0, NO_PAD_CTRL)
460#define MX50_PAD_DISP_D1__FEC_RX_ER IOMUX_PAD(0x410, 0x130, 2, 0x788, 0, PAD_CTL_HYS | PAD_CTL_PKE)
461#define MX50_PAD_DISP_D1__WEIM_A17 IOMUX_PAD(0x410, 0x130, 3, 0x0, 0, NO_PAD_CTRL)
462
463#define MX50_PAD_DISP_D2__DISP_D2 IOMUX_PAD(0x414, 0x134, 0, 0x704, 0, MX50_ELCDIF_PAD_CTRL)
464#define MX50_PAD_DISP_D2__GPIO_2_2 IOMUX_PAD(0x414, 0x134, 1, 0x0, 0, NO_PAD_CTRL)
465#define MX50_PAD_DISP_D2__FEC_RX_DV IOMUX_PAD(0x414, 0x134, 2, 0x784, 0, PAD_CTL_HYS | PAD_CTL_PKE)
466#define MX50_PAD_DISP_D2__WEIM_A18 IOMUX_PAD(0x414, 0x134, 3, 0x0, 0, NO_PAD_CTRL)
467
468#define MX50_PAD_DISP_D3__DISP_D3 IOMUX_PAD(0x418, 0x138, 0, 0x708, 0, MX50_ELCDIF_PAD_CTRL)
469#define MX50_PAD_DISP_D3__GPIO_2_3 IOMUX_PAD(0x418, 0x138, 1, 0x0, 0, NO_PAD_CTRL)
470#define MX50_PAD_DISP_D3__FEC_RXD1 IOMUX_PAD(0x418, 0x138, 2, 0x77C, 0, PAD_CTL_HYS | PAD_CTL_PKE)
471#define MX50_PAD_DISP_D3__WEIM_A19 IOMUX_PAD(0x418, 0x138, 3, 0x0, 0, NO_PAD_CTRL)
472#define MX50_PAD_DISP_D3__FEC_COL IOMUX_PAD(0x418, 0x138, 4, 0x770, 1, NO_PAD_CTRL)
473
474#define MX50_PAD_DISP_D4__DISP_D4 IOMUX_PAD(0x41C, 0x13C, 0, 0x70c, 0, MX50_ELCDIF_PAD_CTRL)
475#define MX50_PAD_DISP_D4__GPIO_2_4 IOMUX_PAD(0x41C, 0x13C, 1, 0x0, 0, NO_PAD_CTRL)
476#define MX50_PAD_DISP_D4__FEC_RXD0 IOMUX_PAD(0x41C, 0x13C, 2, 0x778, 0, PAD_CTL_HYS | PAD_CTL_PKE)
477#define MX50_PAD_DISP_D4__WEIM_A20 IOMUX_PAD(0x41C, 0x13C, 3, 0x0, 0, NO_PAD_CTRL)
478
479#define MX50_PAD_DISP_D5__DISP_D5 IOMUX_PAD(0x420, 0x140, 0, 0x710, 0, MX50_ELCDIF_PAD_CTRL)
480#define MX50_PAD_DISP_D5__GPIO_2_5 IOMUX_PAD(0x420, 0x140, 1, 0x0, 0, NO_PAD_CTRL)
481#define MX50_PAD_DISP_D5__FEC_TX_EN IOMUX_PAD(0x420, 0x140, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
482#define MX50_PAD_DISP_D5__WEIM_A21 IOMUX_PAD(0x420, 0x140, 3, 0x0, 0, NO_PAD_CTRL)
483
484#define MX50_PAD_DISP_D6__DISP_D6 IOMUX_PAD(0x424, 0x144, 0, 0x714, 0, MX50_ELCDIF_PAD_CTRL)
485#define MX50_PAD_DISP_D6__GPIO_2_6 IOMUX_PAD(0x424, 0x144, 1, 0x0, 0, NO_PAD_CTRL)
486#define MX50_PAD_DISP_D6__FEC_TXD1 IOMUX_PAD(0x424, 0x144, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
487#define MX50_PAD_DISP_D6__WEIM_A22 IOMUX_PAD(0x424, 0x144, 3, 0x0, 0, NO_PAD_CTRL)
488#define MX50_PAD_DISP_D6__FEC_RX_CLK IOMUX_PAD(0x424, 0x144, 4, 0x780, 1, NO_PAD_CTRL)
489
490#define MX50_PAD_DISP_D7__DISP_D7 IOMUX_PAD(0x428, 0x148, 0, 0x718, 0, MX50_ELCDIF_PAD_CTRL)
491#define MX50_PAD_DISP_D7__GPIO_2_7 IOMUX_PAD(0x428, 0x148, 1, 0x0, 0, NO_PAD_CTRL)
492#define MX50_PAD_DISP_D7__FEC_TXD0 IOMUX_PAD(0x428, 0x148, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
493#define MX50_PAD_DISP_D7__WEIM_A23 IOMUX_PAD(0x428, 0x148, 3, 0x0, 0, NO_PAD_CTRL)
494
495
496#define MX50_PAD_DISP_WR__ELCDIF_WR IOMUX_PAD(0x42C, 0x14C, 0, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
497#define MX50_PAD_DISP_WR__GPIO_2_16 IOMUX_PAD(0x42C, 0x14C, 1, 0x0, 0, NO_PAD_CTRL)
498#define MX50_PAD_DISP_WR__ELCDIF_PIXCLK IOMUX_PAD(0x42C, 0x14C, 2, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
499#define MX50_PAD_DISP_WR__WEIM_A24 IOMUX_PAD(0x42C, 0x14C, 3, 0x0, 0, NO_PAD_CTRL)
500
501#define MX50_PAD_DISP_RD__ELCDIF_RD IOMUX_PAD(0x430, 0x150, 0, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
502#define MX50_PAD_DISP_RD__GPIO_2_19 IOMUX_PAD(0x430, 0x150, 1, 0x0, 0, NO_PAD_CTRL)
503#define MX50_PAD_DISP_RD__ELCDIF_EN IOMUX_PAD(0x430, 0x150, 2, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
504#define MX50_PAD_DISP_RD__WEIM_A25 IOMUX_PAD(0x430, 0x150, 3, 0x0, 0, NO_PAD_CTRL)
505
506#define MX50_PAD_DISP_RS__ELCDIF_RS IOMUX_PAD(0x434, 0x154, 0, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
507#define MX50_PAD_DISP_RS__GPIO_2_17 IOMUX_PAD(0x434, 0x154, 1, 0x0, 0, NO_PAD_CTRL)
508#define MX50_PAD_DISP_RS__ELCDIF_VSYNC IOMUX_PAD(0x434, 0x154, 2, 0x73c, 1, MX50_ELCDIF_PAD_CTRL)
509#define MX50_PAD_DISP_RS__WEIM_A26 IOMUX_PAD(0x434, 0x154, 3, 0x0, 0, NO_PAD_CTRL)
510
511#define MX50_PAD_DISP_CS__ELCDIF_CS IOMUX_PAD(0x438, 0x158, 0, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
512#define MX50_PAD_DISP_CS__GPIO_2_21 IOMUX_PAD(0x438, 0x158, 1, 0x0, 0, NO_PAD_CTRL)
513#define MX50_PAD_DISP_CS__ELCDIF_HSYNC IOMUX_PAD(0x438, 0x158, 2, 0x6f8, 1, MX50_ELCDIF_PAD_CTRL)
514#define MX50_PAD_DISP_CS__WEIM_A27 IOMUX_PAD(0x438, 0x158, 3, 0x0, 0, NO_PAD_CTRL)
515#define MX50_PAD_DISP_CS__WEIM_CS3 IOMUX_PAD(0x438, 0x158, 4, 0x0, 0, NO_PAD_CTRL)
516
517#define MX50_PAD_DISP_BUSY__ELCDIF_HSYNC IOMUX_PAD(0x43C, 0x15C, 0, 0x6f8, 2, MX50_ELCDIF_PAD_CTRL)
518#define MX50_PAD_DISP_BUSY__GPIO_2_18 IOMUX_PAD(0x43C, 0x15C, 1, 0x0, 0, NO_PAD_CTRL)
519#define MX50_PAD_DISP_BUSY__WEIM_CS3 IOMUX_PAD(0x43C, 0x15C, 3, 0x0, 0, NO_PAD_CTRL)
520
521#define MX50_PAD_DISP_RESET__ELCDIF_RST IOMUX_PAD(0x440, 0x160, 0, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
522#define MX50_PAD_DISP_RESET__GPIO_2_20 IOMUX_PAD(0x440, 0x160, 1, 0x0, 0, NO_PAD_CTRL)
523#define MX50_PAD_DISP_RESET__WEIM_CS3 IOMUX_PAD(0x440, 0x160, 4, 0x0, 0, NO_PAD_CTRL)
524
525#define MX50_PAD_SD3_CMD__SD3_CMD IOMUX_PAD(0x444, 0x164, 0, 0x0, 0, MX50_SD_PAD_CTRL)
526#define MX50_PAD_SD3_CMD__GPIO_5_18 IOMUX_PAD(0x444, 0x164, 1, 0x0, 0, NO_PAD_CTRL)
527#define MX50_PIN_SD3_CMD__NANDF_WRN IOMUX_PAD(0x444, 0x164, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
528#define MX50_PAD_SD3_CMD__SSP_CMD IOMUX_PAD(0x444, 0x164, 3, 0x0, 0, NO_PAD_CTRL)
529
530#define MX50_PAD_SD3_CLK__SD3_CLK IOMUX_PAD(0x448, 0x168, 0, 0x0, 0, MX50_SD_PAD_CTRL)
531#define MX50_PAD_SD3_CLK__GPIO_5_19 IOMUX_PAD(0x448, 0x168, 1, 0x0, 0, NO_PAD_CTRL)
532#define MX50_PIN_SD3_CLK__NANDF_RDN IOMUX_PAD(0x448, 0x168, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
533#define MX50_PAD_SD3_CLK__SSP_CLK IOMUX_PAD(0x448, 0x168, 3, 0x0, 0, NO_PAD_CTRL)
534
535#define MX50_PAD_SD3_D0__SD3_D0 IOMUX_PAD(0x44C, 0x16C, 0, 0x0, 0, MX50_SD_PAD_CTRL)
536#define MX50_PAD_SD3_D0__GPIO_5_20 IOMUX_PAD(0x44C, 0x16C, 1, 0x0, 0, NO_PAD_CTRL)
537#define MX50_PIN_SD3_D0__NANDF_D4 IOMUX_PAD(0x44C, 0x16C, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
538#define MX50_PAD_SD3_D0__SSP_D0 IOMUX_PAD(0x44C, 0x16C, 3, 0x0, 0, NO_PAD_CTRL)
539#define MX50_PAD_SD3_D0__PLL1_BYP IOMUX_PAD(0x44C, 0x16C, 7, 0x6dc, 1, NO_PAD_CTRL)
540
541#define MX50_PAD_SD3_D1__SD3_D1 IOMUX_PAD(0x450, 0x170, 0, 0x0, 0, MX50_SD_PAD_CTRL)
542#define MX50_PAD_SD3_D1__GPIO_5_21 IOMUX_PAD(0x450, 0x170, 1, 0x0, 0, NO_PAD_CTRL)
543#define MX50_PIN_SD3_D1__NANDF_D5 IOMUX_PAD(0x450, 0x170, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
544#define MX50_PAD_SD3_D1__PLL2_BYP IOMUX_PAD(0x450, 0x170, 7, 0x6e0, 1, NO_PAD_CTRL)
545
546#define MX50_PAD_SD3_D2__SD3_D2 IOMUX_PAD(0x454, 0x174, 0, 0x0, 0, MX50_SD_PAD_CTRL)
547#define MX50_PAD_SD3_D2__GPIO_5_22 IOMUX_PAD(0x454, 0x174, 1, 0x0, 0, NO_PAD_CTRL)
548#define MX50_PIN_SD3_D2__NANDF_D6 IOMUX_PAD(0x454, 0x174, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
549#define MX50_PAD_SD3_D2__SSP_D2 IOMUX_PAD(0x454, 0x174, 3, 0x0, 0, NO_PAD_CTRL)
550#define MX50_PAD_SD3_D2__PLL3_BYP IOMUX_PAD(0x454, 0x174, 7, 0x6e4, 1, NO_PAD_CTRL)
551
552#define MX50_PAD_SD3_D3__SD3_D3 IOMUX_PAD(0x458, 0x178, 0, 0x0, 0, MX50_SD_PAD_CTRL)
553#define MX50_PAD_SD3_D3__GPIO_5_23 IOMUX_PAD(0x458, 0x178, 1, 0x0, 0, NO_PAD_CTRL)
554#define MX50_PIN_SD3_D3__NANDF_D7 IOMUX_PAD(0x458, 0x178, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
555#define MX50_PAD_SD3_D3__SSP_D3 IOMUX_PAD(0x458, 0x178, 3, 0x0, 0, NO_PAD_CTRL)
556
557#define MX50_PAD_SD3_D4__SD3_D4 IOMUX_PAD(0x45C, 0x17C, 0, 0x0, 0, MX50_SD_PAD_CTRL)
558#define MX50_PAD_SD3_D4__GPIO_5_24 IOMUX_PAD(0x45C, 0x17C, 1, 0x0, 0, NO_PAD_CTRL)
559#define MX50_PIN_SD3_D4__NANDF_D0 IOMUX_PAD(0x45C, 0x17C, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
560#define MX50_PAD_SD3_D4__SSP_D4 IOMUX_PAD(0x45C, 0x17C, 1, 0x0, 0, NO_PAD_CTRL)
561
562#define MX50_PAD_SD3_D5__SD3_D5 IOMUX_PAD(0x460, 0x180, 0, 0x0, 0, MX50_SD_PAD_CTRL)
563#define MX50_PAD_SD3_D5__GPIO_5_25 IOMUX_PAD(0x460, 0x180, 1, 0x0, 0, NO_PAD_CTRL)
564#define MX50_PIN_SD3_D5__NANDF_D1 IOMUX_PAD(0x460, 0x180, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
565#define MX50_PAD_SD3_D5__SSP_D5 IOMUX_PAD(0x460, 0x180, 3, 0x0, 0, NO_PAD_CTRL)
566
567#define MX50_PAD_SD3_D6__SD3_D6 IOMUX_PAD(0x464, 0x184, 0, 0x0, 0, MX50_SD_PAD_CTRL)
568#define MX50_PAD_SD3_D6__GPIO_5_26 IOMUX_PAD(0x464, 0x184, 1, 0x0, 0, NO_PAD_CTRL)
569#define MX50_PIN_SD3_D6__NANDF_D2 IOMUX_PAD(0x464, 0x184, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
570#define MX50_PAD_SD3_D6__SSP_D6 IOMUX_PAD(0x464, 0x184, 3, 0x0, 0, NO_PAD_CTRL)
571
572#define MX50_PAD_SD3_D7__SD3_D7 IOMUX_PAD(0x468, 0x188, 0, 0x0, 0, MX50_SD_PAD_CTRL)
573#define MX50_PAD_SD3_D7__GPIO_5_27 IOMUX_PAD(0x468, 0x188, 1, 0x0, 0, NO_PAD_CTRL)
574#define MX50_PIN_SD3_D7__NANDF_D3 IOMUX_PAD(0x468, 0x188, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
575#define MX50_PAD_SD3_D7__SSP_D7 IOMUX_PAD(0x468, 0x188, 3, 0x0, 0, NO_PAD_CTRL)
576
577#define MX50_PAD_SD3_WP__SD3_WP IOMUX_PAD(0x46C, 0x18C, 0, 0x0, 0, MX50_SD_PAD_CTRL)
578#define MX50_PAD_SD3_WP__GPIO_5_28 IOMUX_PAD(0x46C, 0x18C, 1, 0x0, 0, NO_PAD_CTRL)
579#define MX50_PIN_SD3_WP__NANDF_RESETN IOMUX_PAD(0x46C, 0x18C, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
580#define MX50_PAD_SD3_WP__SSP_CD IOMUX_PAD(0x46C, 0x18C, 3, 0x0, 0, NO_PAD_CTRL)
581#define MX50_PAD_SD3_WP__SD4_LCTL IOMUX_PAD(0x46C, 0x18C, 4, 0x0, 0, MX50_SD_PAD_CTRL)
582#define MX50_PAD_SD3_WP__WEIM_CS3 IOMUX_PAD(0x46C, 0x18C, 5, 0x0, 0, NO_PAD_CTRL)
583
584#define MX50_PAD_DISP_D8__DISP_D8 IOMUX_PAD(0x470, 0x190, 0, 0x71c, 0, MX50_ELCDIF_PAD_CTRL)
585#define MX50_PAD_DISP_D8__GPIO_2_8 IOMUX_PAD(0x470, 0x190, 1, 0x0, 0, NO_PAD_CTRL)
586#define MX50_PAD_DISP_D8__NANDF_CLE IOMUX_PAD(0x470, 0x190, 2, 0x0, 0, NO_PAD_CTRL)
587#define MX50_PAD_DISP_D8__SD1_LCTL IOMUX_PAD(0x470, 0x190, 3, 0x0, 0, MX50_SD_PAD_CTRL)
588#define MX50_PAD_DISP_D8__SD4_CMD IOMUX_PAD(0x470, 0x190, 4, 0x74c, 2, MX50_SD_PAD_CTRL)
589#define MX50_PAD_DISP_D8__KEY_COL4 IOMUX_PAD(0x470, 0x190, 5, 0x790, 1, NO_PAD_CTRL)
590#define MX50_PAD_DISP_D8__FEC_TX_CLK IOMUX_PAD(0x470, 0x190, 6, 0x78c, 1, NO_PAD_CTRL)
591
592#define MX50_PAD_DISP_D9__DISP_D9 IOMUX_PAD(0x474, 0x194, 0, 0x720, 0, MX50_ELCDIF_PAD_CTRL)
593#define MX50_PAD_DISP_D9__GPIO_2_9 IOMUX_PAD(0x474, 0x194, 1, 0x0, 0, NO_PAD_CTRL)
594#define MX50_PAD_DISP_D9__NANDF_ALE IOMUX_PAD(0x474, 0x194, 2, 0x0, 0, NO_PAD_CTRL)
595#define MX50_PAD_DISP_D9__SD2_LCTL IOMUX_PAD(0x474, 0x194, 3, 0x0, 0, MX50_SD_PAD_CTRL)
596#define MX50_PAD_DISP_D9__SD4_CLK IOMUX_PAD(0x474, 0x194, 4, 0x748, 2, MX50_SD_PAD_CTRL)
597#define MX50_PAD_DISP_D9__KEY_ROW4 IOMUX_PAD(0x474, 0x194, 5, 0x7a0, 1, NO_PAD_CTRL)
598#define MX50_PAD_DISP_D9__FEC_RX_ER IOMUX_PAD(0x474, 0x194, 6, 0x788, 1, NO_PAD_CTRL)
599
600#define MX50_PAD_DISP_D10__DISP_D10 IOMUX_PAD(0x478, 0x198, 0, 0x724, 0, MX50_ELCDIF_PAD_CTRL)
601#define MX50_PAD_DISP_D10__GPIO_2_10 IOMUX_PAD(0x478, 0x198, 1, 0x0, 0, NO_PAD_CTRL)
602#define MX50_PAD_DISP_D10__NANDF_CEN0 IOMUX_PAD(0x478, 0x198, 2, 0x0, 0, NO_PAD_CTRL)
603#define MX50_PAD_DISP_D10__SD3_LCTL IOMUX_PAD(0x478, 0x198, 3, 0x0, 0, MX50_SD_PAD_CTRL)
604#define MX50_PAD_DISP_D10__SD4_D0 IOMUX_PAD(0x478, 0x198, 4, 0x750, 1, MX50_SD_PAD_CTRL)
605#define MX50_PAD_DISP_D10__KEY_COL5 IOMUX_PAD(0x478, 0x198, 5, 0x794, 1, NO_PAD_CTRL)
606#define MX50_PAD_DISP_D10__FEC_RX_DV IOMUX_PAD(0x478, 0x198, 6, 0x784, 1, NO_PAD_CTRL)
607
608#define MX50_PAD_DISP_D11__DISP_D11 IOMUX_PAD(0x47C, 0x19C, 0, 0x728, 0, MX50_ELCDIF_PAD_CTRL)
609#define MX50_PAD_DISP_D11__GPIO_2_11 IOMUX_PAD(0x47C, 0x19C, 1, 0x0, 0, NO_PAD_CTRL)
610#define MX50_PAD_DISP_D11__NANDF_CEN1 IOMUX_PAD(0x47C, 0x19C, 2, 0x0, 0, NO_PAD_CTRL)
611#define MX50_PAD_DISP_D11__SD4_D1 IOMUX_PAD(0x47C, 0x19C, 4, 0x754, 1, MX50_SD_PAD_CTRL)
612#define MX50_PAD_DISP_D11__KEY_ROW5 IOMUX_PAD(0x47C, 0x19C, 5, 0x7a4, 1, NO_PAD_CTRL)
613#define MX50_PAD_DISP_D11__FEC_RDAT1 IOMUX_PAD(0x47C, 0x19C, 6, 0x77c, 1, NO_PAD_CTRL)
614
615#define MX50_PAD_DISP_D12__DISP_D12 IOMUX_PAD(0x480, 0x1A0, 0, 0x72c, 0, MX50_ELCDIF_PAD_CTRL)
616#define MX50_PAD_DISP_D12__GPIO_2_12 IOMUX_PAD(0x480, 0x1A0, 1, 0x0, 0, NO_PAD_CTRL)
617#define MX50_PAD_DISP_D12__NANDF_CEN2 IOMUX_PAD(0x480, 0x1A0, 2, 0x0, 0, NO_PAD_CTRL)
618#define MX50_PAD_DISP_D12__SD1_CD IOMUX_PAD(0x480, 0x1A0, 3, 0x0, 0, MX50_SD_PAD_CTRL)
619#define MX50_PAD_DISP_D12__SD4_D2 IOMUX_PAD(0x480, 0x1A0, 4, 0x758, 1, MX50_SD_PAD_CTRL)
620#define MX50_PAD_DISP_D12__KEY_COL6 IOMUX_PAD(0x480, 0x1A0, 5, 0x798, 1, NO_PAD_CTRL)
621#define MX50_PAD_DISP_D12__FEC_RDAT0 IOMUX_PAD(0x480, 0x1A0, 6, 0x778, 1, NO_PAD_CTRL)
622
623#define MX50_PAD_DISP_D13__DISP_D13 IOMUX_PAD(0x484, 0x1A4, 0, 0x730, 0, MX50_ELCDIF_PAD_CTRL)
624#define MX50_PAD_DISP_D13__GPIO_2_13 IOMUX_PAD(0x484, 0x1A4, 1, 0x0, 0, NO_PAD_CTRL)
625#define MX50_PAD_DISP_D13__NANDF_CEN3 IOMUX_PAD(0x484, 0x1A4, 2, 0x0, 0, NO_PAD_CTRL)
626#define MX50_PAD_DISP_D13__SD3_CD IOMUX_PAD(0x484, 0x1A4, 3, 0x0, 0, MX50_SD_PAD_CTRL)
627#define MX50_PAD_DISP_D13__SD4_D3 IOMUX_PAD(0x484, 0x1A4, 4, 0x75c, 1, MX50_SD_PAD_CTRL)
628#define MX50_PAD_DISP_D13__KEY_ROW6 IOMUX_PAD(0x484, 0x1A4, 5, 0x7a8, 1, NO_PAD_CTRL)
629#define MX50_PAD_DISP_D13__FEC_TX_EN IOMUX_PAD(0x484, 0x1A4, 6, 0x0, 0, NO_PAD_CTRL)
630
631#define MX50_PAD_DISP_D14__DISP_D14 IOMUX_PAD(0x488, 0x1A8, 0, 0x734, 0, MX50_ELCDIF_PAD_CTRL)
632#define MX50_PAD_DISP_D14__GPIO_2_14 IOMUX_PAD(0x488, 0x1A8, 1, 0x0, 0, NO_PAD_CTRL)
633#define MX50_PAD_DISP_D14__NANDF_RDY0 IOMUX_PAD(0x488, 0x1A8, 2, 0x7b4, 1, NO_PAD_CTRL)
634#define MX50_PAD_DISP_D14__SD1_WP IOMUX_PAD(0x488, 0x1A8, 3, 0x0, 0, MX50_SD_PAD_CTRL)
635#define MX50_PAD_DISP_D14__SD4_WP IOMUX_PAD(0x488, 0x1A8, 4, 0x0, 0, MX50_SD_PAD_CTRL)
636#define MX50_PAD_DISP_D14__KEY_COL7 IOMUX_PAD(0x488, 0x1A8, 5, 0x79c, 1, NO_PAD_CTRL)
637#define MX50_PAD_DISP_D14__FEC_TDAT1 IOMUX_PAD(0x488, 0x1A8, 6, 0x0, 0, NO_PAD_CTRL)
638
639#define MX50_PAD_DISP_D15__DISP_D15 IOMUX_PAD(0x48C, 0x1AC, 0, 0x738, 0, MX50_ELCDIF_PAD_CTRL)
640#define MX50_PAD_DISP_D15__GPIO_2_15 IOMUX_PAD(0x48C, 0x1AC, 1, 0x0, 0, NO_PAD_CTRL)
641#define MX50_PAD_DISP_D15__NANDF_DQS IOMUX_PAD(0x48C, 0x1AC, 2, 0x7b0, 1, NO_PAD_CTRL)
642#define MX50_PAD_DISP_D15__SD3_RST IOMUX_PAD(0x48C, 0x1AC, 3, 0x0, 0, MX50_SD_PAD_CTRL)
643#define MX50_PAD_DISP_D15__SD4_CD IOMUX_PAD(0x48C, 0x1AC, 4, 0x0, 0, MX50_SD_PAD_CTRL)
644#define MX50_PAD_DISP_D15__KEY_ROW7 IOMUX_PAD(0x48C, 0x1AC, 5, 0x7ac, 1, NO_PAD_CTRL)
645#define MX50_PAD_DISP_D15__FEC_TDAT0 IOMUX_PAD(0x48C, 0x1AC, 6, 0x0, 0, NO_PAD_CTRL)
646
647#define MX50_PAD_EPDC_D0__EPDC_D0 IOMUX_PAD(0x54C, 0x1B0, 0, 0x0, 0, NO_PAD_CTRL)
648#define MX50_PAD_EPDC_D0__GPIO_3_0 IOMUX_PAD(0x54C, 0x1B0, 1, 0x0, 0, NO_PAD_CTRL)
649#define MX50_PAD_EPDC_D0__WEIM_D0 IOMUX_PAD(0x54C, 0x1B0, 2, 0x7ec, 1, NO_PAD_CTRL)
650#define MX50_PAD_EPDC_D0__ELCDIF_RS IOMUX_PAD(0x54C, 0x1B0, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
651#define MX50_PAD_EPDC_D0__ELCDIF_PIXCLK IOMUX_PAD(0x54C, 0x1B0, 4, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
652
653#define MX50_PAD_EPDC_D1__EPDC_D1 IOMUX_PAD(0x550, 0x1B4, 0, 0x0, 0, NO_PAD_CTRL)
654#define MX50_PAD_EPDC_D1__GPIO_3_1 IOMUX_PAD(0x550, 0x1B4, 1, 0x0, 0, NO_PAD_CTRL)
655#define MX50_PAD_EPDC_D1__WEIM_D1 IOMUX_PAD(0x550, 0x1B4, 2, 0x7f0, 1, NO_PAD_CTRL)
656#define MX50_PAD_EPDC_D1__ELCDIF_CS IOMUX_PAD(0x550, 0x1B4, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
657#define MX50_PAD_EPDC_D1__ELCDIF_EN IOMUX_PAD(0x550, 0x1B4, 4, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
658
659#define MX50_PAD_EPDC_D2__EPDC_D2 IOMUX_PAD(0x554, 0x1B8, 0, 0x0, 0, NO_PAD_CTRL)
660#define MX50_PAD_EPDC_D2__GPIO_3_2 IOMUX_PAD(0x554, 0x1B8, 1, 0x0, 0, NO_PAD_CTRL)
661#define MX50_PAD_EPDC_D2__WEIM_D2 IOMUX_PAD(0x554, 0x1B8, 2, 0x7f4, 1, NO_PAD_CTRL)
662#define MX50_PAD_EPDC_D2__ELCDIF_WR IOMUX_PAD(0x554, 0x1B8, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
663#define MX50_PAD_EPDC_D2__ELCDIF_VSYNC IOMUX_PAD(0x554, 0x1B8, 4, 0x73c, 2, MX50_ELCDIF_PAD_CTRL)
664
665#define MX50_PAD_EPDC_D3__EPDC_D3 IOMUX_PAD(0x558, 0x1BC, 0, 0x0, 0, NO_PAD_CTRL)
666#define MX50_PAD_EPDC_D3__GPIO_3_3 IOMUX_PAD(0x558, 0x1BC, 1, 0x0, 0, NO_PAD_CTRL)
667#define MX50_PAD_EPDC_D3__WEIM_D3 IOMUX_PAD(0x558, 0x1BC, 2, 0x7f8, 1, NO_PAD_CTRL)
668#define MX50_PAD_EPDC_D3__ELCDIF_RD IOMUX_PAD(0x558, 0x1BC, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
669#define MX50_PAD_EPDC_D3__ELCDIF_HSYNC IOMUX_PAD(0x558, 0x1BC, 4, 0x6f8, 3, MX50_ELCDIF_PAD_CTRL)
670
671#define MX50_PAD_EPDC_D4__EPDC_D4 IOMUX_PAD(0x55C, 0x1C0, 0, 0x0, 0, NO_PAD_CTRL)
672#define MX50_PAD_EPDC_D4__GPIO_3_4 IOMUX_PAD(0x55C, 0x1C0, 1, 0x0, 0, NO_PAD_CTRL)
673#define MX50_PAD_EPDC_D4__WEIM_D4 IOMUX_PAD(0x55C, 0x1C0, 2, 0x7fc, 1, NO_PAD_CTRL)
674
675#define MX50_PAD_EPDC_D5__EPDC_D5 IOMUX_PAD(0x560, 0x1C4, 0, 0x0, 0, NO_PAD_CTRL)
676#define MX50_PAD_EPDC_D5__GPIO_3_5 IOMUX_PAD(0x560, 0x1C4, 1, 0x0, 0, NO_PAD_CTRL)
677#define MX50_PAD_EPDC_D5__WEIM_D5 IOMUX_PAD(0x560, 0x1C4, 2, 0x800, 1, NO_PAD_CTRL)
678
679#define MX50_PAD_EPDC_D6__EPDC_D6 IOMUX_PAD(0x564, 0x1C8, 0, 0x0, 0, NO_PAD_CTRL)
680#define MX50_PAD_EPDC_D6__GPIO_3_6 IOMUX_PAD(0x564, 0x1C8, 1, 0x0, 0, NO_PAD_CTRL)
681#define MX50_PAD_EPDC_D6__WEIM_D6 IOMUX_PAD(0x564, 0x1C8, 2, 0x804, 1, NO_PAD_CTRL)
682
683#define MX50_PAD_EPDC_D7__EPDC_D7 IOMUX_PAD(0x568, 0x1CC, 0, 0x0, 0, NO_PAD_CTRL)
684#define MX50_PAD_EPDC_D7__GPIO_3_7 IOMUX_PAD(0x568, 0x1CC, 1, 0x0, 0, NO_PAD_CTRL)
685#define MX50_PAD_EPDC_D7__WEIM_D7 IOMUX_PAD(0x568, 0x1CC, 2, 0x808, 1, NO_PAD_CTRL)
686
687#define MX50_PAD_EPDC_D8__EPDC_D8 IOMUX_PAD(0x56C, 0x1D0, 0, 0x0, 0, NO_PAD_CTRL)
688#define MX50_PAD_EPDC_D8__GPIO_3_8 IOMUX_PAD(0x56C, 0x1D0, 1, 0x0, 0, NO_PAD_CTRL)
689#define MX50_PAD_EPDC_D8__WEIM_D8 IOMUX_PAD(0x56C, 0x1D0, 2, 0x80c, 2, NO_PAD_CTRL)
690#define MX50_PAD_EPDC_D8__ELCDIF_D24 IOMUX_PAD(0x56C, 0x1D0, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
691
692#define MX50_PAD_EPDC_D9__EPDC_D9 IOMUX_PAD(0x570, 0x1D4, 0, 0x0, 0, NO_PAD_CTRL)
693#define MX50_PAD_EPDC_D9__GPIO_3_9 IOMUX_PAD(0x570, 0x1D4, 1, 0x0, 0, NO_PAD_CTRL)
694#define MX50_PAD_EPDC_D9__WEIM_D9 IOMUX_PAD(0x570, 0x1D4, 2, 0x810, 2, NO_PAD_CTRL)
695#define MX50_PAD_EPDC_D9__ELCDIF_D25 IOMUX_PAD(0x570, 0x1D4, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
696
697#define MX50_PAD_EPDC_D10__EPDC_D10 IOMUX_PAD(0x574, 0x1D8, 0, 0x0, 0, NO_PAD_CTRL)
698#define MX50_PAD_EPDC_D10__GPIO_3_10 IOMUX_PAD(0x574, 0x1D8, 1, 0x0, 0, NO_PAD_CTRL)
699#define MX50_PAD_EPDC_D10__WEIM_D10 IOMUX_PAD(0x574, 0x1D8, 2, 0x814, 2, NO_PAD_CTRL)
700#define MX50_PAD_EPDC_D10__ELCDIF_D26 IOMUX_PAD(0x574, 0x1D8, 3, 0x0, 0, NO_PAD_CTRL)
701
702#define MX50_PAD_EPDC_D11__EPDC_D11 IOMUX_PAD(0x578, 0x1DC, 0, 0x0, 0, NO_PAD_CTRL)
703#define MX50_PAD_EPDC_D11__GPIO_3_11 IOMUX_PAD(0x578, 0x1DC, 1, 0x0, 0, NO_PAD_CTRL)
704#define MX50_PAD_EPDC_D11__WEIM_D11 IOMUX_PAD(0x578, 0x1DC, 2, 0x818, 2, NO_PAD_CTRL)
705#define MX50_PAD_EPDC_D11__ELCDIF_D27 IOMUX_PAD(0x578, 0x1DC, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
706
707#define MX50_PAD_EPDC_D12__EPDC_D12 IOMUX_PAD(0x57C, 0x1E0, 0, 0x0, 0, NO_PAD_CTRL)
708#define MX50_PAD_EPDC_D12__GPIO_3_12 IOMUX_PAD(0x57C, 0x1E0, 1, 0x0, 0, NO_PAD_CTRL)
709#define MX50_PAD_EPDC_D12__WEIM_D12 IOMUX_PAD(0x57C, 0x1E0, 2, 0x81c, 1, NO_PAD_CTRL)
710#define MX50_PAD_EPDC_D12__ELCDIF_D28 IOMUX_PAD(0x57C, 0x1E0, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
711
712#define MX50_PAD_EPDC_D13__EPDC_D13 IOMUX_PAD(0x580, 0x1E4, 0, 0x0, 0, NO_PAD_CTRL)
713#define MX50_PAD_EPDC_D13__GPIO_3_13 IOMUX_PAD(0x580, 0x1E4, 1, 0x0, 0, NO_PAD_CTRL)
714#define MX50_PAD_EPDC_D13__WEIM_D13 IOMUX_PAD(0x580, 0x1E4, 2, 0x820, 1, NO_PAD_CTRL)
715#define MX50_PAD_EPDC_D13__ELCDIF_D29 IOMUX_PAD(0x580, 0x1E4, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
716
717#define MX50_PAD_EPDC_D14__EPDC_D14 IOMUX_PAD(0x584, 0x1E8, 0, 0x0, 0, NO_PAD_CTRL)
718#define MX50_PAD_EPDC_D14__GPIO_3_14 IOMUX_PAD(0x584, 0x1E8, 1, 0x0, 0, NO_PAD_CTRL)
719#define MX50_PAD_EPDC_D14__WEIM_D14 IOMUX_PAD(0x584, 0x1E8, 2, 0x824, 1, NO_PAD_CTRL)
720#define MX50_PAD_EPDC_D14__ELCDIF_D30 IOMUX_PAD(0x584, 0x1E8, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
721#define MX50_PAD_EPDC_D14__AUD6_TXD IOMUX_PAD(0x584, 0x1E8, 4, 0x0, 0, NO_PAD_CTRL)
722
723#define MX50_PAD_EPDC_D15__EPDC_D15 IOMUX_PAD(0x588, 0x1EC, 0, 0x0, 0, NO_PAD_CTRL)
724#define MX50_PAD_EPDC_D15__GPIO_3_15 IOMUX_PAD(0x588, 0x1EC, 1, 0x0, 0, NO_PAD_CTRL)
725#define MX50_PAD_EPDC_D15__WEIM_D15 IOMUX_PAD(0x588, 0x1EC, 2, 0x828, 1, NO_PAD_CTRL)
726#define MX50_PAD_EPDC_D15__ELCDIF_D31 IOMUX_PAD(0x588, 0x1EC, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
727#define MX50_PAD_EPDC_D15__AUD6_TXC IOMUX_PAD(0x588, 0x1EC, 4, 0x0, 0, NO_PAD_CTRL)
728
729#define MX50_PAD_EPDC_GDCLK__EPDC_GDCLK IOMUX_PAD(0x58C, 0x1F0, 0, 0x0, 0, NO_PAD_CTRL)
730#define MX50_PAD_EPDC_GDCLK__GPIO_3_16 IOMUX_PAD(0x58C, 0x1F0, 1, 0x0, 0, NO_PAD_CTRL)
731#define MX50_PAD_EPDC_GDCLK__WEIM_D16 IOMUX_PAD(0x58C, 0x1F0, 2, 0x0, 0, NO_PAD_CTRL)
732#define MX50_PAD_EPDC_GDCLK__ELCDIF_D16 IOMUX_PAD(0x58C, 0x1F0, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
733#define MX50_PAD_EPDC_GDCLK__AUD6_TXFS IOMUX_PAD(0x58C, 0x1F0, 4, 0x0, 0, NO_PAD_CTRL)
734
735#define MX50_PAD_EPDC_GDSP__EPDC_GDSP IOMUX_PAD(0x590, 0x1F4, 0, 0x0, 0, NO_PAD_CTRL)
736#define MX50_PAD_EPDC_GDSP__GPIO_3_17 IOMUX_PAD(0x590, 0x1F4, 1, 0x0, 0, NO_PAD_CTRL)
737#define MX50_PAD_EPDC_GDSP__WEIM_D17 IOMUX_PAD(0x590, 0x1F4, 2, 0x0, 0, NO_PAD_CTRL)
738#define MX50_PAD_EPDC_GDSP__ELCDIF_D17 IOMUX_PAD(0x590, 0x1F4, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
739#define MX50_PAD_EPDC_GDSP__AUD6_RXD IOMUX_PAD(0x590, 0x1F4, 4, 0x0, 0, NO_PAD_CTRL)
740
741#define MX50_PAD_EPDC_GDOE__EPDC_GDOE IOMUX_PAD(0x594, 0x1F8, 0, 0x0, 0, NO_PAD_CTRL)
742#define MX50_PAD_EPDC_GDOE__GPIO_3_18 IOMUX_PAD(0x594, 0x1F8, 1, 0x0, 0, NO_PAD_CTRL)
743#define MX50_PAD_EPDC_GDOE__WEIM_D18 IOMUX_PAD(0x594, 0x1F8, 2, 0x0, 0, NO_PAD_CTRL)
744#define MX50_PAD_EPDC_GDOE__ELCDIF_D18 IOMUX_PAD(0x594, 0x1F8, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
745#define MX50_PAD_EPDC_GDOE__AUD6_RXC IOMUX_PAD(0x594, 0x1F8, 4, 0x0, 0, NO_PAD_CTRL)
746
747#define MX50_PAD_EPDC_GDRL__EPDC_GDRL IOMUX_PAD(0x598, 0x1FC, 0, 0x0, 0, NO_PAD_CTRL)
748#define MX50_PAD_EPDC_GDRL__GPIO_3_19 IOMUX_PAD(0x598, 0x1FC, 1, 0x0, 0, NO_PAD_CTRL)
749#define MX50_PAD_EPDC_GDRL__WEIM_D19 IOMUX_PAD(0x598, 0x1FC, 2, 0x0, 0, NO_PAD_CTRL)
750#define MX50_PAD_EPDC_GDRL__ELCDIF_D19 IOMUX_PAD(0x598, 0x1FC, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
751#define MX50_PAD_EPDC_GDRL__AUD6_RXFS IOMUX_PAD(0x598, 0x1FC, 4, 0x0, 0, NO_PAD_CTRL)
752
753#define MX50_PAD_EPDC_SDCLK__EPDC_SDCLK IOMUX_PAD(0x59C, 0x200, 0, 0x0, 0, NO_PAD_CTRL)
754#define MX50_PAD_EPDC_SDCLK__GPIO_3_20 IOMUX_PAD(0x59C, 0x200, 1, 0x0, 0, NO_PAD_CTRL)
755#define MX50_PAD_EPDC_SDCLK__WEIM_D20 IOMUX_PAD(0x59C, 0x200, 2, 0x0, 0, NO_PAD_CTRL)
756#define MX50_PAD_EPDC_SDCLK__ELCDIF_D20 IOMUX_PAD(0x59C, 0x200, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
757#define MX50_PAD_EPDC_SDCLK__AUD5_TXD IOMUX_PAD(0x59C, 0x200, 4, 0x0, 0, NO_PAD_CTRL)
758
759#define MX50_PAD_EPDC_SDOEZ__EPDC_SDOEZ IOMUX_PAD(0x5A0, 0x204, 0, 0x0, 0, NO_PAD_CTRL)
760#define MX50_PAD_EPDC_SDOEZ__GPIO_3_21 IOMUX_PAD(0x5A0, 0x204, 1, 0x0, 0, NO_PAD_CTRL)
761#define MX50_PAD_EPDC_SDOEZ__WEIM_D21 IOMUX_PAD(0x5A0, 0x204, 2, 0x0, 0, NO_PAD_CTRL)
762#define MX50_PAD_EPDC_SDOEZ__ELCDIF_D21 IOMUX_PAD(0x5A0, 0x204, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
763#define MX50_PAD_EPDC_SDOEZ__AUD5_TXC IOMUX_PAD(0x5A0, 0x204, 4, 0x0, 0, NO_PAD_CTRL)
764
765#define MX50_PAD_EPDC_SDOED__EPDC_SDOED IOMUX_PAD(0x5A4, 0x208, 0, 0x0, 0, NO_PAD_CTRL)
766#define MX50_PAD_EPDC_SDOED__GPIO_3_22 IOMUX_PAD(0x5A4, 0x208, 1, 0x0, 0, NO_PAD_CTRL)
767#define MX50_PAD_EPDC_SDOED__WEIM_D22 IOMUX_PAD(0x5A4, 0x208, 2, 0x0, 0, NO_PAD_CTRL)
768#define MX50_PAD_EPDC_SDOED__ELCDIF_D22 IOMUX_PAD(0x5A4, 0x208, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
769#define MX50_PAD_EPDC_SDOED__AUD5_TXFS IOMUX_PAD(0x5A4, 0x208, 4, 0x0, 0, NO_PAD_CTRL)
770
771#define MX50_PAD_EPDC_SDOE__EPDC_SDOE IOMUX_PAD(0x5A8, 0x20C, 0, 0x0, 0, NO_PAD_CTRL)
772#define MX50_PAD_EPDC_SDOE__GPIO_3_23 IOMUX_PAD(0x5A8, 0x20C, 1, 0x0, 0, NO_PAD_CTRL)
773#define MX50_PAD_EPDC_SDOE__WEIM_D23 IOMUX_PAD(0x5A8, 0x20C, 2, 0x0, 0, NO_PAD_CTRL)
774#define MX50_PAD_EPDC_SDOE__ELCDIF_D23 IOMUX_PAD(0x5A8, 0x20C, 3, 0x0, 0, MX50_ELCDIF_PAD_CTRL)
775#define MX50_PAD_EPDC_SDOE__AUD5_RXD IOMUX_PAD(0x5A8, 0x20C, 4, 0x0, 0, NO_PAD_CTRL)
776
777#define MX50_PAD_EPDC_SDLE__EPDC_SDLE IOMUX_PAD(0x5AC, 0x210, 0, 0x0, 0, NO_PAD_CTRL)
778#define MX50_PAD_EPDC_SDLE__GPIO_3_24 IOMUX_PAD(0x5AC, 0x210, 1, 0x0, 0, NO_PAD_CTRL)
779#define MX50_PAD_EPDC_SDLE__WEIM_D24 IOMUX_PAD(0x5AC, 0x210, 2, 0x0, 0, NO_PAD_CTRL)
780#define MX50_PAD_EPDC_SDLE__ELCDIF_D8 IOMUX_PAD(0x5AC, 0x210, 3, 0x71c, 1, MX50_ELCDIF_PAD_CTRL)
781#define MX50_PAD_EPDC_SDLE__AUD5_RXC IOMUX_PAD(0x5AC, 0x210, 4, 0x0, 0, NO_PAD_CTRL)
782
783#define MX50_PAD_EPDC_SDCLKN__EPDC_SDCLKN IOMUX_PAD(0x5B0, 0x214, 0, 0x0, 0, NO_PAD_CTRL)
784#define MX50_PAD_EPDC_SDCLKN__GPIO_3_25 IOMUX_PAD(0x5B0, 0x214, 1, 0x0, 0, NO_PAD_CTRL)
785#define MX50_PAD_EPDC_SDCLKN__WEIM_D25 IOMUX_PAD(0x5B0, 0x214, 2, 0x0, 0, NO_PAD_CTRL)
786#define MX50_PAD_EPDC_SDCLKN__ELCDIF_D9 IOMUX_PAD(0x5B0, 0x214, 3, 0x720, 1, MX50_ELCDIF_PAD_CTRL)
787#define MX50_PAD_EPDC_SDCLKN__AUD5_RXFS IOMUX_PAD(0x5B0, 0x214, 4, 0x0, 0, NO_PAD_CTRL)
788
789#define MX50_PAD_EPDC_SDSHR__EPDC_SDSHR IOMUX_PAD(0x5B4, 0x218, 0, 0x0, 0, NO_PAD_CTRL)
790#define MX50_PAD_EPDC_SDSHR__GPIO_3_26 IOMUX_PAD(0x5B4, 0x218, 1, 0x0, 0, NO_PAD_CTRL)
791#define MX50_PAD_EPDC_SDSHR__WEIM_D26 IOMUX_PAD(0x5B4, 0x218, 2, 0x0, 0, NO_PAD_CTRL)
792#define MX50_PAD_EPDC_SDSHR__ELCDIF_D10 IOMUX_PAD(0x5B4, 0x218, 3, 0x724, 1, MX50_ELCDIF_PAD_CTRL)
793#define MX50_PAD_EPDC_SDSHR__AUD4_TXD IOMUX_PAD(0x5B4, 0x218, 4, 0x6c8, 1, NO_PAD_CTRL)
794
795#define MX50_PAD_EPDC_PWRCOM__EPDC_PWRCOM IOMUX_PAD(0x5B8, 0x21C, 0, 0x0, 0, NO_PAD_CTRL)
796#define MX50_PAD_EPDC_PWRCOM__GPIO_3_27 IOMUX_PAD(0x5B8, 0x21C, 1, 0x0, 0, NO_PAD_CTRL)
797#define MX50_PAD_EPDC_PWRCOM__WEIM_D27 IOMUX_PAD(0x5B8, 0x21C, 2, 0x0, 0, NO_PAD_CTRL)
798#define MX50_PAD_EPDC_PWRCOM__ELCDIF_D11 IOMUX_PAD(0x5B8, 0x21C, 3, 0x728, 1, MX50_ELCDIF_PAD_CTRL)
799#define MX50_PAD_EPDC_PWRCOM__AUD4_TXC IOMUX_PAD(0x5B8, 0x21C, 4, 0x6d4, 1, NO_PAD_CTRL)
800
801#define MX50_PAD_EPDC_PWRSTAT__EPDC_PWRSTAT IOMUX_PAD(0x5BC, 0x220, 0, 0x0, 0, NO_PAD_CTRL)
802#define MX50_PAD_EPDC_PWRSTAT__GPIO_3_28 IOMUX_PAD(0x5BC, 0x220, 1, 0x0, 0, NO_PAD_CTRL)
803#define MX50_PAD_EPDC_PWRSTAT__WEIM_D28 IOMUX_PAD(0x5BC, 0x220, 2, 0x0, 0, NO_PAD_CTRL)
804#define MX50_PAD_EPDC_PWRSTAT__ELCDIF_D12 IOMUX_PAD(0x5BC, 0x220, 3, 0x72c, 1, MX50_ELCDIF_PAD_CTRL)
805#define MX50_PAD_EPDC_PWRSTAT__AUD4_TXFS IOMUX_PAD(0x5BC, 0x220, 4, 0x6d8, 1, NO_PAD_CTRL)
806
807#define MX50_PAD_EPDC_PWRCTRL0__EPDC_PWRCTRL0 IOMUX_PAD(0x5C0, 0x224, 0, 0x0, 0, NO_PAD_CTRL)
808#define MX50_PAD_EPDC_PWRCTRL0__GPIO_3_29 IOMUX_PAD(0x5C0, 0x224, 1, 0x0, 0, NO_PAD_CTRL)
809#define MX50_PAD_EPDC_PWRCTRL0__WEIM_D29 IOMUX_PAD(0x5C0, 0x224, 2, 0x0, 0, NO_PAD_CTRL)
810#define MX50_PAD_EPDC_PWRCTRL0__ELCDIF_D13 IOMUX_PAD(0x5C0, 0x224, 3, 0x730, 1, MX50_ELCDIF_PAD_CTRL)
811#define MX50_PAD_EPDC_PWRCTRL0__AUD4_RXD IOMUX_PAD(0x5C0, 0x224, 4, 0x6c4, 1, NO_PAD_CTRL)
812
813#define MX50_PAD_EPDC_PWRCTRL1__EPDC_PWRCTRL1 IOMUX_PAD(0x5C4, 0x228, 0, 0x0, 0, NO_PAD_CTRL)
814#define MX50_PAD_EPDC_PWRCTRL1__GPIO_3_30 IOMUX_PAD(0x5C4, 0x228, 1, 0x0, 0, NO_PAD_CTRL)
815#define MX50_PAD_EPDC_PWRCTRL1__WEIM_D30 IOMUX_PAD(0x5C4, 0x228, 2, 0x0, 0, NO_PAD_CTRL)
816#define MX50_PAD_EPDC_PWRCTRL1__ELCDIF_D14 IOMUX_PAD(0x5C4, 0x228, 3, 0x734, 1, MX50_ELCDIF_PAD_CTRL)
817#define MX50_PAD_EPDC_PWRCTRL1__AUD4_RXC IOMUX_PAD(0x5C4, 0x228, 4, 0x6cc, 1, NO_PAD_CTRL)
818
819#define MX50_PAD_EPDC_PWRCTRL2__EPDC_PWRCTRL2 IOMUX_PAD(0x5C8, 0x22C, 0, 0x0, 0, NO_PAD_CTRL)
820#define MX50_PAD_EPDC_PWRCTRL2__GPIO_3_31 IOMUX_PAD(0x5C8, 0x22C, 1, 0x0, 0, NO_PAD_CTRL)
821#define MX50_PAD_EPDC_PWRCTRL2__WEIM_D31 IOMUX_PAD(0x5C8, 0x22C, 2, 0x0, 0, NO_PAD_CTRL)
822#define MX50_PAD_EPDC_PWRCTRL2__ELCDIF_D15 IOMUX_PAD(0x5C8, 0x22C, 3, 0x738, 1, MX50_ELCDIF_PAD_CTRL)
823#define MX50_PAD_EPDC_PWRCTRL2__AUD4_RXFS IOMUX_PAD(0x5C8, 0x22C, 4, 0x6d0, 1, NO_PAD_CTRL)
824#define MX50_PAD_EPDC_PWRCTRL2__SDMA_EXT0 IOMUX_PAD(0x5C8, 0x22C, 6, 0x7b8, 1, NO_PAD_CTRL)
825
826#define MX50_PAD_EPDC_PWRCTRL3__PWRCTRL3 IOMUX_PAD(0x5CC, 0x230, 0, 0x0, 0, NO_PAD_CTRL)
827#define MX50_PAD_EPDC_PWRCTRL3__GPIO_4_20 IOMUX_PAD(0x5CC, 0x230, 1, 0x0, 0, NO_PAD_CTRL)
828#define MX50_PAD_EPDC_PWRCTRL3__WEIM_EB2 IOMUX_PAD(0x5CC, 0x230, 2, 0x0, 0, NO_PAD_CTRL)
829#define MX50_PAD_EPDC_PWRCTRL3__SDMA_EXT1 IOMUX_PAD(0x5CC, 0x230, 6, 0x7bc, 1, NO_PAD_CTRL)
830
831#define MX50_PAD_EPDC_VCOM0__EPDC_VCOM0 IOMUX_PAD(0x5D0, 0x234, 0, 0x0, 0, NO_PAD_CTRL)
832#define MX50_PAD_EPDC_VCOM0__GPIO_4_21 IOMUX_PAD(0x5D0, 0x234, 1, 0x0, 0, NO_PAD_CTRL)
833#define MX50_PAD_EPDC_VCOM0__WEIM_EB3 IOMUX_PAD(0x5D0, 0x234, 2, 0x0, 0, NO_PAD_CTRL)
834
835#define MX50_PAD_EPDC_VCOM1__EPDC_VCOM1 IOMUX_PAD(0x5D4, 0x238, 0, 0x0, 0, NO_PAD_CTRL)
836#define MX50_PAD_EPDC_VCOM1__GPIO_4_22 IOMUX_PAD(0x5D4, 0x238, 1, 0x0, 0, NO_PAD_CTRL)
837#define MX50_PAD_EPDC_VCOM1__WEIM_CS3 IOMUX_PAD(0x5D4, 0x238, 2, 0x0, 0, NO_PAD_CTRL)
838
839#define MX50_PAD_EPDC_BDR0__EPDC_BDR0 IOMUX_PAD(0x5D8, 0x23C, 0, 0x0, 0, NO_PAD_CTRL)
840#define MX50_PAD_EPDC_BDR0__GPIO_4_23 IOMUX_PAD(0x5D8, 0x23C, 1, 0x0, 0, NO_PAD_CTRL)
841#define MX50_PAD_EPDC_BDR0__ELCDIF_D7 IOMUX_PAD(0x5D8, 0x23C, 3, 0x718, 1, MX50_ELCDIF_PAD_CTRL)
842
843#define MX50_PAD_EPDC_BDR1__EPDC_BDR1 IOMUX_PAD(0x5DC, 0x240, 0, 0x0, 0, NO_PAD_CTRL)
844#define MX50_PAD_EPDC_BDR1__GPIO_4_24 IOMUX_PAD(0x5DC, 0x240, 1, 0x0, 0, NO_PAD_CTRL)
845#define MX50_PAD_EPDC_BDR1__ELCDIF_D6 IOMUX_PAD(0x5DC, 0x240, 3, 0x714, 1, MX50_ELCDIF_PAD_CTRL)
846
847#define MX50_PAD_EPDC_SDCE0__EPDC_SDCE0 IOMUX_PAD(0x5E0, 0x244, 0, 0x0, 0, NO_PAD_CTRL)
848#define MX50_PAD_EPDC_SDCE0__GPIO_4_25 IOMUX_PAD(0x5E0, 0x244, 1, 0x0, 0, NO_PAD_CTRL)
849#define MX50_PAD_EPDC_SDCE0__ELCDIF_D5 IOMUX_PAD(0x5E0, 0x244, 3, 0x710, 1, MX50_ELCDIF_PAD_CTRL)
850
851#define MX50_PAD_EPDC_SDCE1__EPDC_SDCE1 IOMUX_PAD(0x5E4, 0x248, 0, 0x0, 0, NO_PAD_CTRL)
852#define MX50_PAD_EPDC_SDCE1__GPIO_4_26 IOMUX_PAD(0x5E4, 0x248, 1, 0x0, 0, NO_PAD_CTRL)
853#define MX50_PAD_EPDC_SDCE1__ELCDIF_D4 IOMUX_PAD(0x5E4, 0x248, 2, 0x70c, 1, MX50_ELCDIF_PAD_CTRL)
854
855#define MX50_PAD_EPDC_SDCE2__EPDC_SDCE2 IOMUX_PAD(0x5E8, 0x24C, 0, 0x0, 0, NO_PAD_CTRL)
856#define MX50_PAD_EPDC_SDCE2__GPIO_4_27 IOMUX_PAD(0x5E8, 0x24C, 1, 0x0, 0, NO_PAD_CTRL)
857#define MX50_PAD_EPDC_SDCE2__ELCDIF_DAT3 IOMUX_PAD(0x5E8, 0x24C, 3, 0x708, 1, MX50_ELCDIF_PAD_CTRL)
858
859#define MX50_PAD_EPDC_SDCE3__EPDC_SDCE3 IOMUX_PAD(0x5EC, 0x250, 0, 0x0, 0, NO_PAD_CTRL)
860#define MX50_PAD_EPDC_SDCE3__GPIO_4_28 IOMUX_PAD(0x5EC, 0x250, 1, 0x0, 0, NO_PAD_CTRL)
861#define MX50_PAD_EPDC_SDCE3__ELCDIF_D2 IOMUX_PAD(0x5EC, 0x250, 3, 0x704, 1, MX50_ELCDIF_PAD_CTRL)
862
863#define MX50_PAD_EPDC_SDCE4__EPDC_SDCE4 IOMUX_PAD(0x5F0, 0x254, 0, 0x0, 0, NO_PAD_CTRL)
864#define MX50_PAD_EPDC_SDCE4__GPIO_4_29 IOMUX_PAD(0x5F0, 0x254, 1, 0x0, 0, NO_PAD_CTRL)
865#define MX50_PAD_EPDC_SDCE4__ELCDIF_D1 IOMUX_PAD(0x5F0, 0x254, 3, 0x700, 1, MX50_ELCDIF_PAD_CTRL)
866
867#define MX50_PAD_EPDC_SDCE5__EPDC_SDCE5 IOMUX_PAD(0x5F4, 0x258, 0, 0x0, 0, NO_PAD_CTRL)
868#define MX50_PAD_EPDC_SDCE5__GPIO_4_30 IOMUX_PAD(0x5F4, 0x258, 1, 0x0, 0, NO_PAD_CTRL)
869#define MX50_PAD_EPDC_SDCE5__ELCDIF_D0 IOMUX_PAD(0x5F4, 0x258, 3, 0x6fc, 1, MX50_ELCDIF_PAD_CTRL)
870
871#define MX50_PAD_EIM_DA0__WEIM_A0 IOMUX_PAD(0x5F8, 0x25C, 0, 0x0, 0, NO_PAD_CTRL)
872#define MX50_PAD_EIM_DA0__GPIO_1_0 IOMUX_PAD(0x5F8, 0x25C, 1, 0x0, 0, NO_PAD_CTRL)
873#define MX50_PAD_EIM_DA0__KEY_COL4 IOMUX_PAD(0x5f8, 0x25C, 3, 0x790, 2, NO_PAD_CTRL)
874
875#define MX50_PAD_EIM_DA1__WEIM_A1 IOMUX_PAD(0x5FC, 0x260, 0, 0x0, 0, NO_PAD_CTRL)
876#define MX50_PAD_EIM_DA1__GPIO_1_1 IOMUX_PAD(0x5FC, 0x260, 1, 0x0, 0, NO_PAD_CTRL)
877#define MX50_PAD_EIM_DA1__KEY_ROW4 IOMUX_PAD(0x5fc, 0x260, 3, 0x7a0, 2, MX50_KEYPAD_CTRL)
878
879#define MX50_PAD_EIM_DA2__WEIM_A2 IOMUX_PAD(0x600, 0x264, 0, 0x0, 0, NO_PAD_CTRL)
880#define MX50_PAD_EIM_DA2__GPIO_1_2 IOMUX_PAD(0x600, 0x264, 1, 0x0, 0, NO_PAD_CTRL)
881#define MX50_PAD_EIM_DA2__KEY_COL5 IOMUX_PAD(0x600, 0x264, 3, 0x794, 2, NO_PAD_CTRL)
882
883#define MX50_PAD_EIM_DA3__WEIM_A3 IOMUX_PAD(0x604, 0x268, 0, 0x0, 0, NO_PAD_CTRL)
884#define MX50_PAD_EIM_DA3__GPIO_1_3 IOMUX_PAD(0x604, 0x268, 1, 0x0, 0, NO_PAD_CTRL)
885#define MX50_PAD_EIM_DA3__KEY_ROW5 IOMUX_PAD(0x604, 0x268, 3, 0x7a4, 2, MX50_KEYPAD_CTRL)
886
887#define MX50_PAD_EIM_DA4__WEIM_A4 IOMUX_PAD(0x608, 0x26C, 0, 0x0, 0, NO_PAD_CTRL)
888#define MX50_PAD_EIM_DA4__GPIO_1_4 IOMUX_PAD(0x608, 0x26C, 1, 0x0, 0, NO_PAD_CTRL)
889#define MX50_PAD_EIM_DA4__KEY_COL6 IOMUX_PAD(0x608, 0x26C, 3, 0x798, 2, NO_PAD_CTRL)
890
891#define MX50_PAD_EIM_DA5__WEIM_A5 IOMUX_PAD(0x60C, 0x270, 0, 0x0, 0, NO_PAD_CTRL)
892#define MX50_PAD_EIM_DA5__GPIO_1_5 IOMUX_PAD(0x60C, 0x270, 1, 0x0, 0, NO_PAD_CTRL)
893#define MX50_PAD_EIM_DA5__KEY_ROW6 IOMUX_PAD(0x60C, 0x270, 3, 0x7a8, 2, MX50_KEYPAD_CTRL)
894
895#define MX50_PAD_EIM_DA6__WEIM_A6 IOMUX_PAD(0x610, 0x274, 0, 0x0, 0, NO_PAD_CTRL)
896#define MX50_PAD_EIM_DA6__GPIO_1_6 IOMUX_PAD(0x610, 0x274, 1, 0x0, 0, NO_PAD_CTRL)
897#define MX50_PAD_EIM_DA6__KEY_COL7 IOMUX_PAD(0x610, 0x274, 3, 0x79c, 2, NO_PAD_CTRL)
898
899#define MX50_PAD_EIM_DA7__WEIM_A7 IOMUX_PAD(0x614, 0x278, 0, 0x0, 0, NO_PAD_CTRL)
900#define MX50_PAD_EIM_DA7__GPIO_1_7 IOMUX_PAD(0x614, 0x278, 1, 0x0, 0, NO_PAD_CTRL)
901#define MX50_PAD_EIM_DA7__KEY_ROW7 IOMUX_PAD(0x614, 0x278, 3, 0x7ac, 2, MX50_KEYPAD_CTRL)
902
903#define MX50_PAD_EIM_DA8__WEIM_A8 IOMUX_PAD(0x618, 0x27C, 0, 0x0, 0, NO_PAD_CTRL)
904#define MX50_PAD_EIM_DA8__GPIO_1_8 IOMUX_PAD(0x618, 0x27C, 1, 0x0, 0, NO_PAD_CTRL)
905#define MX50_PIN_EIM_DA8__NANDF_CLE IOMUX_PAD(0x618, 0x27C, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
906
907#define MX50_PAD_EIM_DA9__WEIM_A9 IOMUX_PAD(0x61C, 0x280, 0, 0x0, 0, NO_PAD_CTRL)
908#define MX50_PAD_EIM_DA9__GPIO_1_9 IOMUX_PAD(0x61C, 0x280, 1, 0x0, 0, NO_PAD_CTRL)
909#define MX50_PIN_EIM_DA9__NANDF_ALE IOMUX_PAD(0x61C, 0x280, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
910
911#define MX50_PAD_EIM_DA10__WEIM_A10 IOMUX_PAD(0x620, 0x284, 0, 0x0, 0, NO_PAD_CTRL)
912#define MX50_PAD_EIM_DA10__GPIO_1_10 IOMUX_PAD(0x620, 0x284, 1, 0x0, 0, NO_PAD_CTRL)
913#define MX50_PIN_EIM_DA10__NANDF_CE0 IOMUX_PAD(0x620, 0x284, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
914
915#define MX50_PAD_EIM_DA11__WEIM_A11 IOMUX_PAD(0x624, 0x288, 0, 0x0, 0, NO_PAD_CTRL)
916#define MX50_PAD_EIM_DA11__GPIO_1_11 IOMUX_PAD(0x624, 0x288, 1, 0x0, 0, NO_PAD_CTRL)
917#define MX50_PIN_EIM_DA11__NANDF_CE1 IOMUX_PAD(0x624, 0x288, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
918
919#define MX50_PAD_EIM_DA12__WEIM_A12 IOMUX_PAD(0x628, 0x28C, 0, 0x0, 0, NO_PAD_CTRL)
920#define MX50_PAD_EIM_DA12__GPIO_1_12 IOMUX_PAD(0x628, 0x28C, 1, 0x0, 0, NO_PAD_CTRL)
921#define MX50_PIN_EIM_DA12__NANDF_CE2 IOMUX_PAD(0x628, 0x28C, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
922#define MX50_PAD_EIM_DA12__EPDC_SDCE6 IOMUX_PAD(0x628, 0x28C, 3, 0x0, 0, NO_PAD_CTRL)
923
924#define MX50_PAD_EIM_DA13__WEIM_A13 IOMUX_PAD(0x62C, 0x290, 0, 0x0, 0, NO_PAD_CTRL)
925#define MX50_PAD_EIM_DA13__GPIO_1_13 IOMUX_PAD(0x62C, 0x290, 1, 0x0, 0, NO_PAD_CTRL)
926#define MX50_PIN_EIM_DA13__NANDF_CE3 IOMUX_PAD(0x62C, 0x290, 2, 0x0, 0, PAD_CTL_DSE_HIGH)
927#define MX50_PIN_EIM_DA13__EPDC_SDCE7 IOMUX_PAD(0x62C, 0x290, 3, 0x0, 0, NO_PAD_CTRL)
928
929#define MX50_PAD_EIM_DA14__WEIM_A14 IOMUX_PAD(0x630, 0x294, 0, 0x0, 0, NO_PAD_CTRL)
930#define MX50_PAD_EIM_DA14__GPIO_1_14 IOMUX_PAD(0x630, 0x294, 1, 0x0, 0, NO_PAD_CTRL)
931#define MX50_PAD_EIM_DA14__NANDF_READY IOMUX_PAD(0x630, 0x294, 2, 0x7B4, 2, PAD_CTL_PKE | \
932 PAD_CTL_PUE | PAD_CTL_PUS_100K_UP)
933#define MX50_PAD_EIM_DA14__EPDC_SDCE8 IOMUX_PAD(0x630, 0x294, 3, 0x0, 0, NO_PAD_CTRL)
934
935#define MX50_PAD_EIM_DA15__WEIM_A15 IOMUX_PAD(0x634, 0x298, 0, 0x0, 0, NO_PAD_CTRL)
936#define MX50_PAD_EIM_DA15__GPIO_1_15 IOMUX_PAD(0x634, 0x298, 1, 0x0, 0, NO_PAD_CTRL)
937#define MX50_PIN_EIM_DA15__NANDF_DQS IOMUX_PAD(0x634, 0x298, 2, 0x7B0, 2, PAD_CTL_DSE_HIGH)
938#define MX50_PAD_EIM_DA15__EPDC_SDCE9 IOMUX_PAD(0x634, 0x298, 3, 0x0, 0, NO_PAD_CTRL)
939
940#define MX50_PAD_EIM_CS2__WEIM_CS2 IOMUX_PAD(0x638, 0x29C, 0, 0x0, 0, NO_PAD_CTRL)
941#define MX50_PAD_EIM_CS2__GPIO_1_16 IOMUX_PAD(0x638, 0x29C, 1, 0x0, 0, NO_PAD_CTRL)
942#define MX50_PAD_EIM_CS2__WEIM_A27 IOMUX_PAD(0x638, 0x29C, 2, 0x0, 0, NO_PAD_CTRL)
943
944#define MX50_PAD_EIM_CS1__WEIM_CS1 IOMUX_PAD(0x63C, 0x2A0, 0, 0x0, 0, NO_PAD_CTRL)
945#define MX50_PAD_EIM_CS1__GPIO_1_17 IOMUX_PAD(0x63C, 0x2A0, 1, 0x0, 0, NO_PAD_CTRL)
946
947#define MX50_PAD_EIM_CS0__WEIM_CS0 IOMUX_PAD(0x640, 0x2A4, 0, 0x0, 0, NO_PAD_CTRL)
948#define MX50_PAD_EIM_CS0__GPIO_1_18 IOMUX_PAD(0x640, 0x2A4, 1, 0x0, 0, NO_PAD_CTRL)
949
950#define MX50_PAD_EIM_EB0__WEIM_EB0 IOMUX_PAD(0x644, 0x2A8, 0, 0x0, 0, NO_PAD_CTRL)
951#define MX50_PAD_EIM_EB0__GPIO_1_19 IOMUX_PAD(0x644, 0x2A8, 1, 0x0, 0, NO_PAD_CTRL)
952
953#define MX50_PAD_EIM_EB1__WEIM_EB1 IOMUX_PAD(0x648, 0x2AC, 0, 0x0, 0, NO_PAD_CTRL)
954#define MX50_PAD_EIM_EB1__GPIO_1_20 IOMUX_PAD(0x648, 0x2AC, 1, 0x0, 0, NO_PAD_CTRL)
955
956#define MX50_PAD_EIM_WAIT__WEIM_WAIT IOMUX_PAD(0x64C, 0x2B0, 0, 0x0, 0, NO_PAD_CTRL)
957#define MX50_PAD_EIM_WAIT__GPIO_1_21 IOMUX_PAD(0x64C, 0x2B0, 1, 0x0, 0, NO_PAD_CTRL)
958
959#define MX50_PAD_EIM_BCLK__WEIM_BCLK IOMUX_PAD(0x650, 0x2B4, 0, 0x0, 0, NO_PAD_CTRL)
960#define MX50_PAD_EIM_BCLK__GPIO_1_22 IOMUX_PAD(0x650, 0x2B4, 1, 0x0, 0, NO_PAD_CTRL)
961
962#define MX50_PAD_EIM_RDY__WEIM_RDY IOMUX_PAD(0x654, 0x2B8, 0, 0x0, 0, NO_PAD_CTRL)
963#define MX50_PAD_EIM_RDY__GPIO_1_23 IOMUX_PAD(0x654, 0x2B8, 1, 0x0, 0, NO_PAD_CTRL)
964
965#define MX50_PAD_EIM_OE__WEIM_OE IOMUX_PAD(0x658, 0x2BC, 0, 0x0, 0, NO_PAD_CTRL)
966#define MX50_PAD_EIM_OE__GPIO_1_24 IOMUX_PAD(0x658, 0x2BC, 1, 0x0, 0, NO_PAD_CTRL)
967
968#define MX50_PAD_EIM_RW__WEIM_RW IOMUX_PAD(0x65C, 0x2C0, 0, 0x0, 0, NO_PAD_CTRL)
969#define MX50_PAD_EIM_RW__GPIO_1_25 IOMUX_PAD(0x65C, 0x2C0, 1, 0x0, 0, NO_PAD_CTRL)
970
971#define MX50_PAD_EIM_LBA__WEIM_LBA IOMUX_PAD(0x660, 0x2C4, 0, 0x0, 0, NO_PAD_CTRL)
972#define MX50_PAD_EIM_LBA__GPIO_1_26 IOMUX_PAD(0x660, 0x2C4, 1, 0x0, 0, NO_PAD_CTRL)
973
974#define MX50_PAD_EIM_CRE__WEIM_CRE IOMUX_PAD(0x664, 0x2C8, 0, 0x0, 0, NO_PAD_CTRL)
975#define MX50_PAD_EIM_CRE__GPIO_1_27 IOMUX_PAD(0x664, 0x2C8, 1, 0x0, 0, NO_PAD_CTRL)
976
977#endif /* __MACH_IOMUX_MX50_H__ */
diff --git a/arch/arm/mach-imx/iram.h b/arch/arm/mach-imx/iram.h
deleted file mode 100644
index 022690c33702..000000000000
--- a/arch/arm/mach-imx/iram.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301, USA.
18 */
19#include <linux/errno.h>
20
21#ifdef CONFIG_IRAM_ALLOC
22
23int __init iram_init(unsigned long base, unsigned long size);
24void __iomem *iram_alloc(unsigned int size, unsigned long *dma_addr);
25void iram_free(unsigned long dma_addr, unsigned int size);
26
27#else
28
29static inline int __init iram_init(unsigned long base, unsigned long size)
30{
31 return -ENOMEM;
32}
33
34static inline void __iomem *iram_alloc(unsigned int size, unsigned long *dma_addr)
35{
36 return NULL;
37}
38
39static inline void iram_free(unsigned long base, unsigned long size) {}
40
41#endif
diff --git a/arch/arm/mach-imx/iram_alloc.c b/arch/arm/mach-imx/iram_alloc.c
index 6c80424f678e..e05cf407db65 100644
--- a/arch/arm/mach-imx/iram_alloc.c
+++ b/arch/arm/mach-imx/iram_alloc.c
@@ -22,8 +22,7 @@
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/spinlock.h> 23#include <linux/spinlock.h>
24#include <linux/genalloc.h> 24#include <linux/genalloc.h>
25 25#include "linux/platform_data/imx-iram.h"
26#include "iram.h"
27 26
28static unsigned long iram_phys_base; 27static unsigned long iram_phys_base;
29static void __iomem *iram_virt_base; 28static void __iomem *iram_virt_base;
diff --git a/arch/arm/mach-imx/lluart.c b/arch/arm/mach-imx/lluart.c
deleted file mode 100644
index 2fdc9bf2fb5e..000000000000
--- a/arch/arm/mach-imx/lluart.c
+++ /dev/null
@@ -1,47 +0,0 @@
1/*
2 * Copyright 2011 Freescale Semiconductor, Inc.
3 * Copyright 2011 Linaro Ltd.
4 *
5 * The code contained herein is licensed under the GNU General Public
6 * License. You may obtain a copy of the GNU General Public License
7 * Version 2 or later at the following locations:
8 *
9 * http://www.opensource.org/licenses/gpl-license.html
10 * http://www.gnu.org/copyleft/gpl.html
11 */
12
13#include <linux/init.h>
14#include <asm/page.h>
15#include <asm/sizes.h>
16#include <asm/mach/map.h>
17
18#include "hardware.h"
19
20#define IMX6Q_UART1_BASE_ADDR 0x02020000
21#define IMX6Q_UART2_BASE_ADDR 0x021e8000
22#define IMX6Q_UART3_BASE_ADDR 0x021ec000
23#define IMX6Q_UART4_BASE_ADDR 0x021f0000
24#define IMX6Q_UART5_BASE_ADDR 0x021f4000
25
26/*
27 * IMX6Q_UART_BASE_ADDR is put in the middle to force the expansion
28 * of IMX6Q_UART##n##_BASE_ADDR.
29 */
30#define IMX6Q_UART_BASE_ADDR(n) IMX6Q_UART##n##_BASE_ADDR
31#define IMX6Q_UART_BASE(n) IMX6Q_UART_BASE_ADDR(n)
32#define IMX6Q_DEBUG_UART_BASE IMX6Q_UART_BASE(CONFIG_DEBUG_IMX6Q_UART_PORT)
33
34static struct map_desc imx_lluart_desc = {
35#ifdef CONFIG_DEBUG_IMX6Q_UART
36 .virtual = IMX_IO_P2V(IMX6Q_DEBUG_UART_BASE),
37 .pfn = __phys_to_pfn(IMX6Q_DEBUG_UART_BASE),
38 .length = 0x4000,
39 .type = MT_DEVICE,
40#endif
41};
42
43void __init imx_lluart_map_io(void)
44{
45 if (imx_lluart_desc.virtual)
46 iotable_init(&imx_lluart_desc, 1);
47}
diff --git a/arch/arm/mach-imx/mach-apf9328.c b/arch/arm/mach-imx/mach-apf9328.c
index 5c9bd2c66e6d..067580b2969b 100644
--- a/arch/arm/mach-imx/mach-apf9328.c
+++ b/arch/arm/mach-imx/mach-apf9328.c
@@ -137,17 +137,13 @@ static void __init apf9328_timer_init(void)
137 mx1_clocks_init(32768); 137 mx1_clocks_init(32768);
138} 138}
139 139
140static struct sys_timer apf9328_timer = {
141 .init = apf9328_timer_init,
142};
143
144MACHINE_START(APF9328, "Armadeus APF9328") 140MACHINE_START(APF9328, "Armadeus APF9328")
145 /* Maintainer: Gwenhael Goavec-Merou, ARMadeus Systems */ 141 /* Maintainer: Gwenhael Goavec-Merou, ARMadeus Systems */
146 .map_io = mx1_map_io, 142 .map_io = mx1_map_io,
147 .init_early = imx1_init_early, 143 .init_early = imx1_init_early,
148 .init_irq = mx1_init_irq, 144 .init_irq = mx1_init_irq,
149 .handle_irq = imx1_handle_irq, 145 .handle_irq = imx1_handle_irq,
150 .timer = &apf9328_timer, 146 .init_time = apf9328_timer_init,
151 .init_machine = apf9328_init, 147 .init_machine = apf9328_init,
152 .restart = mxc_restart, 148 .restart = mxc_restart,
153MACHINE_END 149MACHINE_END
diff --git a/arch/arm/mach-imx/mach-armadillo5x0.c b/arch/arm/mach-imx/mach-armadillo5x0.c
index 59bd6b06a6b5..368a6e3f5926 100644
--- a/arch/arm/mach-imx/mach-armadillo5x0.c
+++ b/arch/arm/mach-imx/mach-armadillo5x0.c
@@ -557,10 +557,6 @@ static void __init armadillo5x0_timer_init(void)
557 mx31_clocks_init(26000000); 557 mx31_clocks_init(26000000);
558} 558}
559 559
560static struct sys_timer armadillo5x0_timer = {
561 .init = armadillo5x0_timer_init,
562};
563
564MACHINE_START(ARMADILLO5X0, "Armadillo-500") 560MACHINE_START(ARMADILLO5X0, "Armadillo-500")
565 /* Maintainer: Alberto Panizzo */ 561 /* Maintainer: Alberto Panizzo */
566 .atag_offset = 0x100, 562 .atag_offset = 0x100,
@@ -568,7 +564,7 @@ MACHINE_START(ARMADILLO5X0, "Armadillo-500")
568 .init_early = imx31_init_early, 564 .init_early = imx31_init_early,
569 .init_irq = mx31_init_irq, 565 .init_irq = mx31_init_irq,
570 .handle_irq = imx31_handle_irq, 566 .handle_irq = imx31_handle_irq,
571 .timer = &armadillo5x0_timer, 567 .init_time = armadillo5x0_timer_init,
572 .init_machine = armadillo5x0_init, 568 .init_machine = armadillo5x0_init,
573 .restart = mxc_restart, 569 .restart = mxc_restart,
574MACHINE_END 570MACHINE_END
diff --git a/arch/arm/mach-imx/mach-bug.c b/arch/arm/mach-imx/mach-bug.c
index 3a39d5aec07a..2d00476f7d2c 100644
--- a/arch/arm/mach-imx/mach-bug.c
+++ b/arch/arm/mach-imx/mach-bug.c
@@ -53,16 +53,12 @@ static void __init bug_timer_init(void)
53 mx31_clocks_init(26000000); 53 mx31_clocks_init(26000000);
54} 54}
55 55
56static struct sys_timer bug_timer = {
57 .init = bug_timer_init,
58};
59
60MACHINE_START(BUG, "BugLabs BUGBase") 56MACHINE_START(BUG, "BugLabs BUGBase")
61 .map_io = mx31_map_io, 57 .map_io = mx31_map_io,
62 .init_early = imx31_init_early, 58 .init_early = imx31_init_early,
63 .init_irq = mx31_init_irq, 59 .init_irq = mx31_init_irq,
64 .handle_irq = imx31_handle_irq, 60 .handle_irq = imx31_handle_irq,
65 .timer = &bug_timer, 61 .init_time = bug_timer_init,
66 .init_machine = bug_board_init, 62 .init_machine = bug_board_init,
67 .restart = mxc_restart, 63 .restart = mxc_restart,
68MACHINE_END 64MACHINE_END
diff --git a/arch/arm/mach-imx/mach-cpuimx27.c b/arch/arm/mach-imx/mach-cpuimx27.c
index 12a370646b45..146559311bd2 100644
--- a/arch/arm/mach-imx/mach-cpuimx27.c
+++ b/arch/arm/mach-imx/mach-cpuimx27.c
@@ -309,17 +309,13 @@ static void __init eukrea_cpuimx27_timer_init(void)
309 mx27_clocks_init(26000000); 309 mx27_clocks_init(26000000);
310} 310}
311 311
312static struct sys_timer eukrea_cpuimx27_timer = {
313 .init = eukrea_cpuimx27_timer_init,
314};
315
316MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27") 312MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27")
317 .atag_offset = 0x100, 313 .atag_offset = 0x100,
318 .map_io = mx27_map_io, 314 .map_io = mx27_map_io,
319 .init_early = imx27_init_early, 315 .init_early = imx27_init_early,
320 .init_irq = mx27_init_irq, 316 .init_irq = mx27_init_irq,
321 .handle_irq = imx27_handle_irq, 317 .handle_irq = imx27_handle_irq,
322 .timer = &eukrea_cpuimx27_timer, 318 .init_time = eukrea_cpuimx27_timer_init,
323 .init_machine = eukrea_cpuimx27_init, 319 .init_machine = eukrea_cpuimx27_init,
324 .restart = mxc_restart, 320 .restart = mxc_restart,
325MACHINE_END 321MACHINE_END
diff --git a/arch/arm/mach-imx/mach-cpuimx35.c b/arch/arm/mach-imx/mach-cpuimx35.c
index 5a31bf8c8f4c..771362d1fbee 100644
--- a/arch/arm/mach-imx/mach-cpuimx35.c
+++ b/arch/arm/mach-imx/mach-cpuimx35.c
@@ -193,10 +193,6 @@ static void __init eukrea_cpuimx35_timer_init(void)
193 mx35_clocks_init(); 193 mx35_clocks_init();
194} 194}
195 195
196static struct sys_timer eukrea_cpuimx35_timer = {
197 .init = eukrea_cpuimx35_timer_init,
198};
199
200MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35") 196MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35")
201 /* Maintainer: Eukrea Electromatique */ 197 /* Maintainer: Eukrea Electromatique */
202 .atag_offset = 0x100, 198 .atag_offset = 0x100,
@@ -204,7 +200,7 @@ MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35")
204 .init_early = imx35_init_early, 200 .init_early = imx35_init_early,
205 .init_irq = mx35_init_irq, 201 .init_irq = mx35_init_irq,
206 .handle_irq = imx35_handle_irq, 202 .handle_irq = imx35_handle_irq,
207 .timer = &eukrea_cpuimx35_timer, 203 .init_time = eukrea_cpuimx35_timer_init,
208 .init_machine = eukrea_cpuimx35_init, 204 .init_machine = eukrea_cpuimx35_init,
209 .restart = mxc_restart, 205 .restart = mxc_restart,
210MACHINE_END 206MACHINE_END
diff --git a/arch/arm/mach-imx/mach-cpuimx51sd.c b/arch/arm/mach-imx/mach-cpuimx51sd.c
index b727de029c8f..9b7393234f6f 100644
--- a/arch/arm/mach-imx/mach-cpuimx51sd.c
+++ b/arch/arm/mach-imx/mach-cpuimx51sd.c
@@ -355,10 +355,6 @@ static void __init eukrea_cpuimx51sd_timer_init(void)
355 mx51_clocks_init(32768, 24000000, 22579200, 0); 355 mx51_clocks_init(32768, 24000000, 22579200, 0);
356} 356}
357 357
358static struct sys_timer mxc_timer = {
359 .init = eukrea_cpuimx51sd_timer_init,
360};
361
362MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD") 358MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
363 /* Maintainer: Eric Bénard <eric@eukrea.com> */ 359 /* Maintainer: Eric Bénard <eric@eukrea.com> */
364 .atag_offset = 0x100, 360 .atag_offset = 0x100,
@@ -366,7 +362,7 @@ MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
366 .init_early = imx51_init_early, 362 .init_early = imx51_init_early,
367 .init_irq = mx51_init_irq, 363 .init_irq = mx51_init_irq,
368 .handle_irq = imx51_handle_irq, 364 .handle_irq = imx51_handle_irq,
369 .timer = &mxc_timer, 365 .init_time = eukrea_cpuimx51sd_timer_init,
370 .init_machine = eukrea_cpuimx51sd_init, 366 .init_machine = eukrea_cpuimx51sd_init,
371 .init_late = imx51_init_late, 367 .init_late = imx51_init_late,
372 .restart = mxc_restart, 368 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
index 75027a5ad8b7..4bf454424249 100644
--- a/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
+++ b/arch/arm/mach-imx/mach-eukrea_cpuimx25.c
@@ -159,10 +159,6 @@ static void __init eukrea_cpuimx25_timer_init(void)
159 mx25_clocks_init(); 159 mx25_clocks_init();
160} 160}
161 161
162static struct sys_timer eukrea_cpuimx25_timer = {
163 .init = eukrea_cpuimx25_timer_init,
164};
165
166MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25") 162MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25")
167 /* Maintainer: Eukrea Electromatique */ 163 /* Maintainer: Eukrea Electromatique */
168 .atag_offset = 0x100, 164 .atag_offset = 0x100,
@@ -170,7 +166,7 @@ MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25")
170 .init_early = imx25_init_early, 166 .init_early = imx25_init_early,
171 .init_irq = mx25_init_irq, 167 .init_irq = mx25_init_irq,
172 .handle_irq = imx25_handle_irq, 168 .handle_irq = imx25_handle_irq,
173 .timer = &eukrea_cpuimx25_timer, 169 .init_time = eukrea_cpuimx25_timer_init,
174 .init_machine = eukrea_cpuimx25_init, 170 .init_machine = eukrea_cpuimx25_init,
175 .restart = mxc_restart, 171 .restart = mxc_restart,
176MACHINE_END 172MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
index 318bd8df7fcc..29ac8ee651d2 100644
--- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
+++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c
@@ -598,10 +598,6 @@ static void __init visstrim_m10_timer_init(void)
598 mx27_clocks_init((unsigned long)25000000); 598 mx27_clocks_init((unsigned long)25000000);
599} 599}
600 600
601static struct sys_timer visstrim_m10_timer = {
602 .init = visstrim_m10_timer_init,
603};
604
605MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10") 601MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10")
606 .atag_offset = 0x100, 602 .atag_offset = 0x100,
607 .reserve = visstrim_reserve, 603 .reserve = visstrim_reserve,
@@ -609,7 +605,7 @@ MACHINE_START(IMX27_VISSTRIM_M10, "Vista Silicon Visstrim_M10")
609 .init_early = imx27_init_early, 605 .init_early = imx27_init_early,
610 .init_irq = mx27_init_irq, 606 .init_irq = mx27_init_irq,
611 .handle_irq = imx27_handle_irq, 607 .handle_irq = imx27_handle_irq,
612 .timer = &visstrim_m10_timer, 608 .init_time = visstrim_m10_timer_init,
613 .init_machine = visstrim_m10_board_init, 609 .init_machine = visstrim_m10_board_init,
614 .restart = mxc_restart, 610 .restart = mxc_restart,
615MACHINE_END 611MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx27ipcam.c b/arch/arm/mach-imx/mach-imx27ipcam.c
index 53a860112938..1a851aea6832 100644
--- a/arch/arm/mach-imx/mach-imx27ipcam.c
+++ b/arch/arm/mach-imx/mach-imx27ipcam.c
@@ -65,10 +65,6 @@ static void __init mx27ipcam_timer_init(void)
65 mx27_clocks_init(25000000); 65 mx27_clocks_init(25000000);
66} 66}
67 67
68static struct sys_timer mx27ipcam_timer = {
69 .init = mx27ipcam_timer_init,
70};
71
72MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM") 68MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM")
73 /* maintainer: Freescale Semiconductor, Inc. */ 69 /* maintainer: Freescale Semiconductor, Inc. */
74 .atag_offset = 0x100, 70 .atag_offset = 0x100,
@@ -76,7 +72,7 @@ MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM")
76 .init_early = imx27_init_early, 72 .init_early = imx27_init_early,
77 .init_irq = mx27_init_irq, 73 .init_irq = mx27_init_irq,
78 .handle_irq = imx27_handle_irq, 74 .handle_irq = imx27_handle_irq,
79 .timer = &mx27ipcam_timer, 75 .init_time = mx27ipcam_timer_init,
80 .init_machine = mx27ipcam_init, 76 .init_machine = mx27ipcam_init,
81 .restart = mxc_restart, 77 .restart = mxc_restart,
82MACHINE_END 78MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx27lite.c b/arch/arm/mach-imx/mach-imx27lite.c
index fc8dce931378..3da2e3e44ce9 100644
--- a/arch/arm/mach-imx/mach-imx27lite.c
+++ b/arch/arm/mach-imx/mach-imx27lite.c
@@ -72,17 +72,13 @@ static void __init mx27lite_timer_init(void)
72 mx27_clocks_init(26000000); 72 mx27_clocks_init(26000000);
73} 73}
74 74
75static struct sys_timer mx27lite_timer = {
76 .init = mx27lite_timer_init,
77};
78
79MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE") 75MACHINE_START(IMX27LITE, "LogicPD i.MX27LITE")
80 .atag_offset = 0x100, 76 .atag_offset = 0x100,
81 .map_io = mx27_map_io, 77 .map_io = mx27_map_io,
82 .init_early = imx27_init_early, 78 .init_early = imx27_init_early,
83 .init_irq = mx27_init_irq, 79 .init_irq = mx27_init_irq,
84 .handle_irq = imx27_handle_irq, 80 .handle_irq = imx27_handle_irq,
85 .timer = &mx27lite_timer, 81 .init_time = mx27lite_timer_init,
86 .init_machine = mx27lite_init, 82 .init_machine = mx27lite_init,
87 .restart = mxc_restart, 83 .restart = mxc_restart,
88MACHINE_END 84MACHINE_END
diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c
index 860284dea0e7..f579c616feed 100644
--- a/arch/arm/mach-imx/mach-imx53.c
+++ b/arch/arm/mach-imx/mach-imx53.c
@@ -44,26 +44,22 @@ static void __init imx53_dt_init(void)
44 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 44 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
45} 45}
46 46
47static void __init imx53_timer_init(void)
48{
49 mx53_clocks_init_dt();
50}
51
52static struct sys_timer imx53_timer = {
53 .init = imx53_timer_init,
54};
55
56static const char *imx53_dt_board_compat[] __initdata = { 47static const char *imx53_dt_board_compat[] __initdata = {
57 "fsl,imx53", 48 "fsl,imx53",
58 NULL 49 NULL
59}; 50};
60 51
52static void __init imx53_timer_init(void)
53{
54 mx53_clocks_init_dt();
55}
56
61DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)") 57DT_MACHINE_START(IMX53_DT, "Freescale i.MX53 (Device Tree Support)")
62 .map_io = mx53_map_io, 58 .map_io = mx53_map_io,
63 .init_early = imx53_init_early, 59 .init_early = imx53_init_early,
64 .init_irq = mx53_init_irq, 60 .init_irq = mx53_init_irq,
65 .handle_irq = imx53_handle_irq, 61 .handle_irq = imx53_handle_irq,
66 .timer = &imx53_timer, 62 .init_time = imx53_timer_init,
67 .init_machine = imx53_dt_init, 63 .init_machine = imx53_dt_init,
68 .init_late = imx53_init_late, 64 .init_late = imx53_init_late,
69 .dt_compat = imx53_dt_board_compat, 65 .dt_compat = imx53_dt_board_compat,
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 4eb1b3ac794c..5a18e7e5c564 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,8 +30,8 @@
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/map.h>
34#include <asm/mach/time.h> 35#include <asm/mach/time.h>
35#include <asm/system_misc.h> 36#include <asm/system_misc.h>
36 37
@@ -216,22 +217,16 @@ static void __init imx6q_init_late(void)
216 217
217static void __init imx6q_map_io(void) 218static void __init imx6q_map_io(void)
218{ 219{
219 imx_lluart_map_io(); 220 debug_ll_io_init();
220 imx_scu_map_io(); 221 imx_scu_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)
@@ -241,10 +236,6 @@ static void __init imx6q_timer_init(void)
241 imx_print_silicon_rev("i.MX6Q", imx6q_revision()); 236 imx_print_silicon_rev("i.MX6Q", imx6q_revision());
242} 237}
243 238
244static struct sys_timer imx6q_timer = {
245 .init = imx6q_timer_init,
246};
247
248static const char *imx6q_dt_compat[] __initdata = { 239static const char *imx6q_dt_compat[] __initdata = {
249 "fsl,imx6q", 240 "fsl,imx6q",
250 NULL, 241 NULL,
@@ -254,8 +245,7 @@ DT_MACHINE_START(IMX6Q, "Freescale i.MX6 Quad (Device Tree)")
254 .smp = smp_ops(imx_smp_ops), 245 .smp = smp_ops(imx_smp_ops),
255 .map_io = imx6q_map_io, 246 .map_io = imx6q_map_io,
256 .init_irq = imx6q_init_irq, 247 .init_irq = imx6q_init_irq,
257 .handle_irq = imx6q_handle_irq, 248 .init_time = imx6q_timer_init,
258 .timer = &imx6q_timer,
259 .init_machine = imx6q_init_machine, 249 .init_machine = imx6q_init_machine,
260 .init_late = imx6q_init_late, 250 .init_late = imx6q_init_late,
261 .dt_compat = imx6q_dt_compat, 251 .dt_compat = imx6q_dt_compat,
diff --git a/arch/arm/mach-imx/mach-kzm_arm11_01.c b/arch/arm/mach-imx/mach-kzm_arm11_01.c
index 2e536ea53444..c7bc41d6b468 100644
--- a/arch/arm/mach-imx/mach-kzm_arm11_01.c
+++ b/arch/arm/mach-imx/mach-kzm_arm11_01.c
@@ -284,17 +284,13 @@ static void __init kzm_timer_init(void)
284 mx31_clocks_init(26000000); 284 mx31_clocks_init(26000000);
285} 285}
286 286
287static struct sys_timer kzm_timer = {
288 .init = kzm_timer_init,
289};
290
291MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01") 287MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01")
292 .atag_offset = 0x100, 288 .atag_offset = 0x100,
293 .map_io = kzm_map_io, 289 .map_io = kzm_map_io,
294 .init_early = imx31_init_early, 290 .init_early = imx31_init_early,
295 .init_irq = mx31_init_irq, 291 .init_irq = mx31_init_irq,
296 .handle_irq = imx31_handle_irq, 292 .handle_irq = imx31_handle_irq,
297 .timer = &kzm_timer, 293 .init_time = kzm_timer_init,
298 .init_machine = kzm_board_init, 294 .init_machine = kzm_board_init,
299 .restart = mxc_restart, 295 .restart = mxc_restart,
300MACHINE_END 296MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx1ads.c b/arch/arm/mach-imx/mach-mx1ads.c
index 06b483783e68..9f883e4d6fc9 100644
--- a/arch/arm/mach-imx/mach-mx1ads.c
+++ b/arch/arm/mach-imx/mach-mx1ads.c
@@ -132,10 +132,6 @@ static void __init mx1ads_timer_init(void)
132 mx1_clocks_init(32000); 132 mx1_clocks_init(32000);
133} 133}
134 134
135static struct sys_timer mx1ads_timer = {
136 .init = mx1ads_timer_init,
137};
138
139MACHINE_START(MX1ADS, "Freescale MX1ADS") 135MACHINE_START(MX1ADS, "Freescale MX1ADS")
140 /* Maintainer: Sascha Hauer, Pengutronix */ 136 /* Maintainer: Sascha Hauer, Pengutronix */
141 .atag_offset = 0x100, 137 .atag_offset = 0x100,
@@ -143,7 +139,7 @@ MACHINE_START(MX1ADS, "Freescale MX1ADS")
143 .init_early = imx1_init_early, 139 .init_early = imx1_init_early,
144 .init_irq = mx1_init_irq, 140 .init_irq = mx1_init_irq,
145 .handle_irq = imx1_handle_irq, 141 .handle_irq = imx1_handle_irq,
146 .timer = &mx1ads_timer, 142 .init_time = mx1ads_timer_init,
147 .init_machine = mx1ads_init, 143 .init_machine = mx1ads_init,
148 .restart = mxc_restart, 144 .restart = mxc_restart,
149MACHINE_END 145MACHINE_END
@@ -154,7 +150,7 @@ MACHINE_START(MXLADS, "Freescale MXLADS")
154 .init_early = imx1_init_early, 150 .init_early = imx1_init_early,
155 .init_irq = mx1_init_irq, 151 .init_irq = mx1_init_irq,
156 .handle_irq = imx1_handle_irq, 152 .handle_irq = imx1_handle_irq,
157 .timer = &mx1ads_timer, 153 .init_time = mx1ads_timer_init,
158 .init_machine = mx1ads_init, 154 .init_machine = mx1ads_init,
159 .restart = mxc_restart, 155 .restart = mxc_restart,
160MACHINE_END 156MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx21ads.c b/arch/arm/mach-imx/mach-mx21ads.c
index 6adb3136bb08..a06aa4dc37fc 100644
--- a/arch/arm/mach-imx/mach-mx21ads.c
+++ b/arch/arm/mach-imx/mach-mx21ads.c
@@ -318,10 +318,6 @@ static void __init mx21ads_timer_init(void)
318 mx21_clocks_init(32768, 26000000); 318 mx21_clocks_init(32768, 26000000);
319} 319}
320 320
321static struct sys_timer mx21ads_timer = {
322 .init = mx21ads_timer_init,
323};
324
325MACHINE_START(MX21ADS, "Freescale i.MX21ADS") 321MACHINE_START(MX21ADS, "Freescale i.MX21ADS")
326 /* maintainer: Freescale Semiconductor, Inc. */ 322 /* maintainer: Freescale Semiconductor, Inc. */
327 .atag_offset = 0x100, 323 .atag_offset = 0x100,
@@ -329,7 +325,7 @@ MACHINE_START(MX21ADS, "Freescale i.MX21ADS")
329 .init_early = imx21_init_early, 325 .init_early = imx21_init_early,
330 .init_irq = mx21_init_irq, 326 .init_irq = mx21_init_irq,
331 .handle_irq = imx21_handle_irq, 327 .handle_irq = imx21_handle_irq,
332 .timer = &mx21ads_timer, 328 .init_time = mx21ads_timer_init,
333 .init_machine = mx21ads_board_init, 329 .init_machine = mx21ads_board_init,
334 .restart = mxc_restart, 330 .restart = mxc_restart,
335MACHINE_END 331MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx25_3ds.c b/arch/arm/mach-imx/mach-mx25_3ds.c
index b1b03aa55bb8..8bcda688a006 100644
--- a/arch/arm/mach-imx/mach-mx25_3ds.c
+++ b/arch/arm/mach-imx/mach-mx25_3ds.c
@@ -257,10 +257,6 @@ static void __init mx25pdk_timer_init(void)
257 mx25_clocks_init(); 257 mx25_clocks_init();
258} 258}
259 259
260static struct sys_timer mx25pdk_timer = {
261 .init = mx25pdk_timer_init,
262};
263
264MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)") 260MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)")
265 /* Maintainer: Freescale Semiconductor, Inc. */ 261 /* Maintainer: Freescale Semiconductor, Inc. */
266 .atag_offset = 0x100, 262 .atag_offset = 0x100,
@@ -268,7 +264,7 @@ MACHINE_START(MX25_3DS, "Freescale MX25PDK (3DS)")
268 .init_early = imx25_init_early, 264 .init_early = imx25_init_early,
269 .init_irq = mx25_init_irq, 265 .init_irq = mx25_init_irq,
270 .handle_irq = imx25_handle_irq, 266 .handle_irq = imx25_handle_irq,
271 .timer = &mx25pdk_timer, 267 .init_time = mx25pdk_timer_init,
272 .init_machine = mx25pdk_init, 268 .init_machine = mx25pdk_init,
273 .restart = mxc_restart, 269 .restart = mxc_restart,
274MACHINE_END 270MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
index d0e547fa925f..25b3e4c9bc0a 100644
--- a/arch/arm/mach-imx/mach-mx27_3ds.c
+++ b/arch/arm/mach-imx/mach-mx27_3ds.c
@@ -538,10 +538,6 @@ static void __init mx27pdk_timer_init(void)
538 mx27_clocks_init(26000000); 538 mx27_clocks_init(26000000);
539} 539}
540 540
541static struct sys_timer mx27pdk_timer = {
542 .init = mx27pdk_timer_init,
543};
544
545MACHINE_START(MX27_3DS, "Freescale MX27PDK") 541MACHINE_START(MX27_3DS, "Freescale MX27PDK")
546 /* maintainer: Freescale Semiconductor, Inc. */ 542 /* maintainer: Freescale Semiconductor, Inc. */
547 .atag_offset = 0x100, 543 .atag_offset = 0x100,
@@ -549,7 +545,7 @@ MACHINE_START(MX27_3DS, "Freescale MX27PDK")
549 .init_early = imx27_init_early, 545 .init_early = imx27_init_early,
550 .init_irq = mx27_init_irq, 546 .init_irq = mx27_init_irq,
551 .handle_irq = imx27_handle_irq, 547 .handle_irq = imx27_handle_irq,
552 .timer = &mx27pdk_timer, 548 .init_time = mx27pdk_timer_init,
553 .init_machine = mx27pdk_init, 549 .init_machine = mx27pdk_init,
554 .restart = mxc_restart, 550 .restart = mxc_restart,
555MACHINE_END 551MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx27ads.c b/arch/arm/mach-imx/mach-mx27ads.c
index 3d036f57f0e6..9821b824dcaf 100644
--- a/arch/arm/mach-imx/mach-mx27ads.c
+++ b/arch/arm/mach-imx/mach-mx27ads.c
@@ -323,10 +323,6 @@ static void __init mx27ads_timer_init(void)
323 mx27_clocks_init(fref); 323 mx27_clocks_init(fref);
324} 324}
325 325
326static struct sys_timer mx27ads_timer = {
327 .init = mx27ads_timer_init,
328};
329
330static struct map_desc mx27ads_io_desc[] __initdata = { 326static struct map_desc mx27ads_io_desc[] __initdata = {
331 { 327 {
332 .virtual = PBC_BASE_ADDRESS, 328 .virtual = PBC_BASE_ADDRESS,
@@ -349,7 +345,7 @@ MACHINE_START(MX27ADS, "Freescale i.MX27ADS")
349 .init_early = imx27_init_early, 345 .init_early = imx27_init_early,
350 .init_irq = mx27_init_irq, 346 .init_irq = mx27_init_irq,
351 .handle_irq = imx27_handle_irq, 347 .handle_irq = imx27_handle_irq,
352 .timer = &mx27ads_timer, 348 .init_time = mx27ads_timer_init,
353 .init_machine = mx27ads_board_init, 349 .init_machine = mx27ads_board_init,
354 .restart = mxc_restart, 350 .restart = mxc_restart,
355MACHINE_END 351MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c
index bc301befdd06..1ed916175d41 100644
--- a/arch/arm/mach-imx/mach-mx31_3ds.c
+++ b/arch/arm/mach-imx/mach-mx31_3ds.c
@@ -762,10 +762,6 @@ static void __init mx31_3ds_timer_init(void)
762 mx31_clocks_init(26000000); 762 mx31_clocks_init(26000000);
763} 763}
764 764
765static struct sys_timer mx31_3ds_timer = {
766 .init = mx31_3ds_timer_init,
767};
768
769static void __init mx31_3ds_reserve(void) 765static void __init mx31_3ds_reserve(void)
770{ 766{
771 /* reserve MX31_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */ 767 /* reserve MX31_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
@@ -780,7 +776,7 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
780 .init_early = imx31_init_early, 776 .init_early = imx31_init_early,
781 .init_irq = mx31_init_irq, 777 .init_irq = mx31_init_irq,
782 .handle_irq = imx31_handle_irq, 778 .handle_irq = imx31_handle_irq,
783 .timer = &mx31_3ds_timer, 779 .init_time = mx31_3ds_timer_init,
784 .init_machine = mx31_3ds_init, 780 .init_machine = mx31_3ds_init,
785 .reserve = mx31_3ds_reserve, 781 .reserve = mx31_3ds_reserve,
786 .restart = mxc_restart, 782 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-mx31ads.c b/arch/arm/mach-imx/mach-mx31ads.c
index 8b56f8883f32..daf8889125cc 100644
--- a/arch/arm/mach-imx/mach-mx31ads.c
+++ b/arch/arm/mach-imx/mach-mx31ads.c
@@ -576,10 +576,6 @@ static void __init mx31ads_timer_init(void)
576 mx31_clocks_init(26000000); 576 mx31_clocks_init(26000000);
577} 577}
578 578
579static struct sys_timer mx31ads_timer = {
580 .init = mx31ads_timer_init,
581};
582
583MACHINE_START(MX31ADS, "Freescale MX31ADS") 579MACHINE_START(MX31ADS, "Freescale MX31ADS")
584 /* Maintainer: Freescale Semiconductor, Inc. */ 580 /* Maintainer: Freescale Semiconductor, Inc. */
585 .atag_offset = 0x100, 581 .atag_offset = 0x100,
@@ -587,7 +583,7 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS")
587 .init_early = imx31_init_early, 583 .init_early = imx31_init_early,
588 .init_irq = mx31ads_init_irq, 584 .init_irq = mx31ads_init_irq,
589 .handle_irq = imx31_handle_irq, 585 .handle_irq = imx31_handle_irq,
590 .timer = &mx31ads_timer, 586 .init_time = mx31ads_timer_init,
591 .init_machine = mx31ads_init, 587 .init_machine = mx31ads_init,
592 .restart = mxc_restart, 588 .restart = mxc_restart,
593MACHINE_END 589MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c
index 08b9965c8b36..832b1e2f964e 100644
--- a/arch/arm/mach-imx/mach-mx31lilly.c
+++ b/arch/arm/mach-imx/mach-mx31lilly.c
@@ -303,17 +303,13 @@ static void __init mx31lilly_timer_init(void)
303 mx31_clocks_init(26000000); 303 mx31_clocks_init(26000000);
304} 304}
305 305
306static struct sys_timer mx31lilly_timer = {
307 .init = mx31lilly_timer_init,
308};
309
310MACHINE_START(LILLY1131, "INCO startec LILLY-1131") 306MACHINE_START(LILLY1131, "INCO startec LILLY-1131")
311 .atag_offset = 0x100, 307 .atag_offset = 0x100,
312 .map_io = mx31_map_io, 308 .map_io = mx31_map_io,
313 .init_early = imx31_init_early, 309 .init_early = imx31_init_early,
314 .init_irq = mx31_init_irq, 310 .init_irq = mx31_init_irq,
315 .handle_irq = imx31_handle_irq, 311 .handle_irq = imx31_handle_irq,
316 .timer = &mx31lilly_timer, 312 .init_time = mx31lilly_timer_init,
317 .init_machine = mx31lilly_board_init, 313 .init_machine = mx31lilly_board_init,
318 .restart = mxc_restart, 314 .restart = mxc_restart,
319MACHINE_END 315MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c
index bdcd92e59518..bea07299b61a 100644
--- a/arch/arm/mach-imx/mach-mx31lite.c
+++ b/arch/arm/mach-imx/mach-mx31lite.c
@@ -285,10 +285,6 @@ static void __init mx31lite_timer_init(void)
285 mx31_clocks_init(26000000); 285 mx31_clocks_init(26000000);
286} 286}
287 287
288static struct sys_timer mx31lite_timer = {
289 .init = mx31lite_timer_init,
290};
291
292MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM") 288MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM")
293 /* Maintainer: Freescale Semiconductor, Inc. */ 289 /* Maintainer: Freescale Semiconductor, Inc. */
294 .atag_offset = 0x100, 290 .atag_offset = 0x100,
@@ -296,7 +292,7 @@ MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM")
296 .init_early = imx31_init_early, 292 .init_early = imx31_init_early,
297 .init_irq = mx31_init_irq, 293 .init_irq = mx31_init_irq,
298 .handle_irq = imx31_handle_irq, 294 .handle_irq = imx31_handle_irq,
299 .timer = &mx31lite_timer, 295 .init_time = mx31lite_timer_init,
300 .init_machine = mx31lite_init, 296 .init_machine = mx31lite_init,
301 .restart = mxc_restart, 297 .restart = mxc_restart,
302MACHINE_END 298MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c
index 2517cfa9f26b..dae4cd7be040 100644
--- a/arch/arm/mach-imx/mach-mx31moboard.c
+++ b/arch/arm/mach-imx/mach-mx31moboard.c
@@ -596,10 +596,6 @@ static void __init mx31moboard_timer_init(void)
596 mx31_clocks_init(26000000); 596 mx31_clocks_init(26000000);
597} 597}
598 598
599static struct sys_timer mx31moboard_timer = {
600 .init = mx31moboard_timer_init,
601};
602
603static void __init mx31moboard_reserve(void) 599static void __init mx31moboard_reserve(void)
604{ 600{
605 /* reserve 4 MiB for mx3-camera */ 601 /* reserve 4 MiB for mx3-camera */
@@ -615,7 +611,7 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
615 .init_early = imx31_init_early, 611 .init_early = imx31_init_early,
616 .init_irq = mx31_init_irq, 612 .init_irq = mx31_init_irq,
617 .handle_irq = imx31_handle_irq, 613 .handle_irq = imx31_handle_irq,
618 .timer = &mx31moboard_timer, 614 .init_time = mx31moboard_timer_init,
619 .init_machine = mx31moboard_init, 615 .init_machine = mx31moboard_init,
620 .restart = mxc_restart, 616 .restart = mxc_restart,
621MACHINE_END 617MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c
index 5277da45d60c..a42f4f07051f 100644
--- a/arch/arm/mach-imx/mach-mx35_3ds.c
+++ b/arch/arm/mach-imx/mach-mx35_3ds.c
@@ -602,10 +602,6 @@ static void __init mx35pdk_timer_init(void)
602 mx35_clocks_init(); 602 mx35_clocks_init();
603} 603}
604 604
605static struct sys_timer mx35pdk_timer = {
606 .init = mx35pdk_timer_init,
607};
608
609static void __init mx35_3ds_reserve(void) 605static void __init mx35_3ds_reserve(void)
610{ 606{
611 /* reserve MX35_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */ 607 /* reserve MX35_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
@@ -620,7 +616,7 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK")
620 .init_early = imx35_init_early, 616 .init_early = imx35_init_early,
621 .init_irq = mx35_init_irq, 617 .init_irq = mx35_init_irq,
622 .handle_irq = imx35_handle_irq, 618 .handle_irq = imx35_handle_irq,
623 .timer = &mx35pdk_timer, 619 .init_time = mx35pdk_timer_init,
624 .init_machine = mx35_3ds_init, 620 .init_machine = mx35_3ds_init,
625 .reserve = mx35_3ds_reserve, 621 .reserve = mx35_3ds_reserve,
626 .restart = mxc_restart, 622 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-mx50_rdp.c b/arch/arm/mach-imx/mach-mx50_rdp.c
deleted file mode 100644
index 0c1f88a80bdc..000000000000
--- a/arch/arm/mach-imx/mach-mx50_rdp.c
+++ /dev/null
@@ -1,225 +0,0 @@
1/*
2 * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved.
3 */
4
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 along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#include <linux/init.h>
22#include <linux/platform_device.h>
23#include <linux/gpio.h>
24#include <linux/delay.h>
25#include <linux/io.h>
26
27#include <asm/irq.h>
28#include <asm/setup.h>
29#include <asm/mach-types.h>
30#include <asm/mach/arch.h>
31#include <asm/mach/time.h>
32
33#include "common.h"
34#include "devices-imx50.h"
35#include "hardware.h"
36#include "iomux-mx50.h"
37
38#define FEC_EN IMX_GPIO_NR(6, 23)
39#define FEC_RESET_B IMX_GPIO_NR(4, 12)
40
41static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = {
42 /* SD1 */
43 MX50_PAD_ECSPI2_SS0__GPIO_4_19,
44 MX50_PAD_EIM_CRE__GPIO_1_27,
45 MX50_PAD_SD1_CMD__SD1_CMD,
46
47 MX50_PAD_SD1_CLK__SD1_CLK,
48 MX50_PAD_SD1_D0__SD1_D0,
49 MX50_PAD_SD1_D1__SD1_D1,
50 MX50_PAD_SD1_D2__SD1_D2,
51 MX50_PAD_SD1_D3__SD1_D3,
52
53 /* SD2 */
54 MX50_PAD_SD2_CD__GPIO_5_17,
55 MX50_PAD_SD2_WP__GPIO_5_16,
56 MX50_PAD_SD2_CMD__SD2_CMD,
57 MX50_PAD_SD2_CLK__SD2_CLK,
58 MX50_PAD_SD2_D0__SD2_D0,
59 MX50_PAD_SD2_D1__SD2_D1,
60 MX50_PAD_SD2_D2__SD2_D2,
61 MX50_PAD_SD2_D3__SD2_D3,
62 MX50_PAD_SD2_D4__SD2_D4,
63 MX50_PAD_SD2_D5__SD2_D5,
64 MX50_PAD_SD2_D6__SD2_D6,
65 MX50_PAD_SD2_D7__SD2_D7,
66
67 /* SD3 */
68 MX50_PAD_SD3_CMD__SD3_CMD,
69 MX50_PAD_SD3_CLK__SD3_CLK,
70 MX50_PAD_SD3_D0__SD3_D0,
71 MX50_PAD_SD3_D1__SD3_D1,
72 MX50_PAD_SD3_D2__SD3_D2,
73 MX50_PAD_SD3_D3__SD3_D3,
74 MX50_PAD_SD3_D4__SD3_D4,
75 MX50_PAD_SD3_D5__SD3_D5,
76 MX50_PAD_SD3_D6__SD3_D6,
77 MX50_PAD_SD3_D7__SD3_D7,
78
79 /* PWR_INT */
80 MX50_PAD_ECSPI2_MISO__GPIO_4_18,
81
82 /* UART pad setting */
83 MX50_PAD_UART1_TXD__UART1_TXD,
84 MX50_PAD_UART1_RXD__UART1_RXD,
85 MX50_PAD_UART1_RTS__UART1_RTS,
86 MX50_PAD_UART2_TXD__UART2_TXD,
87 MX50_PAD_UART2_RXD__UART2_RXD,
88 MX50_PAD_UART2_CTS__UART2_CTS,
89 MX50_PAD_UART2_RTS__UART2_RTS,
90
91 MX50_PAD_I2C1_SCL__I2C1_SCL,
92 MX50_PAD_I2C1_SDA__I2C1_SDA,
93 MX50_PAD_I2C2_SCL__I2C2_SCL,
94 MX50_PAD_I2C2_SDA__I2C2_SDA,
95
96 MX50_PAD_EPITO__USBH1_PWR,
97 /* Need to comment below line if
98 * one needs to debug owire.
99 */
100 MX50_PAD_OWIRE__USBH1_OC,
101 /* using gpio to control otg pwr */
102 MX50_PAD_PWM2__GPIO_6_25,
103 MX50_PAD_I2C3_SCL__USBOTG_OC,
104
105 MX50_PAD_SSI_RXC__FEC_MDIO,
106 MX50_PAD_SSI_RXFS__FEC_MDC,
107 MX50_PAD_DISP_D0__FEC_TXCLK,
108 MX50_PAD_DISP_D1__FEC_RX_ER,
109 MX50_PAD_DISP_D2__FEC_RX_DV,
110 MX50_PAD_DISP_D3__FEC_RXD1,
111 MX50_PAD_DISP_D4__FEC_RXD0,
112 MX50_PAD_DISP_D5__FEC_TX_EN,
113 MX50_PAD_DISP_D6__FEC_TXD1,
114 MX50_PAD_DISP_D7__FEC_TXD0,
115 MX50_PAD_I2C3_SDA__GPIO_6_23,
116 MX50_PAD_ECSPI1_SCLK__GPIO_4_12,
117
118 MX50_PAD_CSPI_SS0__CSPI_SS0,
119 MX50_PAD_ECSPI1_MOSI__CSPI_SS1,
120 MX50_PAD_CSPI_MOSI__CSPI_MOSI,
121 MX50_PAD_CSPI_MISO__CSPI_MISO,
122
123 /* SGTL500_OSC_EN */
124 MX50_PAD_UART1_CTS__GPIO_6_8,
125
126 /* SGTL_AMP_SHDN */
127 MX50_PAD_UART3_RXD__GPIO_6_15,
128
129 /* Keypad */
130 MX50_PAD_KEY_COL0__KEY_COL0,
131 MX50_PAD_KEY_ROW0__KEY_ROW0,
132 MX50_PAD_KEY_COL1__KEY_COL1,
133 MX50_PAD_KEY_ROW1__KEY_ROW1,
134 MX50_PAD_KEY_COL2__KEY_COL2,
135 MX50_PAD_KEY_ROW2__KEY_ROW2,
136 MX50_PAD_KEY_COL3__KEY_COL3,
137 MX50_PAD_KEY_ROW3__KEY_ROW3,
138 MX50_PAD_EIM_DA0__KEY_COL4,
139 MX50_PAD_EIM_DA1__KEY_ROW4,
140 MX50_PAD_EIM_DA2__KEY_COL5,
141 MX50_PAD_EIM_DA3__KEY_ROW5,
142 MX50_PAD_EIM_DA4__KEY_COL6,
143 MX50_PAD_EIM_DA5__KEY_ROW6,
144 MX50_PAD_EIM_DA6__KEY_COL7,
145 MX50_PAD_EIM_DA7__KEY_ROW7,
146 /*EIM pads */
147 MX50_PAD_EIM_DA8__GPIO_1_8,
148 MX50_PAD_EIM_DA9__GPIO_1_9,
149 MX50_PAD_EIM_DA10__GPIO_1_10,
150 MX50_PAD_EIM_DA11__GPIO_1_11,
151 MX50_PAD_EIM_DA12__GPIO_1_12,
152 MX50_PAD_EIM_DA13__GPIO_1_13,
153 MX50_PAD_EIM_DA14__GPIO_1_14,
154 MX50_PAD_EIM_DA15__GPIO_1_15,
155 MX50_PAD_EIM_CS2__GPIO_1_16,
156 MX50_PAD_EIM_CS1__GPIO_1_17,
157 MX50_PAD_EIM_CS0__GPIO_1_18,
158 MX50_PAD_EIM_EB0__GPIO_1_19,
159 MX50_PAD_EIM_EB1__GPIO_1_20,
160 MX50_PAD_EIM_WAIT__GPIO_1_21,
161 MX50_PAD_EIM_BCLK__GPIO_1_22,
162 MX50_PAD_EIM_RDY__GPIO_1_23,
163 MX50_PAD_EIM_OE__GPIO_1_24,
164};
165
166/* Serial ports */
167static const struct imxuart_platform_data uart_pdata __initconst = {
168 .flags = IMXUART_HAVE_RTSCTS,
169};
170
171static const struct fec_platform_data fec_data __initconst = {
172 .phy = PHY_INTERFACE_MODE_RMII,
173};
174
175static inline void mx50_rdp_fec_reset(void)
176{
177 gpio_request(FEC_EN, "fec-en");
178 gpio_direction_output(FEC_EN, 0);
179 gpio_request(FEC_RESET_B, "fec-reset_b");
180 gpio_direction_output(FEC_RESET_B, 0);
181 msleep(1);
182 gpio_set_value(FEC_RESET_B, 1);
183}
184
185static const struct imxi2c_platform_data i2c_data __initconst = {
186 .bitrate = 100000,
187};
188
189/*
190 * Board specific initialization.
191 */
192static void __init mx50_rdp_board_init(void)
193{
194 imx50_soc_init();
195
196 mxc_iomux_v3_setup_multiple_pads(mx50_rdp_pads,
197 ARRAY_SIZE(mx50_rdp_pads));
198
199 imx50_add_imx_uart(0, &uart_pdata);
200 imx50_add_imx_uart(1, &uart_pdata);
201 mx50_rdp_fec_reset();
202 imx50_add_fec(&fec_data);
203 imx50_add_imx_i2c(0, &i2c_data);
204 imx50_add_imx_i2c(1, &i2c_data);
205 imx50_add_imx_i2c(2, &i2c_data);
206}
207
208static void __init mx50_rdp_timer_init(void)
209{
210 mx50_clocks_init(32768, 24000000, 22579200);
211}
212
213static struct sys_timer mx50_rdp_timer = {
214 .init = mx50_rdp_timer_init,
215};
216
217MACHINE_START(MX50_RDP, "Freescale MX50 Reference Design Platform")
218 .map_io = mx50_map_io,
219 .init_early = imx50_init_early,
220 .init_irq = mx50_init_irq,
221 .handle_irq = imx50_handle_irq,
222 .timer = &mx50_rdp_timer,
223 .init_machine = mx50_rdp_board_init,
224 .restart = mxc_restart,
225MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx51_3ds.c b/arch/arm/mach-imx/mach-mx51_3ds.c
deleted file mode 100644
index abc25bd1107b..000000000000
--- a/arch/arm/mach-imx/mach-mx51_3ds.c
+++ /dev/null
@@ -1,178 +0,0 @@
1/*
2 * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved.
3 * Copyright (C) 2010 Jason Wang <jason77.wang@gmail.com>
4 *
5 * The code contained herein is licensed under the GNU General Public
6 * License. You may obtain a copy of the GNU General Public License
7 * Version 2 or later at the following locations:
8 *
9 * http://www.opensource.org/licenses/gpl-license.html
10 * http://www.gnu.org/copyleft/gpl.html
11 */
12
13#include <linux/irq.h>
14#include <linux/platform_device.h>
15#include <linux/spi/spi.h>
16#include <linux/gpio.h>
17
18#include <asm/mach-types.h>
19#include <asm/mach/arch.h>
20#include <asm/mach/time.h>
21
22#include "3ds_debugboard.h"
23#include "common.h"
24#include "devices-imx51.h"
25#include "hardware.h"
26#include "iomux-mx51.h"
27
28#define MX51_3DS_ECSPI2_CS (GPIO_PORTC + 28)
29
30static iomux_v3_cfg_t mx51_3ds_pads[] = {
31 /* UART1 */
32 MX51_PAD_UART1_RXD__UART1_RXD,
33 MX51_PAD_UART1_TXD__UART1_TXD,
34 MX51_PAD_UART1_RTS__UART1_RTS,
35 MX51_PAD_UART1_CTS__UART1_CTS,
36
37 /* UART2 */
38 MX51_PAD_UART2_RXD__UART2_RXD,
39 MX51_PAD_UART2_TXD__UART2_TXD,
40 MX51_PAD_EIM_D25__UART2_CTS,
41 MX51_PAD_EIM_D26__UART2_RTS,
42
43 /* UART3 */
44 MX51_PAD_UART3_RXD__UART3_RXD,
45 MX51_PAD_UART3_TXD__UART3_TXD,
46 MX51_PAD_EIM_D24__UART3_CTS,
47 MX51_PAD_EIM_D27__UART3_RTS,
48
49 /* CPLD PARENT IRQ PIN */
50 MX51_PAD_GPIO1_6__GPIO1_6,
51
52 /* KPP */
53 MX51_PAD_KEY_ROW0__KEY_ROW0,
54 MX51_PAD_KEY_ROW1__KEY_ROW1,
55 MX51_PAD_KEY_ROW2__KEY_ROW2,
56 MX51_PAD_KEY_ROW3__KEY_ROW3,
57 MX51_PAD_KEY_COL0__KEY_COL0,
58 MX51_PAD_KEY_COL1__KEY_COL1,
59 MX51_PAD_KEY_COL2__KEY_COL2,
60 MX51_PAD_KEY_COL3__KEY_COL3,
61 MX51_PAD_KEY_COL4__KEY_COL4,
62 MX51_PAD_KEY_COL5__KEY_COL5,
63
64 /* eCSPI2 */
65 MX51_PAD_NANDF_RB2__ECSPI2_SCLK,
66 MX51_PAD_NANDF_RB3__ECSPI2_MISO,
67 MX51_PAD_NANDF_D15__ECSPI2_MOSI,
68 MX51_PAD_NANDF_D12__GPIO3_28,
69};
70
71/* Serial ports */
72static const struct imxuart_platform_data uart_pdata __initconst = {
73 .flags = IMXUART_HAVE_RTSCTS,
74};
75
76static int mx51_3ds_board_keymap[] = {
77 KEY(0, 0, KEY_1),
78 KEY(0, 1, KEY_2),
79 KEY(0, 2, KEY_3),
80 KEY(0, 3, KEY_F1),
81 KEY(0, 4, KEY_UP),
82 KEY(0, 5, KEY_F2),
83
84 KEY(1, 0, KEY_4),
85 KEY(1, 1, KEY_5),
86 KEY(1, 2, KEY_6),
87 KEY(1, 3, KEY_LEFT),
88 KEY(1, 4, KEY_SELECT),
89 KEY(1, 5, KEY_RIGHT),
90
91 KEY(2, 0, KEY_7),
92 KEY(2, 1, KEY_8),
93 KEY(2, 2, KEY_9),
94 KEY(2, 3, KEY_F3),
95 KEY(2, 4, KEY_DOWN),
96 KEY(2, 5, KEY_F4),
97
98 KEY(3, 0, KEY_0),
99 KEY(3, 1, KEY_OK),
100 KEY(3, 2, KEY_ESC),
101 KEY(3, 3, KEY_ENTER),
102 KEY(3, 4, KEY_MENU),
103 KEY(3, 5, KEY_BACK)
104};
105
106static const struct matrix_keymap_data mx51_3ds_map_data __initconst = {
107 .keymap = mx51_3ds_board_keymap,
108 .keymap_size = ARRAY_SIZE(mx51_3ds_board_keymap),
109};
110
111static int mx51_3ds_spi2_cs[] = {
112 MXC_SPI_CS(0),
113 MX51_3DS_ECSPI2_CS,
114};
115
116static const struct spi_imx_master mx51_3ds_ecspi2_pdata __initconst = {
117 .chipselect = mx51_3ds_spi2_cs,
118 .num_chipselect = ARRAY_SIZE(mx51_3ds_spi2_cs),
119};
120
121static struct spi_board_info mx51_3ds_spi_nor_device[] = {
122 {
123 .modalias = "m25p80",
124 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
125 .bus_num = 1,
126 .chip_select = 1,
127 .mode = SPI_MODE_0,
128 .platform_data = NULL,},
129};
130
131/*
132 * Board specific initialization.
133 */
134static void __init mx51_3ds_init(void)
135{
136 imx51_soc_init();
137
138 mxc_iomux_v3_setup_multiple_pads(mx51_3ds_pads,
139 ARRAY_SIZE(mx51_3ds_pads));
140
141 imx51_add_imx_uart(0, &uart_pdata);
142 imx51_add_imx_uart(1, &uart_pdata);
143 imx51_add_imx_uart(2, &uart_pdata);
144
145 imx51_add_ecspi(1, &mx51_3ds_ecspi2_pdata);
146 spi_register_board_info(mx51_3ds_spi_nor_device,
147 ARRAY_SIZE(mx51_3ds_spi_nor_device));
148
149 if (mxc_expio_init(MX51_CS5_BASE_ADDR, IMX_GPIO_NR(1, 6)))
150 printk(KERN_WARNING "Init of the debugboard failed, all "
151 "devices on the board are unusable.\n");
152
153 imx51_add_sdhci_esdhc_imx(0, NULL);
154 imx51_add_imx_keypad(&mx51_3ds_map_data);
155 imx51_add_imx2_wdt(0);
156}
157
158static void __init mx51_3ds_timer_init(void)
159{
160 mx51_clocks_init(32768, 24000000, 22579200, 0);
161}
162
163static struct sys_timer mx51_3ds_timer = {
164 .init = mx51_3ds_timer_init,
165};
166
167MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
168 /* Maintainer: Freescale Semiconductor, Inc. */
169 .atag_offset = 0x100,
170 .map_io = mx51_map_io,
171 .init_early = imx51_init_early,
172 .init_irq = mx51_init_irq,
173 .handle_irq = imx51_handle_irq,
174 .timer = &mx51_3ds_timer,
175 .init_machine = mx51_3ds_init,
176 .init_late = imx51_init_late,
177 .restart = mxc_restart,
178MACHINE_END
diff --git a/arch/arm/mach-imx/mach-mx51_babbage.c b/arch/arm/mach-imx/mach-mx51_babbage.c
index d9a84ca2199a..6c4d7feb4520 100644
--- a/arch/arm/mach-imx/mach-mx51_babbage.c
+++ b/arch/arm/mach-imx/mach-mx51_babbage.c
@@ -418,10 +418,6 @@ static void __init mx51_babbage_timer_init(void)
418 mx51_clocks_init(32768, 24000000, 22579200, 0); 418 mx51_clocks_init(32768, 24000000, 22579200, 0);
419} 419}
420 420
421static struct sys_timer mx51_babbage_timer = {
422 .init = mx51_babbage_timer_init,
423};
424
425MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board") 421MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
426 /* Maintainer: Amit Kucheria <amit.kucheria@canonical.com> */ 422 /* Maintainer: Amit Kucheria <amit.kucheria@canonical.com> */
427 .atag_offset = 0x100, 423 .atag_offset = 0x100,
@@ -429,7 +425,7 @@ MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
429 .init_early = imx51_init_early, 425 .init_early = imx51_init_early,
430 .init_irq = mx51_init_irq, 426 .init_irq = mx51_init_irq,
431 .handle_irq = imx51_handle_irq, 427 .handle_irq = imx51_handle_irq,
432 .timer = &mx51_babbage_timer, 428 .init_time = mx51_babbage_timer_init,
433 .init_machine = mx51_babbage_init, 429 .init_machine = mx51_babbage_init,
434 .init_late = imx51_init_late, 430 .init_late = imx51_init_late,
435 .restart = mxc_restart, 431 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-mxt_td60.c b/arch/arm/mach-imx/mach-mxt_td60.c
index f4a8c7e108e1..a27faaba98ec 100644
--- a/arch/arm/mach-imx/mach-mxt_td60.c
+++ b/arch/arm/mach-imx/mach-mxt_td60.c
@@ -261,10 +261,6 @@ static void __init mxt_td60_timer_init(void)
261 mx27_clocks_init(26000000); 261 mx27_clocks_init(26000000);
262} 262}
263 263
264static struct sys_timer mxt_td60_timer = {
265 .init = mxt_td60_timer_init,
266};
267
268MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60") 264MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60")
269 /* maintainer: Maxtrack Industrial */ 265 /* maintainer: Maxtrack Industrial */
270 .atag_offset = 0x100, 266 .atag_offset = 0x100,
@@ -272,7 +268,7 @@ MACHINE_START(MXT_TD60, "Maxtrack i-MXT TD60")
272 .init_early = imx27_init_early, 268 .init_early = imx27_init_early,
273 .init_irq = mx27_init_irq, 269 .init_irq = mx27_init_irq,
274 .handle_irq = imx27_handle_irq, 270 .handle_irq = imx27_handle_irq,
275 .timer = &mxt_td60_timer, 271 .init_time = mxt_td60_timer_init,
276 .init_machine = mxt_td60_board_init, 272 .init_machine = mxt_td60_board_init,
277 .restart = mxc_restart, 273 .restart = mxc_restart,
278MACHINE_END 274MACHINE_END
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
index eee369fa94a2..b8b15bb1ffdf 100644
--- a/arch/arm/mach-imx/mach-pca100.c
+++ b/arch/arm/mach-imx/mach-pca100.c
@@ -416,10 +416,6 @@ static void __init pca100_timer_init(void)
416 mx27_clocks_init(26000000); 416 mx27_clocks_init(26000000);
417} 417}
418 418
419static struct sys_timer pca100_timer = {
420 .init = pca100_timer_init,
421};
422
423MACHINE_START(PCA100, "phyCARD-i.MX27") 419MACHINE_START(PCA100, "phyCARD-i.MX27")
424 .atag_offset = 0x100, 420 .atag_offset = 0x100,
425 .map_io = mx27_map_io, 421 .map_io = mx27_map_io,
@@ -427,6 +423,6 @@ MACHINE_START(PCA100, "phyCARD-i.MX27")
427 .init_irq = mx27_init_irq, 423 .init_irq = mx27_init_irq,
428 .handle_irq = imx27_handle_irq, 424 .handle_irq = imx27_handle_irq,
429 .init_machine = pca100_init, 425 .init_machine = pca100_init,
430 .timer = &pca100_timer, 426 .init_time = pca100_timer_init,
431 .restart = mxc_restart, 427 .restart = mxc_restart,
432MACHINE_END 428MACHINE_END
diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c
index 547fef133f65..bc0261e99d39 100644
--- a/arch/arm/mach-imx/mach-pcm037.c
+++ b/arch/arm/mach-imx/mach-pcm037.c
@@ -685,10 +685,6 @@ static void __init pcm037_timer_init(void)
685 mx31_clocks_init(26000000); 685 mx31_clocks_init(26000000);
686} 686}
687 687
688static struct sys_timer pcm037_timer = {
689 .init = pcm037_timer_init,
690};
691
692static void __init pcm037_reserve(void) 688static void __init pcm037_reserve(void)
693{ 689{
694 /* reserve 4 MiB for mx3-camera */ 690 /* reserve 4 MiB for mx3-camera */
@@ -709,7 +705,7 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
709 .init_early = imx31_init_early, 705 .init_early = imx31_init_early,
710 .init_irq = mx31_init_irq, 706 .init_irq = mx31_init_irq,
711 .handle_irq = imx31_handle_irq, 707 .handle_irq = imx31_handle_irq,
712 .timer = &pcm037_timer, 708 .init_time = pcm037_timer_init,
713 .init_machine = pcm037_init, 709 .init_machine = pcm037_init,
714 .init_late = pcm037_init_late, 710 .init_late = pcm037_init_late,
715 .restart = mxc_restart, 711 .restart = mxc_restart,
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c
index 4aa0d0798605..e805ac273e9c 100644
--- a/arch/arm/mach-imx/mach-pcm038.c
+++ b/arch/arm/mach-imx/mach-pcm038.c
@@ -346,17 +346,13 @@ static void __init pcm038_timer_init(void)
346 mx27_clocks_init(26000000); 346 mx27_clocks_init(26000000);
347} 347}
348 348
349static struct sys_timer pcm038_timer = {
350 .init = pcm038_timer_init,
351};
352
353MACHINE_START(PCM038, "phyCORE-i.MX27") 349MACHINE_START(PCM038, "phyCORE-i.MX27")
354 .atag_offset = 0x100, 350 .atag_offset = 0x100,
355 .map_io = mx27_map_io, 351 .map_io = mx27_map_io,
356 .init_early = imx27_init_early, 352 .init_early = imx27_init_early,
357 .init_irq = mx27_init_irq, 353 .init_irq = mx27_init_irq,
358 .handle_irq = imx27_handle_irq, 354 .handle_irq = imx27_handle_irq,
359 .timer = &pcm038_timer, 355 .init_time = pcm038_timer_init,
360 .init_machine = pcm038_init, 356 .init_machine = pcm038_init,
361 .restart = mxc_restart, 357 .restart = mxc_restart,
362MACHINE_END 358MACHINE_END
diff --git a/arch/arm/mach-imx/mach-pcm043.c b/arch/arm/mach-imx/mach-pcm043.c
index 92445440221e..8ed533f0f8ca 100644
--- a/arch/arm/mach-imx/mach-pcm043.c
+++ b/arch/arm/mach-imx/mach-pcm043.c
@@ -394,10 +394,6 @@ static void __init pcm043_timer_init(void)
394 mx35_clocks_init(); 394 mx35_clocks_init();
395} 395}
396 396
397static struct sys_timer pcm043_timer = {
398 .init = pcm043_timer_init,
399};
400
401MACHINE_START(PCM043, "Phytec Phycore pcm043") 397MACHINE_START(PCM043, "Phytec Phycore pcm043")
402 /* Maintainer: Pengutronix */ 398 /* Maintainer: Pengutronix */
403 .atag_offset = 0x100, 399 .atag_offset = 0x100,
@@ -405,7 +401,7 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043")
405 .init_early = imx35_init_early, 401 .init_early = imx35_init_early,
406 .init_irq = mx35_init_irq, 402 .init_irq = mx35_init_irq,
407 .handle_irq = imx35_handle_irq, 403 .handle_irq = imx35_handle_irq,
408 .timer = &pcm043_timer, 404 .init_time = pcm043_timer_init,
409 .init_machine = pcm043_init, 405 .init_machine = pcm043_init,
410 .restart = mxc_restart, 406 .restart = mxc_restart,
411MACHINE_END 407MACHINE_END
diff --git a/arch/arm/mach-imx/mach-qong.c b/arch/arm/mach-imx/mach-qong.c
index 96d9a91f8a3b..22af27ed457e 100644
--- a/arch/arm/mach-imx/mach-qong.c
+++ b/arch/arm/mach-imx/mach-qong.c
@@ -260,10 +260,6 @@ static void __init qong_timer_init(void)
260 mx31_clocks_init(26000000); 260 mx31_clocks_init(26000000);
261} 261}
262 262
263static struct sys_timer qong_timer = {
264 .init = qong_timer_init,
265};
266
267MACHINE_START(QONG, "Dave/DENX QongEVB-LITE") 263MACHINE_START(QONG, "Dave/DENX QongEVB-LITE")
268 /* Maintainer: DENX Software Engineering GmbH */ 264 /* Maintainer: DENX Software Engineering GmbH */
269 .atag_offset = 0x100, 265 .atag_offset = 0x100,
@@ -271,7 +267,7 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE")
271 .init_early = imx31_init_early, 267 .init_early = imx31_init_early,
272 .init_irq = mx31_init_irq, 268 .init_irq = mx31_init_irq,
273 .handle_irq = imx31_handle_irq, 269 .handle_irq = imx31_handle_irq,
274 .timer = &qong_timer, 270 .init_time = qong_timer_init,
275 .init_machine = qong_init, 271 .init_machine = qong_init,
276 .restart = mxc_restart, 272 .restart = mxc_restart,
277MACHINE_END 273MACHINE_END
diff --git a/arch/arm/mach-imx/mach-scb9328.c b/arch/arm/mach-imx/mach-scb9328.c
index fc970409dbaf..b0fa10dd79fe 100644
--- a/arch/arm/mach-imx/mach-scb9328.c
+++ b/arch/arm/mach-imx/mach-scb9328.c
@@ -131,10 +131,6 @@ static void __init scb9328_timer_init(void)
131 mx1_clocks_init(32000); 131 mx1_clocks_init(32000);
132} 132}
133 133
134static struct sys_timer scb9328_timer = {
135 .init = scb9328_timer_init,
136};
137
138MACHINE_START(SCB9328, "Synertronixx scb9328") 134MACHINE_START(SCB9328, "Synertronixx scb9328")
139 /* Sascha Hauer */ 135 /* Sascha Hauer */
140 .atag_offset = 100, 136 .atag_offset = 100,
@@ -142,7 +138,7 @@ MACHINE_START(SCB9328, "Synertronixx scb9328")
142 .init_early = imx1_init_early, 138 .init_early = imx1_init_early,
143 .init_irq = mx1_init_irq, 139 .init_irq = mx1_init_irq,
144 .handle_irq = imx1_handle_irq, 140 .handle_irq = imx1_handle_irq,
145 .timer = &scb9328_timer, 141 .init_time = scb9328_timer_init,
146 .init_machine = scb9328_init, 142 .init_machine = scb9328_init,
147 .restart = mxc_restart, 143 .restart = mxc_restart,
148MACHINE_END 144MACHINE_END
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c
index 3aecf91e4289..0910761e8280 100644
--- a/arch/arm/mach-imx/mach-vpr200.c
+++ b/arch/arm/mach-imx/mach-vpr200.c
@@ -305,17 +305,13 @@ static void __init vpr200_timer_init(void)
305 mx35_clocks_init(); 305 mx35_clocks_init();
306} 306}
307 307
308static struct sys_timer vpr200_timer = {
309 .init = vpr200_timer_init,
310};
311
312MACHINE_START(VPR200, "VPR200") 308MACHINE_START(VPR200, "VPR200")
313 /* Maintainer: Creative Product Design */ 309 /* Maintainer: Creative Product Design */
314 .map_io = mx35_map_io, 310 .map_io = mx35_map_io,
315 .init_early = imx35_init_early, 311 .init_early = imx35_init_early,
316 .init_irq = mx35_init_irq, 312 .init_irq = mx35_init_irq,
317 .handle_irq = imx35_handle_irq, 313 .handle_irq = imx35_handle_irq,
318 .timer = &vpr200_timer, 314 .init_time = vpr200_timer_init,
319 .init_machine = vpr200_board_init, 315 .init_machine = vpr200_board_init,
320 .restart = mxc_restart, 316 .restart = mxc_restart,
321MACHINE_END 317MACHINE_END
diff --git a/arch/arm/mach-imx/mm-imx5.c b/arch/arm/mach-imx/mm-imx5.c
index 79d71cf23a1d..cf34994cfe28 100644
--- a/arch/arm/mach-imx/mm-imx5.c
+++ b/arch/arm/mach-imx/mm-imx5.c
@@ -24,16 +24,6 @@
24#include "iomux-v3.h" 24#include "iomux-v3.h"
25 25
26/* 26/*
27 * Define the MX50 memory map.
28 */
29static struct map_desc mx50_io_desc[] __initdata = {
30 imx_map_entry(MX50, TZIC, MT_DEVICE),
31 imx_map_entry(MX50, SPBA0, MT_DEVICE),
32 imx_map_entry(MX50, AIPS1, MT_DEVICE),
33 imx_map_entry(MX50, AIPS2, MT_DEVICE),
34};
35
36/*
37 * Define the MX51 memory map. 27 * Define the MX51 memory map.
38 */ 28 */
39static struct map_desc mx51_io_desc[] __initdata = { 29static struct map_desc mx51_io_desc[] __initdata = {
@@ -59,11 +49,6 @@ static struct map_desc mx53_io_desc[] __initdata = {
59 * system startup to create static physical to virtual memory mappings 49 * system startup to create static physical to virtual memory mappings
60 * for the IO modules. 50 * for the IO modules.
61 */ 51 */
62void __init mx50_map_io(void)
63{
64 iotable_init(mx50_io_desc, ARRAY_SIZE(mx50_io_desc));
65}
66
67void __init mx51_map_io(void) 52void __init mx51_map_io(void)
68{ 53{
69 iotable_init(mx51_io_desc, ARRAY_SIZE(mx51_io_desc)); 54 iotable_init(mx51_io_desc, ARRAY_SIZE(mx51_io_desc));
@@ -74,13 +59,6 @@ void __init mx53_map_io(void)
74 iotable_init(mx53_io_desc, ARRAY_SIZE(mx53_io_desc)); 59 iotable_init(mx53_io_desc, ARRAY_SIZE(mx53_io_desc));
75} 60}
76 61
77void __init imx50_init_early(void)
78{
79 mxc_set_cpu_type(MXC_CPU_MX50);
80 mxc_iomux_v3_init(MX50_IO_ADDRESS(MX50_IOMUXC_BASE_ADDR));
81 mxc_arch_reset_init(MX50_IO_ADDRESS(MX50_WDOG_BASE_ADDR));
82}
83
84/* 62/*
85 * The MIPI HSC unit has been removed from the i.MX51 Reference Manual by 63 * The MIPI HSC unit has been removed from the i.MX51 Reference Manual by
86 * the Freescale marketing division. However this did not remove the 64 * the Freescale marketing division. However this did not remove the
@@ -115,11 +93,6 @@ void __init imx53_init_early(void)
115 mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG1_BASE_ADDR)); 93 mxc_arch_reset_init(MX53_IO_ADDRESS(MX53_WDOG1_BASE_ADDR));
116} 94}
117 95
118void __init mx50_init_irq(void)
119{
120 tzic_init_irq(MX50_IO_ADDRESS(MX50_TZIC_BASE_ADDR));
121}
122
123void __init mx51_init_irq(void) 96void __init mx51_init_irq(void)
124{ 97{
125 tzic_init_irq(MX51_IO_ADDRESS(MX51_TZIC_BASE_ADDR)); 98 tzic_init_irq(MX51_IO_ADDRESS(MX51_TZIC_BASE_ADDR));
@@ -148,31 +121,10 @@ static struct sdma_platform_data imx51_sdma_pdata __initdata = {
148 .script_addrs = &imx51_sdma_script, 121 .script_addrs = &imx51_sdma_script,
149}; 122};
150 123
151static const struct resource imx50_audmux_res[] __initconst = {
152 DEFINE_RES_MEM(MX50_AUDMUX_BASE_ADDR, SZ_16K),
153};
154
155static const struct resource imx51_audmux_res[] __initconst = { 124static const struct resource imx51_audmux_res[] __initconst = {
156 DEFINE_RES_MEM(MX51_AUDMUX_BASE_ADDR, SZ_16K), 125 DEFINE_RES_MEM(MX51_AUDMUX_BASE_ADDR, SZ_16K),
157}; 126};
158 127
159void __init imx50_soc_init(void)
160{
161 mxc_device_init();
162
163 /* i.mx50 has the i.mx35 type gpio */
164 mxc_register_gpio("imx35-gpio", 0, MX50_GPIO1_BASE_ADDR, SZ_16K, MX50_INT_GPIO1_LOW, MX50_INT_GPIO1_HIGH);
165 mxc_register_gpio("imx35-gpio", 1, MX50_GPIO2_BASE_ADDR, SZ_16K, MX50_INT_GPIO2_LOW, MX50_INT_GPIO2_HIGH);
166 mxc_register_gpio("imx35-gpio", 2, MX50_GPIO3_BASE_ADDR, SZ_16K, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH);
167 mxc_register_gpio("imx35-gpio", 3, MX50_GPIO4_BASE_ADDR, SZ_16K, MX50_INT_GPIO4_LOW, MX50_INT_GPIO4_HIGH);
168 mxc_register_gpio("imx35-gpio", 4, MX50_GPIO5_BASE_ADDR, SZ_16K, MX50_INT_GPIO5_LOW, MX50_INT_GPIO5_HIGH);
169 mxc_register_gpio("imx35-gpio", 5, MX50_GPIO6_BASE_ADDR, SZ_16K, MX50_INT_GPIO6_LOW, MX50_INT_GPIO6_HIGH);
170
171 /* i.mx50 has the i.mx31 type audmux */
172 platform_device_register_simple("imx31-audmux", 0, imx50_audmux_res,
173 ARRAY_SIZE(imx50_audmux_res));
174}
175
176void __init imx51_soc_init(void) 128void __init imx51_soc_init(void)
177{ 129{
178 mxc_device_init(); 130 mxc_device_init();
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/mx50.h b/arch/arm/mach-imx/mx50.h
deleted file mode 100644
index 09ac19c1570c..000000000000
--- a/arch/arm/mach-imx/mx50.h
+++ /dev/null
@@ -1,290 +0,0 @@
1#ifndef __MACH_MX50_H__
2#define __MACH_MX50_H__
3
4/*
5 * IROM
6 */
7#define MX50_IROM_BASE_ADDR 0x0
8#define MX50_IROM_SIZE SZ_64K
9
10/* TZIC */
11#define MX50_TZIC_BASE_ADDR 0x0fffc000
12#define MX50_TZIC_SIZE SZ_16K
13
14/*
15 * IRAM
16 */
17#define MX50_IRAM_BASE_ADDR 0xf8000000 /* internal ram */
18#define MX50_IRAM_PARTITIONS 16
19#define MX50_IRAM_SIZE (MX50_IRAM_PARTITIONS * SZ_8K) /* 128KB */
20
21/*
22 * Databahn
23 */
24#define MX50_DATABAHN_BASE_ADDR 0x14000000
25
26/*
27 * Graphics Memory of GPU
28 */
29#define MX50_GPU2D_BASE_ADDR 0x20000000
30
31#define MX50_DEBUG_BASE_ADDR 0x40000000
32#define MX50_DEBUG_SIZE SZ_1M
33#define MX50_ETB_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x00001000)
34#define MX50_ETM_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x00002000)
35#define MX50_TPIU_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x00003000)
36#define MX50_CTI0_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x00004000)
37#define MX50_CTI1_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x00005000)
38#define MX50_CTI2_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x00006000)
39#define MX50_CTI3_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x00007000)
40#define MX50_CORTEX_DBG_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x00008000)
41
42#define MX50_APBHDMA_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01000000)
43#define MX50_OCOTP_CTRL_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01002000)
44#define MX50_DIGCTL_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01004000)
45#define MX50_GPMI_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01006000)
46#define MX50_BCH_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01008000)
47#define MX50_ELCDIF_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x0100a000)
48#define MX50_EPXP_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x0100c000)
49#define MX50_DCP_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x0100e000)
50#define MX50_EPDC_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01010000)
51#define MX50_QOSC_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01012000)
52#define MX50_PERFMON_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01014000)
53#define MX50_SSP_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01016000)
54#define MX50_ANATOP_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x01018000)
55#define MX50_NIC_BASE_ADDR (MX50_DEBUG_BASE_ADDR + 0x08000000)
56
57/*
58 * SPBA global module enabled #0
59 */
60#define MX50_SPBA0_BASE_ADDR 0x50000000
61#define MX50_SPBA0_SIZE SZ_1M
62
63#define MX50_MMC_SDHC1_BASE_ADDR (MX50_SPBA0_BASE_ADDR + 0x00004000)
64#define MX50_MMC_SDHC2_BASE_ADDR (MX50_SPBA0_BASE_ADDR + 0x00008000)
65#define MX50_UART3_BASE_ADDR (MX50_SPBA0_BASE_ADDR + 0x0000c000)
66#define MX50_CSPI1_BASE_ADDR (MX50_SPBA0_BASE_ADDR + 0x00010000)
67#define MX50_SSI2_BASE_ADDR (MX50_SPBA0_BASE_ADDR + 0x00014000)
68#define MX50_MMC_SDHC3_BASE_ADDR (MX50_SPBA0_BASE_ADDR + 0x00020000)
69#define MX50_MMC_SDHC4_BASE_ADDR (MX50_SPBA0_BASE_ADDR + 0x00024000)
70
71/*
72 * AIPS 1
73 */
74#define MX50_AIPS1_BASE_ADDR 0x53f00000
75#define MX50_AIPS1_SIZE SZ_1M
76
77#define MX50_OTG_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x00080000)
78#define MX50_GPIO1_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x00084000)
79#define MX50_GPIO2_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x00088000)
80#define MX50_GPIO3_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x0008c000)
81#define MX50_GPIO4_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x00090000)
82#define MX50_KPP_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x00094000)
83#define MX50_WDOG_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x00098000)
84#define MX50_GPT1_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000a0000)
85#define MX50_SRTC_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000a4000)
86#define MX50_IOMUXC_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000a8000)
87#define MX50_EPIT1_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000ac000)
88#define MX50_PWM1_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000b4000)
89#define MX50_PWM2_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000b8000)
90#define MX50_UART1_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000bc000)
91#define MX50_UART2_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000c0000)
92#define MX50_SRC_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000d0000)
93#define MX50_CCM_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000d4000)
94#define MX50_GPC_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000d8000)
95#define MX50_GPIO5_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000dc000)
96#define MX50_GPIO6_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000e0000)
97#define MX50_I2C3_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000ec000)
98#define MX50_UART4_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000f0000)
99
100#define MX50_MSHC_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000f4000)
101#define MX50_RNGB_BASE_ADDR (MX50_AIPS1_BASE_ADDR + 0x000f8000)
102
103/*
104 * AIPS 2
105 */
106#define MX50_AIPS2_BASE_ADDR 0x63f00000
107#define MX50_AIPS2_SIZE SZ_1M
108
109#define MX50_PLL1_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x00080000)
110#define MX50_PLL2_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x00084000)
111#define MX50_PLL3_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x00088000)
112#define MX50_UART5_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x00090000)
113#define MX50_AHBMAX_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x00094000)
114#define MX50_ARM_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000a0000)
115#define MX50_OWIRE_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000a4000)
116#define MX50_CSPI2_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000ac000)
117#define MX50_SDMA_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000b0000)
118#define MX50_ROMCP_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000b8000)
119#define MX50_CSPI3_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000c0000)
120#define MX50_I2C2_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000c4000)
121#define MX50_I2C1_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000c8000)
122#define MX50_SSI1_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000cc000)
123#define MX50_AUDMUX_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000d0000)
124#define MX50_WEIM_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000d8000)
125#define MX50_FEC_BASE_ADDR (MX50_AIPS2_BASE_ADDR + 0x000ec000)
126
127/*
128 * Memory regions and CS
129 */
130#define MX50_CSD0_BASE_ADDR 0x70000000
131#define MX50_CSD1_BASE_ADDR 0xb0000000
132#define MX50_CS0_BASE_ADDR 0xf0000000
133
134#define MX50_IO_P2V(x) IMX_IO_P2V(x)
135#define MX50_IO_ADDRESS(x) IOMEM(MX50_IO_P2V(x))
136
137/*
138 * defines for SPBA modules
139 */
140#define MX50_SPBA_SDHC1 0x04
141#define MX50_SPBA_SDHC2 0x08
142#define MX50_SPBA_UART3 0x0c
143#define MX50_SPBA_CSPI1 0x10
144#define MX50_SPBA_SSI2 0x14
145#define MX50_SPBA_SDHC3 0x20
146#define MX50_SPBA_SDHC4 0x24
147#define MX50_SPBA_SPDIF 0x28
148#define MX50_SPBA_ATA 0x30
149#define MX50_SPBA_SLIM 0x34
150#define MX50_SPBA_HSI2C 0x38
151#define MX50_SPBA_CTRL 0x3c
152
153/*
154 * DMA request assignments
155 */
156#define MX50_DMA_REQ_GPC 1
157#define MX50_DMA_REQ_ATA_UART4_RX 2
158#define MX50_DMA_REQ_ATA_UART4_TX 3
159#define MX50_DMA_REQ_CSPI1_RX 6
160#define MX50_DMA_REQ_CSPI1_TX 7
161#define MX50_DMA_REQ_CSPI2_RX 8
162#define MX50_DMA_REQ_CSPI2_TX 9
163#define MX50_DMA_REQ_I2C3_SDHC3 10
164#define MX50_DMA_REQ_SDHC4 11
165#define MX50_DMA_REQ_UART2_FIRI_RX 12
166#define MX50_DMA_REQ_UART2_FIRI_TX 13
167#define MX50_DMA_REQ_EXT0 14
168#define MX50_DMA_REQ_EXT1 15
169#define MX50_DMA_REQ_UART5_RX 16
170#define MX50_DMA_REQ_UART5_TX 17
171#define MX50_DMA_REQ_UART1_RX 18
172#define MX50_DMA_REQ_UART1_TX 19
173#define MX50_DMA_REQ_I2C1_SDHC1 20
174#define MX50_DMA_REQ_I2C2_SDHC2 21
175#define MX50_DMA_REQ_SSI2_RX2 22
176#define MX50_DMA_REQ_SSI2_TX2 23
177#define MX50_DMA_REQ_SSI2_RX1 24
178#define MX50_DMA_REQ_SSI2_TX1 25
179#define MX50_DMA_REQ_SSI1_RX2 26
180#define MX50_DMA_REQ_SSI1_TX2 27
181#define MX50_DMA_REQ_SSI1_RX1 28
182#define MX50_DMA_REQ_SSI1_TX1 29
183#define MX50_DMA_REQ_CSPI_RX 38
184#define MX50_DMA_REQ_CSPI_TX 39
185#define MX50_DMA_REQ_UART3_RX 42
186#define MX50_DMA_REQ_UART3_TX 43
187
188/*
189 * Interrupt numbers
190 */
191#include <asm/irq.h>
192#define MX50_INT_MMC_SDHC1 (NR_IRQS_LEGACY + 1)
193#define MX50_INT_MMC_SDHC2 (NR_IRQS_LEGACY + 2)
194#define MX50_INT_MMC_SDHC3 (NR_IRQS_LEGACY + 3)
195#define MX50_INT_MMC_SDHC4 (NR_IRQS_LEGACY + 4)
196#define MX50_INT_DAP (NR_IRQS_LEGACY + 5)
197#define MX50_INT_SDMA (NR_IRQS_LEGACY + 6)
198#define MX50_INT_IOMUX (NR_IRQS_LEGACY + 7)
199#define MX50_INT_UART4 (NR_IRQS_LEGACY + 13)
200#define MX50_INT_USB_H1 (NR_IRQS_LEGACY + 14)
201#define MX50_INT_USB_OTG (NR_IRQS_LEGACY + 18)
202#define MX50_INT_DATABAHN (NR_IRQS_LEGACY + 19)
203#define MX50_INT_ELCDIF (NR_IRQS_LEGACY + 20)
204#define MX50_INT_EPXP (NR_IRQS_LEGACY + 21)
205#define MX50_INT_SRTC_NTZ (NR_IRQS_LEGACY + 24)
206#define MX50_INT_SRTC_TZ (NR_IRQS_LEGACY + 25)
207#define MX50_INT_EPDC (NR_IRQS_LEGACY + 27)
208#define MX50_INT_NIC (NR_IRQS_LEGACY + 28)
209#define MX50_INT_SSI1 (NR_IRQS_LEGACY + 29)
210#define MX50_INT_SSI2 (NR_IRQS_LEGACY + 30)
211#define MX50_INT_UART1 (NR_IRQS_LEGACY + 31)
212#define MX50_INT_UART2 (NR_IRQS_LEGACY + 32)
213#define MX50_INT_UART3 (NR_IRQS_LEGACY + 33)
214#define MX50_INT_RESV34 (NR_IRQS_LEGACY + 34)
215#define MX50_INT_RESV35 (NR_IRQS_LEGACY + 35)
216#define MX50_INT_CSPI1 (NR_IRQS_LEGACY + 36)
217#define MX50_INT_CSPI2 (NR_IRQS_LEGACY + 37)
218#define MX50_INT_CSPI (NR_IRQS_LEGACY + 38)
219#define MX50_INT_GPT (NR_IRQS_LEGACY + 39)
220#define MX50_INT_EPIT1 (NR_IRQS_LEGACY + 40)
221#define MX50_INT_GPIO1_INT7 (NR_IRQS_LEGACY + 42)
222#define MX50_INT_GPIO1_INT6 (NR_IRQS_LEGACY + 43)
223#define MX50_INT_GPIO1_INT5 (NR_IRQS_LEGACY + 44)
224#define MX50_INT_GPIO1_INT4 (NR_IRQS_LEGACY + 45)
225#define MX50_INT_GPIO1_INT3 (NR_IRQS_LEGACY + 46)
226#define MX50_INT_GPIO1_INT2 (NR_IRQS_LEGACY + 47)
227#define MX50_INT_GPIO1_INT1 (NR_IRQS_LEGACY + 48)
228#define MX50_INT_GPIO1_INT0 (NR_IRQS_LEGACY + 49)
229#define MX50_INT_GPIO1_LOW (NR_IRQS_LEGACY + 50)
230#define MX50_INT_GPIO1_HIGH (NR_IRQS_LEGACY + 51)
231#define MX50_INT_GPIO2_LOW (NR_IRQS_LEGACY + 52)
232#define MX50_INT_GPIO2_HIGH (NR_IRQS_LEGACY + 53)
233#define MX50_INT_GPIO3_LOW (NR_IRQS_LEGACY + 54)
234#define MX50_INT_GPIO3_HIGH (NR_IRQS_LEGACY + 55)
235#define MX50_INT_GPIO4_LOW (NR_IRQS_LEGACY + 56)
236#define MX50_INT_GPIO4_HIGH (NR_IRQS_LEGACY + 57)
237#define MX50_INT_WDOG1 (NR_IRQS_LEGACY + 58)
238#define MX50_INT_KPP (NR_IRQS_LEGACY + 60)
239#define MX50_INT_PWM1 (NR_IRQS_LEGACY + 61)
240#define MX50_INT_I2C1 (NR_IRQS_LEGACY + 62)
241#define MX50_INT_I2C2 (NR_IRQS_LEGACY + 63)
242#define MX50_INT_I2C3 (NR_IRQS_LEGACY + 64)
243#define MX50_INT_RESV65 (NR_IRQS_LEGACY + 65)
244#define MX50_INT_DCDC (NR_IRQS_LEGACY + 66)
245#define MX50_INT_THERMAL_ALARM (NR_IRQS_LEGACY + 67)
246#define MX50_INT_ANA3 (NR_IRQS_LEGACY + 68)
247#define MX50_INT_ANA4 (NR_IRQS_LEGACY + 69)
248#define MX50_INT_CCM1 (NR_IRQS_LEGACY + 71)
249#define MX50_INT_CCM2 (NR_IRQS_LEGACY + 72)
250#define MX50_INT_GPC1 (NR_IRQS_LEGACY + 73)
251#define MX50_INT_GPC2 (NR_IRQS_LEGACY + 74)
252#define MX50_INT_SRC (NR_IRQS_LEGACY + 75)
253#define MX50_INT_NM (NR_IRQS_LEGACY + 76)
254#define MX50_INT_PMU (NR_IRQS_LEGACY + 77)
255#define MX50_INT_CTI_IRQ (NR_IRQS_LEGACY + 78)
256#define MX50_INT_CTI1_TG0 (NR_IRQS_LEGACY + 79)
257#define MX50_INT_CTI1_TG1 (NR_IRQS_LEGACY + 80)
258#define MX50_INT_GPU2_IRQ (NR_IRQS_LEGACY + 84)
259#define MX50_INT_GPU2_BUSY (NR_IRQS_LEGACY + 85)
260#define MX50_INT_UART5 (NR_IRQS_LEGACY + 86)
261#define MX50_INT_FEC (NR_IRQS_LEGACY + 87)
262#define MX50_INT_OWIRE (NR_IRQS_LEGACY + 88)
263#define MX50_INT_CTI1_TG2 (NR_IRQS_LEGACY + 89)
264#define MX50_INT_SJC (NR_IRQS_LEGACY + 90)
265#define MX50_INT_DCP_CHAN1_3 (NR_IRQS_LEGACY + 91)
266#define MX50_INT_DCP_CHAN0 (NR_IRQS_LEGACY + 92)
267#define MX50_INT_PWM2 (NR_IRQS_LEGACY + 94)
268#define MX50_INT_RNGB (NR_IRQS_LEGACY + 97)
269#define MX50_INT_CTI1_TG3 (NR_IRQS_LEGACY + 98)
270#define MX50_INT_RAWNAND_BCH (NR_IRQS_LEGACY + 100)
271#define MX50_INT_RAWNAND_GPMI (NR_IRQS_LEGACY + 102)
272#define MX50_INT_GPIO5_LOW (NR_IRQS_LEGACY + 103)
273#define MX50_INT_GPIO5_HIGH (NR_IRQS_LEGACY + 104)
274#define MX50_INT_GPIO6_LOW (NR_IRQS_LEGACY + 105)
275#define MX50_INT_GPIO6_HIGH (NR_IRQS_LEGACY + 106)
276#define MX50_INT_MSHC (NR_IRQS_LEGACY + 109)
277#define MX50_INT_APBHDMA_CHAN0 (NR_IRQS_LEGACY + 110)
278#define MX50_INT_APBHDMA_CHAN1 (NR_IRQS_LEGACY + 111)
279#define MX50_INT_APBHDMA_CHAN2 (NR_IRQS_LEGACY + 112)
280#define MX50_INT_APBHDMA_CHAN3 (NR_IRQS_LEGACY + 113)
281#define MX50_INT_APBHDMA_CHAN4 (NR_IRQS_LEGACY + 114)
282#define MX50_INT_APBHDMA_CHAN5 (NR_IRQS_LEGACY + 115)
283#define MX50_INT_APBHDMA_CHAN6 (NR_IRQS_LEGACY + 116)
284#define MX50_INT_APBHDMA_CHAN7 (NR_IRQS_LEGACY + 117)
285
286#if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS)
287extern int mx50_revision(void);
288#endif
289
290#endif /* ifndef __MACH_MX50_H__ */
diff --git a/arch/arm/mach-imx/mxc.h b/arch/arm/mach-imx/mxc.h
index d78298366a91..7dce17a9fe6c 100644
--- a/arch/arm/mach-imx/mxc.h
+++ b/arch/arm/mach-imx/mxc.h
@@ -32,7 +32,6 @@
32#define MXC_CPU_MX27 27 32#define MXC_CPU_MX27 27
33#define MXC_CPU_MX31 31 33#define MXC_CPU_MX31 31
34#define MXC_CPU_MX35 35 34#define MXC_CPU_MX35 35
35#define MXC_CPU_MX50 50
36#define MXC_CPU_MX51 51 35#define MXC_CPU_MX51 51
37#define MXC_CPU_MX53 53 36#define MXC_CPU_MX53 53
38 37
@@ -126,18 +125,6 @@ extern unsigned int __mxc_cpu_type;
126# define cpu_is_mx35() (0) 125# define cpu_is_mx35() (0)
127#endif 126#endif
128 127
129#ifdef CONFIG_SOC_IMX50
130# ifdef mxc_cpu_type
131# undef mxc_cpu_type
132# define mxc_cpu_type __mxc_cpu_type
133# else
134# define mxc_cpu_type MXC_CPU_MX50
135# endif
136# define cpu_is_mx50() (mxc_cpu_type == MXC_CPU_MX50)
137#else
138# define cpu_is_mx50() (0)
139#endif
140
141#ifdef CONFIG_SOC_IMX51 128#ifdef CONFIG_SOC_IMX51
142# ifdef mxc_cpu_type 129# ifdef mxc_cpu_type
143# undef mxc_cpu_type 130# undef mxc_cpu_type
diff --git a/arch/arm/mach-imx/platsmp.c b/arch/arm/mach-imx/platsmp.c
index 3777b805b76b..b2872ec614a4 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)
@@ -92,5 +90,6 @@ struct smp_operations imx_smp_ops __initdata = {
92 .smp_boot_secondary = imx_boot_secondary, 90 .smp_boot_secondary = imx_boot_secondary,
93#ifdef CONFIG_HOTPLUG_CPU 91#ifdef CONFIG_HOTPLUG_CPU
94 .cpu_die = imx_cpu_die, 92 .cpu_die = imx_cpu_die,
93 .cpu_kill = imx_cpu_kill,
95#endif 94#endif
96}; 95};
diff --git a/arch/arm/mach-imx/pm-imx5.c b/arch/arm/mach-imx/pm-imx5.c
index 2e063c2deb9e..f67fd7ee8127 100644
--- a/arch/arm/mach-imx/pm-imx5.c
+++ b/arch/arm/mach-imx/pm-imx5.c
@@ -34,7 +34,7 @@
34 34
35/* 35/*
36 * set cpu low power mode before WFI instruction. This function is called 36 * set cpu low power mode before WFI instruction. This function is called
37 * mx5 because it can be used for mx50, mx51, and mx53. 37 * mx5 because it can be used for mx51, and mx53.
38 */ 38 */
39static void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode) 39static void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode)
40{ 40{
@@ -85,10 +85,7 @@ static void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode)
85 __raw_writel(plat_lpc, MXC_CORTEXA8_PLAT_LPC); 85 __raw_writel(plat_lpc, MXC_CORTEXA8_PLAT_LPC);
86 __raw_writel(ccm_clpcr, MXC_CCM_CLPCR); 86 __raw_writel(ccm_clpcr, MXC_CCM_CLPCR);
87 __raw_writel(arm_srpgcr, MXC_SRPG_ARM_SRPGCR); 87 __raw_writel(arm_srpgcr, MXC_SRPG_ARM_SRPGCR);
88 88 __raw_writel(arm_srpgcr, MXC_SRPG_NEON_SRPGCR);
89 /* Enable NEON SRPG for all but MX50TO1.0. */
90 if (mx50_revision() != IMX_CHIP_REVISION_1_0)
91 __raw_writel(arm_srpgcr, MXC_SRPG_NEON_SRPGCR);
92 89
93 if (stop_mode) { 90 if (stop_mode) {
94 empgc0 |= MXC_SRPGCR_PCR; 91 empgc0 |= MXC_SRPGCR_PCR;
diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c
index a17543da602d..ee42d20cba19 100644
--- a/arch/arm/mach-imx/pm-imx6q.c
+++ b/arch/arm/mach-imx/pm-imx6q.c
@@ -41,6 +41,7 @@ static int imx6q_pm_enter(suspend_state_t state)
41 cpu_suspend(0, imx6q_suspend_finish); 41 cpu_suspend(0, imx6q_suspend_finish);
42 imx_smp_prepare(); 42 imx_smp_prepare();
43 imx_gpc_post_resume(); 43 imx_gpc_post_resume();
44 imx6q_set_lpm(WAIT_CLOCKED);
44 break; 45 break;
45 default: 46 default:
46 return -EINVAL; 47 return -EINVAL;
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-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index 11e2a4145807..78f1b3814f77 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -425,7 +425,7 @@ void __init ap_init_early(void)
425 425
426#ifdef CONFIG_OF 426#ifdef CONFIG_OF
427 427
428static void __init ap_init_timer_of(void) 428static void __init ap_of_timer_init(void)
429{ 429{
430 struct device_node *node; 430 struct device_node *node;
431 const char *path; 431 const char *path;
@@ -464,10 +464,6 @@ static void __init ap_init_timer_of(void)
464 integrator_clockevent_init(rate, base, irq); 464 integrator_clockevent_init(rate, base, irq);
465} 465}
466 466
467static struct sys_timer ap_of_timer = {
468 .init = ap_init_timer_of,
469};
470
471static const struct of_device_id fpga_irq_of_match[] __initconst = { 467static const struct of_device_id fpga_irq_of_match[] __initconst = {
472 { .compatible = "arm,versatile-fpga-irq", .data = fpga_irq_of_init, }, 468 { .compatible = "arm,versatile-fpga-irq", .data = fpga_irq_of_init, },
473 { /* Sentinel */ } 469 { /* Sentinel */ }
@@ -586,7 +582,7 @@ DT_MACHINE_START(INTEGRATOR_AP_DT, "ARM Integrator/AP (Device Tree)")
586 .init_early = ap_init_early, 582 .init_early = ap_init_early,
587 .init_irq = ap_init_irq_of, 583 .init_irq = ap_init_irq_of,
588 .handle_irq = fpga_handle_irq, 584 .handle_irq = fpga_handle_irq,
589 .timer = &ap_of_timer, 585 .init_time = ap_of_timer_init,
590 .init_machine = ap_init_of, 586 .init_machine = ap_init_of,
591 .restart = integrator_restart, 587 .restart = integrator_restart,
592 .dt_compat = ap_dt_board_compat, 588 .dt_compat = ap_dt_board_compat,
@@ -638,7 +634,7 @@ static struct platform_device cfi_flash_device = {
638 .resource = &cfi_flash_resource, 634 .resource = &cfi_flash_resource,
639}; 635};
640 636
641static void __init ap_init_timer(void) 637static void __init ap_timer_init(void)
642{ 638{
643 struct clk *clk; 639 struct clk *clk;
644 unsigned long rate; 640 unsigned long rate;
@@ -657,10 +653,6 @@ static void __init ap_init_timer(void)
657 IRQ_TIMERINT1); 653 IRQ_TIMERINT1);
658} 654}
659 655
660static struct sys_timer ap_timer = {
661 .init = ap_init_timer,
662};
663
664#define INTEGRATOR_SC_VALID_INT 0x003fffff 656#define INTEGRATOR_SC_VALID_INT 0x003fffff
665 657
666static void __init ap_init_irq(void) 658static void __init ap_init_irq(void)
@@ -716,7 +708,7 @@ MACHINE_START(INTEGRATOR, "ARM-Integrator")
716 .init_early = ap_init_early, 708 .init_early = ap_init_early,
717 .init_irq = ap_init_irq, 709 .init_irq = ap_init_irq,
718 .handle_irq = fpga_handle_irq, 710 .handle_irq = fpga_handle_irq,
719 .timer = &ap_timer, 711 .init_time = ap_timer_init,
720 .init_machine = ap_init, 712 .init_machine = ap_init,
721 .restart = integrator_restart, 713 .restart = integrator_restart,
722MACHINE_END 714MACHINE_END
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 7322838c0447..4cef9a0ebbb9 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -251,7 +251,7 @@ static void __init intcp_init_early(void)
251 251
252#ifdef CONFIG_OF 252#ifdef CONFIG_OF
253 253
254static void __init intcp_timer_init_of(void) 254static void __init cp_of_timer_init(void)
255{ 255{
256 struct device_node *node; 256 struct device_node *node;
257 const char *path; 257 const char *path;
@@ -283,10 +283,6 @@ static void __init intcp_timer_init_of(void)
283 sp804_clockevents_init(base, irq, node->name); 283 sp804_clockevents_init(base, irq, node->name);
284} 284}
285 285
286static struct sys_timer cp_of_timer = {
287 .init = intcp_timer_init_of,
288};
289
290static const struct of_device_id fpga_irq_of_match[] __initconst = { 286static const struct of_device_id fpga_irq_of_match[] __initconst = {
291 { .compatible = "arm,versatile-fpga-irq", .data = fpga_irq_of_init, }, 287 { .compatible = "arm,versatile-fpga-irq", .data = fpga_irq_of_init, },
292 { /* Sentinel */ } 288 { /* Sentinel */ }
@@ -390,7 +386,7 @@ DT_MACHINE_START(INTEGRATOR_CP_DT, "ARM Integrator/CP (Device Tree)")
390 .init_early = intcp_init_early, 386 .init_early = intcp_init_early,
391 .init_irq = intcp_init_irq_of, 387 .init_irq = intcp_init_irq_of,
392 .handle_irq = fpga_handle_irq, 388 .handle_irq = fpga_handle_irq,
393 .timer = &cp_of_timer, 389 .init_time = cp_of_timer_init,
394 .init_machine = intcp_init_of, 390 .init_machine = intcp_init_of,
395 .restart = integrator_restart, 391 .restart = integrator_restart,
396 .dt_compat = intcp_dt_board_compat, 392 .dt_compat = intcp_dt_board_compat,
@@ -512,7 +508,7 @@ static void __init intcp_init_irq(void)
512#define TIMER1_VA_BASE __io_address(INTEGRATOR_TIMER1_BASE) 508#define TIMER1_VA_BASE __io_address(INTEGRATOR_TIMER1_BASE)
513#define TIMER2_VA_BASE __io_address(INTEGRATOR_TIMER2_BASE) 509#define TIMER2_VA_BASE __io_address(INTEGRATOR_TIMER2_BASE)
514 510
515static void __init intcp_timer_init(void) 511static void __init cp_timer_init(void)
516{ 512{
517 writel(0, TIMER0_VA_BASE + TIMER_CTRL); 513 writel(0, TIMER0_VA_BASE + TIMER_CTRL);
518 writel(0, TIMER1_VA_BASE + TIMER_CTRL); 514 writel(0, TIMER1_VA_BASE + TIMER_CTRL);
@@ -522,10 +518,6 @@ static void __init intcp_timer_init(void)
522 sp804_clockevents_init(TIMER1_VA_BASE, IRQ_TIMERINT1, "timer1"); 518 sp804_clockevents_init(TIMER1_VA_BASE, IRQ_TIMERINT1, "timer1");
523} 519}
524 520
525static struct sys_timer cp_timer = {
526 .init = intcp_timer_init,
527};
528
529#define INTEGRATOR_CP_MMC_IRQS { IRQ_CP_MMCIINT0, IRQ_CP_MMCIINT1 } 521#define INTEGRATOR_CP_MMC_IRQS { IRQ_CP_MMCIINT0, IRQ_CP_MMCIINT1 }
530#define INTEGRATOR_CP_AACI_IRQS { IRQ_CP_AACIINT } 522#define INTEGRATOR_CP_AACI_IRQS { IRQ_CP_AACIINT }
531 523
@@ -565,7 +557,7 @@ MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP")
565 .init_early = intcp_init_early, 557 .init_early = intcp_init_early,
566 .init_irq = intcp_init_irq, 558 .init_irq = intcp_init_irq,
567 .handle_irq = fpga_handle_irq, 559 .handle_irq = fpga_handle_irq,
568 .timer = &cp_timer, 560 .init_time = cp_timer_init,
569 .init_machine = intcp_init, 561 .init_machine = intcp_init,
570 .restart = integrator_restart, 562 .restart = integrator_restart,
571MACHINE_END 563MACHINE_END
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c
index be50e795536d..e7fcea7f3300 100644
--- a/arch/arm/mach-integrator/pci_v3.c
+++ b/arch/arm/mach-integrator/pci_v3.c
@@ -475,13 +475,12 @@ int __init pci_v3_setup(int nr, struct pci_sys_data *sys)
475{ 475{
476 int ret = 0; 476 int ret = 0;
477 477
478 if (!ap_syscon_base)
479 return -EINVAL;
480
478 if (nr == 0) { 481 if (nr == 0) {
479 sys->mem_offset = PHYS_PCI_MEM_BASE; 482 sys->mem_offset = PHYS_PCI_MEM_BASE;
480 ret = pci_v3_setup_resources(sys); 483 ret = pci_v3_setup_resources(sys);
481 /* Remap the Integrator system controller */
482 ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100);
483 if (!ap_syscon_base)
484 return -EINVAL;
485 } 484 }
486 485
487 return ret; 486 return ret;
@@ -497,6 +496,13 @@ void __init pci_v3_preinit(void)
497 unsigned int temp; 496 unsigned int temp;
498 int ret; 497 int ret;
499 498
499 /* Remap the Integrator system controller */
500 ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100);
501 if (!ap_syscon_base) {
502 pr_err("unable to remap the AP syscon for PCIv3\n");
503 return;
504 }
505
500 pcibios_min_mem = 0x00100000; 506 pcibios_min_mem = 0x00100000;
501 507
502 /* 508 /*
diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c
index e3f3e7daa79e..02a8228ac2d3 100644
--- a/arch/arm/mach-iop13xx/iq81340mc.c
+++ b/arch/arm/mach-iop13xx/iq81340mc.c
@@ -84,17 +84,13 @@ static void __init iq81340mc_timer_init(void)
84 iop_init_time(bus_freq); 84 iop_init_time(bus_freq);
85} 85}
86 86
87static struct sys_timer iq81340mc_timer = {
88 .init = iq81340mc_timer_init,
89};
90
91MACHINE_START(IQ81340MC, "Intel IQ81340MC") 87MACHINE_START(IQ81340MC, "Intel IQ81340MC")
92 /* Maintainer: Dan Williams <dan.j.williams@intel.com> */ 88 /* Maintainer: Dan Williams <dan.j.williams@intel.com> */
93 .atag_offset = 0x100, 89 .atag_offset = 0x100,
94 .init_early = iop13xx_init_early, 90 .init_early = iop13xx_init_early,
95 .map_io = iop13xx_map_io, 91 .map_io = iop13xx_map_io,
96 .init_irq = iop13xx_init_irq, 92 .init_irq = iop13xx_init_irq,
97 .timer = &iq81340mc_timer, 93 .init_time = iq81340mc_timer_init,
98 .init_machine = iq81340mc_init, 94 .init_machine = iq81340mc_init,
99 .restart = iop13xx_restart, 95 .restart = iop13xx_restart,
100MACHINE_END 96MACHINE_END
diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c
index e94744111634..1b80f10722b3 100644
--- a/arch/arm/mach-iop13xx/iq81340sc.c
+++ b/arch/arm/mach-iop13xx/iq81340sc.c
@@ -86,17 +86,13 @@ static void __init iq81340sc_timer_init(void)
86 iop_init_time(bus_freq); 86 iop_init_time(bus_freq);
87} 87}
88 88
89static struct sys_timer iq81340sc_timer = {
90 .init = iq81340sc_timer_init,
91};
92
93MACHINE_START(IQ81340SC, "Intel IQ81340SC") 89MACHINE_START(IQ81340SC, "Intel IQ81340SC")
94 /* Maintainer: Dan Williams <dan.j.williams@intel.com> */ 90 /* Maintainer: Dan Williams <dan.j.williams@intel.com> */
95 .atag_offset = 0x100, 91 .atag_offset = 0x100,
96 .init_early = iop13xx_init_early, 92 .init_early = iop13xx_init_early,
97 .map_io = iop13xx_map_io, 93 .map_io = iop13xx_map_io,
98 .init_irq = iop13xx_init_irq, 94 .init_irq = iop13xx_init_irq,
99 .timer = &iq81340sc_timer, 95 .init_time = iq81340sc_timer_init,
100 .init_machine = iq81340sc_init, 96 .init_machine = iq81340sc_init,
101 .restart = iop13xx_restart, 97 .restart = iop13xx_restart,
102MACHINE_END 98MACHINE_END
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-iop32x/em7210.c b/arch/arm/mach-iop32x/em7210.c
index 9f369f09c29d..31fbb6c61b25 100644
--- a/arch/arm/mach-iop32x/em7210.c
+++ b/arch/arm/mach-iop32x/em7210.c
@@ -40,10 +40,6 @@ static void __init em7210_timer_init(void)
40 iop_init_time(200000000); 40 iop_init_time(200000000);
41} 41}
42 42
43static struct sys_timer em7210_timer = {
44 .init = em7210_timer_init,
45};
46
47/* 43/*
48 * EM7210 RTC 44 * EM7210 RTC
49 */ 45 */
@@ -205,7 +201,7 @@ MACHINE_START(EM7210, "Lanner EM7210")
205 .atag_offset = 0x100, 201 .atag_offset = 0x100,
206 .map_io = em7210_map_io, 202 .map_io = em7210_map_io,
207 .init_irq = iop32x_init_irq, 203 .init_irq = iop32x_init_irq,
208 .timer = &em7210_timer, 204 .init_time = em7210_timer_init,
209 .init_machine = em7210_init_machine, 205 .init_machine = em7210_init_machine,
210 .restart = iop3xx_restart, 206 .restart = iop3xx_restart,
211MACHINE_END 207MACHINE_END
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c
index 02e20c3912ba..ac304705fe68 100644
--- a/arch/arm/mach-iop32x/glantank.c
+++ b/arch/arm/mach-iop32x/glantank.c
@@ -44,10 +44,6 @@ static void __init glantank_timer_init(void)
44 iop_init_time(200000000); 44 iop_init_time(200000000);
45} 45}
46 46
47static struct sys_timer glantank_timer = {
48 .init = glantank_timer_init,
49};
50
51 47
52/* 48/*
53 * GLAN Tank I/O. 49 * GLAN Tank I/O.
@@ -209,7 +205,7 @@ MACHINE_START(GLANTANK, "GLAN Tank")
209 .atag_offset = 0x100, 205 .atag_offset = 0x100,
210 .map_io = glantank_map_io, 206 .map_io = glantank_map_io,
211 .init_irq = iop32x_init_irq, 207 .init_irq = iop32x_init_irq,
212 .timer = &glantank_timer, 208 .init_time = glantank_timer_init,
213 .init_machine = glantank_init_machine, 209 .init_machine = glantank_init_machine,
214 .restart = iop3xx_restart, 210 .restart = iop3xx_restart,
215MACHINE_END 211MACHINE_END
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c
index ddd1c7ecfe57..f2cd2966212d 100644
--- a/arch/arm/mach-iop32x/iq31244.c
+++ b/arch/arm/mach-iop32x/iq31244.c
@@ -75,10 +75,6 @@ static void __init iq31244_timer_init(void)
75 } 75 }
76} 76}
77 77
78static struct sys_timer iq31244_timer = {
79 .init = iq31244_timer_init,
80};
81
82 78
83/* 79/*
84 * IQ31244 I/O. 80 * IQ31244 I/O.
@@ -314,7 +310,7 @@ MACHINE_START(IQ31244, "Intel IQ31244")
314 .atag_offset = 0x100, 310 .atag_offset = 0x100,
315 .map_io = iq31244_map_io, 311 .map_io = iq31244_map_io,
316 .init_irq = iop32x_init_irq, 312 .init_irq = iop32x_init_irq,
317 .timer = &iq31244_timer, 313 .init_time = iq31244_timer_init,
318 .init_machine = iq31244_init_machine, 314 .init_machine = iq31244_init_machine,
319 .restart = iop3xx_restart, 315 .restart = iop3xx_restart,
320MACHINE_END 316MACHINE_END
@@ -329,7 +325,7 @@ MACHINE_START(EP80219, "Intel EP80219")
329 .atag_offset = 0x100, 325 .atag_offset = 0x100,
330 .map_io = iq31244_map_io, 326 .map_io = iq31244_map_io,
331 .init_irq = iop32x_init_irq, 327 .init_irq = iop32x_init_irq,
332 .timer = &iq31244_timer, 328 .init_time = iq31244_timer_init,
333 .init_machine = iq31244_init_machine, 329 .init_machine = iq31244_init_machine,
334 .restart = iop3xx_restart, 330 .restart = iop3xx_restart,
335MACHINE_END 331MACHINE_END
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c
index bf155e6a3b45..015435de90dd 100644
--- a/arch/arm/mach-iop32x/iq80321.c
+++ b/arch/arm/mach-iop32x/iq80321.c
@@ -43,10 +43,6 @@ static void __init iq80321_timer_init(void)
43 iop_init_time(200000000); 43 iop_init_time(200000000);
44} 44}
45 45
46static struct sys_timer iq80321_timer = {
47 .init = iq80321_timer_init,
48};
49
50 46
51/* 47/*
52 * IQ80321 I/O. 48 * IQ80321 I/O.
@@ -188,7 +184,7 @@ MACHINE_START(IQ80321, "Intel IQ80321")
188 .atag_offset = 0x100, 184 .atag_offset = 0x100,
189 .map_io = iq80321_map_io, 185 .map_io = iq80321_map_io,
190 .init_irq = iop32x_init_irq, 186 .init_irq = iop32x_init_irq,
191 .timer = &iq80321_timer, 187 .init_time = iq80321_timer_init,
192 .init_machine = iq80321_init_machine, 188 .init_machine = iq80321_init_machine,
193 .restart = iop3xx_restart, 189 .restart = iop3xx_restart,
194MACHINE_END 190MACHINE_END
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
index 5a7ae91e8849..ea0984a7449e 100644
--- a/arch/arm/mach-iop32x/n2100.c
+++ b/arch/arm/mach-iop32x/n2100.c
@@ -50,10 +50,6 @@ static void __init n2100_timer_init(void)
50 iop_init_time(198000000); 50 iop_init_time(198000000);
51} 51}
52 52
53static struct sys_timer n2100_timer = {
54 .init = n2100_timer_init,
55};
56
57 53
58/* 54/*
59 * N2100 I/O. 55 * N2100 I/O.
@@ -337,7 +333,7 @@ MACHINE_START(N2100, "Thecus N2100")
337 .atag_offset = 0x100, 333 .atag_offset = 0x100,
338 .map_io = n2100_map_io, 334 .map_io = n2100_map_io,
339 .init_irq = iop32x_init_irq, 335 .init_irq = iop32x_init_irq,
340 .timer = &n2100_timer, 336 .init_time = n2100_timer_init,
341 .init_machine = n2100_init_machine, 337 .init_machine = n2100_init_machine,
342 .restart = n2100_restart, 338 .restart = n2100_restart,
343MACHINE_END 339MACHINE_END
diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c
index e74a7debe793..c43304a10fa7 100644
--- a/arch/arm/mach-iop33x/iq80331.c
+++ b/arch/arm/mach-iop33x/iq80331.c
@@ -45,10 +45,6 @@ static void __init iq80331_timer_init(void)
45 iop_init_time(266000000); 45 iop_init_time(266000000);
46} 46}
47 47
48static struct sys_timer iq80331_timer = {
49 .init = iq80331_timer_init,
50};
51
52 48
53/* 49/*
54 * IQ80331 PCI. 50 * IQ80331 PCI.
@@ -143,7 +139,7 @@ MACHINE_START(IQ80331, "Intel IQ80331")
143 .atag_offset = 0x100, 139 .atag_offset = 0x100,
144 .map_io = iop3xx_map_io, 140 .map_io = iop3xx_map_io,
145 .init_irq = iop33x_init_irq, 141 .init_irq = iop33x_init_irq,
146 .timer = &iq80331_timer, 142 .init_time = iq80331_timer_init,
147 .init_machine = iq80331_init_machine, 143 .init_machine = iq80331_init_machine,
148 .restart = iop3xx_restart, 144 .restart = iop3xx_restart,
149MACHINE_END 145MACHINE_END
diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c
index e2f5beece6e8..8192987e78e5 100644
--- a/arch/arm/mach-iop33x/iq80332.c
+++ b/arch/arm/mach-iop33x/iq80332.c
@@ -45,10 +45,6 @@ static void __init iq80332_timer_init(void)
45 iop_init_time(266000000); 45 iop_init_time(266000000);
46} 46}
47 47
48static struct sys_timer iq80332_timer = {
49 .init = iq80332_timer_init,
50};
51
52 48
53/* 49/*
54 * IQ80332 PCI. 50 * IQ80332 PCI.
@@ -143,7 +139,7 @@ MACHINE_START(IQ80332, "Intel IQ80332")
143 .atag_offset = 0x100, 139 .atag_offset = 0x100,
144 .map_io = iop3xx_map_io, 140 .map_io = iop3xx_map_io,
145 .init_irq = iop33x_init_irq, 141 .init_irq = iop33x_init_irq,
146 .timer = &iq80332_timer, 142 .init_time = iq80332_timer_init,
147 .init_machine = iq80332_init_machine, 143 .init_machine = iq80332_init_machine,
148 .restart = iop3xx_restart, 144 .restart = iop3xx_restart,
149MACHINE_END 145MACHINE_END
diff --git a/arch/arm/mach-ixp4xx/avila-setup.c b/arch/arm/mach-ixp4xx/avila-setup.c
index 90e42e9982cb..6beec150c060 100644
--- a/arch/arm/mach-ixp4xx/avila-setup.c
+++ b/arch/arm/mach-ixp4xx/avila-setup.c
@@ -167,7 +167,7 @@ MACHINE_START(AVILA, "Gateworks Avila Network Platform")
167 .map_io = ixp4xx_map_io, 167 .map_io = ixp4xx_map_io,
168 .init_early = ixp4xx_init_early, 168 .init_early = ixp4xx_init_early,
169 .init_irq = ixp4xx_init_irq, 169 .init_irq = ixp4xx_init_irq,
170 .timer = &ixp4xx_timer, 170 .init_time = ixp4xx_timer_init,
171 .atag_offset = 0x100, 171 .atag_offset = 0x100,
172 .init_machine = avila_init, 172 .init_machine = avila_init,
173#if defined(CONFIG_PCI) 173#if defined(CONFIG_PCI)
@@ -187,7 +187,7 @@ MACHINE_START(LOFT, "Giant Shoulder Inc Loft board")
187 .map_io = ixp4xx_map_io, 187 .map_io = ixp4xx_map_io,
188 .init_early = ixp4xx_init_early, 188 .init_early = ixp4xx_init_early,
189 .init_irq = ixp4xx_init_irq, 189 .init_irq = ixp4xx_init_irq,
190 .timer = &ixp4xx_timer, 190 .init_time = ixp4xx_timer_init,
191 .atag_offset = 0x100, 191 .atag_offset = 0x100,
192 .init_machine = avila_init, 192 .init_machine = avila_init,
193#if defined(CONFIG_PCI) 193#if defined(CONFIG_PCI)
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 8c0c0e2d0727..1dbeb7c99d58 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -307,10 +307,6 @@ void __init ixp4xx_timer_init(void)
307 ixp4xx_clockevent_init(); 307 ixp4xx_clockevent_init();
308} 308}
309 309
310struct sys_timer ixp4xx_timer = {
311 .init = ixp4xx_timer_init,
312};
313
314static struct pxa2xx_udc_mach_info ixp4xx_udc_info; 310static struct pxa2xx_udc_mach_info ixp4xx_udc_info;
315 311
316void __init ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info) 312void __init ixp4xx_set_udc_info(struct pxa2xx_udc_mach_info *info)
@@ -523,22 +519,15 @@ static struct clock_event_device clockevent_ixp4xx = {
523 .name = "ixp4xx timer1", 519 .name = "ixp4xx timer1",
524 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, 520 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
525 .rating = 200, 521 .rating = 200,
526 .shift = 24,
527 .set_mode = ixp4xx_set_mode, 522 .set_mode = ixp4xx_set_mode,
528 .set_next_event = ixp4xx_set_next_event, 523 .set_next_event = ixp4xx_set_next_event,
529}; 524};
530 525
531static void __init ixp4xx_clockevent_init(void) 526static void __init ixp4xx_clockevent_init(void)
532{ 527{
533 clockevent_ixp4xx.mult = div_sc(IXP4XX_TIMER_FREQ, NSEC_PER_SEC,
534 clockevent_ixp4xx.shift);
535 clockevent_ixp4xx.max_delta_ns =
536 clockevent_delta2ns(0xfffffffe, &clockevent_ixp4xx);
537 clockevent_ixp4xx.min_delta_ns =
538 clockevent_delta2ns(0xf, &clockevent_ixp4xx);
539 clockevent_ixp4xx.cpumask = cpumask_of(0); 528 clockevent_ixp4xx.cpumask = cpumask_of(0);
540 529 clockevents_config_and_register(&clockevent_ixp4xx, IXP4XX_TIMER_FREQ,
541 clockevents_register_device(&clockevent_ixp4xx); 530 0xf, 0xfffffffe);
542} 531}
543 532
544void ixp4xx_restart(char mode, const char *cmd) 533void ixp4xx_restart(char mode, const char *cmd)
diff --git a/arch/arm/mach-ixp4xx/coyote-setup.c b/arch/arm/mach-ixp4xx/coyote-setup.c
index 1b83110028d6..820cae8608fc 100644
--- a/arch/arm/mach-ixp4xx/coyote-setup.c
+++ b/arch/arm/mach-ixp4xx/coyote-setup.c
@@ -112,7 +112,7 @@ MACHINE_START(ADI_COYOTE, "ADI Engineering Coyote")
112 .map_io = ixp4xx_map_io, 112 .map_io = ixp4xx_map_io,
113 .init_early = ixp4xx_init_early, 113 .init_early = ixp4xx_init_early,
114 .init_irq = ixp4xx_init_irq, 114 .init_irq = ixp4xx_init_irq,
115 .timer = &ixp4xx_timer, 115 .init_time = ixp4xx_timer_init,
116 .atag_offset = 0x100, 116 .atag_offset = 0x100,
117 .init_machine = coyote_init, 117 .init_machine = coyote_init,
118#if defined(CONFIG_PCI) 118#if defined(CONFIG_PCI)
@@ -132,7 +132,7 @@ MACHINE_START(IXDPG425, "Intel IXDPG425")
132 .map_io = ixp4xx_map_io, 132 .map_io = ixp4xx_map_io,
133 .init_early = ixp4xx_init_early, 133 .init_early = ixp4xx_init_early,
134 .init_irq = ixp4xx_init_irq, 134 .init_irq = ixp4xx_init_irq,
135 .timer = &ixp4xx_timer, 135 .init_time = ixp4xx_timer_init,
136 .atag_offset = 0x100, 136 .atag_offset = 0x100,
137 .init_machine = coyote_init, 137 .init_machine = coyote_init,
138 .restart = ixp4xx_restart, 138 .restart = ixp4xx_restart,
diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c
index 97a0af8f1955..5d413f8c5700 100644
--- a/arch/arm/mach-ixp4xx/dsmg600-setup.c
+++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c
@@ -226,10 +226,6 @@ static void __init dsmg600_timer_init(void)
226 ixp4xx_timer_init(); 226 ixp4xx_timer_init();
227} 227}
228 228
229static struct sys_timer dsmg600_timer = {
230 .init = dsmg600_timer_init,
231};
232
233static void __init dsmg600_init(void) 229static void __init dsmg600_init(void)
234{ 230{
235 ixp4xx_sys_init(); 231 ixp4xx_sys_init();
@@ -282,7 +278,7 @@ MACHINE_START(DSMG600, "D-Link DSM-G600 RevA")
282 .map_io = ixp4xx_map_io, 278 .map_io = ixp4xx_map_io,
283 .init_early = ixp4xx_init_early, 279 .init_early = ixp4xx_init_early,
284 .init_irq = ixp4xx_init_irq, 280 .init_irq = ixp4xx_init_irq,
285 .timer = &dsmg600_timer, 281 .init_time = dsmg600_timer_init,
286 .init_machine = dsmg600_init, 282 .init_machine = dsmg600_init,
287#if defined(CONFIG_PCI) 283#if defined(CONFIG_PCI)
288 .dma_zone_size = SZ_64M, 284 .dma_zone_size = SZ_64M,
diff --git a/arch/arm/mach-ixp4xx/fsg-setup.c b/arch/arm/mach-ixp4xx/fsg-setup.c
index 9175a25a7511..429966b756ed 100644
--- a/arch/arm/mach-ixp4xx/fsg-setup.c
+++ b/arch/arm/mach-ixp4xx/fsg-setup.c
@@ -272,7 +272,7 @@ MACHINE_START(FSG, "Freecom FSG-3")
272 .map_io = ixp4xx_map_io, 272 .map_io = ixp4xx_map_io,
273 .init_early = ixp4xx_init_early, 273 .init_early = ixp4xx_init_early,
274 .init_irq = ixp4xx_init_irq, 274 .init_irq = ixp4xx_init_irq,
275 .timer = &ixp4xx_timer, 275 .init_time = ixp4xx_timer_init,
276 .atag_offset = 0x100, 276 .atag_offset = 0x100,
277 .init_machine = fsg_init, 277 .init_machine = fsg_init,
278#if defined(CONFIG_PCI) 278#if defined(CONFIG_PCI)
diff --git a/arch/arm/mach-ixp4xx/gateway7001-setup.c b/arch/arm/mach-ixp4xx/gateway7001-setup.c
index 033c71758953..3d24b3fcee87 100644
--- a/arch/arm/mach-ixp4xx/gateway7001-setup.c
+++ b/arch/arm/mach-ixp4xx/gateway7001-setup.c
@@ -99,7 +99,7 @@ MACHINE_START(GATEWAY7001, "Gateway 7001 AP")
99 .map_io = ixp4xx_map_io, 99 .map_io = ixp4xx_map_io,
100 .init_early = ixp4xx_init_early, 100 .init_early = ixp4xx_init_early,
101 .init_irq = ixp4xx_init_irq, 101 .init_irq = ixp4xx_init_irq,
102 .timer = &ixp4xx_timer, 102 .init_time = ixp4xx_timer_init,
103 .atag_offset = 0x100, 103 .atag_offset = 0x100,
104 .init_machine = gateway7001_init, 104 .init_machine = gateway7001_init,
105#if defined(CONFIG_PCI) 105#if defined(CONFIG_PCI)
diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c
index 53b8348dfcc2..e54ff491c105 100644
--- a/arch/arm/mach-ixp4xx/goramo_mlr.c
+++ b/arch/arm/mach-ixp4xx/goramo_mlr.c
@@ -498,7 +498,7 @@ MACHINE_START(GORAMO_MLR, "MultiLink")
498 .map_io = ixp4xx_map_io, 498 .map_io = ixp4xx_map_io,
499 .init_early = ixp4xx_init_early, 499 .init_early = ixp4xx_init_early,
500 .init_irq = ixp4xx_init_irq, 500 .init_irq = ixp4xx_init_irq,
501 .timer = &ixp4xx_timer, 501 .init_time = ixp4xx_timer_init,
502 .atag_offset = 0x100, 502 .atag_offset = 0x100,
503 .init_machine = gmlr_init, 503 .init_machine = gmlr_init,
504#if defined(CONFIG_PCI) 504#if defined(CONFIG_PCI)
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-setup.c b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
index 18ebc6be7969..16a12994fb53 100644
--- a/arch/arm/mach-ixp4xx/gtwx5715-setup.c
+++ b/arch/arm/mach-ixp4xx/gtwx5715-setup.c
@@ -167,7 +167,7 @@ MACHINE_START(GTWX5715, "Gemtek GTWX5715 (Linksys WRV54G)")
167 .map_io = ixp4xx_map_io, 167 .map_io = ixp4xx_map_io,
168 .init_early = ixp4xx_init_early, 168 .init_early = ixp4xx_init_early,
169 .init_irq = ixp4xx_init_irq, 169 .init_irq = ixp4xx_init_irq,
170 .timer = &ixp4xx_timer, 170 .init_time = ixp4xx_timer_init,
171 .atag_offset = 0x100, 171 .atag_offset = 0x100,
172 .init_machine = gtwx5715_init, 172 .init_machine = gtwx5715_init,
173#if defined(CONFIG_PCI) 173#if defined(CONFIG_PCI)
diff --git a/arch/arm/mach-ixp4xx/include/mach/platform.h b/arch/arm/mach-ixp4xx/include/mach/platform.h
index 5bce94aacca9..db5afb69c123 100644
--- a/arch/arm/mach-ixp4xx/include/mach/platform.h
+++ b/arch/arm/mach-ixp4xx/include/mach/platform.h
@@ -89,8 +89,6 @@ struct ixp4xx_pata_data {
89 void __iomem *cs1; 89 void __iomem *cs1;
90}; 90};
91 91
92struct sys_timer;
93
94#define IXP4XX_ETH_NPEA 0x00 92#define IXP4XX_ETH_NPEA 0x00
95#define IXP4XX_ETH_NPEB 0x10 93#define IXP4XX_ETH_NPEB 0x10
96#define IXP4XX_ETH_NPEC 0x20 94#define IXP4XX_ETH_NPEC 0x20
@@ -125,7 +123,6 @@ extern void ixp4xx_init_early(void);
125extern void ixp4xx_init_irq(void); 123extern void ixp4xx_init_irq(void);
126extern void ixp4xx_sys_init(void); 124extern void ixp4xx_sys_init(void);
127extern void ixp4xx_timer_init(void); 125extern void ixp4xx_timer_init(void);
128extern struct sys_timer ixp4xx_timer;
129extern void ixp4xx_restart(char, const char *); 126extern void ixp4xx_restart(char, const char *);
130extern void ixp4xx_pci_preinit(void); 127extern void ixp4xx_pci_preinit(void);
131struct pci_sys_data; 128struct pci_sys_data;
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index 108a9d3f382d..22d688b7d513 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -252,7 +252,7 @@ MACHINE_START(IXDP425, "Intel IXDP425 Development Platform")
252 .map_io = ixp4xx_map_io, 252 .map_io = ixp4xx_map_io,
253 .init_early = ixp4xx_init_early, 253 .init_early = ixp4xx_init_early,
254 .init_irq = ixp4xx_init_irq, 254 .init_irq = ixp4xx_init_irq,
255 .timer = &ixp4xx_timer, 255 .init_time = ixp4xx_timer_init,
256 .atag_offset = 0x100, 256 .atag_offset = 0x100,
257 .init_machine = ixdp425_init, 257 .init_machine = ixdp425_init,
258#if defined(CONFIG_PCI) 258#if defined(CONFIG_PCI)
@@ -268,7 +268,7 @@ MACHINE_START(IXDP465, "Intel IXDP465 Development Platform")
268 .map_io = ixp4xx_map_io, 268 .map_io = ixp4xx_map_io,
269 .init_early = ixp4xx_init_early, 269 .init_early = ixp4xx_init_early,
270 .init_irq = ixp4xx_init_irq, 270 .init_irq = ixp4xx_init_irq,
271 .timer = &ixp4xx_timer, 271 .init_time = ixp4xx_timer_init,
272 .atag_offset = 0x100, 272 .atag_offset = 0x100,
273 .init_machine = ixdp425_init, 273 .init_machine = ixdp425_init,
274#if defined(CONFIG_PCI) 274#if defined(CONFIG_PCI)
@@ -283,7 +283,7 @@ MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform")
283 .map_io = ixp4xx_map_io, 283 .map_io = ixp4xx_map_io,
284 .init_early = ixp4xx_init_early, 284 .init_early = ixp4xx_init_early,
285 .init_irq = ixp4xx_init_irq, 285 .init_irq = ixp4xx_init_irq,
286 .timer = &ixp4xx_timer, 286 .init_time = ixp4xx_timer_init,
287 .atag_offset = 0x100, 287 .atag_offset = 0x100,
288 .init_machine = ixdp425_init, 288 .init_machine = ixdp425_init,
289#if defined(CONFIG_PCI) 289#if defined(CONFIG_PCI)
@@ -298,7 +298,7 @@ MACHINE_START(KIXRP435, "Intel KIXRP435 Reference Platform")
298 .map_io = ixp4xx_map_io, 298 .map_io = ixp4xx_map_io,
299 .init_early = ixp4xx_init_early, 299 .init_early = ixp4xx_init_early,
300 .init_irq = ixp4xx_init_irq, 300 .init_irq = ixp4xx_init_irq,
301 .timer = &ixp4xx_timer, 301 .init_time = ixp4xx_timer_init,
302 .atag_offset = 0x100, 302 .atag_offset = 0x100,
303 .init_machine = ixdp425_init, 303 .init_machine = ixdp425_init,
304#if defined(CONFIG_PCI) 304#if defined(CONFIG_PCI)
diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
index 33cb0955b6bf..ed667ce9f576 100644
--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
+++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
@@ -317,7 +317,7 @@ MACHINE_START(NAS100D, "Iomega NAS 100d")
317 .map_io = ixp4xx_map_io, 317 .map_io = ixp4xx_map_io,
318 .init_early = ixp4xx_init_early, 318 .init_early = ixp4xx_init_early,
319 .init_irq = ixp4xx_init_irq, 319 .init_irq = ixp4xx_init_irq,
320 .timer = &ixp4xx_timer, 320 .init_time = ixp4xx_timer_init,
321 .init_machine = nas100d_init, 321 .init_machine = nas100d_init,
322#if defined(CONFIG_PCI) 322#if defined(CONFIG_PCI)
323 .dma_zone_size = SZ_64M, 323 .dma_zone_size = SZ_64M,
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c
index e2903faaebb3..7e55236c26ea 100644
--- a/arch/arm/mach-ixp4xx/nslu2-setup.c
+++ b/arch/arm/mach-ixp4xx/nslu2-setup.c
@@ -232,10 +232,6 @@ static void __init nslu2_timer_init(void)
232 ixp4xx_timer_init(); 232 ixp4xx_timer_init();
233} 233}
234 234
235static struct sys_timer nslu2_timer = {
236 .init = nslu2_timer_init,
237};
238
239static void __init nslu2_init(void) 235static void __init nslu2_init(void)
240{ 236{
241 uint8_t __iomem *f; 237 uint8_t __iomem *f;
@@ -303,7 +299,7 @@ MACHINE_START(NSLU2, "Linksys NSLU2")
303 .map_io = ixp4xx_map_io, 299 .map_io = ixp4xx_map_io,
304 .init_early = ixp4xx_init_early, 300 .init_early = ixp4xx_init_early,
305 .init_irq = ixp4xx_init_irq, 301 .init_irq = ixp4xx_init_irq,
306 .timer = &nslu2_timer, 302 .init_time = nslu2_timer_init,
307 .init_machine = nslu2_init, 303 .init_machine = nslu2_init,
308#if defined(CONFIG_PCI) 304#if defined(CONFIG_PCI)
309 .dma_zone_size = SZ_64M, 305 .dma_zone_size = SZ_64M,
diff --git a/arch/arm/mach-ixp4xx/omixp-setup.c b/arch/arm/mach-ixp4xx/omixp-setup.c
index 158ddb79821d..46a89f5e8269 100644
--- a/arch/arm/mach-ixp4xx/omixp-setup.c
+++ b/arch/arm/mach-ixp4xx/omixp-setup.c
@@ -245,7 +245,7 @@ MACHINE_START(DEVIXP, "Omicron DEVIXP")
245 .map_io = ixp4xx_map_io, 245 .map_io = ixp4xx_map_io,
246 .init_early = ixp4xx_init_early, 246 .init_early = ixp4xx_init_early,
247 .init_irq = ixp4xx_init_irq, 247 .init_irq = ixp4xx_init_irq,
248 .timer = &ixp4xx_timer, 248 .init_time = ixp4xx_timer_init,
249 .init_machine = omixp_init, 249 .init_machine = omixp_init,
250 .restart = ixp4xx_restart, 250 .restart = ixp4xx_restart,
251MACHINE_END 251MACHINE_END
@@ -257,7 +257,7 @@ MACHINE_START(MICCPT, "Omicron MICCPT")
257 .map_io = ixp4xx_map_io, 257 .map_io = ixp4xx_map_io,
258 .init_early = ixp4xx_init_early, 258 .init_early = ixp4xx_init_early,
259 .init_irq = ixp4xx_init_irq, 259 .init_irq = ixp4xx_init_irq,
260 .timer = &ixp4xx_timer, 260 .init_time = ixp4xx_timer_init,
261 .init_machine = omixp_init, 261 .init_machine = omixp_init,
262#if defined(CONFIG_PCI) 262#if defined(CONFIG_PCI)
263 .dma_zone_size = SZ_64M, 263 .dma_zone_size = SZ_64M,
@@ -272,7 +272,7 @@ MACHINE_START(MIC256, "Omicron MIC256")
272 .map_io = ixp4xx_map_io, 272 .map_io = ixp4xx_map_io,
273 .init_early = ixp4xx_init_early, 273 .init_early = ixp4xx_init_early,
274 .init_irq = ixp4xx_init_irq, 274 .init_irq = ixp4xx_init_irq,
275 .timer = &ixp4xx_timer, 275 .init_time = ixp4xx_timer_init,
276 .init_machine = omixp_init, 276 .init_machine = omixp_init,
277 .restart = ixp4xx_restart, 277 .restart = ixp4xx_restart,
278MACHINE_END 278MACHINE_END
diff --git a/arch/arm/mach-ixp4xx/vulcan-setup.c b/arch/arm/mach-ixp4xx/vulcan-setup.c
index 2798f435aaf4..d42730a1d4ab 100644
--- a/arch/arm/mach-ixp4xx/vulcan-setup.c
+++ b/arch/arm/mach-ixp4xx/vulcan-setup.c
@@ -239,7 +239,7 @@ MACHINE_START(ARCOM_VULCAN, "Arcom/Eurotech Vulcan")
239 .map_io = ixp4xx_map_io, 239 .map_io = ixp4xx_map_io,
240 .init_early = ixp4xx_init_early, 240 .init_early = ixp4xx_init_early,
241 .init_irq = ixp4xx_init_irq, 241 .init_irq = ixp4xx_init_irq,
242 .timer = &ixp4xx_timer, 242 .init_time = ixp4xx_timer_init,
243 .atag_offset = 0x100, 243 .atag_offset = 0x100,
244 .init_machine = vulcan_init, 244 .init_machine = vulcan_init,
245#if defined(CONFIG_PCI) 245#if defined(CONFIG_PCI)
diff --git a/arch/arm/mach-ixp4xx/wg302v2-setup.c b/arch/arm/mach-ixp4xx/wg302v2-setup.c
index a785175b115b..8f9ea2f3a9a5 100644
--- a/arch/arm/mach-ixp4xx/wg302v2-setup.c
+++ b/arch/arm/mach-ixp4xx/wg302v2-setup.c
@@ -100,7 +100,7 @@ MACHINE_START(WG302V2, "Netgear WG302 v2 / WAG302 v2")
100 .map_io = ixp4xx_map_io, 100 .map_io = ixp4xx_map_io,
101 .init_early = ixp4xx_init_early, 101 .init_early = ixp4xx_init_early,
102 .init_irq = ixp4xx_init_irq, 102 .init_irq = ixp4xx_init_irq,
103 .timer = &ixp4xx_timer, 103 .init_time = ixp4xx_timer_init,
104 .atag_offset = 0x100, 104 .atag_offset = 0x100,
105 .init_machine = wg302v2_init, 105 .init_machine = wg302v2_init,
106#if defined(CONFIG_PCI) 106#if defined(CONFIG_PCI)
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index ff4150a2ad05..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)
@@ -179,7 +183,7 @@ DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)")
179 .map_io = kirkwood_map_io, 183 .map_io = kirkwood_map_io,
180 .init_early = kirkwood_init_early, 184 .init_early = kirkwood_init_early,
181 .init_irq = orion_dt_init_irq, 185 .init_irq = orion_dt_init_irq,
182 .timer = &kirkwood_timer, 186 .init_time = kirkwood_timer_init,
183 .init_machine = kirkwood_dt_init, 187 .init_machine = kirkwood_dt_init,
184 .restart = kirkwood_restart, 188 .restart = kirkwood_restart,
185 .dt_compat = kirkwood_dt_board_compat, 189 .dt_compat = kirkwood_dt_board_compat,
diff --git a/arch/arm/mach-kirkwood/board-ib62x0.c b/arch/arm/mach-kirkwood/board-ib62x0.c
index 9f6f496380d8..9a857ae83984 100644
--- a/arch/arm/mach-kirkwood/board-ib62x0.c
+++ b/arch/arm/mach-kirkwood/board-ib62x0.c
@@ -14,7 +14,6 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/mv643xx_eth.h> 16#include <linux/mv643xx_eth.h>
17#include <linux/input.h>
18#include "common.h" 17#include "common.h"
19 18
20static struct mv643xx_eth_platform_data ib62x0_ge00_data = { 19static struct mv643xx_eth_platform_data ib62x0_ge00_data = {
diff --git a/arch/arm/mach-kirkwood/board-mplcec4.c b/arch/arm/mach-kirkwood/board-mplcec4.c
index 56bfe5a1605a..3264925b8318 100644
--- a/arch/arm/mach-kirkwood/board-mplcec4.c
+++ b/arch/arm/mach-kirkwood/board-mplcec4.c
@@ -14,7 +14,6 @@
14#include <linux/mv643xx_eth.h> 14#include <linux/mv643xx_eth.h>
15#include <linux/platform_data/mmc-mvsdio.h> 15#include <linux/platform_data/mmc-mvsdio.h>
16#include "common.h" 16#include "common.h"
17#include "mpp.h"
18 17
19static struct mv643xx_eth_platform_data mplcec4_ge00_data = { 18static struct mv643xx_eth_platform_data mplcec4_ge00_data = {
20 .phy_addr = MV643XX_ETH_PHY_ADDR(1), 19 .phy_addr = MV643XX_ETH_PHY_ADDR(1),
diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c
index 8821720ab5a4..f4632a809f68 100644
--- a/arch/arm/mach-kirkwood/board-ns2.c
+++ b/arch/arm/mach-kirkwood/board-ns2.c
@@ -18,47 +18,11 @@
18#include <linux/gpio.h> 18#include <linux/gpio.h>
19#include <linux/of.h> 19#include <linux/of.h>
20#include "common.h" 20#include "common.h"
21#include "mpp.h"
22 21
23static struct mv643xx_eth_platform_data ns2_ge00_data = { 22static struct mv643xx_eth_platform_data ns2_ge00_data = {
24 .phy_addr = MV643XX_ETH_PHY_ADDR(8), 23 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
25}; 24};
26 25
27static unsigned int ns2_mpp_config[] __initdata = {
28 MPP0_SPI_SCn,
29 MPP1_SPI_MOSI,
30 MPP2_SPI_SCK,
31 MPP3_SPI_MISO,
32 MPP4_NF_IO6,
33 MPP5_NF_IO7,
34 MPP6_SYSRST_OUTn,
35 MPP7_GPO, /* Fan speed (bit 1) */
36 MPP8_TW0_SDA,
37 MPP9_TW0_SCK,
38 MPP10_UART0_TXD,
39 MPP11_UART0_RXD,
40 MPP12_GPO, /* Red led */
41 MPP14_GPIO, /* USB fuse */
42 MPP16_GPIO, /* SATA 0 power */
43 MPP17_GPIO, /* SATA 1 power */
44 MPP18_NF_IO0,
45 MPP19_NF_IO1,
46 MPP20_SATA1_ACTn,
47 MPP21_SATA0_ACTn,
48 MPP22_GPIO, /* Fan speed (bit 0) */
49 MPP23_GPIO, /* Fan power */
50 MPP24_GPIO, /* USB mode select */
51 MPP25_GPIO, /* Fan rotation fail */
52 MPP26_GPIO, /* USB device vbus */
53 MPP28_GPIO, /* USB enable host vbus */
54 MPP29_GPIO, /* Blue led (slow register) */
55 MPP30_GPIO, /* Blue led (command register) */
56 MPP31_GPIO, /* Board power off */
57 MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */
58 MPP33_GPO, /* Fan speed (bit 2) */
59 0
60};
61
62#define NS2_GPIO_POWER_OFF 31 26#define NS2_GPIO_POWER_OFF 31
63 27
64static void ns2_power_off(void) 28static void ns2_power_off(void)
@@ -71,8 +35,6 @@ void __init ns2_init(void)
71 /* 35 /*
72 * Basic setup. Needs to be called early. 36 * Basic setup. Needs to be called early.
73 */ 37 */
74 kirkwood_mpp_conf(ns2_mpp_config);
75
76 if (of_machine_is_compatible("lacie,netspace_lite_v2") || 38 if (of_machine_is_compatible("lacie,netspace_lite_v2") ||
77 of_machine_is_compatible("lacie,netspace_mini_v2")) 39 of_machine_is_compatible("lacie,netspace_mini_v2"))
78 ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); 40 ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
diff --git a/arch/arm/mach-kirkwood/board-nsa310.c b/arch/arm/mach-kirkwood/board-nsa310.c
index f58d2e1a4042..61c4b189d067 100644
--- a/arch/arm/mach-kirkwood/board-nsa310.c
+++ b/arch/arm/mach-kirkwood/board-nsa310.c
@@ -10,12 +10,9 @@
10 10
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/i2c.h>
14#include <linux/gpio.h> 13#include <linux/gpio.h>
15
16#include <asm/mach-types.h>
17#include <asm/mach/arch.h>
18#include <mach/kirkwood.h> 14#include <mach/kirkwood.h>
15#include <linux/of.h>
19#include "common.h" 16#include "common.h"
20#include "mpp.h" 17#include "mpp.h"
21 18
@@ -79,14 +76,10 @@ static void __init nsa310_gpio_init(void)
79 76
80void __init nsa310_init(void) 77void __init nsa310_init(void)
81{ 78{
82 u32 dev, rev;
83
84 kirkwood_mpp_conf(nsa310_mpp_config); 79 kirkwood_mpp_conf(nsa310_mpp_config);
85 80
86 nsa310_gpio_init(); 81 nsa310_gpio_init();
87 82
88 kirkwood_pcie_id(&dev, &rev);
89
90 i2c_register_board_info(0, ARRAY_AND_SIZE(nsa310_i2c_info)); 83 i2c_register_board_info(0, ARRAY_AND_SIZE(nsa310_i2c_info));
91} 84}
92 85
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/common.c b/arch/arm/mach-kirkwood/common.c
index bac21a554c91..b5ad4dff6b12 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -530,7 +530,7 @@ static int __init kirkwood_find_tclk(void)
530 return 166666667; 530 return 166666667;
531} 531}
532 532
533static void __init kirkwood_timer_init(void) 533void __init kirkwood_timer_init(void)
534{ 534{
535 kirkwood_tclk = kirkwood_find_tclk(); 535 kirkwood_tclk = kirkwood_find_tclk();
536 536
@@ -538,10 +538,6 @@ static void __init kirkwood_timer_init(void)
538 IRQ_KIRKWOOD_BRIDGE, kirkwood_tclk); 538 IRQ_KIRKWOOD_BRIDGE, kirkwood_tclk);
539} 539}
540 540
541struct sys_timer kirkwood_timer = {
542 .init = kirkwood_timer_init,
543};
544
545/***************************************************************************** 541/*****************************************************************************
546 * Audio 542 * Audio
547 ****************************************************************************/ 543 ****************************************************************************/
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index 5ffa57f08c80..283ab611e8da 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -156,7 +156,7 @@ void kirkwood_xor1_init(void);
156void kirkwood_crypto_init(void); 156void kirkwood_crypto_init(void);
157 157
158extern int kirkwood_tclk; 158extern int kirkwood_tclk;
159extern struct sys_timer kirkwood_timer; 159extern void kirkwood_timer_init(void);
160 160
161#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) 161#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
162 162
diff --git a/arch/arm/mach-kirkwood/d2net_v2-setup.c b/arch/arm/mach-kirkwood/d2net_v2-setup.c
index 2c1a453df201..453418063c1e 100644
--- a/arch/arm/mach-kirkwood/d2net_v2-setup.c
+++ b/arch/arm/mach-kirkwood/d2net_v2-setup.c
@@ -226,6 +226,6 @@ MACHINE_START(D2NET_V2, "LaCie d2 Network v2")
226 .map_io = kirkwood_map_io, 226 .map_io = kirkwood_map_io,
227 .init_early = kirkwood_init_early, 227 .init_early = kirkwood_init_early,
228 .init_irq = kirkwood_init_irq, 228 .init_irq = kirkwood_init_irq,
229 .timer = &kirkwood_timer, 229 .init_time = kirkwood_timer_init,
230 .restart = kirkwood_restart, 230 .restart = kirkwood_restart,
231MACHINE_END 231MACHINE_END
diff --git a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
index c49b177c1523..5a369fe74754 100644
--- a/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
+++ b/arch/arm/mach-kirkwood/db88f6281-bp-setup.c
@@ -103,6 +103,6 @@ MACHINE_START(DB88F6281_BP, "Marvell DB-88F6281-BP Development Board")
103 .map_io = kirkwood_map_io, 103 .map_io = kirkwood_map_io,
104 .init_early = kirkwood_init_early, 104 .init_early = kirkwood_init_early,
105 .init_irq = kirkwood_init_irq, 105 .init_irq = kirkwood_init_irq,
106 .timer = &kirkwood_timer, 106 .init_time = kirkwood_timer_init,
107 .restart = kirkwood_restart, 107 .restart = kirkwood_restart,
108MACHINE_END 108MACHINE_END
diff --git a/arch/arm/mach-kirkwood/dockstar-setup.c b/arch/arm/mach-kirkwood/dockstar-setup.c
index 791a98fafa29..060ccf9cb63f 100644
--- a/arch/arm/mach-kirkwood/dockstar-setup.c
+++ b/arch/arm/mach-kirkwood/dockstar-setup.c
@@ -19,7 +19,6 @@
19#include <asm/mach-types.h> 19#include <asm/mach-types.h>
20#include <asm/mach/arch.h> 20#include <asm/mach/arch.h>
21#include <mach/kirkwood.h> 21#include <mach/kirkwood.h>
22#include <linux/platform_data/mmc-mvsdio.h>
23#include "common.h" 22#include "common.h"
24#include "mpp.h" 23#include "mpp.h"
25 24
@@ -107,6 +106,6 @@ MACHINE_START(DOCKSTAR, "Seagate FreeAgent DockStar")
107 .map_io = kirkwood_map_io, 106 .map_io = kirkwood_map_io,
108 .init_early = kirkwood_init_early, 107 .init_early = kirkwood_init_early,
109 .init_irq = kirkwood_init_irq, 108 .init_irq = kirkwood_init_irq,
110 .timer = &kirkwood_timer, 109 .init_time = kirkwood_timer_init,
111 .restart = kirkwood_restart, 110 .restart = kirkwood_restart,
112MACHINE_END 111MACHINE_END
diff --git a/arch/arm/mach-kirkwood/guruplug-setup.c b/arch/arm/mach-kirkwood/guruplug-setup.c
index 7cb55f982243..1c6e736cbbf8 100644
--- a/arch/arm/mach-kirkwood/guruplug-setup.c
+++ b/arch/arm/mach-kirkwood/guruplug-setup.c
@@ -126,6 +126,6 @@ MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board")
126 .map_io = kirkwood_map_io, 126 .map_io = kirkwood_map_io,
127 .init_early = kirkwood_init_early, 127 .init_early = kirkwood_init_early,
128 .init_irq = kirkwood_init_irq, 128 .init_irq = kirkwood_init_irq,
129 .timer = &kirkwood_timer, 129 .init_time = kirkwood_timer_init,
130 .restart = kirkwood_restart, 130 .restart = kirkwood_restart,
131MACHINE_END 131MACHINE_END
diff --git a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
index 6d8364a97810..ba384b992bef 100644
--- a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
+++ b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
@@ -167,6 +167,6 @@ MACHINE_START(MV88F6281GTW_GE, "Marvell 88F6281 GTW GE Board")
167 .map_io = kirkwood_map_io, 167 .map_io = kirkwood_map_io,
168 .init_early = kirkwood_init_early, 168 .init_early = kirkwood_init_early,
169 .init_irq = kirkwood_init_irq, 169 .init_irq = kirkwood_init_irq,
170 .timer = &kirkwood_timer, 170 .init_time = kirkwood_timer_init,
171 .restart = kirkwood_restart, 171 .restart = kirkwood_restart,
172MACHINE_END 172MACHINE_END
diff --git a/arch/arm/mach-kirkwood/netspace_v2-setup.c b/arch/arm/mach-kirkwood/netspace_v2-setup.c
index 728e86d33f0c..3b706611da8e 100644
--- a/arch/arm/mach-kirkwood/netspace_v2-setup.c
+++ b/arch/arm/mach-kirkwood/netspace_v2-setup.c
@@ -263,7 +263,7 @@ MACHINE_START(NETSPACE_V2, "LaCie Network Space v2")
263 .map_io = kirkwood_map_io, 263 .map_io = kirkwood_map_io,
264 .init_early = kirkwood_init_early, 264 .init_early = kirkwood_init_early,
265 .init_irq = kirkwood_init_irq, 265 .init_irq = kirkwood_init_irq,
266 .timer = &kirkwood_timer, 266 .init_time = kirkwood_timer_init,
267 .restart = kirkwood_restart, 267 .restart = kirkwood_restart,
268MACHINE_END 268MACHINE_END
269#endif 269#endif
@@ -275,7 +275,7 @@ MACHINE_START(INETSPACE_V2, "LaCie Internet Space v2")
275 .map_io = kirkwood_map_io, 275 .map_io = kirkwood_map_io,
276 .init_early = kirkwood_init_early, 276 .init_early = kirkwood_init_early,
277 .init_irq = kirkwood_init_irq, 277 .init_irq = kirkwood_init_irq,
278 .timer = &kirkwood_timer, 278 .init_time = kirkwood_timer_init,
279 .restart = kirkwood_restart, 279 .restart = kirkwood_restart,
280MACHINE_END 280MACHINE_END
281#endif 281#endif
@@ -287,7 +287,7 @@ MACHINE_START(NETSPACE_MAX_V2, "LaCie Network Space Max v2")
287 .map_io = kirkwood_map_io, 287 .map_io = kirkwood_map_io,
288 .init_early = kirkwood_init_early, 288 .init_early = kirkwood_init_early,
289 .init_irq = kirkwood_init_irq, 289 .init_irq = kirkwood_init_irq,
290 .timer = &kirkwood_timer, 290 .init_time = kirkwood_timer_init,
291 .restart = kirkwood_restart, 291 .restart = kirkwood_restart,
292MACHINE_END 292MACHINE_END
293#endif 293#endif
diff --git a/arch/arm/mach-kirkwood/netxbig_v2-setup.c b/arch/arm/mach-kirkwood/netxbig_v2-setup.c
index a3b091470b8a..913d032cdb19 100644
--- a/arch/arm/mach-kirkwood/netxbig_v2-setup.c
+++ b/arch/arm/mach-kirkwood/netxbig_v2-setup.c
@@ -404,7 +404,7 @@ MACHINE_START(NET2BIG_V2, "LaCie 2Big Network v2")
404 .map_io = kirkwood_map_io, 404 .map_io = kirkwood_map_io,
405 .init_early = kirkwood_init_early, 405 .init_early = kirkwood_init_early,
406 .init_irq = kirkwood_init_irq, 406 .init_irq = kirkwood_init_irq,
407 .timer = &kirkwood_timer, 407 .init_time = kirkwood_timer_init,
408 .restart = kirkwood_restart, 408 .restart = kirkwood_restart,
409MACHINE_END 409MACHINE_END
410#endif 410#endif
@@ -416,7 +416,7 @@ MACHINE_START(NET5BIG_V2, "LaCie 5Big Network v2")
416 .map_io = kirkwood_map_io, 416 .map_io = kirkwood_map_io,
417 .init_early = kirkwood_init_early, 417 .init_early = kirkwood_init_early,
418 .init_irq = kirkwood_init_irq, 418 .init_irq = kirkwood_init_irq,
419 .timer = &kirkwood_timer, 419 .init_time = kirkwood_timer_init,
420 .restart = kirkwood_restart, 420 .restart = kirkwood_restart,
421MACHINE_END 421MACHINE_END
422#endif 422#endif
diff --git a/arch/arm/mach-kirkwood/openrd-setup.c b/arch/arm/mach-kirkwood/openrd-setup.c
index 7e81e9b586bf..8ddd69fdc937 100644
--- a/arch/arm/mach-kirkwood/openrd-setup.c
+++ b/arch/arm/mach-kirkwood/openrd-setup.c
@@ -221,7 +221,7 @@ MACHINE_START(OPENRD_BASE, "Marvell OpenRD Base Board")
221 .map_io = kirkwood_map_io, 221 .map_io = kirkwood_map_io,
222 .init_early = kirkwood_init_early, 222 .init_early = kirkwood_init_early,
223 .init_irq = kirkwood_init_irq, 223 .init_irq = kirkwood_init_irq,
224 .timer = &kirkwood_timer, 224 .init_time = kirkwood_timer_init,
225 .restart = kirkwood_restart, 225 .restart = kirkwood_restart,
226MACHINE_END 226MACHINE_END
227#endif 227#endif
@@ -234,7 +234,7 @@ MACHINE_START(OPENRD_CLIENT, "Marvell OpenRD Client Board")
234 .map_io = kirkwood_map_io, 234 .map_io = kirkwood_map_io,
235 .init_early = kirkwood_init_early, 235 .init_early = kirkwood_init_early,
236 .init_irq = kirkwood_init_irq, 236 .init_irq = kirkwood_init_irq,
237 .timer = &kirkwood_timer, 237 .init_time = kirkwood_timer_init,
238 .restart = kirkwood_restart, 238 .restart = kirkwood_restart,
239MACHINE_END 239MACHINE_END
240#endif 240#endif
@@ -247,7 +247,7 @@ MACHINE_START(OPENRD_ULTIMATE, "Marvell OpenRD Ultimate Board")
247 .map_io = kirkwood_map_io, 247 .map_io = kirkwood_map_io,
248 .init_early = kirkwood_init_early, 248 .init_early = kirkwood_init_early,
249 .init_irq = kirkwood_init_irq, 249 .init_irq = kirkwood_init_irq,
250 .timer = &kirkwood_timer, 250 .init_time = kirkwood_timer_init,
251 .restart = kirkwood_restart, 251 .restart = kirkwood_restart,
252MACHINE_END 252MACHINE_END
253#endif 253#endif
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-kirkwood/rd88f6192-nas-setup.c b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
index 19072c84008f..e4fd3129d36f 100644
--- a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
+++ b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
@@ -84,6 +84,6 @@ MACHINE_START(RD88F6192_NAS, "Marvell RD-88F6192-NAS Development Board")
84 .map_io = kirkwood_map_io, 84 .map_io = kirkwood_map_io,
85 .init_early = kirkwood_init_early, 85 .init_early = kirkwood_init_early,
86 .init_irq = kirkwood_init_irq, 86 .init_irq = kirkwood_init_irq,
87 .timer = &kirkwood_timer, 87 .init_time = kirkwood_timer_init,
88 .restart = kirkwood_restart, 88 .restart = kirkwood_restart,
89MACHINE_END 89MACHINE_END
diff --git a/arch/arm/mach-kirkwood/rd88f6281-setup.c b/arch/arm/mach-kirkwood/rd88f6281-setup.c
index 9717101a7437..c7d93b48926b 100644
--- a/arch/arm/mach-kirkwood/rd88f6281-setup.c
+++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c
@@ -120,6 +120,6 @@ MACHINE_START(RD88F6281, "Marvell RD-88F6281 Reference Board")
120 .map_io = kirkwood_map_io, 120 .map_io = kirkwood_map_io,
121 .init_early = kirkwood_init_early, 121 .init_early = kirkwood_init_early,
122 .init_irq = kirkwood_init_irq, 122 .init_irq = kirkwood_init_irq,
123 .timer = &kirkwood_timer, 123 .init_time = kirkwood_timer_init,
124 .restart = kirkwood_restart, 124 .restart = kirkwood_restart,
125MACHINE_END 125MACHINE_END
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c
index 8a175948b28d..55b68fa39f45 100644
--- a/arch/arm/mach-kirkwood/sheevaplug-setup.c
+++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c
@@ -143,7 +143,7 @@ MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board")
143 .map_io = kirkwood_map_io, 143 .map_io = kirkwood_map_io,
144 .init_early = kirkwood_init_early, 144 .init_early = kirkwood_init_early,
145 .init_irq = kirkwood_init_irq, 145 .init_irq = kirkwood_init_irq,
146 .timer = &kirkwood_timer, 146 .init_time = kirkwood_timer_init,
147 .restart = kirkwood_restart, 147 .restart = kirkwood_restart,
148MACHINE_END 148MACHINE_END
149#endif 149#endif
@@ -155,7 +155,7 @@ MACHINE_START(ESATA_SHEEVAPLUG, "Marvell eSATA SheevaPlug Reference Board")
155 .map_io = kirkwood_map_io, 155 .map_io = kirkwood_map_io,
156 .init_early = kirkwood_init_early, 156 .init_early = kirkwood_init_early,
157 .init_irq = kirkwood_init_irq, 157 .init_irq = kirkwood_init_irq,
158 .timer = &kirkwood_timer, 158 .init_time = kirkwood_timer_init,
159 .restart = kirkwood_restart, 159 .restart = kirkwood_restart,
160MACHINE_END 160MACHINE_END
161#endif 161#endif
diff --git a/arch/arm/mach-kirkwood/t5325-setup.c b/arch/arm/mach-kirkwood/t5325-setup.c
index f2daf711e72e..8736f8c97518 100644
--- a/arch/arm/mach-kirkwood/t5325-setup.c
+++ b/arch/arm/mach-kirkwood/t5325-setup.c
@@ -211,6 +211,6 @@ MACHINE_START(T5325, "HP t5325 Thin Client")
211 .map_io = kirkwood_map_io, 211 .map_io = kirkwood_map_io,
212 .init_early = kirkwood_init_early, 212 .init_early = kirkwood_init_early,
213 .init_irq = kirkwood_init_irq, 213 .init_irq = kirkwood_init_irq,
214 .timer = &kirkwood_timer, 214 .init_time = kirkwood_timer_init,
215 .restart = kirkwood_restart, 215 .restart = kirkwood_restart,
216MACHINE_END 216MACHINE_END
diff --git a/arch/arm/mach-kirkwood/ts219-setup.c b/arch/arm/mach-kirkwood/ts219-setup.c
index 73e2b6ca9564..283abff90228 100644
--- a/arch/arm/mach-kirkwood/ts219-setup.c
+++ b/arch/arm/mach-kirkwood/ts219-setup.c
@@ -137,6 +137,6 @@ MACHINE_START(TS219, "QNAP TS-119/TS-219")
137 .map_io = kirkwood_map_io, 137 .map_io = kirkwood_map_io,
138 .init_early = kirkwood_init_early, 138 .init_early = kirkwood_init_early,
139 .init_irq = kirkwood_init_irq, 139 .init_irq = kirkwood_init_irq,
140 .timer = &kirkwood_timer, 140 .init_time = kirkwood_timer_init,
141 .restart = kirkwood_restart, 141 .restart = kirkwood_restart,
142MACHINE_END 142MACHINE_END
diff --git a/arch/arm/mach-kirkwood/ts41x-setup.c b/arch/arm/mach-kirkwood/ts41x-setup.c
index e4c61279ea86..81d585806b2f 100644
--- a/arch/arm/mach-kirkwood/ts41x-setup.c
+++ b/arch/arm/mach-kirkwood/ts41x-setup.c
@@ -181,6 +181,6 @@ MACHINE_START(TS41X, "QNAP TS-41x")
181 .map_io = kirkwood_map_io, 181 .map_io = kirkwood_map_io,
182 .init_early = kirkwood_init_early, 182 .init_early = kirkwood_init_early,
183 .init_irq = kirkwood_init_irq, 183 .init_irq = kirkwood_init_irq,
184 .timer = &kirkwood_timer, 184 .init_time = kirkwood_timer_init,
185 .restart = kirkwood_restart, 185 .restart = kirkwood_restart,
186MACHINE_END 186MACHINE_END
diff --git a/arch/arm/mach-ks8695/board-acs5k.c b/arch/arm/mach-ks8695/board-acs5k.c
index 255502ddd879..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);
@@ -227,6 +227,6 @@ MACHINE_START(ACS5K, "Brivo Systems LLC ACS-5000 Master board")
227 .map_io = ks8695_map_io, 227 .map_io = ks8695_map_io,
228 .init_irq = ks8695_init_irq, 228 .init_irq = ks8695_init_irq,
229 .init_machine = acs5k_init, 229 .init_machine = acs5k_init,
230 .timer = &ks8695_timer, 230 .init_time = ks8695_timer_init,
231 .restart = ks8695_restart, 231 .restart = ks8695_restart,
232MACHINE_END 232MACHINE_END
diff --git a/arch/arm/mach-ks8695/board-dsm320.c b/arch/arm/mach-ks8695/board-dsm320.c
index e0d36cef2c56..d37c218c3584 100644
--- a/arch/arm/mach-ks8695/board-dsm320.c
+++ b/arch/arm/mach-ks8695/board-dsm320.c
@@ -125,6 +125,6 @@ MACHINE_START(DSM320, "D-Link DSM-320 Wireless Media Player")
125 .map_io = ks8695_map_io, 125 .map_io = ks8695_map_io,
126 .init_irq = ks8695_init_irq, 126 .init_irq = ks8695_init_irq,
127 .init_machine = dsm320_init, 127 .init_machine = dsm320_init,
128 .timer = &ks8695_timer, 128 .init_time = ks8695_timer_init,
129 .restart = ks8695_restart, 129 .restart = ks8695_restart,
130MACHINE_END 130MACHINE_END
diff --git a/arch/arm/mach-ks8695/board-micrel.c b/arch/arm/mach-ks8695/board-micrel.c
index a8270725b76d..3acbdfd31391 100644
--- a/arch/arm/mach-ks8695/board-micrel.c
+++ b/arch/arm/mach-ks8695/board-micrel.c
@@ -57,6 +57,6 @@ MACHINE_START(KS8695, "KS8695 Centaur Development Board")
57 .map_io = ks8695_map_io, 57 .map_io = ks8695_map_io,
58 .init_irq = ks8695_init_irq, 58 .init_irq = ks8695_init_irq,
59 .init_machine = micrel_init, 59 .init_machine = micrel_init,
60 .timer = &ks8695_timer, 60 .init_time = ks8695_timer_init,
61 .restart = ks8695_restart, 61 .restart = ks8695_restart,
62MACHINE_END 62MACHINE_END
diff --git a/arch/arm/mach-ks8695/board-og.c b/arch/arm/mach-ks8695/board-og.c
index 1623ba461e47..002bc619bb68 100644
--- a/arch/arm/mach-ks8695/board-og.c
+++ b/arch/arm/mach-ks8695/board-og.c
@@ -145,7 +145,7 @@ MACHINE_START(CM4002, "OpenGear/CM4002")
145 .map_io = ks8695_map_io, 145 .map_io = ks8695_map_io,
146 .init_irq = ks8695_init_irq, 146 .init_irq = ks8695_init_irq,
147 .init_machine = og_init, 147 .init_machine = og_init,
148 .timer = &ks8695_timer, 148 .init_time = ks8695_timer_init,
149 .restart = ks8695_restart, 149 .restart = ks8695_restart,
150MACHINE_END 150MACHINE_END
151#endif 151#endif
@@ -157,7 +157,7 @@ MACHINE_START(CM4008, "OpenGear/CM4008")
157 .map_io = ks8695_map_io, 157 .map_io = ks8695_map_io,
158 .init_irq = ks8695_init_irq, 158 .init_irq = ks8695_init_irq,
159 .init_machine = og_init, 159 .init_machine = og_init,
160 .timer = &ks8695_timer, 160 .init_time = ks8695_timer_init,
161 .restart = ks8695_restart, 161 .restart = ks8695_restart,
162MACHINE_END 162MACHINE_END
163#endif 163#endif
@@ -169,7 +169,7 @@ MACHINE_START(CM41XX, "OpenGear/CM41xx")
169 .map_io = ks8695_map_io, 169 .map_io = ks8695_map_io,
170 .init_irq = ks8695_init_irq, 170 .init_irq = ks8695_init_irq,
171 .init_machine = og_init, 171 .init_machine = og_init,
172 .timer = &ks8695_timer, 172 .init_time = ks8695_timer_init,
173 .restart = ks8695_restart, 173 .restart = ks8695_restart,
174MACHINE_END 174MACHINE_END
175#endif 175#endif
@@ -181,7 +181,7 @@ MACHINE_START(IM4004, "OpenGear/IM4004")
181 .map_io = ks8695_map_io, 181 .map_io = ks8695_map_io,
182 .init_irq = ks8695_init_irq, 182 .init_irq = ks8695_init_irq,
183 .init_machine = og_init, 183 .init_machine = og_init,
184 .timer = &ks8695_timer, 184 .init_time = ks8695_timer_init,
185 .restart = ks8695_restart, 185 .restart = ks8695_restart,
186MACHINE_END 186MACHINE_END
187#endif 187#endif
@@ -193,7 +193,7 @@ MACHINE_START(IM42XX, "OpenGear/IM42xx")
193 .map_io = ks8695_map_io, 193 .map_io = ks8695_map_io,
194 .init_irq = ks8695_init_irq, 194 .init_irq = ks8695_init_irq,
195 .init_machine = og_init, 195 .init_machine = og_init,
196 .timer = &ks8695_timer, 196 .init_time = ks8695_timer_init,
197 .restart = ks8695_restart, 197 .restart = ks8695_restart,
198MACHINE_END 198MACHINE_END
199#endif 199#endif
diff --git a/arch/arm/mach-ks8695/board-sg.c b/arch/arm/mach-ks8695/board-sg.c
index f35b98b5bf37..fdf2352d2cf8 100644
--- a/arch/arm/mach-ks8695/board-sg.c
+++ b/arch/arm/mach-ks8695/board-sg.c
@@ -91,7 +91,7 @@ MACHINE_START(LITE300, "SecureComputing/SG300")
91 .map_io = ks8695_map_io, 91 .map_io = ks8695_map_io,
92 .init_irq = ks8695_init_irq, 92 .init_irq = ks8695_init_irq,
93 .init_machine = sg_init, 93 .init_machine = sg_init,
94 .timer = &ks8695_timer, 94 .init_time = ks8695_timer_init,
95 .restart = ks8695_restart, 95 .restart = ks8695_restart,
96MACHINE_END 96MACHINE_END
97#endif 97#endif
@@ -103,7 +103,7 @@ MACHINE_START(SG310, "McAfee/SG310")
103 .map_io = ks8695_map_io, 103 .map_io = ks8695_map_io,
104 .init_irq = ks8695_init_irq, 104 .init_irq = ks8695_init_irq,
105 .init_machine = sg_init, 105 .init_machine = sg_init,
106 .timer = &ks8695_timer, 106 .init_time = ks8695_timer_init,
107 .restart = ks8695_restart, 107 .restart = ks8695_restart,
108MACHINE_END 108MACHINE_END
109#endif 109#endif
@@ -115,7 +115,7 @@ MACHINE_START(SE4200, "SecureComputing/SE4200")
115 .map_io = ks8695_map_io, 115 .map_io = ks8695_map_io,
116 .init_irq = ks8695_init_irq, 116 .init_irq = ks8695_init_irq,
117 .init_machine = sg_init, 117 .init_machine = sg_init,
118 .timer = &ks8695_timer, 118 .init_time = ks8695_timer_init,
119 .restart = ks8695_restart, 119 .restart = ks8695_restart,
120MACHINE_END 120MACHINE_END
121#endif 121#endif
diff --git a/arch/arm/mach-ks8695/generic.h b/arch/arm/mach-ks8695/generic.h
index f8bdb11a9c33..6e97ce462d73 100644
--- a/arch/arm/mach-ks8695/generic.h
+++ b/arch/arm/mach-ks8695/generic.h
@@ -13,4 +13,4 @@
13extern __init void ks8695_map_io(void); 13extern __init void ks8695_map_io(void);
14extern __init void ks8695_init_irq(void); 14extern __init void ks8695_init_irq(void);
15extern void ks8695_restart(char, const char *); 15extern void ks8695_restart(char, const char *);
16extern struct sys_timer ks8695_timer; 16extern void ks8695_timer_init(void);
diff --git a/arch/arm/mach-ks8695/time.c b/arch/arm/mach-ks8695/time.c
index 46c84bc7792c..c272a3863d5f 100644
--- a/arch/arm/mach-ks8695/time.c
+++ b/arch/arm/mach-ks8695/time.c
@@ -146,7 +146,7 @@ static void ks8695_timer_setup(void)
146 0xFFFFFFFFU); 146 0xFFFFFFFFU);
147} 147}
148 148
149static void __init ks8695_timer_init (void) 149void __init ks8695_timer_init(void)
150{ 150{
151 ks8695_timer_setup(); 151 ks8695_timer_setup();
152 152
@@ -154,10 +154,6 @@ static void __init ks8695_timer_init (void)
154 setup_irq(KS8695_IRQ_TIMER1, &ks8695_timer_irq); 154 setup_irq(KS8695_IRQ_TIMER1, &ks8695_timer_irq);
155} 155}
156 156
157struct sys_timer ks8695_timer = {
158 .init = ks8695_timer_init,
159};
160
161void ks8695_restart(char mode, const char *cmd) 157void ks8695_restart(char mode, const char *cmd)
162{ 158{
163 unsigned int reg; 159 unsigned int reg;
diff --git a/arch/arm/mach-lpc32xx/common.h b/arch/arm/mach-lpc32xx/common.h
index afeac3b1fae6..e0b26062a272 100644
--- a/arch/arm/mach-lpc32xx/common.h
+++ b/arch/arm/mach-lpc32xx/common.h
@@ -25,7 +25,7 @@
25/* 25/*
26 * Other arch specific structures and functions 26 * Other arch specific structures and functions
27 */ 27 */
28extern struct sys_timer lpc32xx_timer; 28extern void lpc32xx_timer_init(void);
29extern void __init lpc32xx_init_irq(void); 29extern void __init lpc32xx_init_irq(void);
30extern void __init lpc32xx_map_io(void); 30extern void __init lpc32xx_map_io(void);
31extern void __init lpc32xx_serial_init(void); 31extern void __init lpc32xx_serial_init(void);
diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c
index e8ff4c3f0566..c1cd5a943ab1 100644
--- a/arch/arm/mach-lpc32xx/phy3250.c
+++ b/arch/arm/mach-lpc32xx/phy3250.c
@@ -263,7 +263,7 @@ DT_MACHINE_START(LPC32XX_DT, "LPC32XX SoC (Flattened Device Tree)")
263 .atag_offset = 0x100, 263 .atag_offset = 0x100,
264 .map_io = lpc32xx_map_io, 264 .map_io = lpc32xx_map_io,
265 .init_irq = lpc32xx_init_irq, 265 .init_irq = lpc32xx_init_irq,
266 .timer = &lpc32xx_timer, 266 .init_time = lpc32xx_timer_init,
267 .init_machine = lpc3250_machine_init, 267 .init_machine = lpc3250_machine_init,
268 .dt_compat = lpc32xx_dt_compat, 268 .dt_compat = lpc32xx_dt_compat,
269 .restart = lpc23xx_restart, 269 .restart = lpc23xx_restart,
diff --git a/arch/arm/mach-lpc32xx/timer.c b/arch/arm/mach-lpc32xx/timer.c
index c40667c33161..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,
@@ -100,7 +99,7 @@ static struct irqaction lpc32xx_timer_irq = {
100 * clocks need to be enabled here manually and then tagged as used in 99 * clocks need to be enabled here manually and then tagged as used in
101 * the clock driver initialization 100 * the clock driver initialization
102 */ 101 */
103static void __init lpc32xx_timer_init(void) 102void __init lpc32xx_timer_init(void)
104{ 103{
105 u32 clkrate, pllreg; 104 u32 clkrate, pllreg;
106 105
@@ -141,14 +140,8 @@ static 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,
@@ -161,8 +154,3 @@ static void __init lpc32xx_timer_init(void)
161 clocksource_mmio_init(LPC32XX_TIMER_TC(LPC32XX_TIMER1_BASE), 154 clocksource_mmio_init(LPC32XX_TIMER_TC(LPC32XX_TIMER1_BASE),
162 "lpc32xx_clksrc", clkrate, 300, 32, clocksource_mmio_readl_up); 155 "lpc32xx_clksrc", clkrate, 300, 32, clocksource_mmio_readl_up);
163} 156}
164
165struct sys_timer lpc32xx_timer = {
166 .init = &lpc32xx_timer_init,
167};
168
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c
index e5dba9c5dc54..9f64d5632e07 100644
--- a/arch/arm/mach-mmp/aspenite.c
+++ b/arch/arm/mach-mmp/aspenite.c
@@ -262,7 +262,7 @@ MACHINE_START(ASPENITE, "PXA168-based Aspenite Development Platform")
262 .map_io = mmp_map_io, 262 .map_io = mmp_map_io,
263 .nr_irqs = MMP_NR_IRQS, 263 .nr_irqs = MMP_NR_IRQS,
264 .init_irq = pxa168_init_irq, 264 .init_irq = pxa168_init_irq,
265 .timer = &pxa168_timer, 265 .init_time = pxa168_timer_init,
266 .init_machine = common_init, 266 .init_machine = common_init,
267 .restart = pxa168_restart, 267 .restart = pxa168_restart,
268MACHINE_END 268MACHINE_END
@@ -271,7 +271,7 @@ MACHINE_START(ZYLONITE2, "PXA168-based Zylonite2 Development Platform")
271 .map_io = mmp_map_io, 271 .map_io = mmp_map_io,
272 .nr_irqs = MMP_NR_IRQS, 272 .nr_irqs = MMP_NR_IRQS,
273 .init_irq = pxa168_init_irq, 273 .init_irq = pxa168_init_irq,
274 .timer = &pxa168_timer, 274 .init_time = pxa168_timer_init,
275 .init_machine = common_init, 275 .init_machine = common_init,
276 .restart = pxa168_restart, 276 .restart = pxa168_restart,
277MACHINE_END 277MACHINE_END
diff --git a/arch/arm/mach-mmp/avengers_lite.c b/arch/arm/mach-mmp/avengers_lite.c
index 603542ae6fbd..1f94957b56ae 100644
--- a/arch/arm/mach-mmp/avengers_lite.c
+++ b/arch/arm/mach-mmp/avengers_lite.c
@@ -45,7 +45,7 @@ MACHINE_START(AVENGERS_LITE, "PXA168 Avengers lite Development Platform")
45 .map_io = mmp_map_io, 45 .map_io = mmp_map_io,
46 .nr_irqs = MMP_NR_IRQS, 46 .nr_irqs = MMP_NR_IRQS,
47 .init_irq = pxa168_init_irq, 47 .init_irq = pxa168_init_irq,
48 .timer = &pxa168_timer, 48 .init_time = pxa168_timer_init,
49 .init_machine = avengers_lite_init, 49 .init_machine = avengers_lite_init,
50 .restart = pxa168_restart, 50 .restart = pxa168_restart,
51MACHINE_END 51MACHINE_END
diff --git a/arch/arm/mach-mmp/brownstone.c b/arch/arm/mach-mmp/brownstone.c
index 5cb769cd26d9..2358011c7d8e 100644
--- a/arch/arm/mach-mmp/brownstone.c
+++ b/arch/arm/mach-mmp/brownstone.c
@@ -218,7 +218,7 @@ MACHINE_START(BROWNSTONE, "Brownstone Development Platform")
218 .map_io = mmp_map_io, 218 .map_io = mmp_map_io,
219 .nr_irqs = BROWNSTONE_NR_IRQS, 219 .nr_irqs = BROWNSTONE_NR_IRQS,
220 .init_irq = mmp2_init_irq, 220 .init_irq = mmp2_init_irq,
221 .timer = &mmp2_timer, 221 .init_time = mmp2_timer_init,
222 .init_machine = brownstone_init, 222 .init_machine = brownstone_init,
223 .restart = mmp_restart, 223 .restart = mmp_restart,
224MACHINE_END 224MACHINE_END
diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h
index bd453274fca2..0bdc50b134ce 100644
--- a/arch/arm/mach-mmp/common.h
+++ b/arch/arm/mach-mmp/common.h
@@ -1,7 +1,5 @@
1#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) 1#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
2 2
3struct sys_timer;
4
5extern void timer_init(int irq); 3extern void timer_init(int irq);
6 4
7extern void __init icu_init_irq(void); 5extern void __init icu_init_irq(void);
diff --git a/arch/arm/mach-mmp/flint.c b/arch/arm/mach-mmp/flint.c
index 8059cc0905c6..754c352dd02b 100644
--- a/arch/arm/mach-mmp/flint.c
+++ b/arch/arm/mach-mmp/flint.c
@@ -121,7 +121,7 @@ MACHINE_START(FLINT, "Flint Development Platform")
121 .map_io = mmp_map_io, 121 .map_io = mmp_map_io,
122 .nr_irqs = FLINT_NR_IRQS, 122 .nr_irqs = FLINT_NR_IRQS,
123 .init_irq = mmp2_init_irq, 123 .init_irq = mmp2_init_irq,
124 .timer = &mmp2_timer, 124 .init_time = mmp2_timer_init,
125 .init_machine = flint_init, 125 .init_machine = flint_init,
126 .restart = mmp_restart, 126 .restart = mmp_restart,
127MACHINE_END 127MACHINE_END
diff --git a/arch/arm/mach-mmp/gplugd.c b/arch/arm/mach-mmp/gplugd.c
index 5c3d61ee729a..d1e2d595e79c 100644
--- a/arch/arm/mach-mmp/gplugd.c
+++ b/arch/arm/mach-mmp/gplugd.c
@@ -194,7 +194,7 @@ MACHINE_START(GPLUGD, "PXA168-based GuruPlug Display (gplugD) Platform")
194 .map_io = mmp_map_io, 194 .map_io = mmp_map_io,
195 .nr_irqs = MMP_NR_IRQS, 195 .nr_irqs = MMP_NR_IRQS,
196 .init_irq = pxa168_init_irq, 196 .init_irq = pxa168_init_irq,
197 .timer = &pxa168_timer, 197 .init_time = pxa168_timer_init,
198 .init_machine = gplugd_init, 198 .init_machine = gplugd_init,
199 .restart = pxa168_restart, 199 .restart = pxa168_restart,
200MACHINE_END 200MACHINE_END
diff --git a/arch/arm/mach-mmp/include/mach/mmp2.h b/arch/arm/mach-mmp/include/mach/mmp2.h
index c4ca4d17194a..0764f4ecec82 100644
--- a/arch/arm/mach-mmp/include/mach/mmp2.h
+++ b/arch/arm/mach-mmp/include/mach/mmp2.h
@@ -3,9 +3,7 @@
3 3
4#include <linux/platform_data/pxa_sdhci.h> 4#include <linux/platform_data/pxa_sdhci.h>
5 5
6struct sys_timer; 6extern void mmp2_timer_init(void);
7
8extern struct sys_timer mmp2_timer;
9extern void __init mmp2_init_icu(void); 7extern void __init mmp2_init_icu(void);
10extern void __init mmp2_init_irq(void); 8extern void __init mmp2_init_irq(void);
11extern void mmp2_clear_pmic_int(void); 9extern void mmp2_clear_pmic_int(void);
diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-mmp/include/mach/pxa168.h
index 37632d964d50..7ed1df21ea1c 100644
--- a/arch/arm/mach-mmp/include/mach/pxa168.h
+++ b/arch/arm/mach-mmp/include/mach/pxa168.h
@@ -1,9 +1,7 @@
1#ifndef __ASM_MACH_PXA168_H 1#ifndef __ASM_MACH_PXA168_H
2#define __ASM_MACH_PXA168_H 2#define __ASM_MACH_PXA168_H
3 3
4struct sys_timer; 4extern void pxa168_timer_init(void);
5
6extern struct sys_timer pxa168_timer;
7extern void __init pxa168_init_irq(void); 5extern void __init pxa168_init_irq(void);
8extern void pxa168_restart(char, const char *); 6extern void pxa168_restart(char, const char *);
9extern void pxa168_clear_keypad_wakeup(void); 7extern void pxa168_clear_keypad_wakeup(void);
diff --git a/arch/arm/mach-mmp/include/mach/pxa910.h b/arch/arm/mach-mmp/include/mach/pxa910.h
index 3b58a3b2d7df..eff31ab6dc3b 100644
--- a/arch/arm/mach-mmp/include/mach/pxa910.h
+++ b/arch/arm/mach-mmp/include/mach/pxa910.h
@@ -1,9 +1,7 @@
1#ifndef __ASM_MACH_PXA910_H 1#ifndef __ASM_MACH_PXA910_H
2#define __ASM_MACH_PXA910_H 2#define __ASM_MACH_PXA910_H
3 3
4struct sys_timer; 4extern void pxa910_timer_init(void);
5
6extern struct sys_timer pxa910_timer;
7extern void __init pxa910_init_irq(void); 5extern void __init pxa910_init_irq(void);
8 6
9#include <linux/i2c.h> 7#include <linux/i2c.h>
diff --git a/arch/arm/mach-mmp/jasper.c b/arch/arm/mach-mmp/jasper.c
index ff73249884d0..66634fd0ecb0 100644
--- a/arch/arm/mach-mmp/jasper.c
+++ b/arch/arm/mach-mmp/jasper.c
@@ -174,7 +174,7 @@ MACHINE_START(MARVELL_JASPER, "Jasper Development Platform")
174 .map_io = mmp_map_io, 174 .map_io = mmp_map_io,
175 .nr_irqs = JASPER_NR_IRQS, 175 .nr_irqs = JASPER_NR_IRQS,
176 .init_irq = mmp2_init_irq, 176 .init_irq = mmp2_init_irq,
177 .timer = &mmp2_timer, 177 .init_time = mmp2_timer_init,
178 .init_machine = jasper_init, 178 .init_machine = jasper_init,
179 .restart = mmp_restart, 179 .restart = mmp_restart,
180MACHINE_END 180MACHINE_END
diff --git a/arch/arm/mach-mmp/mmp-dt.c b/arch/arm/mach-mmp/mmp-dt.c
index 033cc31b3c72..d063efa0a4f1 100644
--- a/arch/arm/mach-mmp/mmp-dt.c
+++ b/arch/arm/mach-mmp/mmp-dt.c
@@ -22,10 +22,6 @@
22extern void __init mmp_dt_irq_init(void); 22extern void __init mmp_dt_irq_init(void);
23extern void __init mmp_dt_init_timer(void); 23extern void __init mmp_dt_init_timer(void);
24 24
25static struct sys_timer mmp_dt_timer = {
26 .init = mmp_dt_init_timer,
27};
28
29static const struct of_dev_auxdata pxa168_auxdata_lookup[] __initconst = { 25static const struct of_dev_auxdata pxa168_auxdata_lookup[] __initconst = {
30 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.0", NULL), 26 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.0", NULL),
31 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.1", NULL), 27 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4018000, "pxa2xx-uart.1", NULL),
@@ -69,7 +65,7 @@ static const char *mmp_dt_board_compat[] __initdata = {
69DT_MACHINE_START(PXA168_DT, "Marvell PXA168 (Device Tree Support)") 65DT_MACHINE_START(PXA168_DT, "Marvell PXA168 (Device Tree Support)")
70 .map_io = mmp_map_io, 66 .map_io = mmp_map_io,
71 .init_irq = mmp_dt_irq_init, 67 .init_irq = mmp_dt_irq_init,
72 .timer = &mmp_dt_timer, 68 .init_time = mmp_dt_init_timer,
73 .init_machine = pxa168_dt_init, 69 .init_machine = pxa168_dt_init,
74 .dt_compat = mmp_dt_board_compat, 70 .dt_compat = mmp_dt_board_compat,
75MACHINE_END 71MACHINE_END
@@ -77,7 +73,7 @@ MACHINE_END
77DT_MACHINE_START(PXA910_DT, "Marvell PXA910 (Device Tree Support)") 73DT_MACHINE_START(PXA910_DT, "Marvell PXA910 (Device Tree Support)")
78 .map_io = mmp_map_io, 74 .map_io = mmp_map_io,
79 .init_irq = mmp_dt_irq_init, 75 .init_irq = mmp_dt_irq_init,
80 .timer = &mmp_dt_timer, 76 .init_time = mmp_dt_init_timer,
81 .init_machine = pxa910_dt_init, 77 .init_machine = pxa910_dt_init,
82 .dt_compat = mmp_dt_board_compat, 78 .dt_compat = mmp_dt_board_compat,
83MACHINE_END 79MACHINE_END
diff --git a/arch/arm/mach-mmp/mmp2-dt.c b/arch/arm/mach-mmp/mmp2-dt.c
index 535a5ed5977b..fad431aa6e09 100644
--- a/arch/arm/mach-mmp/mmp2-dt.c
+++ b/arch/arm/mach-mmp/mmp2-dt.c
@@ -24,10 +24,6 @@
24extern void __init mmp_dt_irq_init(void); 24extern void __init mmp_dt_irq_init(void);
25extern void __init mmp_dt_init_timer(void); 25extern void __init mmp_dt_init_timer(void);
26 26
27static struct sys_timer mmp_dt_timer = {
28 .init = mmp_dt_init_timer,
29};
30
31static const struct of_dev_auxdata mmp2_auxdata_lookup[] __initconst = { 27static const struct of_dev_auxdata mmp2_auxdata_lookup[] __initconst = {
32 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4030000, "pxa2xx-uart.0", NULL), 28 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4030000, "pxa2xx-uart.0", NULL),
33 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.1", NULL), 29 OF_DEV_AUXDATA("mrvl,mmp-uart", 0xd4017000, "pxa2xx-uart.1", NULL),
@@ -54,7 +50,7 @@ static const char *mmp2_dt_board_compat[] __initdata = {
54DT_MACHINE_START(MMP2_DT, "Marvell MMP2 (Device Tree Support)") 50DT_MACHINE_START(MMP2_DT, "Marvell MMP2 (Device Tree Support)")
55 .map_io = mmp_map_io, 51 .map_io = mmp_map_io,
56 .init_irq = mmp_dt_irq_init, 52 .init_irq = mmp_dt_irq_init,
57 .timer = &mmp_dt_timer, 53 .init_time = mmp_dt_init_timer,
58 .init_machine = mmp2_dt_init, 54 .init_machine = mmp2_dt_init,
59 .dt_compat = mmp2_dt_board_compat, 55 .dt_compat = mmp2_dt_board_compat,
60MACHINE_END 56MACHINE_END
diff --git a/arch/arm/mach-mmp/mmp2.c b/arch/arm/mach-mmp/mmp2.c
index 3a3768c7a191..d94d114eef7b 100644
--- a/arch/arm/mach-mmp/mmp2.c
+++ b/arch/arm/mach-mmp/mmp2.c
@@ -114,7 +114,7 @@ postcore_initcall(mmp2_init);
114 114
115#define APBC_TIMERS APBC_REG(0x024) 115#define APBC_TIMERS APBC_REG(0x024)
116 116
117static void __init mmp2_timer_init(void) 117void __init mmp2_timer_init(void)
118{ 118{
119 unsigned long clk_rst; 119 unsigned long clk_rst;
120 120
@@ -130,10 +130,6 @@ static void __init mmp2_timer_init(void)
130 timer_init(IRQ_MMP2_TIMER1); 130 timer_init(IRQ_MMP2_TIMER1);
131} 131}
132 132
133struct sys_timer mmp2_timer = {
134 .init = mmp2_timer_init,
135};
136
137/* on-chip devices */ 133/* on-chip devices */
138MMP2_DEVICE(uart1, "pxa2xx-uart", 0, UART1, 0xd4030000, 0x30, 4, 5); 134MMP2_DEVICE(uart1, "pxa2xx-uart", 0, UART1, 0xd4030000, 0x30, 4, 5);
139MMP2_DEVICE(uart2, "pxa2xx-uart", 1, UART2, 0xd4017000, 0x30, 20, 21); 135MMP2_DEVICE(uart2, "pxa2xx-uart", 1, UART2, 0xd4017000, 0x30, 20, 21);
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
index b7f074f15498..9bc7b86a86a7 100644
--- a/arch/arm/mach-mmp/pxa168.c
+++ b/arch/arm/mach-mmp/pxa168.c
@@ -67,7 +67,7 @@ postcore_initcall(pxa168_init);
67#define TIMER_CLK_RST (APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(3)) 67#define TIMER_CLK_RST (APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(3))
68#define APBC_TIMERS APBC_REG(0x34) 68#define APBC_TIMERS APBC_REG(0x34)
69 69
70static void __init pxa168_timer_init(void) 70void __init pxa168_timer_init(void)
71{ 71{
72 /* this is early, we have to initialize the CCU registers by 72 /* this is early, we have to initialize the CCU registers by
73 * ourselves instead of using clk_* API. Clock rate is defined 73 * ourselves instead of using clk_* API. Clock rate is defined
@@ -81,10 +81,6 @@ static void __init pxa168_timer_init(void)
81 timer_init(IRQ_PXA168_TIMER1); 81 timer_init(IRQ_PXA168_TIMER1);
82} 82}
83 83
84struct sys_timer pxa168_timer = {
85 .init = pxa168_timer_init,
86};
87
88void pxa168_clear_keypad_wakeup(void) 84void pxa168_clear_keypad_wakeup(void)
89{ 85{
90 uint32_t val; 86 uint32_t val;
diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c
index 8b1e16fbb7a5..c6a89f1eca4e 100644
--- a/arch/arm/mach-mmp/pxa910.c
+++ b/arch/arm/mach-mmp/pxa910.c
@@ -101,7 +101,7 @@ postcore_initcall(pxa910_init);
101#define TIMER_CLK_RST (APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(3)) 101#define TIMER_CLK_RST (APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(3))
102#define APBC_TIMERS APBC_REG(0x34) 102#define APBC_TIMERS APBC_REG(0x34)
103 103
104static void __init pxa910_timer_init(void) 104void __init pxa910_timer_init(void)
105{ 105{
106 /* reset and configure */ 106 /* reset and configure */
107 __raw_writel(APBC_APBCLK | APBC_RST, APBC_TIMERS); 107 __raw_writel(APBC_APBCLK | APBC_RST, APBC_TIMERS);
@@ -110,10 +110,6 @@ static void __init pxa910_timer_init(void)
110 timer_init(IRQ_PXA910_AP1_TIMER1); 110 timer_init(IRQ_PXA910_AP1_TIMER1);
111} 111}
112 112
113struct sys_timer pxa910_timer = {
114 .init = pxa910_timer_init,
115};
116
117/* on-chip devices */ 113/* on-chip devices */
118 114
119/* NOTE: there are totally 3 UARTs on PXA910: 115/* NOTE: there are totally 3 UARTs on PXA910:
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/tavorevb.c b/arch/arm/mach-mmp/tavorevb.c
index b28f9084dfff..4c127d23955d 100644
--- a/arch/arm/mach-mmp/tavorevb.c
+++ b/arch/arm/mach-mmp/tavorevb.c
@@ -103,7 +103,7 @@ MACHINE_START(TAVOREVB, "PXA910 Evaluation Board (aka TavorEVB)")
103 .map_io = mmp_map_io, 103 .map_io = mmp_map_io,
104 .nr_irqs = MMP_NR_IRQS, 104 .nr_irqs = MMP_NR_IRQS,
105 .init_irq = pxa910_init_irq, 105 .init_irq = pxa910_init_irq,
106 .timer = &pxa910_timer, 106 .init_time = pxa910_timer_init,
107 .init_machine = tavorevb_init, 107 .init_machine = tavorevb_init,
108 .restart = mmp_restart, 108 .restart = mmp_restart,
109MACHINE_END 109MACHINE_END
diff --git a/arch/arm/mach-mmp/teton_bga.c b/arch/arm/mach-mmp/teton_bga.c
index dd30ea74785c..8609967975ed 100644
--- a/arch/arm/mach-mmp/teton_bga.c
+++ b/arch/arm/mach-mmp/teton_bga.c
@@ -86,7 +86,7 @@ MACHINE_START(TETON_BGA, "PXA168-based Teton BGA Development Platform")
86 .map_io = mmp_map_io, 86 .map_io = mmp_map_io,
87 .nr_irqs = MMP_NR_IRQS, 87 .nr_irqs = MMP_NR_IRQS,
88 .init_irq = pxa168_init_irq, 88 .init_irq = pxa168_init_irq,
89 .timer = &pxa168_timer, 89 .init_time = pxa168_timer_init,
90 .init_machine = teton_bga_init, 90 .init_machine = teton_bga_init,
91 .restart = pxa168_restart, 91 .restart = pxa168_restart,
92MACHINE_END 92MACHINE_END
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-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c
index ce55fd8821c4..6e474900b13e 100644
--- a/arch/arm/mach-mmp/ttc_dkb.c
+++ b/arch/arm/mach-mmp/ttc_dkb.c
@@ -218,7 +218,7 @@ MACHINE_START(TTC_DKB, "PXA910-based TTC_DKB Development Platform")
218 .map_io = mmp_map_io, 218 .map_io = mmp_map_io,
219 .nr_irqs = TTCDKB_NR_IRQS, 219 .nr_irqs = TTCDKB_NR_IRQS,
220 .init_irq = pxa910_init_irq, 220 .init_irq = pxa910_init_irq,
221 .timer = &pxa910_timer, 221 .init_time = pxa910_timer_init,
222 .init_machine = ttc_dkb_init, 222 .init_machine = ttc_dkb_init,
223 .restart = mmp_restart, 223 .restart = mmp_restart,
224MACHINE_END 224MACHINE_END
diff --git a/arch/arm/mach-msm/board-dt-8660.c b/arch/arm/mach-msm/board-dt-8660.c
index b5b4de2cdf9e..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,10 +44,9 @@ 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 .timer = &msm_dt_timer, 50 .init_time = msm_dt_timer_init,
63 .dt_compat = msm8x60_fluid_match, 51 .dt_compat = msm8x60_fluid_match,
64MACHINE_END 52MACHINE_END
diff --git a/arch/arm/mach-msm/board-dt-8960.c b/arch/arm/mach-msm/board-dt-8960.c
index 4490edb71c17..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 .timer = &msm_dt_timer, 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/board-halibut.c b/arch/arm/mach-msm/board-halibut.c
index 6ce542e2e21c..84d720af34ab 100644
--- a/arch/arm/mach-msm/board-halibut.c
+++ b/arch/arm/mach-msm/board-halibut.c
@@ -106,5 +106,5 @@ MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)")
106 .init_irq = halibut_init_irq, 106 .init_irq = halibut_init_irq,
107 .init_machine = halibut_init, 107 .init_machine = halibut_init,
108 .init_late = halibut_init_late, 108 .init_late = halibut_init_late,
109 .timer = &msm7x01_timer, 109 .init_time = msm7x01_timer_init,
110MACHINE_END 110MACHINE_END
diff --git a/arch/arm/mach-msm/board-mahimahi.c b/arch/arm/mach-msm/board-mahimahi.c
index df00bc03ce74..30c3496db593 100644
--- a/arch/arm/mach-msm/board-mahimahi.c
+++ b/arch/arm/mach-msm/board-mahimahi.c
@@ -75,7 +75,7 @@ static void __init mahimahi_init_late(void)
75 smd_debugfs_init(); 75 smd_debugfs_init();
76} 76}
77 77
78extern struct sys_timer msm_timer; 78void msm_timer_init(void);
79 79
80MACHINE_START(MAHIMAHI, "mahimahi") 80MACHINE_START(MAHIMAHI, "mahimahi")
81 .atag_offset = 0x100, 81 .atag_offset = 0x100,
@@ -84,5 +84,5 @@ MACHINE_START(MAHIMAHI, "mahimahi")
84 .init_irq = msm_init_irq, 84 .init_irq = msm_init_irq,
85 .init_machine = mahimahi_init, 85 .init_machine = mahimahi_init,
86 .init_late = mahimahi_init_late, 86 .init_late = mahimahi_init_late,
87 .timer = &msm_timer, 87 .init_time = msm_timer_init,
88MACHINE_END 88MACHINE_END
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index effa6f4336c7..7bc3f82e3ec9 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -131,7 +131,7 @@ MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
131 .init_irq = msm7x30_init_irq, 131 .init_irq = msm7x30_init_irq,
132 .init_machine = msm7x30_init, 132 .init_machine = msm7x30_init,
133 .init_late = msm7x30_init_late, 133 .init_late = msm7x30_init_late,
134 .timer = &msm7x30_timer, 134 .init_time = msm7x30_timer_init,
135MACHINE_END 135MACHINE_END
136 136
137MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA") 137MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
@@ -142,7 +142,7 @@ MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
142 .init_irq = msm7x30_init_irq, 142 .init_irq = msm7x30_init_irq,
143 .init_machine = msm7x30_init, 143 .init_machine = msm7x30_init,
144 .init_late = msm7x30_init_late, 144 .init_late = msm7x30_init_late,
145 .timer = &msm7x30_timer, 145 .init_time = msm7x30_timer_init,
146MACHINE_END 146MACHINE_END
147 147
148MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID") 148MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
@@ -153,5 +153,5 @@ MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
153 .init_irq = msm7x30_init_irq, 153 .init_irq = msm7x30_init_irq,
154 .init_machine = msm7x30_init, 154 .init_machine = msm7x30_init,
155 .init_late = msm7x30_init_late, 155 .init_late = msm7x30_init_late,
156 .timer = &msm7x30_timer, 156 .init_time = msm7x30_timer_init,
157MACHINE_END 157MACHINE_END
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index 2448fcf09eb1..686e7949a73a 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -200,7 +200,7 @@ MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF")
200 .init_irq = qsd8x50_init_irq, 200 .init_irq = qsd8x50_init_irq,
201 .init_machine = qsd8x50_init, 201 .init_machine = qsd8x50_init,
202 .init_late = qsd8x50_init_late, 202 .init_late = qsd8x50_init_late,
203 .timer = &qsd8x50_timer, 203 .init_time = qsd8x50_timer_init,
204MACHINE_END 204MACHINE_END
205 205
206MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5") 206MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5")
@@ -209,5 +209,5 @@ MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5")
209 .init_irq = qsd8x50_init_irq, 209 .init_irq = qsd8x50_init_irq,
210 .init_machine = qsd8x50_init, 210 .init_machine = qsd8x50_init,
211 .init_late = qsd8x50_init_late, 211 .init_late = qsd8x50_init_late,
212 .timer = &qsd8x50_timer, 212 .init_time = qsd8x50_timer_init,
213MACHINE_END 213MACHINE_END
diff --git a/arch/arm/mach-msm/board-sapphire.c b/arch/arm/mach-msm/board-sapphire.c
index b7b0fc7e3278..70730111b37c 100644
--- a/arch/arm/mach-msm/board-sapphire.c
+++ b/arch/arm/mach-msm/board-sapphire.c
@@ -53,7 +53,7 @@ static struct platform_device *devices[] __initdata = {
53 &msm_device_uart3, 53 &msm_device_uart3,
54}; 54};
55 55
56extern struct sys_timer msm_timer; 56void msm_timer_init(void);
57 57
58static void __init sapphire_init_irq(void) 58static void __init sapphire_init_irq(void)
59{ 59{
@@ -113,5 +113,5 @@ MACHINE_START(SAPPHIRE, "sapphire")
113 .init_irq = sapphire_init_irq, 113 .init_irq = sapphire_init_irq,
114 .init_machine = sapphire_init, 114 .init_machine = sapphire_init,
115 .init_late = sapphire_init_late, 115 .init_late = sapphire_init_late,
116 .timer = &msm_timer, 116 .init_time = msm_timer_init,
117MACHINE_END 117MACHINE_END
diff --git a/arch/arm/mach-msm/board-trout.c b/arch/arm/mach-msm/board-trout.c
index 4ba0800e243e..919bfa32871a 100644
--- a/arch/arm/mach-msm/board-trout.c
+++ b/arch/arm/mach-msm/board-trout.c
@@ -110,5 +110,5 @@ MACHINE_START(TROUT, "HTC Dream")
110 .init_irq = trout_init_irq, 110 .init_irq = trout_init_irq,
111 .init_machine = trout_init, 111 .init_machine = trout_init,
112 .init_late = trout_init_late, 112 .init_late = trout_init_late,
113 .timer = &msm7x01_timer, 113 .init_time = msm7x01_timer_init,
114MACHINE_END 114MACHINE_END
diff --git a/arch/arm/mach-msm/common.h b/arch/arm/mach-msm/common.h
index 633a7159d5ff..ce8215a269e5 100644
--- a/arch/arm/mach-msm/common.h
+++ b/arch/arm/mach-msm/common.h
@@ -12,10 +12,10 @@
12#ifndef __MACH_COMMON_H 12#ifndef __MACH_COMMON_H
13#define __MACH_COMMON_H 13#define __MACH_COMMON_H
14 14
15extern struct sys_timer msm7x01_timer; 15extern void msm7x01_timer_init(void);
16extern struct sys_timer msm7x30_timer; 16extern void msm7x30_timer_init(void);
17extern struct sys_timer msm_dt_timer; 17extern void msm_dt_timer_init(void);
18extern struct sys_timer qsd8x50_timer; 18extern void qsd8x50_timer_init(void);
19 19
20extern void msm_map_common_io(void); 20extern void msm_map_common_io(void);
21extern void msm_map_msm7x30_io(void); 21extern void msm_map_msm7x30_io(void);
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 476549a8a709..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}
@@ -229,7 +224,7 @@ static const struct of_device_id msm_gpt_match[] __initconst = {
229 { }, 224 { },
230}; 225};
231 226
232static void __init msm_dt_timer_init(void) 227void __init msm_dt_timer_init(void)
233{ 228{
234 struct device_node *np; 229 struct device_node *np;
235 u32 freq; 230 u32 freq;
@@ -296,10 +291,6 @@ static void __init msm_dt_timer_init(void)
296 291
297 msm_timer_init(freq, 32, irq, !!percpu_offset); 292 msm_timer_init(freq, 32, irq, !!percpu_offset);
298} 293}
299
300struct sys_timer msm_dt_timer = {
301 .init = msm_dt_timer_init
302};
303#endif 294#endif
304 295
305static int __init msm_timer_map(phys_addr_t event, phys_addr_t source) 296static int __init msm_timer_map(phys_addr_t event, phys_addr_t source)
@@ -317,7 +308,7 @@ static int __init msm_timer_map(phys_addr_t event, phys_addr_t source)
317 return 0; 308 return 0;
318} 309}
319 310
320static void __init msm7x01_timer_init(void) 311void __init msm7x01_timer_init(void)
321{ 312{
322 struct clocksource *cs = &msm_clocksource; 313 struct clocksource *cs = &msm_clocksource;
323 314
@@ -330,28 +321,16 @@ static void __init msm7x01_timer_init(void)
330 false); 321 false);
331} 322}
332 323
333struct sys_timer msm7x01_timer = { 324void __init msm7x30_timer_init(void)
334 .init = msm7x01_timer_init
335};
336
337static void __init msm7x30_timer_init(void)
338{ 325{
339 if (msm_timer_map(0xc0100004, 0xc0100024)) 326 if (msm_timer_map(0xc0100004, 0xc0100024))
340 return; 327 return;
341 msm_timer_init(24576000 / 4, 32, 1, false); 328 msm_timer_init(24576000 / 4, 32, 1, false);
342} 329}
343 330
344struct sys_timer msm7x30_timer = { 331void __init qsd8x50_timer_init(void)
345 .init = msm7x30_timer_init
346};
347
348static void __init qsd8x50_timer_init(void)
349{ 332{
350 if (msm_timer_map(0xAC100000, 0xAC100010)) 333 if (msm_timer_map(0xAC100000, 0xAC100010))
351 return; 334 return;
352 msm_timer_init(19200000 / 4, 32, 7, false); 335 msm_timer_init(19200000 / 4, 32, 7, false);
353} 336}
354
355struct sys_timer qsd8x50_timer = {
356 .init = qsd8x50_timer_init
357};
diff --git a/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c b/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c
index ee74ec97c141..1f2ef98b37c6 100644
--- a/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c
+++ b/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c
@@ -150,6 +150,6 @@ MACHINE_START(TERASTATION_WXL, "Buffalo Nas WXL")
150 .map_io = mv78xx0_map_io, 150 .map_io = mv78xx0_map_io,
151 .init_early = mv78xx0_init_early, 151 .init_early = mv78xx0_init_early,
152 .init_irq = mv78xx0_init_irq, 152 .init_irq = mv78xx0_init_irq,
153 .timer = &mv78xx0_timer, 153 .init_time = mv78xx0_timer_init,
154 .restart = mv78xx0_restart, 154 .restart = mv78xx0_restart,
155MACHINE_END 155MACHINE_END
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c
index d0cb4857b4b3..0efa14498ebc 100644
--- a/arch/arm/mach-mv78xx0/common.c
+++ b/arch/arm/mach-mv78xx0/common.c
@@ -336,16 +336,12 @@ void __init mv78xx0_init_early(void)
336 orion_time_set_base(TIMER_VIRT_BASE); 336 orion_time_set_base(TIMER_VIRT_BASE);
337} 337}
338 338
339static void __init_refok mv78xx0_timer_init(void) 339void __init_refok mv78xx0_timer_init(void)
340{ 340{
341 orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR, 341 orion_time_init(BRIDGE_VIRT_BASE, BRIDGE_INT_TIMER1_CLR,
342 IRQ_MV78XX0_TIMER_1, get_tclk()); 342 IRQ_MV78XX0_TIMER_1, get_tclk());
343} 343}
344 344
345struct sys_timer mv78xx0_timer = {
346 .init = mv78xx0_timer_init,
347};
348
349 345
350/***************************************************************************** 346/*****************************************************************************
351 * General 347 * General
diff --git a/arch/arm/mach-mv78xx0/common.h b/arch/arm/mach-mv78xx0/common.h
index 507c767d49e0..5e9485bad0ac 100644
--- a/arch/arm/mach-mv78xx0/common.h
+++ b/arch/arm/mach-mv78xx0/common.h
@@ -47,7 +47,7 @@ void mv78xx0_uart3_init(void);
47void mv78xx0_i2c_init(void); 47void mv78xx0_i2c_init(void);
48void mv78xx0_restart(char, const char *); 48void mv78xx0_restart(char, const char *);
49 49
50extern struct sys_timer mv78xx0_timer; 50extern void mv78xx0_timer_init(void);
51 51
52 52
53#endif 53#endif
diff --git a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
index 4d6d48bf51ef..4e0f22b30bc8 100644
--- a/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
+++ b/arch/arm/mach-mv78xx0/db78x00-bp-setup.c
@@ -98,6 +98,6 @@ MACHINE_START(DB78X00_BP, "Marvell DB-78x00-BP Development Board")
98 .map_io = mv78xx0_map_io, 98 .map_io = mv78xx0_map_io,
99 .init_early = mv78xx0_init_early, 99 .init_early = mv78xx0_init_early,
100 .init_irq = mv78xx0_init_irq, 100 .init_irq = mv78xx0_init_irq,
101 .timer = &mv78xx0_timer, 101 .init_time = mv78xx0_timer_init,
102 .restart = mv78xx0_restart, 102 .restart = mv78xx0_restart,
103MACHINE_END 103MACHINE_END
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-mv78xx0/rd78x00-masa-setup.c b/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c
index 9a882706e138..d2d06f3957f3 100644
--- a/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c
+++ b/arch/arm/mach-mv78xx0/rd78x00-masa-setup.c
@@ -83,6 +83,6 @@ MACHINE_START(RD78X00_MASA, "Marvell RD-78x00-MASA Development Board")
83 .map_io = mv78xx0_map_io, 83 .map_io = mv78xx0_map_io,
84 .init_early = mv78xx0_init_early, 84 .init_early = mv78xx0_init_early,
85 .init_irq = mv78xx0_init_irq, 85 .init_irq = mv78xx0_init_irq,
86 .timer = &mv78xx0_timer, 86 .init_time = mv78xx0_timer_init,
87 .restart = mv78xx0_restart, 87 .restart = mv78xx0_restart,
88MACHINE_END 88MACHINE_END
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index 5dcb369b58aa..99df4df680fd 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -1,6 +1,8 @@
1ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \ 1ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
2 -I$(srctree)/arch/arm/plat-orion/include 2 -I$(srctree)/arch/arm/plat-orion/include
3 3
4AFLAGS_coherency_ll.o := -Wa,-march=armv7-a
5
4obj-y += system-controller.o 6obj-y += system-controller.o
5obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o irq-armada-370-xp.o addr-map.o coherency.o coherency_ll.o pmsu.o 7obj-$(CONFIG_MACH_ARMADA_370_XP) += armada-370-xp.o irq-armada-370-xp.o addr-map.o coherency.o coherency_ll.o pmsu.o
6obj-$(CONFIG_SMP) += platsmp.o headsmp.o 8obj-$(CONFIG_SMP) += platsmp.o headsmp.o
diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c
index 7434b5e36197..a5ea616d6d12 100644
--- a/arch/arm/mach-mvebu/armada-370-xp.c
+++ b/arch/arm/mach-mvebu/armada-370-xp.c
@@ -56,10 +56,6 @@ void __init armada_370_xp_init_early(void)
56 init_dma_coherent_pool_size(SZ_1M); 56 init_dma_coherent_pool_size(SZ_1M);
57} 57}
58 58
59struct sys_timer armada_370_xp_timer = {
60 .init = armada_370_xp_timer_and_clk_init,
61};
62
63static void __init armada_370_xp_dt_init(void) 59static void __init armada_370_xp_dt_init(void)
64{ 60{
65 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 61 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
@@ -78,7 +74,7 @@ DT_MACHINE_START(ARMADA_XP_DT, "Marvell Armada 370/XP (Device Tree)")
78 .init_early = armada_370_xp_init_early, 74 .init_early = armada_370_xp_init_early,
79 .init_irq = armada_370_xp_init_irq, 75 .init_irq = armada_370_xp_init_irq,
80 .handle_irq = armada_370_xp_handle_irq, 76 .handle_irq = armada_370_xp_handle_irq,
81 .timer = &armada_370_xp_timer, 77 .init_time = armada_370_xp_timer_and_clk_init,
82 .restart = mvebu_restart, 78 .restart = mvebu_restart,
83 .dt_compat = armada_370_xp_dt_compat, 79 .dt_compat = armada_370_xp_dt_compat,
84MACHINE_END 80MACHINE_END
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index c66129b5dd18..5fad7cefe8aa 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -163,19 +163,11 @@ static void __init imx23_timer_init(void)
163 mx23_clocks_init(); 163 mx23_clocks_init();
164} 164}
165 165
166static struct sys_timer imx23_timer = {
167 .init = imx23_timer_init,
168};
169
170static void __init imx28_timer_init(void) 166static void __init imx28_timer_init(void)
171{ 167{
172 mx28_clocks_init(); 168 mx28_clocks_init();
173} 169}
174 170
175static struct sys_timer imx28_timer = {
176 .init = imx28_timer_init,
177};
178
179enum mac_oui { 171enum mac_oui {
180 OUI_FSL, 172 OUI_FSL,
181 OUI_DENX, 173 OUI_DENX,
@@ -446,7 +438,7 @@ DT_MACHINE_START(IMX23, "Freescale i.MX23 (Device Tree)")
446 .map_io = mx23_map_io, 438 .map_io = mx23_map_io,
447 .init_irq = icoll_init_irq, 439 .init_irq = icoll_init_irq,
448 .handle_irq = icoll_handle_irq, 440 .handle_irq = icoll_handle_irq,
449 .timer = &imx23_timer, 441 .init_time = imx23_timer_init,
450 .init_machine = mxs_machine_init, 442 .init_machine = mxs_machine_init,
451 .dt_compat = imx23_dt_compat, 443 .dt_compat = imx23_dt_compat,
452 .restart = mxs_restart, 444 .restart = mxs_restart,
@@ -456,7 +448,7 @@ DT_MACHINE_START(IMX28, "Freescale i.MX28 (Device Tree)")
456 .map_io = mx28_map_io, 448 .map_io = mx28_map_io,
457 .init_irq = icoll_init_irq, 449 .init_irq = icoll_init_irq,
458 .handle_irq = icoll_handle_irq, 450 .handle_irq = icoll_handle_irq,
459 .timer = &imx28_timer, 451 .init_time = imx28_timer_init,
460 .init_machine = mxs_machine_init, 452 .init_machine = mxs_machine_init,
461 .dt_compat = imx28_dt_compat, 453 .dt_compat = imx28_dt_compat,
462 .restart = mxs_restart, 454 .restart = mxs_restart,
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/generic.h b/arch/arm/mach-netx/generic.h
index 9b915119b8d6..768b26bbb42b 100644
--- a/arch/arm/mach-netx/generic.h
+++ b/arch/arm/mach-netx/generic.h
@@ -21,5 +21,4 @@ extern void __init netx_map_io(void);
21extern void __init netx_init_irq(void); 21extern void __init netx_init_irq(void);
22extern void netx_restart(char, const char *); 22extern void netx_restart(char, const char *);
23 23
24struct sys_timer; 24extern void netx_timer_init(void);
25extern struct sys_timer netx_timer;
diff --git a/arch/arm/mach-netx/nxdb500.c b/arch/arm/mach-netx/nxdb500.c
index 8b781ff7c9e9..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,8 +203,7 @@ 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, 206 .init_time = netx_timer_init,
208 .timer = &netx_timer,
209 .init_machine = nxdb500_init, 207 .init_machine = nxdb500_init,
210 .restart = netx_restart, 208 .restart = netx_restart,
211MACHINE_END 209MACHINE_END
diff --git a/arch/arm/mach-netx/nxdkn.c b/arch/arm/mach-netx/nxdkn.c
index b26dbce334f2..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,8 +96,7 @@ 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, 99 .init_time = netx_timer_init,
101 .timer = &netx_timer,
102 .init_machine = nxdkn_init, 100 .init_machine = nxdkn_init,
103 .restart = netx_restart, 101 .restart = netx_restart,
104MACHINE_END 102MACHINE_END
diff --git a/arch/arm/mach-netx/nxeb500hmi.c b/arch/arm/mach-netx/nxeb500hmi.c
index 257382efafa0..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,8 +180,7 @@ 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, 183 .init_time = netx_timer_init,
185 .timer = &netx_timer,
186 .init_machine = nxeb500hmi_init, 184 .init_machine = nxeb500hmi_init,
187 .restart = netx_restart, 185 .restart = netx_restart,
188MACHINE_END 186MACHINE_END
diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c
index e24c141ba489..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,
@@ -107,7 +106,7 @@ static struct irqaction netx_timer_irq = {
107/* 106/*
108 * Set up timer interrupt 107 * Set up timer interrupt
109 */ 108 */
110static void __init netx_timer_init(void) 109void __init netx_timer_init(void)
111{ 110{
112 /* disable timer initially */ 111 /* disable timer initially */
113 writel(0, NETX_GPIO_COUNTER_CTRL(0)); 112 writel(0, NETX_GPIO_COUNTER_CTRL(0));
@@ -140,18 +139,9 @@ static 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}
154
155struct sys_timer netx_timer = {
156 .init = netx_timer_init,
157};
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c
index 98167a4319f7..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>
@@ -268,10 +266,6 @@ static void __init nomadik_timer_init(void)
268 nmdk_timer_init(io_p2v(NOMADIK_MTU0_BASE), IRQ_MTU0); 266 nmdk_timer_init(io_p2v(NOMADIK_MTU0_BASE), IRQ_MTU0);
269} 267}
270 268
271static struct sys_timer nomadik_timer = {
272 .init = nomadik_timer_init,
273};
274
275static struct i2c_board_info __initdata nhk8815_i2c0_devices[] = { 269static struct i2c_board_info __initdata nhk8815_i2c0_devices[] = {
276 { 270 {
277 I2C_BOARD_INFO("stw4811", 0x2d), 271 I2C_BOARD_INFO("stw4811", 0x2d),
@@ -353,8 +347,7 @@ MACHINE_START(NOMADIK, "NHK8815")
353 .atag_offset = 0x100, 347 .atag_offset = 0x100,
354 .map_io = cpu8815_map_io, 348 .map_io = cpu8815_map_io,
355 .init_irq = cpu8815_init_irq, 349 .init_irq = cpu8815_init_irq,
356 .handle_irq = vic_handle_irq, 350 .init_time = nomadik_timer_init,
357 .timer = &nomadik_timer,
358 .init_machine = nhk8815_platform_init, 351 .init_machine = nhk8815_platform_init,
359 .restart = cpu8815_restart, 352 .restart = cpu8815_restart,
360MACHINE_END 353MACHINE_END
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 a8fce3ccc707..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,
@@ -628,6 +628,6 @@ MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)")
628 .init_irq = omap1_init_irq, 628 .init_irq = omap1_init_irq,
629 .init_machine = ams_delta_init, 629 .init_machine = ams_delta_init,
630 .init_late = ams_delta_init_late, 630 .init_late = ams_delta_init_late,
631 .timer = &omap1_timer, 631 .init_time = omap1_timer_init,
632 .restart = omap1_restart, 632 .restart = omap1_restart,
633MACHINE_END 633MACHINE_END
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
index 560a7dcf0a56..702d58039cc1 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -364,6 +364,6 @@ MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample")
364 .init_irq = omap1_init_irq, 364 .init_irq = omap1_init_irq,
365 .init_machine = omap_fsample_init, 365 .init_machine = omap_fsample_init,
366 .init_late = omap1_init_late, 366 .init_late = omap1_init_late,
367 .timer = &omap1_timer, 367 .init_time = omap1_timer_init,
368 .restart = omap1_restart, 368 .restart = omap1_restart,
369MACHINE_END 369MACHINE_END
diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c
index 608e7d2a2778..e1d9171774bc 100644
--- a/arch/arm/mach-omap1/board-generic.c
+++ b/arch/arm/mach-omap1/board-generic.c
@@ -84,6 +84,6 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")
84 .init_irq = omap1_init_irq, 84 .init_irq = omap1_init_irq,
85 .init_machine = omap_generic_init, 85 .init_machine = omap_generic_init,
86 .init_late = omap1_init_late, 86 .init_late = omap1_init_late,
87 .timer = &omap1_timer, 87 .init_time = omap1_timer_init,
88 .restart = omap1_restart, 88 .restart = omap1_restart,
89MACHINE_END 89MACHINE_END
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 2274bd677efc..0dac3d239e32 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -461,6 +461,6 @@ MACHINE_START(OMAP_H2, "TI-H2")
461 .init_irq = omap1_init_irq, 461 .init_irq = omap1_init_irq,
462 .init_machine = h2_init, 462 .init_machine = h2_init,
463 .init_late = omap1_init_late, 463 .init_late = omap1_init_late,
464 .timer = &omap1_timer, 464 .init_time = omap1_timer_init,
465 .restart = omap1_restart, 465 .restart = omap1_restart,
466MACHINE_END 466MACHINE_END
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 1051935f0aac..816ecd13f81e 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -454,6 +454,6 @@ MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
454 .init_irq = omap1_init_irq, 454 .init_irq = omap1_init_irq,
455 .init_machine = h3_init, 455 .init_machine = h3_init,
456 .init_late = omap1_init_late, 456 .init_late = omap1_init_late,
457 .timer = &omap1_timer, 457 .init_time = omap1_timer_init,
458 .restart = omap1_restart, 458 .restart = omap1_restart,
459MACHINE_END 459MACHINE_END
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c
index 356f816c84a6..35a2379b986f 100644
--- a/arch/arm/mach-omap1/board-htcherald.c
+++ b/arch/arm/mach-omap1/board-htcherald.c
@@ -603,6 +603,6 @@ MACHINE_START(HERALD, "HTC Herald")
603 .init_irq = omap1_init_irq, 603 .init_irq = omap1_init_irq,
604 .init_machine = htcherald_init, 604 .init_machine = htcherald_init,
605 .init_late = omap1_init_late, 605 .init_late = omap1_init_late,
606 .timer = &omap1_timer, 606 .init_time = omap1_timer_init,
607 .restart = omap1_restart, 607 .restart = omap1_restart,
608MACHINE_END 608MACHINE_END
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index f8033fab0f82..bd5f02e9c354 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -458,6 +458,6 @@ MACHINE_START(OMAP_INNOVATOR, "TI-Innovator")
458 .init_irq = omap1_init_irq, 458 .init_irq = omap1_init_irq,
459 .init_machine = innovator_init, 459 .init_machine = innovator_init,
460 .init_late = omap1_init_late, 460 .init_late = omap1_init_late,
461 .timer = &omap1_timer, 461 .init_time = omap1_timer_init,
462 .restart = omap1_restart, 462 .restart = omap1_restart,
463MACHINE_END 463MACHINE_END
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 24d2f2df11a0..4695ca717706 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -242,6 +242,6 @@ MACHINE_START(NOKIA770, "Nokia 770")
242 .init_irq = omap1_init_irq, 242 .init_irq = omap1_init_irq,
243 .init_machine = omap_nokia770_init, 243 .init_machine = omap_nokia770_init,
244 .init_late = omap1_init_late, 244 .init_late = omap1_init_late,
245 .timer = &omap1_timer, 245 .init_time = omap1_timer_init,
246 .restart = omap1_restart, 246 .restart = omap1_restart,
247MACHINE_END 247MACHINE_END
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index 872ea47cd28a..a7ce69286688 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -609,6 +609,6 @@ MACHINE_START(OMAP_OSK, "TI-OSK")
609 .init_irq = omap1_init_irq, 609 .init_irq = omap1_init_irq,
610 .init_machine = osk_init, 610 .init_machine = osk_init,
611 .init_late = omap1_init_late, 611 .init_late = omap1_init_late,
612 .timer = &omap1_timer, 612 .init_time = omap1_timer_init,
613 .restart = omap1_restart, 613 .restart = omap1_restart,
614MACHINE_END 614MACHINE_END
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index c33dceb46607..845a1a7aef95 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -268,6 +268,6 @@ MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
268 .init_irq = omap1_init_irq, 268 .init_irq = omap1_init_irq,
269 .init_machine = omap_palmte_init, 269 .init_machine = omap_palmte_init,
270 .init_late = omap1_init_late, 270 .init_late = omap1_init_late,
271 .timer = &omap1_timer, 271 .init_time = omap1_timer_init,
272 .restart = omap1_restart, 272 .restart = omap1_restart,
273MACHINE_END 273MACHINE_END
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c
index 2948b0ee4be8..65a4a3e357f2 100644
--- a/arch/arm/mach-omap1/board-palmtt.c
+++ b/arch/arm/mach-omap1/board-palmtt.c
@@ -314,6 +314,6 @@ MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T")
314 .init_irq = omap1_init_irq, 314 .init_irq = omap1_init_irq,
315 .init_machine = omap_palmtt_init, 315 .init_machine = omap_palmtt_init,
316 .init_late = omap1_init_late, 316 .init_late = omap1_init_late,
317 .timer = &omap1_timer, 317 .init_time = omap1_timer_init,
318 .restart = omap1_restart, 318 .restart = omap1_restart,
319MACHINE_END 319MACHINE_END
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index 7a05895c0be3..01c970071fd8 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -330,6 +330,6 @@ MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71")
330 .init_irq = omap1_init_irq, 330 .init_irq = omap1_init_irq,
331 .init_machine = omap_palmz71_init, 331 .init_machine = omap_palmz71_init,
332 .init_late = omap1_init_late, 332 .init_late = omap1_init_late,
333 .timer = &omap1_timer, 333 .init_time = omap1_timer_init,
334 .restart = omap1_restart, 334 .restart = omap1_restart,
335MACHINE_END 335MACHINE_END
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index 27f8d12ec222..8b2f7127f716 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -326,6 +326,6 @@ MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2")
326 .init_irq = omap1_init_irq, 326 .init_irq = omap1_init_irq,
327 .init_machine = omap_perseus2_init, 327 .init_machine = omap_perseus2_init,
328 .init_late = omap1_init_late, 328 .init_late = omap1_init_late,
329 .timer = &omap1_timer, 329 .init_time = omap1_timer_init,
330 .restart = omap1_restart, 330 .restart = omap1_restart,
331MACHINE_END 331MACHINE_END
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
index 20ed52ae1714..9732a98f3e06 100644
--- a/arch/arm/mach-omap1/board-sx1.c
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -407,6 +407,6 @@ MACHINE_START(SX1, "OMAP310 based Siemens SX1")
407 .init_irq = omap1_init_irq, 407 .init_irq = omap1_init_irq,
408 .init_machine = omap_sx1_init, 408 .init_machine = omap_sx1_init,
409 .init_late = omap1_init_late, 409 .init_late = omap1_init_late,
410 .timer = &omap1_timer, 410 .init_time = omap1_timer_init,
411 .restart = omap1_restart, 411 .restart = omap1_restart,
412MACHINE_END 412MACHINE_END
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index abf705f49b19..6c116e1a4b01 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -289,6 +289,6 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
289 .init_irq = omap1_init_irq, 289 .init_irq = omap1_init_irq,
290 .init_machine = voiceblue_init, 290 .init_machine = voiceblue_init,
291 .init_late = omap1_init_late, 291 .init_late = omap1_init_late,
292 .timer = &omap1_timer, 292 .init_time = omap1_timer_init,
293 .restart = voiceblue_restart, 293 .restart = voiceblue_restart,
294MACHINE_END 294MACHINE_END
diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h
index b53e0854422f..fb18831e88aa 100644
--- a/arch/arm/mach-omap1/common.h
+++ b/arch/arm/mach-omap1/common.h
@@ -75,7 +75,7 @@ extern void __init omap_check_revision(void);
75extern void omap1_nand_cmd_ctl(struct mtd_info *mtd, int cmd, 75extern void omap1_nand_cmd_ctl(struct mtd_info *mtd, int cmd,
76 unsigned int ctrl); 76 unsigned int ctrl);
77 77
78extern struct sys_timer omap1_timer; 78extern void omap1_timer_init(void);
79#ifdef CONFIG_OMAP_32K_TIMER 79#ifdef CONFIG_OMAP_32K_TIMER
80extern int omap_32k_timer_init(void); 80extern int omap_32k_timer_init(void);
81#else 81#else
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 4d4816fd6fc9..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
@@ -236,12 +229,8 @@ static inline void omap_mpu_timer_init(void)
236 * Timer initialization 229 * Timer initialization
237 * --------------------------------------------------------------------------- 230 * ---------------------------------------------------------------------------
238 */ 231 */
239static void __init omap1_timer_init(void) 232void __init omap1_timer_init(void)
240{ 233{
241 if (omap_32k_timer_init() != 0) 234 if (omap_32k_timer_init() != 0)
242 omap_mpu_timer_init(); 235 omap_mpu_timer_init();
243} 236}
244
245struct sys_timer omap1_timer = {
246 .init = omap1_timer_init,
247};
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-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 4815ea6f8f5d..5f413968d568 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -284,6 +284,6 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
284 .handle_irq = omap2_intc_handle_irq, 284 .handle_irq = omap2_intc_handle_irq,
285 .init_machine = omap_2430sdp_init, 285 .init_machine = omap_2430sdp_init,
286 .init_late = omap2430_init_late, 286 .init_late = omap2430_init_late,
287 .timer = &omap2_timer, 287 .init_time = omap2_sync32k_timer_init,
288 .restart = omap2xxx_restart, 288 .restart = omap2xxx_restart,
289MACHINE_END 289MACHINE_END
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index bb73afc9ac17..8e2513f6a282 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -597,6 +597,6 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
597 .handle_irq = omap3_intc_handle_irq, 597 .handle_irq = omap3_intc_handle_irq,
598 .init_machine = omap_3430sdp_init, 598 .init_machine = omap_3430sdp_init,
599 .init_late = omap3430_init_late, 599 .init_late = omap3430_init_late,
600 .timer = &omap3_timer, 600 .init_time = omap3_sync32k_timer_init,
601 .restart = omap3xxx_restart, 601 .restart = omap3xxx_restart,
602MACHINE_END 602MACHINE_END
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index 050aaa771254..33846274bb8a 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -211,6 +211,6 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
211 .handle_irq = omap3_intc_handle_irq, 211 .handle_irq = omap3_intc_handle_irq,
212 .init_machine = omap_sdp_init, 212 .init_machine = omap_sdp_init,
213 .init_late = omap3630_init_late, 213 .init_late = omap3630_init_late,
214 .timer = &omap3_timer, 214 .init_time = omap3_sync32k_timer_init,
215 .restart = omap3xxx_restart, 215 .restart = omap3xxx_restart,
216MACHINE_END 216MACHINE_END
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 1cc6696594fd..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,9 +722,8 @@ 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 .timer = &omap4_timer, 727 .init_time = omap4_local_timer_init,
729 .restart = omap44xx_restart, 728 .restart = omap44xx_restart,
730MACHINE_END 729MACHINE_END
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
index 51b96a1206d1..07f0be24a5d1 100644
--- a/arch/arm/mach-omap2/board-am3517crane.c
+++ b/arch/arm/mach-omap2/board-am3517crane.c
@@ -92,6 +92,6 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
92 .handle_irq = omap3_intc_handle_irq, 92 .handle_irq = omap3_intc_handle_irq,
93 .init_machine = am3517_crane_init, 93 .init_machine = am3517_crane_init,
94 .init_late = am35xx_init_late, 94 .init_late = am35xx_init_late,
95 .timer = &omap3_timer, 95 .init_time = omap3_sync32k_timer_init,
96 .restart = omap3xxx_restart, 96 .restart = omap3xxx_restart,
97MACHINE_END 97MACHINE_END
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index f81a303b87ff..6f5b2a05f4b2 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -393,6 +393,6 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
393 .handle_irq = omap3_intc_handle_irq, 393 .handle_irq = omap3_intc_handle_irq,
394 .init_machine = am3517_evm_init, 394 .init_machine = am3517_evm_init,
395 .init_late = am35xx_init_late, 395 .init_late = am35xx_init_late,
396 .timer = &omap3_timer, 396 .init_time = omap3_sync32k_timer_init,
397 .restart = omap3xxx_restart, 397 .restart = omap3xxx_restart,
398MACHINE_END 398MACHINE_END
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index 5d0a61f54165..3a6ca74709ab 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -337,6 +337,6 @@ MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
337 .handle_irq = omap2_intc_handle_irq, 337 .handle_irq = omap2_intc_handle_irq,
338 .init_machine = omap_apollon_init, 338 .init_machine = omap_apollon_init,
339 .init_late = omap2420_init_late, 339 .init_late = omap2420_init_late,
340 .timer = &omap2_timer, 340 .init_time = omap2_sync32k_timer_init,
341 .restart = omap2xxx_restart, 341 .restart = omap2xxx_restart,
342MACHINE_END 342MACHINE_END
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index b3102c2f4a3c..68647c389190 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -751,7 +751,7 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
751 .handle_irq = omap3_intc_handle_irq, 751 .handle_irq = omap3_intc_handle_irq,
752 .init_machine = cm_t35_init, 752 .init_machine = cm_t35_init,
753 .init_late = omap35xx_init_late, 753 .init_late = omap35xx_init_late,
754 .timer = &omap3_timer, 754 .init_time = omap3_sync32k_timer_init,
755 .restart = omap3xxx_restart, 755 .restart = omap3xxx_restart,
756MACHINE_END 756MACHINE_END
757 757
@@ -764,6 +764,6 @@ MACHINE_START(CM_T3730, "Compulab CM-T3730")
764 .handle_irq = omap3_intc_handle_irq, 764 .handle_irq = omap3_intc_handle_irq,
765 .init_machine = cm_t3730_init, 765 .init_machine = cm_t3730_init,
766 .init_late = omap3630_init_late, 766 .init_late = omap3630_init_late,
767 .timer = &omap3_timer, 767 .init_time = omap3_sync32k_timer_init,
768 .restart = omap3xxx_restart, 768 .restart = omap3xxx_restart,
769MACHINE_END 769MACHINE_END
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
index ebbc2adb499e..6a9529ab95cd 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -297,6 +297,6 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517")
297 .handle_irq = omap3_intc_handle_irq, 297 .handle_irq = omap3_intc_handle_irq,
298 .init_machine = cm_t3517_init, 298 .init_machine = cm_t3517_init,
299 .init_late = am35xx_init_late, 299 .init_late = am35xx_init_late,
300 .timer = &omap3_gp_timer, 300 .init_time = omap3_gp_gptimer_timer_init,
301 .restart = omap3xxx_restart, 301 .restart = omap3xxx_restart,
302MACHINE_END 302MACHINE_END
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 12865af25d3a..0b1d8f758088 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -643,6 +643,6 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
643 .handle_irq = omap3_intc_handle_irq, 643 .handle_irq = omap3_intc_handle_irq,
644 .init_machine = devkit8000_init, 644 .init_machine = devkit8000_init,
645 .init_late = omap35xx_init_late, 645 .init_late = omap35xx_init_late,
646 .timer = &omap3_secure_timer, 646 .init_time = omap3_secure_sync32k_timer_init,
647 .restart = omap3xxx_restart, 647 .restart = omap3xxx_restart,
648MACHINE_END 648MACHINE_END
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 53cb380b7877..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"
@@ -65,7 +64,7 @@ DT_MACHINE_START(OMAP242X_DT, "Generic OMAP2420 (Flattened Device Tree)")
65 .init_irq = omap_intc_of_init, 64 .init_irq = omap_intc_of_init,
66 .handle_irq = omap2_intc_handle_irq, 65 .handle_irq = omap2_intc_handle_irq,
67 .init_machine = omap_generic_init, 66 .init_machine = omap_generic_init,
68 .timer = &omap2_timer, 67 .init_time = omap2_sync32k_timer_init,
69 .dt_compat = omap242x_boards_compat, 68 .dt_compat = omap242x_boards_compat,
70 .restart = omap2xxx_restart, 69 .restart = omap2xxx_restart,
71MACHINE_END 70MACHINE_END
@@ -84,7 +83,7 @@ DT_MACHINE_START(OMAP243X_DT, "Generic OMAP2430 (Flattened Device Tree)")
84 .init_irq = omap_intc_of_init, 83 .init_irq = omap_intc_of_init,
85 .handle_irq = omap2_intc_handle_irq, 84 .handle_irq = omap2_intc_handle_irq,
86 .init_machine = omap_generic_init, 85 .init_machine = omap_generic_init,
87 .timer = &omap2_timer, 86 .init_time = omap2_sync32k_timer_init,
88 .dt_compat = omap243x_boards_compat, 87 .dt_compat = omap243x_boards_compat,
89 .restart = omap2xxx_restart, 88 .restart = omap2xxx_restart,
90MACHINE_END 89MACHINE_END
@@ -103,7 +102,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
103 .init_irq = omap_intc_of_init, 102 .init_irq = omap_intc_of_init,
104 .handle_irq = omap3_intc_handle_irq, 103 .handle_irq = omap3_intc_handle_irq,
105 .init_machine = omap_generic_init, 104 .init_machine = omap_generic_init,
106 .timer = &omap3_timer, 105 .init_time = omap3_sync32k_timer_init,
107 .dt_compat = omap3_boards_compat, 106 .dt_compat = omap3_boards_compat,
108 .restart = omap3xxx_restart, 107 .restart = omap3xxx_restart,
109MACHINE_END 108MACHINE_END
@@ -120,7 +119,7 @@ DT_MACHINE_START(OMAP3_GP_DT, "Generic OMAP3-GP (Flattened Device Tree)")
120 .init_irq = omap_intc_of_init, 119 .init_irq = omap_intc_of_init,
121 .handle_irq = omap3_intc_handle_irq, 120 .handle_irq = omap3_intc_handle_irq,
122 .init_machine = omap_generic_init, 121 .init_machine = omap_generic_init,
123 .timer = &omap3_secure_timer, 122 .init_time = omap3_secure_sync32k_timer_init,
124 .dt_compat = omap3_gp_boards_compat, 123 .dt_compat = omap3_gp_boards_compat,
125 .restart = omap3xxx_restart, 124 .restart = omap3xxx_restart,
126MACHINE_END 125MACHINE_END
@@ -139,7 +138,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)")
139 .init_irq = omap_intc_of_init, 138 .init_irq = omap_intc_of_init,
140 .handle_irq = omap3_intc_handle_irq, 139 .handle_irq = omap3_intc_handle_irq,
141 .init_machine = omap_generic_init, 140 .init_machine = omap_generic_init,
142 .timer = &omap3_am33xx_timer, 141 .init_time = omap3_am33xx_gptimer_timer_init,
143 .dt_compat = am33xx_boards_compat, 142 .dt_compat = am33xx_boards_compat,
144MACHINE_END 143MACHINE_END
145#endif 144#endif
@@ -156,10 +155,9 @@ 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 .timer = &omap4_timer, 160 .init_time = omap4_local_timer_init,
163 .dt_compat = omap4_boards_compat, 161 .dt_compat = omap4_boards_compat,
164 .restart = omap44xx_restart, 162 .restart = omap44xx_restart,
165MACHINE_END 163MACHINE_END
@@ -177,9 +175,8 @@ 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 .timer = &omap5_timer, 179 .init_time = omap5_realtime_timer_init,
183 .dt_compat = omap5_boards_compat, 180 .dt_compat = omap5_boards_compat,
184 .restart = omap44xx_restart, 181 .restart = omap44xx_restart,
185MACHINE_END 182MACHINE_END
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 3be1311f9e33..812c829fa46f 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -342,6 +342,6 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
342 .handle_irq = omap2_intc_handle_irq, 342 .handle_irq = omap2_intc_handle_irq,
343 .init_machine = omap_h4_init, 343 .init_machine = omap_h4_init,
344 .init_late = omap2420_init_late, 344 .init_late = omap2420_init_late,
345 .timer = &omap2_timer, 345 .init_time = omap2_sync32k_timer_init,
346 .restart = omap2xxx_restart, 346 .restart = omap2xxx_restart,
347MACHINE_END 347MACHINE_END
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 0f24cb84ba5a..5b447649f5a0 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -655,7 +655,7 @@ MACHINE_START(IGEP0020, "IGEP v2 board")
655 .handle_irq = omap3_intc_handle_irq, 655 .handle_irq = omap3_intc_handle_irq,
656 .init_machine = igep_init, 656 .init_machine = igep_init,
657 .init_late = omap35xx_init_late, 657 .init_late = omap35xx_init_late,
658 .timer = &omap3_timer, 658 .init_time = omap3_sync32k_timer_init,
659 .restart = omap3xxx_restart, 659 .restart = omap3xxx_restart,
660MACHINE_END 660MACHINE_END
661 661
@@ -668,6 +668,6 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module")
668 .handle_irq = omap3_intc_handle_irq, 668 .handle_irq = omap3_intc_handle_irq,
669 .init_machine = igep_init, 669 .init_machine = igep_init,
670 .init_late = omap35xx_init_late, 670 .init_late = omap35xx_init_late,
671 .timer = &omap3_timer, 671 .init_time = omap3_sync32k_timer_init,
672 .restart = omap3xxx_restart, 672 .restart = omap3xxx_restart,
673MACHINE_END 673MACHINE_END
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 0869f4f3d3e1..ff440c0d04dd 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -435,6 +435,6 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board")
435 .handle_irq = omap3_intc_handle_irq, 435 .handle_irq = omap3_intc_handle_irq,
436 .init_machine = omap_ldp_init, 436 .init_machine = omap_ldp_init,
437 .init_late = omap3430_init_late, 437 .init_late = omap3430_init_late,
438 .timer = &omap3_timer, 438 .init_time = omap3_sync32k_timer_init,
439 .restart = omap3xxx_restart, 439 .restart = omap3xxx_restart,
440MACHINE_END 440MACHINE_END
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 0abb30fe399c..f6eeb87e4e95 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -731,7 +731,7 @@ MACHINE_START(NOKIA_N800, "Nokia N800")
731 .handle_irq = omap2_intc_handle_irq, 731 .handle_irq = omap2_intc_handle_irq,
732 .init_machine = n8x0_init_machine, 732 .init_machine = n8x0_init_machine,
733 .init_late = omap2420_init_late, 733 .init_late = omap2420_init_late,
734 .timer = &omap2_timer, 734 .init_time = omap2_sync32k_timer_init,
735 .restart = omap2xxx_restart, 735 .restart = omap2xxx_restart,
736MACHINE_END 736MACHINE_END
737 737
@@ -744,7 +744,7 @@ MACHINE_START(NOKIA_N810, "Nokia N810")
744 .handle_irq = omap2_intc_handle_irq, 744 .handle_irq = omap2_intc_handle_irq,
745 .init_machine = n8x0_init_machine, 745 .init_machine = n8x0_init_machine,
746 .init_late = omap2420_init_late, 746 .init_late = omap2420_init_late,
747 .timer = &omap2_timer, 747 .init_time = omap2_sync32k_timer_init,
748 .restart = omap2xxx_restart, 748 .restart = omap2xxx_restart,
749MACHINE_END 749MACHINE_END
750 750
@@ -757,6 +757,6 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
757 .handle_irq = omap2_intc_handle_irq, 757 .handle_irq = omap2_intc_handle_irq,
758 .init_machine = n8x0_init_machine, 758 .init_machine = n8x0_init_machine,
759 .init_late = omap2420_init_late, 759 .init_late = omap2420_init_late,
760 .timer = &omap2_timer, 760 .init_time = omap2_sync32k_timer_init,
761 .restart = omap2xxx_restart, 761 .restart = omap2xxx_restart,
762MACHINE_END 762MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 22c483d5dfa8..b81b4585f46f 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -544,6 +544,6 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
544 .handle_irq = omap3_intc_handle_irq, 544 .handle_irq = omap3_intc_handle_irq,
545 .init_machine = omap3_beagle_init, 545 .init_machine = omap3_beagle_init,
546 .init_late = omap3_init_late, 546 .init_late = omap3_init_late,
547 .timer = &omap3_secure_timer, 547 .init_time = omap3_secure_sync32k_timer_init,
548 .restart = omap3xxx_restart, 548 .restart = omap3xxx_restart,
549MACHINE_END 549MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 3985f35aee06..f2f636b19762 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -757,6 +757,6 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM")
757 .handle_irq = omap3_intc_handle_irq, 757 .handle_irq = omap3_intc_handle_irq,
758 .init_machine = omap3_evm_init, 758 .init_machine = omap3_evm_init,
759 .init_late = omap35xx_init_late, 759 .init_late = omap35xx_init_late,
760 .timer = &omap3_timer, 760 .init_time = omap3_sync32k_timer_init,
761 .restart = omap3xxx_restart, 761 .restart = omap3xxx_restart,
762MACHINE_END 762MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 2a065ba6eb58..0fba43a9b07d 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -231,7 +231,7 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
231 .handle_irq = omap3_intc_handle_irq, 231 .handle_irq = omap3_intc_handle_irq,
232 .init_machine = omap3logic_init, 232 .init_machine = omap3logic_init,
233 .init_late = omap35xx_init_late, 233 .init_late = omap35xx_init_late,
234 .timer = &omap3_timer, 234 .init_time = omap3_sync32k_timer_init,
235 .restart = omap3xxx_restart, 235 .restart = omap3xxx_restart,
236MACHINE_END 236MACHINE_END
237 237
@@ -244,6 +244,6 @@ MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
244 .handle_irq = omap3_intc_handle_irq, 244 .handle_irq = omap3_intc_handle_irq,
245 .init_machine = omap3logic_init, 245 .init_machine = omap3logic_init,
246 .init_late = omap35xx_init_late, 246 .init_late = omap35xx_init_late,
247 .timer = &omap3_timer, 247 .init_time = omap3_sync32k_timer_init,
248 .restart = omap3xxx_restart, 248 .restart = omap3xxx_restart,
249MACHINE_END 249MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index a53a6683c1b8..12e181689340 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -618,6 +618,6 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
618 .handle_irq = omap3_intc_handle_irq, 618 .handle_irq = omap3_intc_handle_irq,
619 .init_machine = omap3pandora_init, 619 .init_machine = omap3pandora_init,
620 .init_late = omap35xx_init_late, 620 .init_late = omap35xx_init_late,
621 .timer = &omap3_timer, 621 .init_time = omap3_sync32k_timer_init,
622 .restart = omap3xxx_restart, 622 .restart = omap3xxx_restart,
623MACHINE_END 623MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 53a6cbcf9747..13ee40545604 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -427,6 +427,6 @@ MACHINE_START(SBC3530, "OMAP3 STALKER")
427 .handle_irq = omap3_intc_handle_irq, 427 .handle_irq = omap3_intc_handle_irq,
428 .init_machine = omap3_stalker_init, 428 .init_machine = omap3_stalker_init,
429 .init_late = omap35xx_init_late, 429 .init_late = omap35xx_init_late,
430 .timer = &omap3_secure_timer, 430 .init_time = omap3_secure_sync32k_timer_init,
431 .restart = omap3xxx_restart, 431 .restart = omap3xxx_restart,
432MACHINE_END 432MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 263cb9cfbf37..36c455c85ed9 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -386,6 +386,6 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
386 .handle_irq = omap3_intc_handle_irq, 386 .handle_irq = omap3_intc_handle_irq,
387 .init_machine = omap3_touchbook_init, 387 .init_machine = omap3_touchbook_init,
388 .init_late = omap3430_init_late, 388 .init_late = omap3430_init_late,
389 .timer = &omap3_secure_timer, 389 .init_time = omap3_secure_sync32k_timer_init,
390 .restart = omap3xxx_restart, 390 .restart = omap3xxx_restart,
391MACHINE_END 391MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 5c8e9cee2c2e..b62317906b39 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>
@@ -397,6 +397,12 @@ static struct omap_board_mux board_mux[] __initdata = {
397 OMAP_PULL_ENA), 397 OMAP_PULL_ENA),
398 OMAP4_MUX(ABE_MCBSP1_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), 398 OMAP4_MUX(ABE_MCBSP1_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
399 399
400 /* UART2 - BT/FM/GPS shared transport */
401 OMAP4_MUX(UART2_CTS, OMAP_PIN_INPUT | OMAP_MUX_MODE0),
402 OMAP4_MUX(UART2_RTS, OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
403 OMAP4_MUX(UART2_RX, OMAP_PIN_INPUT | OMAP_MUX_MODE0),
404 OMAP4_MUX(UART2_TX, OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
405
400 { .reg_offset = OMAP_MUX_TERMINATOR }, 406 { .reg_offset = OMAP_MUX_TERMINATOR },
401}; 407};
402 408
@@ -453,9 +459,8 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
453 .map_io = omap4_map_io, 459 .map_io = omap4_map_io,
454 .init_early = omap4430_init_early, 460 .init_early = omap4430_init_early,
455 .init_irq = gic_init_irq, 461 .init_irq = gic_init_irq,
456 .handle_irq = gic_handle_irq,
457 .init_machine = omap4_panda_init, 462 .init_machine = omap4_panda_init,
458 .init_late = omap4430_init_late, 463 .init_late = omap4430_init_late,
459 .timer = &omap4_timer, 464 .init_time = omap4_local_timer_init,
460 .restart = omap44xx_restart, 465 .restart = omap44xx_restart,
461MACHINE_END 466MACHINE_END
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index c8fde3e56441..233a37d541c3 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -551,6 +551,6 @@ MACHINE_START(OVERO, "Gumstix Overo")
551 .handle_irq = omap3_intc_handle_irq, 551 .handle_irq = omap3_intc_handle_irq,
552 .init_machine = overo_init, 552 .init_machine = overo_init,
553 .init_late = omap35xx_init_late, 553 .init_late = omap35xx_init_late,
554 .timer = &omap3_timer, 554 .init_time = omap3_sync32k_timer_init,
555 .restart = omap3xxx_restart, 555 .restart = omap3xxx_restart,
556MACHINE_END 556MACHINE_END
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index 0c777b75e484..386a2ddc1173 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -147,7 +147,7 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
147 .handle_irq = omap3_intc_handle_irq, 147 .handle_irq = omap3_intc_handle_irq,
148 .init_machine = rm680_init, 148 .init_machine = rm680_init,
149 .init_late = omap3630_init_late, 149 .init_late = omap3630_init_late,
150 .timer = &omap3_timer, 150 .init_time = omap3_sync32k_timer_init,
151 .restart = omap3xxx_restart, 151 .restart = omap3xxx_restart,
152MACHINE_END 152MACHINE_END
153 153
@@ -160,6 +160,6 @@ MACHINE_START(NOKIA_RM696, "Nokia RM-696 board")
160 .handle_irq = omap3_intc_handle_irq, 160 .handle_irq = omap3_intc_handle_irq,
161 .init_machine = rm680_init, 161 .init_machine = rm680_init,
162 .init_late = omap3630_init_late, 162 .init_late = omap3630_init_late,
163 .timer = &omap3_timer, 163 .init_time = omap3_sync32k_timer_init,
164 .restart = omap3xxx_restart, 164 .restart = omap3xxx_restart,
165MACHINE_END 165MACHINE_END
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index d0374ea2dfb0..f7c4616cbb60 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -123,6 +123,6 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
123 .handle_irq = omap3_intc_handle_irq, 123 .handle_irq = omap3_intc_handle_irq,
124 .init_machine = rx51_init, 124 .init_machine = rx51_init,
125 .init_late = omap3430_init_late, 125 .init_late = omap3430_init_late,
126 .timer = &omap3_timer, 126 .init_time = omap3_sync32k_timer_init,
127 .restart = omap3xxx_restart, 127 .restart = omap3xxx_restart,
128MACHINE_END 128MACHINE_END
diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c
index 1a3e056d63a7..6273c286e1d8 100644
--- a/arch/arm/mach-omap2/board-ti8168evm.c
+++ b/arch/arm/mach-omap2/board-ti8168evm.c
@@ -43,7 +43,7 @@ MACHINE_START(TI8168EVM, "ti8168evm")
43 .map_io = ti81xx_map_io, 43 .map_io = ti81xx_map_io,
44 .init_early = ti81xx_init_early, 44 .init_early = ti81xx_init_early,
45 .init_irq = ti81xx_init_irq, 45 .init_irq = ti81xx_init_irq,
46 .timer = &omap3_timer, 46 .init_time = omap3_sync32k_timer_init,
47 .init_machine = ti81xx_evm_init, 47 .init_machine = ti81xx_evm_init,
48 .init_late = ti81xx_init_late, 48 .init_late = ti81xx_init_late,
49 .restart = omap44xx_restart, 49 .restart = omap44xx_restart,
@@ -55,7 +55,7 @@ MACHINE_START(TI8148EVM, "ti8148evm")
55 .map_io = ti81xx_map_io, 55 .map_io = ti81xx_map_io,
56 .init_early = ti81xx_init_early, 56 .init_early = ti81xx_init_early,
57 .init_irq = ti81xx_init_irq, 57 .init_irq = ti81xx_init_irq,
58 .timer = &omap3_timer, 58 .init_time = omap3_sync32k_timer_init,
59 .init_machine = ti81xx_evm_init, 59 .init_machine = ti81xx_evm_init,
60 .init_late = ti81xx_init_late, 60 .init_late = ti81xx_init_late,
61 .restart = omap44xx_restart, 61 .restart = omap44xx_restart,
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c
index d7fa31e67238..d257cf1e0abe 100644
--- a/arch/arm/mach-omap2/board-zoom.c
+++ b/arch/arm/mach-omap2/board-zoom.c
@@ -137,7 +137,7 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
137 .handle_irq = omap3_intc_handle_irq, 137 .handle_irq = omap3_intc_handle_irq,
138 .init_machine = omap_zoom_init, 138 .init_machine = omap_zoom_init,
139 .init_late = omap3430_init_late, 139 .init_late = omap3430_init_late,
140 .timer = &omap3_timer, 140 .init_time = omap3_sync32k_timer_init,
141 .restart = omap3xxx_restart, 141 .restart = omap3xxx_restart,
142MACHINE_END 142MACHINE_END
143 143
@@ -150,6 +150,6 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
150 .handle_irq = omap3_intc_handle_irq, 150 .handle_irq = omap3_intc_handle_irq,
151 .init_machine = omap_zoom_init, 151 .init_machine = omap_zoom_init,
152 .init_late = omap3630_init_late, 152 .init_late = omap3630_init_late,
153 .timer = &omap3_timer, 153 .init_time = omap3_sync32k_timer_init,
154 .restart = omap3xxx_restart, 154 .restart = omap3xxx_restart,
155MACHINE_END 155MACHINE_END
diff --git a/arch/arm/mach-omap2/cclock2420_data.c b/arch/arm/mach-omap2/cclock2420_data.c
index 7e5febe456d9..ab7e952d2070 100644
--- a/arch/arm/mach-omap2/cclock2420_data.c
+++ b/arch/arm/mach-omap2/cclock2420_data.c
@@ -1935,6 +1935,8 @@ int __init omap2420_clk_init(void)
1935 omap2_init_clk_hw_omap_clocks(c->lk.clk); 1935 omap2_init_clk_hw_omap_clocks(c->lk.clk);
1936 } 1936 }
1937 1937
1938 omap2xxx_clkt_vps_late_init();
1939
1938 omap2_clk_disable_autoidle_all(); 1940 omap2_clk_disable_autoidle_all();
1939 1941
1940 omap2_clk_enable_init_clocks(enable_init_clks, 1942 omap2_clk_enable_init_clocks(enable_init_clks,
diff --git a/arch/arm/mach-omap2/cclock2430_data.c b/arch/arm/mach-omap2/cclock2430_data.c
index eda079b96c6a..eb3dab68d536 100644
--- a/arch/arm/mach-omap2/cclock2430_data.c
+++ b/arch/arm/mach-omap2/cclock2430_data.c
@@ -2050,6 +2050,8 @@ int __init omap2430_clk_init(void)
2050 omap2_init_clk_hw_omap_clocks(c->lk.clk); 2050 omap2_init_clk_hw_omap_clocks(c->lk.clk);
2051 } 2051 }
2052 2052
2053 omap2xxx_clkt_vps_late_init();
2054
2053 omap2_clk_disable_autoidle_all(); 2055 omap2_clk_disable_autoidle_all();
2054 2056
2055 omap2_clk_enable_init_clocks(enable_init_clks, 2057 omap2_clk_enable_init_clocks(enable_init_clks,
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/cclock44xx_data.c b/arch/arm/mach-omap2/cclock44xx_data.c
index 5789a5e25563..a2cc046b47f4 100644
--- a/arch/arm/mach-omap2/cclock44xx_data.c
+++ b/arch/arm/mach-omap2/cclock44xx_data.c
@@ -2026,14 +2026,13 @@ int __init omap4xxx_clk_init(void)
2026 * On OMAP4460 the ABE DPLL fails to turn on if in idle low-power 2026 * On OMAP4460 the ABE DPLL fails to turn on if in idle low-power
2027 * state when turning the ABE clock domain. Workaround this by 2027 * state when turning the ABE clock domain. Workaround this by
2028 * locking the ABE DPLL on boot. 2028 * locking the ABE DPLL on boot.
2029 * Lock the ABE DPLL in any case to avoid issues with audio.
2029 */ 2030 */
2030 if (cpu_is_omap446x()) { 2031 rc = clk_set_parent(&abe_dpll_refclk_mux_ck, &sys_32k_ck);
2031 rc = clk_set_parent(&abe_dpll_refclk_mux_ck, &sys_32k_ck); 2032 if (!rc)
2032 if (!rc) 2033 rc = clk_set_rate(&dpll_abe_ck, OMAP4_DPLL_ABE_DEFFREQ);
2033 rc = clk_set_rate(&dpll_abe_ck, OMAP4_DPLL_ABE_DEFFREQ); 2034 if (rc)
2034 if (rc) 2035 pr_err("%s: failed to configure ABE DPLL!\n", __func__);
2035 pr_err("%s: failed to configure ABE DPLL!\n", __func__);
2036 }
2037 2036
2038 return 0; 2037 return 0;
2039} 2038}
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 948bcaa82eb6..b4350274361b 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -79,13 +79,13 @@ static inline int omap_mux_late_init(void)
79 79
80extern void omap2_init_common_infrastructure(void); 80extern void omap2_init_common_infrastructure(void);
81 81
82extern struct sys_timer omap2_timer; 82extern void omap2_sync32k_timer_init(void);
83extern struct sys_timer omap3_timer; 83extern void omap3_sync32k_timer_init(void);
84extern struct sys_timer omap3_secure_timer; 84extern void omap3_secure_sync32k_timer_init(void);
85extern struct sys_timer omap3_gp_timer; 85extern void omap3_gp_gptimer_timer_init(void);
86extern struct sys_timer omap3_am33xx_timer; 86extern void omap3_am33xx_gptimer_timer_init(void);
87extern struct sys_timer omap4_timer; 87extern void omap4_local_timer_init(void);
88extern struct sys_timer omap5_timer; 88extern void omap5_realtime_timer_init(void);
89 89
90void omap2420_init_early(void); 90void omap2420_init_early(void);
91void omap2430_init_early(void); 91void omap2430_init_early(void);
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/devices.c b/arch/arm/mach-omap2/devices.c
index 5e304d0719a2..626f3ea3142f 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -639,7 +639,7 @@ static int count_ocp2scp_devices(struct omap_ocp2scp_dev *ocp2scp_dev)
639 return cnt; 639 return cnt;
640} 640}
641 641
642static void omap_init_ocp2scp(void) 642static void __init omap_init_ocp2scp(void)
643{ 643{
644 struct omap_hwmod *oh; 644 struct omap_hwmod *oh;
645 struct platform_device *pdev; 645 struct platform_device *pdev;
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..2a2cfa88ddbf 100644
--- a/arch/arm/mach-omap2/drm.c
+++ b/arch/arm/mach-omap2/drm.c
@@ -25,9 +25,9 @@
25#include <linux/dma-mapping.h> 25#include <linux/dma-mapping.h>
26#include <linux/platform_data/omap_drm.h> 26#include <linux/platform_data/omap_drm.h>
27 27
28#include "soc.h"
28#include "omap_device.h" 29#include "omap_device.h"
29#include "omap_hwmod.h" 30#include "omap_hwmod.h"
30#include <plat/cpu.h>
31 31
32#if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE) 32#if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE)
33 33
@@ -57,7 +57,7 @@ static int __init omap_init_drm(void)
57 oh->name); 57 oh->name);
58 } 58 }
59 59
60 platform_data.omaprev = GET_OMAP_REVISION(); 60 platform_data.omaprev = GET_OMAP_TYPE;
61 61
62 return platform_device_register(&omap_drm_device); 62 return platform_device_register(&omap_drm_device);
63 63
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..793f54ac7d14 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>
@@ -2133,8 +2132,12 @@ static struct omap_hwmod omap44xx_mcpdm_hwmod = {
2133 * currently reset very early during boot, before I2C is 2132 * currently reset very early during boot, before I2C is
2134 * available, so it doesn't seem that we have any choice in 2133 * available, so it doesn't seem that we have any choice in
2135 * the kernel other than to avoid resetting it. 2134 * the kernel other than to avoid resetting it.
2135 *
2136 * Also, McPDM needs to be configured to NO_IDLE mode when it
2137 * is in used otherwise vital clocks will be gated which
2138 * results 'slow motion' audio playback.
2136 */ 2139 */
2137 .flags = HWMOD_EXT_OPT_MAIN_CLK, 2140 .flags = HWMOD_EXT_OPT_MAIN_CLK | HWMOD_SWSUP_SIDLE,
2138 .mpu_irqs = omap44xx_mcpdm_irqs, 2141 .mpu_irqs = omap44xx_mcpdm_irqs,
2139 .sdma_reqs = omap44xx_mcpdm_sdma_reqs, 2142 .sdma_reqs = omap44xx_mcpdm_sdma_reqs,
2140 .main_clk = "mcpdm_fck", 2143 .main_clk = "mcpdm_fck",
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 691aa674665a..d86074745c50 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,
@@ -165,15 +164,11 @@ static struct device_node * __init omap_get_timer_dt(struct of_device_id *match,
165 struct device_node *np; 164 struct device_node *np;
166 165
167 for_each_matching_node(np, match) { 166 for_each_matching_node(np, match) {
168 if (!of_device_is_available(np)) { 167 if (!of_device_is_available(np))
169 of_node_put(np);
170 continue; 168 continue;
171 }
172 169
173 if (property && !of_get_property(np, property, NULL)) { 170 if (property && !of_get_property(np, property, NULL))
174 of_node_put(np);
175 continue; 171 continue;
176 }
177 172
178 of_add_property(np, &device_disabled); 173 of_add_property(np, &device_disabled);
179 return np; 174 return np;
@@ -340,17 +335,11 @@ static void __init omap2_gp_clockevent_init(int gptimer_id,
340 335
341 __omap_dm_timer_int_enable(&clkev, OMAP_TIMER_INT_OVERFLOW); 336 __omap_dm_timer_int_enable(&clkev, OMAP_TIMER_INT_OVERFLOW);
342 337
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; 338 clockevent_gpt.cpumask = cpu_possible_mask;
352 clockevent_gpt.irq = omap_dm_timer_get_irq(&clkev); 339 clockevent_gpt.irq = omap_dm_timer_get_irq(&clkev);
353 clockevents_register_device(&clockevent_gpt); 340 clockevents_config_and_register(&clockevent_gpt, clkev.rate,
341 3, /* Timer internal resynch latency */
342 0xffffffff);
354 343
355 pr_info("OMAP clockevent source: GPTIMER%d at %lu Hz\n", 344 pr_info("OMAP clockevent source: GPTIMER%d at %lu Hz\n",
356 gptimer_id, clkev.rate); 345 gptimer_id, clkev.rate);
@@ -556,7 +545,7 @@ static inline void __init realtime_counter_init(void)
556 545
557#define OMAP_SYS_GP_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \ 546#define OMAP_SYS_GP_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \
558 clksrc_nr, clksrc_src) \ 547 clksrc_nr, clksrc_src) \
559static void __init omap##name##_gptimer_timer_init(void) \ 548void __init omap##name##_gptimer_timer_init(void) \
560{ \ 549{ \
561 omap_dmtimer_init(); \ 550 omap_dmtimer_init(); \
562 omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ 551 omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \
@@ -565,7 +554,7 @@ static void __init omap##name##_gptimer_timer_init(void) \
565 554
566#define OMAP_SYS_32K_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \ 555#define OMAP_SYS_32K_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \
567 clksrc_nr, clksrc_src) \ 556 clksrc_nr, clksrc_src) \
568static void __init omap##name##_sync32k_timer_init(void) \ 557void __init omap##name##_sync32k_timer_init(void) \
569{ \ 558{ \
570 omap_dmtimer_init(); \ 559 omap_dmtimer_init(); \
571 omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ 560 omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \
@@ -576,33 +565,23 @@ static void __init omap##name##_sync32k_timer_init(void) \
576 omap2_sync32k_clocksource_init(); \ 565 omap2_sync32k_clocksource_init(); \
577} 566}
578 567
579#define OMAP_SYS_TIMER(name, clksrc) \
580struct sys_timer omap##name##_timer = { \
581 .init = omap##name##_##clksrc##_timer_init, \
582};
583
584#ifdef CONFIG_ARCH_OMAP2 568#ifdef CONFIG_ARCH_OMAP2
585OMAP_SYS_32K_TIMER_INIT(2, 1, OMAP2_32K_SOURCE, "ti,timer-alwon", 569OMAP_SYS_32K_TIMER_INIT(2, 1, OMAP2_32K_SOURCE, "ti,timer-alwon",
586 2, OMAP2_MPU_SOURCE); 570 2, OMAP2_MPU_SOURCE);
587OMAP_SYS_TIMER(2, sync32k);
588#endif /* CONFIG_ARCH_OMAP2 */ 571#endif /* CONFIG_ARCH_OMAP2 */
589 572
590#ifdef CONFIG_ARCH_OMAP3 573#ifdef CONFIG_ARCH_OMAP3
591OMAP_SYS_32K_TIMER_INIT(3, 1, OMAP3_32K_SOURCE, "ti,timer-alwon", 574OMAP_SYS_32K_TIMER_INIT(3, 1, OMAP3_32K_SOURCE, "ti,timer-alwon",
592 2, OMAP3_MPU_SOURCE); 575 2, OMAP3_MPU_SOURCE);
593OMAP_SYS_TIMER(3, sync32k);
594OMAP_SYS_32K_TIMER_INIT(3_secure, 12, OMAP3_32K_SOURCE, "ti,timer-secure", 576OMAP_SYS_32K_TIMER_INIT(3_secure, 12, OMAP3_32K_SOURCE, "ti,timer-secure",
595 2, OMAP3_MPU_SOURCE); 577 2, OMAP3_MPU_SOURCE);
596OMAP_SYS_TIMER(3_secure, sync32k);
597OMAP_SYS_GP_TIMER_INIT(3_gp, 1, OMAP3_MPU_SOURCE, "ti,timer-alwon", 578OMAP_SYS_GP_TIMER_INIT(3_gp, 1, OMAP3_MPU_SOURCE, "ti,timer-alwon",
598 2, OMAP3_MPU_SOURCE); 579 2, OMAP3_MPU_SOURCE);
599OMAP_SYS_TIMER(3_gp, gptimer);
600#endif /* CONFIG_ARCH_OMAP3 */ 580#endif /* CONFIG_ARCH_OMAP3 */
601 581
602#ifdef CONFIG_SOC_AM33XX 582#ifdef CONFIG_SOC_AM33XX
603OMAP_SYS_GP_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, "ti,timer-alwon", 583OMAP_SYS_GP_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, "ti,timer-alwon",
604 2, OMAP4_MPU_SOURCE); 584 2, OMAP4_MPU_SOURCE);
605OMAP_SYS_TIMER(3_am33xx, gptimer);
606#endif /* CONFIG_SOC_AM33XX */ 585#endif /* CONFIG_SOC_AM33XX */
607 586
608#ifdef CONFIG_ARCH_OMAP4 587#ifdef CONFIG_ARCH_OMAP4
@@ -610,7 +589,7 @@ OMAP_SYS_32K_TIMER_INIT(4, 1, OMAP4_32K_SOURCE, "ti,timer-alwon",
610 2, OMAP4_MPU_SOURCE); 589 2, OMAP4_MPU_SOURCE);
611#ifdef CONFIG_LOCAL_TIMERS 590#ifdef CONFIG_LOCAL_TIMERS
612static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29); 591static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29);
613static void __init omap4_local_timer_init(void) 592void __init omap4_local_timer_init(void)
614{ 593{
615 omap4_sync32k_timer_init(); 594 omap4_sync32k_timer_init();
616 /* Local timers are not supprted on OMAP4430 ES1.0 */ 595 /* Local timers are not supprted on OMAP4430 ES1.0 */
@@ -628,18 +607,17 @@ static void __init omap4_local_timer_init(void)
628 } 607 }
629} 608}
630#else /* CONFIG_LOCAL_TIMERS */ 609#else /* CONFIG_LOCAL_TIMERS */
631static void __init omap4_local_timer_init(void) 610void __init omap4_local_timer_init(void)
632{ 611{
633 omap4_sync32k_timer_init(); 612 omap4_sync32k_timer_init();
634} 613}
635#endif /* CONFIG_LOCAL_TIMERS */ 614#endif /* CONFIG_LOCAL_TIMERS */
636OMAP_SYS_TIMER(4, local);
637#endif /* CONFIG_ARCH_OMAP4 */ 615#endif /* CONFIG_ARCH_OMAP4 */
638 616
639#ifdef CONFIG_SOC_OMAP5 617#ifdef CONFIG_SOC_OMAP5
640OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon", 618OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon",
641 2, OMAP4_MPU_SOURCE); 619 2, OMAP4_MPU_SOURCE);
642static void __init omap5_realtime_timer_init(void) 620void __init omap5_realtime_timer_init(void)
643{ 621{
644 int err; 622 int err;
645 623
@@ -650,7 +628,6 @@ static void __init omap5_realtime_timer_init(void)
650 if (err) 628 if (err)
651 pr_err("%s: arch_timer_register failed %d\n", __func__, err); 629 pr_err("%s: arch_timer_register failed %d\n", __func__, err);
652} 630}
653OMAP_SYS_TIMER(5, realtime);
654#endif /* CONFIG_SOC_OMAP5 */ 631#endif /* CONFIG_SOC_OMAP5 */
655 632
656/** 633/**
diff --git a/arch/arm/mach-orion5x/board-dt.c b/arch/arm/mach-orion5x/board-dt.c
index 32e5c211a89b..35a8014529ca 100644
--- a/arch/arm/mach-orion5x/board-dt.c
+++ b/arch/arm/mach-orion5x/board-dt.c
@@ -72,7 +72,7 @@ DT_MACHINE_START(ORION5X_DT, "Marvell Orion5x (Flattened Device Tree)")
72 .map_io = orion5x_map_io, 72 .map_io = orion5x_map_io,
73 .init_early = orion5x_init_early, 73 .init_early = orion5x_init_early,
74 .init_irq = orion_dt_init_irq, 74 .init_irq = orion_dt_init_irq,
75 .timer = &orion5x_timer, 75 .init_time = orion5x_timer_init,
76 .init_machine = orion5x_dt_init, 76 .init_machine = orion5x_dt_init,
77 .restart = orion5x_restart, 77 .restart = orion5x_restart,
78 .dt_compat = orion5x_dt_compat, 78 .dt_compat = orion5x_dt_compat,
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 550f92320afb..d068f1431c40 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -217,7 +217,7 @@ int __init orion5x_find_tclk(void)
217 return 166666667; 217 return 166666667;
218} 218}
219 219
220static void __init orion5x_timer_init(void) 220void __init orion5x_timer_init(void)
221{ 221{
222 orion5x_tclk = orion5x_find_tclk(); 222 orion5x_tclk = orion5x_find_tclk();
223 223
@@ -225,10 +225,6 @@ static void __init orion5x_timer_init(void)
225 IRQ_ORION5X_BRIDGE, orion5x_tclk); 225 IRQ_ORION5X_BRIDGE, orion5x_tclk);
226} 226}
227 227
228struct sys_timer orion5x_timer = {
229 .init = orion5x_timer_init,
230};
231
232 228
233/***************************************************************************** 229/*****************************************************************************
234 * General 230 * General
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h
index 7db5cdd9c4b7..e60345760283 100644
--- a/arch/arm/mach-orion5x/common.h
+++ b/arch/arm/mach-orion5x/common.h
@@ -15,7 +15,7 @@ void orion5x_init(void);
15void orion5x_id(u32 *dev, u32 *rev, char **dev_name); 15void orion5x_id(u32 *dev, u32 *rev, char **dev_name);
16void clk_init(void); 16void clk_init(void);
17extern int orion5x_tclk; 17extern int orion5x_tclk;
18extern struct sys_timer orion5x_timer; 18extern void orion5x_timer_init(void);
19 19
20/* 20/*
21 * Enumerations and functions for Orion windows mapping. Used by Orion core 21 * Enumerations and functions for Orion windows mapping. Used by Orion core
diff --git a/arch/arm/mach-orion5x/d2net-setup.c b/arch/arm/mach-orion5x/d2net-setup.c
index e3629c063df2..57d0af74874d 100644
--- a/arch/arm/mach-orion5x/d2net-setup.c
+++ b/arch/arm/mach-orion5x/d2net-setup.c
@@ -342,7 +342,7 @@ MACHINE_START(D2NET, "LaCie d2 Network")
342 .map_io = orion5x_map_io, 342 .map_io = orion5x_map_io,
343 .init_early = orion5x_init_early, 343 .init_early = orion5x_init_early,
344 .init_irq = orion5x_init_irq, 344 .init_irq = orion5x_init_irq,
345 .timer = &orion5x_timer, 345 .init_time = orion5x_timer_init,
346 .fixup = tag_fixup_mem32, 346 .fixup = tag_fixup_mem32,
347 .restart = orion5x_restart, 347 .restart = orion5x_restart,
348MACHINE_END 348MACHINE_END
@@ -355,7 +355,7 @@ MACHINE_START(BIGDISK, "LaCie Big Disk Network")
355 .map_io = orion5x_map_io, 355 .map_io = orion5x_map_io,
356 .init_early = orion5x_init_early, 356 .init_early = orion5x_init_early,
357 .init_irq = orion5x_init_irq, 357 .init_irq = orion5x_init_irq,
358 .timer = &orion5x_timer, 358 .init_time = orion5x_timer_init,
359 .fixup = tag_fixup_mem32, 359 .fixup = tag_fixup_mem32,
360 .restart = orion5x_restart, 360 .restart = orion5x_restart,
361MACHINE_END 361MACHINE_END
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c
index 41fe2b1ff47c..76665640087b 100644
--- a/arch/arm/mach-orion5x/db88f5281-setup.c
+++ b/arch/arm/mach-orion5x/db88f5281-setup.c
@@ -362,6 +362,6 @@ MACHINE_START(DB88F5281, "Marvell Orion-2 Development Board")
362 .map_io = orion5x_map_io, 362 .map_io = orion5x_map_io,
363 .init_early = orion5x_init_early, 363 .init_early = orion5x_init_early,
364 .init_irq = orion5x_init_irq, 364 .init_irq = orion5x_init_irq,
365 .timer = &orion5x_timer, 365 .init_time = orion5x_timer_init,
366 .restart = orion5x_restart, 366 .restart = orion5x_restart,
367MACHINE_END 367MACHINE_END
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
index e533588880ff..6eb1732757fd 100644
--- a/arch/arm/mach-orion5x/dns323-setup.c
+++ b/arch/arm/mach-orion5x/dns323-setup.c
@@ -714,7 +714,7 @@ MACHINE_START(DNS323, "D-Link DNS-323")
714 .map_io = orion5x_map_io, 714 .map_io = orion5x_map_io,
715 .init_early = orion5x_init_early, 715 .init_early = orion5x_init_early,
716 .init_irq = orion5x_init_irq, 716 .init_irq = orion5x_init_irq,
717 .timer = &orion5x_timer, 717 .init_time = orion5x_timer_init,
718 .fixup = tag_fixup_mem32, 718 .fixup = tag_fixup_mem32,
719 .restart = orion5x_restart, 719 .restart = orion5x_restart,
720MACHINE_END 720MACHINE_END
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c
index f1ae10ae5bd4..b98403526218 100644
--- a/arch/arm/mach-orion5x/kurobox_pro-setup.c
+++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c
@@ -383,7 +383,7 @@ MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro")
383 .map_io = orion5x_map_io, 383 .map_io = orion5x_map_io,
384 .init_early = orion5x_init_early, 384 .init_early = orion5x_init_early,
385 .init_irq = orion5x_init_irq, 385 .init_irq = orion5x_init_irq,
386 .timer = &orion5x_timer, 386 .init_time = orion5x_timer_init,
387 .fixup = tag_fixup_mem32, 387 .fixup = tag_fixup_mem32,
388 .restart = orion5x_restart, 388 .restart = orion5x_restart,
389MACHINE_END 389MACHINE_END
@@ -397,7 +397,7 @@ MACHINE_START(LINKSTATION_PRO, "Buffalo Linkstation Pro/Live")
397 .map_io = orion5x_map_io, 397 .map_io = orion5x_map_io,
398 .init_early = orion5x_init_early, 398 .init_early = orion5x_init_early,
399 .init_irq = orion5x_init_irq, 399 .init_irq = orion5x_init_irq,
400 .timer = &orion5x_timer, 400 .init_time = orion5x_timer_init,
401 .fixup = tag_fixup_mem32, 401 .fixup = tag_fixup_mem32,
402 .restart = orion5x_restart, 402 .restart = orion5x_restart,
403MACHINE_END 403MACHINE_END
diff --git a/arch/arm/mach-orion5x/ls-chl-setup.c b/arch/arm/mach-orion5x/ls-chl-setup.c
index 0c9e413b5805..044da5b6a6ae 100644
--- a/arch/arm/mach-orion5x/ls-chl-setup.c
+++ b/arch/arm/mach-orion5x/ls-chl-setup.c
@@ -322,7 +322,7 @@ MACHINE_START(LINKSTATION_LSCHL, "Buffalo Linkstation LiveV3 (LS-CHL)")
322 .map_io = orion5x_map_io, 322 .map_io = orion5x_map_io,
323 .init_early = orion5x_init_early, 323 .init_early = orion5x_init_early,
324 .init_irq = orion5x_init_irq, 324 .init_irq = orion5x_init_irq,
325 .timer = &orion5x_timer, 325 .init_time = orion5x_timer_init,
326 .fixup = tag_fixup_mem32, 326 .fixup = tag_fixup_mem32,
327 .restart = orion5x_restart, 327 .restart = orion5x_restart,
328MACHINE_END 328MACHINE_END
diff --git a/arch/arm/mach-orion5x/ls_hgl-setup.c b/arch/arm/mach-orion5x/ls_hgl-setup.c
index c1b5d8a58037..d49f93423f52 100644
--- a/arch/arm/mach-orion5x/ls_hgl-setup.c
+++ b/arch/arm/mach-orion5x/ls_hgl-setup.c
@@ -269,7 +269,7 @@ MACHINE_START(LINKSTATION_LS_HGL, "Buffalo Linkstation LS-HGL")
269 .map_io = orion5x_map_io, 269 .map_io = orion5x_map_io,
270 .init_early = orion5x_init_early, 270 .init_early = orion5x_init_early,
271 .init_irq = orion5x_init_irq, 271 .init_irq = orion5x_init_irq,
272 .timer = &orion5x_timer, 272 .init_time = orion5x_timer_init,
273 .fixup = tag_fixup_mem32, 273 .fixup = tag_fixup_mem32,
274 .restart = orion5x_restart, 274 .restart = orion5x_restart,
275MACHINE_END 275MACHINE_END
diff --git a/arch/arm/mach-orion5x/lsmini-setup.c b/arch/arm/mach-orion5x/lsmini-setup.c
index 949eaa8f12e3..8e3965c6c0fe 100644
--- a/arch/arm/mach-orion5x/lsmini-setup.c
+++ b/arch/arm/mach-orion5x/lsmini-setup.c
@@ -271,7 +271,7 @@ MACHINE_START(LINKSTATION_MINI, "Buffalo Linkstation Mini")
271 .map_io = orion5x_map_io, 271 .map_io = orion5x_map_io,
272 .init_early = orion5x_init_early, 272 .init_early = orion5x_init_early,
273 .init_irq = orion5x_init_irq, 273 .init_irq = orion5x_init_irq,
274 .timer = &orion5x_timer, 274 .init_time = orion5x_timer_init,
275 .fixup = tag_fixup_mem32, 275 .fixup = tag_fixup_mem32,
276 .restart = orion5x_restart, 276 .restart = orion5x_restart,
277MACHINE_END 277MACHINE_END
diff --git a/arch/arm/mach-orion5x/mss2-setup.c b/arch/arm/mach-orion5x/mss2-setup.c
index 1c16d045333e..0ec94a1f2b16 100644
--- a/arch/arm/mach-orion5x/mss2-setup.c
+++ b/arch/arm/mach-orion5x/mss2-setup.c
@@ -265,7 +265,7 @@ MACHINE_START(MSS2, "Maxtor Shared Storage II")
265 .map_io = orion5x_map_io, 265 .map_io = orion5x_map_io,
266 .init_early = orion5x_init_early, 266 .init_early = orion5x_init_early,
267 .init_irq = orion5x_init_irq, 267 .init_irq = orion5x_init_irq,
268 .timer = &orion5x_timer, 268 .init_time = orion5x_timer_init,
269 .fixup = tag_fixup_mem32, 269 .fixup = tag_fixup_mem32,
270 .restart = orion5x_restart, 270 .restart = orion5x_restart,
271MACHINE_END 271MACHINE_END
diff --git a/arch/arm/mach-orion5x/mv2120-setup.c b/arch/arm/mach-orion5x/mv2120-setup.c
index c87fde4deeca..18143f2a9093 100644
--- a/arch/arm/mach-orion5x/mv2120-setup.c
+++ b/arch/arm/mach-orion5x/mv2120-setup.c
@@ -233,7 +233,7 @@ MACHINE_START(MV2120, "HP Media Vault mv2120")
233 .map_io = orion5x_map_io, 233 .map_io = orion5x_map_io,
234 .init_early = orion5x_init_early, 234 .init_early = orion5x_init_early,
235 .init_irq = orion5x_init_irq, 235 .init_irq = orion5x_init_irq,
236 .timer = &orion5x_timer, 236 .init_time = orion5x_timer_init,
237 .fixup = tag_fixup_mem32, 237 .fixup = tag_fixup_mem32,
238 .restart = orion5x_restart, 238 .restart = orion5x_restart,
239MACHINE_END 239MACHINE_END
diff --git a/arch/arm/mach-orion5x/net2big-setup.c b/arch/arm/mach-orion5x/net2big-setup.c
index 3506f16c0bf2..282e503b003e 100644
--- a/arch/arm/mach-orion5x/net2big-setup.c
+++ b/arch/arm/mach-orion5x/net2big-setup.c
@@ -425,7 +425,7 @@ MACHINE_START(NET2BIG, "LaCie 2Big Network")
425 .map_io = orion5x_map_io, 425 .map_io = orion5x_map_io,
426 .init_early = orion5x_init_early, 426 .init_early = orion5x_init_early,
427 .init_irq = orion5x_init_irq, 427 .init_irq = orion5x_init_irq,
428 .timer = &orion5x_timer, 428 .init_time = orion5x_timer_init,
429 .fixup = tag_fixup_mem32, 429 .fixup = tag_fixup_mem32,
430 .restart = orion5x_restart, 430 .restart = orion5x_restart,
431MACHINE_END 431MACHINE_END
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-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
index 9b1c95310291..d6e72f672afb 100644
--- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
@@ -171,7 +171,7 @@ MACHINE_START(RD88F5181L_FXO, "Marvell Orion-VoIP FXO Reference Design")
171 .map_io = orion5x_map_io, 171 .map_io = orion5x_map_io,
172 .init_early = orion5x_init_early, 172 .init_early = orion5x_init_early,
173 .init_irq = orion5x_init_irq, 173 .init_irq = orion5x_init_irq,
174 .timer = &orion5x_timer, 174 .init_time = orion5x_timer_init,
175 .fixup = tag_fixup_mem32, 175 .fixup = tag_fixup_mem32,
176 .restart = orion5x_restart, 176 .restart = orion5x_restart,
177MACHINE_END 177MACHINE_END
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
index 51ba2b81a10b..c8b7913310e5 100644
--- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
@@ -183,7 +183,7 @@ MACHINE_START(RD88F5181L_GE, "Marvell Orion-VoIP GE Reference Design")
183 .map_io = orion5x_map_io, 183 .map_io = orion5x_map_io,
184 .init_early = orion5x_init_early, 184 .init_early = orion5x_init_early,
185 .init_irq = orion5x_init_irq, 185 .init_irq = orion5x_init_irq,
186 .timer = &orion5x_timer, 186 .init_time = orion5x_timer_init,
187 .fixup = tag_fixup_mem32, 187 .fixup = tag_fixup_mem32,
188 .restart = orion5x_restart, 188 .restart = orion5x_restart,
189MACHINE_END 189MACHINE_END
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c
index 0a56b9444f1b..f9e156725d7c 100644
--- a/arch/arm/mach-orion5x/rd88f5182-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
@@ -281,6 +281,6 @@ MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design")
281 .map_io = orion5x_map_io, 281 .map_io = orion5x_map_io,
282 .init_early = orion5x_init_early, 282 .init_early = orion5x_init_early,
283 .init_irq = orion5x_init_irq, 283 .init_irq = orion5x_init_irq,
284 .timer = &orion5x_timer, 284 .init_time = orion5x_timer_init,
285 .restart = orion5x_restart, 285 .restart = orion5x_restart,
286MACHINE_END 286MACHINE_END
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
index ed50910b08a4..78a1e6ab1b9d 100644
--- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
+++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
@@ -123,7 +123,7 @@ MACHINE_START(RD88F6183AP_GE, "Marvell Orion-1-90 AP GE Reference Design")
123 .map_io = orion5x_map_io, 123 .map_io = orion5x_map_io,
124 .init_early = orion5x_init_early, 124 .init_early = orion5x_init_early,
125 .init_irq = orion5x_init_irq, 125 .init_irq = orion5x_init_irq,
126 .timer = &orion5x_timer, 126 .init_time = orion5x_timer_init,
127 .fixup = tag_fixup_mem32, 127 .fixup = tag_fixup_mem32,
128 .restart = orion5x_restart, 128 .restart = orion5x_restart,
129MACHINE_END 129MACHINE_END
diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion5x/terastation_pro2-setup.c
index 90e571dc4deb..acc0877ec1c9 100644
--- a/arch/arm/mach-orion5x/terastation_pro2-setup.c
+++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c
@@ -361,7 +361,7 @@ MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live")
361 .map_io = orion5x_map_io, 361 .map_io = orion5x_map_io,
362 .init_early = orion5x_init_early, 362 .init_early = orion5x_init_early,
363 .init_irq = orion5x_init_irq, 363 .init_irq = orion5x_init_irq,
364 .timer = &orion5x_timer, 364 .init_time = orion5x_timer_init,
365 .fixup = tag_fixup_mem32, 365 .fixup = tag_fixup_mem32,
366 .restart = orion5x_restart, 366 .restart = orion5x_restart,
367MACHINE_END 367MACHINE_END
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c
index b184f680e0db..9c17f0c2b488 100644
--- a/arch/arm/mach-orion5x/ts209-setup.c
+++ b/arch/arm/mach-orion5x/ts209-setup.c
@@ -326,7 +326,7 @@ MACHINE_START(TS209, "QNAP TS-109/TS-209")
326 .map_io = orion5x_map_io, 326 .map_io = orion5x_map_io,
327 .init_early = orion5x_init_early, 327 .init_early = orion5x_init_early,
328 .init_irq = orion5x_init_irq, 328 .init_irq = orion5x_init_irq,
329 .timer = &orion5x_timer, 329 .init_time = orion5x_timer_init,
330 .fixup = tag_fixup_mem32, 330 .fixup = tag_fixup_mem32,
331 .restart = orion5x_restart, 331 .restart = orion5x_restart,
332MACHINE_END 332MACHINE_END
diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c
index a5c2e64c4ece..8cc5ab6c503e 100644
--- a/arch/arm/mach-orion5x/ts409-setup.c
+++ b/arch/arm/mach-orion5x/ts409-setup.c
@@ -315,7 +315,7 @@ MACHINE_START(TS409, "QNAP TS-409")
315 .map_io = orion5x_map_io, 315 .map_io = orion5x_map_io,
316 .init_early = orion5x_init_early, 316 .init_early = orion5x_init_early,
317 .init_irq = orion5x_init_irq, 317 .init_irq = orion5x_init_irq,
318 .timer = &orion5x_timer, 318 .init_time = orion5x_timer_init,
319 .fixup = tag_fixup_mem32, 319 .fixup = tag_fixup_mem32,
320 .restart = orion5x_restart, 320 .restart = orion5x_restart,
321MACHINE_END 321MACHINE_END
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c
index b0727dcd1ef9..e960855d32ac 100644
--- a/arch/arm/mach-orion5x/ts78xx-setup.c
+++ b/arch/arm/mach-orion5x/ts78xx-setup.c
@@ -619,6 +619,6 @@ MACHINE_START(TS78XX, "Technologic Systems TS-78xx SBC")
619 .map_io = ts78xx_map_io, 619 .map_io = ts78xx_map_io,
620 .init_early = orion5x_init_early, 620 .init_early = orion5x_init_early,
621 .init_irq = orion5x_init_irq, 621 .init_irq = orion5x_init_irq,
622 .timer = &orion5x_timer, 622 .init_time = orion5x_timer_init,
623 .restart = orion5x_restart, 623 .restart = orion5x_restart,
624MACHINE_END 624MACHINE_END
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c
index 754c12b6abf0..66552ca7e05d 100644
--- a/arch/arm/mach-orion5x/wnr854t-setup.c
+++ b/arch/arm/mach-orion5x/wnr854t-setup.c
@@ -176,7 +176,7 @@ MACHINE_START(WNR854T, "Netgear WNR854T")
176 .map_io = orion5x_map_io, 176 .map_io = orion5x_map_io,
177 .init_early = orion5x_init_early, 177 .init_early = orion5x_init_early,
178 .init_irq = orion5x_init_irq, 178 .init_irq = orion5x_init_irq,
179 .timer = &orion5x_timer, 179 .init_time = orion5x_timer_init,
180 .fixup = tag_fixup_mem32, 180 .fixup = tag_fixup_mem32,
181 .restart = orion5x_restart, 181 .restart = orion5x_restart,
182MACHINE_END 182MACHINE_END
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
index 45c21251eb1e..2c5408e2e689 100644
--- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c
+++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
@@ -264,7 +264,7 @@ MACHINE_START(WRT350N_V2, "Linksys WRT350N v2")
264 .map_io = orion5x_map_io, 264 .map_io = orion5x_map_io,
265 .init_early = orion5x_init_early, 265 .init_early = orion5x_init_early,
266 .init_irq = orion5x_init_irq, 266 .init_irq = orion5x_init_irq,
267 .timer = &orion5x_timer, 267 .init_time = orion5x_timer_init,
268 .fixup = tag_fixup_mem32, 268 .fixup = tag_fixup_mem32,
269 .restart = orion5x_restart, 269 .restart = orion5x_restart,
270MACHINE_END 270MACHINE_END
diff --git a/arch/arm/mach-picoxcell/Kconfig b/arch/arm/mach-picoxcell/Kconfig
index 868796f8085c..13bae78b215a 100644
--- a/arch/arm/mach-picoxcell/Kconfig
+++ b/arch/arm/mach-picoxcell/Kconfig
@@ -7,7 +7,6 @@ config ARCH_PICOXCELL
7 select DW_APB_TIMER 7 select DW_APB_TIMER
8 select DW_APB_TIMER_OF 8 select DW_APB_TIMER_OF
9 select GENERIC_CLOCKEVENTS 9 select GENERIC_CLOCKEVENTS
10 select GENERIC_GPIO
11 select HAVE_TCM 10 select HAVE_TCM
12 select NO_IOPORT 11 select NO_IOPORT
13 select SPARSE_IRQ 12 select SPARSE_IRQ
diff --git a/arch/arm/mach-picoxcell/common.c b/arch/arm/mach-picoxcell/common.c
index f6c0849af5e9..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,9 +87,8 @@ 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, 91 .init_time = dw_apb_timer_init,
102 .timer = &dw_apb_timer,
103 .init_machine = picoxcell_init_machine, 92 .init_machine = picoxcell_init_machine,
104 .dt_compat = picoxcell_dt_match, 93 .dt_compat = picoxcell_dt_match,
105 .restart = picoxcell_wdt_restart, 94 .restart = picoxcell_wdt_restart,
diff --git a/arch/arm/mach-picoxcell/common.h b/arch/arm/mach-picoxcell/common.h
index a65cb02f84c8..481b42a4ef15 100644
--- a/arch/arm/mach-picoxcell/common.h
+++ b/arch/arm/mach-picoxcell/common.h
@@ -12,6 +12,6 @@
12 12
13#include <asm/mach/time.h> 13#include <asm/mach/time.h>
14 14
15extern struct sys_timer dw_apb_timer; 15extern void dw_apb_timer_init(void);
16 16
17#endif /* __PICOXCELL_COMMON_H__ */ 17#endif /* __PICOXCELL_COMMON_H__ */
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c
index f25a54194639..ed3570e5eb8f 100644
--- a/arch/arm/mach-prima2/common.c
+++ b/arch/arm/mach-prima2/common.c
@@ -40,7 +40,7 @@ DT_MACHINE_START(PRIMA2_DT, "Generic PRIMA2 (Flattened Device Tree)")
40 /* Maintainer: Barry Song <baohua.song@csr.com> */ 40 /* Maintainer: Barry Song <baohua.song@csr.com> */
41 .map_io = sirfsoc_map_lluart, 41 .map_io = sirfsoc_map_lluart,
42 .init_irq = sirfsoc_of_irq_init, 42 .init_irq = sirfsoc_of_irq_init,
43 .timer = &sirfsoc_timer, 43 .init_time = sirfsoc_timer_init,
44 .dma_zone_size = SZ_256M, 44 .dma_zone_size = SZ_256M,
45 .init_machine = sirfsoc_mach_init, 45 .init_machine = sirfsoc_mach_init,
46 .init_late = sirfsoc_init_late, 46 .init_late = sirfsoc_init_late,
diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-prima2/common.h
index 60d826fc2185..9c75f124e3cf 100644
--- a/arch/arm/mach-prima2/common.h
+++ b/arch/arm/mach-prima2/common.h
@@ -12,7 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <asm/mach/time.h> 13#include <asm/mach/time.h>
14 14
15extern struct sys_timer sirfsoc_timer; 15extern void sirfsoc_timer_init(void);
16 16
17extern void __init sirfsoc_of_irq_init(void); 17extern void __init sirfsoc_of_irq_init(void);
18extern void __init sirfsoc_of_clk_init(void); 18extern void __init sirfsoc_of_clk_init(void);
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 9d80f1e20a98..557353602130 100644
--- a/arch/arm/mach-prima2/rtciobrg.c
+++ b/arch/arm/mach-prima2/rtciobrg.c
@@ -107,7 +107,7 @@ static const struct of_device_id rtciobrg_ids[] = {
107 {} 107 {}
108}; 108};
109 109
110static int __devinit sirfsoc_rtciobrg_probe(struct platform_device *op) 110static int sirfsoc_rtciobrg_probe(struct platform_device *op)
111{ 111{
112 struct device_node *np = op->dev.of_node; 112 struct device_node *np = op->dev.of_node;
113 113
diff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-prima2/timer.c
index d95bf252f694..a7a2c199c3ea 100644
--- a/arch/arm/mach-prima2/timer.c
+++ b/arch/arm/mach-prima2/timer.c
@@ -175,19 +175,13 @@ 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 */
190static void __init sirfsoc_timer_init(void) 184void __init sirfsoc_timer_init(void)
191{ 185{
192 unsigned long rate; 186 unsigned long rate;
193 struct clk *clk; 187 struct clk *clk;
@@ -226,7 +220,7 @@ static struct of_device_id timer_ids[] = {
226 {}, 220 {},
227}; 221};
228 222
229static void __init sirfsoc_of_timer_map(void) 223void __init sirfsoc_of_timer_map(void)
230{ 224{
231 struct device_node *np; 225 struct device_node *np;
232 const unsigned int *intspec; 226 const unsigned int *intspec;
@@ -245,7 +239,3 @@ static void __init sirfsoc_of_timer_map(void)
245 239
246 of_node_put(np); 240 of_node_put(np);
247} 241}
248
249struct sys_timer sirfsoc_timer = {
250 .init = sirfsoc_timer_init,
251};
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index 208229342514..2f71b3fbd319 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -822,7 +822,7 @@ MACHINE_START(BALLOON3, "Balloon3")
822 .nr_irqs = BALLOON3_NR_IRQS, 822 .nr_irqs = BALLOON3_NR_IRQS,
823 .init_irq = balloon3_init_irq, 823 .init_irq = balloon3_init_irq,
824 .handle_irq = pxa27x_handle_irq, 824 .handle_irq = pxa27x_handle_irq,
825 .timer = &pxa_timer, 825 .init_time = pxa_timer_init,
826 .init_machine = balloon3_init, 826 .init_machine = balloon3_init,
827 .atag_offset = 0x100, 827 .atag_offset = 0x100,
828 .restart = pxa_restart, 828 .restart = pxa_restart,
diff --git a/arch/arm/mach-pxa/capc7117.c b/arch/arm/mach-pxa/capc7117.c
index 9a8760b72913..c092730749b9 100644
--- a/arch/arm/mach-pxa/capc7117.c
+++ b/arch/arm/mach-pxa/capc7117.c
@@ -153,7 +153,7 @@ MACHINE_START(CAPC7117,
153 .nr_irqs = PXA_NR_IRQS, 153 .nr_irqs = PXA_NR_IRQS,
154 .init_irq = pxa3xx_init_irq, 154 .init_irq = pxa3xx_init_irq,
155 .handle_irq = pxa3xx_handle_irq, 155 .handle_irq = pxa3xx_handle_irq,
156 .timer = &pxa_timer, 156 .init_time = pxa_timer_init,
157 .init_machine = capc7117_init, 157 .init_machine = capc7117_init,
158 .restart = pxa_restart, 158 .restart = pxa_restart,
159MACHINE_END 159MACHINE_END
diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c
index a103c8ffea9f..bb99f59a36d8 100644
--- a/arch/arm/mach-pxa/cm-x2xx.c
+++ b/arch/arm/mach-pxa/cm-x2xx.c
@@ -520,7 +520,7 @@ MACHINE_START(ARMCORE, "Compulab CM-X2XX")
520 .init_irq = cmx2xx_init_irq, 520 .init_irq = cmx2xx_init_irq,
521 /* NOTE: pxa25x_handle_irq() works on PXA27x w/o camera support */ 521 /* NOTE: pxa25x_handle_irq() works on PXA27x w/o camera support */
522 .handle_irq = pxa25x_handle_irq, 522 .handle_irq = pxa25x_handle_irq,
523 .timer = &pxa_timer, 523 .init_time = pxa_timer_init,
524 .init_machine = cmx2xx_init, 524 .init_machine = cmx2xx_init,
525#ifdef CONFIG_PCI 525#ifdef CONFIG_PCI
526 .dma_zone_size = SZ_64M, 526 .dma_zone_size = SZ_64M,
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c
index cc2b23afcaaf..8091aac89edf 100644
--- a/arch/arm/mach-pxa/cm-x300.c
+++ b/arch/arm/mach-pxa/cm-x300.c
@@ -854,7 +854,7 @@ MACHINE_START(CM_X300, "CM-X300 module")
854 .nr_irqs = PXA_NR_IRQS, 854 .nr_irqs = PXA_NR_IRQS,
855 .init_irq = pxa3xx_init_irq, 855 .init_irq = pxa3xx_init_irq,
856 .handle_irq = pxa3xx_handle_irq, 856 .handle_irq = pxa3xx_handle_irq,
857 .timer = &pxa_timer, 857 .init_time = pxa_timer_init,
858 .init_machine = cm_x300_init, 858 .init_machine = cm_x300_init,
859 .fixup = cm_x300_fixup, 859 .fixup = cm_x300_fixup,
860 .restart = pxa_restart, 860 .restart = pxa_restart,
diff --git a/arch/arm/mach-pxa/colibri-pxa270.c b/arch/arm/mach-pxa/colibri-pxa270.c
index b2f227d36125..5f9d9303b346 100644
--- a/arch/arm/mach-pxa/colibri-pxa270.c
+++ b/arch/arm/mach-pxa/colibri-pxa270.c
@@ -313,7 +313,7 @@ MACHINE_START(COLIBRI, "Toradex Colibri PXA270")
313 .nr_irqs = PXA_NR_IRQS, 313 .nr_irqs = PXA_NR_IRQS,
314 .init_irq = pxa27x_init_irq, 314 .init_irq = pxa27x_init_irq,
315 .handle_irq = pxa27x_handle_irq, 315 .handle_irq = pxa27x_handle_irq,
316 .timer = &pxa_timer, 316 .init_time = pxa_timer_init,
317 .restart = pxa_restart, 317 .restart = pxa_restart,
318MACHINE_END 318MACHINE_END
319 319
@@ -324,7 +324,7 @@ MACHINE_START(INCOME, "Income s.r.o. SH-Dmaster PXA270 SBC")
324 .nr_irqs = PXA_NR_IRQS, 324 .nr_irqs = PXA_NR_IRQS,
325 .init_irq = pxa27x_init_irq, 325 .init_irq = pxa27x_init_irq,
326 .handle_irq = pxa27x_handle_irq, 326 .handle_irq = pxa27x_handle_irq,
327 .timer = &pxa_timer, 327 .init_time = pxa_timer_init,
328 .restart = pxa_restart, 328 .restart = pxa_restart,
329MACHINE_END 329MACHINE_END
330 330
diff --git a/arch/arm/mach-pxa/colibri-pxa300.c b/arch/arm/mach-pxa/colibri-pxa300.c
index a9c9c163dd95..f1a1ac1fbd85 100644
--- a/arch/arm/mach-pxa/colibri-pxa300.c
+++ b/arch/arm/mach-pxa/colibri-pxa300.c
@@ -189,7 +189,7 @@ MACHINE_START(COLIBRI300, "Toradex Colibri PXA300")
189 .nr_irqs = PXA_NR_IRQS, 189 .nr_irqs = PXA_NR_IRQS,
190 .init_irq = pxa3xx_init_irq, 190 .init_irq = pxa3xx_init_irq,
191 .handle_irq = pxa3xx_handle_irq, 191 .handle_irq = pxa3xx_handle_irq,
192 .timer = &pxa_timer, 192 .init_time = pxa_timer_init,
193 .restart = pxa_restart, 193 .restart = pxa_restart,
194MACHINE_END 194MACHINE_END
195 195
diff --git a/arch/arm/mach-pxa/colibri-pxa320.c b/arch/arm/mach-pxa/colibri-pxa320.c
index 25515cd7e68f..f6cc8b0ab82f 100644
--- a/arch/arm/mach-pxa/colibri-pxa320.c
+++ b/arch/arm/mach-pxa/colibri-pxa320.c
@@ -259,7 +259,7 @@ MACHINE_START(COLIBRI320, "Toradex Colibri PXA320")
259 .nr_irqs = PXA_NR_IRQS, 259 .nr_irqs = PXA_NR_IRQS,
260 .init_irq = pxa3xx_init_irq, 260 .init_irq = pxa3xx_init_irq,
261 .handle_irq = pxa3xx_handle_irq, 261 .handle_irq = pxa3xx_handle_irq,
262 .timer = &pxa_timer, 262 .init_time = pxa_timer_init,
263 .restart = pxa_restart, 263 .restart = pxa_restart,
264MACHINE_END 264MACHINE_END
265 265
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index 7c83f52c549c..a5b8fead7d61 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -733,7 +733,7 @@ MACHINE_START(CORGI, "SHARP Corgi")
733 .init_irq = pxa25x_init_irq, 733 .init_irq = pxa25x_init_irq,
734 .handle_irq = pxa25x_handle_irq, 734 .handle_irq = pxa25x_handle_irq,
735 .init_machine = corgi_init, 735 .init_machine = corgi_init,
736 .timer = &pxa_timer, 736 .init_time = pxa_timer_init,
737 .restart = corgi_restart, 737 .restart = corgi_restart,
738MACHINE_END 738MACHINE_END
739#endif 739#endif
@@ -746,7 +746,7 @@ MACHINE_START(SHEPHERD, "SHARP Shepherd")
746 .init_irq = pxa25x_init_irq, 746 .init_irq = pxa25x_init_irq,
747 .handle_irq = pxa25x_handle_irq, 747 .handle_irq = pxa25x_handle_irq,
748 .init_machine = corgi_init, 748 .init_machine = corgi_init,
749 .timer = &pxa_timer, 749 .init_time = pxa_timer_init,
750 .restart = corgi_restart, 750 .restart = corgi_restart,
751MACHINE_END 751MACHINE_END
752#endif 752#endif
@@ -759,7 +759,7 @@ MACHINE_START(HUSKY, "SHARP Husky")
759 .init_irq = pxa25x_init_irq, 759 .init_irq = pxa25x_init_irq,
760 .handle_irq = pxa25x_handle_irq, 760 .handle_irq = pxa25x_handle_irq,
761 .init_machine = corgi_init, 761 .init_machine = corgi_init,
762 .timer = &pxa_timer, 762 .init_time = pxa_timer_init,
763 .restart = corgi_restart, 763 .restart = corgi_restart,
764MACHINE_END 764MACHINE_END
765#endif 765#endif
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/csb726.c b/arch/arm/mach-pxa/csb726.c
index 7039f44b3647..fadfff8feaef 100644
--- a/arch/arm/mach-pxa/csb726.c
+++ b/arch/arm/mach-pxa/csb726.c
@@ -278,6 +278,6 @@ MACHINE_START(CSB726, "Cogent CSB726")
278 .init_irq = pxa27x_init_irq, 278 .init_irq = pxa27x_init_irq,
279 .handle_irq = pxa27x_handle_irq, 279 .handle_irq = pxa27x_handle_irq,
280 .init_machine = csb726_init, 280 .init_machine = csb726_init,
281 .timer = &pxa_timer, 281 .init_time = pxa_timer_init,
282 .restart = pxa_restart, 282 .restart = pxa_restart,
283MACHINE_END 283MACHINE_END
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
index 1b6411439ec8..446563a7d1ad 100644
--- a/arch/arm/mach-pxa/em-x270.c
+++ b/arch/arm/mach-pxa/em-x270.c
@@ -1298,7 +1298,7 @@ MACHINE_START(EM_X270, "Compulab EM-X270")
1298 .nr_irqs = PXA_NR_IRQS, 1298 .nr_irqs = PXA_NR_IRQS,
1299 .init_irq = pxa27x_init_irq, 1299 .init_irq = pxa27x_init_irq,
1300 .handle_irq = pxa27x_handle_irq, 1300 .handle_irq = pxa27x_handle_irq,
1301 .timer = &pxa_timer, 1301 .init_time = pxa_timer_init,
1302 .init_machine = em_x270_init, 1302 .init_machine = em_x270_init,
1303 .restart = pxa_restart, 1303 .restart = pxa_restart,
1304MACHINE_END 1304MACHINE_END
@@ -1309,7 +1309,7 @@ MACHINE_START(EXEDA, "Compulab eXeda")
1309 .nr_irqs = PXA_NR_IRQS, 1309 .nr_irqs = PXA_NR_IRQS,
1310 .init_irq = pxa27x_init_irq, 1310 .init_irq = pxa27x_init_irq,
1311 .handle_irq = pxa27x_handle_irq, 1311 .handle_irq = pxa27x_handle_irq,
1312 .timer = &pxa_timer, 1312 .init_time = pxa_timer_init,
1313 .init_machine = em_x270_init, 1313 .init_machine = em_x270_init,
1314 .restart = pxa_restart, 1314 .restart = pxa_restart,
1315MACHINE_END 1315MACHINE_END
diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c
index be2ee9bf5c6e..8280ebcaab9f 100644
--- a/arch/arm/mach-pxa/eseries.c
+++ b/arch/arm/mach-pxa/eseries.c
@@ -195,7 +195,7 @@ MACHINE_START(E330, "Toshiba e330")
195 .handle_irq = pxa25x_handle_irq, 195 .handle_irq = pxa25x_handle_irq,
196 .fixup = eseries_fixup, 196 .fixup = eseries_fixup,
197 .init_machine = e330_init, 197 .init_machine = e330_init,
198 .timer = &pxa_timer, 198 .init_time = pxa_timer_init,
199 .restart = pxa_restart, 199 .restart = pxa_restart,
200MACHINE_END 200MACHINE_END
201#endif 201#endif
@@ -246,7 +246,7 @@ MACHINE_START(E350, "Toshiba e350")
246 .handle_irq = pxa25x_handle_irq, 246 .handle_irq = pxa25x_handle_irq,
247 .fixup = eseries_fixup, 247 .fixup = eseries_fixup,
248 .init_machine = e350_init, 248 .init_machine = e350_init,
249 .timer = &pxa_timer, 249 .init_time = pxa_timer_init,
250 .restart = pxa_restart, 250 .restart = pxa_restart,
251MACHINE_END 251MACHINE_END
252#endif 252#endif
@@ -370,7 +370,7 @@ MACHINE_START(E400, "Toshiba e400")
370 .handle_irq = pxa25x_handle_irq, 370 .handle_irq = pxa25x_handle_irq,
371 .fixup = eseries_fixup, 371 .fixup = eseries_fixup,
372 .init_machine = e400_init, 372 .init_machine = e400_init,
373 .timer = &pxa_timer, 373 .init_time = pxa_timer_init,
374 .restart = pxa_restart, 374 .restart = pxa_restart,
375MACHINE_END 375MACHINE_END
376#endif 376#endif
@@ -566,7 +566,7 @@ MACHINE_START(E740, "Toshiba e740")
566 .handle_irq = pxa25x_handle_irq, 566 .handle_irq = pxa25x_handle_irq,
567 .fixup = eseries_fixup, 567 .fixup = eseries_fixup,
568 .init_machine = e740_init, 568 .init_machine = e740_init,
569 .timer = &pxa_timer, 569 .init_time = pxa_timer_init,
570 .restart = pxa_restart, 570 .restart = pxa_restart,
571MACHINE_END 571MACHINE_END
572#endif 572#endif
@@ -765,7 +765,7 @@ MACHINE_START(E750, "Toshiba e750")
765 .handle_irq = pxa25x_handle_irq, 765 .handle_irq = pxa25x_handle_irq,
766 .fixup = eseries_fixup, 766 .fixup = eseries_fixup,
767 .init_machine = e750_init, 767 .init_machine = e750_init,
768 .timer = &pxa_timer, 768 .init_time = pxa_timer_init,
769 .restart = pxa_restart, 769 .restart = pxa_restart,
770MACHINE_END 770MACHINE_END
771#endif 771#endif
@@ -977,7 +977,7 @@ MACHINE_START(E800, "Toshiba e800")
977 .handle_irq = pxa25x_handle_irq, 977 .handle_irq = pxa25x_handle_irq,
978 .fixup = eseries_fixup, 978 .fixup = eseries_fixup,
979 .init_machine = e800_init, 979 .init_machine = e800_init,
980 .timer = &pxa_timer, 980 .init_time = pxa_timer_init,
981 .restart = pxa_restart, 981 .restart = pxa_restart,
982MACHINE_END 982MACHINE_END
983#endif 983#endif
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c
index dc58fa0edb66..dca10709be8f 100644
--- a/arch/arm/mach-pxa/ezx.c
+++ b/arch/arm/mach-pxa/ezx.c
@@ -802,7 +802,7 @@ MACHINE_START(EZX_A780, "Motorola EZX A780")
802 .nr_irqs = EZX_NR_IRQS, 802 .nr_irqs = EZX_NR_IRQS,
803 .init_irq = pxa27x_init_irq, 803 .init_irq = pxa27x_init_irq,
804 .handle_irq = pxa27x_handle_irq, 804 .handle_irq = pxa27x_handle_irq,
805 .timer = &pxa_timer, 805 .init_time = pxa_timer_init,
806 .init_machine = a780_init, 806 .init_machine = a780_init,
807 .restart = pxa_restart, 807 .restart = pxa_restart,
808MACHINE_END 808MACHINE_END
@@ -869,7 +869,7 @@ MACHINE_START(EZX_E680, "Motorola EZX E680")
869 .nr_irqs = EZX_NR_IRQS, 869 .nr_irqs = EZX_NR_IRQS,
870 .init_irq = pxa27x_init_irq, 870 .init_irq = pxa27x_init_irq,
871 .handle_irq = pxa27x_handle_irq, 871 .handle_irq = pxa27x_handle_irq,
872 .timer = &pxa_timer, 872 .init_time = pxa_timer_init,
873 .init_machine = e680_init, 873 .init_machine = e680_init,
874 .restart = pxa_restart, 874 .restart = pxa_restart,
875MACHINE_END 875MACHINE_END
@@ -936,7 +936,7 @@ MACHINE_START(EZX_A1200, "Motorola EZX A1200")
936 .nr_irqs = EZX_NR_IRQS, 936 .nr_irqs = EZX_NR_IRQS,
937 .init_irq = pxa27x_init_irq, 937 .init_irq = pxa27x_init_irq,
938 .handle_irq = pxa27x_handle_irq, 938 .handle_irq = pxa27x_handle_irq,
939 .timer = &pxa_timer, 939 .init_time = pxa_timer_init,
940 .init_machine = a1200_init, 940 .init_machine = a1200_init,
941 .restart = pxa_restart, 941 .restart = pxa_restart,
942MACHINE_END 942MACHINE_END
@@ -1128,7 +1128,7 @@ MACHINE_START(EZX_A910, "Motorola EZX A910")
1128 .nr_irqs = EZX_NR_IRQS, 1128 .nr_irqs = EZX_NR_IRQS,
1129 .init_irq = pxa27x_init_irq, 1129 .init_irq = pxa27x_init_irq,
1130 .handle_irq = pxa27x_handle_irq, 1130 .handle_irq = pxa27x_handle_irq,
1131 .timer = &pxa_timer, 1131 .init_time = pxa_timer_init,
1132 .init_machine = a910_init, 1132 .init_machine = a910_init,
1133 .restart = pxa_restart, 1133 .restart = pxa_restart,
1134MACHINE_END 1134MACHINE_END
@@ -1195,7 +1195,7 @@ MACHINE_START(EZX_E6, "Motorola EZX E6")
1195 .nr_irqs = EZX_NR_IRQS, 1195 .nr_irqs = EZX_NR_IRQS,
1196 .init_irq = pxa27x_init_irq, 1196 .init_irq = pxa27x_init_irq,
1197 .handle_irq = pxa27x_handle_irq, 1197 .handle_irq = pxa27x_handle_irq,
1198 .timer = &pxa_timer, 1198 .init_time = pxa_timer_init,
1199 .init_machine = e6_init, 1199 .init_machine = e6_init,
1200 .restart = pxa_restart, 1200 .restart = pxa_restart,
1201MACHINE_END 1201MACHINE_END
@@ -1236,7 +1236,7 @@ MACHINE_START(EZX_E2, "Motorola EZX E2")
1236 .nr_irqs = EZX_NR_IRQS, 1236 .nr_irqs = EZX_NR_IRQS,
1237 .init_irq = pxa27x_init_irq, 1237 .init_irq = pxa27x_init_irq,
1238 .handle_irq = pxa27x_handle_irq, 1238 .handle_irq = pxa27x_handle_irq,
1239 .timer = &pxa_timer, 1239 .init_time = pxa_timer_init,
1240 .init_machine = e2_init, 1240 .init_machine = e2_init,
1241 .restart = pxa_restart, 1241 .restart = pxa_restart,
1242MACHINE_END 1242MACHINE_END
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
index 42d5cca66257..fd7ea39b78c0 100644
--- a/arch/arm/mach-pxa/generic.h
+++ b/arch/arm/mach-pxa/generic.h
@@ -10,9 +10,8 @@
10 */ 10 */
11 11
12struct irq_data; 12struct irq_data;
13struct sys_timer;
14 13
15extern struct sys_timer pxa_timer; 14extern void pxa_timer_init(void);
16 15
17extern void __init pxa_map_io(void); 16extern void __init pxa_map_io(void);
18 17
diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c
index 60755a6bb1c6..00b92dad7b81 100644
--- a/arch/arm/mach-pxa/gumstix.c
+++ b/arch/arm/mach-pxa/gumstix.c
@@ -238,7 +238,7 @@ MACHINE_START(GUMSTIX, "Gumstix")
238 .nr_irqs = PXA_NR_IRQS, 238 .nr_irqs = PXA_NR_IRQS,
239 .init_irq = pxa25x_init_irq, 239 .init_irq = pxa25x_init_irq,
240 .handle_irq = pxa25x_handle_irq, 240 .handle_irq = pxa25x_handle_irq,
241 .timer = &pxa_timer, 241 .init_time = pxa_timer_init,
242 .init_machine = gumstix_init, 242 .init_machine = gumstix_init,
243 .restart = pxa_restart, 243 .restart = pxa_restart,
244MACHINE_END 244MACHINE_END
diff --git a/arch/arm/mach-pxa/h5000.c b/arch/arm/mach-pxa/h5000.c
index e7dec589f014..875ec3351499 100644
--- a/arch/arm/mach-pxa/h5000.c
+++ b/arch/arm/mach-pxa/h5000.c
@@ -208,7 +208,7 @@ MACHINE_START(H5400, "HP iPAQ H5000")
208 .nr_irqs = PXA_NR_IRQS, 208 .nr_irqs = PXA_NR_IRQS,
209 .init_irq = pxa25x_init_irq, 209 .init_irq = pxa25x_init_irq,
210 .handle_irq = pxa25x_handle_irq, 210 .handle_irq = pxa25x_handle_irq,
211 .timer = &pxa_timer, 211 .init_time = pxa_timer_init,
212 .init_machine = h5000_init, 212 .init_machine = h5000_init,
213 .restart = pxa_restart, 213 .restart = pxa_restart,
214MACHINE_END 214MACHINE_END
diff --git a/arch/arm/mach-pxa/himalaya.c b/arch/arm/mach-pxa/himalaya.c
index 2962de898da9..7a8d749a07b8 100644
--- a/arch/arm/mach-pxa/himalaya.c
+++ b/arch/arm/mach-pxa/himalaya.c
@@ -164,6 +164,6 @@ MACHINE_START(HIMALAYA, "HTC Himalaya")
164 .init_irq = pxa25x_init_irq, 164 .init_irq = pxa25x_init_irq,
165 .handle_irq = pxa25x_handle_irq, 165 .handle_irq = pxa25x_handle_irq,
166 .init_machine = himalaya_init, 166 .init_machine = himalaya_init,
167 .timer = &pxa_timer, 167 .init_time = pxa_timer_init,
168 .restart = pxa_restart, 168 .restart = pxa_restart,
169MACHINE_END 169MACHINE_END
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c
index e2c6391863fe..133109ec7332 100644
--- a/arch/arm/mach-pxa/hx4700.c
+++ b/arch/arm/mach-pxa/hx4700.c
@@ -900,6 +900,6 @@ MACHINE_START(H4700, "HP iPAQ HX4700")
900 .init_irq = pxa27x_init_irq, 900 .init_irq = pxa27x_init_irq,
901 .handle_irq = pxa27x_handle_irq, 901 .handle_irq = pxa27x_handle_irq,
902 .init_machine = hx4700_init, 902 .init_machine = hx4700_init,
903 .timer = &pxa_timer, 903 .init_time = pxa_timer_init,
904 .restart = pxa_restart, 904 .restart = pxa_restart,
905MACHINE_END 905MACHINE_END
diff --git a/arch/arm/mach-pxa/icontrol.c b/arch/arm/mach-pxa/icontrol.c
index 1d02eabc9c65..fe31bfcbb8df 100644
--- a/arch/arm/mach-pxa/icontrol.c
+++ b/arch/arm/mach-pxa/icontrol.c
@@ -196,7 +196,7 @@ MACHINE_START(ICONTROL, "iControl/SafeTcam boards using Embedian MXM-8x10 CoM")
196 .nr_irqs = PXA_NR_IRQS, 196 .nr_irqs = PXA_NR_IRQS,
197 .init_irq = pxa3xx_init_irq, 197 .init_irq = pxa3xx_init_irq,
198 .handle_irq = pxa3xx_handle_irq, 198 .handle_irq = pxa3xx_handle_irq,
199 .timer = &pxa_timer, 199 .init_time = pxa_timer_init,
200 .init_machine = icontrol_init, 200 .init_machine = icontrol_init,
201 .restart = pxa_restart, 201 .restart = pxa_restart,
202MACHINE_END 202MACHINE_END
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index 64507cdd2e8f..343c4e3a7c5d 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -279,7 +279,7 @@ MACHINE_START(PXA_IDP, "Vibren PXA255 IDP")
279 .nr_irqs = PXA_NR_IRQS, 279 .nr_irqs = PXA_NR_IRQS,
280 .init_irq = pxa25x_init_irq, 280 .init_irq = pxa25x_init_irq,
281 .handle_irq = pxa25x_handle_irq, 281 .handle_irq = pxa25x_handle_irq,
282 .timer = &pxa_timer, 282 .init_time = pxa_timer_init,
283 .init_machine = idp_init, 283 .init_machine = idp_init,
284 .restart = pxa_restart, 284 .restart = pxa_restart,
285MACHINE_END 285MACHINE_END
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h
index a611ad3153c7..b6132aa95dc0 100644
--- a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h
+++ b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h
@@ -463,6 +463,9 @@
463 GPIO76_LCD_PCLK, \ 463 GPIO76_LCD_PCLK, \
464 GPIO77_LCD_BIAS 464 GPIO77_LCD_BIAS
465 465
466/* these enable a work-around for a hw bug in pxa27x during ac97 warm reset */
467#define GPIO113_AC97_nRESET_GPIO_HIGH MFP_CFG_OUT(GPIO113, AF0, DEFAULT)
468#define GPIO95_AC97_nRESET_GPIO_HIGH MFP_CFG_OUT(GPIO95, AF0, DEFAULT)
466 469
467extern int keypad_set_wake(unsigned int on); 470extern int keypad_set_wake(unsigned int on);
468#endif /* __ASM_ARCH_MFP_PXA27X_H */ 471#endif /* __ASM_ARCH_MFP_PXA27X_H */
diff --git a/arch/arm/mach-pxa/include/mach/palmtreo.h b/arch/arm/mach-pxa/include/mach/palmtreo.h
index 2d3f14e3be29..714b6574393e 100644
--- a/arch/arm/mach-pxa/include/mach/palmtreo.h
+++ b/arch/arm/mach-pxa/include/mach/palmtreo.h
@@ -38,13 +38,14 @@
38#define GPIO_NR_TREO_LCD_POWER 25 38#define GPIO_NR_TREO_LCD_POWER 25
39 39
40/* Treo680 specific GPIOs */ 40/* Treo680 specific GPIOs */
41#ifdef CONFIG_MACH_TREO680
42#define GPIO_NR_TREO680_SD_READONLY 33 41#define GPIO_NR_TREO680_SD_READONLY 33
43#define GPIO_NR_TREO680_SD_POWER 42 42#define GPIO_NR_TREO680_SD_POWER 42
44#define GPIO_NR_TREO680_VIBRATE_EN 44 43#define GPIO_NR_TREO680_VIBRATE_EN 44
45#define GPIO_NR_TREO680_KEYB_BL 24 44#define GPIO_NR_TREO680_KEYB_BL 24
46#define GPIO_NR_TREO680_BT_EN 43 45#define GPIO_NR_TREO680_BT_EN 43
47#endif /* CONFIG_MACH_TREO680 */ 46#define GPIO_NR_TREO680_LCD_POWER 77
47#define GPIO_NR_TREO680_LCD_EN 86
48#define GPIO_NR_TREO680_LCD_EN_N 25
48 49
49/* Centro685 specific GPIOs */ 50/* Centro685 specific GPIOs */
50#define GPIO_NR_CENTRO_SD_POWER 21 51#define GPIO_NR_CENTRO_SD_POWER 21
diff --git a/arch/arm/mach-pxa/include/mach/smemc.h b/arch/arm/mach-pxa/include/mach/smemc.h
index b7de471b273a..b802f285fe00 100644
--- a/arch/arm/mach-pxa/include/mach/smemc.h
+++ b/arch/arm/mach-pxa/include/mach/smemc.h
@@ -37,6 +37,7 @@
37#define CSADRCFG1 (SMEMC_VIRT + 0x84) /* Address Configuration Register for CS1 */ 37#define CSADRCFG1 (SMEMC_VIRT + 0x84) /* Address Configuration Register for CS1 */
38#define CSADRCFG2 (SMEMC_VIRT + 0x88) /* Address Configuration Register for CS2 */ 38#define CSADRCFG2 (SMEMC_VIRT + 0x88) /* Address Configuration Register for CS2 */
39#define CSADRCFG3 (SMEMC_VIRT + 0x8C) /* Address Configuration Register for CS3 */ 39#define CSADRCFG3 (SMEMC_VIRT + 0x8C) /* Address Configuration Register for CS3 */
40#define CSMSADRCFG (SMEMC_VIRT + 0xA0) /* Chip Select Configuration Register */
40 41
41/* 42/*
42 * More handy macros for PCMCIA 43 * More handy macros for PCMCIA
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c
index 402874f9021f..e848c4607baf 100644
--- a/arch/arm/mach-pxa/littleton.c
+++ b/arch/arm/mach-pxa/littleton.c
@@ -443,7 +443,7 @@ MACHINE_START(LITTLETON, "Marvell Form Factor Development Platform (aka Littleto
443 .nr_irqs = LITTLETON_NR_IRQS, 443 .nr_irqs = LITTLETON_NR_IRQS,
444 .init_irq = pxa3xx_init_irq, 444 .init_irq = pxa3xx_init_irq,
445 .handle_irq = pxa3xx_handle_irq, 445 .handle_irq = pxa3xx_handle_irq,
446 .timer = &pxa_timer, 446 .init_time = pxa_timer_init,
447 .init_machine = littleton_init, 447 .init_machine = littleton_init,
448 .restart = pxa_restart, 448 .restart = pxa_restart,
449MACHINE_END 449MACHINE_END
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index 1a63eaa89867..1255ee00f3d1 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -503,7 +503,7 @@ MACHINE_START(LOGICPD_PXA270, "LogicPD PXA270 Card Engine")
503 .nr_irqs = LPD270_NR_IRQS, 503 .nr_irqs = LPD270_NR_IRQS,
504 .init_irq = lpd270_init_irq, 504 .init_irq = lpd270_init_irq,
505 .handle_irq = pxa27x_handle_irq, 505 .handle_irq = pxa27x_handle_irq,
506 .timer = &pxa_timer, 506 .init_time = pxa_timer_init,
507 .init_machine = lpd270_init, 507 .init_machine = lpd270_init,
508 .restart = pxa_restart, 508 .restart = pxa_restart,
509MACHINE_END 509MACHINE_END
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index 553056d9a3c5..d8a1be619f21 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -650,7 +650,7 @@ MACHINE_START(LUBBOCK, "Intel DBPXA250 Development Platform (aka Lubbock)")
650 .nr_irqs = LUBBOCK_NR_IRQS, 650 .nr_irqs = LUBBOCK_NR_IRQS,
651 .init_irq = lubbock_init_irq, 651 .init_irq = lubbock_init_irq,
652 .handle_irq = pxa25x_handle_irq, 652 .handle_irq = pxa25x_handle_irq,
653 .timer = &pxa_timer, 653 .init_time = pxa_timer_init,
654 .init_machine = lubbock_init, 654 .init_machine = lubbock_init,
655 .restart = pxa_restart, 655 .restart = pxa_restart,
656MACHINE_END 656MACHINE_END
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index f7922404d941..f44532fc648b 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -774,6 +774,6 @@ MACHINE_START(MAGICIAN, "HTC Magician")
774 .init_irq = pxa27x_init_irq, 774 .init_irq = pxa27x_init_irq,
775 .handle_irq = pxa27x_handle_irq, 775 .handle_irq = pxa27x_handle_irq,
776 .init_machine = magician_init, 776 .init_machine = magician_init,
777 .timer = &pxa_timer, 777 .init_time = pxa_timer_init,
778 .restart = pxa_restart, 778 .restart = pxa_restart,
779MACHINE_END 779MACHINE_END
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index f27a61ee7ac7..7a12c1ba90ff 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -714,7 +714,7 @@ MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)")
714 .nr_irqs = MAINSTONE_NR_IRQS, 714 .nr_irqs = MAINSTONE_NR_IRQS,
715 .init_irq = mainstone_init_irq, 715 .init_irq = mainstone_init_irq,
716 .handle_irq = pxa27x_handle_irq, 716 .handle_irq = pxa27x_handle_irq,
717 .timer = &pxa_timer, 717 .init_time = pxa_timer_init,
718 .init_machine = mainstone_init, 718 .init_machine = mainstone_init,
719 .restart = pxa_restart, 719 .restart = pxa_restart,
720MACHINE_END 720MACHINE_END
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index 2831308dba68..f8979b943cbf 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -762,6 +762,6 @@ MACHINE_START(MIOA701, "MIO A701")
762 .init_irq = &pxa27x_init_irq, 762 .init_irq = &pxa27x_init_irq,
763 .handle_irq = &pxa27x_handle_irq, 763 .handle_irq = &pxa27x_handle_irq,
764 .init_machine = mioa701_machine_init, 764 .init_machine = mioa701_machine_init,
765 .timer = &pxa_timer, 765 .init_time = pxa_timer_init,
766 .restart = mioa701_restart, 766 .restart = mioa701_restart,
767MACHINE_END 767MACHINE_END
diff --git a/arch/arm/mach-pxa/mp900.c b/arch/arm/mach-pxa/mp900.c
index 152efbf093f6..854f1f562d6b 100644
--- a/arch/arm/mach-pxa/mp900.c
+++ b/arch/arm/mach-pxa/mp900.c
@@ -93,7 +93,7 @@ static void __init mp900c_init(void)
93/* Maintainer - Michael Petchkovsky <mkpetch@internode.on.net> */ 93/* Maintainer - Michael Petchkovsky <mkpetch@internode.on.net> */
94MACHINE_START(NEC_MP900, "MobilePro900/C") 94MACHINE_START(NEC_MP900, "MobilePro900/C")
95 .atag_offset = 0x220100, 95 .atag_offset = 0x220100,
96 .timer = &pxa_timer, 96 .init_time = pxa_timer_init,
97 .map_io = pxa25x_map_io, 97 .map_io = pxa25x_map_io,
98 .nr_irqs = PXA_NR_IRQS, 98 .nr_irqs = PXA_NR_IRQS,
99 .init_irq = pxa25x_init_irq, 99 .init_irq = pxa25x_init_irq,
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
index 8bcc96e3b0db..909b713e5789 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -347,7 +347,7 @@ MACHINE_START(PALMLD, "Palm LifeDrive")
347 .nr_irqs = PXA_NR_IRQS, 347 .nr_irqs = PXA_NR_IRQS,
348 .init_irq = pxa27x_init_irq, 348 .init_irq = pxa27x_init_irq,
349 .handle_irq = pxa27x_handle_irq, 349 .handle_irq = pxa27x_handle_irq,
350 .timer = &pxa_timer, 350 .init_time = pxa_timer_init,
351 .init_machine = palmld_init, 351 .init_machine = palmld_init,
352 .restart = pxa_restart, 352 .restart = pxa_restart,
353MACHINE_END 353MACHINE_END
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
index 5ca7b904a30e..5033fd07968f 100644
--- a/arch/arm/mach-pxa/palmt5.c
+++ b/arch/arm/mach-pxa/palmt5.c
@@ -208,7 +208,7 @@ MACHINE_START(PALMT5, "Palm Tungsten|T5")
208 .nr_irqs = PXA_NR_IRQS, 208 .nr_irqs = PXA_NR_IRQS,
209 .init_irq = pxa27x_init_irq, 209 .init_irq = pxa27x_init_irq,
210 .handle_irq = pxa27x_handle_irq, 210 .handle_irq = pxa27x_handle_irq,
211 .timer = &pxa_timer, 211 .init_time = pxa_timer_init,
212 .init_machine = palmt5_init, 212 .init_machine = palmt5_init,
213 .restart = pxa_restart, 213 .restart = pxa_restart,
214MACHINE_END 214MACHINE_END
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
index ca924cfedfc0..100b176f7e88 100644
--- a/arch/arm/mach-pxa/palmtc.c
+++ b/arch/arm/mach-pxa/palmtc.c
@@ -542,7 +542,7 @@ MACHINE_START(PALMTC, "Palm Tungsten|C")
542 .nr_irqs = PXA_NR_IRQS, 542 .nr_irqs = PXA_NR_IRQS,
543 .init_irq = pxa25x_init_irq, 543 .init_irq = pxa25x_init_irq,
544 .handle_irq = pxa25x_handle_irq, 544 .handle_irq = pxa25x_handle_irq,
545 .timer = &pxa_timer, 545 .init_time = pxa_timer_init,
546 .init_machine = palmtc_init, 546 .init_machine = palmtc_init,
547 .restart = pxa_restart, 547 .restart = pxa_restart,
548MACHINE_END 548MACHINE_END
diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c
index 32e0d7998355..0742721ced2d 100644
--- a/arch/arm/mach-pxa/palmte2.c
+++ b/arch/arm/mach-pxa/palmte2.c
@@ -363,7 +363,7 @@ MACHINE_START(PALMTE2, "Palm Tungsten|E2")
363 .nr_irqs = PXA_NR_IRQS, 363 .nr_irqs = PXA_NR_IRQS,
364 .init_irq = pxa25x_init_irq, 364 .init_irq = pxa25x_init_irq,
365 .handle_irq = pxa25x_handle_irq, 365 .handle_irq = pxa25x_handle_irq,
366 .timer = &pxa_timer, 366 .init_time = pxa_timer_init,
367 .init_machine = palmte2_init, 367 .init_machine = palmte2_init,
368 .restart = pxa_restart, 368 .restart = pxa_restart,
369MACHINE_END 369MACHINE_END
diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c
index 3f3c48f2f7ce..a29849d181c8 100644
--- a/arch/arm/mach-pxa/palmtreo.c
+++ b/arch/arm/mach-pxa/palmtreo.c
@@ -98,9 +98,6 @@ static unsigned long treo_pin_config[] __initdata = {
98 GPIO96_KP_MKOUT_6, 98 GPIO96_KP_MKOUT_6,
99 GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, /* Hotsync button */ 99 GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, /* Hotsync button */
100 100
101 /* LCD */
102 GPIOxx_LCD_TFT_16BPP,
103
104 /* Quick Capture Interface */ 101 /* Quick Capture Interface */
105 GPIO84_CIF_FV, 102 GPIO84_CIF_FV,
106 GPIO85_CIF_LV, 103 GPIO85_CIF_LV,
@@ -140,6 +137,12 @@ static unsigned long treo680_pin_config[] __initdata = {
140 /* MATRIX KEYPAD - different wake up source */ 137 /* MATRIX KEYPAD - different wake up source */
141 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, 138 GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
142 GPIO99_KP_MKIN_5, 139 GPIO99_KP_MKIN_5,
140
141 /* LCD... L_BIAS alt fn not configured on Treo680; is GPIO instead */
142 GPIOxx_LCD_16BPP,
143 GPIO74_LCD_FCLK,
144 GPIO75_LCD_LCLK,
145 GPIO76_LCD_PCLK,
143}; 146};
144#endif /* CONFIG_MACH_TREO680 */ 147#endif /* CONFIG_MACH_TREO680 */
145 148
@@ -155,6 +158,9 @@ static unsigned long centro685_pin_config[] __initdata = {
155 /* MATRIX KEYPAD - different wake up source */ 158 /* MATRIX KEYPAD - different wake up source */
156 GPIO100_KP_MKIN_0, 159 GPIO100_KP_MKIN_0,
157 GPIO99_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH, 160 GPIO99_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH,
161
162 /* LCD */
163 GPIOxx_LCD_TFT_16BPP,
158}; 164};
159#endif /* CONFIG_MACH_CENTRO */ 165#endif /* CONFIG_MACH_CENTRO */
160 166
@@ -328,7 +334,6 @@ static inline void palmtreo_uhc_init(void) {}
328/****************************************************************************** 334/******************************************************************************
329 * Vibra and LEDs 335 * Vibra and LEDs
330 ******************************************************************************/ 336 ******************************************************************************/
331#ifdef CONFIG_MACH_TREO680
332static struct gpio_led treo680_gpio_leds[] = { 337static struct gpio_led treo680_gpio_leds[] = {
333 { 338 {
334 .name = "treo680:vibra:vibra", 339 .name = "treo680:vibra:vibra",
@@ -379,21 +384,17 @@ static struct gpio_led_platform_data centro_gpio_led_info = {
379static struct platform_device palmtreo_leds = { 384static struct platform_device palmtreo_leds = {
380 .name = "leds-gpio", 385 .name = "leds-gpio",
381 .id = -1, 386 .id = -1,
382 .dev = {
383 .platform_data = &treo680_gpio_led_info,
384 }
385}; 387};
386 388
387static void __init palmtreo_leds_init(void) 389static void __init palmtreo_leds_init(void)
388{ 390{
389 if (machine_is_centro()) 391 if (machine_is_centro())
390 palmtreo_leds.dev.platform_data = &centro_gpio_led_info; 392 palmtreo_leds.dev.platform_data = &centro_gpio_led_info;
393 else if (machine_is_treo680())
394 palmtreo_leds.dev.platform_data = &treo680_gpio_led_info;
391 395
392 platform_device_register(&palmtreo_leds); 396 platform_device_register(&palmtreo_leds);
393} 397}
394#else
395static inline void palmtreo_leds_init(void) {}
396#endif
397 398
398/****************************************************************************** 399/******************************************************************************
399 * Machine init 400 * Machine init
@@ -424,10 +425,59 @@ static void __init palmphone_common_init(void)
424} 425}
425 426
426#ifdef CONFIG_MACH_TREO680 427#ifdef CONFIG_MACH_TREO680
428void __init treo680_gpio_init(void)
429{
430 unsigned int gpio;
431
432 /* drive all three lcd gpios high initially */
433 const unsigned long lcd_flags = GPIOF_INIT_HIGH | GPIOF_DIR_OUT;
434
435 /*
436 * LCD GPIO initialization...
437 */
438
439 /*
440 * This is likely the power to the lcd. Toggling it low/high appears to
441 * turn the lcd off/on. Can be toggled after lcd is initialized without
442 * any apparent adverse effects to the lcd operation. Note that this
443 * gpio line is used by the lcd controller as the L_BIAS signal, but
444 * treo680 configures it as gpio.
445 */
446 gpio = GPIO_NR_TREO680_LCD_POWER;
447 if (gpio_request_one(gpio, lcd_flags, "LCD power") < 0)
448 goto fail;
449
450 /*
451 * These two are called "enables", for lack of a better understanding.
452 * If either of these are toggled after the lcd is initialized, the
453 * image becomes degraded. N.B. The IPL shipped with the treo
454 * configures GPIO_NR_TREO680_LCD_EN_N as output and drives it high. If
455 * the IPL is ever reprogrammed, this initialization may be need to be
456 * revisited.
457 */
458 gpio = GPIO_NR_TREO680_LCD_EN;
459 if (gpio_request_one(gpio, lcd_flags, "LCD enable") < 0)
460 goto fail;
461 gpio = GPIO_NR_TREO680_LCD_EN_N;
462 if (gpio_request_one(gpio, lcd_flags, "LCD enable_n") < 0)
463 goto fail;
464
465 /* driving this low turns LCD on */
466 gpio_set_value(GPIO_NR_TREO680_LCD_EN_N, 0);
467
468 return;
469 fail:
470 pr_err("gpio %d initialization failed\n", gpio);
471 gpio_free(GPIO_NR_TREO680_LCD_POWER);
472 gpio_free(GPIO_NR_TREO680_LCD_EN);
473 gpio_free(GPIO_NR_TREO680_LCD_EN_N);
474}
475
427static void __init treo680_init(void) 476static void __init treo680_init(void)
428{ 477{
429 pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config)); 478 pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config));
430 palmphone_common_init(); 479 palmphone_common_init();
480 treo680_gpio_init();
431 palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY, 481 palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY,
432 GPIO_NR_TREO680_SD_POWER, 0); 482 GPIO_NR_TREO680_SD_POWER, 0);
433} 483}
@@ -451,7 +501,7 @@ MACHINE_START(TREO680, "Palm Treo 680")
451 .nr_irqs = PXA_NR_IRQS, 501 .nr_irqs = PXA_NR_IRQS,
452 .init_irq = pxa27x_init_irq, 502 .init_irq = pxa27x_init_irq,
453 .handle_irq = pxa27x_handle_irq, 503 .handle_irq = pxa27x_handle_irq,
454 .timer = &pxa_timer, 504 .init_time = pxa_timer_init,
455 .init_machine = treo680_init, 505 .init_machine = treo680_init,
456 .restart = pxa_restart, 506 .restart = pxa_restart,
457MACHINE_END 507MACHINE_END
@@ -465,7 +515,7 @@ MACHINE_START(CENTRO, "Palm Centro 685")
465 .nr_irqs = PXA_NR_IRQS, 515 .nr_irqs = PXA_NR_IRQS,
466 .init_irq = pxa27x_init_irq, 516 .init_irq = pxa27x_init_irq,
467 .handle_irq = pxa27x_handle_irq, 517 .handle_irq = pxa27x_handle_irq,
468 .timer = &pxa_timer, 518 .init_time = pxa_timer_init,
469 .init_machine = centro_init, 519 .init_machine = centro_init,
470 .restart = pxa_restart, 520 .restart = pxa_restart,
471MACHINE_END 521MACHINE_END
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
index 8b4366628a12..627c93a7364c 100644
--- a/arch/arm/mach-pxa/palmtx.c
+++ b/arch/arm/mach-pxa/palmtx.c
@@ -366,7 +366,7 @@ MACHINE_START(PALMTX, "Palm T|X")
366 .nr_irqs = PXA_NR_IRQS, 366 .nr_irqs = PXA_NR_IRQS,
367 .init_irq = pxa27x_init_irq, 367 .init_irq = pxa27x_init_irq,
368 .handle_irq = pxa27x_handle_irq, 368 .handle_irq = pxa27x_handle_irq,
369 .timer = &pxa_timer, 369 .init_time = pxa_timer_init,
370 .init_machine = palmtx_init, 370 .init_machine = palmtx_init,
371 .restart = pxa_restart, 371 .restart = pxa_restart,
372MACHINE_END 372MACHINE_END
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c
index 8cdd4f58e253..18b7fcd98592 100644
--- a/arch/arm/mach-pxa/palmz72.c
+++ b/arch/arm/mach-pxa/palmz72.c
@@ -404,7 +404,7 @@ MACHINE_START(PALMZ72, "Palm Zire72")
404 .nr_irqs = PXA_NR_IRQS, 404 .nr_irqs = PXA_NR_IRQS,
405 .init_irq = pxa27x_init_irq, 405 .init_irq = pxa27x_init_irq,
406 .handle_irq = pxa27x_handle_irq, 406 .handle_irq = pxa27x_handle_irq,
407 .timer = &pxa_timer, 407 .init_time = pxa_timer_init,
408 .init_machine = palmz72_init, 408 .init_machine = palmz72_init,
409 .restart = pxa_restart, 409 .restart = pxa_restart,
410MACHINE_END 410MACHINE_END
diff --git a/arch/arm/mach-pxa/pcm027.c b/arch/arm/mach-pxa/pcm027.c
index fe9054435b6f..69918c7e3f1f 100644
--- a/arch/arm/mach-pxa/pcm027.c
+++ b/arch/arm/mach-pxa/pcm027.c
@@ -263,7 +263,7 @@ MACHINE_START(PCM027, "Phytec Messtechnik GmbH phyCORE-PXA270")
263 .nr_irqs = PCM027_NR_IRQS, 263 .nr_irqs = PCM027_NR_IRQS,
264 .init_irq = pxa27x_init_irq, 264 .init_irq = pxa27x_init_irq,
265 .handle_irq = pxa27x_handle_irq, 265 .handle_irq = pxa27x_handle_irq,
266 .timer = &pxa_timer, 266 .init_time = pxa_timer_init,
267 .init_machine = pcm027_init, 267 .init_machine = pcm027_init,
268 .restart = pxa_restart, 268 .restart = pxa_restart,
269MACHINE_END 269MACHINE_END
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 2910bb935c75..50ccd5f1d560 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -469,7 +469,7 @@ MACHINE_START(POODLE, "SHARP Poodle")
469 .nr_irqs = POODLE_NR_IRQS, /* 4 for LoCoMo */ 469 .nr_irqs = POODLE_NR_IRQS, /* 4 for LoCoMo */
470 .init_irq = pxa25x_init_irq, 470 .init_irq = pxa25x_init_irq,
471 .handle_irq = pxa25x_handle_irq, 471 .handle_irq = pxa25x_handle_irq,
472 .timer = &pxa_timer, 472 .init_time = pxa_timer_init,
473 .init_machine = poodle_init, 473 .init_machine = poodle_init,
474 .restart = pxa_restart, 474 .restart = pxa_restart,
475MACHINE_END 475MACHINE_END
diff --git a/arch/arm/mach-pxa/pxa-dt.c b/arch/arm/mach-pxa/pxa-dt.c
index c9192cea0033..3835979a0dd3 100644
--- a/arch/arm/mach-pxa/pxa-dt.c
+++ b/arch/arm/mach-pxa/pxa-dt.c
@@ -55,7 +55,7 @@ DT_MACHINE_START(PXA_DT, "Marvell PXA3xx (Device Tree Support)")
55 .map_io = pxa3xx_map_io, 55 .map_io = pxa3xx_map_io,
56 .init_irq = pxa3xx_dt_init_irq, 56 .init_irq = pxa3xx_dt_init_irq,
57 .handle_irq = pxa3xx_handle_irq, 57 .handle_irq = pxa3xx_handle_irq,
58 .timer = &pxa_timer, 58 .init_time = pxa_timer_init,
59 .restart = pxa_restart, 59 .restart = pxa_restart,
60 .init_machine = pxa3xx_dt_init, 60 .init_machine = pxa3xx_dt_init,
61 .dt_compat = pxa3xx_dt_board_compat, 61 .dt_compat = pxa3xx_dt_board_compat,
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index 8047ee0effc5..616cb87b6179 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -47,9 +47,9 @@ void pxa27x_clear_otgph(void)
47EXPORT_SYMBOL(pxa27x_clear_otgph); 47EXPORT_SYMBOL(pxa27x_clear_otgph);
48 48
49static unsigned long ac97_reset_config[] = { 49static unsigned long ac97_reset_config[] = {
50 GPIO113_GPIO, 50 GPIO113_AC97_nRESET_GPIO_HIGH,
51 GPIO113_AC97_nRESET, 51 GPIO113_AC97_nRESET,
52 GPIO95_GPIO, 52 GPIO95_AC97_nRESET_GPIO_HIGH,
53 GPIO95_AC97_nRESET, 53 GPIO95_AC97_nRESET,
54}; 54};
55 55
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 25b08bfa997b..af41888acbd6 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -1095,7 +1095,7 @@ MACHINE_START(RAUMFELD_RC, "Raumfeld Controller")
1095 .nr_irqs = PXA_NR_IRQS, 1095 .nr_irqs = PXA_NR_IRQS,
1096 .init_irq = pxa3xx_init_irq, 1096 .init_irq = pxa3xx_init_irq,
1097 .handle_irq = pxa3xx_handle_irq, 1097 .handle_irq = pxa3xx_handle_irq,
1098 .timer = &pxa_timer, 1098 .init_time = pxa_timer_init,
1099 .restart = pxa_restart, 1099 .restart = pxa_restart,
1100MACHINE_END 1100MACHINE_END
1101#endif 1101#endif
@@ -1108,7 +1108,7 @@ MACHINE_START(RAUMFELD_CONNECTOR, "Raumfeld Connector")
1108 .nr_irqs = PXA_NR_IRQS, 1108 .nr_irqs = PXA_NR_IRQS,
1109 .init_irq = pxa3xx_init_irq, 1109 .init_irq = pxa3xx_init_irq,
1110 .handle_irq = pxa3xx_handle_irq, 1110 .handle_irq = pxa3xx_handle_irq,
1111 .timer = &pxa_timer, 1111 .init_time = pxa_timer_init,
1112 .restart = pxa_restart, 1112 .restart = pxa_restart,
1113MACHINE_END 1113MACHINE_END
1114#endif 1114#endif
@@ -1121,7 +1121,7 @@ MACHINE_START(RAUMFELD_SPEAKER, "Raumfeld Speaker")
1121 .nr_irqs = PXA_NR_IRQS, 1121 .nr_irqs = PXA_NR_IRQS,
1122 .init_irq = pxa3xx_init_irq, 1122 .init_irq = pxa3xx_init_irq,
1123 .handle_irq = pxa3xx_handle_irq, 1123 .handle_irq = pxa3xx_handle_irq,
1124 .timer = &pxa_timer, 1124 .init_time = pxa_timer_init,
1125 .restart = pxa_restart, 1125 .restart = pxa_restart,
1126MACHINE_END 1126MACHINE_END
1127#endif 1127#endif
diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c
index 08d87a5d2639..710c493eac89 100644
--- a/arch/arm/mach-pxa/saar.c
+++ b/arch/arm/mach-pxa/saar.c
@@ -601,7 +601,7 @@ MACHINE_START(SAAR, "PXA930 Handheld Platform (aka SAAR)")
601 .nr_irqs = PXA_NR_IRQS, 601 .nr_irqs = PXA_NR_IRQS,
602 .init_irq = pxa3xx_init_irq, 602 .init_irq = pxa3xx_init_irq,
603 .handle_irq = pxa3xx_handle_irq, 603 .handle_irq = pxa3xx_handle_irq,
604 .timer = &pxa_timer, 604 .init_time = pxa_timer_init,
605 .init_machine = saar_init, 605 .init_machine = saar_init,
606 .restart = pxa_restart, 606 .restart = pxa_restart,
607MACHINE_END 607MACHINE_END
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/smemc.c b/arch/arm/mach-pxa/smemc.c
index 79923058d10f..f38aa890b2c9 100644
--- a/arch/arm/mach-pxa/smemc.c
+++ b/arch/arm/mach-pxa/smemc.c
@@ -40,6 +40,8 @@ static void pxa3xx_smemc_resume(void)
40 __raw_writel(csadrcfg[1], CSADRCFG1); 40 __raw_writel(csadrcfg[1], CSADRCFG1);
41 __raw_writel(csadrcfg[2], CSADRCFG2); 41 __raw_writel(csadrcfg[2], CSADRCFG2);
42 __raw_writel(csadrcfg[3], CSADRCFG3); 42 __raw_writel(csadrcfg[3], CSADRCFG3);
43 /* CSMSADRCFG wakes up in its default state (0), so we need to set it */
44 __raw_writel(0x2, CSMSADRCFG);
43} 45}
44 46
45static struct syscore_ops smemc_syscore_ops = { 47static struct syscore_ops smemc_syscore_ops = {
@@ -49,8 +51,19 @@ static struct syscore_ops smemc_syscore_ops = {
49 51
50static int __init smemc_init(void) 52static int __init smemc_init(void)
51{ 53{
52 if (cpu_is_pxa3xx()) 54 if (cpu_is_pxa3xx()) {
55 /*
56 * The only documentation we have on the
57 * Chip Select Configuration Register (CSMSADRCFG) is that
58 * it must be programmed to 0x2.
59 * Moreover, in the bit definitions, the second bit
60 * (CSMSADRCFG[1]) is called "SETALWAYS".
61 * Other bits are reserved in this register.
62 */
63 __raw_writel(0x2, CSMSADRCFG);
64
53 register_syscore_ops(&smemc_syscore_ops); 65 register_syscore_ops(&smemc_syscore_ops);
66 }
54 67
55 return 0; 68 return 0;
56} 69}
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 2073f0e6db0d..362726c49c70 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -732,7 +732,7 @@ static inline void spitz_lcd_init(void) {}
732#endif 732#endif
733 733
734/****************************************************************************** 734/******************************************************************************
735 * Framebuffer 735 * NAND Flash
736 ******************************************************************************/ 736 ******************************************************************************/
737#if defined(CONFIG_MTD_NAND_SHARPSL) || defined(CONFIG_MTD_NAND_SHARPSL_MODULE) 737#if defined(CONFIG_MTD_NAND_SHARPSL) || defined(CONFIG_MTD_NAND_SHARPSL_MODULE)
738static struct mtd_partition spitz_nand_partitions[] = { 738static struct mtd_partition spitz_nand_partitions[] = {
@@ -858,7 +858,7 @@ static inline void spitz_nor_init(void) {}
858#endif 858#endif
859 859
860/****************************************************************************** 860/******************************************************************************
861 * GPIO expander 861 * I2C devices
862 ******************************************************************************/ 862 ******************************************************************************/
863#if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE) 863#if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE)
864static struct pca953x_platform_data akita_pca953x_pdata = { 864static struct pca953x_platform_data akita_pca953x_pdata = {
@@ -986,7 +986,7 @@ MACHINE_START(SPITZ, "SHARP Spitz")
986 .init_irq = pxa27x_init_irq, 986 .init_irq = pxa27x_init_irq,
987 .handle_irq = pxa27x_handle_irq, 987 .handle_irq = pxa27x_handle_irq,
988 .init_machine = spitz_init, 988 .init_machine = spitz_init,
989 .timer = &pxa_timer, 989 .init_time = pxa_timer_init,
990 .restart = spitz_restart, 990 .restart = spitz_restart,
991MACHINE_END 991MACHINE_END
992#endif 992#endif
@@ -1000,7 +1000,7 @@ MACHINE_START(BORZOI, "SHARP Borzoi")
1000 .init_irq = pxa27x_init_irq, 1000 .init_irq = pxa27x_init_irq,
1001 .handle_irq = pxa27x_handle_irq, 1001 .handle_irq = pxa27x_handle_irq,
1002 .init_machine = spitz_init, 1002 .init_machine = spitz_init,
1003 .timer = &pxa_timer, 1003 .init_time = pxa_timer_init,
1004 .restart = spitz_restart, 1004 .restart = spitz_restart,
1005MACHINE_END 1005MACHINE_END
1006#endif 1006#endif
@@ -1014,7 +1014,7 @@ MACHINE_START(AKITA, "SHARP Akita")
1014 .init_irq = pxa27x_init_irq, 1014 .init_irq = pxa27x_init_irq,
1015 .handle_irq = pxa27x_handle_irq, 1015 .handle_irq = pxa27x_handle_irq,
1016 .init_machine = spitz_init, 1016 .init_machine = spitz_init,
1017 .timer = &pxa_timer, 1017 .init_time = pxa_timer_init,
1018 .restart = spitz_restart, 1018 .restart = spitz_restart,
1019MACHINE_END 1019MACHINE_END
1020#endif 1020#endif
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/stargate2.c b/arch/arm/mach-pxa/stargate2.c
index 456560b5aad4..88fde43c948c 100644
--- a/arch/arm/mach-pxa/stargate2.c
+++ b/arch/arm/mach-pxa/stargate2.c
@@ -1006,7 +1006,7 @@ MACHINE_START(INTELMOTE2, "IMOTE 2")
1006 .nr_irqs = PXA_NR_IRQS, 1006 .nr_irqs = PXA_NR_IRQS,
1007 .init_irq = pxa27x_init_irq, 1007 .init_irq = pxa27x_init_irq,
1008 .handle_irq = pxa27x_handle_irq, 1008 .handle_irq = pxa27x_handle_irq,
1009 .timer = &pxa_timer, 1009 .init_time = pxa_timer_init,
1010 .init_machine = imote2_init, 1010 .init_machine = imote2_init,
1011 .atag_offset = 0x100, 1011 .atag_offset = 0x100,
1012 .restart = pxa_restart, 1012 .restart = pxa_restart,
@@ -1019,7 +1019,7 @@ MACHINE_START(STARGATE2, "Stargate 2")
1019 .nr_irqs = STARGATE_NR_IRQS, 1019 .nr_irqs = STARGATE_NR_IRQS,
1020 .init_irq = pxa27x_init_irq, 1020 .init_irq = pxa27x_init_irq,
1021 .handle_irq = pxa27x_handle_irq, 1021 .handle_irq = pxa27x_handle_irq,
1022 .timer = &pxa_timer, 1022 .init_time = pxa_timer_init,
1023 .init_machine = stargate2_init, 1023 .init_machine = stargate2_init,
1024 .atag_offset = 0x100, 1024 .atag_offset = 0x100,
1025 .restart = pxa_restart, 1025 .restart = pxa_restart,
diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c
index 1a25f8a7b0ce..f55979c09a5f 100644
--- a/arch/arm/mach-pxa/tavorevb.c
+++ b/arch/arm/mach-pxa/tavorevb.c
@@ -494,7 +494,7 @@ MACHINE_START(TAVOREVB, "PXA930 Evaluation Board (aka TavorEVB)")
494 .nr_irqs = PXA_NR_IRQS, 494 .nr_irqs = PXA_NR_IRQS,
495 .init_irq = pxa3xx_init_irq, 495 .init_irq = pxa3xx_init_irq,
496 .handle_irq = pxa3xx_handle_irq, 496 .handle_irq = pxa3xx_handle_irq,
497 .timer = &pxa_timer, 497 .init_time = pxa_timer_init,
498 .init_machine = tavorevb_init, 498 .init_machine = tavorevb_init,
499 .restart = pxa_restart, 499 .restart = pxa_restart,
500MACHINE_END 500MACHINE_END
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index 4bc47d63698b..8f1ee92aea30 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -89,48 +89,10 @@ pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev)
89 } 89 }
90} 90}
91 91
92static struct clock_event_device ckevt_pxa_osmr0 = {
93 .name = "osmr0",
94 .features = CLOCK_EVT_FEAT_ONESHOT,
95 .rating = 200,
96 .set_next_event = pxa_osmr0_set_next_event,
97 .set_mode = pxa_osmr0_set_mode,
98};
99
100static struct irqaction pxa_ost0_irq = {
101 .name = "ost0",
102 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
103 .handler = pxa_ost0_interrupt,
104 .dev_id = &ckevt_pxa_osmr0,
105};
106
107static void __init pxa_timer_init(void)
108{
109 unsigned long clock_tick_rate = get_clock_tick_rate();
110
111 writel_relaxed(0, OIER);
112 writel_relaxed(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR);
113
114 setup_sched_clock(pxa_read_sched_clock, 32, clock_tick_rate);
115
116 clockevents_calc_mult_shift(&ckevt_pxa_osmr0, clock_tick_rate, 4);
117 ckevt_pxa_osmr0.max_delta_ns =
118 clockevent_delta2ns(0x7fffffff, &ckevt_pxa_osmr0);
119 ckevt_pxa_osmr0.min_delta_ns =
120 clockevent_delta2ns(MIN_OSCR_DELTA * 2, &ckevt_pxa_osmr0) + 1;
121 ckevt_pxa_osmr0.cpumask = cpumask_of(0);
122
123 setup_irq(IRQ_OST0, &pxa_ost0_irq);
124
125 clocksource_mmio_init(OSCR, "oscr0", clock_tick_rate, 200, 32,
126 clocksource_mmio_readl_up);
127 clockevents_register_device(&ckevt_pxa_osmr0);
128}
129
130#ifdef CONFIG_PM 92#ifdef CONFIG_PM
131static unsigned long osmr[4], oier, oscr; 93static unsigned long osmr[4], oier, oscr;
132 94
133static void pxa_timer_suspend(void) 95static void pxa_timer_suspend(struct clock_event_device *cedev)
134{ 96{
135 osmr[0] = readl_relaxed(OSMR0); 97 osmr[0] = readl_relaxed(OSMR0);
136 osmr[1] = readl_relaxed(OSMR1); 98 osmr[1] = readl_relaxed(OSMR1);
@@ -140,7 +102,7 @@ static void pxa_timer_suspend(void)
140 oscr = readl_relaxed(OSCR); 102 oscr = readl_relaxed(OSCR);
141} 103}
142 104
143static void pxa_timer_resume(void) 105static void pxa_timer_resume(struct clock_event_device *cedev)
144{ 106{
145 /* 107 /*
146 * Ensure that we have at least MIN_OSCR_DELTA between match 108 * Ensure that we have at least MIN_OSCR_DELTA between match
@@ -163,8 +125,38 @@ static void pxa_timer_resume(void)
163#define pxa_timer_resume NULL 125#define pxa_timer_resume NULL
164#endif 126#endif
165 127
166struct sys_timer pxa_timer = { 128static struct clock_event_device ckevt_pxa_osmr0 = {
167 .init = pxa_timer_init, 129 .name = "osmr0",
130 .features = CLOCK_EVT_FEAT_ONESHOT,
131 .rating = 200,
132 .set_next_event = pxa_osmr0_set_next_event,
133 .set_mode = pxa_osmr0_set_mode,
168 .suspend = pxa_timer_suspend, 134 .suspend = pxa_timer_suspend,
169 .resume = pxa_timer_resume, 135 .resume = pxa_timer_resume,
170}; 136};
137
138static struct irqaction pxa_ost0_irq = {
139 .name = "ost0",
140 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
141 .handler = pxa_ost0_interrupt,
142 .dev_id = &ckevt_pxa_osmr0,
143};
144
145void __init pxa_timer_init(void)
146{
147 unsigned long clock_tick_rate = get_clock_tick_rate();
148
149 writel_relaxed(0, OIER);
150 writel_relaxed(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR);
151
152 setup_sched_clock(pxa_read_sched_clock, 32, clock_tick_rate);
153
154 ckevt_pxa_osmr0.cpumask = cpumask_of(0);
155
156 setup_irq(IRQ_OST0, &pxa_ost0_irq);
157
158 clocksource_mmio_init(OSCR, "oscr0", clock_tick_rate, 200, 32,
159 clocksource_mmio_readl_up);
160 clockevents_config_and_register(&ckevt_pxa_osmr0, clock_tick_rate,
161 MIN_OSCR_DELTA * 2, 0x7fffffff);
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-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 233629edf7ee..9e7998d3635f 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -982,6 +982,6 @@ MACHINE_START(TOSA, "SHARP Tosa")
982 .init_irq = pxa25x_init_irq, 982 .init_irq = pxa25x_init_irq,
983 .handle_irq = pxa25x_handle_irq, 983 .handle_irq = pxa25x_handle_irq,
984 .init_machine = tosa_init, 984 .init_machine = tosa_init,
985 .timer = &pxa_timer, 985 .init_time = pxa_timer_init,
986 .restart = tosa_restart, 986 .restart = tosa_restart,
987MACHINE_END 987MACHINE_END
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index fbbcbed4d1d4..c58043462acd 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -561,7 +561,7 @@ MACHINE_START(TRIZEPS4, "Keith und Koep Trizeps IV module")
561 .nr_irqs = PXA_NR_IRQS, 561 .nr_irqs = PXA_NR_IRQS,
562 .init_irq = pxa27x_init_irq, 562 .init_irq = pxa27x_init_irq,
563 .handle_irq = pxa27x_handle_irq, 563 .handle_irq = pxa27x_handle_irq,
564 .timer = &pxa_timer, 564 .init_time = pxa_timer_init,
565 .restart = pxa_restart, 565 .restart = pxa_restart,
566MACHINE_END 566MACHINE_END
567 567
@@ -573,6 +573,6 @@ MACHINE_START(TRIZEPS4WL, "Keith und Koep Trizeps IV-WL module")
573 .nr_irqs = PXA_NR_IRQS, 573 .nr_irqs = PXA_NR_IRQS,
574 .init_irq = pxa27x_init_irq, 574 .init_irq = pxa27x_init_irq,
575 .handle_irq = pxa27x_handle_irq, 575 .handle_irq = pxa27x_handle_irq,
576 .timer = &pxa_timer, 576 .init_time = pxa_timer_init,
577 .restart = pxa_restart, 577 .restart = pxa_restart,
578MACHINE_END 578MACHINE_END
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
index c773e4dded64..9c363c081d3f 100644
--- a/arch/arm/mach-pxa/viper.c
+++ b/arch/arm/mach-pxa/viper.c
@@ -997,7 +997,7 @@ MACHINE_START(VIPER, "Arcom/Eurotech VIPER SBC")
997 .nr_irqs = PXA_NR_IRQS, 997 .nr_irqs = PXA_NR_IRQS,
998 .init_irq = viper_init_irq, 998 .init_irq = viper_init_irq,
999 .handle_irq = pxa25x_handle_irq, 999 .handle_irq = pxa25x_handle_irq,
1000 .timer = &pxa_timer, 1000 .init_time = pxa_timer_init,
1001 .init_machine = viper_init, 1001 .init_machine = viper_init,
1002 .restart = pxa_restart, 1002 .restart = pxa_restart,
1003MACHINE_END 1003MACHINE_END
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c
index 491b6c9a2a9b..aa89488f961e 100644
--- a/arch/arm/mach-pxa/vpac270.c
+++ b/arch/arm/mach-pxa/vpac270.c
@@ -719,7 +719,7 @@ MACHINE_START(VPAC270, "Voipac PXA270")
719 .nr_irqs = PXA_NR_IRQS, 719 .nr_irqs = PXA_NR_IRQS,
720 .init_irq = pxa27x_init_irq, 720 .init_irq = pxa27x_init_irq,
721 .handle_irq = pxa27x_handle_irq, 721 .handle_irq = pxa27x_handle_irq,
722 .timer = &pxa_timer, 722 .init_time = pxa_timer_init,
723 .init_machine = vpac270_init, 723 .init_machine = vpac270_init,
724 .restart = pxa_restart, 724 .restart = pxa_restart,
725MACHINE_END 725MACHINE_END
diff --git a/arch/arm/mach-pxa/xcep.c b/arch/arm/mach-pxa/xcep.c
index 4275713ccd10..13b1d4586d7d 100644
--- a/arch/arm/mach-pxa/xcep.c
+++ b/arch/arm/mach-pxa/xcep.c
@@ -185,7 +185,7 @@ MACHINE_START(XCEP, "Iskratel XCEP")
185 .nr_irqs = PXA_NR_IRQS, 185 .nr_irqs = PXA_NR_IRQS,
186 .init_irq = pxa25x_init_irq, 186 .init_irq = pxa25x_init_irq,
187 .handle_irq = pxa25x_handle_irq, 187 .handle_irq = pxa25x_handle_irq,
188 .timer = &pxa_timer, 188 .init_time = pxa_timer_init,
189 .restart = pxa_restart, 189 .restart = pxa_restart,
190MACHINE_END 190MACHINE_END
191 191
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c
index 97529face7aa..989903a7e467 100644
--- a/arch/arm/mach-pxa/z2.c
+++ b/arch/arm/mach-pxa/z2.c
@@ -722,7 +722,7 @@ MACHINE_START(ZIPIT2, "Zipit Z2")
722 .nr_irqs = PXA_NR_IRQS, 722 .nr_irqs = PXA_NR_IRQS,
723 .init_irq = pxa27x_init_irq, 723 .init_irq = pxa27x_init_irq,
724 .handle_irq = pxa27x_handle_irq, 724 .handle_irq = pxa27x_handle_irq,
725 .timer = &pxa_timer, 725 .init_time = pxa_timer_init,
726 .init_machine = z2_init, 726 .init_machine = z2_init,
727 .restart = pxa_restart, 727 .restart = pxa_restart,
728MACHINE_END 728MACHINE_END
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index abd3aa145083..f5d436434566 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -910,7 +910,7 @@ MACHINE_START(ARCOM_ZEUS, "Arcom/Eurotech ZEUS")
910 .nr_irqs = ZEUS_NR_IRQS, 910 .nr_irqs = ZEUS_NR_IRQS,
911 .init_irq = zeus_init_irq, 911 .init_irq = zeus_init_irq,
912 .handle_irq = pxa27x_handle_irq, 912 .handle_irq = pxa27x_handle_irq,
913 .timer = &pxa_timer, 913 .init_time = pxa_timer_init,
914 .init_machine = zeus_init, 914 .init_machine = zeus_init,
915 .restart = pxa_restart, 915 .restart = pxa_restart,
916MACHINE_END 916MACHINE_END
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 226279fac9d4..1f00d650ac27 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -428,7 +428,7 @@ MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)")
428 .nr_irqs = ZYLONITE_NR_IRQS, 428 .nr_irqs = ZYLONITE_NR_IRQS,
429 .init_irq = pxa3xx_init_irq, 429 .init_irq = pxa3xx_init_irq,
430 .handle_irq = pxa3xx_handle_irq, 430 .handle_irq = pxa3xx_handle_irq,
431 .timer = &pxa_timer, 431 .init_time = pxa_timer_init,
432 .init_machine = zylonite_init, 432 .init_machine = zylonite_init,
433 .restart = pxa_restart, 433 .restart = pxa_restart,
434MACHINE_END 434MACHINE_END
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 28511d43637a..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
@@ -418,10 +418,6 @@ static void __init realview_eb_timer_init(void)
418 realview_eb_twd_init(); 418 realview_eb_twd_init();
419} 419}
420 420
421static struct sys_timer realview_eb_timer = {
422 .init = realview_eb_timer_init,
423};
424
425static void realview_eb_restart(char mode, const char *cmd) 421static void realview_eb_restart(char mode, const char *cmd)
426{ 422{
427 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 423 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
@@ -472,8 +468,7 @@ MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
472 .map_io = realview_eb_map_io, 468 .map_io = realview_eb_map_io,
473 .init_early = realview_init_early, 469 .init_early = realview_init_early,
474 .init_irq = gic_init_irq, 470 .init_irq = gic_init_irq,
475 .timer = &realview_eb_timer, 471 .init_time = realview_eb_timer_init,
476 .handle_irq = gic_handle_irq,
477 .init_machine = realview_eb_init, 472 .init_machine = realview_eb_init,
478#ifdef CONFIG_ZONE_DMA 473#ifdef CONFIG_ZONE_DMA
479 .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 07d6672ddae7..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>
@@ -329,10 +329,6 @@ static void __init realview_pb1176_timer_init(void)
329 realview_timer_init(IRQ_DC1176_TIMER0); 329 realview_timer_init(IRQ_DC1176_TIMER0);
330} 330}
331 331
332static struct sys_timer realview_pb1176_timer = {
333 .init = realview_pb1176_timer_init,
334};
335
336static void realview_pb1176_restart(char mode, const char *cmd) 332static void realview_pb1176_restart(char mode, const char *cmd)
337{ 333{
338 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 334 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
@@ -384,8 +380,7 @@ MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
384 .map_io = realview_pb1176_map_io, 380 .map_io = realview_pb1176_map_io,
385 .init_early = realview_init_early, 381 .init_early = realview_init_early,
386 .init_irq = gic_init_irq, 382 .init_irq = gic_init_irq,
387 .timer = &realview_pb1176_timer, 383 .init_time = realview_pb1176_timer_init,
388 .handle_irq = gic_handle_irq,
389 .init_machine = realview_pb1176_init, 384 .init_machine = realview_pb1176_init,
390#ifdef CONFIG_ZONE_DMA 385#ifdef CONFIG_ZONE_DMA
391 .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 7ed53d75350f..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
@@ -316,10 +316,6 @@ static void __init realview_pb11mp_timer_init(void)
316 realview_pb11mp_twd_init(); 316 realview_pb11mp_twd_init();
317} 317}
318 318
319static struct sys_timer realview_pb11mp_timer = {
320 .init = realview_pb11mp_timer_init,
321};
322
323static void realview_pb11mp_restart(char mode, const char *cmd) 319static void realview_pb11mp_restart(char mode, const char *cmd)
324{ 320{
325 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 321 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
@@ -367,8 +363,7 @@ MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
367 .map_io = realview_pb11mp_map_io, 363 .map_io = realview_pb11mp_map_io,
368 .init_early = realview_init_early, 364 .init_early = realview_init_early,
369 .init_irq = gic_init_irq, 365 .init_irq = gic_init_irq,
370 .timer = &realview_pb11mp_timer, 366 .init_time = realview_pb11mp_timer_init,
371 .handle_irq = gic_handle_irq,
372 .init_machine = realview_pb11mp_init, 367 .init_machine = realview_pb11mp_init,
373#ifdef CONFIG_ZONE_DMA 368#ifdef CONFIG_ZONE_DMA
374 .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 9992431b8a15..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>
@@ -264,10 +264,6 @@ static void __init realview_pba8_timer_init(void)
264 realview_timer_init(IRQ_PBA8_TIMER0_1); 264 realview_timer_init(IRQ_PBA8_TIMER0_1);
265} 265}
266 266
267static struct sys_timer realview_pba8_timer = {
268 .init = realview_pba8_timer_init,
269};
270
271static void realview_pba8_restart(char mode, const char *cmd) 267static void realview_pba8_restart(char mode, const char *cmd)
272{ 268{
273 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL); 269 void __iomem *reset_ctrl = __io_address(REALVIEW_SYS_RESETCTL);
@@ -308,8 +304,7 @@ MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")
308 .map_io = realview_pba8_map_io, 304 .map_io = realview_pba8_map_io,
309 .init_early = realview_init_early, 305 .init_early = realview_init_early,
310 .init_irq = gic_init_irq, 306 .init_irq = gic_init_irq,
311 .timer = &realview_pba8_timer, 307 .init_time = realview_pba8_timer_init,
312 .handle_irq = gic_handle_irq,
313 .init_machine = realview_pba8_init, 308 .init_machine = realview_pba8_init,
314#ifdef CONFIG_ZONE_DMA 309#ifdef CONFIG_ZONE_DMA
315 .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 4f486f05108a..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>
@@ -324,10 +324,6 @@ static void __init realview_pbx_timer_init(void)
324 realview_pbx_twd_init(); 324 realview_pbx_twd_init();
325} 325}
326 326
327static struct sys_timer realview_pbx_timer = {
328 .init = realview_pbx_timer_init,
329};
330
331static void realview_pbx_fixup(struct tag *tags, char **from, 327static void realview_pbx_fixup(struct tag *tags, char **from,
332 struct meminfo *meminfo) 328 struct meminfo *meminfo)
333{ 329{
@@ -404,8 +400,7 @@ MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
404 .map_io = realview_pbx_map_io, 400 .map_io = realview_pbx_map_io,
405 .init_early = realview_init_early, 401 .init_early = realview_init_early,
406 .init_irq = gic_init_irq, 402 .init_irq = gic_init_irq,
407 .timer = &realview_pbx_timer, 403 .init_time = realview_pbx_timer_init,
408 .handle_irq = gic_handle_irq,
409 .init_machine = realview_pbx_init, 404 .init_machine = realview_pbx_init,
410#ifdef CONFIG_ZONE_DMA 405#ifdef CONFIG_ZONE_DMA
411 .dma_zone_size = SZ_256M, 406 .dma_zone_size = SZ_256M,
diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c
index f3fa259ce01f..a302cf5e0fc7 100644
--- a/arch/arm/mach-rpc/riscpc.c
+++ b/arch/arm/mach-rpc/riscpc.c
@@ -211,7 +211,7 @@ static void rpc_restart(char mode, const char *cmd)
211 soft_restart(0); 211 soft_restart(0);
212} 212}
213 213
214extern struct sys_timer ioc_timer; 214void ioc_timer_init(void);
215 215
216MACHINE_START(RISCPC, "Acorn-RiscPC") 216MACHINE_START(RISCPC, "Acorn-RiscPC")
217 /* Maintainer: Russell King */ 217 /* Maintainer: Russell King */
@@ -220,6 +220,6 @@ MACHINE_START(RISCPC, "Acorn-RiscPC")
220 .reserve_lp1 = 1, 220 .reserve_lp1 = 1,
221 .map_io = rpc_map_io, 221 .map_io = rpc_map_io,
222 .init_irq = rpc_init_irq, 222 .init_irq = rpc_init_irq,
223 .timer = &ioc_timer, 223 .init_time = ioc_timer_init,
224 .restart = rpc_restart, 224 .restart = rpc_restart,
225MACHINE_END 225MACHINE_END
diff --git a/arch/arm/mach-rpc/time.c b/arch/arm/mach-rpc/time.c
index 581fca934bb3..9a6def14df01 100644
--- a/arch/arm/mach-rpc/time.c
+++ b/arch/arm/mach-rpc/time.c
@@ -24,7 +24,7 @@
24 24
25#include <asm/mach/time.h> 25#include <asm/mach/time.h>
26 26
27unsigned long ioc_timer_gettimeoffset(void) 27static u32 ioc_timer_gettimeoffset(void)
28{ 28{
29 unsigned int count1, count2, status; 29 unsigned int count1, count2, status;
30 long offset; 30 long offset;
@@ -56,7 +56,7 @@ unsigned long ioc_timer_gettimeoffset(void)
56 } 56 }
57 57
58 offset = (LATCH - offset) * (tick_nsec / 1000); 58 offset = (LATCH - offset) * (tick_nsec / 1000);
59 return (offset + LATCH/2) / LATCH; 59 return ((offset + LATCH/2) / LATCH) * 1000;
60} 60}
61 61
62void __init ioctime_init(void) 62void __init ioctime_init(void)
@@ -82,14 +82,9 @@ static struct irqaction ioc_timer_irq = {
82/* 82/*
83 * Set up timer interrupt. 83 * Set up timer interrupt.
84 */ 84 */
85static void __init ioc_timer_init(void) 85void __init ioc_timer_init(void)
86{ 86{
87 arch_gettimeoffset = ioc_timer_gettimeoffset;
87 ioctime_init(); 88 ioctime_init();
88 setup_irq(IRQ_TIMER0, &ioc_timer_irq); 89 setup_irq(IRQ_TIMER0, &ioc_timer_irq);
89} 90}
90
91struct sys_timer ioc_timer = {
92 .init = ioc_timer_init,
93 .offset = ioc_timer_gettimeoffset,
94};
95
diff --git a/arch/arm/mach-s3c2440/Makefile b/arch/arm/mach-s3c2440/Makefile
index c46092439814..0ddd17fa067e 100644
--- a/arch/arm/mach-s3c2440/Makefile
+++ b/arch/arm/mach-s3c2440/Makefile
@@ -9,8 +9,6 @@ obj-m :=
9obj-n := 9obj-n :=
10obj- := 10obj- :=
11 11
12obj-$(CONFIG_CPU_S3C2440) += dsc.o
13
14obj-$(CONFIG_S3C2440_CPUFREQ) += s3c2440-cpufreq.o 12obj-$(CONFIG_S3C2440_CPUFREQ) += s3c2440-cpufreq.o
15 13
16obj-$(CONFIG_S3C2440_PLL_12000000) += s3c2440-pll-12000000.o 14obj-$(CONFIG_S3C2440_PLL_12000000) += s3c2440-pll-12000000.o
diff --git a/arch/arm/mach-s3c2440/dsc.c b/arch/arm/mach-s3c2440/dsc.c
deleted file mode 100644
index 9ea66e31f626..000000000000
--- a/arch/arm/mach-s3c2440/dsc.c
+++ /dev/null
@@ -1,54 +0,0 @@
1/* linux/arch/arm/mach-s3c2440/dsc.c
2 *
3 * Copyright (c) 2004-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Samsung S3C2440 Drive Strength Control support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#include <linux/kernel.h>
14#include <linux/types.h>
15#include <linux/interrupt.h>
16#include <linux/init.h>
17#include <linux/module.h>
18#include <linux/io.h>
19
20#include <asm/mach/arch.h>
21#include <asm/mach/map.h>
22#include <asm/mach/irq.h>
23
24#include <mach/hardware.h>
25#include <asm/irq.h>
26
27#include <mach/regs-gpio.h>
28#include <mach/regs-dsc.h>
29
30#include <plat/cpu.h>
31#include <plat/s3c244x.h>
32
33int s3c2440_set_dsc(unsigned int pin, unsigned int value)
34{
35 void __iomem *base;
36 unsigned long val;
37 unsigned long flags;
38 unsigned long mask;
39
40 base = (pin & S3C2440_SELECT_DSC1) ? S3C2440_DSC1 : S3C2440_DSC0;
41 mask = 3 << S3C2440_DSC_GETSHIFT(pin);
42
43 local_irq_save(flags);
44
45 val = __raw_readl(base);
46 val &= ~mask;
47 val |= value & mask;
48 __raw_writel(val, base);
49
50 local_irq_restore(flags);
51 return 0;
52}
53
54EXPORT_SYMBOL(s3c2440_set_dsc);
diff --git a/arch/arm/mach-s3c24xx/anubis.h b/arch/arm/mach-s3c24xx/anubis.h
new file mode 100644
index 000000000000..2691665f27d9
--- /dev/null
+++ b/arch/arm/mach-s3c24xx/anubis.h
@@ -0,0 +1,53 @@
1/*
2 * Copyright (c) 2005 Simtec Electronics
3 * http://www.simtec.co.uk/products/
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * ANUBIS - CPLD control constants
7 * ANUBIS - IRQ Number definitions
8 * ANUBIS - Memory map 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 __MACH_S3C24XX_ANUBIS_H
16#define __MACH_S3C24XX_ANUBIS_H __FILE__
17
18/* CTRL2 - NAND WP control, IDE Reset assert/check */
19
20#define ANUBIS_CTRL1_NANDSEL (0x3)
21
22/* IDREG - revision */
23
24#define ANUBIS_IDREG_REVMASK (0x7)
25
26/* irq */
27
28#define ANUBIS_IRQ_IDE0 IRQ_EINT2
29#define ANUBIS_IRQ_IDE1 IRQ_EINT3
30#define ANUBIS_IRQ_ASIX IRQ_EINT1
31
32/* map */
33
34/* start peripherals off after the S3C2410 */
35
36#define ANUBIS_IOADDR(x) (S3C2410_ADDR((x) + 0x01800000))
37
38#define ANUBIS_PA_CPLD (S3C2410_CS1 | (1<<26))
39
40/* we put the CPLD registers next, to get them out of the way */
41
42#define ANUBIS_VA_CTRL1 ANUBIS_IOADDR(0x00000000)
43#define ANUBIS_PA_CTRL1 ANUBIS_PA_CPLD
44
45#define ANUBIS_VA_IDREG ANUBIS_IOADDR(0x00300000)
46#define ANUBIS_PA_IDREG (ANUBIS_PA_CPLD + (3 << 23))
47
48#define ANUBIS_IDEPRI ANUBIS_IOADDR(0x01000000)
49#define ANUBIS_IDEPRIAUX ANUBIS_IOADDR(0x01100000)
50#define ANUBIS_IDESEC ANUBIS_IOADDR(0x01200000)
51#define ANUBIS_IDESECAUX ANUBIS_IOADDR(0x01300000)
52
53#endif /* __MACH_S3C24XX_ANUBIS_H */
diff --git a/arch/arm/mach-s3c24xx/bast-ide.c b/arch/arm/mach-s3c24xx/bast-ide.c
index ba02cf8d80a2..3f0288f2f542 100644
--- a/arch/arm/mach-s3c24xx/bast-ide.c
+++ b/arch/arm/mach-s3c24xx/bast-ide.c
@@ -25,8 +25,8 @@
25#include <asm/mach/irq.h> 25#include <asm/mach/irq.h>
26 26
27#include <mach/map.h> 27#include <mach/map.h>
28#include <mach/bast-map.h> 28
29#include <mach/bast-irq.h> 29#include "bast.h"
30 30
31/* IDE ports */ 31/* IDE ports */
32 32
@@ -34,12 +34,10 @@ static struct pata_platform_info bast_ide_platdata = {
34 .ioport_shift = 5, 34 .ioport_shift = 5,
35}; 35};
36 36
37#define IDE_CS S3C2410_CS5
38
39static struct resource bast_ide0_resource[] = { 37static struct resource bast_ide0_resource[] = {
40 [0] = DEFINE_RES_MEM(IDE_CS + BAST_PA_IDEPRI, 8 * 0x20), 38 [0] = DEFINE_RES_MEM(BAST_IDE_CS + BAST_PA_IDEPRI, 8 * 0x20),
41 [1] = DEFINE_RES_MEM(IDE_CS + BAST_PA_IDEPRIAUX + (6 * 0x20), 0x20), 39 [1] = DEFINE_RES_MEM(BAST_IDE_CS + BAST_PA_IDEPRIAUX + (6 * 0x20), 0x20),
42 [2] = DEFINE_RES_IRQ(IRQ_IDE0), 40 [2] = DEFINE_RES_IRQ(BAST_IRQ_IDE0),
43}; 41};
44 42
45static struct platform_device bast_device_ide0 = { 43static struct platform_device bast_device_ide0 = {
@@ -55,9 +53,9 @@ static struct platform_device bast_device_ide0 = {
55}; 53};
56 54
57static struct resource bast_ide1_resource[] = { 55static struct resource bast_ide1_resource[] = {
58 [0] = DEFINE_RES_MEM(IDE_CS + BAST_PA_IDESEC, 8 * 0x20), 56 [0] = DEFINE_RES_MEM(BAST_IDE_CS + BAST_PA_IDESEC, 8 * 0x20),
59 [1] = DEFINE_RES_MEM(IDE_CS + BAST_PA_IDESECAUX + (6 * 0x20), 0x20), 57 [1] = DEFINE_RES_MEM(BAST_IDE_CS + BAST_PA_IDESECAUX + (6 * 0x20), 0x20),
60 [2] = DEFINE_RES_IRQ(IRQ_IDE1), 58 [2] = DEFINE_RES_IRQ(BAST_IRQ_IDE1),
61}; 59};
62 60
63static struct platform_device bast_device_ide1 = { 61static struct platform_device bast_device_ide1 = {
diff --git a/arch/arm/mach-s3c24xx/bast-irq.c b/arch/arm/mach-s3c24xx/bast-irq.c
index ac7b2ad5c405..c0daa9590b4c 100644
--- a/arch/arm/mach-s3c24xx/bast-irq.c
+++ b/arch/arm/mach-s3c24xx/bast-irq.c
@@ -27,27 +27,20 @@
27#include <linux/device.h> 27#include <linux/device.h>
28#include <linux/io.h> 28#include <linux/io.h>
29 29
30#include <asm/mach-types.h>
31
32#include <mach/hardware.h>
33#include <asm/irq.h> 30#include <asm/irq.h>
34 31#include <asm/mach-types.h>
35#include <asm/mach/irq.h> 32#include <asm/mach/irq.h>
36 33
34#include <mach/hardware.h>
37#include <mach/regs-irq.h> 35#include <mach/regs-irq.h>
38#include <mach/bast-map.h>
39#include <mach/bast-irq.h>
40 36
41#include <plat/irq.h> 37#include <plat/irq.h>
42 38
43#if 0 39#include "bast.h"
44#include <asm/debug-ll.h>
45#endif
46 40
47#define irqdbf(x...) 41#define irqdbf(x...)
48#define irqdbf2(x...) 42#define irqdbf2(x...)
49 43
50
51/* handle PC104 ISA interrupts from the system CPLD */ 44/* handle PC104 ISA interrupts from the system CPLD */
52 45
53/* table of ISA irq nos to the relevant mask... zero means 46/* table of ISA irq nos to the relevant mask... zero means
@@ -87,7 +80,7 @@ bast_pc104_mask(struct irq_data *data)
87static void 80static void
88bast_pc104_maskack(struct irq_data *data) 81bast_pc104_maskack(struct irq_data *data)
89{ 82{
90 struct irq_desc *desc = irq_desc + IRQ_ISA; 83 struct irq_desc *desc = irq_desc + BAST_IRQ_ISA;
91 84
92 bast_pc104_mask(data); 85 bast_pc104_mask(data);
93 desc->irq_data.chip->irq_ack(&desc->irq_data); 86 desc->irq_data.chip->irq_ack(&desc->irq_data);
@@ -122,7 +115,7 @@ bast_irq_pc104_demux(unsigned int irq,
122 if (unlikely(stat == 0)) { 115 if (unlikely(stat == 0)) {
123 /* ack if we get an irq with nothing (ie, startup) */ 116 /* ack if we get an irq with nothing (ie, startup) */
124 117
125 desc = irq_desc + IRQ_ISA; 118 desc = irq_desc + BAST_IRQ_ISA;
126 desc->irq_data.chip->irq_ack(&desc->irq_data); 119 desc->irq_data.chip->irq_ack(&desc->irq_data);
127 } else { 120 } else {
128 /* handle the IRQ */ 121 /* handle the IRQ */
@@ -147,7 +140,7 @@ static __init int bast_irq_init(void)
147 140
148 __raw_writeb(0x0, BAST_VA_PC104_IRQMASK); 141 __raw_writeb(0x0, BAST_VA_PC104_IRQMASK);
149 142
150 irq_set_chained_handler(IRQ_ISA, bast_irq_pc104_demux); 143 irq_set_chained_handler(BAST_IRQ_ISA, bast_irq_pc104_demux);
151 144
152 /* register our IRQs */ 145 /* register our IRQs */
153 146
diff --git a/arch/arm/mach-s3c24xx/bast.h b/arch/arm/mach-s3c24xx/bast.h
new file mode 100644
index 000000000000..5c7534bae92d
--- /dev/null
+++ b/arch/arm/mach-s3c24xx/bast.h
@@ -0,0 +1,197 @@
1/*
2 * Copyright (c) 2003-2004 Simtec Electronics
3 * Ben Dooks <ben@simtec.co.uk>
4 *
5 * BAST - CPLD control constants
6 * BAST - IRQ Number definitions
7 * BAST - Memory map definitions
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __MACH_S3C24XX_BAST_H
15#define __MACH_S3C24XX_BAST_H __FILE__
16
17/* CTRL1 - Audio LR routing */
18
19#define BAST_CPLD_CTRL1_LRCOFF (0x00)
20#define BAST_CPLD_CTRL1_LRCADC (0x01)
21#define BAST_CPLD_CTRL1_LRCDAC (0x02)
22#define BAST_CPLD_CTRL1_LRCARM (0x03)
23#define BAST_CPLD_CTRL1_LRMASK (0x03)
24
25/* CTRL2 - NAND WP control, IDE Reset assert/check */
26
27#define BAST_CPLD_CTRL2_WNAND (0x04)
28#define BAST_CPLD_CTLR2_IDERST (0x08)
29
30/* CTRL3 - rom write control, CPLD identity */
31
32#define BAST_CPLD_CTRL3_IDMASK (0x0e)
33#define BAST_CPLD_CTRL3_ROMWEN (0x01)
34
35/* CTRL4 - 8bit LCD interface control/status */
36
37#define BAST_CPLD_CTRL4_LLAT (0x01)
38#define BAST_CPLD_CTRL4_LCDRW (0x02)
39#define BAST_CPLD_CTRL4_LCDCMD (0x04)
40#define BAST_CPLD_CTRL4_LCDE2 (0x01)
41
42/* CTRL5 - DMA routing */
43
44#define BAST_CPLD_DMA0_PRIIDE (0)
45#define BAST_CPLD_DMA0_SECIDE (1)
46#define BAST_CPLD_DMA0_ISA15 (2)
47#define BAST_CPLD_DMA0_ISA36 (3)
48
49#define BAST_CPLD_DMA1_PRIIDE (0 << 2)
50#define BAST_CPLD_DMA1_SECIDE (1 << 2)
51#define BAST_CPLD_DMA1_ISA15 (2 << 2)
52#define BAST_CPLD_DMA1_ISA36 (3 << 2)
53
54/* irq numbers to onboard peripherals */
55
56#define BAST_IRQ_USBOC IRQ_EINT18
57#define BAST_IRQ_IDE0 IRQ_EINT16
58#define BAST_IRQ_IDE1 IRQ_EINT17
59#define BAST_IRQ_PCSERIAL1 IRQ_EINT15
60#define BAST_IRQ_PCSERIAL2 IRQ_EINT14
61#define BAST_IRQ_PCPARALLEL IRQ_EINT13
62#define BAST_IRQ_ASIX IRQ_EINT11
63#define BAST_IRQ_DM9000 IRQ_EINT10
64#define BAST_IRQ_ISA IRQ_EINT9
65#define BAST_IRQ_SMALERT IRQ_EINT8
66
67/* map */
68
69/*
70 * ok, we've used up to 0x13000000, now we need to find space for the
71 * peripherals that live in the nGCS[x] areas, which are quite numerous
72 * in their space. We also have the board's CPLD to find register space
73 * for.
74 */
75
76#define BAST_IOADDR(x) (S3C2410_ADDR((x) + 0x01300000))
77
78/* we put the CPLD registers next, to get them out of the way */
79
80#define BAST_VA_CTRL1 BAST_IOADDR(0x00000000)
81#define BAST_PA_CTRL1 (S3C2410_CS5 | 0x7800000)
82
83#define BAST_VA_CTRL2 BAST_IOADDR(0x00100000)
84#define BAST_PA_CTRL2 (S3C2410_CS1 | 0x6000000)
85
86#define BAST_VA_CTRL3 BAST_IOADDR(0x00200000)
87#define BAST_PA_CTRL3 (S3C2410_CS1 | 0x6800000)
88
89#define BAST_VA_CTRL4 BAST_IOADDR(0x00300000)
90#define BAST_PA_CTRL4 (S3C2410_CS1 | 0x7000000)
91
92/* next, we have the PC104 ISA interrupt registers */
93
94#define BAST_PA_PC104_IRQREQ (S3C2410_CS5 | 0x6000000)
95#define BAST_VA_PC104_IRQREQ BAST_IOADDR(0x00400000)
96
97#define BAST_PA_PC104_IRQRAW (S3C2410_CS5 | 0x6800000)
98#define BAST_VA_PC104_IRQRAW BAST_IOADDR(0x00500000)
99
100#define BAST_PA_PC104_IRQMASK (S3C2410_CS5 | 0x7000000)
101#define BAST_VA_PC104_IRQMASK BAST_IOADDR(0x00600000)
102
103#define BAST_PA_LCD_RCMD1 (0x8800000)
104#define BAST_VA_LCD_RCMD1 BAST_IOADDR(0x00700000)
105
106#define BAST_PA_LCD_WCMD1 (0x8000000)
107#define BAST_VA_LCD_WCMD1 BAST_IOADDR(0x00800000)
108
109#define BAST_PA_LCD_RDATA1 (0x9800000)
110#define BAST_VA_LCD_RDATA1 BAST_IOADDR(0x00900000)
111
112#define BAST_PA_LCD_WDATA1 (0x9000000)
113#define BAST_VA_LCD_WDATA1 BAST_IOADDR(0x00A00000)
114
115#define BAST_PA_LCD_RCMD2 (0xA800000)
116#define BAST_VA_LCD_RCMD2 BAST_IOADDR(0x00B00000)
117
118#define BAST_PA_LCD_WCMD2 (0xA000000)
119#define BAST_VA_LCD_WCMD2 BAST_IOADDR(0x00C00000)
120
121#define BAST_PA_LCD_RDATA2 (0xB800000)
122#define BAST_VA_LCD_RDATA2 BAST_IOADDR(0x00D00000)
123
124#define BAST_PA_LCD_WDATA2 (0xB000000)
125#define BAST_VA_LCD_WDATA2 BAST_IOADDR(0x00E00000)
126
127
128/*
129 * 0xE0000000 contains the IO space that is split by speed and
130 * whether the access is for 8 or 16bit IO... this ensures that
131 * the correct access is made
132 *
133 * 0x10000000 of space, partitioned as so:
134 *
135 * 0x00000000 to 0x04000000 8bit, slow
136 * 0x04000000 to 0x08000000 16bit, slow
137 * 0x08000000 to 0x0C000000 16bit, net
138 * 0x0C000000 to 0x10000000 16bit, fast
139 *
140 * each of these spaces has the following in:
141 *
142 * 0x00000000 to 0x01000000 16MB ISA IO space
143 * 0x01000000 to 0x02000000 16MB ISA memory space
144 * 0x02000000 to 0x02100000 1MB IDE primary channel
145 * 0x02100000 to 0x02200000 1MB IDE primary channel aux
146 * 0x02200000 to 0x02400000 1MB IDE secondary channel
147 * 0x02300000 to 0x02400000 1MB IDE secondary channel aux
148 * 0x02400000 to 0x02500000 1MB ASIX ethernet controller
149 * 0x02500000 to 0x02600000 1MB Davicom DM9000 ethernet controller
150 * 0x02600000 to 0x02700000 1MB PC SuperIO controller
151 *
152 * the phyiscal layout of the zones are:
153 * nGCS2 - 8bit, slow
154 * nGCS3 - 16bit, slow
155 * nGCS4 - 16bit, net
156 * nGCS5 - 16bit, fast
157 */
158
159#define BAST_VA_MULTISPACE (0xE0000000)
160
161#define BAST_VA_ISAIO (BAST_VA_MULTISPACE + 0x00000000)
162#define BAST_VA_ISAMEM (BAST_VA_MULTISPACE + 0x01000000)
163#define BAST_VA_IDEPRI (BAST_VA_MULTISPACE + 0x02000000)
164#define BAST_VA_IDEPRIAUX (BAST_VA_MULTISPACE + 0x02100000)
165#define BAST_VA_IDESEC (BAST_VA_MULTISPACE + 0x02200000)
166#define BAST_VA_IDESECAUX (BAST_VA_MULTISPACE + 0x02300000)
167#define BAST_VA_ASIXNET (BAST_VA_MULTISPACE + 0x02400000)
168#define BAST_VA_DM9000 (BAST_VA_MULTISPACE + 0x02500000)
169#define BAST_VA_SUPERIO (BAST_VA_MULTISPACE + 0x02600000)
170
171#define BAST_VAM_CS2 (0x00000000)
172#define BAST_VAM_CS3 (0x04000000)
173#define BAST_VAM_CS4 (0x08000000)
174#define BAST_VAM_CS5 (0x0C000000)
175
176/* physical offset addresses for the peripherals */
177
178#define BAST_PA_ISAIO (0x00000000)
179#define BAST_PA_ASIXNET (0x01000000)
180#define BAST_PA_SUPERIO (0x01800000)
181#define BAST_PA_IDEPRI (0x02000000)
182#define BAST_PA_IDEPRIAUX (0x02800000)
183#define BAST_PA_IDESEC (0x03000000)
184#define BAST_PA_IDESECAUX (0x03800000)
185#define BAST_PA_ISAMEM (0x04000000)
186#define BAST_PA_DM9000 (0x05000000)
187
188/* some configurations for the peripherals */
189
190#define BAST_PCSIO (BAST_VA_SUPERIO + BAST_VAM_CS2)
191
192#define BAST_ASIXNET_CS BAST_VAM_CS5
193#define BAST_DM9000_CS BAST_VAM_CS4
194
195#define BAST_IDE_CS S3C2410_CS5
196
197#endif /* __MACH_S3C24XX_BAST_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/gta02.h b/arch/arm/mach-s3c24xx/gta02.h
index 217393482153..9430a71e9184 100644
--- a/arch/arm/mach-s3c24xx/include/mach/gta02.h
+++ b/arch/arm/mach-s3c24xx/gta02.h
@@ -1,5 +1,13 @@
1#ifndef _GTA02_H 1/*
2#define _GTA02_H 2 * GTA02 header
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7*/
8
9#ifndef __MACH_S3C24XX_GTA02_H
10#define __MACH_S3C24XX_GTA02_H __FILE__
3 11
4#include <mach/regs-gpio.h> 12#include <mach/regs-gpio.h>
5 13
@@ -12,4 +20,4 @@
12 20
13#define GTA02_IRQ_PCF50633 IRQ_EINT9 21#define GTA02_IRQ_PCF50633 IRQ_EINT9
14 22
15#endif /* _GTA02_H */ 23#endif /* __MACH_S3C24XX_GTA02_H */
diff --git a/arch/arm/mach-s3c24xx/h1940-bluetooth.c b/arch/arm/mach-s3c24xx/h1940-bluetooth.c
index 57aee916bdb1..5b98bfd1df43 100644
--- a/arch/arm/mach-s3c24xx/h1940-bluetooth.c
+++ b/arch/arm/mach-s3c24xx/h1940-bluetooth.c
@@ -19,10 +19,10 @@
19#include <linux/gpio.h> 19#include <linux/gpio.h>
20#include <linux/rfkill.h> 20#include <linux/rfkill.h>
21 21
22#include <mach/regs-gpio.h>
23#include <mach/hardware.h> 22#include <mach/hardware.h>
24#include <mach/h1940-latch.h> 23#include <mach/regs-gpio.h>
25#include <mach/h1940.h> 24
25#include "h1940.h"
26 26
27#define DRV_NAME "h1940-bt" 27#define DRV_NAME "h1940-bt"
28 28
@@ -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/include/mach/h1940-latch.h b/arch/arm/mach-s3c24xx/h1940.h
index fc897d3a056c..2950cc466840 100644
--- a/arch/arm/mach-s3c24xx/include/mach/h1940-latch.h
+++ b/arch/arm/mach-s3c24xx/h1940.h
@@ -1,20 +1,30 @@
1/* arch/arm/mach-s3c2410/include/mach/h1940-latch.h 1/*
2 * Copyright 2006 Ben Dooks <ben-linux@fluff.org>
2 * 3 *
3 * Copyright (c) 2005 Simtec Electronics 4 * Copyright (c) 2005 Simtec Electronics
4 * http://armlinux.simtec.co.uk/ 5 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk> 6 * Ben Dooks <ben@simtec.co.uk>
6 * 7 *
7 * iPAQ H1940 series - latch definitions 8 * iPAQ H1940 series definitions
8 * 9 *
9 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as 11 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
12*/ 13*/
13 14
14#ifndef __ASM_ARCH_H1940_LATCH_H 15#ifndef __MACH_S3C24XX_H1940_H
15#define __ASM_ARCH_H1940_LATCH_H 16#define __MACH_S3C24XX_H1940_H __FILE__
16 17
17#include <asm/gpio.h> 18#define H1940_SUSPEND_CHECKSUM (0x30003ff8)
19#define H1940_SUSPEND_RESUMEAT (0x30081000)
20#define H1940_SUSPEND_CHECK (0x30080000)
21
22extern void h1940_pm_return(void);
23extern int h1940_led_blink_set(unsigned gpio, int state,
24 unsigned long *delay_on,
25 unsigned long *delay_off);
26
27#include <linux/gpio.h>
18 28
19#define H1940_LATCH_GPIO(x) (S3C_GPIO_END + (x)) 29#define H1940_LATCH_GPIO(x) (S3C_GPIO_END + (x))
20 30
@@ -40,4 +50,4 @@
40#define H1940_LATCH_LED_GREEN H1940_LATCH_GPIO(14) 50#define H1940_LATCH_LED_GREEN H1940_LATCH_GPIO(14)
41#define H1940_LATCH_LED_FLASH H1940_LATCH_GPIO(15) 51#define H1940_LATCH_LED_FLASH H1940_LATCH_GPIO(15)
42 52
43#endif /* __ASM_ARCH_H1940_LATCH_H */ 53#endif /* __MACH_S3C24XX_H1940_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/anubis-cpld.h b/arch/arm/mach-s3c24xx/include/mach/anubis-cpld.h
deleted file mode 100644
index 1b614d5a81f3..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/anubis-cpld.h
+++ /dev/null
@@ -1,25 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/anubis-cpld.h
2 *
3 * Copyright (c) 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * ANUBIS - CPLD control constants
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_ANUBISCPLD_H
15#define __ASM_ARCH_ANUBISCPLD_H
16
17/* CTRL2 - NAND WP control, IDE Reset assert/check */
18
19#define ANUBIS_CTRL1_NANDSEL (0x3)
20
21/* IDREG - revision */
22
23#define ANUBIS_IDREG_REVMASK (0x7)
24
25#endif /* __ASM_ARCH_ANUBISCPLD_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/anubis-irq.h b/arch/arm/mach-s3c24xx/include/mach/anubis-irq.h
deleted file mode 100644
index a2a328134e34..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/anubis-irq.h
+++ /dev/null
@@ -1,21 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/anubis-irq.h
2 *
3 * Copyright (c) 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * ANUBIS - IRQ Number definitions
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_ANUBISIRQ_H
15#define __ASM_ARCH_ANUBISIRQ_H
16
17#define IRQ_IDE0 IRQ_EINT2
18#define IRQ_IDE1 IRQ_EINT3
19#define IRQ_ASIX IRQ_EINT1
20
21#endif /* __ASM_ARCH_ANUBISIRQ_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/anubis-map.h b/arch/arm/mach-s3c24xx/include/mach/anubis-map.h
deleted file mode 100644
index c9deb3a5b2c3..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/anubis-map.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/anubis-map.h
2 *
3 * Copyright (c) 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * ANUBIS - Memory map definitions
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14/* needs arch/map.h including with this */
15
16#ifndef __ASM_ARCH_ANUBISMAP_H
17#define __ASM_ARCH_ANUBISMAP_H
18
19/* start peripherals off after the S3C2410 */
20
21#define ANUBIS_IOADDR(x) (S3C2410_ADDR((x) + 0x01800000))
22
23#define ANUBIS_PA_CPLD (S3C2410_CS1 | (1<<26))
24
25/* we put the CPLD registers next, to get them out of the way */
26
27#define ANUBIS_VA_CTRL1 ANUBIS_IOADDR(0x00000000) /* 0x01800000 */
28#define ANUBIS_PA_CTRL1 (ANUBIS_PA_CPLD)
29
30#define ANUBIS_VA_IDREG ANUBIS_IOADDR(0x00300000) /* 0x01B00000 */
31#define ANUBIS_PA_IDREG (ANUBIS_PA_CPLD + (3<<23))
32
33#define ANUBIS_IDEPRI ANUBIS_IOADDR(0x01000000)
34#define ANUBIS_IDEPRIAUX ANUBIS_IOADDR(0x01100000)
35#define ANUBIS_IDESEC ANUBIS_IOADDR(0x01200000)
36#define ANUBIS_IDESECAUX ANUBIS_IOADDR(0x01300000)
37
38#endif /* __ASM_ARCH_ANUBISMAP_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/bast-cpld.h b/arch/arm/mach-s3c24xx/include/mach/bast-cpld.h
deleted file mode 100644
index bee2a7a932a0..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/bast-cpld.h
+++ /dev/null
@@ -1,53 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/bast-cpld.h
2 *
3 * Copyright (c) 2003-2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * BAST - CPLD control constants
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_BASTCPLD_H
14#define __ASM_ARCH_BASTCPLD_H
15
16/* CTRL1 - Audio LR routing */
17
18#define BAST_CPLD_CTRL1_LRCOFF (0x00)
19#define BAST_CPLD_CTRL1_LRCADC (0x01)
20#define BAST_CPLD_CTRL1_LRCDAC (0x02)
21#define BAST_CPLD_CTRL1_LRCARM (0x03)
22#define BAST_CPLD_CTRL1_LRMASK (0x03)
23
24/* CTRL2 - NAND WP control, IDE Reset assert/check */
25
26#define BAST_CPLD_CTRL2_WNAND (0x04)
27#define BAST_CPLD_CTLR2_IDERST (0x08)
28
29/* CTRL3 - rom write control, CPLD identity */
30
31#define BAST_CPLD_CTRL3_IDMASK (0x0e)
32#define BAST_CPLD_CTRL3_ROMWEN (0x01)
33
34/* CTRL4 - 8bit LCD interface control/status */
35
36#define BAST_CPLD_CTRL4_LLAT (0x01)
37#define BAST_CPLD_CTRL4_LCDRW (0x02)
38#define BAST_CPLD_CTRL4_LCDCMD (0x04)
39#define BAST_CPLD_CTRL4_LCDE2 (0x01)
40
41/* CTRL5 - DMA routing */
42
43#define BAST_CPLD_DMA0_PRIIDE (0<<0)
44#define BAST_CPLD_DMA0_SECIDE (1<<0)
45#define BAST_CPLD_DMA0_ISA15 (2<<0)
46#define BAST_CPLD_DMA0_ISA36 (3<<0)
47
48#define BAST_CPLD_DMA1_PRIIDE (0<<2)
49#define BAST_CPLD_DMA1_SECIDE (1<<2)
50#define BAST_CPLD_DMA1_ISA15 (2<<2)
51#define BAST_CPLD_DMA1_ISA36 (3<<2)
52
53#endif /* __ASM_ARCH_BASTCPLD_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/bast-irq.h b/arch/arm/mach-s3c24xx/include/mach/bast-irq.h
deleted file mode 100644
index cac428c42e7f..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/bast-irq.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/bast-irq.h
2 *
3 * Copyright (c) 2003-2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Machine BAST - IRQ Number definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_BASTIRQ_H
14#define __ASM_ARCH_BASTIRQ_H
15
16/* irq numbers to onboard peripherals */
17
18#define IRQ_USBOC IRQ_EINT18
19#define IRQ_IDE0 IRQ_EINT16
20#define IRQ_IDE1 IRQ_EINT17
21#define IRQ_PCSERIAL1 IRQ_EINT15
22#define IRQ_PCSERIAL2 IRQ_EINT14
23#define IRQ_PCPARALLEL IRQ_EINT13
24#define IRQ_ASIX IRQ_EINT11
25#define IRQ_DM9000 IRQ_EINT10
26#define IRQ_ISA IRQ_EINT9
27#define IRQ_SMALERT IRQ_EINT8
28
29#endif /* __ASM_ARCH_BASTIRQ_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/bast-map.h b/arch/arm/mach-s3c24xx/include/mach/bast-map.h
deleted file mode 100644
index eecea2a50f8f..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/bast-map.h
+++ /dev/null
@@ -1,146 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/bast-map.h
2 *
3 * Copyright (c) 2003-2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Machine BAST - Memory map definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13/* needs arch/map.h including with this */
14
15/* ok, we've used up to 0x13000000, now we need to find space for the
16 * peripherals that live in the nGCS[x] areas, which are quite numerous
17 * in their space. We also have the board's CPLD to find register space
18 * for.
19 */
20
21#ifndef __ASM_ARCH_BASTMAP_H
22#define __ASM_ARCH_BASTMAP_H
23
24#define BAST_IOADDR(x) (S3C2410_ADDR((x) + 0x01300000))
25
26/* we put the CPLD registers next, to get them out of the way */
27
28#define BAST_VA_CTRL1 BAST_IOADDR(0x00000000) /* 0x01300000 */
29#define BAST_PA_CTRL1 (S3C2410_CS5 | 0x7800000)
30
31#define BAST_VA_CTRL2 BAST_IOADDR(0x00100000) /* 0x01400000 */
32#define BAST_PA_CTRL2 (S3C2410_CS1 | 0x6000000)
33
34#define BAST_VA_CTRL3 BAST_IOADDR(0x00200000) /* 0x01500000 */
35#define BAST_PA_CTRL3 (S3C2410_CS1 | 0x6800000)
36
37#define BAST_VA_CTRL4 BAST_IOADDR(0x00300000) /* 0x01600000 */
38#define BAST_PA_CTRL4 (S3C2410_CS1 | 0x7000000)
39
40/* next, we have the PC104 ISA interrupt registers */
41
42#define BAST_PA_PC104_IRQREQ (S3C2410_CS5 | 0x6000000) /* 0x01700000 */
43#define BAST_VA_PC104_IRQREQ BAST_IOADDR(0x00400000)
44
45#define BAST_PA_PC104_IRQRAW (S3C2410_CS5 | 0x6800000) /* 0x01800000 */
46#define BAST_VA_PC104_IRQRAW BAST_IOADDR(0x00500000)
47
48#define BAST_PA_PC104_IRQMASK (S3C2410_CS5 | 0x7000000) /* 0x01900000 */
49#define BAST_VA_PC104_IRQMASK BAST_IOADDR(0x00600000)
50
51#define BAST_PA_LCD_RCMD1 (0x8800000)
52#define BAST_VA_LCD_RCMD1 BAST_IOADDR(0x00700000)
53
54#define BAST_PA_LCD_WCMD1 (0x8000000)
55#define BAST_VA_LCD_WCMD1 BAST_IOADDR(0x00800000)
56
57#define BAST_PA_LCD_RDATA1 (0x9800000)
58#define BAST_VA_LCD_RDATA1 BAST_IOADDR(0x00900000)
59
60#define BAST_PA_LCD_WDATA1 (0x9000000)
61#define BAST_VA_LCD_WDATA1 BAST_IOADDR(0x00A00000)
62
63#define BAST_PA_LCD_RCMD2 (0xA800000)
64#define BAST_VA_LCD_RCMD2 BAST_IOADDR(0x00B00000)
65
66#define BAST_PA_LCD_WCMD2 (0xA000000)
67#define BAST_VA_LCD_WCMD2 BAST_IOADDR(0x00C00000)
68
69#define BAST_PA_LCD_RDATA2 (0xB800000)
70#define BAST_VA_LCD_RDATA2 BAST_IOADDR(0x00D00000)
71
72#define BAST_PA_LCD_WDATA2 (0xB000000)
73#define BAST_VA_LCD_WDATA2 BAST_IOADDR(0x00E00000)
74
75
76/* 0xE0000000 contains the IO space that is split by speed and
77 * whether the access is for 8 or 16bit IO... this ensures that
78 * the correct access is made
79 *
80 * 0x10000000 of space, partitioned as so:
81 *
82 * 0x00000000 to 0x04000000 8bit, slow
83 * 0x04000000 to 0x08000000 16bit, slow
84 * 0x08000000 to 0x0C000000 16bit, net
85 * 0x0C000000 to 0x10000000 16bit, fast
86 *
87 * each of these spaces has the following in:
88 *
89 * 0x00000000 to 0x01000000 16MB ISA IO space
90 * 0x01000000 to 0x02000000 16MB ISA memory space
91 * 0x02000000 to 0x02100000 1MB IDE primary channel
92 * 0x02100000 to 0x02200000 1MB IDE primary channel aux
93 * 0x02200000 to 0x02400000 1MB IDE secondary channel
94 * 0x02300000 to 0x02400000 1MB IDE secondary channel aux
95 * 0x02400000 to 0x02500000 1MB ASIX ethernet controller
96 * 0x02500000 to 0x02600000 1MB Davicom DM9000 ethernet controller
97 * 0x02600000 to 0x02700000 1MB PC SuperIO controller
98 *
99 * the phyiscal layout of the zones are:
100 * nGCS2 - 8bit, slow
101 * nGCS3 - 16bit, slow
102 * nGCS4 - 16bit, net
103 * nGCS5 - 16bit, fast
104 */
105
106#define BAST_VA_MULTISPACE (0xE0000000)
107
108#define BAST_VA_ISAIO (BAST_VA_MULTISPACE + 0x00000000)
109#define BAST_VA_ISAMEM (BAST_VA_MULTISPACE + 0x01000000)
110#define BAST_VA_IDEPRI (BAST_VA_MULTISPACE + 0x02000000)
111#define BAST_VA_IDEPRIAUX (BAST_VA_MULTISPACE + 0x02100000)
112#define BAST_VA_IDESEC (BAST_VA_MULTISPACE + 0x02200000)
113#define BAST_VA_IDESECAUX (BAST_VA_MULTISPACE + 0x02300000)
114#define BAST_VA_ASIXNET (BAST_VA_MULTISPACE + 0x02400000)
115#define BAST_VA_DM9000 (BAST_VA_MULTISPACE + 0x02500000)
116#define BAST_VA_SUPERIO (BAST_VA_MULTISPACE + 0x02600000)
117
118#define BAST_VA_MULTISPACE (0xE0000000)
119
120#define BAST_VAM_CS2 (0x00000000)
121#define BAST_VAM_CS3 (0x04000000)
122#define BAST_VAM_CS4 (0x08000000)
123#define BAST_VAM_CS5 (0x0C000000)
124
125/* physical offset addresses for the peripherals */
126
127#define BAST_PA_ISAIO (0x00000000)
128#define BAST_PA_ASIXNET (0x01000000)
129#define BAST_PA_SUPERIO (0x01800000)
130#define BAST_PA_IDEPRI (0x02000000)
131#define BAST_PA_IDEPRIAUX (0x02800000)
132#define BAST_PA_IDESEC (0x03000000)
133#define BAST_PA_IDESECAUX (0x03800000)
134#define BAST_PA_ISAMEM (0x04000000)
135#define BAST_PA_DM9000 (0x05000000)
136
137/* some configurations for the peripherals */
138
139#define BAST_PCSIO (BAST_VA_SUPERIO + BAST_VAM_CS2)
140/* */
141
142#define BAST_ASIXNET_CS BAST_VAM_CS5
143#define BAST_IDE_CS BAST_VAM_CS5
144#define BAST_DM9000_CS BAST_VAM_CS4
145
146#endif /* __ASM_ARCH_BASTMAP_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/gpio-fns.h b/arch/arm/mach-s3c24xx/include/mach/gpio-fns.h
deleted file mode 100644
index c53ad34c6579..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/gpio-fns.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <plat/gpio-fns.h>
diff --git a/arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h b/arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h
deleted file mode 100644
index 3890a05948fb..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h
+++ /dev/null
@@ -1,97 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/gpio-nrs.h
2 *
3 * Copyright (c) 2008 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * S3C2410 - GPIO bank numbering
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __MACH_GPIONRS_H
15#define __MACH_GPIONRS_H
16
17#define S3C2410_GPIONO(bank,offset) ((bank) + (offset))
18
19#define S3C2410_GPIO_BANKG (32*6)
20#define S3C2410_GPIO_BANKH (32*7)
21
22/* GPIO sizes for various SoCs:
23 *
24 * 2442
25 * 2410 2412 2440 2443 2416
26 * ---- ---- ---- ---- ----
27 * A 23 22 25 16 25
28 * B 11 11 11 11 9
29 * C 16 15 16 16 16
30 * D 16 16 16 16 16
31 * E 16 16 16 16 16
32 * F 8 8 8 8 8
33 * G 16 16 16 16 8
34 * H 11 11 9 15 15
35 * J -- -- 13 16 --
36 * K -- -- -- -- 16
37 * L -- -- -- 15 7
38 * M -- -- -- 2 2
39 */
40
41/* GPIO bank sizes */
42#define S3C2410_GPIO_A_NR (32)
43#define S3C2410_GPIO_B_NR (32)
44#define S3C2410_GPIO_C_NR (32)
45#define S3C2410_GPIO_D_NR (32)
46#define S3C2410_GPIO_E_NR (32)
47#define S3C2410_GPIO_F_NR (32)
48#define S3C2410_GPIO_G_NR (32)
49#define S3C2410_GPIO_H_NR (32)
50#define S3C2410_GPIO_J_NR (32) /* technically 16. */
51#define S3C2410_GPIO_K_NR (32) /* technically 16. */
52#define S3C2410_GPIO_L_NR (32) /* technically 15. */
53#define S3C2410_GPIO_M_NR (32) /* technically 2. */
54
55#if CONFIG_S3C_GPIO_SPACE != 0
56#error CONFIG_S3C_GPIO_SPACE cannot be nonzero at the moment
57#endif
58
59#define S3C2410_GPIO_NEXT(__gpio) \
60 ((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 0)
61
62#ifndef __ASSEMBLY__
63
64enum s3c_gpio_number {
65 S3C2410_GPIO_A_START = 0,
66 S3C2410_GPIO_B_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_A),
67 S3C2410_GPIO_C_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_B),
68 S3C2410_GPIO_D_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_C),
69 S3C2410_GPIO_E_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_D),
70 S3C2410_GPIO_F_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_E),
71 S3C2410_GPIO_G_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_F),
72 S3C2410_GPIO_H_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_G),
73 S3C2410_GPIO_J_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_H),
74 S3C2410_GPIO_K_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_J),
75 S3C2410_GPIO_L_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_K),
76 S3C2410_GPIO_M_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_L),
77};
78
79#endif /* __ASSEMBLY__ */
80
81/* S3C2410 GPIO number definitions. */
82
83#define S3C2410_GPA(_nr) (S3C2410_GPIO_A_START + (_nr))
84#define S3C2410_GPB(_nr) (S3C2410_GPIO_B_START + (_nr))
85#define S3C2410_GPC(_nr) (S3C2410_GPIO_C_START + (_nr))
86#define S3C2410_GPD(_nr) (S3C2410_GPIO_D_START + (_nr))
87#define S3C2410_GPE(_nr) (S3C2410_GPIO_E_START + (_nr))
88#define S3C2410_GPF(_nr) (S3C2410_GPIO_F_START + (_nr))
89#define S3C2410_GPG(_nr) (S3C2410_GPIO_G_START + (_nr))
90#define S3C2410_GPH(_nr) (S3C2410_GPIO_H_START + (_nr))
91#define S3C2410_GPJ(_nr) (S3C2410_GPIO_J_START + (_nr))
92#define S3C2410_GPK(_nr) (S3C2410_GPIO_K_START + (_nr))
93#define S3C2410_GPL(_nr) (S3C2410_GPIO_L_START + (_nr))
94#define S3C2410_GPM(_nr) (S3C2410_GPIO_M_START + (_nr))
95
96#endif /* __MACH_GPIONRS_H */
97
diff --git a/arch/arm/mach-s3c24xx/include/mach/gpio-track.h b/arch/arm/mach-s3c24xx/include/mach/gpio-track.h
deleted file mode 100644
index c410a078622c..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/gpio-track.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/* arch/arm/mach-s3c24100/include/mach/gpio-core.h
2 *
3 * Copyright 2008 Openmoko, Inc.
4 * Copyright 2008 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 * http://armlinux.simtec.co.uk/
7 *
8 * S3C2410 - GPIO core support
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_GPIO_CORE_H
16#define __ASM_ARCH_GPIO_CORE_H __FILE__
17
18#include <mach/regs-gpio.h>
19
20extern struct samsung_gpio_chip s3c24xx_gpios[];
21
22static inline struct samsung_gpio_chip *samsung_gpiolib_getchip(unsigned int pin)
23{
24 struct samsung_gpio_chip *chip;
25
26 if (pin > S3C_GPIO_END)
27 return NULL;
28
29 chip = &s3c24xx_gpios[pin/32];
30 return ((pin - chip->chip.base) < chip->chip.ngpio) ? chip : NULL;
31}
32
33#endif /* __ASM_ARCH_GPIO_CORE_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/gpio.h b/arch/arm/mach-s3c24xx/include/mach/gpio.h
index 6fac70f3484e..14591563ca70 100644
--- a/arch/arm/mach-s3c24xx/include/mach/gpio.h
+++ b/arch/arm/mach-s3c24xx/include/mach/gpio.h
@@ -1,5 +1,4 @@
1/* arch/arm/mach-s3c2410/include/mach/gpio.h 1/*
2 *
3 * Copyright (c) 2008 Simtec Electronics 2 * Copyright (c) 2008 Simtec Electronics
4 * http://armlinux.simtec.co.uk/ 3 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -15,6 +14,9 @@
15 * devices that need GPIO. 14 * devices that need GPIO.
16 */ 15 */
17 16
17#ifndef __MACH_GPIO_H
18#define __MACH_GPIO_H __FILE__
19
18#ifdef CONFIG_CPU_S3C244X 20#ifdef CONFIG_CPU_S3C244X
19#define ARCH_NR_GPIOS (32 * 9 + CONFIG_S3C24XX_GPIO_EXTRA) 21#define ARCH_NR_GPIOS (32 * 9 + CONFIG_S3C24XX_GPIO_EXTRA)
20#elif defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416) 22#elif defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416)
@@ -23,8 +25,83 @@
23#define ARCH_NR_GPIOS (256 + CONFIG_S3C24XX_GPIO_EXTRA) 25#define ARCH_NR_GPIOS (256 + CONFIG_S3C24XX_GPIO_EXTRA)
24#endif 26#endif
25 27
26#include <mach/gpio-nrs.h> 28/*
27#include <mach/gpio-fns.h> 29 * GPIO sizes for various SoCs:
30 *
31 * 2410 2412 2440 2443 2416
32 * 2442
33 * ---- ---- ---- ---- ----
34 * A 23 22 25 16 25
35 * B 11 11 11 11 9
36 * C 16 15 16 16 16
37 * D 16 16 16 16 16
38 * E 16 16 16 16 16
39 * F 8 8 8 8 8
40 * G 16 16 16 16 8
41 * H 11 11 9 15 15
42 * J -- -- 13 16 --
43 * K -- -- -- -- 16
44 * L -- -- -- 15 7
45 * M -- -- -- 2 2
46 */
47
48/* GPIO bank sizes */
49
50#define S3C2410_GPIO_A_NR (32)
51#define S3C2410_GPIO_B_NR (32)
52#define S3C2410_GPIO_C_NR (32)
53#define S3C2410_GPIO_D_NR (32)
54#define S3C2410_GPIO_E_NR (32)
55#define S3C2410_GPIO_F_NR (32)
56#define S3C2410_GPIO_G_NR (32)
57#define S3C2410_GPIO_H_NR (32)
58#define S3C2410_GPIO_J_NR (32) /* technically 16. */
59#define S3C2410_GPIO_K_NR (32) /* technically 16. */
60#define S3C2410_GPIO_L_NR (32) /* technically 15. */
61#define S3C2410_GPIO_M_NR (32) /* technically 2. */
62
63#if CONFIG_S3C_GPIO_SPACE != 0
64#error CONFIG_S3C_GPIO_SPACE cannot be nonzero at the moment
65#endif
66
67#define S3C2410_GPIO_NEXT(__gpio) \
68 ((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 0)
69
70#ifndef __ASSEMBLY__
71
72enum s3c_gpio_number {
73 S3C2410_GPIO_A_START = 0,
74 S3C2410_GPIO_B_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_A),
75 S3C2410_GPIO_C_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_B),
76 S3C2410_GPIO_D_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_C),
77 S3C2410_GPIO_E_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_D),
78 S3C2410_GPIO_F_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_E),
79 S3C2410_GPIO_G_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_F),
80 S3C2410_GPIO_H_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_G),
81 S3C2410_GPIO_J_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_H),
82 S3C2410_GPIO_K_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_J),
83 S3C2410_GPIO_L_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_K),
84 S3C2410_GPIO_M_START = S3C2410_GPIO_NEXT(S3C2410_GPIO_L),
85};
86
87#endif /* __ASSEMBLY__ */
88
89/* S3C2410 GPIO number definitions. */
90
91#define S3C2410_GPA(_nr) (S3C2410_GPIO_A_START + (_nr))
92#define S3C2410_GPB(_nr) (S3C2410_GPIO_B_START + (_nr))
93#define S3C2410_GPC(_nr) (S3C2410_GPIO_C_START + (_nr))
94#define S3C2410_GPD(_nr) (S3C2410_GPIO_D_START + (_nr))
95#define S3C2410_GPE(_nr) (S3C2410_GPIO_E_START + (_nr))
96#define S3C2410_GPF(_nr) (S3C2410_GPIO_F_START + (_nr))
97#define S3C2410_GPG(_nr) (S3C2410_GPIO_G_START + (_nr))
98#define S3C2410_GPH(_nr) (S3C2410_GPIO_H_START + (_nr))
99#define S3C2410_GPJ(_nr) (S3C2410_GPIO_J_START + (_nr))
100#define S3C2410_GPK(_nr) (S3C2410_GPIO_K_START + (_nr))
101#define S3C2410_GPL(_nr) (S3C2410_GPIO_L_START + (_nr))
102#define S3C2410_GPM(_nr) (S3C2410_GPIO_M_START + (_nr))
103
104#include <plat/gpio-cfg.h>
28 105
29#ifdef CONFIG_CPU_S3C244X 106#ifdef CONFIG_CPU_S3C244X
30#define S3C_GPIO_END (S3C2410_GPJ(0) + 32) 107#define S3C_GPIO_END (S3C2410_GPJ(0) + 32)
@@ -33,3 +110,5 @@
33#else 110#else
34#define S3C_GPIO_END (S3C2410_GPH(0) + 32) 111#define S3C_GPIO_END (S3C2410_GPH(0) + 32)
35#endif 112#endif
113
114#endif /* __MACH_GPIO_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/h1940.h b/arch/arm/mach-s3c24xx/include/mach/h1940.h
deleted file mode 100644
index 2aa683c8d3d6..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/h1940.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/h1940.h
2 *
3 * Copyright 2006 Ben Dooks <ben-linux@fluff.org>
4 *
5 * H1940 definitions
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10*/
11
12#ifndef __ASM_ARCH_H1940_H
13#define __ASM_ARCH_H1940_H
14
15#define H1940_SUSPEND_CHECKSUM (0x30003ff8)
16#define H1940_SUSPEND_RESUMEAT (0x30081000)
17#define H1940_SUSPEND_CHECK (0x30080000)
18
19extern void h1940_pm_return(void);
20extern int h1940_led_blink_set(unsigned gpio, int state,
21 unsigned long *delay_on, unsigned long *delay_off);
22
23
24#endif /* __ASM_ARCH_H1940_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/idle.h b/arch/arm/mach-s3c24xx/include/mach/idle.h
deleted file mode 100644
index e9ddd706b16e..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/idle.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/idle.h
2 *
3 * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/
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 * S3C2410 CPU Idle controls
11*/
12
13#ifndef __ASM_ARCH_IDLE_H
14#define __ASM_ARCH_IDLE_H __FILE__
15
16/* This allows the over-ride of the default idle code, in case there
17 * is any other things to be done over idle (like DVS)
18*/
19
20extern void (*s3c24xx_idle)(void);
21
22extern void s3c24xx_default_idle(void);
23
24#endif /* __ASM_ARCH_IDLE_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/osiris-cpld.h b/arch/arm/mach-s3c24xx/include/mach/osiris-cpld.h
deleted file mode 100644
index e9e36b0abbac..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/osiris-cpld.h
+++ /dev/null
@@ -1,30 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/osiris-cpld.h
2 *
3 * Copyright 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * OSIRIS - CPLD control constants
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __ASM_ARCH_OSIRISCPLD_H
15#define __ASM_ARCH_OSIRISCPLD_H
16
17/* CTRL0 - NAND WP control */
18
19#define OSIRIS_CTRL0_NANDSEL (0x3)
20#define OSIRIS_CTRL0_BOOT_INT (1<<3)
21#define OSIRIS_CTRL0_PCMCIA (1<<4)
22#define OSIRIS_CTRL0_FIX8 (1<<5)
23#define OSIRIS_CTRL0_PCMCIA_nWAIT (1<<6)
24#define OSIRIS_CTRL0_PCMCIA_nIOIS16 (1<<7)
25
26#define OSIRIS_CTRL1_FIX8 (1<<0)
27
28#define OSIRIS_ID_REVMASK (0x7)
29
30#endif /* __ASM_ARCH_OSIRISCPLD_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
index a11a638bd599..c2ef016032ab 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
+++ b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
@@ -14,8 +14,6 @@
14#ifndef __ASM_ARCH_REGS_GPIO_H 14#ifndef __ASM_ARCH_REGS_GPIO_H
15#define __ASM_ARCH_REGS_GPIO_H 15#define __ASM_ARCH_REGS_GPIO_H
16 16
17#include <mach/gpio-nrs.h>
18
19#define S3C24XX_MISCCR S3C24XX_GPIOREG2(0x80) 17#define S3C24XX_MISCCR S3C24XX_GPIOREG2(0x80)
20 18
21/* general configuration options */ 19/* general configuration options */
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2412.h b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2412.h
deleted file mode 100644
index aa69dc79bc38..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2412.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-s3c2412.h
2 *
3 * Copyright 2007 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * S3C2412 specific register definitions
12*/
13
14#ifndef __ASM_ARCH_REGS_S3C2412_H
15#define __ASM_ARCH_REGS_S3C2412_H "s3c2412"
16
17#define S3C2412_SWRST (S3C24XX_VA_CLKPWR + 0x30)
18#define S3C2412_SWRST_RESET (0x533C2412)
19
20/* see regs-power.h for the other registers in the power block. */
21
22#endif /* __ASM_ARCH_REGS_S3C2412_H */
23
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2416-mem.h b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2416-mem.h
deleted file mode 100644
index 2f31b74974af..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2416-mem.h
+++ /dev/null
@@ -1,30 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-s3c2416-mem.h
2 *
3 * Copyright (c) 2009 Yauhen Kharuzhy <jekhor@gmail.com>,
4 * as part of OpenInkpot project
5 * Copyright (c) 2009 Promwad Innovation Company
6 * Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * S3C2416 memory register definitions
13*/
14
15#ifndef __ASM_ARM_REGS_S3C2416_MEM
16#define __ASM_ARM_REGS_S3C2416_MEM
17
18#ifndef S3C2416_MEMREG
19#define S3C2416_MEMREG(x) (S3C24XX_VA_MEMCTRL + (x))
20#endif
21
22#define S3C2416_BANKCFG S3C2416_MEMREG(0x00)
23#define S3C2416_BANKCON1 S3C2416_MEMREG(0x04)
24#define S3C2416_BANKCON2 S3C2416_MEMREG(0x08)
25#define S3C2416_BANKCON3 S3C2416_MEMREG(0x0C)
26
27#define S3C2416_REFRESH S3C2416_MEMREG(0x10)
28#define S3C2416_TIMEOUT S3C2416_MEMREG(0x14)
29
30#endif /* __ASM_ARM_REGS_S3C2416_MEM */
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2416.h b/arch/arm/mach-s3c24xx/include/mach/regs-s3c2416.h
deleted file mode 100644
index e443167efb87..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/regs-s3c2416.h
+++ /dev/null
@@ -1,24 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/regs-s3c2416.h
2 *
3 * Copyright (c) 2009 Yauhen Kharuzhy <jekhor@gmail.com>,
4 * as part of OpenInkpot project
5 * Copyright (c) 2009 Promwad Innovation Company
6 * Yauhen Kharuzhy <yauhen.kharuzhy@promwad.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 * S3C2416 specific register definitions
13*/
14
15#ifndef __ASM_ARCH_REGS_S3C2416_H
16#define __ASM_ARCH_REGS_S3C2416_H "s3c2416"
17
18#define S3C2416_SWRST (S3C24XX_VA_CLKPWR + 0x44)
19#define S3C2416_SWRST_RESET (0x533C2416)
20
21/* see regs-power.h for the other registers in the power block. */
22
23#endif /* __ASM_ARCH_REGS_S3C2416_H */
24
diff --git a/arch/arm/mach-s3c24xx/include/mach/vr1000-cpld.h b/arch/arm/mach-s3c24xx/include/mach/vr1000-cpld.h
deleted file mode 100644
index e4119913d7c5..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/vr1000-cpld.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/vr1000-cpld.h
2 *
3 * Copyright (c) 2003 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * VR1000 - CPLD control constants
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_VR1000CPLD_H
14#define __ASM_ARCH_VR1000CPLD_H
15
16#define VR1000_CPLD_CTRL2_RAMWEN (0x04) /* SRAM Write Enable */
17
18#endif /* __ASM_ARCH_VR1000CPLD_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/vr1000-irq.h b/arch/arm/mach-s3c24xx/include/mach/vr1000-irq.h
deleted file mode 100644
index 47add133b8ee..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/vr1000-irq.h
+++ /dev/null
@@ -1,26 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/vr1000-irq.h
2 *
3 * Copyright (c) 2003-2004 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Machine VR1000 - IRQ Number definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __ASM_ARCH_VR1000IRQ_H
14#define __ASM_ARCH_VR1000IRQ_H
15
16/* irq numbers to onboard peripherals */
17
18#define IRQ_USBOC IRQ_EINT19
19#define IRQ_IDE0 IRQ_EINT16
20#define IRQ_IDE1 IRQ_EINT17
21#define IRQ_VR1000_SERIAL IRQ_EINT12
22#define IRQ_VR1000_DM9000A IRQ_EINT10
23#define IRQ_VR1000_DM9000N IRQ_EINT9
24#define IRQ_SMALERT IRQ_EINT8
25
26#endif /* __ASM_ARCH_VR1000IRQ_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/vr1000-map.h b/arch/arm/mach-s3c24xx/include/mach/vr1000-map.h
deleted file mode 100644
index 28376e56dd3b..000000000000
--- a/arch/arm/mach-s3c24xx/include/mach/vr1000-map.h
+++ /dev/null
@@ -1,110 +0,0 @@
1/* arch/arm/mach-s3c2410/include/mach/vr1000-map.h
2 *
3 * Copyright (c) 2003-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 *
6 * Machine VR1000 - Memory map definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13/* needs arch/map.h including with this */
14
15/* ok, we've used up to 0x13000000, now we need to find space for the
16 * peripherals that live in the nGCS[x] areas, which are quite numerous
17 * in their space. We also have the board's CPLD to find register space
18 * for.
19 */
20
21#ifndef __ASM_ARCH_VR1000MAP_H
22#define __ASM_ARCH_VR1000MAP_H
23
24#include <mach/bast-map.h>
25
26#define VR1000_IOADDR(x) BAST_IOADDR(x)
27
28/* we put the CPLD registers next, to get them out of the way */
29
30#define VR1000_VA_CTRL1 VR1000_IOADDR(0x00000000) /* 0x01300000 */
31#define VR1000_PA_CTRL1 (S3C2410_CS5 | 0x7800000)
32
33#define VR1000_VA_CTRL2 VR1000_IOADDR(0x00100000) /* 0x01400000 */
34#define VR1000_PA_CTRL2 (S3C2410_CS1 | 0x6000000)
35
36#define VR1000_VA_CTRL3 VR1000_IOADDR(0x00200000) /* 0x01500000 */
37#define VR1000_PA_CTRL3 (S3C2410_CS1 | 0x6800000)
38
39#define VR1000_VA_CTRL4 VR1000_IOADDR(0x00300000) /* 0x01600000 */
40#define VR1000_PA_CTRL4 (S3C2410_CS1 | 0x7000000)
41
42/* next, we have the PC104 ISA interrupt registers */
43
44#define VR1000_PA_PC104_IRQREQ (S3C2410_CS5 | 0x6000000) /* 0x01700000 */
45#define VR1000_VA_PC104_IRQREQ VR1000_IOADDR(0x00400000)
46
47#define VR1000_PA_PC104_IRQRAW (S3C2410_CS5 | 0x6800000) /* 0x01800000 */
48#define VR1000_VA_PC104_IRQRAW VR1000_IOADDR(0x00500000)
49
50#define VR1000_PA_PC104_IRQMASK (S3C2410_CS5 | 0x7000000) /* 0x01900000 */
51#define VR1000_VA_PC104_IRQMASK VR1000_IOADDR(0x00600000)
52
53/* 0xE0000000 contains the IO space that is split by speed and
54 * whether the access is for 8 or 16bit IO... this ensures that
55 * the correct access is made
56 *
57 * 0x10000000 of space, partitioned as so:
58 *
59 * 0x00000000 to 0x04000000 8bit, slow
60 * 0x04000000 to 0x08000000 16bit, slow
61 * 0x08000000 to 0x0C000000 16bit, net
62 * 0x0C000000 to 0x10000000 16bit, fast
63 *
64 * each of these spaces has the following in:
65 *
66 * 0x02000000 to 0x02100000 1MB IDE primary channel
67 * 0x02100000 to 0x02200000 1MB IDE primary channel aux
68 * 0x02200000 to 0x02400000 1MB IDE secondary channel
69 * 0x02300000 to 0x02400000 1MB IDE secondary channel aux
70 * 0x02500000 to 0x02600000 1MB Davicom DM9000 ethernet controllers
71 * 0x02600000 to 0x02700000 1MB
72 *
73 * the phyiscal layout of the zones are:
74 * nGCS2 - 8bit, slow
75 * nGCS3 - 16bit, slow
76 * nGCS4 - 16bit, net
77 * nGCS5 - 16bit, fast
78 */
79
80#define VR1000_VA_MULTISPACE (0xE0000000)
81
82#define VR1000_VA_ISAIO (VR1000_VA_MULTISPACE + 0x00000000)
83#define VR1000_VA_ISAMEM (VR1000_VA_MULTISPACE + 0x01000000)
84#define VR1000_VA_IDEPRI (VR1000_VA_MULTISPACE + 0x02000000)
85#define VR1000_VA_IDEPRIAUX (VR1000_VA_MULTISPACE + 0x02100000)
86#define VR1000_VA_IDESEC (VR1000_VA_MULTISPACE + 0x02200000)
87#define VR1000_VA_IDESECAUX (VR1000_VA_MULTISPACE + 0x02300000)
88#define VR1000_VA_ASIXNET (VR1000_VA_MULTISPACE + 0x02400000)
89#define VR1000_VA_DM9000 (VR1000_VA_MULTISPACE + 0x02500000)
90#define VR1000_VA_SUPERIO (VR1000_VA_MULTISPACE + 0x02600000)
91
92/* physical offset addresses for the peripherals */
93
94#define VR1000_PA_IDEPRI (0x02000000)
95#define VR1000_PA_IDEPRIAUX (0x02800000)
96#define VR1000_PA_IDESEC (0x03000000)
97#define VR1000_PA_IDESECAUX (0x03800000)
98#define VR1000_PA_DM9000 (0x05000000)
99
100#define VR1000_PA_SERIAL (0x11800000)
101#define VR1000_VA_SERIAL (VR1000_IOADDR(0x00700000))
102
103/* VR1000 ram is in CS1, with A26..A24 = 2_101 */
104#define VR1000_PA_SRAM (S3C2410_CS1 | 0x05000000)
105
106/* some configurations for the peripherals */
107
108#define VR1000_DM9000_CS VR1000_VAM_CS4
109
110#endif /* __ASM_ARCH_VR1000MAP_H */
diff --git a/arch/arm/mach-s3c24xx/mach-amlm5900.c b/arch/arm/mach-s3c24xx/mach-amlm5900.c
index f4ad99c1e476..0e0279e79150 100644
--- a/arch/arm/mach-s3c24xx/mach-amlm5900.c
+++ b/arch/arm/mach-s3c24xx/mach-amlm5900.c
@@ -237,6 +237,6 @@ MACHINE_START(AML_M5900, "AML_M5900")
237 .map_io = amlm5900_map_io, 237 .map_io = amlm5900_map_io,
238 .init_irq = s3c24xx_init_irq, 238 .init_irq = s3c24xx_init_irq,
239 .init_machine = amlm5900_init, 239 .init_machine = amlm5900_init,
240 .timer = &s3c24xx_timer, 240 .init_time = s3c24xx_timer_init,
241 .restart = s3c2410_restart, 241 .restart = s3c2410_restart,
242MACHINE_END 242MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-anubis.c b/arch/arm/mach-s3c24xx/mach-anubis.c
index 1ee8c4638743..3c4b6e30c742 100644
--- a/arch/arm/mach-s3c24xx/mach-anubis.c
+++ b/arch/arm/mach-s3c24xx/mach-anubis.c
@@ -28,10 +28,6 @@
28#include <asm/mach/map.h> 28#include <asm/mach/map.h>
29#include <asm/mach/irq.h> 29#include <asm/mach/irq.h>
30 30
31#include <mach/anubis-map.h>
32#include <mach/anubis-irq.h>
33#include <mach/anubis-cpld.h>
34
35#include <mach/hardware.h> 31#include <mach/hardware.h>
36#include <asm/irq.h> 32#include <asm/irq.h>
37#include <asm/mach-types.h> 33#include <asm/mach-types.h>
@@ -55,8 +51,9 @@
55#include <plat/cpu.h> 51#include <plat/cpu.h>
56#include <linux/platform_data/asoc-s3c24xx_simtec.h> 52#include <linux/platform_data/asoc-s3c24xx_simtec.h>
57 53
58#include "simtec.h" 54#include "anubis.h"
59#include "common.h" 55#include "common.h"
56#include "simtec.h"
60 57
61#define COPYRIGHT ", Copyright 2005-2009 Simtec Electronics" 58#define COPYRIGHT ", Copyright 2005-2009 Simtec Electronics"
62 59
@@ -237,7 +234,7 @@ static struct pata_platform_info anubis_ide_platdata = {
237static struct resource anubis_ide0_resource[] = { 234static struct resource anubis_ide0_resource[] = {
238 [0] = DEFINE_RES_MEM(S3C2410_CS3, 8 * 32), 235 [0] = DEFINE_RES_MEM(S3C2410_CS3, 8 * 32),
239 [2] = DEFINE_RES_MEM(S3C2410_CS3 + (1 << 26) + (6 * 32), 32), 236 [2] = DEFINE_RES_MEM(S3C2410_CS3 + (1 << 26) + (6 * 32), 32),
240 [3] = DEFINE_RES_IRQ(IRQ_IDE0), 237 [3] = DEFINE_RES_IRQ(ANUBIS_IRQ_IDE0),
241}; 238};
242 239
243static struct platform_device anubis_device_ide0 = { 240static struct platform_device anubis_device_ide0 = {
@@ -254,7 +251,7 @@ static struct platform_device anubis_device_ide0 = {
254static struct resource anubis_ide1_resource[] = { 251static struct resource anubis_ide1_resource[] = {
255 [0] = DEFINE_RES_MEM(S3C2410_CS4, 8 * 32), 252 [0] = DEFINE_RES_MEM(S3C2410_CS4, 8 * 32),
256 [1] = DEFINE_RES_MEM(S3C2410_CS4 + (1 << 26) + (6 * 32), 32), 253 [1] = DEFINE_RES_MEM(S3C2410_CS4 + (1 << 26) + (6 * 32), 32),
257 [2] = DEFINE_RES_IRQ(IRQ_IDE0), 254 [2] = DEFINE_RES_IRQ(ANUBIS_IRQ_IDE0),
258}; 255};
259 256
260static struct platform_device anubis_device_ide1 = { 257static struct platform_device anubis_device_ide1 = {
@@ -279,7 +276,7 @@ static struct ax_plat_data anubis_asix_platdata = {
279 276
280static struct resource anubis_asix_resource[] = { 277static struct resource anubis_asix_resource[] = {
281 [0] = DEFINE_RES_MEM(S3C2410_CS5, 0x20 * 0x20), 278 [0] = DEFINE_RES_MEM(S3C2410_CS5, 0x20 * 0x20),
282 [1] = DEFINE_RES_IRQ(IRQ_ASIX), 279 [1] = DEFINE_RES_IRQ(ANUBIS_IRQ_ASIX),
283}; 280};
284 281
285static struct platform_device anubis_device_asix = { 282static struct platform_device anubis_device_asix = {
@@ -448,6 +445,6 @@ MACHINE_START(ANUBIS, "Simtec-Anubis")
448 .map_io = anubis_map_io, 445 .map_io = anubis_map_io,
449 .init_machine = anubis_init, 446 .init_machine = anubis_init,
450 .init_irq = s3c24xx_init_irq, 447 .init_irq = s3c24xx_init_irq,
451 .timer = &s3c24xx_timer, 448 .init_time = s3c24xx_timer_init,
452 .restart = s3c244x_restart, 449 .restart = s3c244x_restart,
453MACHINE_END 450MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-at2440evb.c b/arch/arm/mach-s3c24xx/mach-at2440evb.c
index 00381fe5de32..cdcd784e30c5 100644
--- a/arch/arm/mach-s3c24xx/mach-at2440evb.c
+++ b/arch/arm/mach-s3c24xx/mach-at2440evb.c
@@ -14,6 +14,7 @@
14 14
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/types.h> 16#include <linux/types.h>
17#include <linux/gpio.h>
17#include <linux/interrupt.h> 18#include <linux/interrupt.h>
18#include <linux/list.h> 19#include <linux/list.h>
19#include <linux/timer.h> 20#include <linux/timer.h>
@@ -210,6 +211,6 @@ MACHINE_START(AT2440EVB, "AT2440EVB")
210 .map_io = at2440evb_map_io, 211 .map_io = at2440evb_map_io,
211 .init_machine = at2440evb_init, 212 .init_machine = at2440evb_init,
212 .init_irq = s3c24xx_init_irq, 213 .init_irq = s3c24xx_init_irq,
213 .timer = &s3c24xx_timer, 214 .init_time = s3c24xx_timer_init,
214 .restart = s3c244x_restart, 215 .restart = s3c244x_restart,
215MACHINE_END 216MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-bast.c b/arch/arm/mach-s3c24xx/mach-bast.c
index 6a30ce7e4aa7..5c1e3dfb9ab3 100644
--- a/arch/arm/mach-s3c24xx/mach-bast.c
+++ b/arch/arm/mach-s3c24xx/mach-bast.c
@@ -24,48 +24,42 @@
24#include <linux/ata_platform.h> 24#include <linux/ata_platform.h>
25#include <linux/i2c.h> 25#include <linux/i2c.h>
26#include <linux/io.h> 26#include <linux/io.h>
27#include <linux/serial_8250.h>
28
29#include <linux/mtd/mtd.h>
30#include <linux/mtd/nand.h>
31#include <linux/mtd/nand_ecc.h>
32#include <linux/mtd/partitions.h>
33
34#include <linux/platform_data/asoc-s3c24xx_simtec.h>
35#include <linux/platform_data/hwmon-s3c.h>
36#include <linux/platform_data/i2c-s3c2410.h>
37#include <linux/platform_data/mtd-nand-s3c2410.h>
27 38
28#include <net/ax88796.h> 39#include <net/ax88796.h>
29 40
41#include <asm/irq.h>
30#include <asm/mach/arch.h> 42#include <asm/mach/arch.h>
31#include <asm/mach/map.h> 43#include <asm/mach/map.h>
32#include <asm/mach/irq.h> 44#include <asm/mach/irq.h>
33
34#include <mach/bast-map.h>
35#include <mach/bast-irq.h>
36#include <mach/bast-cpld.h>
37
38#include <mach/hardware.h>
39#include <asm/irq.h>
40#include <asm/mach-types.h> 45#include <asm/mach-types.h>
41 46
42//#include <asm/debug-ll.h> 47#include <mach/fb.h>
43#include <plat/regs-serial.h> 48#include <mach/hardware.h>
44#include <mach/regs-gpio.h> 49#include <mach/regs-gpio.h>
45#include <mach/regs-mem.h>
46#include <mach/regs-lcd.h> 50#include <mach/regs-lcd.h>
47 51#include <mach/regs-mem.h>
48#include <linux/platform_data/hwmon-s3c.h>
49#include <linux/platform_data/mtd-nand-s3c2410.h>
50#include <linux/platform_data/i2c-s3c2410.h>
51#include <mach/fb.h>
52
53#include <linux/mtd/mtd.h>
54#include <linux/mtd/nand.h>
55#include <linux/mtd/nand_ecc.h>
56#include <linux/mtd/partitions.h>
57
58#include <linux/serial_8250.h>
59 52
60#include <plat/clock.h> 53#include <plat/clock.h>
61#include <plat/devs.h>
62#include <plat/cpu.h> 54#include <plat/cpu.h>
63#include <plat/cpu-freq.h> 55#include <plat/cpu-freq.h>
56#include <plat/devs.h>
64#include <plat/gpio-cfg.h> 57#include <plat/gpio-cfg.h>
65#include <linux/platform_data/asoc-s3c24xx_simtec.h> 58#include <plat/regs-serial.h>
66 59
67#include "simtec.h" 60#include "bast.h"
68#include "common.h" 61#include "common.h"
62#include "simtec.h"
69 63
70#define COPYRIGHT ", Copyright 2004-2008 Simtec Electronics" 64#define COPYRIGHT ", Copyright 2004-2008 Simtec Electronics"
71 65
@@ -312,7 +306,7 @@ static struct s3c2410_platform_nand __initdata bast_nand_info = {
312static struct resource bast_dm9k_resource[] = { 306static struct resource bast_dm9k_resource[] = {
313 [0] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_DM9000, 4), 307 [0] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_DM9000, 4),
314 [1] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_DM9000 + 0x40, 0x40), 308 [1] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_DM9000 + 0x40, 0x40),
315 [2] = DEFINE_RES_NAMED(IRQ_DM9000 , 1, NULL, IORESOURCE_IRQ \ 309 [2] = DEFINE_RES_NAMED(BAST_IRQ_DM9000 , 1, NULL, IORESOURCE_IRQ \
316 | IORESOURCE_IRQ_HIGHLEVEL), 310 | IORESOURCE_IRQ_HIGHLEVEL),
317}; 311};
318 312
@@ -343,7 +337,7 @@ static struct platform_device bast_device_dm9k = {
343static struct plat_serial8250_port bast_sio_data[] = { 337static struct plat_serial8250_port bast_sio_data[] = {
344 [0] = { 338 [0] = {
345 .mapbase = SERIAL_BASE + 0x2f8, 339 .mapbase = SERIAL_BASE + 0x2f8,
346 .irq = IRQ_PCSERIAL1, 340 .irq = BAST_IRQ_PCSERIAL1,
347 .flags = SERIAL_FLAGS, 341 .flags = SERIAL_FLAGS,
348 .iotype = UPIO_MEM, 342 .iotype = UPIO_MEM,
349 .regshift = 0, 343 .regshift = 0,
@@ -351,7 +345,7 @@ static struct plat_serial8250_port bast_sio_data[] = {
351 }, 345 },
352 [1] = { 346 [1] = {
353 .mapbase = SERIAL_BASE + 0x3f8, 347 .mapbase = SERIAL_BASE + 0x3f8,
354 .irq = IRQ_PCSERIAL2, 348 .irq = BAST_IRQ_PCSERIAL2,
355 .flags = SERIAL_FLAGS, 349 .flags = SERIAL_FLAGS,
356 .iotype = UPIO_MEM, 350 .iotype = UPIO_MEM,
357 .regshift = 0, 351 .regshift = 0,
@@ -390,7 +384,7 @@ static struct ax_plat_data bast_asix_platdata = {
390static struct resource bast_asix_resource[] = { 384static struct resource bast_asix_resource[] = {
391 [0] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_ASIXNET, 0x18 * 0x20), 385 [0] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_ASIXNET, 0x18 * 0x20),
392 [1] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_ASIXNET + (0x1f * 0x20), 1), 386 [1] = DEFINE_RES_MEM(S3C2410_CS5 + BAST_PA_ASIXNET + (0x1f * 0x20), 1),
393 [2] = DEFINE_RES_IRQ(IRQ_ASIX), 387 [2] = DEFINE_RES_IRQ(BAST_IRQ_ASIX),
394}; 388};
395 389
396static struct platform_device bast_device_asix = { 390static struct platform_device bast_device_asix = {
@@ -612,6 +606,6 @@ MACHINE_START(BAST, "Simtec-BAST")
612 .map_io = bast_map_io, 606 .map_io = bast_map_io,
613 .init_irq = s3c24xx_init_irq, 607 .init_irq = s3c24xx_init_irq,
614 .init_machine = bast_init, 608 .init_machine = bast_init,
615 .timer = &s3c24xx_timer, 609 .init_time = s3c24xx_timer_init,
616 .restart = s3c2410_restart, 610 .restart = s3c2410_restart,
617MACHINE_END 611MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index 973b87ca87f4..b9782ac2237a 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -1,6 +1,4 @@
1/* 1/*
2 * linux/arch/arm/mach-s3c2442/mach-gta02.c
3 *
4 * S3C2442 Machine Support for Openmoko GTA02 / FreeRunner. 2 * S3C2442 Machine Support for Openmoko GTA02 / FreeRunner.
5 * 3 *
6 * Copyright (C) 2006-2009 by Openmoko, Inc. 4 * Copyright (C) 2006-2009 by Openmoko, Inc.
@@ -23,7 +21,6 @@
23 * along with this program; if not, write to the Free Software 21 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
25 * MA 02111-1307 USA 23 * MA 02111-1307 USA
26 *
27 */ 24 */
28 25
29#include <linux/kernel.h> 26#include <linux/kernel.h>
@@ -34,62 +31,60 @@
34#include <linux/timer.h> 31#include <linux/timer.h>
35#include <linux/init.h> 32#include <linux/init.h>
36#include <linux/gpio.h> 33#include <linux/gpio.h>
34#include <linux/gpio_keys.h>
37#include <linux/workqueue.h> 35#include <linux/workqueue.h>
38#include <linux/platform_device.h> 36#include <linux/platform_device.h>
39#include <linux/serial_core.h> 37#include <linux/serial_core.h>
40#include <linux/spi/spi.h> 38#include <linux/input.h>
41#include <linux/spi/s3c24xx.h> 39#include <linux/io.h>
40#include <linux/i2c.h>
42 41
43#include <linux/mmc/host.h> 42#include <linux/mmc/host.h>
44 43
44#include <linux/mfd/pcf50633/adc.h>
45#include <linux/mfd/pcf50633/backlight.h>
46#include <linux/mfd/pcf50633/core.h>
47#include <linux/mfd/pcf50633/gpio.h>
48#include <linux/mfd/pcf50633/mbc.h>
49#include <linux/mfd/pcf50633/pmic.h>
50
45#include <linux/mtd/mtd.h> 51#include <linux/mtd/mtd.h>
46#include <linux/mtd/nand.h> 52#include <linux/mtd/nand.h>
47#include <linux/mtd/nand_ecc.h> 53#include <linux/mtd/nand_ecc.h>
48#include <linux/mtd/partitions.h> 54#include <linux/mtd/partitions.h>
49#include <linux/mtd/physmap.h> 55#include <linux/mtd/physmap.h>
50#include <linux/io.h>
51 56
52#include <linux/i2c.h>
53#include <linux/regulator/machine.h> 57#include <linux/regulator/machine.h>
54 58
55#include <linux/mfd/pcf50633/core.h> 59#include <linux/spi/spi.h>
56#include <linux/mfd/pcf50633/mbc.h> 60#include <linux/spi/s3c24xx.h>
57#include <linux/mfd/pcf50633/adc.h>
58#include <linux/mfd/pcf50633/gpio.h>
59#include <linux/mfd/pcf50633/pmic.h>
60#include <linux/mfd/pcf50633/backlight.h>
61
62#include <linux/input.h>
63#include <linux/gpio_keys.h>
64 61
62#include <asm/irq.h>
63#include <asm/mach-types.h>
65#include <asm/mach/arch.h> 64#include <asm/mach/arch.h>
66#include <asm/mach/map.h> 65#include <asm/mach/map.h>
67#include <asm/mach/irq.h> 66#include <asm/mach/irq.h>
68 67
69#include <asm/irq.h> 68#include <linux/platform_data/i2c-s3c2410.h>
70#include <asm/mach-types.h> 69#include <linux/platform_data/mtd-nand-s3c2410.h>
70#include <linux/platform_data/touchscreen-s3c2410.h>
71#include <linux/platform_data/usb-ohci-s3c2410.h>
72#include <linux/platform_data/usb-s3c2410_udc.h>
71 73
72#include <mach/regs-irq.h>
73#include <mach/regs-gpio.h>
74#include <mach/fb.h> 74#include <mach/fb.h>
75
76#include <linux/platform_data/usb-ohci-s3c2410.h>
77#include <mach/regs-mem.h>
78#include <mach/hardware.h> 75#include <mach/hardware.h>
76#include <mach/regs-gpio.h>
77#include <mach/regs-irq.h>
78#include <mach/regs-mem.h>
79 79
80#include <mach/gta02.h>
81
82#include <plat/regs-serial.h>
83#include <linux/platform_data/mtd-nand-s3c2410.h>
84#include <plat/devs.h>
85#include <plat/cpu.h> 80#include <plat/cpu.h>
86#include <plat/pm.h> 81#include <plat/devs.h>
87#include <linux/platform_data/usb-s3c2410_udc.h>
88#include <plat/gpio-cfg.h> 82#include <plat/gpio-cfg.h>
89#include <linux/platform_data/i2c-s3c2410.h> 83#include <plat/pm.h>
90#include <linux/platform_data/touchscreen-s3c2410.h> 84#include <plat/regs-serial.h>
91 85
92#include "common.h" 86#include "common.h"
87#include "gta02.h"
93 88
94static struct pcf50633 *gta02_pcf; 89static struct pcf50633 *gta02_pcf;
95 90
@@ -595,6 +590,6 @@ MACHINE_START(NEO1973_GTA02, "GTA02")
595 .map_io = gta02_map_io, 590 .map_io = gta02_map_io,
596 .init_irq = s3c24xx_init_irq, 591 .init_irq = s3c24xx_init_irq,
597 .init_machine = gta02_machine_init, 592 .init_machine = gta02_machine_init,
598 .timer = &s3c24xx_timer, 593 .init_time = s3c24xx_timer_init,
599 .restart = s3c244x_restart, 594 .restart = s3c244x_restart,
600MACHINE_END 595MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index b23dd1b106e8..79bc0830d740 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -1,5 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/mach-h1940.c 1/*
2 *
3 * Copyright (c) 2003-2005 Simtec Electronics 2 * Copyright (c) 2003-2005 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 3 * Ben Dooks <ben@simtec.co.uk>
5 * 4 *
@@ -37,40 +36,36 @@
37#include <linux/mmc/host.h> 36#include <linux/mmc/host.h>
38#include <linux/export.h> 37#include <linux/export.h>
39 38
39#include <asm/irq.h>
40#include <asm/mach-types.h>
40#include <asm/mach/arch.h> 41#include <asm/mach/arch.h>
41#include <asm/mach/map.h> 42#include <asm/mach/map.h>
42#include <asm/mach/irq.h> 43#include <asm/mach/irq.h>
43 44
44#include <mach/hardware.h> 45#include <linux/platform_data/i2c-s3c2410.h>
45#include <asm/irq.h> 46#include <linux/platform_data/mmc-s3cmci.h>
46#include <asm/mach-types.h> 47#include <linux/platform_data/touchscreen-s3c2410.h>
47 48#include <linux/platform_data/usb-s3c2410_udc.h>
48#include <plat/regs-serial.h>
49#include <mach/regs-lcd.h>
50#include <mach/regs-clock.h>
51 49
52#include <mach/regs-gpio.h> 50#include <sound/uda1380.h>
53#include <mach/gpio-fns.h>
54#include <mach/gpio-nrs.h>
55 51
56#include <mach/h1940.h>
57#include <mach/h1940-latch.h>
58#include <mach/fb.h> 52#include <mach/fb.h>
59#include <linux/platform_data/usb-s3c2410_udc.h> 53#include <mach/hardware.h>
60#include <linux/platform_data/i2c-s3c2410.h> 54#include <mach/regs-clock.h>
55#include <mach/regs-gpio.h>
56#include <mach/regs-lcd.h>
61 57
62#include <plat/gpio-cfg.h>
63#include <plat/clock.h> 58#include <plat/clock.h>
64#include <plat/devs.h>
65#include <plat/cpu.h> 59#include <plat/cpu.h>
60#include <plat/devs.h>
61#include <plat/gpio-cfg.h>
66#include <plat/pll.h> 62#include <plat/pll.h>
67#include <plat/pm.h> 63#include <plat/pm.h>
68#include <linux/platform_data/mmc-s3cmci.h> 64#include <plat/regs-serial.h>
69#include <linux/platform_data/touchscreen-s3c2410.h>
70 65
71#include <sound/uda1380.h>
72 66
73#include "common.h" 67#include "common.h"
68#include "h1940.h"
74 69
75#define H1940_LATCH ((void __force __iomem *)0xF8000000) 70#define H1940_LATCH ((void __force __iomem *)0xF8000000)
76 71
@@ -746,6 +741,6 @@ MACHINE_START(H1940, "IPAQ-H1940")
746 .reserve = h1940_reserve, 741 .reserve = h1940_reserve,
747 .init_irq = h1940_init_irq, 742 .init_irq = h1940_init_irq,
748 .init_machine = h1940_init, 743 .init_machine = h1940_init,
749 .timer = &s3c24xx_timer, 744 .init_time = s3c24xx_timer_init,
750 .restart = s3c2410_restart, 745 .restart = s3c2410_restart,
751MACHINE_END 746MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-jive.c b/arch/arm/mach-s3c24xx/mach-jive.c
index c9954e26b492..d7a172555238 100644
--- a/arch/arm/mach-s3c24xx/mach-jive.c
+++ b/arch/arm/mach-s3c24xx/mach-jive.c
@@ -661,6 +661,6 @@ MACHINE_START(JIVE, "JIVE")
661 .init_irq = s3c24xx_init_irq, 661 .init_irq = s3c24xx_init_irq,
662 .map_io = jive_map_io, 662 .map_io = jive_map_io,
663 .init_machine = jive_machine_init, 663 .init_machine = jive_machine_init,
664 .timer = &s3c24xx_timer, 664 .init_time = s3c24xx_timer_init,
665 .restart = s3c2412_restart, 665 .restart = s3c2412_restart,
666MACHINE_END 666MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index a31d5b83e5f7..2db09ade9b50 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -688,6 +688,6 @@ MACHINE_START(MINI2440, "MINI2440")
688 .map_io = mini2440_map_io, 688 .map_io = mini2440_map_io,
689 .init_machine = mini2440_init, 689 .init_machine = mini2440_init,
690 .init_irq = s3c24xx_init_irq, 690 .init_irq = s3c24xx_init_irq,
691 .timer = &s3c24xx_timer, 691 .init_time = s3c24xx_timer_init,
692 .restart = s3c244x_restart, 692 .restart = s3c244x_restart,
693MACHINE_END 693MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-n30.c b/arch/arm/mach-s3c24xx/mach-n30.c
index c53a9bfe1417..d9d04b240295 100644
--- a/arch/arm/mach-s3c24xx/mach-n30.c
+++ b/arch/arm/mach-s3c24xx/mach-n30.c
@@ -589,7 +589,7 @@ MACHINE_START(N30, "Acer-N30")
589 Ben Dooks <ben-linux@fluff.org> 589 Ben Dooks <ben-linux@fluff.org>
590 */ 590 */
591 .atag_offset = 0x100, 591 .atag_offset = 0x100,
592 .timer = &s3c24xx_timer, 592 .init_time = s3c24xx_timer_init,
593 .init_machine = n30_init, 593 .init_machine = n30_init,
594 .init_irq = s3c24xx_init_irq, 594 .init_irq = s3c24xx_init_irq,
595 .map_io = n30_map_io, 595 .map_io = n30_map_io,
@@ -600,7 +600,7 @@ MACHINE_START(N35, "Acer-N35")
600 /* Maintainer: Christer Weinigel <christer@weinigel.se> 600 /* Maintainer: Christer Weinigel <christer@weinigel.se>
601 */ 601 */
602 .atag_offset = 0x100, 602 .atag_offset = 0x100,
603 .timer = &s3c24xx_timer, 603 .init_time = s3c24xx_timer_init,
604 .init_machine = n30_init, 604 .init_machine = n30_init,
605 .init_irq = s3c24xx_init_irq, 605 .init_irq = s3c24xx_init_irq,
606 .map_io = n30_map_io, 606 .map_io = n30_map_io,
diff --git a/arch/arm/mach-s3c24xx/mach-nexcoder.c b/arch/arm/mach-s3c24xx/mach-nexcoder.c
index a2b92b0898e2..a454e2461860 100644
--- a/arch/arm/mach-s3c24xx/mach-nexcoder.c
+++ b/arch/arm/mach-s3c24xx/mach-nexcoder.c
@@ -153,6 +153,6 @@ MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440")
153 .map_io = nexcoder_map_io, 153 .map_io = nexcoder_map_io,
154 .init_machine = nexcoder_init, 154 .init_machine = nexcoder_init,
155 .init_irq = s3c24xx_init_irq, 155 .init_irq = s3c24xx_init_irq,
156 .timer = &s3c24xx_timer, 156 .init_time = s3c24xx_timer_init,
157 .restart = s3c244x_restart, 157 .restart = s3c244x_restart,
158MACHINE_END 158MACHINE_END
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-s3c24xx/mach-osiris.c b/arch/arm/mach-s3c24xx/mach-osiris.c
index bb36d832bd3d..4b57f9aa0a8f 100644
--- a/arch/arm/mach-s3c24xx/mach-osiris.c
+++ b/arch/arm/mach-s3c24xx/mach-osiris.c
@@ -1,5 +1,4 @@
1/* linux/arch/arm/mach-s3c2440/mach-osiris.c 1/*
2 *
3 * Copyright (c) 2005-2008 Simtec Electronics 2 * Copyright (c) 2005-2008 Simtec Electronics
4 * http://armlinux.simtec.co.uk/ 3 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -25,22 +24,12 @@
25 24
26#include <linux/i2c/tps65010.h> 25#include <linux/i2c/tps65010.h>
27 26
27#include <asm/mach-types.h>
28#include <asm/mach/arch.h> 28#include <asm/mach/arch.h>
29#include <asm/mach/map.h> 29#include <asm/mach/map.h>
30#include <asm/mach/irq.h> 30#include <asm/mach/irq.h>
31
32#include <mach/osiris-map.h>
33#include <mach/osiris-cpld.h>
34
35#include <mach/hardware.h>
36#include <asm/irq.h> 31#include <asm/irq.h>
37#include <asm/mach-types.h>
38 32
39#include <plat/cpu-freq.h>
40#include <plat/regs-serial.h>
41#include <mach/regs-gpio.h>
42#include <mach/regs-mem.h>
43#include <mach/regs-lcd.h>
44#include <linux/platform_data/mtd-nand-s3c2410.h> 33#include <linux/platform_data/mtd-nand-s3c2410.h>
45#include <linux/platform_data/i2c-s3c2410.h> 34#include <linux/platform_data/i2c-s3c2410.h>
46 35
@@ -49,12 +38,20 @@
49#include <linux/mtd/nand_ecc.h> 38#include <linux/mtd/nand_ecc.h>
50#include <linux/mtd/partitions.h> 39#include <linux/mtd/partitions.h>
51 40
52#include <plat/gpio-cfg.h>
53#include <plat/clock.h> 41#include <plat/clock.h>
54#include <plat/devs.h>
55#include <plat/cpu.h> 42#include <plat/cpu.h>
43#include <plat/cpu-freq.h>
44#include <plat/devs.h>
45#include <plat/gpio-cfg.h>
46#include <plat/regs-serial.h>
47
48#include <mach/hardware.h>
49#include <mach/regs-gpio.h>
50#include <mach/regs-mem.h>
51#include <mach/regs-lcd.h>
56 52
57#include "common.h" 53#include "common.h"
54#include "osiris.h"
58 55
59/* onboard perihperal map */ 56/* onboard perihperal map */
60 57
@@ -428,6 +425,6 @@ MACHINE_START(OSIRIS, "Simtec-OSIRIS")
428 .map_io = osiris_map_io, 425 .map_io = osiris_map_io,
429 .init_irq = s3c24xx_init_irq, 426 .init_irq = s3c24xx_init_irq,
430 .init_machine = osiris_init, 427 .init_machine = osiris_init,
431 .timer = &s3c24xx_timer, 428 .init_time = s3c24xx_timer_init,
432 .restart = s3c244x_restart, 429 .restart = s3c244x_restart,
433MACHINE_END 430MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-otom.c b/arch/arm/mach-s3c24xx/mach-otom.c
index bca39f0232b3..40a47d6c6a85 100644
--- a/arch/arm/mach-s3c24xx/mach-otom.c
+++ b/arch/arm/mach-s3c24xx/mach-otom.c
@@ -1,4 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/mach-otom.c 1/*
2 * 2 *
3 * Copyright (c) 2004 Nex Vision 3 * Copyright (c) 2004 Nex Vision
4 * Guillaume GOURAT <guillaume.gourat@nexvision.fr> 4 * Guillaume GOURAT <guillaume.gourat@nexvision.fr>
@@ -6,7 +6,6 @@
6 * This program is free software; you can redistribute it and/or modify 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 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 *
10 */ 9 */
11 10
12#include <linux/kernel.h> 11#include <linux/kernel.h>
@@ -19,26 +18,25 @@
19#include <linux/platform_device.h> 18#include <linux/platform_device.h>
20#include <linux/io.h> 19#include <linux/io.h>
21 20
21#include <linux/platform_data/i2c-s3c2410.h>
22
23#include <asm/irq.h>
24#include <asm/mach-types.h>
22#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
23#include <asm/mach/map.h> 26#include <asm/mach/map.h>
24#include <asm/mach/irq.h> 27#include <asm/mach/irq.h>
25 28
26#include <mach/otom-map.h>
27
28#include <mach/hardware.h> 29#include <mach/hardware.h>
29#include <asm/irq.h>
30#include <asm/mach-types.h>
31
32#include <plat/regs-serial.h>
33#include <mach/regs-gpio.h> 30#include <mach/regs-gpio.h>
34 31
35#include <plat/s3c2410.h>
36#include <plat/clock.h> 32#include <plat/clock.h>
37#include <plat/devs.h>
38#include <linux/platform_data/i2c-s3c2410.h>
39#include <plat/cpu.h> 33#include <plat/cpu.h>
34#include <plat/devs.h>
35#include <plat/regs-serial.h>
36#include <plat/s3c2410.h>
40 37
41#include "common.h" 38#include "common.h"
39#include "otom.h"
42 40
43static struct map_desc otom11_iodesc[] __initdata = { 41static struct map_desc otom11_iodesc[] __initdata = {
44 /* Device area */ 42 /* Device area */
@@ -118,6 +116,6 @@ MACHINE_START(OTOM, "Nex Vision - Otom 1.1")
118 .map_io = otom11_map_io, 116 .map_io = otom11_map_io,
119 .init_machine = otom11_init, 117 .init_machine = otom11_init,
120 .init_irq = s3c24xx_init_irq, 118 .init_irq = s3c24xx_init_irq,
121 .timer = &s3c24xx_timer, 119 .init_time = s3c24xx_timer_init,
122 .restart = s3c2410_restart, 120 .restart = s3c2410_restart,
123MACHINE_END 121MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index 7b6ba13d7285..56175f0941b1 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -343,6 +343,6 @@ MACHINE_START(QT2410, "QT2410")
343 .map_io = qt2410_map_io, 343 .map_io = qt2410_map_io,
344 .init_irq = s3c24xx_init_irq, 344 .init_irq = s3c24xx_init_irq,
345 .init_machine = qt2410_machine_init, 345 .init_machine = qt2410_machine_init,
346 .timer = &s3c24xx_timer, 346 .init_time = s3c24xx_timer_init,
347 .restart = s3c2410_restart, 347 .restart = s3c2410_restart,
348MACHINE_END 348MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index 0606f2faaa5c..1f9ba2ae5288 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -1,5 +1,4 @@
1/* linux/arch/arm/mach-s3c2440/mach-rx1950.c 1/*
2 *
3 * Copyright (c) 2006-2009 Victor Chukhantsev, Denis Grigoriev, 2 * Copyright (c) 2006-2009 Victor Chukhantsev, Denis Grigoriev,
4 * Copyright (c) 2007-2010 Vasily Khoruzhick 3 * Copyright (c) 2007-2010 Vasily Khoruzhick
5 * 4 *
@@ -37,31 +36,31 @@
37 36
38#include <linux/mmc/host.h> 37#include <linux/mmc/host.h>
39 38
39#include <asm/mach-types.h>
40#include <asm/mach/arch.h> 40#include <asm/mach/arch.h>
41#include <asm/mach/map.h> 41#include <asm/mach/map.h>
42#include <asm/mach-types.h>
43 42
43#include <linux/platform_data/i2c-s3c2410.h>
44#include <linux/platform_data/mmc-s3cmci.h>
45#include <linux/platform_data/mtd-nand-s3c2410.h>
46#include <linux/platform_data/touchscreen-s3c2410.h>
47#include <linux/platform_data/usb-s3c2410_udc.h>
48
49#include <sound/uda1380.h>
50
51#include <mach/fb.h>
44#include <mach/regs-gpio.h> 52#include <mach/regs-gpio.h>
45#include <mach/regs-lcd.h> 53#include <mach/regs-lcd.h>
46#include <mach/h1940.h>
47#include <mach/fb.h>
48 54
49#include <plat/clock.h> 55#include <plat/clock.h>
50#include <plat/regs-serial.h>
51#include <plat/regs-iic.h>
52#include <linux/platform_data/mmc-s3cmci.h>
53#include <linux/platform_data/usb-s3c2410_udc.h>
54#include <linux/platform_data/mtd-nand-s3c2410.h>
55#include <linux/platform_data/i2c-s3c2410.h>
56#include <plat/devs.h>
57#include <plat/cpu.h> 56#include <plat/cpu.h>
57#include <plat/devs.h>
58#include <plat/pm.h> 58#include <plat/pm.h>
59#include <plat/irq.h> 59#include <plat/regs-iic.h>
60#include <linux/platform_data/touchscreen-s3c2410.h> 60#include <plat/regs-serial.h>
61
62#include <sound/uda1380.h>
63 61
64#include "common.h" 62#include "common.h"
63#include "h1940.h"
65 64
66#define LCD_PWM_PERIOD 192960 65#define LCD_PWM_PERIOD 192960
67#define LCD_PWM_DUTY 127353 66#define LCD_PWM_DUTY 127353
@@ -814,6 +813,6 @@ MACHINE_START(RX1950, "HP iPAQ RX1950")
814 .reserve = rx1950_reserve, 813 .reserve = rx1950_reserve,
815 .init_irq = s3c24xx_init_irq, 814 .init_irq = s3c24xx_init_irq,
816 .init_machine = rx1950_init_machine, 815 .init_machine = rx1950_init_machine,
817 .timer = &s3c24xx_timer, 816 .init_time = s3c24xx_timer_init,
818 .restart = s3c244x_restart, 817 .restart = s3c244x_restart,
819MACHINE_END 818MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-rx3715.c b/arch/arm/mach-s3c24xx/mach-rx3715.c
index dacbb9a2122a..f20418a2fb1b 100644
--- a/arch/arm/mach-s3c24xx/mach-rx3715.c
+++ b/arch/arm/mach-s3c24xx/mach-rx3715.c
@@ -31,27 +31,27 @@
31#include <linux/mtd/partitions.h> 31#include <linux/mtd/partitions.h>
32 32
33#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
34#include <asm/mach/map.h>
35#include <asm/mach/irq.h> 34#include <asm/mach/irq.h>
35#include <asm/mach/map.h>
36
37#include <linux/platform_data/mtd-nand-s3c2410.h>
36 38
37#include <mach/hardware.h>
38#include <asm/irq.h> 39#include <asm/irq.h>
39#include <asm/mach-types.h> 40#include <asm/mach-types.h>
40 41
41#include <plat/regs-serial.h> 42#include <mach/fb.h>
43#include <mach/hardware.h>
42#include <mach/regs-gpio.h> 44#include <mach/regs-gpio.h>
43#include <mach/regs-lcd.h> 45#include <mach/regs-lcd.h>
44 46
45#include <mach/h1940.h>
46#include <linux/platform_data/mtd-nand-s3c2410.h>
47#include <mach/fb.h>
48
49#include <plat/clock.h> 47#include <plat/clock.h>
50#include <plat/devs.h>
51#include <plat/cpu.h> 48#include <plat/cpu.h>
49#include <plat/devs.h>
52#include <plat/pm.h> 50#include <plat/pm.h>
51#include <plat/regs-serial.h>
53 52
54#include "common.h" 53#include "common.h"
54#include "h1940.h"
55 55
56static struct map_desc rx3715_iodesc[] __initdata = { 56static struct map_desc rx3715_iodesc[] __initdata = {
57 /* dump ISA space somewhere unused */ 57 /* dump ISA space somewhere unused */
@@ -212,6 +212,6 @@ MACHINE_START(RX3715, "IPAQ-RX3715")
212 .reserve = rx3715_reserve, 212 .reserve = rx3715_reserve,
213 .init_irq = rx3715_init_irq, 213 .init_irq = rx3715_init_irq,
214 .init_machine = rx3715_init_machine, 214 .init_machine = rx3715_init_machine,
215 .timer = &s3c24xx_timer, 215 .init_time = s3c24xx_timer_init,
216 .restart = s3c244x_restart, 216 .restart = s3c244x_restart,
217MACHINE_END 217MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2410.c b/arch/arm/mach-s3c24xx/mach-smdk2410.c
index 82796b97cb04..e184bfa9613a 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2410.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2410.c
@@ -117,6 +117,6 @@ MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switc
117 .map_io = smdk2410_map_io, 117 .map_io = smdk2410_map_io,
118 .init_irq = s3c24xx_init_irq, 118 .init_irq = s3c24xx_init_irq,
119 .init_machine = smdk2410_init, 119 .init_machine = smdk2410_init,
120 .timer = &s3c24xx_timer, 120 .init_time = s3c24xx_timer_init,
121 .restart = s3c2410_restart, 121 .restart = s3c2410_restart,
122MACHINE_END 122MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2413.c b/arch/arm/mach-s3c24xx/mach-smdk2413.c
index ce99fd8bbbc5..86d7847c9d45 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2413.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2413.c
@@ -37,7 +37,6 @@
37#include <mach/regs-gpio.h> 37#include <mach/regs-gpio.h>
38#include <mach/regs-lcd.h> 38#include <mach/regs-lcd.h>
39 39
40#include <mach/idle.h>
41#include <linux/platform_data/usb-s3c2410_udc.h> 40#include <linux/platform_data/usb-s3c2410_udc.h>
42#include <linux/platform_data/i2c-s3c2410.h> 41#include <linux/platform_data/i2c-s3c2410.h>
43#include <mach/fb.h> 42#include <mach/fb.h>
@@ -133,7 +132,7 @@ MACHINE_START(S3C2413, "S3C2413")
133 .init_irq = s3c24xx_init_irq, 132 .init_irq = s3c24xx_init_irq,
134 .map_io = smdk2413_map_io, 133 .map_io = smdk2413_map_io,
135 .init_machine = smdk2413_machine_init, 134 .init_machine = smdk2413_machine_init,
136 .timer = &s3c24xx_timer, 135 .init_time = s3c24xx_timer_init,
137 .restart = s3c2412_restart, 136 .restart = s3c2412_restart,
138MACHINE_END 137MACHINE_END
139 138
@@ -145,7 +144,7 @@ MACHINE_START(SMDK2412, "SMDK2412")
145 .init_irq = s3c24xx_init_irq, 144 .init_irq = s3c24xx_init_irq,
146 .map_io = smdk2413_map_io, 145 .map_io = smdk2413_map_io,
147 .init_machine = smdk2413_machine_init, 146 .init_machine = smdk2413_machine_init,
148 .timer = &s3c24xx_timer, 147 .init_time = s3c24xx_timer_init,
149 .restart = s3c2412_restart, 148 .restart = s3c2412_restart,
150MACHINE_END 149MACHINE_END
151 150
@@ -157,6 +156,6 @@ MACHINE_START(SMDK2413, "SMDK2413")
157 .init_irq = s3c24xx_init_irq, 156 .init_irq = s3c24xx_init_irq,
158 .map_io = smdk2413_map_io, 157 .map_io = smdk2413_map_io,
159 .init_machine = smdk2413_machine_init, 158 .init_machine = smdk2413_machine_init,
160 .timer = &s3c24xx_timer, 159 .init_time = s3c24xx_timer_init,
161 .restart = s3c2412_restart, 160 .restart = s3c2412_restart,
162MACHINE_END 161MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2416.c b/arch/arm/mach-s3c24xx/mach-smdk2416.c
index f30d7fccbfee..72dfec689322 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2416.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2416.c
@@ -39,7 +39,6 @@
39#include <mach/regs-lcd.h> 39#include <mach/regs-lcd.h>
40#include <mach/regs-s3c2443-clock.h> 40#include <mach/regs-s3c2443-clock.h>
41 41
42#include <mach/idle.h>
43#include <linux/platform_data/leds-s3c24xx.h> 42#include <linux/platform_data/leds-s3c24xx.h>
44#include <linux/platform_data/i2c-s3c2410.h> 43#include <linux/platform_data/i2c-s3c2410.h>
45 44
@@ -254,6 +253,6 @@ MACHINE_START(SMDK2416, "SMDK2416")
254 .init_irq = s3c24xx_init_irq, 253 .init_irq = s3c24xx_init_irq,
255 .map_io = smdk2416_map_io, 254 .map_io = smdk2416_map_io,
256 .init_machine = smdk2416_machine_init, 255 .init_machine = smdk2416_machine_init,
257 .timer = &s3c24xx_timer, 256 .init_time = s3c24xx_timer_init,
258 .restart = s3c2416_restart, 257 .restart = s3c2416_restart,
259MACHINE_END 258MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2440.c b/arch/arm/mach-s3c24xx/mach-smdk2440.c
index b7ff882c6ce6..08cc38c8a4ae 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2440.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2440.c
@@ -35,7 +35,6 @@
35#include <mach/regs-gpio.h> 35#include <mach/regs-gpio.h>
36#include <mach/regs-lcd.h> 36#include <mach/regs-lcd.h>
37 37
38#include <mach/idle.h>
39#include <mach/fb.h> 38#include <mach/fb.h>
40#include <linux/platform_data/i2c-s3c2410.h> 39#include <linux/platform_data/i2c-s3c2410.h>
41 40
@@ -182,6 +181,6 @@ MACHINE_START(S3C2440, "SMDK2440")
182 .init_irq = s3c24xx_init_irq, 181 .init_irq = s3c24xx_init_irq,
183 .map_io = smdk2440_map_io, 182 .map_io = smdk2440_map_io,
184 .init_machine = smdk2440_machine_init, 183 .init_machine = smdk2440_machine_init,
185 .timer = &s3c24xx_timer, 184 .init_time = s3c24xx_timer_init,
186 .restart = s3c244x_restart, 185 .restart = s3c244x_restart,
187MACHINE_END 186MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-smdk2443.c b/arch/arm/mach-s3c24xx/mach-smdk2443.c
index 2568656f046f..406c8137620e 100644
--- a/arch/arm/mach-s3c24xx/mach-smdk2443.c
+++ b/arch/arm/mach-s3c24xx/mach-smdk2443.c
@@ -35,7 +35,6 @@
35#include <mach/regs-gpio.h> 35#include <mach/regs-gpio.h>
36#include <mach/regs-lcd.h> 36#include <mach/regs-lcd.h>
37 37
38#include <mach/idle.h>
39#include <mach/fb.h> 38#include <mach/fb.h>
40#include <linux/platform_data/i2c-s3c2410.h> 39#include <linux/platform_data/i2c-s3c2410.h>
41 40
@@ -144,6 +143,6 @@ MACHINE_START(SMDK2443, "SMDK2443")
144 .init_irq = s3c24xx_init_irq, 143 .init_irq = s3c24xx_init_irq,
145 .map_io = smdk2443_map_io, 144 .map_io = smdk2443_map_io,
146 .init_machine = smdk2443_machine_init, 145 .init_machine = smdk2443_machine_init,
147 .timer = &s3c24xx_timer, 146 .init_time = s3c24xx_timer_init,
148 .restart = s3c2443_restart, 147 .restart = s3c2443_restart,
149MACHINE_END 148MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-tct_hammer.c b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
index 495bf5cf52e9..24b3d79e7b2c 100644
--- a/arch/arm/mach-s3c24xx/mach-tct_hammer.c
+++ b/arch/arm/mach-s3c24xx/mach-tct_hammer.c
@@ -149,6 +149,6 @@ MACHINE_START(TCT_HAMMER, "TCT_HAMMER")
149 .map_io = tct_hammer_map_io, 149 .map_io = tct_hammer_map_io,
150 .init_irq = s3c24xx_init_irq, 150 .init_irq = s3c24xx_init_irq,
151 .init_machine = tct_hammer_init, 151 .init_machine = tct_hammer_init,
152 .timer = &s3c24xx_timer, 152 .init_time = s3c24xx_timer_init,
153 .restart = s3c2410_restart, 153 .restart = s3c2410_restart,
154MACHINE_END 154MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-vr1000.c b/arch/arm/mach-s3c24xx/mach-vr1000.c
index 14d5b12e388c..ec42d1e4e465 100644
--- a/arch/arm/mach-s3c24xx/mach-vr1000.c
+++ b/arch/arm/mach-s3c24xx/mach-vr1000.c
@@ -1,5 +1,4 @@
1/* linux/arch/arm/mach-s3c2410/mach-vr1000.c 1/*
2 *
3 * Copyright (c) 2003-2008 Simtec Electronics 2 * Copyright (c) 2003-2008 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 3 * Ben Dooks <ben@simtec.co.uk>
5 * 4 *
@@ -32,27 +31,25 @@
32#include <asm/mach/map.h> 31#include <asm/mach/map.h>
33#include <asm/mach/irq.h> 32#include <asm/mach/irq.h>
34 33
35#include <mach/bast-map.h>
36#include <mach/vr1000-map.h>
37#include <mach/vr1000-irq.h>
38#include <mach/vr1000-cpld.h>
39
40#include <mach/hardware.h>
41#include <asm/irq.h> 34#include <asm/irq.h>
42#include <asm/mach-types.h> 35#include <asm/mach-types.h>
43 36
44#include <plat/regs-serial.h>
45#include <mach/regs-gpio.h>
46#include <linux/platform_data/leds-s3c24xx.h> 37#include <linux/platform_data/leds-s3c24xx.h>
38#include <linux/platform_data/i2c-s3c2410.h>
39#include <linux/platform_data/asoc-s3c24xx_simtec.h>
40
41#include <mach/hardware.h>
42#include <mach/regs-gpio.h>
47 43
48#include <plat/clock.h> 44#include <plat/clock.h>
49#include <plat/devs.h>
50#include <plat/cpu.h> 45#include <plat/cpu.h>
51#include <linux/platform_data/i2c-s3c2410.h> 46#include <plat/devs.h>
52#include <linux/platform_data/asoc-s3c24xx_simtec.h> 47#include <plat/regs-serial.h>
53 48
54#include "simtec.h" 49#include "bast.h"
55#include "common.h" 50#include "common.h"
51#include "simtec.h"
52#include "vr1000.h"
56 53
57/* macros for virtual address mods for the io space entries */ 54/* macros for virtual address mods for the io space entries */
58#define VA_C5(item) ((unsigned long)(item) + BAST_VAM_CS5) 55#define VA_C5(item) ((unsigned long)(item) + BAST_VAM_CS5)
@@ -143,7 +140,7 @@ static struct s3c2410_uartcfg vr1000_uartcfgs[] __initdata = {
143static struct plat_serial8250_port serial_platform_data[] = { 140static struct plat_serial8250_port serial_platform_data[] = {
144 [0] = { 141 [0] = {
145 .mapbase = VR1000_SERIAL_MAPBASE(0), 142 .mapbase = VR1000_SERIAL_MAPBASE(0),
146 .irq = IRQ_VR1000_SERIAL + 0, 143 .irq = VR1000_IRQ_SERIAL + 0,
147 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, 144 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
148 .iotype = UPIO_MEM, 145 .iotype = UPIO_MEM,
149 .regshift = 0, 146 .regshift = 0,
@@ -151,7 +148,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
151 }, 148 },
152 [1] = { 149 [1] = {
153 .mapbase = VR1000_SERIAL_MAPBASE(1), 150 .mapbase = VR1000_SERIAL_MAPBASE(1),
154 .irq = IRQ_VR1000_SERIAL + 1, 151 .irq = VR1000_IRQ_SERIAL + 1,
155 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, 152 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
156 .iotype = UPIO_MEM, 153 .iotype = UPIO_MEM,
157 .regshift = 0, 154 .regshift = 0,
@@ -159,7 +156,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
159 }, 156 },
160 [2] = { 157 [2] = {
161 .mapbase = VR1000_SERIAL_MAPBASE(2), 158 .mapbase = VR1000_SERIAL_MAPBASE(2),
162 .irq = IRQ_VR1000_SERIAL + 2, 159 .irq = VR1000_IRQ_SERIAL + 2,
163 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, 160 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
164 .iotype = UPIO_MEM, 161 .iotype = UPIO_MEM,
165 .regshift = 0, 162 .regshift = 0,
@@ -167,7 +164,7 @@ static struct plat_serial8250_port serial_platform_data[] = {
167 }, 164 },
168 [3] = { 165 [3] = {
169 .mapbase = VR1000_SERIAL_MAPBASE(3), 166 .mapbase = VR1000_SERIAL_MAPBASE(3),
170 .irq = IRQ_VR1000_SERIAL + 3, 167 .irq = VR1000_IRQ_SERIAL + 3,
171 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, 168 .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
172 .iotype = UPIO_MEM, 169 .iotype = UPIO_MEM,
173 .regshift = 0, 170 .regshift = 0,
@@ -189,14 +186,14 @@ static struct platform_device serial_device = {
189static struct resource vr1000_dm9k0_resource[] = { 186static struct resource vr1000_dm9k0_resource[] = {
190 [0] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000, 4), 187 [0] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000, 4),
191 [1] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000 + 0x40, 0x40), 188 [1] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000 + 0x40, 0x40),
192 [2] = DEFINE_RES_NAMED(IRQ_VR1000_DM9000A, 1, NULL, IORESOURCE_IRQ \ 189 [2] = DEFINE_RES_NAMED(VR1000_IRQ_DM9000A, 1, NULL, IORESOURCE_IRQ \
193 | IORESOURCE_IRQ_HIGHLEVEL), 190 | IORESOURCE_IRQ_HIGHLEVEL),
194}; 191};
195 192
196static struct resource vr1000_dm9k1_resource[] = { 193static struct resource vr1000_dm9k1_resource[] = {
197 [0] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000 + 0x80, 4), 194 [0] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000 + 0x80, 4),
198 [1] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000 + 0xC0, 0x40), 195 [1] = DEFINE_RES_MEM(S3C2410_CS5 + VR1000_PA_DM9000 + 0xC0, 0x40),
199 [2] = DEFINE_RES_NAMED(IRQ_VR1000_DM9000N, 1, NULL, IORESOURCE_IRQ \ 196 [2] = DEFINE_RES_NAMED(VR1000_IRQ_DM9000N, 1, NULL, IORESOURCE_IRQ \
200 | IORESOURCE_IRQ_HIGHLEVEL), 197 | IORESOURCE_IRQ_HIGHLEVEL),
201}; 198};
202 199
@@ -357,6 +354,6 @@ MACHINE_START(VR1000, "Thorcom-VR1000")
357 .map_io = vr1000_map_io, 354 .map_io = vr1000_map_io,
358 .init_machine = vr1000_init, 355 .init_machine = vr1000_init,
359 .init_irq = s3c24xx_init_irq, 356 .init_irq = s3c24xx_init_irq,
360 .timer = &s3c24xx_timer, 357 .init_time = s3c24xx_timer_init,
361 .restart = s3c2410_restart, 358 .restart = s3c2410_restart,
362MACHINE_END 359MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/mach-vstms.c b/arch/arm/mach-s3c24xx/mach-vstms.c
index f1d44ae11833..3e2bfddc9df1 100644
--- a/arch/arm/mach-s3c24xx/mach-vstms.c
+++ b/arch/arm/mach-s3c24xx/mach-vstms.c
@@ -36,7 +36,6 @@
36#include <mach/regs-gpio.h> 36#include <mach/regs-gpio.h>
37#include <mach/regs-lcd.h> 37#include <mach/regs-lcd.h>
38 38
39#include <mach/idle.h>
40#include <mach/fb.h> 39#include <mach/fb.h>
41 40
42#include <linux/platform_data/i2c-s3c2410.h> 41#include <linux/platform_data/i2c-s3c2410.h>
@@ -161,6 +160,6 @@ MACHINE_START(VSTMS, "VSTMS")
161 .init_irq = s3c24xx_init_irq, 160 .init_irq = s3c24xx_init_irq,
162 .init_machine = vstms_init, 161 .init_machine = vstms_init,
163 .map_io = vstms_map_io, 162 .map_io = vstms_map_io,
164 .timer = &s3c24xx_timer, 163 .init_time = s3c24xx_timer_init,
165 .restart = s3c2412_restart, 164 .restart = s3c2412_restart,
166MACHINE_END 165MACHINE_END
diff --git a/arch/arm/mach-s3c24xx/include/mach/osiris-map.h b/arch/arm/mach-s3c24xx/osiris.h
index 17380f848428..b8d56074abac 100644
--- a/arch/arm/mach-s3c24xx/include/mach/osiris-map.h
+++ b/arch/arm/mach-s3c24xx/osiris.h
@@ -1,9 +1,9 @@
1/* arch/arm/mach-s3c2410/include/mach/osiris-map.h 1/*
2 *
3 * Copyright 2005 Simtec Electronics 2 * Copyright 2005 Simtec Electronics
4 * http://www.simtec.co.uk/products/ 3 * http://www.simtec.co.uk/products/
5 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
6 * 5 *
6 * OSIRIS - CPLD control constants
7 * OSIRIS - Memory map definitions 7 * OSIRIS - Memory map definitions
8 * 8 *
9 * This program is free software; you can redistribute it and/or modify 9 * This program is free software; you can redistribute it and/or modify
@@ -11,10 +11,21 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12*/ 12*/
13 13
14/* needs arch/map.h including with this */ 14#ifndef __MACH_S3C24XX_OSIRIS_H
15#define __MACH_S3C24XX_OSIRIS_H __FILE__
16
17/* CTRL0 - NAND WP control */
18
19#define OSIRIS_CTRL0_NANDSEL (0x3)
20#define OSIRIS_CTRL0_BOOT_INT (1<<3)
21#define OSIRIS_CTRL0_PCMCIA (1<<4)
22#define OSIRIS_CTRL0_FIX8 (1<<5)
23#define OSIRIS_CTRL0_PCMCIA_nWAIT (1<<6)
24#define OSIRIS_CTRL0_PCMCIA_nIOIS16 (1<<7)
25
26#define OSIRIS_CTRL1_FIX8 (1<<0)
15 27
16#ifndef __ASM_ARCH_OSIRISMAP_H 28#define OSIRIS_ID_REVMASK (0x7)
17#define __ASM_ARCH_OSIRISMAP_H
18 29
19/* start peripherals off after the S3C2410 */ 30/* start peripherals off after the S3C2410 */
20 31
@@ -39,4 +50,4 @@
39#define OSIRIS_VA_IDREG OSIRIS_IOADDR(0x00700000) 50#define OSIRIS_VA_IDREG OSIRIS_IOADDR(0x00700000)
40#define OSIRIS_PA_IDREG (OSIRIS_PA_CPLD + (7<<23)) 51#define OSIRIS_PA_IDREG (OSIRIS_PA_CPLD + (7<<23))
41 52
42#endif /* __ASM_ARCH_OSIRISMAP_H */ 53#endif /* __MACH_S3C24XX_OSIRIS_H */
diff --git a/arch/arm/mach-s3c24xx/include/mach/otom-map.h b/arch/arm/mach-s3c24xx/otom.h
index f9277a52c145..321b7be1c0f7 100644
--- a/arch/arm/mach-s3c24xx/include/mach/otom-map.h
+++ b/arch/arm/mach-s3c24xx/otom.h
@@ -1,5 +1,4 @@
1/* arch/arm/mach-s3c2410/include/mach/otom-map.h 1/*
2 *
3 * (c) 2005 Guillaume GOURAT / NexVision 2 * (c) 2005 Guillaume GOURAT / NexVision
4 * guillaume.gourat@nexvision.fr 3 * guillaume.gourat@nexvision.fr
5 * 4 *
@@ -10,21 +9,20 @@
10 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
11*/ 10*/
12 11
13/* needs arch/map.h including with this */ 12/*
14 13 * ok, we've used up to 0x01300000, now we need to find space for the
15/* ok, we've used up to 0x01300000, now we need to find space for the
16 * peripherals that live in the nGCS[x] areas, which are quite numerous 14 * peripherals that live in the nGCS[x] areas, which are quite numerous
17 * in their space. 15 * in their space.
18 */ 16 */
19 17
20#ifndef __ASM_ARCH_OTOMMAP_H 18#ifndef __MACH_S3C24XX_OTOM_H
21#define __ASM_ARCH_OTOMMAP_H 19#define __MACH_S3C24XX_OTOM_H __FILE__
22 20
23#define OTOM_PA_CS8900A_BASE (S3C2410_CS3 + 0x01000000) /* nGCS3 +0x01000000 */ 21#define OTOM_PA_CS8900A_BASE (S3C2410_CS3 + 0x01000000) /* nGCS3 +0x01000000 */
24#define OTOM_VA_CS8900A_BASE S3C2410_ADDR(0x04000000) /* 0xF4000000 */ 22#define OTOM_VA_CS8900A_BASE S3C2410_ADDR(0x04000000) /* 0xF4000000 */
25 23
26/* physical offset addresses for the peripherals */ 24/* physical offset addresses for the peripherals */
27 25
28#define OTOM_PA_FLASH0_BASE (S3C2410_CS0) /* Bank 0 */ 26#define OTOM_PA_FLASH0_BASE (S3C2410_CS0)
29 27
30#endif /* __ASM_ARCH_OTOMMAP_H */ 28#endif /* __MACH_S3C24XX_OTOM_H */
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2410.c b/arch/arm/mach-s3c24xx/pm-s3c2410.c
index 949ae05e07c5..2d82c4f116cd 100644
--- a/arch/arm/mach-s3c24xx/pm-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/pm-s3c2410.c
@@ -29,16 +29,16 @@
29#include <linux/gpio.h> 29#include <linux/gpio.h>
30#include <linux/io.h> 30#include <linux/io.h>
31 31
32#include <mach/hardware.h>
33
34#include <asm/mach-types.h> 32#include <asm/mach-types.h>
35 33
34#include <mach/hardware.h>
36#include <mach/regs-gpio.h> 35#include <mach/regs-gpio.h>
37#include <mach/h1940.h>
38 36
39#include <plat/cpu.h> 37#include <plat/cpu.h>
40#include <plat/pm.h> 38#include <plat/pm.h>
41 39
40#include "h1940.h"
41
42static void s3c2410_pm_prepare(void) 42static void s3c2410_pm_prepare(void)
43{ 43{
44 /* ensure at least GSTATUS3 has the resume address */ 44 /* ensure at least GSTATUS3 has the resume address */
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2412.c b/arch/arm/mach-s3c24xx/pm-s3c2412.c
index c60f67a75aff..206765cc4092 100644
--- a/arch/arm/mach-s3c24xx/pm-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/pm-s3c2412.c
@@ -21,19 +21,19 @@
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/io.h> 22#include <linux/io.h>
23 23
24#include <mach/hardware.h>
25#include <asm/cacheflush.h> 24#include <asm/cacheflush.h>
26#include <asm/irq.h> 25#include <asm/irq.h>
27 26
28#include <mach/regs-power.h> 27#include <mach/hardware.h>
29#include <mach/regs-gpio.h> 28#include <mach/regs-gpio.h>
30#include <mach/regs-dsc.h> 29#include <mach/regs-power.h>
31 30
32#include <plat/cpu.h> 31#include <plat/cpu.h>
33#include <plat/pm.h> 32#include <plat/pm.h>
34
35#include <plat/s3c2412.h> 33#include <plat/s3c2412.h>
36 34
35#include "regs-dsc.h"
36
37extern void s3c2412_sleep_enter(void); 37extern void s3c2412_sleep_enter(void);
38 38
39static int s3c2412_cpu_suspend(unsigned long arg) 39static int s3c2412_cpu_suspend(unsigned long arg)
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-dsc.h b/arch/arm/mach-s3c24xx/regs-dsc.h
index 98fd4a05587c..98fd4a05587c 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-dsc.h
+++ b/arch/arm/mach-s3c24xx/regs-dsc.h
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
index 6c5f4031ff0c..c511a225f07a 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c24xx/s3c2412.c
@@ -1,5 +1,4 @@
1/* linux/arch/arm/mach-s3c2412/s3c2412.c 1/*
2 *
3 * Copyright (c) 2006 Simtec Electronics 2 * Copyright (c) 2006 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 3 * Ben Dooks <ben@simtec.co.uk>
5 * 4 *
@@ -28,28 +27,30 @@
28#include <asm/mach/map.h> 27#include <asm/mach/map.h>
29#include <asm/mach/irq.h> 28#include <asm/mach/irq.h>
30 29
31#include <mach/hardware.h>
32#include <asm/proc-fns.h> 30#include <asm/proc-fns.h>
33#include <asm/irq.h> 31#include <asm/irq.h>
34#include <asm/system_misc.h> 32#include <asm/system_misc.h>
35 33
36#include <plat/cpu-freq.h> 34#include <mach/hardware.h>
37
38#include <mach/regs-clock.h> 35#include <mach/regs-clock.h>
39#include <plat/regs-serial.h>
40#include <mach/regs-power.h>
41#include <mach/regs-gpio.h> 36#include <mach/regs-gpio.h>
42#include <mach/regs-dsc.h> 37#include <mach/regs-power.h>
43#include <plat/regs-spi.h>
44#include <mach/regs-s3c2412.h>
45 38
46#include <plat/s3c2412.h> 39#include <plat/clock.h>
47#include <plat/cpu.h> 40#include <plat/cpu.h>
41#include <plat/cpu-freq.h>
48#include <plat/devs.h> 42#include <plat/devs.h>
49#include <plat/clock.h>
50#include <plat/pm.h>
51#include <plat/pll.h>
52#include <plat/nand-core.h> 43#include <plat/nand-core.h>
44#include <plat/pll.h>
45#include <plat/pm.h>
46#include <plat/regs-serial.h>
47#include <plat/regs-spi.h>
48#include <plat/s3c2412.h>
49
50#include "regs-dsc.h"
51
52#define S3C2412_SWRST (S3C24XX_VA_CLKPWR + 0x30)
53#define S3C2412_SWRST_RESET (0x533C2412)
53 54
54#ifndef CONFIG_CPU_S3C2412_ONLY 55#ifndef CONFIG_CPU_S3C2412_ONLY
55void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO; 56void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO;
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
index b0b60a1154d6..ad2671baa910 100644
--- a/arch/arm/mach-s3c24xx/s3c244x.c
+++ b/arch/arm/mach-s3c24xx/s3c244x.c
@@ -36,7 +36,6 @@
36#include <mach/regs-clock.h> 36#include <mach/regs-clock.h>
37#include <plat/regs-serial.h> 37#include <plat/regs-serial.h>
38#include <mach/regs-gpio.h> 38#include <mach/regs-gpio.h>
39#include <mach/regs-dsc.h>
40 39
41#include <plat/s3c2410.h> 40#include <plat/s3c2410.h>
42#include <plat/s3c244x.h> 41#include <plat/s3c244x.h>
@@ -48,6 +47,8 @@
48#include <plat/nand-core.h> 47#include <plat/nand-core.h>
49#include <plat/watchdog-reset.h> 48#include <plat/watchdog-reset.h>
50 49
50#include "regs-dsc.h"
51
51static struct map_desc s3c244x_iodesc[] __initdata = { 52static struct map_desc s3c244x_iodesc[] __initdata = {
52 IODESC_ENT(CLKPWR), 53 IODESC_ENT(CLKPWR),
53 IODESC_ENT(TIMER), 54 IODESC_ENT(TIMER),
diff --git a/arch/arm/mach-s3c24xx/simtec-audio.c b/arch/arm/mach-s3c24xx/simtec-audio.c
index fd0ef05763a9..67cb5120dfeb 100644
--- a/arch/arm/mach-s3c24xx/simtec-audio.c
+++ b/arch/arm/mach-s3c24xx/simtec-audio.c
@@ -17,16 +17,13 @@
17#include <linux/device.h> 17#include <linux/device.h>
18#include <linux/io.h> 18#include <linux/io.h>
19 19
20#include <mach/bast-map.h>
21#include <mach/bast-irq.h>
22#include <mach/bast-cpld.h>
23
24#include <mach/hardware.h> 20#include <mach/hardware.h>
25#include <mach/regs-gpio.h> 21#include <mach/regs-gpio.h>
26 22
27#include <linux/platform_data/asoc-s3c24xx_simtec.h> 23#include <linux/platform_data/asoc-s3c24xx_simtec.h>
28#include <plat/devs.h> 24#include <plat/devs.h>
29 25
26#include "bast.h"
30#include "simtec.h" 27#include "simtec.h"
31 28
32/* platform ops for audio */ 29/* platform ops for audio */
diff --git a/arch/arm/mach-s3c24xx/simtec-nor.c b/arch/arm/mach-s3c24xx/simtec-nor.c
index 029744fcaacb..8884bffa619a 100644
--- a/arch/arm/mach-s3c24xx/simtec-nor.c
+++ b/arch/arm/mach-s3c24xx/simtec-nor.c
@@ -27,9 +27,8 @@
27#include <asm/mach/irq.h> 27#include <asm/mach/irq.h>
28 28
29#include <mach/map.h> 29#include <mach/map.h>
30#include <mach/bast-map.h>
31#include <mach/bast-cpld.h>
32 30
31#include "bast.h"
33#include "simtec.h" 32#include "simtec.h"
34 33
35static void simtec_nor_vpp(struct platform_device *pdev, int vpp) 34static void simtec_nor_vpp(struct platform_device *pdev, int vpp)
diff --git a/arch/arm/mach-s3c24xx/simtec-usb.c b/arch/arm/mach-s3c24xx/simtec-usb.c
index ddf7a3c743ac..2ed2e32430dc 100644
--- a/arch/arm/mach-s3c24xx/simtec-usb.c
+++ b/arch/arm/mach-s3c24xx/simtec-usb.c
@@ -28,15 +28,13 @@
28#include <asm/mach/map.h> 28#include <asm/mach/map.h>
29#include <asm/mach/irq.h> 29#include <asm/mach/irq.h>
30 30
31#include <mach/bast-map.h>
32#include <mach/bast-irq.h>
33
34#include <mach/hardware.h> 31#include <mach/hardware.h>
35#include <asm/irq.h> 32#include <asm/irq.h>
36 33
37#include <linux/platform_data/usb-ohci-s3c2410.h> 34#include <linux/platform_data/usb-ohci-s3c2410.h>
38#include <plat/devs.h> 35#include <plat/devs.h>
39 36
37#include "bast.h"
40#include "simtec.h" 38#include "simtec.h"
41 39
42/* control power and monitor over-current events on various Simtec 40/* control power and monitor over-current events on various Simtec
@@ -79,7 +77,7 @@ static void usb_simtec_enableoc(struct s3c2410_hcd_info *info, int on)
79 int ret; 77 int ret;
80 78
81 if (on) { 79 if (on) {
82 ret = request_irq(IRQ_USBOC, usb_simtec_ocirq, 80 ret = request_irq(BAST_IRQ_USBOC, usb_simtec_ocirq,
83 IRQF_DISABLED | IRQF_TRIGGER_RISING | 81 IRQF_DISABLED | IRQF_TRIGGER_RISING |
84 IRQF_TRIGGER_FALLING, 82 IRQF_TRIGGER_FALLING,
85 "USB Over-current", info); 83 "USB Over-current", info);
@@ -87,7 +85,7 @@ static void usb_simtec_enableoc(struct s3c2410_hcd_info *info, int on)
87 printk(KERN_ERR "failed to request usb oc irq\n"); 85 printk(KERN_ERR "failed to request usb oc irq\n");
88 } 86 }
89 } else { 87 } else {
90 free_irq(IRQ_USBOC, info); 88 free_irq(BAST_IRQ_USBOC, info);
91 } 89 }
92} 90}
93 91
diff --git a/arch/arm/mach-s3c24xx/vr1000.h b/arch/arm/mach-s3c24xx/vr1000.h
new file mode 100644
index 000000000000..7fcd2c2f183c
--- /dev/null
+++ b/arch/arm/mach-s3c24xx/vr1000.h
@@ -0,0 +1,118 @@
1
2/* arch/arm/mach-s3c2410/include/mach/vr1000-cpld.h
3 *
4 * Copyright (c) 2003 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * VR1000 - CPLD control constants
8 * Machine VR1000 - IRQ Number definitions
9 * Machine VR1000 - Memory map definitions
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
14*/
15
16#ifndef __MACH_S3C24XX_VR1000_H
17#define __MACH_S3C24XX_VR1000_H __FILE__
18
19#define VR1000_CPLD_CTRL2_RAMWEN (0x04) /* SRAM Write Enable */
20
21/* irq numbers to onboard peripherals */
22
23#define VR1000_IRQ_USBOC IRQ_EINT19
24#define VR1000_IRQ_IDE0 IRQ_EINT16
25#define VR1000_IRQ_IDE1 IRQ_EINT17
26#define VR1000_IRQ_SERIAL IRQ_EINT12
27#define VR1000_IRQ_DM9000A IRQ_EINT10
28#define VR1000_IRQ_DM9000N IRQ_EINT9
29#define VR1000_IRQ_SMALERT IRQ_EINT8
30
31/* map */
32
33#define VR1000_IOADDR(x) (S3C2410_ADDR((x) + 0x01300000))
34
35/* we put the CPLD registers next, to get them out of the way */
36
37#define VR1000_VA_CTRL1 VR1000_IOADDR(0x00000000) /* 0x01300000 */
38#define VR1000_PA_CTRL1 (S3C2410_CS5 | 0x7800000)
39
40#define VR1000_VA_CTRL2 VR1000_IOADDR(0x00100000) /* 0x01400000 */
41#define VR1000_PA_CTRL2 (S3C2410_CS1 | 0x6000000)
42
43#define VR1000_VA_CTRL3 VR1000_IOADDR(0x00200000) /* 0x01500000 */
44#define VR1000_PA_CTRL3 (S3C2410_CS1 | 0x6800000)
45
46#define VR1000_VA_CTRL4 VR1000_IOADDR(0x00300000) /* 0x01600000 */
47#define VR1000_PA_CTRL4 (S3C2410_CS1 | 0x7000000)
48
49/* next, we have the PC104 ISA interrupt registers */
50
51#define VR1000_PA_PC104_IRQREQ (S3C2410_CS5 | 0x6000000) /* 0x01700000 */
52#define VR1000_VA_PC104_IRQREQ VR1000_IOADDR(0x00400000)
53
54#define VR1000_PA_PC104_IRQRAW (S3C2410_CS5 | 0x6800000) /* 0x01800000 */
55#define VR1000_VA_PC104_IRQRAW VR1000_IOADDR(0x00500000)
56
57#define VR1000_PA_PC104_IRQMASK (S3C2410_CS5 | 0x7000000) /* 0x01900000 */
58#define VR1000_VA_PC104_IRQMASK VR1000_IOADDR(0x00600000)
59
60/*
61 * 0xE0000000 contains the IO space that is split by speed and
62 * whether the access is for 8 or 16bit IO... this ensures that
63 * the correct access is made
64 *
65 * 0x10000000 of space, partitioned as so:
66 *
67 * 0x00000000 to 0x04000000 8bit, slow
68 * 0x04000000 to 0x08000000 16bit, slow
69 * 0x08000000 to 0x0C000000 16bit, net
70 * 0x0C000000 to 0x10000000 16bit, fast
71 *
72 * each of these spaces has the following in:
73 *
74 * 0x02000000 to 0x02100000 1MB IDE primary channel
75 * 0x02100000 to 0x02200000 1MB IDE primary channel aux
76 * 0x02200000 to 0x02400000 1MB IDE secondary channel
77 * 0x02300000 to 0x02400000 1MB IDE secondary channel aux
78 * 0x02500000 to 0x02600000 1MB Davicom DM9000 ethernet controllers
79 * 0x02600000 to 0x02700000 1MB
80 *
81 * the phyiscal layout of the zones are:
82 * nGCS2 - 8bit, slow
83 * nGCS3 - 16bit, slow
84 * nGCS4 - 16bit, net
85 * nGCS5 - 16bit, fast
86 */
87
88#define VR1000_VA_MULTISPACE (0xE0000000)
89
90#define VR1000_VA_ISAIO (VR1000_VA_MULTISPACE + 0x00000000)
91#define VR1000_VA_ISAMEM (VR1000_VA_MULTISPACE + 0x01000000)
92#define VR1000_VA_IDEPRI (VR1000_VA_MULTISPACE + 0x02000000)
93#define VR1000_VA_IDEPRIAUX (VR1000_VA_MULTISPACE + 0x02100000)
94#define VR1000_VA_IDESEC (VR1000_VA_MULTISPACE + 0x02200000)
95#define VR1000_VA_IDESECAUX (VR1000_VA_MULTISPACE + 0x02300000)
96#define VR1000_VA_ASIXNET (VR1000_VA_MULTISPACE + 0x02400000)
97#define VR1000_VA_DM9000 (VR1000_VA_MULTISPACE + 0x02500000)
98#define VR1000_VA_SUPERIO (VR1000_VA_MULTISPACE + 0x02600000)
99
100/* physical offset addresses for the peripherals */
101
102#define VR1000_PA_IDEPRI (0x02000000)
103#define VR1000_PA_IDEPRIAUX (0x02800000)
104#define VR1000_PA_IDESEC (0x03000000)
105#define VR1000_PA_IDESECAUX (0x03800000)
106#define VR1000_PA_DM9000 (0x05000000)
107
108#define VR1000_PA_SERIAL (0x11800000)
109#define VR1000_VA_SERIAL (VR1000_IOADDR(0x00700000))
110
111/* VR1000 ram is in CS1, with A26..A24 = 2_101 */
112#define VR1000_PA_SRAM (S3C2410_CS1 | 0x05000000)
113
114/* some configurations for the peripherals */
115
116#define VR1000_DM9000_CS VR1000_VAM_CS4
117
118#endif /* __MACH_S3C24XX_VR1000_H */
diff --git a/arch/arm/mach-s3c64xx/clock.c b/arch/arm/mach-s3c64xx/clock.c
index 803711e283b2..8499415be9cd 100644
--- a/arch/arm/mach-s3c64xx/clock.c
+++ b/arch/arm/mach-s3c64xx/clock.c
@@ -23,7 +23,6 @@
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24#include <mach/map.h> 24#include <mach/map.h>
25 25
26#include <mach/regs-sys.h>
27#include <mach/regs-clock.h> 26#include <mach/regs-clock.h>
28 27
29#include <plat/cpu.h> 28#include <plat/cpu.h>
@@ -33,6 +32,8 @@
33#include <plat/clock-clksrc.h> 32#include <plat/clock-clksrc.h>
34#include <plat/pll.h> 33#include <plat/pll.h>
35 34
35#include "regs-sys.h"
36
36/* fin_apll, fin_mpll and fin_epll are all the same clock, which we call 37/* fin_apll, fin_mpll and fin_epll are all the same clock, which we call
37 * ext_xtal_mux for want of an actual name from the manual. 38 * ext_xtal_mux for want of an actual name from the manual.
38*/ 39*/
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/cpuidle.c b/arch/arm/mach-s3c64xx/cpuidle.c
index acb197ccf3f7..ead5fab0dbb5 100644
--- a/arch/arm/mach-s3c64xx/cpuidle.c
+++ b/arch/arm/mach-s3c64xx/cpuidle.c
@@ -20,8 +20,8 @@
20 20
21#include <mach/map.h> 21#include <mach/map.h>
22 22
23#include <mach/regs-sys.h> 23#include "regs-sys.h"
24#include <mach/regs-syscon-power.h> 24#include "regs-syscon-power.h"
25 25
26static int s3c64xx_enter_idle(struct cpuidle_device *dev, 26static int s3c64xx_enter_idle(struct cpuidle_device *dev,
27 struct cpuidle_driver *drv, 27 struct cpuidle_driver *drv,
diff --git a/arch/arm/mach-s3c64xx/include/mach/crag6410.h b/arch/arm/mach-s3c64xx/crag6410.h
index 4c3c9994fc2c..4c3c9994fc2c 100644
--- a/arch/arm/mach-s3c64xx/include/mach/crag6410.h
+++ b/arch/arm/mach-s3c64xx/crag6410.h
diff --git a/arch/arm/mach-s3c64xx/dma.c b/arch/arm/mach-s3c64xx/dma.c
index f2a7a1725596..ec29b35f25c0 100644
--- a/arch/arm/mach-s3c64xx/dma.c
+++ b/arch/arm/mach-s3c64xx/dma.c
@@ -28,10 +28,10 @@
28#include <mach/map.h> 28#include <mach/map.h>
29#include <mach/irqs.h> 29#include <mach/irqs.h>
30 30
31#include <mach/regs-sys.h>
32
33#include <asm/hardware/pl080.h> 31#include <asm/hardware/pl080.h>
34 32
33#include "regs-sys.h"
34
35/* dma channel state information */ 35/* dma channel state information */
36 36
37struct s3c64xx_dmac { 37struct s3c64xx_dmac {
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/regs-sys.h b/arch/arm/mach-s3c64xx/include/mach/regs-sys.h
deleted file mode 100644
index b91e02093289..000000000000
--- a/arch/arm/mach-s3c64xx/include/mach/regs-sys.h
+++ /dev/null
@@ -1,31 +0,0 @@
1/* arch/arm/plat-s3c64xx/include/plat/regs-sys.h
2 *
3 * Copyright 2008 Openmoko, Inc.
4 * Copyright 2008 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 * http://armlinux.simtec.co.uk/
7 *
8 * S3C64XX system register 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 __PLAT_REGS_SYS_H
16#define __PLAT_REGS_SYS_H __FILE__
17
18#define S3C_SYSREG(x) (S3C_VA_SYS + (x))
19
20#define S3C64XX_AHB_CON0 S3C_SYSREG(0x100)
21#define S3C64XX_AHB_CON1 S3C_SYSREG(0x104)
22#define S3C64XX_AHB_CON2 S3C_SYSREG(0x108)
23
24#define S3C64XX_SDMA_SEL S3C_SYSREG(0x110)
25
26#define S3C64XX_OTHERS S3C_SYSREG(0x900)
27
28#define S3C64XX_OTHERS_USBMASK (1 << 16)
29#define S3C64XX_OTHERS_SYNCMUXSEL (1 << 6)
30
31#endif /* _PLAT_REGS_SYS_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 99e82ac81b69..728eef3296b2 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>
@@ -50,9 +49,9 @@
50#include <plat/devs.h> 49#include <plat/devs.h>
51#include <plat/cpu.h> 50#include <plat/cpu.h>
52#include <mach/regs-gpio.h> 51#include <mach/regs-gpio.h>
53#include <mach/regs-modem.h>
54 52
55#include "common.h" 53#include "common.h"
54#include "regs-modem.h"
56 55
57/* DM9000 */ 56/* DM9000 */
58#define ANW6410_PA_DM9000 (0x18000000) 57#define ANW6410_PA_DM9000 (0x18000000)
@@ -230,10 +229,9 @@ 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,
237 .timer = &s3c24xx_timer, 235 .init_time = s3c24xx_timer_init,
238 .restart = s3c64xx_restart, 236 .restart = s3c64xx_restart,
239MACHINE_END 237MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410-module.c b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
index c6d8dba90623..bf3d1c09b085 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410-module.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410-module.c
@@ -29,7 +29,7 @@
29 29
30#include <linux/platform_data/spi-s3c64xx.h> 30#include <linux/platform_data/spi-s3c64xx.h>
31 31
32#include <mach/crag6410.h> 32#include "crag6410.h"
33 33
34static struct s3c64xx_spi_csinfo wm0010_spi_csinfo = { 34static struct s3c64xx_spi_csinfo wm0010_spi_csinfo = {
35 .line = S3C64XX_GPC(3), 35 .line = S3C64XX_GPC(3),
@@ -47,7 +47,7 @@ static struct spi_board_info wm1253_devs[] = {
47 .bus_num = 0, 47 .bus_num = 0,
48 .chip_select = 0, 48 .chip_select = 0,
49 .mode = SPI_MODE_0, 49 .mode = SPI_MODE_0,
50 .irq = S3C_EINT(5), 50 .irq = S3C_EINT(4),
51 .controller_data = &wm0010_spi_csinfo, 51 .controller_data = &wm0010_spi_csinfo,
52 .platform_data = &wm0010_pdata, 52 .platform_data = &wm0010_pdata,
53 }, 53 },
@@ -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 cdde249166b5..1acf02bace57 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
@@ -50,12 +49,7 @@
50#include <mach/hardware.h> 49#include <mach/hardware.h>
51#include <mach/map.h> 50#include <mach/map.h>
52 51
53#include <mach/regs-sys.h>
54#include <mach/regs-gpio.h> 52#include <mach/regs-gpio.h>
55#include <mach/regs-modem.h>
56#include <mach/crag6410.h>
57
58#include <mach/regs-gpio-memport.h>
59 53
60#include <plat/regs-serial.h> 54#include <plat/regs-serial.h>
61#include <plat/fb.h> 55#include <plat/fb.h>
@@ -72,6 +66,10 @@
72#include <plat/pm.h> 66#include <plat/pm.h>
73 67
74#include "common.h" 68#include "common.h"
69#include "crag6410.h"
70#include "regs-gpio-memport.h"
71#include "regs-modem.h"
72#include "regs-sys.h"
75 73
76/* serial port setup */ 74/* serial port setup */
77 75
@@ -171,7 +169,7 @@ static struct fb_videomode crag6410_lcd_timing = {
171}; 169};
172 170
173/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */ 171/* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
174static struct s3c_fb_platdata crag6410_lcd_pdata __devinitdata = { 172static struct s3c_fb_platdata crag6410_lcd_pdata = {
175 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, 173 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
176 .vtiming = &crag6410_lcd_timing, 174 .vtiming = &crag6410_lcd_timing,
177 .win[0] = &crag6410_fb_win0, 175 .win[0] = &crag6410_fb_win0,
@@ -181,7 +179,7 @@ static struct s3c_fb_platdata crag6410_lcd_pdata __devinitdata = {
181 179
182/* 2x6 keypad */ 180/* 2x6 keypad */
183 181
184static uint32_t crag6410_keymap[] __devinitdata = { 182static uint32_t crag6410_keymap[] = {
185 /* KEY(row, col, keycode) */ 183 /* KEY(row, col, keycode) */
186 KEY(0, 0, KEY_VOLUMEUP), 184 KEY(0, 0, KEY_VOLUMEUP),
187 KEY(0, 1, KEY_HOME), 185 KEY(0, 1, KEY_HOME),
@@ -197,12 +195,12 @@ static uint32_t crag6410_keymap[] __devinitdata = {
197 KEY(1, 5, KEY_CAMERA), 195 KEY(1, 5, KEY_CAMERA),
198}; 196};
199 197
200static struct matrix_keymap_data crag6410_keymap_data __devinitdata = { 198static struct matrix_keymap_data crag6410_keymap_data = {
201 .keymap = crag6410_keymap, 199 .keymap = crag6410_keymap,
202 .keymap_size = ARRAY_SIZE(crag6410_keymap), 200 .keymap_size = ARRAY_SIZE(crag6410_keymap),
203}; 201};
204 202
205static struct samsung_keypad_platdata crag6410_keypad_data __devinitdata = { 203static struct samsung_keypad_platdata crag6410_keypad_data = {
206 .keymap_data = &crag6410_keymap_data, 204 .keymap_data = &crag6410_keymap_data,
207 .rows = 2, 205 .rows = 2,
208 .cols = 6, 206 .cols = 6,
@@ -407,11 +405,11 @@ static struct wm831x_buckv_pdata vddarm_pdata = {
407 .dvs_gpio = S3C64XX_GPK(0), 405 .dvs_gpio = S3C64XX_GPK(0),
408}; 406};
409 407
410static struct regulator_consumer_supply vddarm_consumers[] __devinitdata = { 408static struct regulator_consumer_supply vddarm_consumers[] = {
411 REGULATOR_SUPPLY("vddarm", NULL), 409 REGULATOR_SUPPLY("vddarm", NULL),
412}; 410};
413 411
414static struct regulator_init_data vddarm __devinitdata = { 412static struct regulator_init_data vddarm = {
415 .constraints = { 413 .constraints = {
416 .name = "VDDARM", 414 .name = "VDDARM",
417 .min_uV = 1000000, 415 .min_uV = 1000000,
@@ -425,11 +423,11 @@ static struct regulator_init_data vddarm __devinitdata = {
425 .driver_data = &vddarm_pdata, 423 .driver_data = &vddarm_pdata,
426}; 424};
427 425
428static struct regulator_consumer_supply vddint_consumers[] __devinitdata = { 426static struct regulator_consumer_supply vddint_consumers[] = {
429 REGULATOR_SUPPLY("vddint", NULL), 427 REGULATOR_SUPPLY("vddint", NULL),
430}; 428};
431 429
432static struct regulator_init_data vddint __devinitdata = { 430static struct regulator_init_data vddint = {
433 .constraints = { 431 .constraints = {
434 .name = "VDDINT", 432 .name = "VDDINT",
435 .min_uV = 1000000, 433 .min_uV = 1000000,
@@ -442,27 +440,27 @@ static struct regulator_init_data vddint __devinitdata = {
442 .supply_regulator = "WALLVDD", 440 .supply_regulator = "WALLVDD",
443}; 441};
444 442
445static struct regulator_init_data vddmem __devinitdata = { 443static struct regulator_init_data vddmem = {
446 .constraints = { 444 .constraints = {
447 .name = "VDDMEM", 445 .name = "VDDMEM",
448 .always_on = 1, 446 .always_on = 1,
449 }, 447 },
450}; 448};
451 449
452static struct regulator_init_data vddsys __devinitdata = { 450static struct regulator_init_data vddsys = {
453 .constraints = { 451 .constraints = {
454 .name = "VDDSYS,VDDEXT,VDDPCM,VDDSS", 452 .name = "VDDSYS,VDDEXT,VDDPCM,VDDSS",
455 .always_on = 1, 453 .always_on = 1,
456 }, 454 },
457}; 455};
458 456
459static struct regulator_consumer_supply vddmmc_consumers[] __devinitdata = { 457static struct regulator_consumer_supply vddmmc_consumers[] = {
460 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"), 458 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
461 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.1"), 459 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.1"),
462 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"), 460 REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"),
463}; 461};
464 462
465static struct regulator_init_data vddmmc __devinitdata = { 463static struct regulator_init_data vddmmc = {
466 .constraints = { 464 .constraints = {
467 .name = "VDDMMC,UH", 465 .name = "VDDMMC,UH",
468 .always_on = 1, 466 .always_on = 1,
@@ -472,7 +470,7 @@ static struct regulator_init_data vddmmc __devinitdata = {
472 .supply_regulator = "WALLVDD", 470 .supply_regulator = "WALLVDD",
473}; 471};
474 472
475static struct regulator_init_data vddotgi __devinitdata = { 473static struct regulator_init_data vddotgi = {
476 .constraints = { 474 .constraints = {
477 .name = "VDDOTGi", 475 .name = "VDDOTGi",
478 .always_on = 1, 476 .always_on = 1,
@@ -480,7 +478,7 @@ static struct regulator_init_data vddotgi __devinitdata = {
480 .supply_regulator = "WALLVDD", 478 .supply_regulator = "WALLVDD",
481}; 479};
482 480
483static struct regulator_init_data vddotg __devinitdata = { 481static struct regulator_init_data vddotg = {
484 .constraints = { 482 .constraints = {
485 .name = "VDDOTG", 483 .name = "VDDOTG",
486 .always_on = 1, 484 .always_on = 1,
@@ -488,7 +486,7 @@ static struct regulator_init_data vddotg __devinitdata = {
488 .supply_regulator = "WALLVDD", 486 .supply_regulator = "WALLVDD",
489}; 487};
490 488
491static struct regulator_init_data vddhi __devinitdata = { 489static struct regulator_init_data vddhi = {
492 .constraints = { 490 .constraints = {
493 .name = "VDDHI", 491 .name = "VDDHI",
494 .always_on = 1, 492 .always_on = 1,
@@ -496,7 +494,7 @@ static struct regulator_init_data vddhi __devinitdata = {
496 .supply_regulator = "WALLVDD", 494 .supply_regulator = "WALLVDD",
497}; 495};
498 496
499static struct regulator_init_data vddadc __devinitdata = { 497static struct regulator_init_data vddadc = {
500 .constraints = { 498 .constraints = {
501 .name = "VDDADC,VDDDAC", 499 .name = "VDDADC,VDDDAC",
502 .always_on = 1, 500 .always_on = 1,
@@ -504,7 +502,7 @@ static struct regulator_init_data vddadc __devinitdata = {
504 .supply_regulator = "WALLVDD", 502 .supply_regulator = "WALLVDD",
505}; 503};
506 504
507static struct regulator_init_data vddmem0 __devinitdata = { 505static struct regulator_init_data vddmem0 = {
508 .constraints = { 506 .constraints = {
509 .name = "VDDMEM0", 507 .name = "VDDMEM0",
510 .always_on = 1, 508 .always_on = 1,
@@ -512,7 +510,7 @@ static struct regulator_init_data vddmem0 __devinitdata = {
512 .supply_regulator = "WALLVDD", 510 .supply_regulator = "WALLVDD",
513}; 511};
514 512
515static struct regulator_init_data vddpll __devinitdata = { 513static struct regulator_init_data vddpll = {
516 .constraints = { 514 .constraints = {
517 .name = "VDDPLL", 515 .name = "VDDPLL",
518 .always_on = 1, 516 .always_on = 1,
@@ -520,7 +518,7 @@ static struct regulator_init_data vddpll __devinitdata = {
520 .supply_regulator = "WALLVDD", 518 .supply_regulator = "WALLVDD",
521}; 519};
522 520
523static struct regulator_init_data vddlcd __devinitdata = { 521static struct regulator_init_data vddlcd = {
524 .constraints = { 522 .constraints = {
525 .name = "VDDLCD", 523 .name = "VDDLCD",
526 .always_on = 1, 524 .always_on = 1,
@@ -528,7 +526,7 @@ static struct regulator_init_data vddlcd __devinitdata = {
528 .supply_regulator = "WALLVDD", 526 .supply_regulator = "WALLVDD",
529}; 527};
530 528
531static struct regulator_init_data vddalive __devinitdata = { 529static struct regulator_init_data vddalive = {
532 .constraints = { 530 .constraints = {
533 .name = "VDDALIVE", 531 .name = "VDDALIVE",
534 .always_on = 1, 532 .always_on = 1,
@@ -536,28 +534,28 @@ static struct regulator_init_data vddalive __devinitdata = {
536 .supply_regulator = "WALLVDD", 534 .supply_regulator = "WALLVDD",
537}; 535};
538 536
539static struct wm831x_backup_pdata banff_backup_pdata __devinitdata = { 537static struct wm831x_backup_pdata banff_backup_pdata = {
540 .charger_enable = 1, 538 .charger_enable = 1,
541 .vlim = 2500, /* mV */ 539 .vlim = 2500, /* mV */
542 .ilim = 200, /* uA */ 540 .ilim = 200, /* uA */
543}; 541};
544 542
545static struct wm831x_status_pdata banff_red_led __devinitdata = { 543static struct wm831x_status_pdata banff_red_led = {
546 .name = "banff:red:", 544 .name = "banff:red:",
547 .default_src = WM831X_STATUS_MANUAL, 545 .default_src = WM831X_STATUS_MANUAL,
548}; 546};
549 547
550static struct wm831x_status_pdata banff_green_led __devinitdata = { 548static struct wm831x_status_pdata banff_green_led = {
551 .name = "banff:green:", 549 .name = "banff:green:",
552 .default_src = WM831X_STATUS_MANUAL, 550 .default_src = WM831X_STATUS_MANUAL,
553}; 551};
554 552
555static struct wm831x_touch_pdata touch_pdata __devinitdata = { 553static struct wm831x_touch_pdata touch_pdata = {
556 .data_irq = S3C_EINT(26), 554 .data_irq = S3C_EINT(26),
557 .pd_irq = S3C_EINT(27), 555 .pd_irq = S3C_EINT(27),
558}; 556};
559 557
560static struct wm831x_pdata crag_pmic_pdata __devinitdata = { 558static struct wm831x_pdata crag_pmic_pdata = {
561 .wm831x_num = 1, 559 .wm831x_num = 1,
562 .gpio_base = BANFF_PMIC_GPIO_BASE, 560 .gpio_base = BANFF_PMIC_GPIO_BASE,
563 .soft_shutdown = true, 561 .soft_shutdown = true,
@@ -601,7 +599,7 @@ static struct wm831x_pdata crag_pmic_pdata __devinitdata = {
601 .touch = &touch_pdata, 599 .touch = &touch_pdata,
602}; 600};
603 601
604static struct i2c_board_info i2c_devs0[] __devinitdata = { 602static struct i2c_board_info i2c_devs0[] = {
605 { I2C_BOARD_INFO("24c08", 0x50), }, 603 { I2C_BOARD_INFO("24c08", 0x50), },
606 { I2C_BOARD_INFO("tca6408", 0x20), 604 { I2C_BOARD_INFO("tca6408", 0x20),
607 .platform_data = &crag6410_pca_data, 605 .platform_data = &crag6410_pca_data,
@@ -616,13 +614,13 @@ static struct s3c2410_platform_i2c i2c0_pdata = {
616 .frequency = 400000, 614 .frequency = 400000,
617}; 615};
618 616
619static struct regulator_consumer_supply pvdd_1v2_consumers[] __devinitdata = { 617static struct regulator_consumer_supply pvdd_1v2_consumers[] = {
620 REGULATOR_SUPPLY("DCVDD", "spi0.0"), 618 REGULATOR_SUPPLY("DCVDD", "spi0.0"),
621 REGULATOR_SUPPLY("AVDD", "spi0.0"), 619 REGULATOR_SUPPLY("AVDD", "spi0.0"),
622 REGULATOR_SUPPLY("AVDD", "spi0.1"), 620 REGULATOR_SUPPLY("AVDD", "spi0.1"),
623}; 621};
624 622
625static struct regulator_init_data pvdd_1v2 __devinitdata = { 623static struct regulator_init_data pvdd_1v2 = {
626 .constraints = { 624 .constraints = {
627 .name = "PVDD_1V2", 625 .name = "PVDD_1V2",
628 .valid_ops_mask = REGULATOR_CHANGE_STATUS, 626 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
@@ -632,7 +630,7 @@ static struct regulator_init_data pvdd_1v2 __devinitdata = {
632 .num_consumer_supplies = ARRAY_SIZE(pvdd_1v2_consumers), 630 .num_consumer_supplies = ARRAY_SIZE(pvdd_1v2_consumers),
633}; 631};
634 632
635static struct regulator_consumer_supply pvdd_1v8_consumers[] __devinitdata = { 633static struct regulator_consumer_supply pvdd_1v8_consumers[] = {
636 REGULATOR_SUPPLY("LDOVDD", "1-001a"), 634 REGULATOR_SUPPLY("LDOVDD", "1-001a"),
637 REGULATOR_SUPPLY("PLLVDD", "1-001a"), 635 REGULATOR_SUPPLY("PLLVDD", "1-001a"),
638 REGULATOR_SUPPLY("DBVDD", "1-001a"), 636 REGULATOR_SUPPLY("DBVDD", "1-001a"),
@@ -664,7 +662,7 @@ static struct regulator_consumer_supply pvdd_1v8_consumers[] __devinitdata = {
664 REGULATOR_SUPPLY("CPVDD", "wm5110-codec"), 662 REGULATOR_SUPPLY("CPVDD", "wm5110-codec"),
665}; 663};
666 664
667static struct regulator_init_data pvdd_1v8 __devinitdata = { 665static struct regulator_init_data pvdd_1v8 = {
668 .constraints = { 666 .constraints = {
669 .name = "PVDD_1V8", 667 .name = "PVDD_1V8",
670 .always_on = 1, 668 .always_on = 1,
@@ -674,12 +672,12 @@ static struct regulator_init_data pvdd_1v8 __devinitdata = {
674 .num_consumer_supplies = ARRAY_SIZE(pvdd_1v8_consumers), 672 .num_consumer_supplies = ARRAY_SIZE(pvdd_1v8_consumers),
675}; 673};
676 674
677static struct regulator_consumer_supply pvdd_3v3_consumers[] __devinitdata = { 675static struct regulator_consumer_supply pvdd_3v3_consumers[] = {
678 REGULATOR_SUPPLY("MICVDD", "1-001a"), 676 REGULATOR_SUPPLY("MICVDD", "1-001a"),
679 REGULATOR_SUPPLY("AVDD1", "1-001a"), 677 REGULATOR_SUPPLY("AVDD1", "1-001a"),
680}; 678};
681 679
682static struct regulator_init_data pvdd_3v3 __devinitdata = { 680static struct regulator_init_data pvdd_3v3 = {
683 .constraints = { 681 .constraints = {
684 .name = "PVDD_3V3", 682 .name = "PVDD_3V3",
685 .always_on = 1, 683 .always_on = 1,
@@ -689,7 +687,7 @@ static struct regulator_init_data pvdd_3v3 __devinitdata = {
689 .num_consumer_supplies = ARRAY_SIZE(pvdd_3v3_consumers), 687 .num_consumer_supplies = ARRAY_SIZE(pvdd_3v3_consumers),
690}; 688};
691 689
692static struct wm831x_pdata glenfarclas_pmic_pdata __devinitdata = { 690static struct wm831x_pdata glenfarclas_pmic_pdata = {
693 .wm831x_num = 2, 691 .wm831x_num = 2,
694 .irq_base = GLENFARCLAS_PMIC_IRQ_BASE, 692 .irq_base = GLENFARCLAS_PMIC_IRQ_BASE,
695 .gpio_base = GLENFARCLAS_PMIC_GPIO_BASE, 693 .gpio_base = GLENFARCLAS_PMIC_GPIO_BASE,
@@ -721,7 +719,7 @@ static struct wm1250_ev1_pdata wm1250_ev1_pdata = {
721 }, 719 },
722}; 720};
723 721
724static struct i2c_board_info i2c_devs1[] __devinitdata = { 722static struct i2c_board_info i2c_devs1[] = {
725 { I2C_BOARD_INFO("wm8311", 0x34), 723 { I2C_BOARD_INFO("wm8311", 0x34),
726 .irq = S3C_EINT(0), 724 .irq = S3C_EINT(0),
727 .platform_data = &glenfarclas_pmic_pdata }, 725 .platform_data = &glenfarclas_pmic_pdata },
@@ -867,10 +865,9 @@ MACHINE_START(WLF_CRAGG_6410, "Wolfson Cragganmore 6410")
867 /* Maintainer: Mark Brown <broonie@opensource.wolfsonmicro.com> */ 865 /* Maintainer: Mark Brown <broonie@opensource.wolfsonmicro.com> */
868 .atag_offset = 0x100, 866 .atag_offset = 0x100,
869 .init_irq = s3c6410_init_irq, 867 .init_irq = s3c6410_init_irq,
870 .handle_irq = vic_handle_irq,
871 .map_io = crag6410_map_io, 868 .map_io = crag6410_map_io,
872 .init_machine = crag6410_machine_init, 869 .init_machine = crag6410_machine_init,
873 .init_late = s3c64xx_init_late, 870 .init_late = s3c64xx_init_late,
874 .timer = &s3c24xx_timer, 871 .init_time = s3c24xx_timer_init,
875 .restart = s3c64xx_restart, 872 .restart = s3c64xx_restart,
876MACHINE_END 873MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
index 2b144893ddc4..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,10 +272,9 @@ 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,
280 .timer = &s3c24xx_timer, 278 .init_time = s3c24xx_timer_init,
281 .restart = s3c64xx_restart, 279 .restart = s3c64xx_restart,
282MACHINE_END 280MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-mini6410.c b/arch/arm/mach-s3c64xx/mach-mini6410.c
index 07c349cca333..4b41fcdaa7b6 100644
--- a/arch/arm/mach-s3c64xx/mach-mini6410.c
+++ b/arch/arm/mach-s3c64xx/mach-mini6410.c
@@ -24,15 +24,12 @@
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>
31 30
32#include <mach/map.h> 31#include <mach/map.h>
33#include <mach/regs-gpio.h> 32#include <mach/regs-gpio.h>
34#include <mach/regs-modem.h>
35#include <mach/regs-srom.h>
36 33
37#include <plat/adc.h> 34#include <plat/adc.h>
38#include <plat/cpu.h> 35#include <plat/cpu.h>
@@ -46,6 +43,8 @@
46#include <video/samsung_fimd.h> 43#include <video/samsung_fimd.h>
47 44
48#include "common.h" 45#include "common.h"
46#include "regs-modem.h"
47#include "regs-srom.h"
49 48
50#define UCON S3C2410_UCON_DEFAULT 49#define UCON S3C2410_UCON_DEFAULT
51#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB) 50#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
@@ -352,10 +351,9 @@ 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,
359 .timer = &s3c24xx_timer, 357 .init_time = s3c24xx_timer_init,
360 .restart = s3c64xx_restart, 358 .restart = s3c64xx_restart,
361MACHINE_END 359MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-ncp.c b/arch/arm/mach-s3c64xx/mach-ncp.c
index e5f9a79b535d..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,10 +100,9 @@ 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,
108 .timer = &s3c24xx_timer, 106 .init_time = s3c24xx_timer_init,
109 .restart = s3c64xx_restart, 107 .restart = s3c64xx_restart,
110MACHINE_END 108MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-real6410.c b/arch/arm/mach-s3c64xx/mach-real6410.c
index 7476f7c722ab..fa12bd21ad82 100644
--- a/arch/arm/mach-s3c64xx/mach-real6410.c
+++ b/arch/arm/mach-s3c64xx/mach-real6410.c
@@ -25,15 +25,12 @@
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>
32 31
33#include <mach/map.h> 32#include <mach/map.h>
34#include <mach/regs-gpio.h> 33#include <mach/regs-gpio.h>
35#include <mach/regs-modem.h>
36#include <mach/regs-srom.h>
37 34
38#include <plat/adc.h> 35#include <plat/adc.h>
39#include <plat/cpu.h> 36#include <plat/cpu.h>
@@ -47,6 +44,8 @@
47#include <video/samsung_fimd.h> 44#include <video/samsung_fimd.h>
48 45
49#include "common.h" 46#include "common.h"
47#include "regs-modem.h"
48#include "regs-srom.h"
50 49
51#define UCON S3C2410_UCON_DEFAULT 50#define UCON S3C2410_UCON_DEFAULT
52#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB) 51#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
@@ -331,10 +330,9 @@ 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,
338 .timer = &s3c24xx_timer, 336 .init_time = s3c24xx_timer_init,
339 .restart = s3c64xx_restart, 337 .restart = s3c64xx_restart,
340MACHINE_END 338MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-smartq.c b/arch/arm/mach-s3c64xx/mach-smartq.c
index c6d7390939ae..fc3e9b32e26f 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq.c
@@ -25,7 +25,6 @@
25 25
26#include <mach/map.h> 26#include <mach/map.h>
27#include <mach/regs-gpio.h> 27#include <mach/regs-gpio.h>
28#include <mach/regs-modem.h>
29 28
30#include <plat/clock.h> 29#include <plat/clock.h>
31#include <plat/cpu.h> 30#include <plat/cpu.h>
@@ -41,6 +40,7 @@
41#include <video/platform_lcd.h> 40#include <video/platform_lcd.h>
42 41
43#include "common.h" 42#include "common.h"
43#include "regs-modem.h"
44 44
45#define UCON S3C2410_UCON_DEFAULT 45#define UCON S3C2410_UCON_DEFAULT
46#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE) 46#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE)
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c
index 96d6da2b6b5f..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,10 +152,9 @@ 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,
160 .timer = &s3c24xx_timer, 158 .init_time = s3c24xx_timer_init,
161 .restart = s3c64xx_restart, 159 .restart = s3c64xx_restart,
162MACHINE_END 160MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c
index 7d1167bdc921..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,10 +168,9 @@ 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,
176 .timer = &s3c24xx_timer, 174 .init_time = s3c24xx_timer_init,
177 .restart = s3c64xx_restart, 175 .restart = s3c64xx_restart,
178MACHINE_END 176MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6400.c b/arch/arm/mach-s3c64xx/mach-smdk6400.c
index a928fae5694e..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,10 +89,9 @@ 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,
97 .timer = &s3c24xx_timer, 95 .init_time = s3c24xx_timer_init,
98 .restart = s3c64xx_restart, 96 .restart = s3c64xx_restart,
99MACHINE_END 97MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index 574a9eef588d..ba7544e2d04d 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>
@@ -57,10 +56,7 @@
57#include <asm/mach-types.h> 56#include <asm/mach-types.h>
58 57
59#include <plat/regs-serial.h> 58#include <plat/regs-serial.h>
60#include <mach/regs-modem.h>
61#include <mach/regs-gpio.h> 59#include <mach/regs-gpio.h>
62#include <mach/regs-sys.h>
63#include <mach/regs-srom.h>
64#include <linux/platform_data/ata-samsung_cf.h> 60#include <linux/platform_data/ata-samsung_cf.h>
65#include <linux/platform_data/i2c-s3c2410.h> 61#include <linux/platform_data/i2c-s3c2410.h>
66#include <plat/fb.h> 62#include <plat/fb.h>
@@ -75,6 +71,9 @@
75#include <plat/backlight.h> 71#include <plat/backlight.h>
76 72
77#include "common.h" 73#include "common.h"
74#include "regs-modem.h"
75#include "regs-srom.h"
76#include "regs-sys.h"
78 77
79#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK 78#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
80#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB 79#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
@@ -700,10 +699,9 @@ 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,
707 .timer = &s3c24xx_timer, 705 .init_time = s3c24xx_timer_init,
708 .restart = s3c64xx_restart, 706 .restart = s3c64xx_restart,
709MACHINE_END 707MACHINE_END
diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c
index 7feb426fc202..a6d7c6cf45e7 100644
--- a/arch/arm/mach-s3c64xx/pm.c
+++ b/arch/arm/mach-s3c64xx/pm.c
@@ -26,12 +26,13 @@
26#include <plat/pm.h> 26#include <plat/pm.h>
27#include <plat/wakeup-mask.h> 27#include <plat/wakeup-mask.h>
28 28
29#include <mach/regs-sys.h>
30#include <mach/regs-gpio.h> 29#include <mach/regs-gpio.h>
31#include <mach/regs-clock.h> 30#include <mach/regs-clock.h>
32#include <mach/regs-syscon-power.h> 31
33#include <mach/regs-gpio-memport.h> 32#include "regs-gpio-memport.h"
34#include <mach/regs-modem.h> 33#include "regs-modem.h"
34#include "regs-sys.h"
35#include "regs-syscon-power.h"
35 36
36struct s3c64xx_pm_domain { 37struct s3c64xx_pm_domain {
37 char *const name; 38 char *const name;
@@ -338,8 +339,10 @@ int __init s3c64xx_pm_init(void)
338 for (i = 0; i < ARRAY_SIZE(s3c64xx_pm_domains); i++) 339 for (i = 0; i < ARRAY_SIZE(s3c64xx_pm_domains); i++)
339 pm_genpd_init(&s3c64xx_pm_domains[i]->pd, NULL, false); 340 pm_genpd_init(&s3c64xx_pm_domains[i]->pd, NULL, false);
340 341
342#ifdef CONFIG_S3C_DEV_FB
341 if (dev_get_platdata(&s3c_device_fb.dev)) 343 if (dev_get_platdata(&s3c_device_fb.dev))
342 pm_genpd_add_device(&s3c64xx_pm_f.pd, &s3c_device_fb.dev); 344 pm_genpd_add_device(&s3c64xx_pm_f.pd, &s3c_device_fb.dev);
345#endif
343 346
344 return 0; 347 return 0;
345} 348}
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-gpio-memport.h b/arch/arm/mach-s3c64xx/regs-gpio-memport.h
index 82342f6fd27d..b927593019f5 100644
--- a/arch/arm/mach-s3c64xx/include/mach/regs-gpio-memport.h
+++ b/arch/arm/mach-s3c64xx/regs-gpio-memport.h
@@ -1,5 +1,4 @@
1/* linux/arch/arm/plat-s3c64xx/include/mach/regs-gpio-memport.h 1/*
2 *
3 * Copyright 2008 Openmoko, Inc. 2 * Copyright 2008 Openmoko, Inc.
4 * Copyright 2008 Simtec Electronics 3 * Copyright 2008 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
@@ -8,8 +7,8 @@
8 * S3C64XX - GPIO memory port register definitions 7 * S3C64XX - GPIO memory port register definitions
9 */ 8 */
10 9
11#ifndef __ASM_PLAT_S3C64XX_REGS_GPIO_MEMPORT_H 10#ifndef __MACH_S3C64XX_REGS_GPIO_MEMPORT_H
12#define __ASM_PLAT_S3C64XX_REGS_GPIO_MEMPORT_H __FILE__ 11#define __MACH_S3C64XX_REGS_GPIO_MEMPORT_H __FILE__
13 12
14#define S3C64XX_MEM0CONSTOP S3C64XX_GPIOREG(0x1B0) 13#define S3C64XX_MEM0CONSTOP S3C64XX_GPIOREG(0x1B0)
15#define S3C64XX_MEM1CONSTOP S3C64XX_GPIOREG(0x1B4) 14#define S3C64XX_MEM1CONSTOP S3C64XX_GPIOREG(0x1B4)
@@ -21,5 +20,5 @@
21#define S3C64XX_MEM0DRVCON S3C64XX_GPIOREG(0x1D0) 20#define S3C64XX_MEM0DRVCON S3C64XX_GPIOREG(0x1D0)
22#define S3C64XX_MEM1DRVCON S3C64XX_GPIOREG(0x1D4) 21#define S3C64XX_MEM1DRVCON S3C64XX_GPIOREG(0x1D4)
23 22
24#endif /* __ASM_PLAT_S3C64XX_REGS_GPIO_MEMPORT_H */ 23#endif /* __MACH_S3C64XX_REGS_GPIO_MEMPORT_H */
25 24
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-modem.h b/arch/arm/mach-s3c64xx/regs-modem.h
index 49f7759dedfa..073cdd3a03be 100644
--- a/arch/arm/mach-s3c64xx/include/mach/regs-modem.h
+++ b/arch/arm/mach-s3c64xx/regs-modem.h
@@ -1,5 +1,4 @@
1/* arch/arm/plat-s3c64xx/include/plat/regs-modem.h 1/*
2 *
3 * Copyright 2008 Openmoko, Inc. 2 * Copyright 2008 Openmoko, Inc.
4 * Copyright 2008 Simtec Electronics 3 * Copyright 2008 Simtec Electronics
5 * http://armlinux.simtec.co.uk/ 4 * http://armlinux.simtec.co.uk/
@@ -12,10 +11,10 @@
12 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
13*/ 12*/
14 13
15#ifndef __PLAT_S3C64XX_REGS_MODEM_H 14#ifndef __MACH_S3C64XX_REGS_MODEM_H
16#define __PLAT_S3C64XX_REGS_MODEM_H __FILE__ 15#define __MACH_S3C64XX_REGS_MODEM_H __FILE__
17 16
18#define S3C64XX_MODEMREG(x) (S3C64XX_VA_MODEM + (x)) 17#define S3C64XX_MODEMREG(x) (S3C64XX_VA_MODEM + (x))
19 18
20#define S3C64XX_MODEM_INT2AP S3C64XX_MODEMREG(0x0) 19#define S3C64XX_MODEM_INT2AP S3C64XX_MODEMREG(0x0)
21#define S3C64XX_MODEM_INT2MODEM S3C64XX_MODEMREG(0x4) 20#define S3C64XX_MODEM_INT2MODEM S3C64XX_MODEMREG(0x4)
@@ -28,4 +27,4 @@
28#define MIFPCON_INT2M_LEVEL (1 << 4) 27#define MIFPCON_INT2M_LEVEL (1 << 4)
29#define MIFPCON_LCD_BYPASS (1 << 3) 28#define MIFPCON_LCD_BYPASS (1 << 3)
30 29
31#endif /* __PLAT_S3C64XX_REGS_MODEM_H */ 30#endif /* __MACH_S3C64XX_REGS_MODEM_H */
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-srom.h b/arch/arm/mach-s3c64xx/regs-srom.h
index 756731b36297..d56f3386eb00 100644
--- a/arch/arm/mach-s3c64xx/include/mach/regs-srom.h
+++ b/arch/arm/mach-s3c64xx/regs-srom.h
@@ -1,5 +1,4 @@
1/* arch/arm/plat-s3c64xx/include/plat/regs-srom.h 1/*
2 *
3 * Copyright 2009 Andy Green <andy@warmcat.com> 2 * Copyright 2009 Andy Green <andy@warmcat.com>
4 * 3 *
5 * S3C64XX SROM definitions 4 * S3C64XX SROM definitions
@@ -9,8 +8,8 @@
9 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
10*/ 9*/
11 10
12#ifndef __PLAT_REGS_SROM_H 11#ifndef __MACH_S3C64XX_REGS_SROM_H
13#define __PLAT_REGS_SROM_H __FILE__ 12#define __MACH_S3C64XX_REGS_SROM_H __FILE__
14 13
15#define S3C64XX_SROMREG(x) (S3C_VA_MEM + (x)) 14#define S3C64XX_SROMREG(x) (S3C_VA_MEM + (x))
16 15
@@ -29,7 +28,7 @@
29#define S3C64XX_SROM_BW__DATAWIDTH__SHIFT 0 28#define S3C64XX_SROM_BW__DATAWIDTH__SHIFT 0
30#define S3C64XX_SROM_BW__WAITENABLE__SHIFT 2 29#define S3C64XX_SROM_BW__WAITENABLE__SHIFT 2
31#define S3C64XX_SROM_BW__BYTEENABLE__SHIFT 3 30#define S3C64XX_SROM_BW__BYTEENABLE__SHIFT 3
32#define S3C64XX_SROM_BW__CS_MASK 0xf 31#define S3C64XX_SROM_BW__CS_MASK 0xf
33 32
34#define S3C64XX_SROM_BW__NCS0__SHIFT 0 33#define S3C64XX_SROM_BW__NCS0__SHIFT 0
35#define S3C64XX_SROM_BW__NCS1__SHIFT 4 34#define S3C64XX_SROM_BW__NCS1__SHIFT 4
@@ -56,4 +55,4 @@
56#define S3C64XX_SROM_BCX__TACS__SHIFT 28 55#define S3C64XX_SROM_BCX__TACS__SHIFT 28
57#define S3C64XX_SROM_BCX__TACS__MASK 0xf 56#define S3C64XX_SROM_BCX__TACS__MASK 0xf
58 57
59#endif /* _PLAT_REGS_SROM_H */ 58#endif /* __MACH_S3C64XX_REGS_SROM_H */
diff --git a/arch/arm/mach-s3c64xx/regs-sys.h b/arch/arm/mach-s3c64xx/regs-sys.h
new file mode 100644
index 000000000000..8c411fbb0cd9
--- /dev/null
+++ b/arch/arm/mach-s3c64xx/regs-sys.h
@@ -0,0 +1,30 @@
1/*
2 * Copyright 2008 Openmoko, Inc.
3 * Copyright 2008 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/
6 *
7 * S3C64XX system register definitions
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14#ifndef __MACH_S3C64XX_REGS_SYS_H
15#define __MACH_S3C64XX_REGS_SYS_H __FILE__
16
17#define S3C_SYSREG(x) (S3C_VA_SYS + (x))
18
19#define S3C64XX_AHB_CON0 S3C_SYSREG(0x100)
20#define S3C64XX_AHB_CON1 S3C_SYSREG(0x104)
21#define S3C64XX_AHB_CON2 S3C_SYSREG(0x108)
22
23#define S3C64XX_SDMA_SEL S3C_SYSREG(0x110)
24
25#define S3C64XX_OTHERS S3C_SYSREG(0x900)
26
27#define S3C64XX_OTHERS_USBMASK (1 << 16)
28#define S3C64XX_OTHERS_SYNCMUXSEL (1 << 6)
29
30#endif /* __MACH_S3C64XX_REGS_SYS_H */
diff --git a/arch/arm/mach-s3c64xx/include/mach/regs-syscon-power.h b/arch/arm/mach-s3c64xx/regs-syscon-power.h
index 270d96ac9705..6e16b3404da9 100644
--- a/arch/arm/mach-s3c64xx/include/mach/regs-syscon-power.h
+++ b/arch/arm/mach-s3c64xx/regs-syscon-power.h
@@ -1,5 +1,4 @@
1/* arch/arm/plat-s3c64xx/include/plat/regs-syscon-power.h 1/*
2 *
3 * Copyright 2008 Openmoko, Inc. 2 * Copyright 2008 Openmoko, Inc.
4 * Copyright 2008 Simtec Electronics 3 * Copyright 2008 Simtec Electronics
5 * http://armlinux.simtec.co.uk/ 4 * http://armlinux.simtec.co.uk/
@@ -12,8 +11,8 @@
12 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
13*/ 12*/
14 13
15#ifndef __PLAT_S3C64XX_REGS_SYSCON_POWER_H 14#ifndef __MACH_S3C64XX_REGS_SYSCON_POWER_H
16#define __PLAT_S3C64XX_REGS_SYSCON_POWER_H __FILE__ 15#define __MACH_S3C64XX_REGS_SYSCON_POWER_H __FILE__
17 16
18#define S3C64XX_PWR_CFG S3C_SYSREG(0x804) 17#define S3C64XX_PWR_CFG S3C_SYSREG(0x804)
19 18
@@ -113,4 +112,4 @@
113#define S3C64XX_INFORM2 S3C_SYSREG(0xA08) 112#define S3C64XX_INFORM2 S3C_SYSREG(0xA08)
114#define S3C64XX_INFORM3 S3C_SYSREG(0xA0C) 113#define S3C64XX_INFORM3 S3C_SYSREG(0xA0C)
115 114
116#endif /* __PLAT_S3C64XX_REGS_SYSCON_POWER_H */ 115#endif /* __MACH_S3C64XX_REGS_SYSCON_POWER_H */
diff --git a/arch/arm/mach-s3c64xx/setup-usb-phy.c b/arch/arm/mach-s3c64xx/setup-usb-phy.c
index f6757e02d7db..c8174d95339b 100644
--- a/arch/arm/mach-s3c64xx/setup-usb-phy.c
+++ b/arch/arm/mach-s3c64xx/setup-usb-phy.c
@@ -15,11 +15,12 @@
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <mach/map.h> 17#include <mach/map.h>
18#include <mach/regs-sys.h>
19#include <plat/cpu.h> 18#include <plat/cpu.h>
20#include <plat/regs-usb-hsotg-phy.h> 19#include <plat/regs-usb-hsotg-phy.h>
21#include <plat/usb-phy.h> 20#include <plat/usb-phy.h>
22 21
22#include "regs-sys.h"
23
23static int s3c_usb_otgphy_init(struct platform_device *pdev) 24static int s3c_usb_otgphy_init(struct platform_device *pdev)
24{ 25{
25 struct clk *xusbxti; 26 struct clk *xusbxti;
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6440.c b/arch/arm/mach-s5p64x0/clock-s5p6440.c
index 5112371079d0..3537815247f1 100644
--- a/arch/arm/mach-s5p64x0/clock-s5p6440.c
+++ b/arch/arm/mach-s5p64x0/clock-s5p6440.c
@@ -23,7 +23,6 @@
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24#include <mach/map.h> 24#include <mach/map.h>
25#include <mach/regs-clock.h> 25#include <mach/regs-clock.h>
26#include <mach/s5p64x0-clock.h>
27 26
28#include <plat/cpu-freq.h> 27#include <plat/cpu-freq.h>
29#include <plat/clock.h> 28#include <plat/clock.h>
@@ -32,6 +31,7 @@
32#include <plat/s5p-clock.h> 31#include <plat/s5p-clock.h>
33#include <plat/clock-clksrc.h> 32#include <plat/clock-clksrc.h>
34 33
34#include "clock.h"
35#include "common.h" 35#include "common.h"
36 36
37static u32 epll_div[][5] = { 37static u32 epll_div[][5] = {
diff --git a/arch/arm/mach-s5p64x0/clock-s5p6450.c b/arch/arm/mach-s5p64x0/clock-s5p6450.c
index 154dea702d70..af384ddd2dcf 100644
--- a/arch/arm/mach-s5p64x0/clock-s5p6450.c
+++ b/arch/arm/mach-s5p64x0/clock-s5p6450.c
@@ -23,7 +23,6 @@
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24#include <mach/map.h> 24#include <mach/map.h>
25#include <mach/regs-clock.h> 25#include <mach/regs-clock.h>
26#include <mach/s5p64x0-clock.h>
27 26
28#include <plat/cpu-freq.h> 27#include <plat/cpu-freq.h>
29#include <plat/clock.h> 28#include <plat/clock.h>
@@ -32,6 +31,7 @@
32#include <plat/s5p-clock.h> 31#include <plat/s5p-clock.h>
33#include <plat/clock-clksrc.h> 32#include <plat/clock-clksrc.h>
34 33
34#include "clock.h"
35#include "common.h" 35#include "common.h"
36 36
37static struct clksrc_clk clk_mout_dpll = { 37static struct clksrc_clk clk_mout_dpll = {
diff --git a/arch/arm/mach-s5p64x0/include/mach/s5p64x0-clock.h b/arch/arm/mach-s5p64x0/clock.h
index 0ef47d1b7670..28b8e3c6bd24 100644
--- a/arch/arm/mach-s5p64x0/include/mach/s5p64x0-clock.h
+++ b/arch/arm/mach-s5p64x0/clock.h
@@ -1,5 +1,4 @@
1/* linux/arch/arm/mach-s5p64x0/include/mach/s5p64x0-clock.h 1/*
2 *
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd. 2 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com 3 * http://www.samsung.com
5 * 4 *
@@ -10,8 +9,8 @@
10 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
11*/ 10*/
12 11
13#ifndef __ASM_ARCH_CLOCK_H 12#ifndef __MACH_S5P64X0_CLOCK_H
14#define __ASM_ARCH_CLOCK_H __FILE__ 13#define __MACH_S5P64X0_CLOCK_H __FILE__
15 14
16#include <linux/clk.h> 15#include <linux/clk.h>
17 16
@@ -36,4 +35,4 @@ extern int s5p64x0_mem_ctrl(struct clk *clk, int enable);
36 35
37extern int s5p64x0_clk48m_ctrl(struct clk *clk, int enable); 36extern int s5p64x0_clk48m_ctrl(struct clk *clk, int enable);
38 37
39#endif /* __ASM_ARCH_CLOCK_H */ 38#endif /* __MACH_S5P64X0_CLOCK_H */
diff --git a/arch/arm/mach-s5p64x0/gpiolib.c b/arch/arm/mach-s5p64x0/gpiolib.c
deleted file mode 100644
index 700dac6c43f3..000000000000
--- a/arch/arm/mach-s5p64x0/gpiolib.c
+++ /dev/null
@@ -1,508 +0,0 @@
1/* linux/arch/arm/mach-s5p64x0/gpiolib.c
2 *
3 * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * S5P64X0 - GPIOlib support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#include <linux/kernel.h>
14#include <linux/irq.h>
15#include <linux/io.h>
16#include <linux/gpio.h>
17
18#include <mach/map.h>
19#include <mach/regs-gpio.h>
20#include <mach/regs-clock.h>
21
22#include <plat/cpu.h>
23#include <plat/gpio-core.h>
24#include <plat/gpio-cfg.h>
25#include <plat/gpio-cfg-helpers.h>
26
27/*
28 * S5P6440 GPIO bank summary:
29 *
30 * Bank GPIOs Style SlpCon ExtInt Group
31 * A 6 4Bit Yes 1
32 * B 7 4Bit Yes 1
33 * C 8 4Bit Yes 2
34 * F 2 2Bit Yes 4 [1]
35 * G 7 4Bit Yes 5
36 * H 10 4Bit[2] Yes 6
37 * I 16 2Bit Yes None
38 * J 12 2Bit Yes None
39 * N 16 2Bit No IRQ_EINT
40 * P 8 2Bit Yes 8
41 * R 15 4Bit[2] Yes 8
42 *
43 * S5P6450 GPIO bank summary:
44 *
45 * Bank GPIOs Style SlpCon ExtInt Group
46 * A 6 4Bit Yes 1
47 * B 7 4Bit Yes 1
48 * C 8 4Bit Yes 2
49 * D 8 4Bit Yes None
50 * F 2 2Bit Yes None
51 * G 14 4Bit[2] Yes 5
52 * H 10 4Bit[2] Yes 6
53 * I 16 2Bit Yes None
54 * J 12 2Bit Yes None
55 * K 5 4Bit Yes None
56 * N 16 2Bit No IRQ_EINT
57 * P 11 2Bit Yes 8
58 * Q 14 2Bit Yes None
59 * R 15 4Bit[2] Yes None
60 * S 8 2Bit Yes None
61 *
62 * [1] BANKF pins 14,15 do not form part of the external interrupt sources
63 * [2] BANK has two control registers, GPxCON0 and GPxCON1
64 */
65
66static int s5p64x0_gpiolib_rbank_4bit2_input(struct gpio_chip *chip,
67 unsigned int offset)
68{
69 struct s3c_gpio_chip *ourchip = to_s3c_gpio(chip);
70 void __iomem *base = ourchip->base;
71 void __iomem *regcon = base;
72 unsigned long con;
73 unsigned long flags;
74
75 switch (offset) {
76 case 6:
77 offset += 1;
78 case 0:
79 case 1:
80 case 2:
81 case 3:
82 case 4:
83 case 5:
84 regcon -= 4;
85 break;
86 default:
87 offset -= 7;
88 break;
89 }
90
91 s3c_gpio_lock(ourchip, flags);
92
93 con = __raw_readl(regcon);
94 con &= ~(0xf << con_4bit_shift(offset));
95 __raw_writel(con, regcon);
96
97 s3c_gpio_unlock(ourchip, flags);
98
99 return 0;
100}
101
102static int s5p64x0_gpiolib_rbank_4bit2_output(struct gpio_chip *chip,
103 unsigned int offset, int value)
104{
105 struct s3c_gpio_chip *ourchip = to_s3c_gpio(chip);
106 void __iomem *base = ourchip->base;
107 void __iomem *regcon = base;
108 unsigned long con;
109 unsigned long dat;
110 unsigned long flags;
111 unsigned con_offset = offset;
112
113 switch (con_offset) {
114 case 6:
115 con_offset += 1;
116 case 0:
117 case 1:
118 case 2:
119 case 3:
120 case 4:
121 case 5:
122 regcon -= 4;
123 break;
124 default:
125 con_offset -= 7;
126 break;
127 }
128
129 s3c_gpio_lock(ourchip, flags);
130
131 con = __raw_readl(regcon);
132 con &= ~(0xf << con_4bit_shift(con_offset));
133 con |= 0x1 << con_4bit_shift(con_offset);
134
135 dat = __raw_readl(base + GPIODAT_OFF);
136 if (value)
137 dat |= 1 << offset;
138 else
139 dat &= ~(1 << offset);
140
141 __raw_writel(con, regcon);
142 __raw_writel(dat, base + GPIODAT_OFF);
143
144 s3c_gpio_unlock(ourchip, flags);
145
146 return 0;
147}
148
149int s5p64x0_gpio_setcfg_4bit_rbank(struct s3c_gpio_chip *chip,
150 unsigned int off, unsigned int cfg)
151{
152 void __iomem *reg = chip->base;
153 unsigned int shift;
154 u32 con;
155
156 switch (off) {
157 case 0:
158 case 1:
159 case 2:
160 case 3:
161 case 4:
162 case 5:
163 shift = (off & 7) * 4;
164 reg -= 4;
165 break;
166 case 6:
167 shift = ((off + 1) & 7) * 4;
168 reg -= 4;
169 default:
170 shift = ((off + 1) & 7) * 4;
171 break;
172 }
173
174 if (s3c_gpio_is_cfg_special(cfg)) {
175 cfg &= 0xf;
176 cfg <<= shift;
177 }
178
179 con = __raw_readl(reg);
180 con &= ~(0xf << shift);
181 con |= cfg;
182 __raw_writel(con, reg);
183
184 return 0;
185}
186
187static struct s3c_gpio_cfg s5p64x0_gpio_cfgs[] = {
188 {
189 .cfg_eint = 0,
190 }, {
191 .cfg_eint = 7,
192 }, {
193 .cfg_eint = 3,
194 .set_config = s5p64x0_gpio_setcfg_4bit_rbank,
195 }, {
196 .cfg_eint = 0,
197 .set_config = s3c_gpio_setcfg_s3c24xx,
198 .get_config = s3c_gpio_getcfg_s3c24xx,
199 }, {
200 .cfg_eint = 2,
201 .set_config = s3c_gpio_setcfg_s3c24xx,
202 .get_config = s3c_gpio_getcfg_s3c24xx,
203 }, {
204 .cfg_eint = 3,
205 .set_config = s3c_gpio_setcfg_s3c24xx,
206 .get_config = s3c_gpio_getcfg_s3c24xx,
207 },
208};
209
210static struct s3c_gpio_chip s5p6440_gpio_4bit[] = {
211 {
212 .base = S5P64X0_GPA_BASE,
213 .config = &s5p64x0_gpio_cfgs[1],
214 .chip = {
215 .base = S5P6440_GPA(0),
216 .ngpio = S5P6440_GPIO_A_NR,
217 .label = "GPA",
218 },
219 }, {
220 .base = S5P64X0_GPB_BASE,
221 .config = &s5p64x0_gpio_cfgs[1],
222 .chip = {
223 .base = S5P6440_GPB(0),
224 .ngpio = S5P6440_GPIO_B_NR,
225 .label = "GPB",
226 },
227 }, {
228 .base = S5P64X0_GPC_BASE,
229 .config = &s5p64x0_gpio_cfgs[1],
230 .chip = {
231 .base = S5P6440_GPC(0),
232 .ngpio = S5P6440_GPIO_C_NR,
233 .label = "GPC",
234 },
235 }, {
236 .base = S5P64X0_GPG_BASE,
237 .config = &s5p64x0_gpio_cfgs[1],
238 .chip = {
239 .base = S5P6440_GPG(0),
240 .ngpio = S5P6440_GPIO_G_NR,
241 .label = "GPG",
242 },
243 },
244};
245
246static struct s3c_gpio_chip s5p6440_gpio_4bit2[] = {
247 {
248 .base = S5P64X0_GPH_BASE + 0x4,
249 .config = &s5p64x0_gpio_cfgs[1],
250 .chip = {
251 .base = S5P6440_GPH(0),
252 .ngpio = S5P6440_GPIO_H_NR,
253 .label = "GPH",
254 },
255 },
256};
257
258static struct s3c_gpio_chip s5p6440_gpio_rbank_4bit2[] = {
259 {
260 .base = S5P64X0_GPR_BASE + 0x4,
261 .config = &s5p64x0_gpio_cfgs[2],
262 .chip = {
263 .base = S5P6440_GPR(0),
264 .ngpio = S5P6440_GPIO_R_NR,
265 .label = "GPR",
266 },
267 },
268};
269
270static struct s3c_gpio_chip s5p6440_gpio_2bit[] = {
271 {
272 .base = S5P64X0_GPF_BASE,
273 .config = &s5p64x0_gpio_cfgs[5],
274 .chip = {
275 .base = S5P6440_GPF(0),
276 .ngpio = S5P6440_GPIO_F_NR,
277 .label = "GPF",
278 },
279 }, {
280 .base = S5P64X0_GPI_BASE,
281 .config = &s5p64x0_gpio_cfgs[3],
282 .chip = {
283 .base = S5P6440_GPI(0),
284 .ngpio = S5P6440_GPIO_I_NR,
285 .label = "GPI",
286 },
287 }, {
288 .base = S5P64X0_GPJ_BASE,
289 .config = &s5p64x0_gpio_cfgs[3],
290 .chip = {
291 .base = S5P6440_GPJ(0),
292 .ngpio = S5P6440_GPIO_J_NR,
293 .label = "GPJ",
294 },
295 }, {
296 .base = S5P64X0_GPN_BASE,
297 .config = &s5p64x0_gpio_cfgs[4],
298 .chip = {
299 .base = S5P6440_GPN(0),
300 .ngpio = S5P6440_GPIO_N_NR,
301 .label = "GPN",
302 },
303 }, {
304 .base = S5P64X0_GPP_BASE,
305 .config = &s5p64x0_gpio_cfgs[5],
306 .chip = {
307 .base = S5P6440_GPP(0),
308 .ngpio = S5P6440_GPIO_P_NR,
309 .label = "GPP",
310 },
311 },
312};
313
314static struct s3c_gpio_chip s5p6450_gpio_4bit[] = {
315 {
316 .base = S5P64X0_GPA_BASE,
317 .config = &s5p64x0_gpio_cfgs[1],
318 .chip = {
319 .base = S5P6450_GPA(0),
320 .ngpio = S5P6450_GPIO_A_NR,
321 .label = "GPA",
322 },
323 }, {
324 .base = S5P64X0_GPB_BASE,
325 .config = &s5p64x0_gpio_cfgs[1],
326 .chip = {
327 .base = S5P6450_GPB(0),
328 .ngpio = S5P6450_GPIO_B_NR,
329 .label = "GPB",
330 },
331 }, {
332 .base = S5P64X0_GPC_BASE,
333 .config = &s5p64x0_gpio_cfgs[1],
334 .chip = {
335 .base = S5P6450_GPC(0),
336 .ngpio = S5P6450_GPIO_C_NR,
337 .label = "GPC",
338 },
339 }, {
340 .base = S5P6450_GPD_BASE,
341 .config = &s5p64x0_gpio_cfgs[1],
342 .chip = {
343 .base = S5P6450_GPD(0),
344 .ngpio = S5P6450_GPIO_D_NR,
345 .label = "GPD",
346 },
347 }, {
348 .base = S5P6450_GPK_BASE,
349 .config = &s5p64x0_gpio_cfgs[1],
350 .chip = {
351 .base = S5P6450_GPK(0),
352 .ngpio = S5P6450_GPIO_K_NR,
353 .label = "GPK",
354 },
355 },
356};
357
358static struct s3c_gpio_chip s5p6450_gpio_4bit2[] = {
359 {
360 .base = S5P64X0_GPG_BASE + 0x4,
361 .config = &s5p64x0_gpio_cfgs[1],
362 .chip = {
363 .base = S5P6450_GPG(0),
364 .ngpio = S5P6450_GPIO_G_NR,
365 .label = "GPG",
366 },
367 }, {
368 .base = S5P64X0_GPH_BASE + 0x4,
369 .config = &s5p64x0_gpio_cfgs[1],
370 .chip = {
371 .base = S5P6450_GPH(0),
372 .ngpio = S5P6450_GPIO_H_NR,
373 .label = "GPH",
374 },
375 },
376};
377
378static struct s3c_gpio_chip s5p6450_gpio_rbank_4bit2[] = {
379 {
380 .base = S5P64X0_GPR_BASE + 0x4,
381 .config = &s5p64x0_gpio_cfgs[2],
382 .chip = {
383 .base = S5P6450_GPR(0),
384 .ngpio = S5P6450_GPIO_R_NR,
385 .label = "GPR",
386 },
387 },
388};
389
390static struct s3c_gpio_chip s5p6450_gpio_2bit[] = {
391 {
392 .base = S5P64X0_GPF_BASE,
393 .config = &s5p64x0_gpio_cfgs[5],
394 .chip = {
395 .base = S5P6450_GPF(0),
396 .ngpio = S5P6450_GPIO_F_NR,
397 .label = "GPF",
398 },
399 }, {
400 .base = S5P64X0_GPI_BASE,
401 .config = &s5p64x0_gpio_cfgs[3],
402 .chip = {
403 .base = S5P6450_GPI(0),
404 .ngpio = S5P6450_GPIO_I_NR,
405 .label = "GPI",
406 },
407 }, {
408 .base = S5P64X0_GPJ_BASE,
409 .config = &s5p64x0_gpio_cfgs[3],
410 .chip = {
411 .base = S5P6450_GPJ(0),
412 .ngpio = S5P6450_GPIO_J_NR,
413 .label = "GPJ",
414 },
415 }, {
416 .base = S5P64X0_GPN_BASE,
417 .config = &s5p64x0_gpio_cfgs[4],
418 .chip = {
419 .base = S5P6450_GPN(0),
420 .ngpio = S5P6450_GPIO_N_NR,
421 .label = "GPN",
422 },
423 }, {
424 .base = S5P64X0_GPP_BASE,
425 .config = &s5p64x0_gpio_cfgs[5],
426 .chip = {
427 .base = S5P6450_GPP(0),
428 .ngpio = S5P6450_GPIO_P_NR,
429 .label = "GPP",
430 },
431 }, {
432 .base = S5P6450_GPQ_BASE,
433 .config = &s5p64x0_gpio_cfgs[4],
434 .chip = {
435 .base = S5P6450_GPQ(0),
436 .ngpio = S5P6450_GPIO_Q_NR,
437 .label = "GPQ",
438 },
439 }, {
440 .base = S5P6450_GPS_BASE,
441 .config = &s5p64x0_gpio_cfgs[5],
442 .chip = {
443 .base = S5P6450_GPS(0),
444 .ngpio = S5P6450_GPIO_S_NR,
445 .label = "GPS",
446 },
447 },
448};
449
450void __init s5p64x0_gpiolib_set_cfg(struct s3c_gpio_cfg *chipcfg, int nr_chips)
451{
452 for (; nr_chips > 0; nr_chips--, chipcfg++) {
453 if (!chipcfg->set_config)
454 chipcfg->set_config = s3c_gpio_setcfg_s3c64xx_4bit;
455 if (!chipcfg->get_config)
456 chipcfg->get_config = s3c_gpio_getcfg_s3c64xx_4bit;
457 if (!chipcfg->set_pull)
458 chipcfg->set_pull = s3c_gpio_setpull_updown;
459 if (!chipcfg->get_pull)
460 chipcfg->get_pull = s3c_gpio_getpull_updown;
461 }
462}
463
464static void __init s5p64x0_gpio_add_rbank_4bit2(struct s3c_gpio_chip *chip,
465 int nr_chips)
466{
467 for (; nr_chips > 0; nr_chips--, chip++) {
468 chip->chip.direction_input = s5p64x0_gpiolib_rbank_4bit2_input;
469 chip->chip.direction_output =
470 s5p64x0_gpiolib_rbank_4bit2_output;
471 s3c_gpiolib_add(chip);
472 }
473}
474
475static int __init s5p64x0_gpiolib_init(void)
476{
477 s5p64x0_gpiolib_set_cfg(s5p64x0_gpio_cfgs,
478 ARRAY_SIZE(s5p64x0_gpio_cfgs));
479
480 if (soc_is_s5p6450()) {
481 samsung_gpiolib_add_2bit_chips(s5p6450_gpio_2bit,
482 ARRAY_SIZE(s5p6450_gpio_2bit));
483
484 samsung_gpiolib_add_4bit_chips(s5p6450_gpio_4bit,
485 ARRAY_SIZE(s5p6450_gpio_4bit));
486
487 samsung_gpiolib_add_4bit2_chips(s5p6450_gpio_4bit2,
488 ARRAY_SIZE(s5p6450_gpio_4bit2));
489
490 s5p64x0_gpio_add_rbank_4bit2(s5p6450_gpio_rbank_4bit2,
491 ARRAY_SIZE(s5p6450_gpio_rbank_4bit2));
492 } else {
493 samsung_gpiolib_add_2bit_chips(s5p6440_gpio_2bit,
494 ARRAY_SIZE(s5p6440_gpio_2bit));
495
496 samsung_gpiolib_add_4bit_chips(s5p6440_gpio_4bit,
497 ARRAY_SIZE(s5p6440_gpio_4bit));
498
499 samsung_gpiolib_add_4bit2_chips(s5p6440_gpio_4bit2,
500 ARRAY_SIZE(s5p6440_gpio_4bit2));
501
502 s5p64x0_gpio_add_rbank_4bit2(s5p6440_gpio_rbank_4bit2,
503 ARRAY_SIZE(s5p6440_gpio_rbank_4bit2));
504 }
505
506 return 0;
507}
508core_initcall(s5p64x0_gpiolib_init);
diff --git a/arch/arm/mach-s5p64x0/include/mach/i2c.h b/arch/arm/mach-s5p64x0/i2c.h
index 887d25209e8e..1e5bb4ea200d 100644
--- a/arch/arm/mach-s5p64x0/include/mach/i2c.h
+++ b/arch/arm/mach-s5p64x0/i2c.h
@@ -1,5 +1,4 @@
1/* linux/arch/arm/mach-s5p64x0/include/mach/i2c.h 1/*
2 *
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd. 2 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com 3 * http://www.samsung.com
5 * 4 *
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 1af823558c60..e23723a5a214 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>
@@ -38,7 +37,6 @@
38#include <mach/hardware.h> 37#include <mach/hardware.h>
39#include <mach/map.h> 38#include <mach/map.h>
40#include <mach/regs-clock.h> 39#include <mach/regs-clock.h>
41#include <mach/i2c.h>
42#include <mach/regs-gpio.h> 40#include <mach/regs-gpio.h>
43 41
44#include <plat/regs-serial.h> 42#include <plat/regs-serial.h>
@@ -56,6 +54,7 @@
56#include <plat/sdhci.h> 54#include <plat/sdhci.h>
57 55
58#include "common.h" 56#include "common.h"
57#include "i2c.h"
59 58
60#define SMDK6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ 59#define SMDK6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
61 S3C2410_UCON_RXILEVEL | \ 60 S3C2410_UCON_RXILEVEL | \
@@ -272,9 +271,8 @@ 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 .timer = &s5p_timer, 276 .init_time = s5p_timer_init,
279 .restart = s5p64x0_restart, 277 .restart = s5p64x0_restart,
280MACHINE_END 278MACHINE_END
diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-s5p64x0/mach-smdk6450.c
index 62526ccf6b70..ca10963a959e 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>
@@ -38,7 +37,6 @@
38#include <mach/hardware.h> 37#include <mach/hardware.h>
39#include <mach/map.h> 38#include <mach/map.h>
40#include <mach/regs-clock.h> 39#include <mach/regs-clock.h>
41#include <mach/i2c.h>
42#include <mach/regs-gpio.h> 40#include <mach/regs-gpio.h>
43 41
44#include <plat/regs-serial.h> 42#include <plat/regs-serial.h>
@@ -56,6 +54,7 @@
56#include <plat/sdhci.h> 54#include <plat/sdhci.h>
57 55
58#include "common.h" 56#include "common.h"
57#include "i2c.h"
59 58
60#define SMDK6450_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ 59#define SMDK6450_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
61 S3C2410_UCON_RXILEVEL | \ 60 S3C2410_UCON_RXILEVEL | \
@@ -291,9 +290,8 @@ 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 .timer = &s5p_timer, 295 .init_time = s5p_timer_init,
298 .restart = s5p64x0_restart, 296 .restart = s5p64x0_restart,
299MACHINE_END 297MACHINE_END
diff --git a/arch/arm/mach-s5p64x0/setup-i2c0.c b/arch/arm/mach-s5p64x0/setup-i2c0.c
index a32edc545e6c..569b76ac98cb 100644
--- a/arch/arm/mach-s5p64x0/setup-i2c0.c
+++ b/arch/arm/mach-s5p64x0/setup-i2c0.c
@@ -21,7 +21,7 @@ struct platform_device; /* don't need the contents */
21#include <plat/gpio-cfg.h> 21#include <plat/gpio-cfg.h>
22#include <linux/platform_data/i2c-s3c2410.h> 22#include <linux/platform_data/i2c-s3c2410.h>
23 23
24#include <mach/i2c.h> 24#include "i2c.h"
25 25
26void s5p6440_i2c0_cfg_gpio(struct platform_device *dev) 26void s5p6440_i2c0_cfg_gpio(struct platform_device *dev)
27{ 27{
diff --git a/arch/arm/mach-s5p64x0/setup-i2c1.c b/arch/arm/mach-s5p64x0/setup-i2c1.c
index ca2c5c7f8aa6..867374e6d0bc 100644
--- a/arch/arm/mach-s5p64x0/setup-i2c1.c
+++ b/arch/arm/mach-s5p64x0/setup-i2c1.c
@@ -21,7 +21,7 @@ struct platform_device; /* don't need the contents */
21#include <plat/gpio-cfg.h> 21#include <plat/gpio-cfg.h>
22#include <linux/platform_data/i2c-s3c2410.h> 22#include <linux/platform_data/i2c-s3c2410.h>
23 23
24#include <mach/i2c.h> 24#include "i2c.h"
25 25
26void s5p6440_i2c1_cfg_gpio(struct platform_device *dev) 26void s5p6440_i2c1_cfg_gpio(struct platform_device *dev)
27{ 27{
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 9abe95e806ab..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,9 +253,8 @@ 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 .timer = &s3c24xx_timer, 258 .init_time = s3c24xx_timer_init,
261 .restart = s5pc100_restart, 259 .restart = s5pc100_restart,
262MACHINE_END 260MACHINE_END
diff --git a/arch/arm/mach-s5pv210/dev-audio.c b/arch/arm/mach-s5pv210/dev-audio.c
index addfb165c13d..2d67361ef431 100644
--- a/arch/arm/mach-s5pv210/dev-audio.c
+++ b/arch/arm/mach-s5pv210/dev-audio.c
@@ -18,7 +18,8 @@
18#include <mach/map.h> 18#include <mach/map.h>
19#include <mach/dma.h> 19#include <mach/dma.h>
20#include <mach/irqs.h> 20#include <mach/irqs.h>
21#include <mach/regs-audss.h> 21
22#define S5PV210_AUDSS_INT_MEM (0xC0000000)
22 23
23static int s5pv210_cfg_i2s(struct platform_device *pdev) 24static int s5pv210_cfg_i2s(struct platform_device *pdev)
24{ 25{
diff --git a/arch/arm/mach-s5pv210/include/mach/regs-audss.h b/arch/arm/mach-s5pv210/include/mach/regs-audss.h
deleted file mode 100644
index eacc1f790807..000000000000
--- a/arch/arm/mach-s5pv210/include/mach/regs-audss.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/* arch/arm/mach-s5pv210/include/mach/regs-audss.h
2 *
3 * Copyright (c) 2011 Samsung Electronics
4 * http://www.samsung.com
5 *
6 * S5PV210 Audio SubSystem clock register definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#ifndef __PLAT_REGS_AUDSS_H
14#define __PLAT_REGS_AUDSS_H __FILE__
15
16#define S5PV210_AUDSS_INT_MEM (0xC0000000)
17
18#endif /* _PLAT_REGS_AUDSS_H */
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/regs-sys.h b/arch/arm/mach-s5pv210/include/mach/regs-sys.h
deleted file mode 100644
index cccb1eddaa38..000000000000
--- a/arch/arm/mach-s5pv210/include/mach/regs-sys.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/* arch/arm/mach-s5pv210/include/mach/regs-sys.h
2 *
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
5 *
6 * S5PV210 - System registers definitions
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#define S5PV210_USB_PHY_CON (S3C_VA_SYS + 0xE80C)
14#define S5PV210_USB_PHY0_EN (1 << 0)
15#define S5PV210_USB_PHY1_EN (1 << 1)
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 ee9fa5c2ef2c..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,9 +684,8 @@ 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 .timer = &s5p_timer, 689 .init_time = s5p_timer_init,
692 .restart = s5pv210_restart, 690 .restart = s5pv210_restart,
693MACHINE_END 691MACHINE_END
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index c72b31078c99..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,10 +971,9 @@ 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 .timer = &s5p_timer, 976 .init_time = s5p_timer_init,
979 .reserve = &goni_reserve, 977 .reserve = &goni_reserve,
980 .restart = s5pv210_restart, 978 .restart = s5pv210_restart,
981MACHINE_END 979MACHINE_END
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c
index f1f3bd37ecda..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,10 +151,9 @@ 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 .timer = &s5p_timer, 156 .init_time = s5p_timer_init,
159 .restart = s5pv210_restart, 157 .restart = s5pv210_restart,
160 .reserve = &smdkc110_reserve, 158 .reserve = &smdkc110_reserve,
161MACHINE_END 159MACHINE_END
diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-s5pv210/mach-smdkv210.c
index 6bc8404bf678..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,10 +327,9 @@ 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 .timer = &s5p_timer, 332 .init_time = s5p_timer_init,
335 .restart = s5pv210_restart, 333 .restart = s5pv210_restart,
336 .reserve = &smdkv210_reserve, 334 .reserve = &smdkv210_reserve,
337MACHINE_END 335MACHINE_END
diff --git a/arch/arm/mach-s5pv210/mach-torbreck.c b/arch/arm/mach-s5pv210/mach-torbreck.c
index 18785cb5e1ef..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,9 +128,8 @@ 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 .timer = &s5p_timer, 133 .init_time = s5p_timer_init,
136 .restart = s5pv210_restart, 134 .restart = s5pv210_restart,
137MACHINE_END 135MACHINE_END
diff --git a/arch/arm/mach-s5pv210/setup-usb-phy.c b/arch/arm/mach-s5pv210/setup-usb-phy.c
index be39cf4aa91b..356a0900af03 100644
--- a/arch/arm/mach-s5pv210/setup-usb-phy.c
+++ b/arch/arm/mach-s5pv210/setup-usb-phy.c
@@ -12,12 +12,17 @@
12#include <linux/err.h> 12#include <linux/err.h>
13#include <linux/io.h> 13#include <linux/io.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15
15#include <mach/map.h> 16#include <mach/map.h>
16#include <mach/regs-sys.h> 17
17#include <plat/cpu.h> 18#include <plat/cpu.h>
18#include <plat/regs-usb-hsotg-phy.h> 19#include <plat/regs-usb-hsotg-phy.h>
19#include <plat/usb-phy.h> 20#include <plat/usb-phy.h>
20 21
22#define S5PV210_USB_PHY_CON (S3C_VA_SYS + 0xE80C)
23#define S5PV210_USB_PHY0_EN (1 << 0)
24#define S5PV210_USB_PHY1_EN (1 << 1)
25
21static int s5pv210_usb_otgphy_init(struct platform_device *pdev) 26static int s5pv210_usb_otgphy_init(struct platform_device *pdev)
22{ 27{
23 struct clk *xusbxti; 28 struct clk *xusbxti;
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c
index 9a23739f7026..b38d2525d5db 100644
--- a/arch/arm/mach-sa1100/assabet.c
+++ b/arch/arm/mach-sa1100/assabet.c
@@ -621,7 +621,7 @@ MACHINE_START(ASSABET, "Intel-Assabet")
621 .map_io = assabet_map_io, 621 .map_io = assabet_map_io,
622 .nr_irqs = SA1100_NR_IRQS, 622 .nr_irqs = SA1100_NR_IRQS,
623 .init_irq = sa1100_init_irq, 623 .init_irq = sa1100_init_irq,
624 .timer = &sa1100_timer, 624 .init_time = sa1100_timer_init,
625 .init_machine = assabet_init, 625 .init_machine = assabet_init,
626 .init_late = sa11x0_init_late, 626 .init_late = sa11x0_init_late,
627#ifdef CONFIG_SA1111 627#ifdef CONFIG_SA1111
diff --git a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c
index b2dadf3ea3df..63361b6d04e9 100644
--- a/arch/arm/mach-sa1100/badge4.c
+++ b/arch/arm/mach-sa1100/badge4.c
@@ -336,7 +336,7 @@ MACHINE_START(BADGE4, "Hewlett-Packard Laboratories BadgePAD 4")
336 .nr_irqs = SA1100_NR_IRQS, 336 .nr_irqs = SA1100_NR_IRQS,
337 .init_irq = sa1100_init_irq, 337 .init_irq = sa1100_init_irq,
338 .init_late = sa11x0_init_late, 338 .init_late = sa11x0_init_late,
339 .timer = &sa1100_timer, 339 .init_time = sa1100_timer_init,
340#ifdef CONFIG_SA1111 340#ifdef CONFIG_SA1111
341 .dma_zone_size = SZ_1M, 341 .dma_zone_size = SZ_1M,
342#endif 342#endif
diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c
index 304bca4a07c0..2d25ececb415 100644
--- a/arch/arm/mach-sa1100/cerf.c
+++ b/arch/arm/mach-sa1100/cerf.c
@@ -174,7 +174,7 @@ MACHINE_START(CERF, "Intrinsyc CerfBoard/CerfCube")
174 .map_io = cerf_map_io, 174 .map_io = cerf_map_io,
175 .nr_irqs = SA1100_NR_IRQS, 175 .nr_irqs = SA1100_NR_IRQS,
176 .init_irq = cerf_init_irq, 176 .init_irq = cerf_init_irq,
177 .timer = &sa1100_timer, 177 .init_time = sa1100_timer_init,
178 .init_machine = cerf_init, 178 .init_machine = cerf_init,
179 .init_late = sa11x0_init_late, 179 .init_late = sa11x0_init_late,
180 .restart = sa11x0_restart, 180 .restart = sa11x0_restart,
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index 45f424f5fca6..612a45689770 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -399,7 +399,7 @@ MACHINE_START(COLLIE, "Sharp-Collie")
399 .map_io = collie_map_io, 399 .map_io = collie_map_io,
400 .nr_irqs = SA1100_NR_IRQS, 400 .nr_irqs = SA1100_NR_IRQS,
401 .init_irq = sa1100_init_irq, 401 .init_irq = sa1100_init_irq,
402 .timer = &sa1100_timer, 402 .init_time = sa1100_timer_init,
403 .init_machine = collie_init, 403 .init_machine = collie_init,
404 .init_late = sa11x0_init_late, 404 .init_late = sa11x0_init_late,
405 .restart = sa11x0_restart, 405 .restart = sa11x0_restart,
diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h
index a5b7c13da3e3..2abc6a1f6e86 100644
--- a/arch/arm/mach-sa1100/generic.h
+++ b/arch/arm/mach-sa1100/generic.h
@@ -4,9 +4,7 @@
4 * Author: Nicolas Pitre 4 * Author: Nicolas Pitre
5 */ 5 */
6 6
7struct sys_timer; 7extern void sa1100_timer_init(void);
8
9extern struct sys_timer sa1100_timer;
10extern void __init sa1100_map_io(void); 8extern void __init sa1100_map_io(void);
11extern void __init sa1100_init_irq(void); 9extern void __init sa1100_init_irq(void);
12extern void __init sa1100_init_gpio(void); 10extern void __init sa1100_init_gpio(void);
diff --git a/arch/arm/mach-sa1100/h3100.c b/arch/arm/mach-sa1100/h3100.c
index e1571eab08ae..b8f2b151539b 100644
--- a/arch/arm/mach-sa1100/h3100.c
+++ b/arch/arm/mach-sa1100/h3100.c
@@ -108,7 +108,7 @@ MACHINE_START(H3100, "Compaq iPAQ H3100")
108 .map_io = h3100_map_io, 108 .map_io = h3100_map_io,
109 .nr_irqs = SA1100_NR_IRQS, 109 .nr_irqs = SA1100_NR_IRQS,
110 .init_irq = sa1100_init_irq, 110 .init_irq = sa1100_init_irq,
111 .timer = &sa1100_timer, 111 .init_time = sa1100_timer_init,
112 .init_machine = h3100_mach_init, 112 .init_machine = h3100_mach_init,
113 .init_late = sa11x0_init_late, 113 .init_late = sa11x0_init_late,
114 .restart = sa11x0_restart, 114 .restart = sa11x0_restart,
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index ba7a2901ab88..b8dc5bd22623 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -158,7 +158,7 @@ MACHINE_START(H3600, "Compaq iPAQ H3600")
158 .map_io = h3600_map_io, 158 .map_io = h3600_map_io,
159 .nr_irqs = SA1100_NR_IRQS, 159 .nr_irqs = SA1100_NR_IRQS,
160 .init_irq = sa1100_init_irq, 160 .init_irq = sa1100_init_irq,
161 .timer = &sa1100_timer, 161 .init_time = sa1100_timer_init,
162 .init_machine = h3600_mach_init, 162 .init_machine = h3600_mach_init,
163 .init_late = sa11x0_init_late, 163 .init_late = sa11x0_init_late,
164 .restart = sa11x0_restart, 164 .restart = sa11x0_restart,
diff --git a/arch/arm/mach-sa1100/hackkit.c b/arch/arm/mach-sa1100/hackkit.c
index d005939c41fc..643d5f2d9af9 100644
--- a/arch/arm/mach-sa1100/hackkit.c
+++ b/arch/arm/mach-sa1100/hackkit.c
@@ -229,7 +229,7 @@ MACHINE_START(HACKKIT, "HackKit Cpu Board")
229 .map_io = hackkit_map_io, 229 .map_io = hackkit_map_io,
230 .nr_irqs = SA1100_NR_IRQS, 230 .nr_irqs = SA1100_NR_IRQS,
231 .init_irq = sa1100_init_irq, 231 .init_irq = sa1100_init_irq,
232 .timer = &sa1100_timer, 232 .init_time = sa1100_timer_init,
233 .init_machine = hackkit_init, 233 .init_machine = hackkit_init,
234 .init_late = sa11x0_init_late, 234 .init_late = sa11x0_init_late,
235 .restart = sa11x0_restart, 235 .restart = sa11x0_restart,
diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c
index 35cfc428b4d4..c0b1f5bafae4 100644
--- a/arch/arm/mach-sa1100/jornada720.c
+++ b/arch/arm/mach-sa1100/jornada720.c
@@ -346,7 +346,7 @@ MACHINE_START(JORNADA720, "HP Jornada 720")
346 .map_io = jornada720_map_io, 346 .map_io = jornada720_map_io,
347 .nr_irqs = SA1100_NR_IRQS, 347 .nr_irqs = SA1100_NR_IRQS,
348 .init_irq = sa1100_init_irq, 348 .init_irq = sa1100_init_irq,
349 .timer = &sa1100_timer, 349 .init_time = sa1100_timer_init,
350 .init_machine = jornada720_mach_init, 350 .init_machine = jornada720_mach_init,
351 .init_late = sa11x0_init_late, 351 .init_late = sa11x0_init_late,
352#ifdef CONFIG_SA1111 352#ifdef CONFIG_SA1111
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/lart.c b/arch/arm/mach-sa1100/lart.c
index f69f78fc3ddd..a89917653884 100644
--- a/arch/arm/mach-sa1100/lart.c
+++ b/arch/arm/mach-sa1100/lart.c
@@ -174,6 +174,6 @@ MACHINE_START(LART, "LART")
174 .init_irq = sa1100_init_irq, 174 .init_irq = sa1100_init_irq,
175 .init_machine = lart_init, 175 .init_machine = lart_init,
176 .init_late = sa11x0_init_late, 176 .init_late = sa11x0_init_late,
177 .timer = &sa1100_timer, 177 .init_time = sa1100_timer_init,
178 .restart = sa11x0_restart, 178 .restart = sa11x0_restart,
179MACHINE_END 179MACHINE_END
diff --git a/arch/arm/mach-sa1100/nanoengine.c b/arch/arm/mach-sa1100/nanoengine.c
index 102e08f7b109..f1cb3784d525 100644
--- a/arch/arm/mach-sa1100/nanoengine.c
+++ b/arch/arm/mach-sa1100/nanoengine.c
@@ -110,7 +110,7 @@ MACHINE_START(NANOENGINE, "BSE nanoEngine")
110 .map_io = nanoengine_map_io, 110 .map_io = nanoengine_map_io,
111 .nr_irqs = SA1100_NR_IRQS, 111 .nr_irqs = SA1100_NR_IRQS,
112 .init_irq = sa1100_init_irq, 112 .init_irq = sa1100_init_irq,
113 .timer = &sa1100_timer, 113 .init_time = sa1100_timer_init,
114 .init_machine = nanoengine_init, 114 .init_machine = nanoengine_init,
115 .init_late = sa11x0_init_late, 115 .init_late = sa11x0_init_late,
116 .restart = sa11x0_restart, 116 .restart = sa11x0_restart,
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/pleb.c b/arch/arm/mach-sa1100/pleb.c
index c51bb63f90fb..091261878eff 100644
--- a/arch/arm/mach-sa1100/pleb.c
+++ b/arch/arm/mach-sa1100/pleb.c
@@ -133,7 +133,7 @@ MACHINE_START(PLEB, "PLEB")
133 .map_io = pleb_map_io, 133 .map_io = pleb_map_io,
134 .nr_irqs = SA1100_NR_IRQS, 134 .nr_irqs = SA1100_NR_IRQS,
135 .init_irq = sa1100_init_irq, 135 .init_irq = sa1100_init_irq,
136 .timer = &sa1100_timer, 136 .init_time = sa1100_timer_init,
137 .init_machine = pleb_init, 137 .init_machine = pleb_init,
138 .init_late = sa11x0_init_late, 138 .init_late = sa11x0_init_late,
139 .restart = sa11x0_restart, 139 .restart = sa11x0_restart,
diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c
index 6460d25fbb88..c8866bce7386 100644
--- a/arch/arm/mach-sa1100/shannon.c
+++ b/arch/arm/mach-sa1100/shannon.c
@@ -102,7 +102,7 @@ MACHINE_START(SHANNON, "Shannon (AKA: Tuxscreen)")
102 .map_io = shannon_map_io, 102 .map_io = shannon_map_io,
103 .nr_irqs = SA1100_NR_IRQS, 103 .nr_irqs = SA1100_NR_IRQS,
104 .init_irq = sa1100_init_irq, 104 .init_irq = sa1100_init_irq,
105 .timer = &sa1100_timer, 105 .init_time = sa1100_timer_init,
106 .init_machine = shannon_init, 106 .init_machine = shannon_init,
107 .init_late = sa11x0_init_late, 107 .init_late = sa11x0_init_late,
108 .restart = sa11x0_restart, 108 .restart = sa11x0_restart,
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c
index 6d65f65fcb23..bcbc94540e45 100644
--- a/arch/arm/mach-sa1100/simpad.c
+++ b/arch/arm/mach-sa1100/simpad.c
@@ -396,6 +396,6 @@ MACHINE_START(SIMPAD, "Simpad")
396 .nr_irqs = SA1100_NR_IRQS, 396 .nr_irqs = SA1100_NR_IRQS,
397 .init_irq = sa1100_init_irq, 397 .init_irq = sa1100_init_irq,
398 .init_late = sa11x0_init_late, 398 .init_late = sa11x0_init_late,
399 .timer = &sa1100_timer, 399 .init_time = sa1100_timer_init,
400 .restart = sa11x0_restart, 400 .restart = sa11x0_restart,
401MACHINE_END 401MACHINE_END
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
index 80702c9ecc77..a59a13a665a6 100644
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -69,46 +69,10 @@ sa1100_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *c)
69 } 69 }
70} 70}
71 71
72static struct clock_event_device ckevt_sa1100_osmr0 = {
73 .name = "osmr0",
74 .features = CLOCK_EVT_FEAT_ONESHOT,
75 .rating = 200,
76 .set_next_event = sa1100_osmr0_set_next_event,
77 .set_mode = sa1100_osmr0_set_mode,
78};
79
80static struct irqaction sa1100_timer_irq = {
81 .name = "ost0",
82 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
83 .handler = sa1100_ost0_interrupt,
84 .dev_id = &ckevt_sa1100_osmr0,
85};
86
87static void __init sa1100_timer_init(void)
88{
89 writel_relaxed(0, OIER);
90 writel_relaxed(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR);
91
92 setup_sched_clock(sa1100_read_sched_clock, 32, 3686400);
93
94 clockevents_calc_mult_shift(&ckevt_sa1100_osmr0, 3686400, 4);
95 ckevt_sa1100_osmr0.max_delta_ns =
96 clockevent_delta2ns(0x7fffffff, &ckevt_sa1100_osmr0);
97 ckevt_sa1100_osmr0.min_delta_ns =
98 clockevent_delta2ns(MIN_OSCR_DELTA * 2, &ckevt_sa1100_osmr0) + 1;
99 ckevt_sa1100_osmr0.cpumask = cpumask_of(0);
100
101 setup_irq(IRQ_OST0, &sa1100_timer_irq);
102
103 clocksource_mmio_init(OSCR, "oscr", CLOCK_TICK_RATE, 200, 32,
104 clocksource_mmio_readl_up);
105 clockevents_register_device(&ckevt_sa1100_osmr0);
106}
107
108#ifdef CONFIG_PM 72#ifdef CONFIG_PM
109unsigned long osmr[4], oier; 73unsigned long osmr[4], oier;
110 74
111static void sa1100_timer_suspend(void) 75static void sa1100_timer_suspend(struct clock_event_device *cedev)
112{ 76{
113 osmr[0] = readl_relaxed(OSMR0); 77 osmr[0] = readl_relaxed(OSMR0);
114 osmr[1] = readl_relaxed(OSMR1); 78 osmr[1] = readl_relaxed(OSMR1);
@@ -117,7 +81,7 @@ static void sa1100_timer_suspend(void)
117 oier = readl_relaxed(OIER); 81 oier = readl_relaxed(OIER);
118} 82}
119 83
120static void sa1100_timer_resume(void) 84static void sa1100_timer_resume(struct clock_event_device *cedev)
121{ 85{
122 writel_relaxed(0x0f, OSSR); 86 writel_relaxed(0x0f, OSSR);
123 writel_relaxed(osmr[0], OSMR0); 87 writel_relaxed(osmr[0], OSMR0);
@@ -136,8 +100,36 @@ static void sa1100_timer_resume(void)
136#define sa1100_timer_resume NULL 100#define sa1100_timer_resume NULL
137#endif 101#endif
138 102
139struct sys_timer sa1100_timer = { 103static struct clock_event_device ckevt_sa1100_osmr0 = {
140 .init = sa1100_timer_init, 104 .name = "osmr0",
105 .features = CLOCK_EVT_FEAT_ONESHOT,
106 .rating = 200,
107 .set_next_event = sa1100_osmr0_set_next_event,
108 .set_mode = sa1100_osmr0_set_mode,
141 .suspend = sa1100_timer_suspend, 109 .suspend = sa1100_timer_suspend,
142 .resume = sa1100_timer_resume, 110 .resume = sa1100_timer_resume,
143}; 111};
112
113static struct irqaction sa1100_timer_irq = {
114 .name = "ost0",
115 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
116 .handler = sa1100_ost0_interrupt,
117 .dev_id = &ckevt_sa1100_osmr0,
118};
119
120void __init sa1100_timer_init(void)
121{
122 writel_relaxed(0, OIER);
123 writel_relaxed(OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3, OSSR);
124
125 setup_sched_clock(sa1100_read_sched_clock, 32, 3686400);
126
127 ckevt_sa1100_osmr0.cpumask = cpumask_of(0);
128
129 setup_irq(IRQ_OST0, &sa1100_timer_irq);
130
131 clocksource_mmio_init(OSCR, "oscr", CLOCK_TICK_RATE, 200, 32,
132 clocksource_mmio_readl_up);
133 clockevents_config_and_register(&ckevt_sa1100_osmr0, 3686400,
134 MIN_OSCR_DELTA * 2, 0x7fffffff);
135}
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c
index 9ad2e9737fb5..b63dec848195 100644
--- a/arch/arm/mach-shark/core.c
+++ b/arch/arm/mach-shark/core.c
@@ -128,10 +128,6 @@ static void __init shark_timer_init(void)
128 setup_irq(IRQ_TIMER, &shark_timer_irq); 128 setup_irq(IRQ_TIMER, &shark_timer_irq);
129} 129}
130 130
131static struct sys_timer shark_timer = {
132 .init = shark_timer_init,
133};
134
135static void shark_init_early(void) 131static void shark_init_early(void)
136{ 132{
137 disable_hlt(); 133 disable_hlt();
@@ -142,7 +138,7 @@ MACHINE_START(SHARK, "Shark")
142 .atag_offset = 0x3000, 138 .atag_offset = 0x3000,
143 .init_early = shark_init_early, 139 .init_early = shark_init_early,
144 .init_irq = shark_init_irq, 140 .init_irq = shark_init_irq,
145 .timer = &shark_timer, 141 .init_time = shark_timer_init,
146 .dma_zone_size = SZ_4M, 142 .dma_zone_size = SZ_4M,
147 .restart = shark_restart, 143 .restart = shark_restart,
148MACHINE_END 144MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index 032d10817e79..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,8 +668,7 @@ 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 .timer = &shmobile_timer, 673 .init_time = sh73a0_earlytimer_init,
675MACHINE_END 674MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 99ef190d0909..c1d4ab630214 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -1350,5 +1350,5 @@ MACHINE_START(AP4EVB, "ap4evb")
1350 .handle_irq = shmobile_handle_irq_intc, 1350 .handle_irq = shmobile_handle_irq_intc,
1351 .init_machine = ap4evb_init, 1351 .init_machine = ap4evb_init,
1352 .init_late = sh7372_pm_init_late, 1352 .init_late = sh7372_pm_init_late,
1353 .timer = &shmobile_timer, 1353 .init_time = sh7372_earlytimer_init,
1354MACHINE_END 1354MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
index 5353adf6b828..e7912447ad50 100644
--- a/arch/arm/mach-shmobile/board-armadillo800eva.c
+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
@@ -1192,9 +1192,6 @@ static void __init eva_earlytimer_init(void)
1192static void __init eva_add_early_devices(void) 1192static void __init eva_add_early_devices(void)
1193{ 1193{
1194 r8a7740_add_early_devices(); 1194 r8a7740_add_early_devices();
1195
1196 /* override timer setup with board-specific code */
1197 shmobile_timer.init = eva_earlytimer_init;
1198} 1195}
1199 1196
1200#define RESCNT2 IOMEM(0xe6188020) 1197#define RESCNT2 IOMEM(0xe6188020)
@@ -1216,7 +1213,7 @@ DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva")
1216 .handle_irq = shmobile_handle_irq_intc, 1213 .handle_irq = shmobile_handle_irq_intc,
1217 .init_machine = eva_init, 1214 .init_machine = eva_init,
1218 .init_late = shmobile_init_late, 1215 .init_late = shmobile_init_late,
1219 .timer = &shmobile_timer, 1216 .init_time = eva_earlytimer_init,
1220 .dt_compat = eva_boards_compat_dt, 1217 .dt_compat = eva_boards_compat_dt,
1221 .restart = eva_restart, 1218 .restart = eva_restart,
1222MACHINE_END 1219MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-bonito.c b/arch/arm/mach-shmobile/board-bonito.c
index cb8c994e1430..331b7ce4edd8 100644
--- a/arch/arm/mach-shmobile/board-bonito.c
+++ b/arch/arm/mach-shmobile/board-bonito.c
@@ -499,9 +499,6 @@ static void __init bonito_earlytimer_init(void)
499static void __init bonito_add_early_devices(void) 499static void __init bonito_add_early_devices(void)
500{ 500{
501 r8a7740_add_early_devices(); 501 r8a7740_add_early_devices();
502
503 /* override timer setup with board-specific code */
504 shmobile_timer.init = bonito_earlytimer_init;
505} 502}
506 503
507MACHINE_START(BONITO, "bonito") 504MACHINE_START(BONITO, "bonito")
@@ -511,5 +508,5 @@ MACHINE_START(BONITO, "bonito")
511 .handle_irq = shmobile_handle_irq_intc, 508 .handle_irq = shmobile_handle_irq_intc,
512 .init_machine = bonito_init, 509 .init_machine = bonito_init,
513 .init_late = shmobile_init_late, 510 .init_late = shmobile_init_late,
514 .timer = &shmobile_timer, 511 .init_time = bonito_earlytimer_init,
515MACHINE_END 512MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c
index bf88f9a8b7ac..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,8 +550,7 @@ 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 .timer = &shmobile_timer, 555 .init_time = sh73a0_earlytimer_init,
557MACHINE_END 556MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-kzm9d.c b/arch/arm/mach-shmobile/board-kzm9d.c
index b52bc0d1273f..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,9 +88,8 @@ 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 .timer = &shmobile_timer, 93 .init_time = shmobile_timer_init,
96 .dt_compat = kzm9d_boards_compat_dt, 94 .dt_compat = kzm9d_boards_compat_dt,
97MACHINE_END 95MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
index c02448d6847f..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,10 +792,9 @@ 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 .timer = &shmobile_timer, 797 .init_time = sh73a0_earlytimer_init,
799 .restart = kzm9g_restart, 798 .restart = kzm9g_restart,
800 .dt_compat = kzm9g_boards_compat_dt, 799 .dt_compat = kzm9g_boards_compat_dt,
801MACHINE_END 800MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 2fed62f66045..fe4917f2c1a2 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -1593,6 +1593,6 @@ DT_MACHINE_START(MACKEREL_DT, "mackerel")
1593 .handle_irq = shmobile_handle_irq_intc, 1593 .handle_irq = shmobile_handle_irq_intc,
1594 .init_machine = mackerel_init, 1594 .init_machine = mackerel_init,
1595 .init_late = sh7372_pm_init_late, 1595 .init_late = sh7372_pm_init_late,
1596 .timer = &shmobile_timer, 1596 .init_time = sh7372_earlytimer_init,
1597 .dt_compat = mackerel_boards_compat_dt, 1597 .dt_compat = mackerel_boards_compat_dt,
1598MACHINE_END 1598MACHINE_END
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index 449f9289567d..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,8 +381,7 @@ 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 .timer = &shmobile_timer, 386 .init_time = r8a7779_earlytimer_init,
389MACHINE_END 387MACHINE_END
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index dfeca79e9e96..a57439eec11a 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -2,7 +2,7 @@
2#define __ARCH_MACH_COMMON_H 2#define __ARCH_MACH_COMMON_H
3 3
4extern void shmobile_earlytimer_init(void); 4extern void shmobile_earlytimer_init(void);
5extern struct sys_timer shmobile_timer; 5extern void shmobile_timer_init(void);
6extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz, 6extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz,
7 unsigned int mult, unsigned int div); 7 unsigned int mult, unsigned int div);
8struct twd_local_timer; 8struct twd_local_timer;
@@ -20,6 +20,7 @@ extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv);
20 20
21extern void sh7372_init_irq(void); 21extern void sh7372_init_irq(void);
22extern void sh7372_map_io(void); 22extern void sh7372_map_io(void);
23extern void sh7372_earlytimer_init(void);
23extern void sh7372_add_early_devices(void); 24extern void sh7372_add_early_devices(void);
24extern void sh7372_add_standard_devices(void); 25extern void sh7372_add_standard_devices(void);
25extern void sh7372_clock_init(void); 26extern void sh7372_clock_init(void);
@@ -32,6 +33,7 @@ extern struct clk sh7372_extal2_clk;
32 33
33extern void sh73a0_init_irq(void); 34extern void sh73a0_init_irq(void);
34extern void sh73a0_map_io(void); 35extern void sh73a0_map_io(void);
36extern void sh73a0_earlytimer_init(void);
35extern void sh73a0_add_early_devices(void); 37extern void sh73a0_add_early_devices(void);
36extern void sh73a0_add_standard_devices(void); 38extern void sh73a0_add_standard_devices(void);
37extern void sh73a0_clock_init(void); 39extern void sh73a0_clock_init(void);
@@ -50,6 +52,7 @@ extern void r8a7740_pinmux_init(void);
50 52
51extern void r8a7779_init_irq(void); 53extern void r8a7779_init_irq(void);
52extern void r8a7779_map_io(void); 54extern void r8a7779_map_io(void);
55extern void r8a7779_earlytimer_init(void);
53extern void r8a7779_add_early_devices(void); 56extern void r8a7779_add_early_devices(void);
54extern void r8a7779_add_standard_devices(void); 57extern void r8a7779_add_standard_devices(void);
55extern void r8a7779_clock_init(void); 58extern void r8a7779_clock_init(void);
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 a47beeb18283..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,29 +445,18 @@ 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 .timer = &shmobile_timer, 459 .init_time = shmobile_timer_init,
471 .dt_compat = emev2_boards_compat_dt, 460 .dt_compat = emev2_boards_compat_dt,
472MACHINE_END 461MACHINE_END
473 462
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
index 095222469d03..03c69f9979aa 100644
--- a/arch/arm/mach-shmobile/setup-r8a7740.c
+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
@@ -705,12 +705,6 @@ void __init r8a7740_add_standard_devices(void)
705 rmobile_add_device_to_domain("A3SP", &i2c1_device); 705 rmobile_add_device_to_domain("A3SP", &i2c1_device);
706} 706}
707 707
708static void __init r8a7740_earlytimer_init(void)
709{
710 r8a7740_clock_init(0);
711 shmobile_earlytimer_init();
712}
713
714void __init r8a7740_add_early_devices(void) 708void __init r8a7740_add_early_devices(void)
715{ 709{
716 early_platform_add_devices(r8a7740_early_devices, 710 early_platform_add_devices(r8a7740_early_devices,
@@ -718,9 +712,6 @@ void __init r8a7740_add_early_devices(void)
718 712
719 /* setup early console here as well */ 713 /* setup early console here as well */
720 shmobile_setup_console(); 714 shmobile_setup_console();
721
722 /* override timer setup with soc-specific code */
723 shmobile_timer.init = r8a7740_earlytimer_init;
724} 715}
725 716
726#ifdef CONFIG_USE_OF 717#ifdef CONFIG_USE_OF
@@ -763,7 +754,7 @@ DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
763 .init_irq = r8a7740_init_irq, 754 .init_irq = r8a7740_init_irq,
764 .handle_irq = shmobile_handle_irq_intc, 755 .handle_irq = shmobile_handle_irq_intc,
765 .init_machine = r8a7740_add_standard_devices_dt, 756 .init_machine = r8a7740_add_standard_devices_dt,
766 .timer = &shmobile_timer, 757 .init_time = shmobile_timer_init,
767 .dt_compat = r8a7740_boards_compat_dt, 758 .dt_compat = r8a7740_boards_compat_dt,
768MACHINE_END 759MACHINE_END
769 760
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
index 7a1ad4f38539..a181ced09e45 100644
--- a/arch/arm/mach-shmobile/setup-r8a7779.c
+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
@@ -339,7 +339,7 @@ void __init r8a7779_add_standard_devices(void)
339/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ 339/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
340void __init __weak r8a7779_register_twd(void) { } 340void __init __weak r8a7779_register_twd(void) { }
341 341
342static void __init r8a7779_earlytimer_init(void) 342void __init r8a7779_earlytimer_init(void)
343{ 343{
344 r8a7779_clock_init(); 344 r8a7779_clock_init();
345 shmobile_earlytimer_init(); 345 shmobile_earlytimer_init();
@@ -366,7 +366,4 @@ void __init r8a7779_add_early_devices(void)
366 * As a final step pass earlyprint=sh-sci.2,115200 on the kernel 366 * As a final step pass earlyprint=sh-sci.2,115200 on the kernel
367 * command line in case of the marzen board. 367 * command line in case of the marzen board.
368 */ 368 */
369
370 /* override timer setup with soc-specific code */
371 shmobile_timer.init = r8a7779_earlytimer_init;
372} 369}
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
index c917882424a7..191ae72e21ba 100644
--- a/arch/arm/mach-shmobile/setup-sh7372.c
+++ b/arch/arm/mach-shmobile/setup-sh7372.c
@@ -1054,7 +1054,7 @@ void __init sh7372_add_standard_devices(void)
1054 ARRAY_SIZE(domain_devices)); 1054 ARRAY_SIZE(domain_devices));
1055} 1055}
1056 1056
1057static void __init sh7372_earlytimer_init(void) 1057void __init sh7372_earlytimer_init(void)
1058{ 1058{
1059 sh7372_clock_init(); 1059 sh7372_clock_init();
1060 shmobile_earlytimer_init(); 1060 shmobile_earlytimer_init();
@@ -1067,9 +1067,6 @@ void __init sh7372_add_early_devices(void)
1067 1067
1068 /* setup early console here as well */ 1068 /* setup early console here as well */
1069 shmobile_setup_console(); 1069 shmobile_setup_console();
1070
1071 /* override timer setup with soc-specific code */
1072 shmobile_timer.init = sh7372_earlytimer_init;
1073} 1070}
1074 1071
1075#ifdef CONFIG_USE_OF 1072#ifdef CONFIG_USE_OF
@@ -1113,7 +1110,7 @@ DT_MACHINE_START(SH7372_DT, "Generic SH7372 (Flattened Device Tree)")
1113 .init_irq = sh7372_init_irq, 1110 .init_irq = sh7372_init_irq,
1114 .handle_irq = shmobile_handle_irq_intc, 1111 .handle_irq = shmobile_handle_irq_intc,
1115 .init_machine = sh7372_add_standard_devices_dt, 1112 .init_machine = sh7372_add_standard_devices_dt,
1116 .timer = &shmobile_timer, 1113 .init_time = shmobile_timer_init,
1117 .dt_compat = sh7372_boards_compat_dt, 1114 .dt_compat = sh7372_boards_compat_dt,
1118MACHINE_END 1115MACHINE_END
1119 1116
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index db99a4ade80c..8c2d6424f470 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -796,7 +796,7 @@ void __init sh73a0_add_standard_devices(void)
796/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ 796/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
797void __init __weak sh73a0_register_twd(void) { } 797void __init __weak sh73a0_register_twd(void) { }
798 798
799static void __init sh73a0_earlytimer_init(void) 799void __init sh73a0_earlytimer_init(void)
800{ 800{
801 sh73a0_clock_init(); 801 sh73a0_clock_init();
802 shmobile_earlytimer_init(); 802 shmobile_earlytimer_init();
@@ -810,7 +810,4 @@ void __init sh73a0_add_early_devices(void)
810 810
811 /* setup early console here as well */ 811 /* setup early console here as well */
812 shmobile_setup_console(); 812 shmobile_setup_console();
813
814 /* override timer setup with soc-specific code */
815 shmobile_timer.init = sh73a0_earlytimer_init;
816} 813}
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-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c
index a68919727e24..fdbe54a11555 100644
--- a/arch/arm/mach-shmobile/timer.c
+++ b/arch/arm/mach-shmobile/timer.c
@@ -60,10 +60,6 @@ void __init shmobile_earlytimer_init(void)
60 late_time_init = shmobile_late_time_init; 60 late_time_init = shmobile_late_time_init;
61} 61}
62 62
63static void __init shmobile_timer_init(void) 63void __init shmobile_timer_init(void)
64{ 64{
65} 65}
66
67struct sys_timer shmobile_timer = {
68 .init = shmobile_timer_init,
69};
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 6732924a5fee..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,9 +100,8 @@ 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, 104 .init_time = dw_apb_timer_init,
110 .timer = &dw_apb_timer,
111 .init_machine = socfpga_cyclone5_init, 105 .init_machine = socfpga_cyclone5_init,
112 .restart = socfpga_cyclone5_restart, 106 .restart = socfpga_cyclone5_restart,
113 .dt_compat = altera_dt_match, 107 .dt_compat = altera_dt_match,
diff --git a/arch/arm/mach-spear13xx/include/mach/generic.h b/arch/arm/mach-spear13xx/include/mach/generic.h
index c33f4d9361bd..633e678e01a3 100644
--- a/arch/arm/mach-spear13xx/include/mach/generic.h
+++ b/arch/arm/mach-spear13xx/include/mach/generic.h
@@ -18,7 +18,7 @@
18#include <asm/mach/time.h> 18#include <asm/mach/time.h>
19 19
20/* Add spear13xx structure declarations here */ 20/* Add spear13xx structure declarations here */
21extern struct sys_timer spear13xx_timer; 21extern void spear13xx_timer_init(void);
22extern struct pl022_ssp_controller pl022_plat_data; 22extern struct pl022_ssp_controller pl022_plat_data;
23extern struct dw_dma_platform_data dmac_plat_data; 23extern struct dw_dma_platform_data dmac_plat_data;
24extern struct dw_dma_slave cf_dma_priv; 24extern struct dw_dma_slave cf_dma_priv;
@@ -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 02f4724bb0d4..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,9 +90,8 @@ 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, 94 .init_time = spear13xx_timer_init,
95 .timer = &spear13xx_timer,
96 .init_machine = spear1310_dt_init, 95 .init_machine = spear1310_dt_init,
97 .restart = spear_restart, 96 .restart = spear_restart,
98 .dt_compat = spear1310_dt_board_compat, 97 .dt_compat = spear1310_dt_board_compat,
diff --git a/arch/arm/mach-spear13xx/spear1340.c b/arch/arm/mach-spear13xx/spear1340.c
index 081014fb314a..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,9 +184,8 @@ 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, 188 .init_time = spear13xx_timer_init,
189 .timer = &spear13xx_timer,
190 .init_machine = spear1340_dt_init, 189 .init_machine = spear1340_dt_init,
191 .restart = spear_restart, 190 .restart = spear_restart,
192 .dt_compat = spear1340_dt_board_compat, 191 .dt_compat = spear1340_dt_board_compat,
diff --git a/arch/arm/mach-spear13xx/spear13xx.c b/arch/arm/mach-spear13xx/spear13xx.c
index c4af775a8451..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>
@@ -153,7 +152,7 @@ static void __init spear13xx_clk_init(void)
153 pr_err("%s: Unknown machine\n", __func__); 152 pr_err("%s: Unknown machine\n", __func__);
154} 153}
155 154
156static void __init spear13xx_timer_init(void) 155void __init spear13xx_timer_init(void)
157{ 156{
158 char pclk_name[] = "osc_24m_clk"; 157 char pclk_name[] = "osc_24m_clk";
159 struct clk *gpt_clk, *pclk; 158 struct clk *gpt_clk, *pclk;
@@ -182,17 +181,3 @@ static 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
186struct sys_timer spear13xx_timer = {
187 .init = spear13xx_timer_init,
188};
189
190static const struct of_device_id gic_of_match[] __initconst = {
191 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init },
192 { /* Sentinel */ }
193};
194
195void __init spear13xx_dt_init_irq(void)
196{
197 of_irq_init(gic_of_match);
198}
diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h
index ce19113ca791..df310799e416 100644
--- a/arch/arm/mach-spear3xx/include/mach/generic.h
+++ b/arch/arm/mach-spear3xx/include/mach/generic.h
@@ -22,7 +22,7 @@
22#include <asm/mach/map.h> 22#include <asm/mach/map.h>
23 23
24/* Add spear3xx family device structure declarations here */ 24/* Add spear3xx family device structure declarations here */
25extern struct sys_timer spear3xx_timer; 25extern void spear3xx_timer_init(void);
26extern struct pl022_ssp_controller pl022_plat_data; 26extern struct pl022_ssp_controller pl022_plat_data;
27extern struct pl08x_platform_data pl080_plat_data; 27extern struct pl08x_platform_data pl080_plat_data;
28 28
@@ -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 a69cbfdb07ee..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,9 +212,8 @@ 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, 216 .init_time = spear3xx_timer_init,
217 .timer = &spear3xx_timer,
218 .init_machine = spear300_dt_init, 217 .init_machine = spear300_dt_init,
219 .restart = spear_restart, 218 .restart = spear_restart,
220 .dt_compat = spear300_dt_board_compat, 219 .dt_compat = spear300_dt_board_compat,
diff --git a/arch/arm/mach-spear3xx/spear310.c b/arch/arm/mach-spear3xx/spear310.c
index b963ebb10b56..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,9 +254,8 @@ 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, 258 .init_time = spear3xx_timer_init,
259 .timer = &spear3xx_timer,
260 .init_machine = spear310_dt_init, 259 .init_machine = spear310_dt_init,
261 .restart = spear_restart, 260 .restart = spear_restart,
262 .dt_compat = spear310_dt_board_compat, 261 .dt_compat = spear310_dt_board_compat,
diff --git a/arch/arm/mach-spear3xx/spear320.c b/arch/arm/mach-spear3xx/spear320.c
index 66e3a0c33e75..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,9 +268,8 @@ 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, 272 .init_time = spear3xx_timer_init,
273 .timer = &spear3xx_timer,
274 .init_machine = spear320_dt_init, 273 .init_machine = spear320_dt_init,
275 .restart = spear_restart, 274 .restart = spear_restart,
276 .dt_compat = spear320_dt_board_compat, 275 .dt_compat = spear320_dt_board_compat,
diff --git a/arch/arm/mach-spear3xx/spear3xx.c b/arch/arm/mach-spear3xx/spear3xx.c
index 38fe95db31a7..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>
@@ -87,7 +84,7 @@ void __init spear3xx_map_io(void)
87 iotable_init(spear3xx_io_desc, ARRAY_SIZE(spear3xx_io_desc)); 84 iotable_init(spear3xx_io_desc, ARRAY_SIZE(spear3xx_io_desc));
88} 85}
89 86
90static void __init spear3xx_timer_init(void) 87void __init spear3xx_timer_init(void)
91{ 88{
92 char pclk_name[] = "pll3_clk"; 89 char pclk_name[] = "pll3_clk";
93 struct clk *gpt_clk, *pclk; 90 struct clk *gpt_clk, *pclk;
@@ -115,20 +112,3 @@ static void __init spear3xx_timer_init(void)
115 112
116 spear_setup_of_timer(); 113 spear_setup_of_timer();
117} 114}
118
119struct sys_timer spear3xx_timer = {
120 .init = spear3xx_timer_init,
121};
122
123static const struct of_device_id vic_of_match[] __initconst = {
124 { .compatible = "arm,pl190-vic", .data = vic_of_init, },
125 { .compatible = "st,spear300-shirq", .data = spear300_shirq_of_init, },
126 { .compatible = "st,spear310-shirq", .data = spear310_shirq_of_init, },
127 { .compatible = "st,spear320-shirq", .data = spear320_shirq_of_init, },
128 { /* Sentinel */ }
129};
130
131void __init spear3xx_dt_init_irq(void)
132{
133 of_irq_init(vic_of_match);
134}
diff --git a/arch/arm/mach-spear6xx/spear6xx.c b/arch/arm/mach-spear6xx/spear6xx.c
index 5a5a52db252b..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>
@@ -374,7 +373,7 @@ void __init spear6xx_map_io(void)
374 iotable_init(spear6xx_io_desc, ARRAY_SIZE(spear6xx_io_desc)); 373 iotable_init(spear6xx_io_desc, ARRAY_SIZE(spear6xx_io_desc));
375} 374}
376 375
377static void __init spear6xx_timer_init(void) 376void __init spear6xx_timer_init(void)
378{ 377{
379 char pclk_name[] = "pll3_clk"; 378 char pclk_name[] = "pll3_clk";
380 struct clk *gpt_clk, *pclk; 379 struct clk *gpt_clk, *pclk;
@@ -403,10 +402,6 @@ static void __init spear6xx_timer_init(void)
403 spear_setup_of_timer(); 402 spear_setup_of_timer();
404} 403}
405 404
406struct sys_timer spear6xx_timer = {
407 .init = spear6xx_timer_init,
408};
409
410/* Add auxdata to pass platform data */ 405/* Add auxdata to pass platform data */
411struct of_dev_auxdata spear6xx_auxdata_lookup[] __initdata = { 406struct of_dev_auxdata spear6xx_auxdata_lookup[] __initdata = {
412 OF_DEV_AUXDATA("arm,pl080", SPEAR6XX_ICM3_DMA_BASE, NULL, 407 OF_DEV_AUXDATA("arm,pl080", SPEAR6XX_ICM3_DMA_BASE, NULL,
@@ -425,21 +420,10 @@ static const char *spear600_dt_board_compat[] = {
425 NULL 420 NULL
426}; 421};
427 422
428static const struct of_device_id vic_of_match[] __initconst = {
429 { .compatible = "arm,pl190-vic", .data = vic_of_init, },
430 { /* Sentinel */ }
431};
432
433static void __init spear6xx_dt_init_irq(void)
434{
435 of_irq_init(vic_of_match);
436}
437
438DT_MACHINE_START(SPEAR600_DT, "ST SPEAr600 (Flattened Device Tree)") 423DT_MACHINE_START(SPEAR600_DT, "ST SPEAr600 (Flattened Device Tree)")
439 .map_io = spear6xx_map_io, 424 .map_io = spear6xx_map_io,
440 .init_irq = spear6xx_dt_init_irq, 425 .init_irq = irqchip_init,
441 .handle_irq = vic_handle_irq, 426 .init_time = spear6xx_timer_init,
442 .timer = &spear6xx_timer,
443 .init_machine = spear600_dt_init, 427 .init_machine = spear600_dt_init,
444 .restart = spear_restart, 428 .restart = spear_restart,
445 .dt_compat = spear600_dt_board_compat, 429 .dt_compat = spear600_dt_board_compat,
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index 9be910f7920b..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
@@ -91,6 +89,6 @@ DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
91 .init_irq = sunxi_init_irq, 89 .init_irq = sunxi_init_irq,
92 .handle_irq = sunxi_handle_irq, 90 .handle_irq = sunxi_handle_irq,
93 .restart = sunxi_restart, 91 .restart = sunxi_restart,
94 .timer = &sunxi_timer, 92 .init_time = &sunxi_timer_init,
95 .dt_compat = sunxi_board_dt_compat, 93 .dt_compat = sunxi_board_dt_compat,
96MACHINE_END 94MACHINE_END
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c
index 734d9cc87f2e..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,8 +200,7 @@ 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, 203 .init_time = tegra_init_timer,
206 .timer = &tegra_sys_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,
209 .restart = tegra_assert_system_reset, 206 .restart = tegra_assert_system_reset,
diff --git a/arch/arm/mach-tegra/board-dt-tegra30.c b/arch/arm/mach-tegra/board-dt-tegra30.c
index 6497d1236b08..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,8 +111,7 @@ 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, 114 .init_time = tegra_init_timer,
116 .timer = &tegra_sys_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,
119 .restart = tegra_assert_system_reset, 117 .restart = tegra_assert_system_reset,
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h
index 91fbe733a21e..744cdd246f6a 100644
--- a/arch/arm/mach-tegra/board.h
+++ b/arch/arm/mach-tegra/board.h
@@ -55,5 +55,5 @@ static inline int harmony_pcie_init(void) { return 0; }
55 55
56void __init tegra_paz00_wifikill_init(void); 56void __init tegra_paz00_wifikill_init(void);
57 57
58extern struct sys_timer tegra_sys_timer; 58extern void tegra_init_timer(void);
59#endif 59#endif
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 e4863f3e9ee7..eba0969ded19 100644
--- a/arch/arm/mach-tegra/timer.c
+++ b/arch/arm/mach-tegra/timer.c
@@ -168,7 +168,7 @@ static const struct of_device_id rtc_match[] __initconst = {
168 {} 168 {}
169}; 169};
170 170
171static void __init tegra_init_timer(void) 171void __init tegra_init_timer(void)
172{ 172{
173 struct device_node *np; 173 struct device_node *np;
174 struct clk *clk; 174 struct clk *clk;
@@ -259,24 +259,16 @@ static 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
273 register_persistent_clock(NULL, tegra_read_persistent_clock); 269 register_persistent_clock(NULL, tegra_read_persistent_clock);
274} 270}
275 271
276struct sys_timer tegra_sys_timer = {
277 .init = tegra_init_timer,
278};
279
280#ifdef CONFIG_PM 272#ifdef CONFIG_PM
281static u32 usec_config; 273static u32 usec_config;
282 274
diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index 4ce77cdc31cc..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,8 +1779,7 @@ 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, 1782 .init_time = u300_timer_init,
1783 .timer = &u300_timer,
1784 .init_machine = u300_init_machine, 1783 .init_machine = u300_init_machine,
1785 .restart = u300_restart, 1784 .restart = u300_restart,
1786MACHINE_END 1785MACHINE_END
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-u300/timer.c b/arch/arm/mach-u300/timer.c
index 1da10e20e996..d9e73209c9b8 100644
--- a/arch/arm/mach-u300/timer.c
+++ b/arch/arm/mach-u300/timer.c
@@ -349,7 +349,7 @@ static u32 notrace u300_read_sched_clock(void)
349/* 349/*
350 * This sets up the system timers, clock source and clock event. 350 * This sets up the system timers, clock source and clock event.
351 */ 351 */
352static void __init u300_timer_init(void) 352void __init u300_timer_init(void)
353{ 353{
354 struct clk *clk; 354 struct clk *clk;
355 unsigned long rate; 355 unsigned long rate;
@@ -413,11 +413,3 @@ static void __init u300_timer_init(void)
413 * used by hrtimers! 413 * used by hrtimers!
414 */ 414 */
415} 415}
416
417/*
418 * Very simple system timer that only register the clock event and
419 * clock source.
420 */
421struct sys_timer u300_timer = {
422 .init = u300_timer_init,
423};
diff --git a/arch/arm/mach-u300/timer.h b/arch/arm/mach-u300/timer.h
index b5e9791762e0..d34287bc34f5 100644
--- a/arch/arm/mach-u300/timer.h
+++ b/arch/arm/mach-u300/timer.h
@@ -1 +1 @@
extern struct sys_timer u300_timer; extern void u300_timer_init(void);
diff --git a/arch/arm/mach-ux500/board-mop500-uib.c b/arch/arm/mach-ux500/board-mop500-uib.c
index 1f47d962e3a1..7037d3687e9f 100644
--- a/arch/arm/mach-ux500/board-mop500-uib.c
+++ b/arch/arm/mach-ux500/board-mop500-uib.c
@@ -13,6 +13,7 @@
13 13
14#include <mach/hardware.h> 14#include <mach/hardware.h>
15#include "board-mop500.h" 15#include "board-mop500.h"
16#include "id.h"
16 17
17enum mop500_uib { 18enum mop500_uib {
18 STUIB, 19 STUIB,
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index d453522edb0d..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>
@@ -751,8 +750,7 @@ MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
751 .map_io = u8500_map_io, 750 .map_io = u8500_map_io,
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 .timer = &ux500_timer, 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
@@ -761,8 +759,7 @@ MACHINE_START(U8520, "ST-Ericsson U8520 Platform HREFP520")
761 .atag_offset = 0x100, 759 .atag_offset = 0x100,
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 .timer = &ux500_timer, 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
@@ -772,8 +769,7 @@ MACHINE_START(HREFV60, "ST-Ericsson U8500 Platform HREFv60+")
772 .smp = smp_ops(ux500_smp_ops), 769 .smp = smp_ops(ux500_smp_ops),
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 .timer = &ux500_timer, 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
@@ -784,8 +780,7 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
784 .map_io = u8500_map_io, 780 .map_io = u8500_map_io,
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 .timer = &ux500_timer, 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/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c
index 75d5b512a3d5..1c1609da76ce 100644
--- a/arch/arm/mach-ux500/cache-l2x0.c
+++ b/arch/arm/mach-ux500/cache-l2x0.c
@@ -10,7 +10,8 @@
10#include <asm/cacheflush.h> 10#include <asm/cacheflush.h>
11#include <asm/hardware/cache-l2x0.h> 11#include <asm/hardware/cache-l2x0.h>
12#include <mach/hardware.h> 12#include <mach/hardware.h>
13#include <mach/id.h> 13
14#include "id.h"
14 15
15static void __iomem *l2x0_base; 16static void __iomem *l2x0_base;
16 17
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index db0bb75e2c76..d614d7150dcb 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>
@@ -37,7 +36,9 @@
37 36
38#include "devices-db8500.h" 37#include "devices-db8500.h"
39#include "ste-dma40-db8500.h" 38#include "ste-dma40-db8500.h"
39
40#include "board-mop500.h" 40#include "board-mop500.h"
41#include "id.h"
41 42
42/* minimum static i/o mapping required to boot U8500 platforms */ 43/* minimum static i/o mapping required to boot U8500 platforms */
43static struct map_desc u8500_uart_io_desc[] __initdata = { 44static struct map_desc u8500_uart_io_desc[] __initdata = {
@@ -285,7 +286,8 @@ static struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
285 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL), 286 OF_DEV_AUXDATA("st,nomadik-i2c", 0x80110000, "nmk-i2c.3", NULL),
286 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL), 287 OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
287 /* Requires device name bindings. */ 288 /* Requires device name bindings. */
288 OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL), 289 OF_DEV_AUXDATA("stericsson,nmk_pinctrl", U8500_PRCMU_BASE,
290 "pinctrl-db8500", NULL),
289 /* Requires clock name and DMA bindings. */ 291 /* Requires clock name and DMA bindings. */
290 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000, 292 OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000,
291 "ux500-msp-i2s.0", &msp0_platform_data), 293 "ux500-msp-i2s.0", &msp0_platform_data),
@@ -340,8 +342,7 @@ DT_MACHINE_START(U8500_DT, "ST-Ericsson Ux5x0 platform (Device Tree Support)")
340 .map_io = u8500_map_io, 342 .map_io = u8500_map_io,
341 .init_irq = ux500_init_irq, 343 .init_irq = ux500_init_irq,
342 /* we re-use nomadik timer here */ 344 /* we re-use nomadik timer here */
343 .timer = &ux500_timer, 345 .init_time = ux500_timer_init,
344 .handle_irq = gic_handle_irq,
345 .init_machine = u8500_init_machine, 346 .init_machine = u8500_init_machine,
346 .init_late = NULL, 347 .init_late = NULL,
347 .dt_compat = stericsson_dt_platform_compat, 348 .dt_compat = stericsson_dt_platform_compat,
diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c
index 721e7b4275f3..506c5b2d0fad 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>
@@ -27,6 +28,7 @@
27#include <mach/devices.h> 28#include <mach/devices.h>
28 29
29#include "board-mop500.h" 30#include "board-mop500.h"
31#include "id.h"
30 32
31void __iomem *_PRCMU_BASE; 33void __iomem *_PRCMU_BASE;
32 34
@@ -42,11 +44,6 @@ void __iomem *_PRCMU_BASE;
42 * This feels fragile because it depends on the gpio device getting probed 44 * This feels fragile because it depends on the gpio device getting probed
43 * _before_ any device uses the gpio interrupts. 45 * _before_ any device uses the gpio interrupts.
44*/ 46*/
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) 47void __init ux500_init_irq(void)
51{ 48{
52 void __iomem *dist_base; 49 void __iomem *dist_base;
@@ -62,7 +59,7 @@ void __init ux500_init_irq(void)
62 59
63#ifdef CONFIG_OF 60#ifdef CONFIG_OF
64 if (of_have_populated_dt()) 61 if (of_have_populated_dt())
65 of_irq_init(ux500_dt_irq_match); 62 irqchip_init();
66 else 63 else
67#endif 64#endif
68 gic_init(0, 29, dist_base, cpu_base); 65 gic_init(0, 29, dist_base, cpu_base);
diff --git a/arch/arm/mach-ux500/id.c b/arch/arm/mach-ux500/id.c
index d1579920139f..9f951842e1e5 100644
--- a/arch/arm/mach-ux500/id.c
+++ b/arch/arm/mach-ux500/id.c
@@ -17,6 +17,8 @@
17#include <mach/hardware.h> 17#include <mach/hardware.h>
18#include <mach/setup.h> 18#include <mach/setup.h>
19 19
20#include "id.h"
21
20struct dbx500_asic_id dbx500_id; 22struct dbx500_asic_id dbx500_id;
21 23
22static unsigned int ux500_read_asicid(phys_addr_t addr) 24static unsigned int ux500_read_asicid(phys_addr_t addr)
diff --git a/arch/arm/mach-ux500/include/mach/id.h b/arch/arm/mach-ux500/id.h
index 9c42642ab168..bcc58a8cccbc 100644
--- a/arch/arm/mach-ux500/include/mach/id.h
+++ b/arch/arm/mach-ux500/id.h
@@ -61,9 +61,14 @@ static inline bool __attribute_const__ cpu_is_u8540(void)
61 return dbx500_partnumber() == 0x8540; 61 return dbx500_partnumber() == 0x8540;
62} 62}
63 63
64static inline bool __attribute_const__ cpu_is_u8580(void)
65{
66 return dbx500_partnumber() == 0x8580;
67}
68
64static inline bool cpu_is_ux540_family(void) 69static inline bool cpu_is_ux540_family(void)
65{ 70{
66 return cpu_is_u9540() || cpu_is_u8540(); 71 return cpu_is_u9540() || cpu_is_u8540() || cpu_is_u8580();
67} 72}
68 73
69/* 74/*
@@ -115,6 +120,20 @@ static inline bool cpu_is_u8500v20_or_later(void)
115 return (cpu_is_u8500() && !cpu_is_u8500v10() && !cpu_is_u8500v11()); 120 return (cpu_is_u8500() && !cpu_is_u8500v10() && !cpu_is_u8500v11());
116} 121}
117 122
123/*
124 * 8540 revisions
125 */
126
127static inline bool __attribute_const__ cpu_is_u8540v10(void)
128{
129 return cpu_is_u8540() && dbx500_revision() == 0xA0;
130}
131
132static inline bool __attribute_const__ cpu_is_u8580v10(void)
133{
134 return cpu_is_u8580() && dbx500_revision() == 0xA0;
135}
136
118static inline bool ux500_is_svp(void) 137static inline bool ux500_is_svp(void)
119{ 138{
120 return false; 139 return false;
diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h
index 28d16e744bfd..5201ddace503 100644
--- a/arch/arm/mach-ux500/include/mach/hardware.h
+++ b/arch/arm/mach-ux500/include/mach/hardware.h
@@ -39,7 +39,6 @@
39 39
40#ifndef __ASSEMBLY__ 40#ifndef __ASSEMBLY__
41 41
42#include <mach/id.h>
43extern void __iomem *_PRCMU_BASE; 42extern void __iomem *_PRCMU_BASE;
44 43
45#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x) 44#define ARRAY_AND_SIZE(x) (x), ARRAY_SIZE(x)
diff --git a/arch/arm/mach-ux500/include/mach/setup.h b/arch/arm/mach-ux500/include/mach/setup.h
index 6be4c4d2ab88..bddce2b49372 100644
--- a/arch/arm/mach-ux500/include/mach/setup.h
+++ b/arch/arm/mach-ux500/include/mach/setup.h
@@ -28,8 +28,7 @@ extern struct device *ux500_soc_device_init(const char *soc_id);
28struct amba_device; 28struct amba_device;
29extern void __init amba_add_devices(struct amba_device *devs[], int num); 29extern void __init amba_add_devices(struct amba_device *devs[], int num);
30 30
31struct sys_timer; 31extern void ux500_timer_init(void);
32extern struct sys_timer ux500_timer;
33 32
34#define __IO_DEV_DESC(x, sz) { \ 33#define __IO_DEV_DESC(x, sz) { \
35 .virtual = IO_ADDRESS(x), \ 34 .virtual = IO_ADDRESS(x), \
diff --git a/arch/arm/mach-ux500/platsmp.c b/arch/arm/mach-ux500/platsmp.c
index 3db7782f3afb..18f7af339dc9 100644
--- a/arch/arm/mach-ux500/platsmp.c
+++ b/arch/arm/mach-ux500/platsmp.c
@@ -16,14 +16,17 @@
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
24#include <mach/hardware.h> 25#include <mach/hardware.h>
25#include <mach/setup.h> 26#include <mach/setup.h>
26 27
28#include "id.h"
29
27/* This is called from headsmp.S to wakeup the secondary core */ 30/* This is called from headsmp.S to wakeup the secondary core */
28extern void u8500_secondary_startup(void); 31extern void u8500_secondary_startup(void);
29 32
@@ -91,7 +94,7 @@ static int __cpuinit ux500_boot_secondary(unsigned int cpu, struct task_struct *
91 */ 94 */
92 write_pen_release(cpu_logical_map(cpu)); 95 write_pen_release(cpu_logical_map(cpu));
93 96
94 smp_send_reschedule(cpu); 97 arch_send_wakeup_ipi_mask(cpumask_of(cpu));
95 98
96 timeout = jiffies + (1 * HZ); 99 timeout = jiffies + (1 * HZ);
97 while (time_before(jiffies, timeout)) { 100 while (time_before(jiffies, timeout)) {
@@ -155,8 +158,6 @@ static void __init ux500_smp_init_cpus(void)
155 158
156 for (i = 0; i < ncores; i++) 159 for (i = 0; i < ncores; i++)
157 set_cpu_possible(i, true); 160 set_cpu_possible(i, true);
158
159 set_smp_cross_call(gic_raise_softirq);
160} 161}
161 162
162static void __init ux500_smp_prepare_cpus(unsigned int max_cpus) 163static void __init ux500_smp_prepare_cpus(unsigned int max_cpus)
diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c
index 875309acb022..a6af0b8732ba 100644
--- a/arch/arm/mach-ux500/timer.c
+++ b/arch/arm/mach-ux500/timer.c
@@ -17,6 +17,8 @@
17#include <mach/hardware.h> 17#include <mach/hardware.h>
18#include <mach/irqs.h> 18#include <mach/irqs.h>
19 19
20#include "id.h"
21
20#ifdef CONFIG_HAVE_ARM_TWD 22#ifdef CONFIG_HAVE_ARM_TWD
21static DEFINE_TWD_LOCAL_TIMER(u8500_twd_local_timer, 23static DEFINE_TWD_LOCAL_TIMER(u8500_twd_local_timer,
22 U8500_TWD_BASE, IRQ_LOCALTIMER); 24 U8500_TWD_BASE, IRQ_LOCALTIMER);
@@ -46,7 +48,7 @@ const static struct of_device_id prcmu_timer_of_match[] __initconst = {
46 { }, 48 { },
47}; 49};
48 50
49static void __init ux500_timer_init(void) 51void __init ux500_timer_init(void)
50{ 52{
51 void __iomem *mtu_timer_base; 53 void __iomem *mtu_timer_base;
52 void __iomem *prcmu_timer_base; 54 void __iomem *prcmu_timer_base;
@@ -99,14 +101,3 @@ dt_fail:
99 clksrc_dbx500_prcmu_init(prcmu_timer_base); 101 clksrc_dbx500_prcmu_init(prcmu_timer_base);
100 ux500_twd_init(); 102 ux500_twd_init();
101} 103}
102
103static void ux500_timer_reset(void)
104{
105 nmdk_clkevt_reset();
106 nmdk_clksrc_reset();
107}
108
109struct sys_timer ux500_timer = {
110 .init = ux500_timer_init,
111 .resume = ux500_timer_reset,
112};
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 5d5929450366..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>
@@ -770,7 +770,7 @@ void __init versatile_init(void)
770/* 770/*
771 * Set up timer interrupt, and return the current time in seconds. 771 * Set up timer interrupt, and return the current time in seconds.
772 */ 772 */
773static void __init versatile_timer_init(void) 773void __init versatile_timer_init(void)
774{ 774{
775 u32 val; 775 u32 val;
776 776
@@ -797,8 +797,3 @@ static void __init versatile_timer_init(void)
797 sp804_clocksource_init(TIMER3_VA_BASE, "timer3"); 797 sp804_clocksource_init(TIMER3_VA_BASE, "timer3");
798 sp804_clockevents_init(TIMER0_VA_BASE, IRQ_TIMERINT0_1, "timer0"); 798 sp804_clockevents_init(TIMER0_VA_BASE, IRQ_TIMERINT0_1, "timer0");
799} 799}
800
801struct sys_timer versatile_timer = {
802 .init = versatile_timer_init,
803};
804
diff --git a/arch/arm/mach-versatile/core.h b/arch/arm/mach-versatile/core.h
index 683e60776a85..5c1b87d1da6b 100644
--- a/arch/arm/mach-versatile/core.h
+++ b/arch/arm/mach-versatile/core.h
@@ -29,7 +29,7 @@ extern void __init versatile_init(void);
29extern void __init versatile_init_early(void); 29extern void __init versatile_init_early(void);
30extern void __init versatile_init_irq(void); 30extern void __init versatile_init_irq(void);
31extern void __init versatile_map_io(void); 31extern void __init versatile_map_io(void);
32extern struct sys_timer versatile_timer; 32extern void versatile_timer_init(void);
33extern void versatile_restart(char, const char *); 33extern void versatile_restart(char, const char *);
34extern unsigned int mmc_status(struct device *dev); 34extern unsigned int mmc_status(struct device *dev);
35#ifdef CONFIG_OF 35#ifdef CONFIG_OF
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 98f65493177a..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,8 +38,7 @@ 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, 41 .init_time = versatile_timer_init,
43 .timer = &versatile_timer,
44 .init_machine = versatile_init, 42 .init_machine = versatile_init,
45 .restart = versatile_restart, 43 .restart = versatile_restart,
46MACHINE_END 44MACHINE_END
diff --git a/arch/arm/mach-versatile/versatile_dt.c b/arch/arm/mach-versatile/versatile_dt.c
index ae5ad3c8f3dd..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,8 +45,7 @@ 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, 48 .init_time = versatile_timer_init,
50 .timer = &versatile_timer,
51 .init_machine = versatile_dt_init, 49 .init_machine = versatile_dt_init,
52 .dt_compat = versatile_dt_match, 50 .dt_compat = versatile_dt_match,
53 .restart = versatile_restart, 51 .restart = versatile_restart,
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c
index 19738331bd3d..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,8 +106,7 @@ 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, 109 .init_time = versatile_timer_init,
111 .timer = &versatile_timer,
112 .init_machine = versatile_pb_init, 110 .init_machine = versatile_pb_init,
113 .restart = versatile_restart, 111 .restart = versatile_restart,
114MACHINE_END 112MACHINE_END
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 011661a6c5cb..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>
@@ -291,10 +291,6 @@ static void __init v2m_timer_init(void)
291 v2m_sp804_init(ioremap(V2M_TIMER01, SZ_4K), IRQ_V2M_TIMER0); 291 v2m_sp804_init(ioremap(V2M_TIMER01, SZ_4K), IRQ_V2M_TIMER0);
292} 292}
293 293
294static struct sys_timer v2m_timer = {
295 .init = v2m_timer_init,
296};
297
298static void __init v2m_init_early(void) 294static void __init v2m_init_early(void)
299{ 295{
300 if (ct_desc->init_early) 296 if (ct_desc->init_early)
@@ -376,8 +372,7 @@ MACHINE_START(VEXPRESS, "ARM-Versatile Express")
376 .map_io = v2m_map_io, 372 .map_io = v2m_map_io,
377 .init_early = v2m_init_early, 373 .init_early = v2m_init_early,
378 .init_irq = v2m_init_irq, 374 .init_irq = v2m_init_irq,
379 .timer = &v2m_timer, 375 .init_time = v2m_timer_init,
380 .handle_irq = gic_handle_irq,
381 .init_machine = v2m_init, 376 .init_machine = v2m_init,
382 .restart = vexpress_restart, 377 .restart = vexpress_restart,
383MACHINE_END 378MACHINE_END
@@ -434,16 +429,6 @@ void __init v2m_dt_init_early(void)
434 } 429 }
435} 430}
436 431
437static struct of_device_id vexpress_irq_match[] __initdata = {
438 { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, },
439 {}
440};
441
442static void __init v2m_dt_init_irq(void)
443{
444 of_irq_init(vexpress_irq_match);
445}
446
447static void __init v2m_dt_timer_init(void) 432static void __init v2m_dt_timer_init(void)
448{ 433{
449 struct device_node *node = NULL; 434 struct device_node *node = NULL;
@@ -468,10 +453,6 @@ static void __init v2m_dt_timer_init(void)
468 24000000); 453 24000000);
469} 454}
470 455
471static struct sys_timer v2m_dt_timer = {
472 .init = v2m_dt_timer_init,
473};
474
475static const struct of_device_id v2m_dt_bus_match[] __initconst = { 456static const struct of_device_id v2m_dt_bus_match[] __initconst = {
476 { .compatible = "simple-bus", }, 457 { .compatible = "simple-bus", },
477 { .compatible = "arm,amba-bus", }, 458 { .compatible = "arm,amba-bus", },
@@ -497,9 +478,8 @@ DT_MACHINE_START(VEXPRESS_DT, "ARM-Versatile Express")
497 .smp = smp_ops(vexpress_smp_ops), 478 .smp = smp_ops(vexpress_smp_ops),
498 .map_io = v2m_dt_map_io, 479 .map_io = v2m_dt_map_io,
499 .init_early = v2m_dt_init_early, 480 .init_early = v2m_dt_init_early,
500 .init_irq = v2m_dt_init_irq, 481 .init_irq = irqchip_init,
501 .timer = &v2m_dt_timer, 482 .init_time = v2m_dt_timer_init,
502 .init_machine = v2m_dt_init, 483 .init_machine = v2m_dt_init,
503 .handle_irq = gic_handle_irq,
504 .restart = vexpress_restart, 484 .restart = vexpress_restart,
505MACHINE_END 485MACHINE_END
diff --git a/arch/arm/mach-vt8500/Kconfig b/arch/arm/mach-vt8500/Kconfig
index 2ed0b7d95db6..9adcb9e76f54 100644
--- a/arch/arm/mach-vt8500/Kconfig
+++ b/arch/arm/mach-vt8500/Kconfig
@@ -4,9 +4,10 @@ config ARCH_VT8500
4 select ARCH_HAS_CPUFREQ 4 select ARCH_HAS_CPUFREQ
5 select ARCH_REQUIRE_GPIOLIB 5 select ARCH_REQUIRE_GPIOLIB
6 select CLKDEV_LOOKUP 6 select CLKDEV_LOOKUP
7 select CLKSRC_OF
7 select CPU_ARM926T 8 select CPU_ARM926T
8 select GENERIC_CLOCKEVENTS 9 select GENERIC_CLOCKEVENTS
9 select GENERIC_GPIO
10 select HAVE_CLK 10 select HAVE_CLK
11 select VT8500_TIMER
11 help 12 help
12 Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip. 13 Support for VIA/WonderMedia VT8500/WM85xx 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/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 3c66d48ea082..fe99b709f11f 100644
--- a/arch/arm/mach-vt8500/vt8500.c
+++ b/arch/arm/mach-vt8500/vt8500.c
@@ -18,6 +18,7 @@
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20 20
21#include <linux/clocksource.h>
21#include <linux/io.h> 22#include <linux/io.h>
22#include <linux/pm.h> 23#include <linux/pm.h>
23 24
@@ -175,10 +176,6 @@ static void __init vt8500_init_irq(void)
175 of_irq_init(vt8500_irq_match); 176 of_irq_init(vt8500_irq_match);
176}; 177};
177 178
178static struct sys_timer vt8500_timer = {
179 .init = vt8500_timer_init,
180};
181
182static const char * const vt8500_dt_compat[] = { 179static const char * const vt8500_dt_compat[] = {
183 "via,vt8500", 180 "via,vt8500",
184 "wm,wm8650", 181 "wm,wm8650",
@@ -189,8 +186,8 @@ DT_MACHINE_START(WMT_DT, "VIA/Wondermedia SoC (Device Tree Support)")
189 .dt_compat = vt8500_dt_compat, 186 .dt_compat = vt8500_dt_compat,
190 .map_io = vt8500_map_io, 187 .map_io = vt8500_map_io,
191 .init_irq = vt8500_init_irq, 188 .init_irq = vt8500_init_irq,
192 .timer = &vt8500_timer,
193 .init_machine = vt8500_init, 189 .init_machine = vt8500_init,
190 .init_time = clocksource_of_init,
194 .restart = vt8500_restart, 191 .restart = vt8500_restart,
195 .handle_irq = vt8500_handle_irq, 192 .handle_irq = vt8500_handle_irq,
196MACHINE_END 193MACHINE_END
diff --git a/arch/arm/mach-w90x900/mach-nuc910evb.c b/arch/arm/mach-w90x900/mach-nuc910evb.c
index b4243e4f1565..92f1c978f35e 100644
--- a/arch/arm/mach-w90x900/mach-nuc910evb.c
+++ b/arch/arm/mach-w90x900/mach-nuc910evb.c
@@ -37,6 +37,6 @@ MACHINE_START(W90P910EVB, "W90P910EVB")
37 .map_io = nuc910evb_map_io, 37 .map_io = nuc910evb_map_io,
38 .init_irq = nuc900_init_irq, 38 .init_irq = nuc900_init_irq,
39 .init_machine = nuc910evb_init, 39 .init_machine = nuc910evb_init,
40 .timer = &nuc900_timer, 40 .init_time = nuc900_timer_init,
41 .restart = nuc9xx_restart, 41 .restart = nuc9xx_restart,
42MACHINE_END 42MACHINE_END
diff --git a/arch/arm/mach-w90x900/mach-nuc950evb.c b/arch/arm/mach-w90x900/mach-nuc950evb.c
index 500fe5932ce9..26f7189056e3 100644
--- a/arch/arm/mach-w90x900/mach-nuc950evb.c
+++ b/arch/arm/mach-w90x900/mach-nuc950evb.c
@@ -40,6 +40,6 @@ MACHINE_START(W90P950EVB, "W90P950EVB")
40 .map_io = nuc950evb_map_io, 40 .map_io = nuc950evb_map_io,
41 .init_irq = nuc900_init_irq, 41 .init_irq = nuc900_init_irq,
42 .init_machine = nuc950evb_init, 42 .init_machine = nuc950evb_init,
43 .timer = &nuc900_timer, 43 .init_time = nuc900_timer_init,
44 .restart = nuc9xx_restart, 44 .restart = nuc9xx_restart,
45MACHINE_END 45MACHINE_END
diff --git a/arch/arm/mach-w90x900/mach-nuc960evb.c b/arch/arm/mach-w90x900/mach-nuc960evb.c
index cbb3adc3db10..9b4e73fe10e5 100644
--- a/arch/arm/mach-w90x900/mach-nuc960evb.c
+++ b/arch/arm/mach-w90x900/mach-nuc960evb.c
@@ -37,6 +37,6 @@ MACHINE_START(W90N960EVB, "W90N960EVB")
37 .map_io = nuc960evb_map_io, 37 .map_io = nuc960evb_map_io,
38 .init_irq = nuc900_init_irq, 38 .init_irq = nuc900_init_irq,
39 .init_machine = nuc960evb_init, 39 .init_machine = nuc960evb_init,
40 .timer = &nuc900_timer, 40 .init_time = nuc900_timer_init,
41 .restart = nuc9xx_restart, 41 .restart = nuc9xx_restart,
42MACHINE_END 42MACHINE_END
diff --git a/arch/arm/mach-w90x900/nuc9xx.h b/arch/arm/mach-w90x900/nuc9xx.h
index 91acb4047793..88ef4b267089 100644
--- a/arch/arm/mach-w90x900/nuc9xx.h
+++ b/arch/arm/mach-w90x900/nuc9xx.h
@@ -15,10 +15,9 @@
15 * 15 *
16 */ 16 */
17struct map_desc; 17struct map_desc;
18struct sys_timer;
19 18
20/* core initialisation functions */ 19/* core initialisation functions */
21 20
22extern void nuc900_init_irq(void); 21extern void nuc900_init_irq(void);
23extern struct sys_timer nuc900_timer; 22extern void nuc900_timer_init(void);
24extern void nuc9xx_restart(char, const char *); 23extern void nuc9xx_restart(char, const char *);
diff --git a/arch/arm/mach-w90x900/time.c b/arch/arm/mach-w90x900/time.c
index fa27c498ac09..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)
@@ -167,12 +161,8 @@ static void __init nuc900_clocksource_init(void)
167 TDR_SHIFT, clocksource_mmio_readl_down); 161 TDR_SHIFT, clocksource_mmio_readl_down);
168} 162}
169 163
170static void __init nuc900_timer_init(void) 164void __init nuc900_timer_init(void)
171{ 165{
172 nuc900_clocksource_init(); 166 nuc900_clocksource_init();
173 nuc900_clockevents_init(); 167 nuc900_clockevents_init();
174} 168}
175
176struct sys_timer nuc900_timer = {
177 .init = nuc900_timer_init,
178};
diff --git a/arch/arm/mach-zynq/common.c b/arch/arm/mach-zynq/common.c
index e16d4bed0f7a..5c8983218183 100644
--- a/arch/arm/mach-zynq/common.c
+++ b/arch/arm/mach-zynq/common.c
@@ -24,6 +24,7 @@
24#include <linux/of_irq.h> 24#include <linux/of_irq.h>
25#include <linux/of_platform.h> 25#include <linux/of_platform.h>
26#include <linux/of.h> 26#include <linux/of.h>
27#include <linux/irqchip.h>
27 28
28#include <asm/mach/arch.h> 29#include <asm/mach/arch.h>
29#include <asm/mach/map.h> 30#include <asm/mach/map.h>
@@ -31,7 +32,6 @@
31#include <asm/mach-types.h> 32#include <asm/mach-types.h>
32#include <asm/page.h> 33#include <asm/page.h>
33#include <asm/pgtable.h> 34#include <asm/pgtable.h>
34#include <asm/hardware/gic.h>
35#include <asm/hardware/cache-l2x0.h> 35#include <asm/hardware/cache-l2x0.h>
36 36
37#include "common.h" 37#include "common.h"
@@ -55,19 +55,6 @@ static void __init xilinx_init_machine(void)
55 of_platform_bus_probe(NULL, zynq_of_bus_ids, NULL); 55 of_platform_bus_probe(NULL, zynq_of_bus_ids, NULL);
56} 56}
57 57
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 58#define SCU_PERIPH_PHYS 0xF8F00000
72#define SCU_PERIPH_SIZE SZ_8K 59#define SCU_PERIPH_SIZE SZ_8K
73#define SCU_PERIPH_VIRT (VMALLOC_END - SCU_PERIPH_SIZE) 60#define SCU_PERIPH_VIRT (VMALLOC_END - SCU_PERIPH_SIZE)
@@ -90,16 +77,9 @@ static void __init xilinx_zynq_timer_init(void)
90 77
91 xilinx_zynq_clocks_init(slcr); 78 xilinx_zynq_clocks_init(slcr);
92 79
93 xttcpss_timer_init(); 80 xttcps_timer_init();
94} 81}
95 82
96/*
97 * Instantiate and initialize the system timer structure
98 */
99static struct sys_timer xttcpss_sys_timer = {
100 .init = xilinx_zynq_timer_init,
101};
102
103/** 83/**
104 * xilinx_map_io() - Create memory mappings needed for early I/O. 84 * xilinx_map_io() - Create memory mappings needed for early I/O.
105 */ 85 */
@@ -117,9 +97,8 @@ static const char *xilinx_dt_match[] = {
117 97
118MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform") 98MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform")
119 .map_io = xilinx_map_io, 99 .map_io = xilinx_map_io,
120 .init_irq = xilinx_irq_init, 100 .init_irq = irqchip_init,
121 .handle_irq = gic_handle_irq,
122 .init_machine = xilinx_init_machine, 101 .init_machine = xilinx_init_machine,
123 .timer = &xttcpss_sys_timer, 102 .init_time = xilinx_zynq_timer_init,
124 .dt_compat = xilinx_dt_match, 103 .dt_compat = xilinx_dt_match,
125MACHINE_END 104MACHINE_END
diff --git a/arch/arm/mach-zynq/common.h b/arch/arm/mach-zynq/common.h
index 954b91c13c91..8b4dbbaa01cf 100644
--- a/arch/arm/mach-zynq/common.h
+++ b/arch/arm/mach-zynq/common.h
@@ -17,6 +17,6 @@
17#ifndef __MACH_ZYNQ_COMMON_H__ 17#ifndef __MACH_ZYNQ_COMMON_H__
18#define __MACH_ZYNQ_COMMON_H__ 18#define __MACH_ZYNQ_COMMON_H__
19 19
20void __init xttcpss_timer_init(void); 20void __init xttcps_timer_init(void);
21 21
22#endif 22#endif
diff --git a/arch/arm/mach-zynq/timer.c b/arch/arm/mach-zynq/timer.c
index de3df283da74..f9fbc9c1e7a6 100644
--- a/arch/arm/mach-zynq/timer.c
+++ b/arch/arm/mach-zynq/timer.c
@@ -15,39 +15,29 @@
15 * GNU General Public License for more details. 15 * GNU General Public License for more details.
16 */ 16 */
17 17
18#include <linux/kernel.h>
19#include <linux/init.h>
20#include <linux/interrupt.h> 18#include <linux/interrupt.h>
21#include <linux/irq.h>
22#include <linux/types.h>
23#include <linux/clocksource.h>
24#include <linux/clockchips.h> 19#include <linux/clockchips.h>
25#include <linux/io.h>
26#include <linux/of.h>
27#include <linux/of_address.h> 20#include <linux/of_address.h>
28#include <linux/of_irq.h> 21#include <linux/of_irq.h>
29#include <linux/slab.h> 22#include <linux/slab.h>
30#include <linux/clk-provider.h> 23#include <linux/clk-provider.h>
31
32#include "common.h" 24#include "common.h"
33 25
34/* 26/*
35 * Timer Register Offset Definitions of Timer 1, Increment base address by 4 27 * Timer Register Offset Definitions of Timer 1, Increment base address by 4
36 * and use same offsets for Timer 2 28 * and use same offsets for Timer 2
37 */ 29 */
38#define XTTCPSS_CLK_CNTRL_OFFSET 0x00 /* Clock Control Reg, RW */ 30#define XTTCPS_CLK_CNTRL_OFFSET 0x00 /* Clock Control Reg, RW */
39#define XTTCPSS_CNT_CNTRL_OFFSET 0x0C /* Counter Control Reg, RW */ 31#define XTTCPS_CNT_CNTRL_OFFSET 0x0C /* Counter Control Reg, RW */
40#define XTTCPSS_COUNT_VAL_OFFSET 0x18 /* Counter Value Reg, RO */ 32#define XTTCPS_COUNT_VAL_OFFSET 0x18 /* Counter Value Reg, RO */
41#define XTTCPSS_INTR_VAL_OFFSET 0x24 /* Interval Count Reg, RW */ 33#define XTTCPS_INTR_VAL_OFFSET 0x24 /* Interval Count Reg, RW */
42#define XTTCPSS_MATCH_1_OFFSET 0x30 /* Match 1 Value Reg, RW */ 34#define XTTCPS_ISR_OFFSET 0x54 /* Interrupt Status Reg, RO */
43#define XTTCPSS_MATCH_2_OFFSET 0x3C /* Match 2 Value Reg, RW */ 35#define XTTCPS_IER_OFFSET 0x60 /* Interrupt Enable Reg, RW */
44#define XTTCPSS_MATCH_3_OFFSET 0x48 /* Match 3 Value Reg, RW */ 36
45#define XTTCPSS_ISR_OFFSET 0x54 /* Interrupt Status Reg, RO */ 37#define XTTCPS_CNT_CNTRL_DISABLE_MASK 0x1
46#define XTTCPSS_IER_OFFSET 0x60 /* Interrupt Enable Reg, RW */ 38
47 39/*
48#define XTTCPSS_CNT_CNTRL_DISABLE_MASK 0x1 40 * Setup the timers to use pre-scaling, using a fixed value for now that will
49
50/* Setup the timers to use pre-scaling, using a fixed value for now that will
51 * work across most input frequency, but it may need to be more dynamic 41 * work across most input frequency, but it may need to be more dynamic
52 */ 42 */
53#define PRESCALE_EXPONENT 11 /* 2 ^ PRESCALE_EXPONENT = PRESCALE */ 43#define PRESCALE_EXPONENT 11 /* 2 ^ PRESCALE_EXPONENT = PRESCALE */
@@ -57,72 +47,73 @@
57#define CNT_CNTRL_RESET (1<<4) 47#define CNT_CNTRL_RESET (1<<4)
58 48
59/** 49/**
60 * struct xttcpss_timer - This definition defines local timer structure 50 * struct xttcps_timer - This definition defines local timer structure
61 * 51 *
62 * @base_addr: Base address of timer 52 * @base_addr: Base address of timer
63 **/ 53 **/
64struct xttcpss_timer { 54struct xttcps_timer {
65 void __iomem *base_addr; 55 void __iomem *base_addr;
66}; 56};
67 57
68struct xttcpss_timer_clocksource { 58struct xttcps_timer_clocksource {
69 struct xttcpss_timer xttc; 59 struct xttcps_timer xttc;
70 struct clocksource cs; 60 struct clocksource cs;
71}; 61};
72 62
73#define to_xttcpss_timer_clksrc(x) \ 63#define to_xttcps_timer_clksrc(x) \
74 container_of(x, struct xttcpss_timer_clocksource, cs) 64 container_of(x, struct xttcps_timer_clocksource, cs)
75 65
76struct xttcpss_timer_clockevent { 66struct xttcps_timer_clockevent {
77 struct xttcpss_timer xttc; 67 struct xttcps_timer xttc;
78 struct clock_event_device ce; 68 struct clock_event_device ce;
79 struct clk *clk; 69 struct clk *clk;
80}; 70};
81 71
82#define to_xttcpss_timer_clkevent(x) \ 72#define to_xttcps_timer_clkevent(x) \
83 container_of(x, struct xttcpss_timer_clockevent, ce) 73 container_of(x, struct xttcps_timer_clockevent, ce)
84 74
85/** 75/**
86 * xttcpss_set_interval - Set the timer interval value 76 * xttcps_set_interval - Set the timer interval value
87 * 77 *
88 * @timer: Pointer to the timer instance 78 * @timer: Pointer to the timer instance
89 * @cycles: Timer interval ticks 79 * @cycles: Timer interval ticks
90 **/ 80 **/
91static void xttcpss_set_interval(struct xttcpss_timer *timer, 81static void xttcps_set_interval(struct xttcps_timer *timer,
92 unsigned long cycles) 82 unsigned long cycles)
93{ 83{
94 u32 ctrl_reg; 84 u32 ctrl_reg;
95 85
96 /* Disable the counter, set the counter value and re-enable counter */ 86 /* Disable the counter, set the counter value and re-enable counter */
97 ctrl_reg = __raw_readl(timer->base_addr + XTTCPSS_CNT_CNTRL_OFFSET); 87 ctrl_reg = __raw_readl(timer->base_addr + XTTCPS_CNT_CNTRL_OFFSET);
98 ctrl_reg |= XTTCPSS_CNT_CNTRL_DISABLE_MASK; 88 ctrl_reg |= XTTCPS_CNT_CNTRL_DISABLE_MASK;
99 __raw_writel(ctrl_reg, timer->base_addr + XTTCPSS_CNT_CNTRL_OFFSET); 89 __raw_writel(ctrl_reg, timer->base_addr + XTTCPS_CNT_CNTRL_OFFSET);
100 90
101 __raw_writel(cycles, timer->base_addr + XTTCPSS_INTR_VAL_OFFSET); 91 __raw_writel(cycles, timer->base_addr + XTTCPS_INTR_VAL_OFFSET);
102 92
103 /* Reset the counter (0x10) so that it starts from 0, one-shot 93 /*
104 mode makes this needed for timing to be right. */ 94 * Reset the counter (0x10) so that it starts from 0, one-shot
95 * mode makes this needed for timing to be right.
96 */
105 ctrl_reg |= CNT_CNTRL_RESET; 97 ctrl_reg |= CNT_CNTRL_RESET;
106 ctrl_reg &= ~XTTCPSS_CNT_CNTRL_DISABLE_MASK; 98 ctrl_reg &= ~XTTCPS_CNT_CNTRL_DISABLE_MASK;
107 __raw_writel(ctrl_reg, timer->base_addr + XTTCPSS_CNT_CNTRL_OFFSET); 99 __raw_writel(ctrl_reg, timer->base_addr + XTTCPS_CNT_CNTRL_OFFSET);
108} 100}
109 101
110/** 102/**
111 * xttcpss_clock_event_interrupt - Clock event timer interrupt handler 103 * xttcps_clock_event_interrupt - Clock event timer interrupt handler
112 * 104 *
113 * @irq: IRQ number of the Timer 105 * @irq: IRQ number of the Timer
114 * @dev_id: void pointer to the xttcpss_timer instance 106 * @dev_id: void pointer to the xttcps_timer instance
115 * 107 *
116 * returns: Always IRQ_HANDLED - success 108 * returns: Always IRQ_HANDLED - success
117 **/ 109 **/
118static irqreturn_t xttcpss_clock_event_interrupt(int irq, void *dev_id) 110static irqreturn_t xttcps_clock_event_interrupt(int irq, void *dev_id)
119{ 111{
120 struct xttcpss_timer_clockevent *xttce = dev_id; 112 struct xttcps_timer_clockevent *xttce = dev_id;
121 struct xttcpss_timer *timer = &xttce->xttc; 113 struct xttcps_timer *timer = &xttce->xttc;
122 114
123 /* Acknowledge the interrupt and call event handler */ 115 /* Acknowledge the interrupt and call event handler */
124 __raw_writel(__raw_readl(timer->base_addr + XTTCPSS_ISR_OFFSET), 116 __raw_readl(timer->base_addr + XTTCPS_ISR_OFFSET);
125 timer->base_addr + XTTCPSS_ISR_OFFSET);
126 117
127 xttce->ce.event_handler(&xttce->ce); 118 xttce->ce.event_handler(&xttce->ce);
128 119
@@ -136,46 +127,46 @@ static irqreturn_t xttcpss_clock_event_interrupt(int irq, void *dev_id)
136 **/ 127 **/
137static cycle_t __xttc_clocksource_read(struct clocksource *cs) 128static cycle_t __xttc_clocksource_read(struct clocksource *cs)
138{ 129{
139 struct xttcpss_timer *timer = &to_xttcpss_timer_clksrc(cs)->xttc; 130 struct xttcps_timer *timer = &to_xttcps_timer_clksrc(cs)->xttc;
140 131
141 return (cycle_t)__raw_readl(timer->base_addr + 132 return (cycle_t)__raw_readl(timer->base_addr +
142 XTTCPSS_COUNT_VAL_OFFSET); 133 XTTCPS_COUNT_VAL_OFFSET);
143} 134}
144 135
145/** 136/**
146 * xttcpss_set_next_event - Sets the time interval for next event 137 * xttcps_set_next_event - Sets the time interval for next event
147 * 138 *
148 * @cycles: Timer interval ticks 139 * @cycles: Timer interval ticks
149 * @evt: Address of clock event instance 140 * @evt: Address of clock event instance
150 * 141 *
151 * returns: Always 0 - success 142 * returns: Always 0 - success
152 **/ 143 **/
153static int xttcpss_set_next_event(unsigned long cycles, 144static int xttcps_set_next_event(unsigned long cycles,
154 struct clock_event_device *evt) 145 struct clock_event_device *evt)
155{ 146{
156 struct xttcpss_timer_clockevent *xttce = to_xttcpss_timer_clkevent(evt); 147 struct xttcps_timer_clockevent *xttce = to_xttcps_timer_clkevent(evt);
157 struct xttcpss_timer *timer = &xttce->xttc; 148 struct xttcps_timer *timer = &xttce->xttc;
158 149
159 xttcpss_set_interval(timer, cycles); 150 xttcps_set_interval(timer, cycles);
160 return 0; 151 return 0;
161} 152}
162 153
163/** 154/**
164 * xttcpss_set_mode - Sets the mode of timer 155 * xttcps_set_mode - Sets the mode of timer
165 * 156 *
166 * @mode: Mode to be set 157 * @mode: Mode to be set
167 * @evt: Address of clock event instance 158 * @evt: Address of clock event instance
168 **/ 159 **/
169static void xttcpss_set_mode(enum clock_event_mode mode, 160static void xttcps_set_mode(enum clock_event_mode mode,
170 struct clock_event_device *evt) 161 struct clock_event_device *evt)
171{ 162{
172 struct xttcpss_timer_clockevent *xttce = to_xttcpss_timer_clkevent(evt); 163 struct xttcps_timer_clockevent *xttce = to_xttcps_timer_clkevent(evt);
173 struct xttcpss_timer *timer = &xttce->xttc; 164 struct xttcps_timer *timer = &xttce->xttc;
174 u32 ctrl_reg; 165 u32 ctrl_reg;
175 166
176 switch (mode) { 167 switch (mode) {
177 case CLOCK_EVT_MODE_PERIODIC: 168 case CLOCK_EVT_MODE_PERIODIC:
178 xttcpss_set_interval(timer, 169 xttcps_set_interval(timer,
179 DIV_ROUND_CLOSEST(clk_get_rate(xttce->clk), 170 DIV_ROUND_CLOSEST(clk_get_rate(xttce->clk),
180 PRESCALE * HZ)); 171 PRESCALE * HZ));
181 break; 172 break;
@@ -183,17 +174,17 @@ static void xttcpss_set_mode(enum clock_event_mode mode,
183 case CLOCK_EVT_MODE_UNUSED: 174 case CLOCK_EVT_MODE_UNUSED:
184 case CLOCK_EVT_MODE_SHUTDOWN: 175 case CLOCK_EVT_MODE_SHUTDOWN:
185 ctrl_reg = __raw_readl(timer->base_addr + 176 ctrl_reg = __raw_readl(timer->base_addr +
186 XTTCPSS_CNT_CNTRL_OFFSET); 177 XTTCPS_CNT_CNTRL_OFFSET);
187 ctrl_reg |= XTTCPSS_CNT_CNTRL_DISABLE_MASK; 178 ctrl_reg |= XTTCPS_CNT_CNTRL_DISABLE_MASK;
188 __raw_writel(ctrl_reg, 179 __raw_writel(ctrl_reg,
189 timer->base_addr + XTTCPSS_CNT_CNTRL_OFFSET); 180 timer->base_addr + XTTCPS_CNT_CNTRL_OFFSET);
190 break; 181 break;
191 case CLOCK_EVT_MODE_RESUME: 182 case CLOCK_EVT_MODE_RESUME:
192 ctrl_reg = __raw_readl(timer->base_addr + 183 ctrl_reg = __raw_readl(timer->base_addr +
193 XTTCPSS_CNT_CNTRL_OFFSET); 184 XTTCPS_CNT_CNTRL_OFFSET);
194 ctrl_reg &= ~XTTCPSS_CNT_CNTRL_DISABLE_MASK; 185 ctrl_reg &= ~XTTCPS_CNT_CNTRL_DISABLE_MASK;
195 __raw_writel(ctrl_reg, 186 __raw_writel(ctrl_reg,
196 timer->base_addr + XTTCPSS_CNT_CNTRL_OFFSET); 187 timer->base_addr + XTTCPS_CNT_CNTRL_OFFSET);
197 break; 188 break;
198 } 189 }
199} 190}
@@ -201,7 +192,7 @@ static void xttcpss_set_mode(enum clock_event_mode mode,
201static void __init zynq_ttc_setup_clocksource(struct device_node *np, 192static void __init zynq_ttc_setup_clocksource(struct device_node *np,
202 void __iomem *base) 193 void __iomem *base)
203{ 194{
204 struct xttcpss_timer_clocksource *ttccs; 195 struct xttcps_timer_clocksource *ttccs;
205 struct clk *clk; 196 struct clk *clk;
206 int err; 197 int err;
207 u32 reg; 198 u32 reg;
@@ -230,11 +221,11 @@ static void __init zynq_ttc_setup_clocksource(struct device_node *np,
230 ttccs->cs.mask = CLOCKSOURCE_MASK(16); 221 ttccs->cs.mask = CLOCKSOURCE_MASK(16);
231 ttccs->cs.flags = CLOCK_SOURCE_IS_CONTINUOUS; 222 ttccs->cs.flags = CLOCK_SOURCE_IS_CONTINUOUS;
232 223
233 __raw_writel(0x0, ttccs->xttc.base_addr + XTTCPSS_IER_OFFSET); 224 __raw_writel(0x0, ttccs->xttc.base_addr + XTTCPS_IER_OFFSET);
234 __raw_writel(CLK_CNTRL_PRESCALE | CLK_CNTRL_PRESCALE_EN, 225 __raw_writel(CLK_CNTRL_PRESCALE | CLK_CNTRL_PRESCALE_EN,
235 ttccs->xttc.base_addr + XTTCPSS_CLK_CNTRL_OFFSET); 226 ttccs->xttc.base_addr + XTTCPS_CLK_CNTRL_OFFSET);
236 __raw_writel(CNT_CNTRL_RESET, 227 __raw_writel(CNT_CNTRL_RESET,
237 ttccs->xttc.base_addr + XTTCPSS_CNT_CNTRL_OFFSET); 228 ttccs->xttc.base_addr + XTTCPS_CNT_CNTRL_OFFSET);
238 229
239 err = clocksource_register_hz(&ttccs->cs, clk_get_rate(clk) / PRESCALE); 230 err = clocksource_register_hz(&ttccs->cs, clk_get_rate(clk) / PRESCALE);
240 if (WARN_ON(err)) 231 if (WARN_ON(err))
@@ -244,7 +235,7 @@ static void __init zynq_ttc_setup_clocksource(struct device_node *np,
244static void __init zynq_ttc_setup_clockevent(struct device_node *np, 235static void __init zynq_ttc_setup_clockevent(struct device_node *np,
245 void __iomem *base) 236 void __iomem *base)
246{ 237{
247 struct xttcpss_timer_clockevent *ttcce; 238 struct xttcps_timer_clockevent *ttcce;
248 int err, irq; 239 int err, irq;
249 u32 reg; 240 u32 reg;
250 241
@@ -272,17 +263,18 @@ static void __init zynq_ttc_setup_clockevent(struct device_node *np,
272 263
273 ttcce->ce.name = np->name; 264 ttcce->ce.name = np->name;
274 ttcce->ce.features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; 265 ttcce->ce.features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT;
275 ttcce->ce.set_next_event = xttcpss_set_next_event; 266 ttcce->ce.set_next_event = xttcps_set_next_event;
276 ttcce->ce.set_mode = xttcpss_set_mode; 267 ttcce->ce.set_mode = xttcps_set_mode;
277 ttcce->ce.rating = 200; 268 ttcce->ce.rating = 200;
278 ttcce->ce.irq = irq; 269 ttcce->ce.irq = irq;
270 ttcce->ce.cpumask = cpu_possible_mask;
279 271
280 __raw_writel(0x23, ttcce->xttc.base_addr + XTTCPSS_CNT_CNTRL_OFFSET); 272 __raw_writel(0x23, ttcce->xttc.base_addr + XTTCPS_CNT_CNTRL_OFFSET);
281 __raw_writel(CLK_CNTRL_PRESCALE | CLK_CNTRL_PRESCALE_EN, 273 __raw_writel(CLK_CNTRL_PRESCALE | CLK_CNTRL_PRESCALE_EN,
282 ttcce->xttc.base_addr + XTTCPSS_CLK_CNTRL_OFFSET); 274 ttcce->xttc.base_addr + XTTCPS_CLK_CNTRL_OFFSET);
283 __raw_writel(0x1, ttcce->xttc.base_addr + XTTCPSS_IER_OFFSET); 275 __raw_writel(0x1, ttcce->xttc.base_addr + XTTCPS_IER_OFFSET);
284 276
285 err = request_irq(irq, xttcpss_clock_event_interrupt, IRQF_TIMER, 277 err = request_irq(irq, xttcps_clock_event_interrupt, IRQF_TIMER,
286 np->name, ttcce); 278 np->name, ttcce);
287 if (WARN_ON(err)) 279 if (WARN_ON(err))
288 return; 280 return;
@@ -301,12 +293,12 @@ static const __initconst struct of_device_id zynq_ttc_match[] = {
301}; 293};
302 294
303/** 295/**
304 * xttcpss_timer_init - Initialize the timer 296 * xttcps_timer_init - Initialize the timer
305 * 297 *
306 * Initializes the timer hardware and register the clock source and clock event 298 * Initializes the timer hardware and register the clock source and clock event
307 * timers with Linux kernal timer framework 299 * timers with Linux kernal timer framework
308 **/ 300 **/
309void __init xttcpss_timer_init(void) 301void __init xttcps_timer_init(void)
310{ 302{
311 struct device_node *np; 303 struct device_node *np;
312 304
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/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 6b2fb87c8698..076c26d43864 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -774,25 +774,27 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset,
774 size_t size, enum dma_data_direction dir, 774 size_t size, enum dma_data_direction dir,
775 void (*op)(const void *, size_t, int)) 775 void (*op)(const void *, size_t, int))
776{ 776{
777 unsigned long pfn;
778 size_t left = size;
779
780 pfn = page_to_pfn(page) + offset / PAGE_SIZE;
781 offset %= PAGE_SIZE;
782
777 /* 783 /*
778 * A single sg entry may refer to multiple physically contiguous 784 * A single sg entry may refer to multiple physically contiguous
779 * pages. But we still need to process highmem pages individually. 785 * pages. But we still need to process highmem pages individually.
780 * If highmem is not configured then the bulk of this loop gets 786 * If highmem is not configured then the bulk of this loop gets
781 * optimized out. 787 * optimized out.
782 */ 788 */
783 size_t left = size;
784 do { 789 do {
785 size_t len = left; 790 size_t len = left;
786 void *vaddr; 791 void *vaddr;
787 792
793 page = pfn_to_page(pfn);
794
788 if (PageHighMem(page)) { 795 if (PageHighMem(page)) {
789 if (len + offset > PAGE_SIZE) { 796 if (len + offset > PAGE_SIZE)
790 if (offset >= PAGE_SIZE) {
791 page += offset / PAGE_SIZE;
792 offset %= PAGE_SIZE;
793 }
794 len = PAGE_SIZE - offset; 797 len = PAGE_SIZE - offset;
795 }
796 vaddr = kmap_high_get(page); 798 vaddr = kmap_high_get(page);
797 if (vaddr) { 799 if (vaddr) {
798 vaddr += offset; 800 vaddr += offset;
@@ -809,7 +811,7 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset,
809 op(vaddr, len, dir); 811 op(vaddr, len, dir);
810 } 812 }
811 offset = 0; 813 offset = 0;
812 page++; 814 pfn++;
813 left -= len; 815 left -= len;
814 } while (left); 816 } while (left);
815} 817}
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 9f0610243bd6..ce328c7f5c94 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -283,7 +283,7 @@ static struct mem_type mem_types[] = {
283 }, 283 },
284 [MT_MEMORY_SO] = { 284 [MT_MEMORY_SO] = {
285 .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | 285 .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
286 L_PTE_MT_UNCACHED, 286 L_PTE_MT_UNCACHED | L_PTE_XN,
287 .prot_l1 = PMD_TYPE_TABLE, 287 .prot_l1 = PMD_TYPE_TABLE,
288 .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_S | 288 .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_SECT_S |
289 PMD_SECT_UNCACHED | PMD_SECT_XN, 289 PMD_SECT_UNCACHED | PMD_SECT_XN,
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 e0072ce8d6e9..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) \
@@ -194,8 +194,7 @@ extern void s3c24xx_init_uartdevs(char *name,
194 194
195/* timer for 2410/2440 */ 195/* timer for 2410/2440 */
196 196
197struct sys_timer; 197extern void s3c24xx_timer_init(void);
198extern struct sys_timer s3c24xx_timer;
199 198
200extern struct syscore_ops s3c2410_pm_syscore_ops; 199extern struct syscore_ops s3c2410_pm_syscore_ops;
201extern struct syscore_ops s3c2412_pm_syscore_ops; 200extern struct syscore_ops s3c2412_pm_syscore_ops;
diff --git a/arch/arm/plat-samsung/include/plat/gpio-core.h b/arch/arm/plat-samsung/include/plat/gpio-core.h
index f7a3ea2c498a..cf5aae5b0975 100644
--- a/arch/arm/plat-samsung/include/plat/gpio-core.h
+++ b/arch/arm/plat-samsung/include/plat/gpio-core.h
@@ -106,7 +106,18 @@ static inline struct samsung_gpio_chip *samsung_gpiolib_getchip(unsigned int chi
106#else 106#else
107/* machine specific code should provide samsung_gpiolib_getchip */ 107/* machine specific code should provide samsung_gpiolib_getchip */
108 108
109#include <mach/gpio-track.h> 109extern struct samsung_gpio_chip s3c24xx_gpios[];
110
111static inline struct samsung_gpio_chip *samsung_gpiolib_getchip(unsigned int pin)
112{
113 struct samsung_gpio_chip *chip;
114
115 if (pin > S3C_GPIO_END)
116 return NULL;
117
118 chip = &s3c24xx_gpios[pin/32];
119 return ((pin - chip->chip.base) < chip->chip.ngpio) ? chip : NULL;
120}
110 121
111static inline void s3c_gpiolib_track(struct samsung_gpio_chip *chip) { } 122static inline void s3c_gpiolib_track(struct samsung_gpio_chip *chip) { }
112#endif 123#endif
diff --git a/arch/arm/plat-samsung/include/plat/gpio-fns.h b/arch/arm/plat-samsung/include/plat/gpio-fns.h
deleted file mode 100644
index d1ecef0e38e0..000000000000
--- a/arch/arm/plat-samsung/include/plat/gpio-fns.h
+++ /dev/null
@@ -1 +0,0 @@
1#include <plat/gpio-cfg.h>
diff --git a/arch/arm/plat-samsung/include/plat/s5p-time.h b/arch/arm/plat-samsung/include/plat/s5p-time.h
index 3a70aebc9205..9c96f3586ce0 100644
--- a/arch/arm/plat-samsung/include/plat/s5p-time.h
+++ b/arch/arm/plat-samsung/include/plat/s5p-time.h
@@ -36,5 +36,5 @@ struct s5p_timer_source {
36 36
37extern void __init s5p_set_timer_source(enum s5p_timer_mode event, 37extern void __init s5p_set_timer_source(enum s5p_timer_mode event,
38 enum s5p_timer_mode source); 38 enum s5p_timer_mode source);
39extern struct sys_timer s5p_timer; 39extern void s5p_timer_init(void);
40#endif /* __ASM_PLAT_S5P_TIME_H */ 40#endif /* __ASM_PLAT_S5P_TIME_H */
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 028b6e877eb9..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);
@@ -393,13 +386,9 @@ static void __init s5p_timer_resources(void)
393 clk_enable(tin_source); 386 clk_enable(tin_source);
394} 387}
395 388
396static void __init s5p_timer_init(void) 389void __init s5p_timer_init(void)
397{ 390{
398 s5p_timer_resources(); 391 s5p_timer_resources();
399 s5p_clockevent_init(); 392 s5p_clockevent_init();
400 s5p_clocksource_init(); 393 s5p_clocksource_init();
401} 394}
402
403struct sys_timer s5p_timer = {
404 .init = s5p_timer_init,
405};
diff --git a/arch/arm/plat-samsung/time.c b/arch/arm/plat-samsung/time.c
index 60552e22f22e..73defd00c3e4 100644
--- a/arch/arm/plat-samsung/time.c
+++ b/arch/arm/plat-samsung/time.c
@@ -27,6 +27,7 @@
27#include <linux/clk.h> 27#include <linux/clk.h>
28#include <linux/io.h> 28#include <linux/io.h>
29#include <linux/platform_device.h> 29#include <linux/platform_device.h>
30#include <linux/syscore_ops.h>
30 31
31#include <asm/mach-types.h> 32#include <asm/mach-types.h>
32 33
@@ -95,7 +96,7 @@ static inline unsigned long timer_ticks_to_usec(unsigned long ticks)
95 * IRQs are disabled before entering here from do_gettimeofday() 96 * IRQs are disabled before entering here from do_gettimeofday()
96 */ 97 */
97 98
98static unsigned long s3c2410_gettimeoffset (void) 99static u32 s3c2410_gettimeoffset(void)
99{ 100{
100 unsigned long tdone; 101 unsigned long tdone;
101 unsigned long tval; 102 unsigned long tval;
@@ -120,7 +121,7 @@ static unsigned long s3c2410_gettimeoffset (void)
120 tdone += timer_startval; 121 tdone += timer_startval;
121 } 122 }
122 123
123 return timer_ticks_to_usec(tdone); 124 return timer_ticks_to_usec(tdone) * 1000;
124} 125}
125 126
126 127
@@ -271,15 +272,16 @@ static void __init s3c2410_timer_resources(void)
271 clk_enable(tin); 272 clk_enable(tin);
272} 273}
273 274
274static void __init s3c2410_timer_init(void) 275static struct syscore_ops s3c24xx_syscore_ops = {
276 .resume = s3c2410_timer_setup,
277};
278
279void __init s3c24xx_timer_init(void)
275{ 280{
281 arch_gettimeoffset = s3c2410_gettimeoffset;
282
276 s3c2410_timer_resources(); 283 s3c2410_timer_resources();
277 s3c2410_timer_setup(); 284 s3c2410_timer_setup();
278 setup_irq(IRQ_TIMER4, &s3c2410_timer_irq); 285 setup_irq(IRQ_TIMER4, &s3c2410_timer_irq);
286 register_syscore_ops(&s3c24xx_syscore_ops);
279} 287}
280
281struct sys_timer s3c24xx_timer = {
282 .init = s3c2410_timer_init,
283 .offset = s3c2410_gettimeoffset,
284 .resume = s3c2410_timer_setup
285};
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/headsmp.S b/arch/arm/plat-versatile/headsmp.S
index dd703ef09b8d..b178d44e9eaa 100644
--- a/arch/arm/plat-versatile/headsmp.S
+++ b/arch/arm/plat-versatile/headsmp.S
@@ -20,7 +20,7 @@
20 */ 20 */
21ENTRY(versatile_secondary_startup) 21ENTRY(versatile_secondary_startup)
22 mrc p15, 0, r0, c0, c0, 5 22 mrc p15, 0, r0, c0, c0, 5
23 and r0, r0, #15 23 bic r0, #0xff000000
24 adr r4, 1f 24 adr r4, 1f
25 ldmia r4, {r5, r6} 25 ldmia r4, {r5, r6}
26 sub r4, r4, r5 26 sub r4, r4, r5
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/arm/vfp/entry.S b/arch/arm/vfp/entry.S
index cc926c985981..323ce1a62bbf 100644
--- a/arch/arm/vfp/entry.S
+++ b/arch/arm/vfp/entry.S
@@ -22,7 +22,7 @@
22@ IRQs disabled. 22@ IRQs disabled.
23@ 23@
24ENTRY(do_vfp) 24ENTRY(do_vfp)
25#ifdef CONFIG_PREEMPT 25#ifdef CONFIG_PREEMPT_COUNT
26 ldr r4, [r10, #TI_PREEMPT] @ get preempt count 26 ldr r4, [r10, #TI_PREEMPT] @ get preempt count
27 add r11, r4, #1 @ increment it 27 add r11, r4, #1 @ increment it
28 str r11, [r10, #TI_PREEMPT] 28 str r11, [r10, #TI_PREEMPT]
@@ -35,7 +35,7 @@ ENTRY(do_vfp)
35ENDPROC(do_vfp) 35ENDPROC(do_vfp)
36 36
37ENTRY(vfp_null_entry) 37ENTRY(vfp_null_entry)
38#ifdef CONFIG_PREEMPT 38#ifdef CONFIG_PREEMPT_COUNT
39 get_thread_info r10 39 get_thread_info r10
40 ldr r4, [r10, #TI_PREEMPT] @ get preempt count 40 ldr r4, [r10, #TI_PREEMPT] @ get preempt count
41 sub r11, r4, #1 @ decrement it 41 sub r11, r4, #1 @ decrement it
@@ -53,7 +53,7 @@ ENDPROC(vfp_null_entry)
53 53
54 __INIT 54 __INIT
55ENTRY(vfp_testing_entry) 55ENTRY(vfp_testing_entry)
56#ifdef CONFIG_PREEMPT 56#ifdef CONFIG_PREEMPT_COUNT
57 get_thread_info r10 57 get_thread_info r10
58 ldr r4, [r10, #TI_PREEMPT] @ get preempt count 58 ldr r4, [r10, #TI_PREEMPT] @ get preempt count
59 sub r11, r4, #1 @ decrement it 59 sub r11, r4, #1 @ decrement it
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S
index ea0349f63586..dd5e56f95f3f 100644
--- a/arch/arm/vfp/vfphw.S
+++ b/arch/arm/vfp/vfphw.S
@@ -168,7 +168,7 @@ vfp_hw_state_valid:
168 @ else it's one 32-bit instruction, so 168 @ else it's one 32-bit instruction, so
169 @ always subtract 4 from the following 169 @ always subtract 4 from the following
170 @ instruction address. 170 @ instruction address.
171#ifdef CONFIG_PREEMPT 171#ifdef CONFIG_PREEMPT_COUNT
172 get_thread_info r10 172 get_thread_info r10
173 ldr r4, [r10, #TI_PREEMPT] @ get preempt count 173 ldr r4, [r10, #TI_PREEMPT] @ get preempt count
174 sub r11, r4, #1 @ decrement it 174 sub r11, r4, #1 @ decrement it
@@ -192,7 +192,7 @@ look_for_VFP_exceptions:
192 @ not recognised by VFP 192 @ not recognised by VFP
193 193
194 DBGSTR "not VFP" 194 DBGSTR "not VFP"
195#ifdef CONFIG_PREEMPT 195#ifdef CONFIG_PREEMPT_COUNT
196 get_thread_info r10 196 get_thread_info r10
197 ldr r4, [r10, #TI_PREEMPT] @ get preempt count 197 ldr r4, [r10, #TI_PREEMPT] @ get preempt count
198 sub r11, r4, #1 @ decrement it 198 sub r11, r4, #1 @ decrement it
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/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
index 801e2d7fcbc6..32ac0aef0068 100644
--- a/arch/arm64/boot/dts/Makefile
+++ b/arch/arm64/boot/dts/Makefile
@@ -1,4 +1,5 @@
1targets += dtbs 1targets += dtbs
2targets += $(dtb-y)
2 3
3dtbs: $(addprefix $(obj)/, $(dtb-y)) 4dtbs: $(addprefix $(obj)/, $(dtb-y))
4 5
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/include/asm/elf.h b/arch/arm64/include/asm/elf.h
index 07fea290d7c1..fe32c0e4ac01 100644
--- a/arch/arm64/include/asm/elf.h
+++ b/arch/arm64/include/asm/elf.h
@@ -26,7 +26,10 @@
26 26
27typedef unsigned long elf_greg_t; 27typedef unsigned long elf_greg_t;
28 28
29#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) 29#define ELF_NGREG (sizeof(struct user_pt_regs) / sizeof(elf_greg_t))
30#define ELF_CORE_COPY_REGS(dest, regs) \
31 *(struct user_pt_regs *)&(dest) = (regs)->user_regs;
32
30typedef elf_greg_t elf_gregset_t[ELF_NGREG]; 33typedef elf_greg_t elf_gregset_t[ELF_NGREG];
31typedef struct user_fpsimd_state elf_fpregset_t; 34typedef struct user_fpsimd_state elf_fpregset_t;
32 35
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index 64b133949502..e333a243bfcc 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -24,7 +24,8 @@
24/* 24/*
25 * Software defined PTE bits definition. 25 * Software defined PTE bits definition.
26 */ 26 */
27#define PTE_VALID (_AT(pteval_t, 1) << 0) /* pte_present() check */ 27#define PTE_VALID (_AT(pteval_t, 1) << 0)
28#define PTE_PROT_NONE (_AT(pteval_t, 1) << 1) /* only when !PTE_VALID */
28#define PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !pte_present() */ 29#define PTE_FILE (_AT(pteval_t, 1) << 2) /* only when !pte_present() */
29#define PTE_DIRTY (_AT(pteval_t, 1) << 55) 30#define PTE_DIRTY (_AT(pteval_t, 1) << 55)
30#define PTE_SPECIAL (_AT(pteval_t, 1) << 56) 31#define PTE_SPECIAL (_AT(pteval_t, 1) << 56)
@@ -60,9 +61,12 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
60 61
61extern pgprot_t pgprot_default; 62extern pgprot_t pgprot_default;
62 63
63#define _MOD_PROT(p, b) __pgprot(pgprot_val(p) | (b)) 64#define __pgprot_modify(prot,mask,bits) \
65 __pgprot((pgprot_val(prot) & ~(mask)) | (bits))
66
67#define _MOD_PROT(p, b) __pgprot_modify(p, 0, b)
64 68
65#define PAGE_NONE _MOD_PROT(pgprot_default, PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) 69#define PAGE_NONE __pgprot_modify(pgprot_default, PTE_TYPE_MASK, PTE_PROT_NONE)
66#define PAGE_SHARED _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN) 70#define PAGE_SHARED _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN)
67#define PAGE_SHARED_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN) 71#define PAGE_SHARED_EXEC _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN)
68#define PAGE_COPY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) 72#define PAGE_COPY _MOD_PROT(pgprot_default, PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY)
@@ -72,7 +76,7 @@ extern pgprot_t pgprot_default;
72#define PAGE_KERNEL _MOD_PROT(pgprot_default, PTE_PXN | PTE_UXN | PTE_DIRTY) 76#define PAGE_KERNEL _MOD_PROT(pgprot_default, PTE_PXN | PTE_UXN | PTE_DIRTY)
73#define PAGE_KERNEL_EXEC _MOD_PROT(pgprot_default, PTE_UXN | PTE_DIRTY) 77#define PAGE_KERNEL_EXEC _MOD_PROT(pgprot_default, PTE_UXN | PTE_DIRTY)
74 78
75#define __PAGE_NONE __pgprot(_PAGE_DEFAULT | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) 79#define __PAGE_NONE __pgprot(((_PAGE_DEFAULT) & ~PTE_TYPE_MASK) | PTE_PROT_NONE)
76#define __PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN) 80#define __PAGE_SHARED __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN)
77#define __PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN) 81#define __PAGE_SHARED_EXEC __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN)
78#define __PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY) 82#define __PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | PTE_PXN | PTE_UXN | PTE_RDONLY)
@@ -125,16 +129,15 @@ extern struct page *empty_zero_page;
125/* 129/*
126 * The following only work if pte_present(). Undefined behaviour otherwise. 130 * The following only work if pte_present(). Undefined behaviour otherwise.
127 */ 131 */
128#define pte_present(pte) (pte_val(pte) & PTE_VALID) 132#define pte_present(pte) (pte_val(pte) & (PTE_VALID | PTE_PROT_NONE))
129#define pte_dirty(pte) (pte_val(pte) & PTE_DIRTY) 133#define pte_dirty(pte) (pte_val(pte) & PTE_DIRTY)
130#define pte_young(pte) (pte_val(pte) & PTE_AF) 134#define pte_young(pte) (pte_val(pte) & PTE_AF)
131#define pte_special(pte) (pte_val(pte) & PTE_SPECIAL) 135#define pte_special(pte) (pte_val(pte) & PTE_SPECIAL)
132#define pte_write(pte) (!(pte_val(pte) & PTE_RDONLY)) 136#define pte_write(pte) (!(pte_val(pte) & PTE_RDONLY))
133#define pte_exec(pte) (!(pte_val(pte) & PTE_UXN)) 137#define pte_exec(pte) (!(pte_val(pte) & PTE_UXN))
134 138
135#define pte_present_exec_user(pte) \ 139#define pte_valid_user(pte) \
136 ((pte_val(pte) & (PTE_VALID | PTE_USER | PTE_UXN)) == \ 140 ((pte_val(pte) & (PTE_VALID | PTE_USER)) == (PTE_VALID | PTE_USER))
137 (PTE_VALID | PTE_USER))
138 141
139#define PTE_BIT_FUNC(fn,op) \ 142#define PTE_BIT_FUNC(fn,op) \
140static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; } 143static inline pte_t pte_##fn(pte_t pte) { pte_val(pte) op; return pte; }
@@ -157,10 +160,13 @@ extern void __sync_icache_dcache(pte_t pteval, unsigned long addr);
157static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, 160static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
158 pte_t *ptep, pte_t pte) 161 pte_t *ptep, pte_t pte)
159{ 162{
160 if (pte_present_exec_user(pte)) 163 if (pte_valid_user(pte)) {
161 __sync_icache_dcache(pte, addr); 164 if (pte_exec(pte))
162 if (!pte_dirty(pte)) 165 __sync_icache_dcache(pte, addr);
163 pte = pte_wrprotect(pte); 166 if (!pte_dirty(pte))
167 pte = pte_wrprotect(pte);
168 }
169
164 set_pte(ptep, pte); 170 set_pte(ptep, pte);
165} 171}
166 172
@@ -170,9 +176,6 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
170#define pte_huge(pte) ((pte_val(pte) & PTE_TYPE_MASK) == PTE_TYPE_HUGEPAGE) 176#define pte_huge(pte) ((pte_val(pte) & PTE_TYPE_MASK) == PTE_TYPE_HUGEPAGE)
171#define pte_mkhuge(pte) (__pte((pte_val(pte) & ~PTE_TYPE_MASK) | PTE_TYPE_HUGEPAGE)) 177#define pte_mkhuge(pte) (__pte((pte_val(pte) & ~PTE_TYPE_MASK) | PTE_TYPE_HUGEPAGE))
172 178
173#define __pgprot_modify(prot,mask,bits) \
174 __pgprot((pgprot_val(prot) & ~(mask)) | (bits))
175
176#define __HAVE_ARCH_PTE_SPECIAL 179#define __HAVE_ARCH_PTE_SPECIAL
177 180
178/* 181/*
@@ -264,7 +267,8 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)
264 267
265static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) 268static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
266{ 269{
267 const pteval_t mask = PTE_USER | PTE_PXN | PTE_UXN | PTE_RDONLY; 270 const pteval_t mask = PTE_USER | PTE_PXN | PTE_UXN | PTE_RDONLY |
271 PTE_PROT_NONE | PTE_VALID;
268 pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask); 272 pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask);
269 return pte; 273 return pte;
270} 274}
diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h
index 58432625fdb3..5ef47ba3ed45 100644
--- a/arch/arm64/include/asm/unistd32.h
+++ b/arch/arm64/include/asm/unistd32.h
@@ -395,8 +395,13 @@ __SYSCALL(370, sys_name_to_handle_at)
395__SYSCALL(371, compat_sys_open_by_handle_at) 395__SYSCALL(371, compat_sys_open_by_handle_at)
396__SYSCALL(372, compat_sys_clock_adjtime) 396__SYSCALL(372, compat_sys_clock_adjtime)
397__SYSCALL(373, sys_syncfs) 397__SYSCALL(373, sys_syncfs)
398__SYSCALL(374, compat_sys_sendmmsg)
399__SYSCALL(375, sys_setns)
400__SYSCALL(376, compat_sys_process_vm_readv)
401__SYSCALL(377, compat_sys_process_vm_writev)
402__SYSCALL(378, sys_ni_syscall) /* 378 for kcmp */
398 403
399#define __NR_compat_syscalls 374 404#define __NR_compat_syscalls 379
400 405
401/* 406/*
402 * Compat syscall numbers used by the AArch64 kernel. 407 * Compat syscall numbers used by the AArch64 kernel.
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/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index c958cb84d75f..6a389dc1bd49 100644
--- a/arch/arm64/kernel/vdso.c
+++ b/arch/arm64/kernel/vdso.c
@@ -252,10 +252,6 @@ void update_vsyscall(struct timekeeper *tk)
252 252
253void update_vsyscall_tz(void) 253void update_vsyscall_tz(void)
254{ 254{
255 ++vdso_data->tb_seq_count;
256 smp_wmb();
257 vdso_data->tz_minuteswest = sys_tz.tz_minuteswest; 255 vdso_data->tz_minuteswest = sys_tz.tz_minuteswest;
258 vdso_data->tz_dsttime = sys_tz.tz_dsttime; 256 vdso_data->tz_dsttime = sys_tz.tz_dsttime;
259 smp_wmb();
260 ++vdso_data->tb_seq_count;
261} 257}
diff --git a/arch/arm64/kernel/vdso/gettimeofday.S b/arch/arm64/kernel/vdso/gettimeofday.S
index 8bf658d974f9..f0a6d10b5211 100644
--- a/arch/arm64/kernel/vdso/gettimeofday.S
+++ b/arch/arm64/kernel/vdso/gettimeofday.S
@@ -73,8 +73,6 @@ ENTRY(__kernel_gettimeofday)
73 /* If tz is NULL, return 0. */ 73 /* If tz is NULL, return 0. */
74 cbz x1, 3f 74 cbz x1, 3f
75 ldp w4, w5, [vdso_data, #VDSO_TZ_MINWEST] 75 ldp w4, w5, [vdso_data, #VDSO_TZ_MINWEST]
76 seqcnt_read w9
77 seqcnt_check w9, 1b
78 stp w4, w5, [x1, #TZ_MINWEST] 76 stp w4, w5, [x1, #TZ_MINWEST]
793: 773:
80 mov x0, xzr 78 mov x0, xzr
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/kernel/time.c b/arch/blackfin/kernel/time.c
index 2310b249675f..3126b920a4a5 100644
--- a/arch/blackfin/kernel/time.c
+++ b/arch/blackfin/kernel/time.c
@@ -85,7 +85,7 @@ time_sched_init(irqreturn_t(*timer_routine) (int, void *))
85/* 85/*
86 * Should return useconds since last timer tick 86 * Should return useconds since last timer tick
87 */ 87 */
88u32 arch_gettimeoffset(void) 88static u32 blackfin_gettimeoffset(void)
89{ 89{
90 unsigned long offset; 90 unsigned long offset;
91 unsigned long clocks_per_jiffy; 91 unsigned long clocks_per_jiffy;
@@ -141,6 +141,10 @@ void read_persistent_clock(struct timespec *ts)
141 141
142void __init time_init(void) 142void __init time_init(void)
143{ 143{
144#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
145 arch_gettimeoffset = blackfin_gettimeoffset;
146#endif
147
144#ifdef CONFIG_RTC_DRV_BFIN 148#ifdef CONFIG_RTC_DRV_BFIN
145 /* [#2663] hack to filter junk RTC values that would cause 149 /* [#2663] hack to filter junk RTC values that would cause
146 * userspace to have to deal with time values greater than 150 * userspace to have to deal with time values greater than
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-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c
index bcffcb6a9415..fce7c541d70d 100644
--- a/arch/cris/arch-v10/kernel/time.c
+++ b/arch/cris/arch-v10/kernel/time.c
@@ -55,9 +55,9 @@ unsigned long get_ns_in_jiffie(void)
55 return ns; 55 return ns;
56} 56}
57 57
58unsigned long do_slow_gettimeoffset(void) 58static u32 cris_v10_gettimeoffset(void)
59{ 59{
60 unsigned long count; 60 u32 count;
61 61
62 /* The timer interrupt comes from Etrax timer 0. In order to get 62 /* The timer interrupt comes from Etrax timer 0. In order to get
63 * better precision, we check the current value. It might have 63 * better precision, we check the current value. It might have
@@ -65,8 +65,8 @@ unsigned long do_slow_gettimeoffset(void)
65 */ 65 */
66 count = *R_TIMER0_DATA; 66 count = *R_TIMER0_DATA;
67 67
68 /* Convert timer value to usec */ 68 /* Convert timer value to nsec */
69 return (TIMER0_DIV - count) * ((NSEC_PER_SEC/1000)/HZ)/TIMER0_DIV; 69 return (TIMER0_DIV - count) * (NSEC_PER_SEC/HZ)/TIMER0_DIV;
70} 70}
71 71
72/* Excerpt from the Etrax100 HSDD about the built-in watchdog: 72/* Excerpt from the Etrax100 HSDD about the built-in watchdog:
@@ -191,6 +191,8 @@ static struct irqaction irq2 = {
191void __init 191void __init
192time_init(void) 192time_init(void)
193{ 193{
194 arch_gettimeoffset = cris_v10_gettimeoffset;
195
194 /* probe for the RTC and read it if it exists 196 /* probe for the RTC and read it if it exists
195 * Before the RTC can be probed the loops_per_usec variable needs 197 * Before the RTC can be probed the loops_per_usec variable needs
196 * to be initialized to make usleep work. A better value for 198 * to be initialized to make usleep work. A better value for
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/cris/kernel/time.c b/arch/cris/kernel/time.c
index 277ffc459e4b..fe6acdabbc8d 100644
--- a/arch/cris/kernel/time.c
+++ b/arch/cris/kernel/time.c
@@ -39,17 +39,6 @@
39extern unsigned long loops_per_jiffy; /* init/main.c */ 39extern unsigned long loops_per_jiffy; /* init/main.c */
40unsigned long loops_per_usec; 40unsigned long loops_per_usec;
41 41
42
43#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
44extern unsigned long do_slow_gettimeoffset(void);
45static unsigned long (*do_gettimeoffset)(void) = do_slow_gettimeoffset;
46
47u32 arch_gettimeoffset(void)
48{
49 return do_gettimeoffset() * 1000;
50}
51#endif
52
53int set_rtc_mmss(unsigned long nowtime) 42int set_rtc_mmss(unsigned long nowtime)
54{ 43{
55 D(printk(KERN_DEBUG "set_rtc_mmss(%lu)\n", nowtime)); 44 D(printk(KERN_DEBUG "set_rtc_mmss(%lu)\n", nowtime));
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/ptrace.c b/arch/ia64/kernel/ptrace.c
index 4265ff64219b..b7a5fffe0924 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -672,33 +672,6 @@ ptrace_attach_sync_user_rbs (struct task_struct *child)
672 read_unlock(&tasklist_lock); 672 read_unlock(&tasklist_lock);
673} 673}
674 674
675static inline int
676thread_matches (struct task_struct *thread, unsigned long addr)
677{
678 unsigned long thread_rbs_end;
679 struct pt_regs *thread_regs;
680
681 if (ptrace_check_attach(thread, 0) < 0)
682 /*
683 * If the thread is not in an attachable state, we'll
684 * ignore it. The net effect is that if ADDR happens
685 * to overlap with the portion of the thread's
686 * register backing store that is currently residing
687 * on the thread's kernel stack, then ptrace() may end
688 * up accessing a stale value. But if the thread
689 * isn't stopped, that's a problem anyhow, so we're
690 * doing as well as we can...
691 */
692 return 0;
693
694 thread_regs = task_pt_regs(thread);
695 thread_rbs_end = ia64_get_user_rbs_end(thread, thread_regs, NULL);
696 if (!on_kernel_rbs(addr, thread_regs->ar_bspstore, thread_rbs_end))
697 return 0;
698
699 return 1; /* looks like we've got a winner */
700}
701
702/* 675/*
703 * Write f32-f127 back to task->thread.fph if it has been modified. 676 * Write f32-f127 back to task->thread.fph if it has been modified.
704 */ 677 */
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/m32r/kernel/time.c b/arch/m32r/kernel/time.c
index 84dd04048db9..1a15f81ea1bd 100644
--- a/arch/m32r/kernel/time.c
+++ b/arch/m32r/kernel/time.c
@@ -57,7 +57,7 @@ extern void smp_local_timer_interrupt(void);
57 57
58static unsigned long latch; 58static unsigned long latch;
59 59
60u32 arch_gettimeoffset(void) 60static u32 m32r_gettimeoffset(void)
61{ 61{
62 unsigned long elapsed_time = 0; /* [us] */ 62 unsigned long elapsed_time = 0; /* [us] */
63 63
@@ -165,6 +165,8 @@ void read_persistent_clock(struct timespec *ts)
165 165
166void __init time_init(void) 166void __init time_init(void)
167{ 167{
168 arch_gettimeoffset = m32r_gettimeoffset;
169
168#if defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_XNUX2) \ 170#if defined(CONFIG_CHIP_M32102) || defined(CONFIG_CHIP_XNUX2) \
169 || defined(CONFIG_CHIP_VDEC2) || defined(CONFIG_CHIP_M32700) \ 171 || defined(CONFIG_CHIP_VDEC2) || defined(CONFIG_CHIP_M32700) \
170 || defined(CONFIG_CHIP_OPSP) || defined(CONFIG_CHIP_M32104) 172 || defined(CONFIG_CHIP_OPSP) || defined(CONFIG_CHIP_M32104)
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c
index ee01b7a38e58..b819390e29cd 100644
--- a/arch/m68k/amiga/config.c
+++ b/arch/m68k/amiga/config.c
@@ -95,7 +95,7 @@ static void amiga_sched_init(irq_handler_t handler);
95static void amiga_get_model(char *model); 95static void amiga_get_model(char *model);
96static void amiga_get_hardware_list(struct seq_file *m); 96static void amiga_get_hardware_list(struct seq_file *m);
97/* amiga specific timer functions */ 97/* amiga specific timer functions */
98static unsigned long amiga_gettimeoffset(void); 98static u32 amiga_gettimeoffset(void);
99extern void amiga_mksound(unsigned int count, unsigned int ticks); 99extern void amiga_mksound(unsigned int count, unsigned int ticks);
100static void amiga_reset(void); 100static void amiga_reset(void);
101extern void amiga_init_sound(void); 101extern void amiga_init_sound(void);
@@ -377,7 +377,7 @@ void __init config_amiga(void)
377 mach_init_IRQ = amiga_init_IRQ; 377 mach_init_IRQ = amiga_init_IRQ;
378 mach_get_model = amiga_get_model; 378 mach_get_model = amiga_get_model;
379 mach_get_hardware_list = amiga_get_hardware_list; 379 mach_get_hardware_list = amiga_get_hardware_list;
380 mach_gettimeoffset = amiga_gettimeoffset; 380 arch_gettimeoffset = amiga_gettimeoffset;
381 381
382 /* 382 /*
383 * default MAX_DMA=0xffffffff on all machines. If we don't do so, the SCSI 383 * default MAX_DMA=0xffffffff on all machines. If we don't do so, the SCSI
@@ -482,10 +482,10 @@ static void __init amiga_sched_init(irq_handler_t timer_routine)
482#define TICK_SIZE 10000 482#define TICK_SIZE 10000
483 483
484/* This is always executed with interrupts disabled. */ 484/* This is always executed with interrupts disabled. */
485static unsigned long amiga_gettimeoffset(void) 485static u32 amiga_gettimeoffset(void)
486{ 486{
487 unsigned short hi, lo, hi2; 487 unsigned short hi, lo, hi2;
488 unsigned long ticks, offset = 0; 488 u32 ticks, offset = 0;
489 489
490 /* read CIA B timer A current value */ 490 /* read CIA B timer A current value */
491 hi = ciab.tahi; 491 hi = ciab.tahi;
@@ -507,7 +507,7 @@ static unsigned long amiga_gettimeoffset(void)
507 ticks = jiffy_ticks - ticks; 507 ticks = jiffy_ticks - ticks;
508 ticks = (10000 * ticks) / jiffy_ticks; 508 ticks = (10000 * ticks) / jiffy_ticks;
509 509
510 return ticks + offset; 510 return (ticks + offset) * 1000;
511} 511}
512 512
513static void amiga_reset(void) __noreturn; 513static void amiga_reset(void) __noreturn;
diff --git a/arch/m68k/apollo/config.c b/arch/m68k/apollo/config.c
index f5565d6eeb8e..3ea56b90e718 100644
--- a/arch/m68k/apollo/config.c
+++ b/arch/m68k/apollo/config.c
@@ -26,7 +26,7 @@ u_long apollo_model;
26 26
27extern void dn_sched_init(irq_handler_t handler); 27extern void dn_sched_init(irq_handler_t handler);
28extern void dn_init_IRQ(void); 28extern void dn_init_IRQ(void);
29extern unsigned long dn_gettimeoffset(void); 29extern u32 dn_gettimeoffset(void);
30extern int dn_dummy_hwclk(int, struct rtc_time *); 30extern int dn_dummy_hwclk(int, struct rtc_time *);
31extern int dn_dummy_set_clock_mmss(unsigned long); 31extern int dn_dummy_set_clock_mmss(unsigned long);
32extern void dn_dummy_reset(void); 32extern void dn_dummy_reset(void);
@@ -151,7 +151,7 @@ void __init config_apollo(void)
151 151
152 mach_sched_init=dn_sched_init; /* */ 152 mach_sched_init=dn_sched_init; /* */
153 mach_init_IRQ=dn_init_IRQ; 153 mach_init_IRQ=dn_init_IRQ;
154 mach_gettimeoffset = dn_gettimeoffset; 154 arch_gettimeoffset = dn_gettimeoffset;
155 mach_max_dma_address = 0xffffffff; 155 mach_max_dma_address = 0xffffffff;
156 mach_hwclk = dn_dummy_hwclk; /* */ 156 mach_hwclk = dn_dummy_hwclk; /* */
157 mach_set_clock_mmss = dn_dummy_set_clock_mmss; /* */ 157 mach_set_clock_mmss = dn_dummy_set_clock_mmss; /* */
@@ -203,10 +203,9 @@ void dn_sched_init(irq_handler_t timer_routine)
203 pr_err("Couldn't register timer interrupt\n"); 203 pr_err("Couldn't register timer interrupt\n");
204} 204}
205 205
206unsigned long dn_gettimeoffset(void) { 206u32 dn_gettimeoffset(void)
207 207{
208 return 0xdeadbeef; 208 return 0xdeadbeef;
209
210} 209}
211 210
212int dn_dummy_hwclk(int op, struct rtc_time *t) { 211int dn_dummy_hwclk(int op, struct rtc_time *t) {
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
index d8eb32747ac5..037c11c99331 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -74,7 +74,7 @@ static void atari_heartbeat(int on);
74 74
75/* atari specific timer functions (in time.c) */ 75/* atari specific timer functions (in time.c) */
76extern void atari_sched_init(irq_handler_t); 76extern void atari_sched_init(irq_handler_t);
77extern unsigned long atari_gettimeoffset (void); 77extern u32 atari_gettimeoffset(void);
78extern int atari_mste_hwclk (int, struct rtc_time *); 78extern int atari_mste_hwclk (int, struct rtc_time *);
79extern int atari_tt_hwclk (int, struct rtc_time *); 79extern int atari_tt_hwclk (int, struct rtc_time *);
80extern int atari_mste_set_clock_mmss (unsigned long); 80extern int atari_mste_set_clock_mmss (unsigned long);
@@ -204,7 +204,7 @@ void __init config_atari(void)
204 mach_init_IRQ = atari_init_IRQ; 204 mach_init_IRQ = atari_init_IRQ;
205 mach_get_model = atari_get_model; 205 mach_get_model = atari_get_model;
206 mach_get_hardware_list = atari_get_hardware_list; 206 mach_get_hardware_list = atari_get_hardware_list;
207 mach_gettimeoffset = atari_gettimeoffset; 207 arch_gettimeoffset = atari_gettimeoffset;
208 mach_reset = atari_reset; 208 mach_reset = atari_reset;
209 mach_max_dma_address = 0xffffff; 209 mach_max_dma_address = 0xffffff;
210#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) 210#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
diff --git a/arch/m68k/atari/time.c b/arch/m68k/atari/time.c
index c0cc68a2c829..da8f981c36d6 100644
--- a/arch/m68k/atari/time.c
+++ b/arch/m68k/atari/time.c
@@ -42,9 +42,9 @@ atari_sched_init(irq_handler_t timer_routine)
42#define TICK_SIZE 10000 42#define TICK_SIZE 10000
43 43
44/* This is always executed with interrupts disabled. */ 44/* This is always executed with interrupts disabled. */
45unsigned long atari_gettimeoffset (void) 45u32 atari_gettimeoffset(void)
46{ 46{
47 unsigned long ticks, offset = 0; 47 u32 ticks, offset = 0;
48 48
49 /* read MFP timer C current value */ 49 /* read MFP timer C current value */
50 ticks = st_mfp.tim_dt_c; 50 ticks = st_mfp.tim_dt_c;
@@ -57,7 +57,7 @@ unsigned long atari_gettimeoffset (void)
57 ticks = INT_TICKS - ticks; 57 ticks = INT_TICKS - ticks;
58 ticks = ticks * 10000L / INT_TICKS; 58 ticks = ticks * 10000L / INT_TICKS;
59 59
60 return ticks + offset; 60 return (ticks + offset) * 1000;
61} 61}
62 62
63 63
diff --git a/arch/m68k/bvme6000/config.c b/arch/m68k/bvme6000/config.c
index 0bf850a20ea2..8943aa4c18e6 100644
--- a/arch/m68k/bvme6000/config.c
+++ b/arch/m68k/bvme6000/config.c
@@ -38,7 +38,7 @@
38 38
39static void bvme6000_get_model(char *model); 39static void bvme6000_get_model(char *model);
40extern void bvme6000_sched_init(irq_handler_t handler); 40extern void bvme6000_sched_init(irq_handler_t handler);
41extern unsigned long bvme6000_gettimeoffset (void); 41extern u32 bvme6000_gettimeoffset(void);
42extern int bvme6000_hwclk (int, struct rtc_time *); 42extern int bvme6000_hwclk (int, struct rtc_time *);
43extern int bvme6000_set_clock_mmss (unsigned long); 43extern int bvme6000_set_clock_mmss (unsigned long);
44extern void bvme6000_reset (void); 44extern void bvme6000_reset (void);
@@ -110,7 +110,7 @@ void __init config_bvme6000(void)
110 mach_max_dma_address = 0xffffffff; 110 mach_max_dma_address = 0xffffffff;
111 mach_sched_init = bvme6000_sched_init; 111 mach_sched_init = bvme6000_sched_init;
112 mach_init_IRQ = bvme6000_init_IRQ; 112 mach_init_IRQ = bvme6000_init_IRQ;
113 mach_gettimeoffset = bvme6000_gettimeoffset; 113 arch_gettimeoffset = bvme6000_gettimeoffset;
114 mach_hwclk = bvme6000_hwclk; 114 mach_hwclk = bvme6000_hwclk;
115 mach_set_clock_mmss = bvme6000_set_clock_mmss; 115 mach_set_clock_mmss = bvme6000_set_clock_mmss;
116 mach_reset = bvme6000_reset; 116 mach_reset = bvme6000_reset;
@@ -216,13 +216,13 @@ void bvme6000_sched_init (irq_handler_t timer_routine)
216 * results... 216 * results...
217 */ 217 */
218 218
219unsigned long bvme6000_gettimeoffset (void) 219u32 bvme6000_gettimeoffset(void)
220{ 220{
221 volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE; 221 volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE;
222 volatile PitRegsPtr pit = (PitRegsPtr)BVME_PIT_BASE; 222 volatile PitRegsPtr pit = (PitRegsPtr)BVME_PIT_BASE;
223 unsigned char msr = rtc->msr & 0xc0; 223 unsigned char msr = rtc->msr & 0xc0;
224 unsigned char t1int, t1op; 224 unsigned char t1int, t1op;
225 unsigned long v = 800000, ov; 225 u32 v = 800000, ov;
226 226
227 rtc->msr = 0; /* Ensure timer registers accessible */ 227 rtc->msr = 0; /* Ensure timer registers accessible */
228 228
@@ -246,7 +246,7 @@ unsigned long bvme6000_gettimeoffset (void)
246 v += 10000; /* Int pending, + 10ms */ 246 v += 10000; /* Int pending, + 10ms */
247 rtc->msr = msr; 247 rtc->msr = msr;
248 248
249 return v; 249 return v * 1000;
250} 250}
251 251
252/* 252/*
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/hp300/config.c b/arch/m68k/hp300/config.c
index bf16af1edacf..b7609f791522 100644
--- a/arch/m68k/hp300/config.c
+++ b/arch/m68k/hp300/config.c
@@ -251,7 +251,7 @@ void __init config_hp300(void)
251 mach_sched_init = hp300_sched_init; 251 mach_sched_init = hp300_sched_init;
252 mach_init_IRQ = hp300_init_IRQ; 252 mach_init_IRQ = hp300_init_IRQ;
253 mach_get_model = hp300_get_model; 253 mach_get_model = hp300_get_model;
254 mach_gettimeoffset = hp300_gettimeoffset; 254 arch_gettimeoffset = hp300_gettimeoffset;
255 mach_hwclk = hp300_hwclk; 255 mach_hwclk = hp300_hwclk;
256 mach_get_ss = hp300_get_ss; 256 mach_get_ss = hp300_get_ss;
257 mach_reset = hp300_reset; 257 mach_reset = hp300_reset;
diff --git a/arch/m68k/hp300/time.c b/arch/m68k/hp300/time.c
index 29a71be9fa5b..749543b425a4 100644
--- a/arch/m68k/hp300/time.c
+++ b/arch/m68k/hp300/time.c
@@ -46,7 +46,7 @@ static irqreturn_t hp300_tick(int irq, void *dev_id)
46 return vector(irq, NULL); 46 return vector(irq, NULL);
47} 47}
48 48
49unsigned long hp300_gettimeoffset(void) 49u32 hp300_gettimeoffset(void)
50{ 50{
51 /* Read current timer 1 value */ 51 /* Read current timer 1 value */
52 unsigned char lsb, msb1, msb2; 52 unsigned char lsb, msb1, msb2;
@@ -59,7 +59,7 @@ unsigned long hp300_gettimeoffset(void)
59 /* A carry happened while we were reading. Read it again */ 59 /* A carry happened while we were reading. Read it again */
60 lsb = in_8(CLOCKBASE + 7); 60 lsb = in_8(CLOCKBASE + 7);
61 ticks = INTVAL - ((msb2 << 8) | lsb); 61 ticks = INTVAL - ((msb2 << 8) | lsb);
62 return (USECS_PER_JIFFY * ticks) / INTVAL; 62 return ((USECS_PER_JIFFY * ticks) / INTVAL) * 1000;
63} 63}
64 64
65void __init hp300_sched_init(irq_handler_t vector) 65void __init hp300_sched_init(irq_handler_t vector)
diff --git a/arch/m68k/hp300/time.h b/arch/m68k/hp300/time.h
index 7b98242960de..f5583ec4033d 100644
--- a/arch/m68k/hp300/time.h
+++ b/arch/m68k/hp300/time.h
@@ -1,2 +1,2 @@
1extern void hp300_sched_init(irq_handler_t vector); 1extern void hp300_sched_init(irq_handler_t vector);
2extern unsigned long hp300_gettimeoffset(void); 2extern u32 hp300_gettimeoffset(void);
diff --git a/arch/m68k/include/asm/dma-mapping.h b/arch/m68k/include/asm/dma-mapping.h
index 17f7a45948ea..3e6b8445af6a 100644
--- a/arch/m68k/include/asm/dma-mapping.h
+++ b/arch/m68k/include/asm/dma-mapping.h
@@ -21,6 +21,22 @@ extern void *dma_alloc_coherent(struct device *, size_t,
21extern void dma_free_coherent(struct device *, size_t, 21extern void dma_free_coherent(struct device *, size_t,
22 void *, dma_addr_t); 22 void *, dma_addr_t);
23 23
24static inline void *dma_alloc_attrs(struct device *dev, size_t size,
25 dma_addr_t *dma_handle, gfp_t flag,
26 struct dma_attrs *attrs)
27{
28 /* attrs is not supported and ignored */
29 return dma_alloc_coherent(dev, size, dma_handle, flag);
30}
31
32static inline void dma_free_attrs(struct device *dev, size_t size,
33 void *cpu_addr, dma_addr_t dma_handle,
34 struct dma_attrs *attrs)
35{
36 /* attrs is not supported and ignored */
37 dma_free_coherent(dev, size, cpu_addr, dma_handle);
38}
39
24static inline void *dma_alloc_noncoherent(struct device *dev, size_t size, 40static inline void *dma_alloc_noncoherent(struct device *dev, size_t size,
25 dma_addr_t *handle, gfp_t flag) 41 dma_addr_t *handle, gfp_t flag)
26{ 42{
diff --git a/arch/m68k/include/asm/machdep.h b/arch/m68k/include/asm/machdep.h
index 825c1c813196..953ca21da8ee 100644
--- a/arch/m68k/include/asm/machdep.h
+++ b/arch/m68k/include/asm/machdep.h
@@ -3,6 +3,7 @@
3 3
4#include <linux/seq_file.h> 4#include <linux/seq_file.h>
5#include <linux/interrupt.h> 5#include <linux/interrupt.h>
6#include <linux/time.h>
6 7
7struct pt_regs; 8struct pt_regs;
8struct mktime; 9struct mktime;
@@ -16,7 +17,6 @@ extern void (*mach_init_IRQ) (void);
16extern void (*mach_get_model) (char *model); 17extern void (*mach_get_model) (char *model);
17extern void (*mach_get_hardware_list) (struct seq_file *m); 18extern void (*mach_get_hardware_list) (struct seq_file *m);
18/* machine dependent timer functions */ 19/* machine dependent timer functions */
19extern unsigned long (*mach_gettimeoffset)(void);
20extern int (*mach_hwclk)(int, struct rtc_time*); 20extern int (*mach_hwclk)(int, struct rtc_time*);
21extern unsigned int (*mach_get_ss)(void); 21extern unsigned int (*mach_get_ss)(void);
22extern int (*mach_get_rtc_pll)(struct rtc_pll_info *); 22extern int (*mach_get_rtc_pll)(struct rtc_pll_info *);
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/include/asm/pgtable_no.h b/arch/m68k/include/asm/pgtable_no.h
index bf86b29fe64a..037028f4ab70 100644
--- a/arch/m68k/include/asm/pgtable_no.h
+++ b/arch/m68k/include/asm/pgtable_no.h
@@ -64,6 +64,8 @@ extern unsigned int kobjsize(const void *objp);
64 */ 64 */
65#define VMALLOC_START 0 65#define VMALLOC_START 0
66#define VMALLOC_END 0xffffffff 66#define VMALLOC_END 0xffffffff
67#define KMAP_START 0
68#define KMAP_END 0xffffffff
67 69
68#include <asm-generic/pgtable.h> 70#include <asm-generic/pgtable.h>
69 71
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h
index 847994ce6804..f9337f614660 100644
--- a/arch/m68k/include/asm/unistd.h
+++ b/arch/m68k/include/asm/unistd.h
@@ -4,7 +4,7 @@
4#include <uapi/asm/unistd.h> 4#include <uapi/asm/unistd.h>
5 5
6 6
7#define NR_syscalls 348 7#define NR_syscalls 349
8 8
9#define __ARCH_WANT_OLD_READDIR 9#define __ARCH_WANT_OLD_READDIR
10#define __ARCH_WANT_OLD_STAT 10#define __ARCH_WANT_OLD_STAT
diff --git a/arch/m68k/include/uapi/asm/unistd.h b/arch/m68k/include/uapi/asm/unistd.h
index b94bfbf90705..625f321001dc 100644
--- a/arch/m68k/include/uapi/asm/unistd.h
+++ b/arch/m68k/include/uapi/asm/unistd.h
@@ -353,5 +353,6 @@
353#define __NR_process_vm_readv 345 353#define __NR_process_vm_readv 345
354#define __NR_process_vm_writev 346 354#define __NR_process_vm_writev 346
355#define __NR_kcmp 347 355#define __NR_kcmp 347
356#define __NR_finit_module 348
356 357
357#endif /* _UAPI_ASM_M68K_UNISTD_H_ */ 358#endif /* _UAPI_ASM_M68K_UNISTD_H_ */
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/m68k/kernel/setup_mm.c b/arch/m68k/kernel/setup_mm.c
index d872ce4807c9..80cfbe56ea32 100644
--- a/arch/m68k/kernel/setup_mm.c
+++ b/arch/m68k/kernel/setup_mm.c
@@ -84,7 +84,6 @@ void (*mach_init_IRQ) (void) __initdata = NULL;
84void (*mach_get_model) (char *model); 84void (*mach_get_model) (char *model);
85void (*mach_get_hardware_list) (struct seq_file *m); 85void (*mach_get_hardware_list) (struct seq_file *m);
86/* machine dependent timer functions */ 86/* machine dependent timer functions */
87unsigned long (*mach_gettimeoffset) (void);
88int (*mach_hwclk) (int, struct rtc_time*); 87int (*mach_hwclk) (int, struct rtc_time*);
89EXPORT_SYMBOL(mach_hwclk); 88EXPORT_SYMBOL(mach_hwclk);
90int (*mach_set_clock_mmss) (unsigned long); 89int (*mach_set_clock_mmss) (unsigned long);
diff --git a/arch/m68k/kernel/syscalltable.S b/arch/m68k/kernel/syscalltable.S
index c30da5b3f2db..3f04ea0ab802 100644
--- a/arch/m68k/kernel/syscalltable.S
+++ b/arch/m68k/kernel/syscalltable.S
@@ -368,4 +368,5 @@ ENTRY(sys_call_table)
368 .long sys_process_vm_readv /* 345 */ 368 .long sys_process_vm_readv /* 345 */
369 .long sys_process_vm_writev 369 .long sys_process_vm_writev
370 .long sys_kcmp 370 .long sys_kcmp
371 .long sys_finit_module
371 372
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c
index 5d0bcaad2e55..bea6bcf8f9b8 100644
--- a/arch/m68k/kernel/time.c
+++ b/arch/m68k/kernel/time.c
@@ -80,18 +80,8 @@ void read_persistent_clock(struct timespec *ts)
80 } 80 }
81} 81}
82 82
83void __init time_init(void)
84{
85 mach_sched_init(timer_interrupt);
86}
87
88#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET 83#ifdef CONFIG_ARCH_USES_GETTIMEOFFSET
89 84
90u32 arch_gettimeoffset(void)
91{
92 return mach_gettimeoffset() * 1000;
93}
94
95static int __init rtc_init(void) 85static int __init rtc_init(void)
96{ 86{
97 struct platform_device *pdev; 87 struct platform_device *pdev;
@@ -106,3 +96,8 @@ static int __init rtc_init(void)
106module_init(rtc_init); 96module_init(rtc_init);
107 97
108#endif /* CONFIG_ARCH_USES_GETTIMEOFFSET */ 98#endif /* CONFIG_ARCH_USES_GETTIMEOFFSET */
99
100void __init time_init(void)
101{
102 mach_sched_init(timer_interrupt);
103}
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index d9f62e0f46c0..afb95d5fb26b 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -52,7 +52,7 @@ struct mac_booter_data mac_bi_data;
52static unsigned long mac_orig_videoaddr; 52static unsigned long mac_orig_videoaddr;
53 53
54/* Mac specific timer functions */ 54/* Mac specific timer functions */
55extern unsigned long mac_gettimeoffset(void); 55extern u32 mac_gettimeoffset(void);
56extern int mac_hwclk(int, struct rtc_time *); 56extern int mac_hwclk(int, struct rtc_time *);
57extern int mac_set_clock_mmss(unsigned long); 57extern int mac_set_clock_mmss(unsigned long);
58extern void iop_preinit(void); 58extern void iop_preinit(void);
@@ -177,7 +177,7 @@ void __init config_mac(void)
177 mach_sched_init = mac_sched_init; 177 mach_sched_init = mac_sched_init;
178 mach_init_IRQ = mac_init_IRQ; 178 mach_init_IRQ = mac_init_IRQ;
179 mach_get_model = mac_get_model; 179 mach_get_model = mac_get_model;
180 mach_gettimeoffset = mac_gettimeoffset; 180 arch_gettimeoffset = mac_gettimeoffset;
181 mach_hwclk = mac_hwclk; 181 mach_hwclk = mac_hwclk;
182 mach_set_clock_mmss = mac_set_clock_mmss; 182 mach_set_clock_mmss = mac_set_clock_mmss;
183 mach_reset = mac_reset; 183 mach_reset = mac_reset;
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index 2d85662715fb..5d1458bb871b 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -327,7 +327,7 @@ void via_debug_dump(void)
327 * TBI: get time offset between scheduling timer ticks 327 * TBI: get time offset between scheduling timer ticks
328 */ 328 */
329 329
330unsigned long mac_gettimeoffset (void) 330u32 mac_gettimeoffset(void)
331{ 331{
332 unsigned long ticks, offset = 0; 332 unsigned long ticks, offset = 0;
333 333
@@ -341,7 +341,7 @@ unsigned long mac_gettimeoffset (void)
341 ticks = MAC_CLOCK_TICK - ticks; 341 ticks = MAC_CLOCK_TICK - ticks;
342 ticks = ticks * 10000L / MAC_CLOCK_TICK; 342 ticks = ticks * 10000L / MAC_CLOCK_TICK;
343 343
344 return ticks + offset; 344 return (ticks + offset) * 1000;
345} 345}
346 346
347/* 347/*
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c
index f0e05bce92f2..afd8106fd83b 100644
--- a/arch/m68k/mm/init.c
+++ b/arch/m68k/mm/init.c
@@ -39,6 +39,11 @@
39void *empty_zero_page; 39void *empty_zero_page;
40EXPORT_SYMBOL(empty_zero_page); 40EXPORT_SYMBOL(empty_zero_page);
41 41
42#if !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
43extern void init_pointer_table(unsigned long ptable);
44extern pmd_t *zero_pgtable;
45#endif
46
42#ifdef CONFIG_MMU 47#ifdef CONFIG_MMU
43 48
44pg_data_t pg_data_map[MAX_NUMNODES]; 49pg_data_t pg_data_map[MAX_NUMNODES];
@@ -69,9 +74,6 @@ void __init m68k_setup_node(int node)
69 node_set_online(node); 74 node_set_online(node);
70} 75}
71 76
72extern void init_pointer_table(unsigned long ptable);
73extern pmd_t *zero_pgtable;
74
75#else /* CONFIG_MMU */ 77#else /* CONFIG_MMU */
76 78
77/* 79/*
diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c
index a41c09149e23..1c6262803b94 100644
--- a/arch/m68k/mvme147/config.c
+++ b/arch/m68k/mvme147/config.c
@@ -37,7 +37,7 @@
37 37
38static void mvme147_get_model(char *model); 38static void mvme147_get_model(char *model);
39extern void mvme147_sched_init(irq_handler_t handler); 39extern void mvme147_sched_init(irq_handler_t handler);
40extern unsigned long mvme147_gettimeoffset (void); 40extern u32 mvme147_gettimeoffset(void);
41extern int mvme147_hwclk (int, struct rtc_time *); 41extern int mvme147_hwclk (int, struct rtc_time *);
42extern int mvme147_set_clock_mmss (unsigned long); 42extern int mvme147_set_clock_mmss (unsigned long);
43extern void mvme147_reset (void); 43extern void mvme147_reset (void);
@@ -88,7 +88,7 @@ void __init config_mvme147(void)
88 mach_max_dma_address = 0x01000000; 88 mach_max_dma_address = 0x01000000;
89 mach_sched_init = mvme147_sched_init; 89 mach_sched_init = mvme147_sched_init;
90 mach_init_IRQ = mvme147_init_IRQ; 90 mach_init_IRQ = mvme147_init_IRQ;
91 mach_gettimeoffset = mvme147_gettimeoffset; 91 arch_gettimeoffset = mvme147_gettimeoffset;
92 mach_hwclk = mvme147_hwclk; 92 mach_hwclk = mvme147_hwclk;
93 mach_set_clock_mmss = mvme147_set_clock_mmss; 93 mach_set_clock_mmss = mvme147_set_clock_mmss;
94 mach_reset = mvme147_reset; 94 mach_reset = mvme147_reset;
@@ -127,7 +127,7 @@ void mvme147_sched_init (irq_handler_t timer_routine)
127 127
128/* This is always executed with interrupts disabled. */ 128/* This is always executed with interrupts disabled. */
129/* XXX There are race hazards in this code XXX */ 129/* XXX There are race hazards in this code XXX */
130unsigned long mvme147_gettimeoffset (void) 130u32 mvme147_gettimeoffset(void)
131{ 131{
132 volatile unsigned short *cp = (volatile unsigned short *)0xfffe1012; 132 volatile unsigned short *cp = (volatile unsigned short *)0xfffe1012;
133 unsigned short n; 133 unsigned short n;
@@ -137,7 +137,7 @@ unsigned long mvme147_gettimeoffset (void)
137 n = *cp; 137 n = *cp;
138 138
139 n -= PCC_TIMER_PRELOAD; 139 n -= PCC_TIMER_PRELOAD;
140 return (unsigned long)n * 25 / 4; 140 return ((unsigned long)n * 25 / 4) * 1000;
141} 141}
142 142
143static int bcd2int (unsigned char b) 143static int bcd2int (unsigned char b)
diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c
index b6d7d8a7a3dd..080a342458a1 100644
--- a/arch/m68k/mvme16x/config.c
+++ b/arch/m68k/mvme16x/config.c
@@ -43,7 +43,7 @@ static MK48T08ptr_t volatile rtc = (MK48T08ptr_t)MVME_RTC_BASE;
43 43
44static void mvme16x_get_model(char *model); 44static void mvme16x_get_model(char *model);
45extern void mvme16x_sched_init(irq_handler_t handler); 45extern void mvme16x_sched_init(irq_handler_t handler);
46extern unsigned long mvme16x_gettimeoffset (void); 46extern u32 mvme16x_gettimeoffset(void);
47extern int mvme16x_hwclk (int, struct rtc_time *); 47extern int mvme16x_hwclk (int, struct rtc_time *);
48extern int mvme16x_set_clock_mmss (unsigned long); 48extern int mvme16x_set_clock_mmss (unsigned long);
49extern void mvme16x_reset (void); 49extern void mvme16x_reset (void);
@@ -289,7 +289,7 @@ void __init config_mvme16x(void)
289 mach_max_dma_address = 0xffffffff; 289 mach_max_dma_address = 0xffffffff;
290 mach_sched_init = mvme16x_sched_init; 290 mach_sched_init = mvme16x_sched_init;
291 mach_init_IRQ = mvme16x_init_IRQ; 291 mach_init_IRQ = mvme16x_init_IRQ;
292 mach_gettimeoffset = mvme16x_gettimeoffset; 292 arch_gettimeoffset = mvme16x_gettimeoffset;
293 mach_hwclk = mvme16x_hwclk; 293 mach_hwclk = mvme16x_hwclk;
294 mach_set_clock_mmss = mvme16x_set_clock_mmss; 294 mach_set_clock_mmss = mvme16x_set_clock_mmss;
295 mach_reset = mvme16x_reset; 295 mach_reset = mvme16x_reset;
@@ -405,9 +405,9 @@ void mvme16x_sched_init (irq_handler_t timer_routine)
405 405
406 406
407/* This is always executed with interrupts disabled. */ 407/* This is always executed with interrupts disabled. */
408unsigned long mvme16x_gettimeoffset (void) 408u32 mvme16x_gettimeoffset(void)
409{ 409{
410 return (*(volatile unsigned long *)0xfff42008); 410 return (*(volatile u32 *)0xfff42008) * 1000;
411} 411}
412 412
413int bcd2int (unsigned char b) 413int bcd2int (unsigned char b)
diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c
index 1adb5b7b0d1a..658542b914fc 100644
--- a/arch/m68k/q40/config.c
+++ b/arch/m68k/q40/config.c
@@ -40,7 +40,7 @@ extern void q40_init_IRQ(void);
40static void q40_get_model(char *model); 40static void q40_get_model(char *model);
41extern void q40_sched_init(irq_handler_t handler); 41extern void q40_sched_init(irq_handler_t handler);
42 42
43static unsigned long q40_gettimeoffset(void); 43static u32 q40_gettimeoffset(void);
44static int q40_hwclk(int, struct rtc_time *); 44static int q40_hwclk(int, struct rtc_time *);
45static unsigned int q40_get_ss(void); 45static unsigned int q40_get_ss(void);
46static int q40_set_clock_mmss(unsigned long); 46static int q40_set_clock_mmss(unsigned long);
@@ -170,7 +170,7 @@ void __init config_q40(void)
170 mach_sched_init = q40_sched_init; 170 mach_sched_init = q40_sched_init;
171 171
172 mach_init_IRQ = q40_init_IRQ; 172 mach_init_IRQ = q40_init_IRQ;
173 mach_gettimeoffset = q40_gettimeoffset; 173 arch_gettimeoffset = q40_gettimeoffset;
174 mach_hwclk = q40_hwclk; 174 mach_hwclk = q40_hwclk;
175 mach_get_ss = q40_get_ss; 175 mach_get_ss = q40_get_ss;
176 mach_get_rtc_pll = q40_get_rtc_pll; 176 mach_get_rtc_pll = q40_get_rtc_pll;
@@ -204,9 +204,9 @@ int q40_parse_bootinfo(const struct bi_record *rec)
204} 204}
205 205
206 206
207static unsigned long q40_gettimeoffset(void) 207static u32 q40_gettimeoffset(void)
208{ 208{
209 return 5000 * (ql_ticks != 0); 209 return 5000 * (ql_ticks != 0) * 1000;
210} 210}
211 211
212 212
diff --git a/arch/m68k/sun3/config.c b/arch/m68k/sun3/config.c
index 2ca25bd01a96..f59ec58083f8 100644
--- a/arch/m68k/sun3/config.c
+++ b/arch/m68k/sun3/config.c
@@ -36,7 +36,7 @@
36 36
37char sun3_reserved_pmeg[SUN3_PMEGS_NUM]; 37char sun3_reserved_pmeg[SUN3_PMEGS_NUM];
38 38
39extern unsigned long sun3_gettimeoffset(void); 39extern u32 sun3_gettimeoffset(void);
40static void sun3_sched_init(irq_handler_t handler); 40static void sun3_sched_init(irq_handler_t handler);
41extern void sun3_get_model (char* model); 41extern void sun3_get_model (char* model);
42extern int sun3_hwclk(int set, struct rtc_time *t); 42extern int sun3_hwclk(int set, struct rtc_time *t);
@@ -141,7 +141,7 @@ void __init config_sun3(void)
141 mach_sched_init = sun3_sched_init; 141 mach_sched_init = sun3_sched_init;
142 mach_init_IRQ = sun3_init_IRQ; 142 mach_init_IRQ = sun3_init_IRQ;
143 mach_reset = sun3_reboot; 143 mach_reset = sun3_reboot;
144 mach_gettimeoffset = sun3_gettimeoffset; 144 arch_gettimeoffset = sun3_gettimeoffset;
145 mach_get_model = sun3_get_model; 145 mach_get_model = sun3_get_model;
146 mach_hwclk = sun3_hwclk; 146 mach_hwclk = sun3_hwclk;
147 mach_halt = sun3_halt; 147 mach_halt = sun3_halt;
diff --git a/arch/m68k/sun3/intersil.c b/arch/m68k/sun3/intersil.c
index 94fe8016f1f0..889829e11f1d 100644
--- a/arch/m68k/sun3/intersil.c
+++ b/arch/m68k/sun3/intersil.c
@@ -23,9 +23,9 @@
23#define START_VAL (INTERSIL_RUN | INTERSIL_INT_ENABLE | INTERSIL_24H_MODE) 23#define START_VAL (INTERSIL_RUN | INTERSIL_INT_ENABLE | INTERSIL_24H_MODE)
24 24
25/* does this need to be implemented? */ 25/* does this need to be implemented? */
26unsigned long sun3_gettimeoffset(void) 26u32 sun3_gettimeoffset(void)
27{ 27{
28 return 1; 28 return 1000;
29} 29}
30 30
31 31
diff --git a/arch/m68k/sun3x/config.c b/arch/m68k/sun3x/config.c
index dd306c84d36d..0532d64d191e 100644
--- a/arch/m68k/sun3x/config.c
+++ b/arch/m68k/sun3x/config.c
@@ -48,7 +48,7 @@ void __init config_sun3x(void)
48 mach_sched_init = sun3x_sched_init; 48 mach_sched_init = sun3x_sched_init;
49 mach_init_IRQ = sun3_init_IRQ; 49 mach_init_IRQ = sun3_init_IRQ;
50 50
51 mach_gettimeoffset = sun3x_gettimeoffset; 51 arch_gettimeoffset = sun3x_gettimeoffset;
52 mach_reset = sun3x_reboot; 52 mach_reset = sun3x_reboot;
53 53
54 mach_hwclk = sun3x_hwclk; 54 mach_hwclk = sun3x_hwclk;
diff --git a/arch/m68k/sun3x/time.c b/arch/m68k/sun3x/time.c
index 1d0a72480409..c8eb08add6b0 100644
--- a/arch/m68k/sun3x/time.c
+++ b/arch/m68k/sun3x/time.c
@@ -71,7 +71,7 @@ int sun3x_hwclk(int set, struct rtc_time *t)
71 return 0; 71 return 0;
72} 72}
73/* Not much we can do here */ 73/* Not much we can do here */
74unsigned long sun3x_gettimeoffset (void) 74u32 sun3x_gettimeoffset(void)
75{ 75{
76 return 0L; 76 return 0L;
77} 77}
diff --git a/arch/m68k/sun3x/time.h b/arch/m68k/sun3x/time.h
index 6909e1297534..a4f9126be7e2 100644
--- a/arch/m68k/sun3x/time.h
+++ b/arch/m68k/sun3x/time.h
@@ -2,7 +2,7 @@
2#define SUN3X_TIME_H 2#define SUN3X_TIME_H
3 3
4extern int sun3x_hwclk(int set, struct rtc_time *t); 4extern int sun3x_hwclk(int set, struct rtc_time *t);
5unsigned long sun3x_gettimeoffset (void); 5u32 sun3x_gettimeoffset(void);
6void sun3x_sched_init(irq_handler_t vector); 6void sun3x_sched_init(irq_handler_t vector);
7 7
8struct mostek_dt { 8struct mostek_dt {
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/Kconfig b/arch/mn10300/Kconfig
index aa03f2e13385..e70001cfa05b 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -6,6 +6,7 @@ config MN10300
6 select ARCH_WANT_IPC_PARSE_VERSION 6 select ARCH_WANT_IPC_PARSE_VERSION
7 select HAVE_ARCH_TRACEHOOK 7 select HAVE_ARCH_TRACEHOOK
8 select HAVE_ARCH_KGDB 8 select HAVE_ARCH_KGDB
9 select GENERIC_ATOMIC64
9 select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER 10 select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER
10 select GENERIC_CLOCKEVENTS 11 select GENERIC_CLOCKEVENTS
11 select MODULES_USE_ELF_RELA 12 select MODULES_USE_ELF_RELA
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/entry.S b/arch/parisc/kernel/entry.S
index bfb44247d7a7..eb7850b46c25 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -1865,7 +1865,7 @@ syscall_restore:
1865 1865
1866 /* Are we being ptraced? */ 1866 /* Are we being ptraced? */
1867 ldw TASK_FLAGS(%r1),%r19 1867 ldw TASK_FLAGS(%r1),%r19
1868 ldi (_TIF_SINGLESTEP|_TIF_BLOCKSTEP),%r2 1868 ldi _TIF_SYSCALL_TRACE_MASK,%r2
1869 and,COND(=) %r19,%r2,%r0 1869 and,COND(=) %r19,%r2,%r0
1870 b,n syscall_restore_rfi 1870 b,n syscall_restore_rfi
1871 1871
@@ -1978,15 +1978,23 @@ syscall_restore_rfi:
1978 /* sr2 should be set to zero for userspace syscalls */ 1978 /* sr2 should be set to zero for userspace syscalls */
1979 STREG %r0,TASK_PT_SR2(%r1) 1979 STREG %r0,TASK_PT_SR2(%r1)
1980 1980
1981pt_regs_ok:
1982 LDREG TASK_PT_GR31(%r1),%r2 1981 LDREG TASK_PT_GR31(%r1),%r2
1983 depi 3,31,2,%r2 /* ensure return to user mode. */ 1982 depi 3,31,2,%r2 /* ensure return to user mode. */
1984 STREG %r2,TASK_PT_IAOQ0(%r1) 1983 STREG %r2,TASK_PT_IAOQ0(%r1)
1985 ldo 4(%r2),%r2 1984 ldo 4(%r2),%r2
1986 STREG %r2,TASK_PT_IAOQ1(%r1) 1985 STREG %r2,TASK_PT_IAOQ1(%r1)
1986 b intr_restore
1987 copy %r25,%r16 1987 copy %r25,%r16
1988
1989pt_regs_ok:
1990 LDREG TASK_PT_IAOQ0(%r1),%r2
1991 depi 3,31,2,%r2 /* ensure return to user mode. */
1992 STREG %r2,TASK_PT_IAOQ0(%r1)
1993 LDREG TASK_PT_IAOQ1(%r1),%r2
1994 depi 3,31,2,%r2
1995 STREG %r2,TASK_PT_IAOQ1(%r1)
1988 b intr_restore 1996 b intr_restore
1989 nop 1997 copy %r25,%r16
1990 1998
1991 .import schedule,code 1999 .import schedule,code
1992syscall_do_resched: 2000syscall_do_resched:
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/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index c0b1affc06a8..0299d63cd112 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -410,11 +410,13 @@ void __init init_IRQ(void)
410{ 410{
411 local_irq_disable(); /* PARANOID - should already be disabled */ 411 local_irq_disable(); /* PARANOID - should already be disabled */
412 mtctl(~0UL, 23); /* EIRR : clear all pending external intr */ 412 mtctl(~0UL, 23); /* EIRR : clear all pending external intr */
413 claim_cpu_irqs();
414#ifdef CONFIG_SMP 413#ifdef CONFIG_SMP
415 if (!cpu_eiem) 414 if (!cpu_eiem) {
415 claim_cpu_irqs();
416 cpu_eiem = EIEM_MASK(IPI_IRQ) | EIEM_MASK(TIMER_IRQ); 416 cpu_eiem = EIEM_MASK(IPI_IRQ) | EIEM_MASK(TIMER_IRQ);
417 }
417#else 418#else
419 claim_cpu_irqs();
418 cpu_eiem = EIEM_MASK(TIMER_IRQ); 420 cpu_eiem = EIEM_MASK(TIMER_IRQ);
419#endif 421#endif
420 set_eiem(cpu_eiem); /* EIEM : enable all external intr */ 422 set_eiem(cpu_eiem); /* EIEM : enable all external intr */
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c
index 857c2f545470..534abd4936e1 100644
--- a/arch/parisc/kernel/ptrace.c
+++ b/arch/parisc/kernel/ptrace.c
@@ -26,7 +26,7 @@
26#include <asm/asm-offsets.h> 26#include <asm/asm-offsets.h>
27 27
28/* PSW bits we allow the debugger to modify */ 28/* PSW bits we allow the debugger to modify */
29#define USER_PSW_BITS (PSW_N | PSW_V | PSW_CB) 29#define USER_PSW_BITS (PSW_N | PSW_B | PSW_V | PSW_CB)
30 30
31/* 31/*
32 * Called by kernel/ptrace.c when detaching.. 32 * Called by kernel/ptrace.c when detaching..
diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c
index 537996955998..fd051705a407 100644
--- a/arch/parisc/kernel/signal.c
+++ b/arch/parisc/kernel/signal.c
@@ -190,8 +190,10 @@ get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
190 DBG(1,"get_sigframe: ka = %#lx, sp = %#lx, frame_size = %#lx\n", 190 DBG(1,"get_sigframe: ka = %#lx, sp = %#lx, frame_size = %#lx\n",
191 (unsigned long)ka, sp, frame_size); 191 (unsigned long)ka, sp, frame_size);
192 192
193 /* Align alternate stack and reserve 64 bytes for the signal
194 handler's frame marker. */
193 if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp)) 195 if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! sas_ss_flags(sp))
194 sp = current->sas_ss_sp; /* Stacks grow up! */ 196 sp = (current->sas_ss_sp + 0x7f) & ~0x3f; /* Stacks grow up! */
195 197
196 DBG(1,"get_sigframe: Returning sp = %#lx\n", (unsigned long)sp); 198 DBG(1,"get_sigframe: Returning sp = %#lx\n", (unsigned long)sp);
197 return (void __user *) sp; /* Stacks grow up. Fun. */ 199 return (void __user *) sp; /* Stacks grow up. Fun. */
diff --git a/arch/parisc/math-emu/cnv_float.h b/arch/parisc/math-emu/cnv_float.h
index 9071e093164a..933423fa5144 100644
--- a/arch/parisc/math-emu/cnv_float.h
+++ b/arch/parisc/math-emu/cnv_float.h
@@ -347,16 +347,15 @@
347 Sgl_isinexact_to_fix(sgl_value,exponent) 347 Sgl_isinexact_to_fix(sgl_value,exponent)
348 348
349#define Duint_from_sgl_mantissa(sgl_value,exponent,dresultA,dresultB) \ 349#define Duint_from_sgl_mantissa(sgl_value,exponent,dresultA,dresultB) \
350 {Sall(sgl_value) <<= SGL_EXP_LENGTH; /* left-justify */ \ 350 {unsigned int val = Sall(sgl_value) << SGL_EXP_LENGTH; \
351 if (exponent <= 31) { \ 351 if (exponent <= 31) { \
352 Dintp1(dresultA) = 0; \ 352 Dintp1(dresultA) = 0; \
353 Dintp2(dresultB) = (unsigned)Sall(sgl_value) >> (31 - exponent); \ 353 Dintp2(dresultB) = val >> (31 - exponent); \
354 } \ 354 } \
355 else { \ 355 else { \
356 Dintp1(dresultA) = Sall(sgl_value) >> (63 - exponent); \ 356 Dintp1(dresultA) = val >> (63 - exponent); \
357 Dintp2(dresultB) = Sall(sgl_value) << (exponent - 31); \ 357 Dintp2(dresultB) = exponent <= 62 ? val << (exponent - 31) : 0; \
358 } \ 358 } \
359 Sall(sgl_value) >>= SGL_EXP_LENGTH; /* return to original */ \
360 } 359 }
361 360
362#define Duint_setzero(dresultA,dresultB) \ 361#define Duint_setzero(dresultA,dresultB) \
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/include/uapi/asm/kvm_para.h b/arch/powerpc/include/uapi/asm/kvm_para.h
index ed0e0254b47f..e3af3286a068 100644
--- a/arch/powerpc/include/uapi/asm/kvm_para.h
+++ b/arch/powerpc/include/uapi/asm/kvm_para.h
@@ -78,7 +78,7 @@ struct kvm_vcpu_arch_shared {
78 78
79#define KVM_HCALL_TOKEN(num) _EV_HCALL_TOKEN(EV_KVM_VENDOR_ID, num) 79#define KVM_HCALL_TOKEN(num) _EV_HCALL_TOKEN(EV_KVM_VENDOR_ID, num)
80 80
81#include <uapi/asm/epapr_hcalls.h> 81#include <asm/epapr_hcalls.h>
82 82
83#define KVM_FEATURE_MAGIC_PAGE 1 83#define KVM_FEATURE_MAGIC_PAGE 1
84 84
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/kvm/book3s_hv_ras.c b/arch/powerpc/kvm/book3s_hv_ras.c
index 35f3cf0269b3..a353c485808c 100644
--- a/arch/powerpc/kvm/book3s_hv_ras.c
+++ b/arch/powerpc/kvm/book3s_hv_ras.c
@@ -79,7 +79,9 @@ static void flush_tlb_power7(struct kvm_vcpu *vcpu)
79static long kvmppc_realmode_mc_power7(struct kvm_vcpu *vcpu) 79static long kvmppc_realmode_mc_power7(struct kvm_vcpu *vcpu)
80{ 80{
81 unsigned long srr1 = vcpu->arch.shregs.msr; 81 unsigned long srr1 = vcpu->arch.shregs.msr;
82#ifdef CONFIG_PPC_POWERNV
82 struct opal_machine_check_event *opal_evt; 83 struct opal_machine_check_event *opal_evt;
84#endif
83 long handled = 1; 85 long handled = 1;
84 86
85 if (srr1 & SRR1_MC_LDSTERR) { 87 if (srr1 & SRR1_MC_LDSTERR) {
@@ -117,6 +119,7 @@ static long kvmppc_realmode_mc_power7(struct kvm_vcpu *vcpu)
117 handled = 0; 119 handled = 0;
118 } 120 }
119 121
122#ifdef CONFIG_PPC_POWERNV
120 /* 123 /*
121 * See if OPAL has already handled the condition. 124 * See if OPAL has already handled the condition.
122 * We assume that if the condition is recovered then OPAL 125 * We assume that if the condition is recovered then OPAL
@@ -131,6 +134,7 @@ static long kvmppc_realmode_mc_power7(struct kvm_vcpu *vcpu)
131 134
132 if (handled) 135 if (handled)
133 opal_evt->in_use = 0; 136 opal_evt->in_use = 0;
137#endif
134 138
135 return handled; 139 return handled;
136} 140}
diff --git a/arch/powerpc/kvm/emulate.c b/arch/powerpc/kvm/emulate.c
index b0855e5d8905..9d9cddc5b346 100644
--- a/arch/powerpc/kvm/emulate.c
+++ b/arch/powerpc/kvm/emulate.c
@@ -39,6 +39,7 @@
39#define OP_31_XOP_TRAP 4 39#define OP_31_XOP_TRAP 4
40#define OP_31_XOP_LWZX 23 40#define OP_31_XOP_LWZX 23
41#define OP_31_XOP_TRAP_64 68 41#define OP_31_XOP_TRAP_64 68
42#define OP_31_XOP_DCBF 86
42#define OP_31_XOP_LBZX 87 43#define OP_31_XOP_LBZX 87
43#define OP_31_XOP_STWX 151 44#define OP_31_XOP_STWX 151
44#define OP_31_XOP_STBX 215 45#define OP_31_XOP_STBX 215
@@ -374,6 +375,7 @@ int kvmppc_emulate_instruction(struct kvm_run *run, struct kvm_vcpu *vcpu)
374 emulated = kvmppc_emulate_mtspr(vcpu, sprn, rs); 375 emulated = kvmppc_emulate_mtspr(vcpu, sprn, rs);
375 break; 376 break;
376 377
378 case OP_31_XOP_DCBF:
377 case OP_31_XOP_DCBI: 379 case OP_31_XOP_DCBI:
378 /* Do nothing. The guest is performing dcbi because 380 /* Do nothing. The guest is performing dcbi because
379 * hardware DMA is not snooped by the dcache, but 381 * hardware DMA is not snooped by the dcache, but
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/Makefile b/arch/s390/Makefile
index 4b8e08b56f49..7e3ce78d4290 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -24,8 +24,8 @@ CHECKFLAGS += -D__s390__ -msize-long
24else 24else
25LD_BFD := elf64-s390 25LD_BFD := elf64-s390
26LDFLAGS := -m elf64_s390 26LDFLAGS := -m elf64_s390
27KBUILD_AFLAGS_MODULE += -fpic -D__PIC__ 27KBUILD_AFLAGS_MODULE += -fPIC
28KBUILD_CFLAGS_MODULE += -fpic -D__PIC__ 28KBUILD_CFLAGS_MODULE += -fPIC
29KBUILD_CFLAGS += -m64 29KBUILD_CFLAGS += -m64
30KBUILD_AFLAGS += -m64 30KBUILD_AFLAGS += -m64
31UTS_MACHINE := s390x 31UTS_MACHINE := s390x
diff --git a/arch/s390/include/asm/dma.h b/arch/s390/include/asm/dma.h
index de015d85e3e5..bb9bdcd20864 100644
--- a/arch/s390/include/asm/dma.h
+++ b/arch/s390/include/asm/dma.h
@@ -10,4 +10,10 @@
10 */ 10 */
11#define MAX_DMA_ADDRESS 0x80000000 11#define MAX_DMA_ADDRESS 0x80000000
12 12
13#ifdef CONFIG_PCI
14extern int isa_dma_bridge_buggy;
15#else
16#define isa_dma_bridge_buggy (0)
17#endif
18
13#endif /* _ASM_S390_DMA_H */ 19#endif /* _ASM_S390_DMA_H */
diff --git a/arch/s390/include/asm/io.h b/arch/s390/include/asm/io.h
index 16c3eb164f4f..27cb32185ce1 100644
--- a/arch/s390/include/asm/io.h
+++ b/arch/s390/include/asm/io.h
@@ -85,6 +85,11 @@ static inline void iounmap(volatile void __iomem *addr)
85#define __raw_writel zpci_write_u32 85#define __raw_writel zpci_write_u32
86#define __raw_writeq zpci_write_u64 86#define __raw_writeq zpci_write_u64
87 87
88#define readb_relaxed readb
89#define readw_relaxed readw
90#define readl_relaxed readl
91#define readq_relaxed readq
92
88#endif /* CONFIG_PCI */ 93#endif /* CONFIG_PCI */
89 94
90#include <asm-generic/io.h> 95#include <asm-generic/io.h>
diff --git a/arch/s390/include/asm/irq.h b/arch/s390/include/asm/irq.h
index e6972f85d2b0..7def77302d63 100644
--- a/arch/s390/include/asm/irq.h
+++ b/arch/s390/include/asm/irq.h
@@ -2,43 +2,61 @@
2#define _ASM_IRQ_H 2#define _ASM_IRQ_H
3 3
4#include <linux/hardirq.h> 4#include <linux/hardirq.h>
5#include <linux/percpu.h>
6#include <linux/cache.h>
5#include <linux/types.h> 7#include <linux/types.h>
6 8
7enum interruption_class { 9enum interruption_main_class {
8 EXTERNAL_INTERRUPT, 10 EXTERNAL_INTERRUPT,
9 IO_INTERRUPT, 11 IO_INTERRUPT,
10 EXTINT_CLK, 12 NR_IRQS
11 EXTINT_EXC, 13};
12 EXTINT_EMS, 14
13 EXTINT_TMR, 15enum interruption_class {
14 EXTINT_TLA, 16 IRQEXT_CLK,
15 EXTINT_PFL, 17 IRQEXT_EXC,
16 EXTINT_DSD, 18 IRQEXT_EMS,
17 EXTINT_VRT, 19 IRQEXT_TMR,
18 EXTINT_SCP, 20 IRQEXT_TLA,
19 EXTINT_IUC, 21 IRQEXT_PFL,
20 EXTINT_CMS, 22 IRQEXT_DSD,
21 EXTINT_CMC, 23 IRQEXT_VRT,
22 EXTINT_CMR, 24 IRQEXT_SCP,
23 IOINT_CIO, 25 IRQEXT_IUC,
24 IOINT_QAI, 26 IRQEXT_CMS,
25 IOINT_DAS, 27 IRQEXT_CMC,
26 IOINT_C15, 28 IRQEXT_CMR,
27 IOINT_C70, 29 IRQIO_CIO,
28 IOINT_TAP, 30 IRQIO_QAI,
29 IOINT_VMR, 31 IRQIO_DAS,
30 IOINT_LCS, 32 IRQIO_C15,
31 IOINT_CLW, 33 IRQIO_C70,
32 IOINT_CTC, 34 IRQIO_TAP,
33 IOINT_APB, 35 IRQIO_VMR,
34 IOINT_ADM, 36 IRQIO_LCS,
35 IOINT_CSC, 37 IRQIO_CLW,
36 IOINT_PCI, 38 IRQIO_CTC,
37 IOINT_MSI, 39 IRQIO_APB,
40 IRQIO_ADM,
41 IRQIO_CSC,
42 IRQIO_PCI,
43 IRQIO_MSI,
38 NMI_NMI, 44 NMI_NMI,
39 NR_IRQS, 45 CPU_RST,
46 NR_ARCH_IRQS
40}; 47};
41 48
49struct irq_stat {
50 unsigned int irqs[NR_ARCH_IRQS];
51};
52
53DECLARE_PER_CPU_SHARED_ALIGNED(struct irq_stat, irq_stat);
54
55static __always_inline void inc_irq_stat(enum interruption_class irq)
56{
57 __get_cpu_var(irq_stat).irqs[irq]++;
58}
59
42struct ext_code { 60struct ext_code {
43 unsigned short subcode; 61 unsigned short subcode;
44 unsigned short code; 62 unsigned short code;
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index c928dc1938f2..c1d7930a82f4 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -1387,10 +1387,7 @@ static inline int has_transparent_hugepage(void)
1387 1387
1388static inline unsigned long pmd_pfn(pmd_t pmd) 1388static inline unsigned long pmd_pfn(pmd_t pmd)
1389{ 1389{
1390 if (pmd_trans_huge(pmd)) 1390 return pmd_val(pmd) >> PAGE_SHIFT;
1391 return pmd_val(pmd) >> HPAGE_SHIFT;
1392 else
1393 return pmd_val(pmd) >> PAGE_SHIFT;
1394} 1391}
1395#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ 1392#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
1396 1393
diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h
index fba4d66788a2..4c060bb5b8ea 100644
--- a/arch/s390/include/asm/timex.h
+++ b/arch/s390/include/asm/timex.h
@@ -128,4 +128,32 @@ static inline unsigned long long get_clock_monotonic(void)
128 return get_clock_xt() - sched_clock_base_cc; 128 return get_clock_xt() - sched_clock_base_cc;
129} 129}
130 130
131/**
132 * tod_to_ns - convert a TOD format value to nanoseconds
133 * @todval: to be converted TOD format value
134 * Returns: number of nanoseconds that correspond to the TOD format value
135 *
136 * Converting a 64 Bit TOD format value to nanoseconds means that the value
137 * must be divided by 4.096. In order to achieve that we multiply with 125
138 * and divide by 512:
139 *
140 * ns = (todval * 125) >> 9;
141 *
142 * In order to avoid an overflow with the multiplication we can rewrite this.
143 * With a split todval == 2^32 * th + tl (th upper 32 bits, tl lower 32 bits)
144 * we end up with
145 *
146 * ns = ((2^32 * th + tl) * 125 ) >> 9;
147 * -> ns = (2^23 * th * 125) + ((tl * 125) >> 9);
148 *
149 */
150static inline unsigned long long tod_to_ns(unsigned long long todval)
151{
152 unsigned long long ns;
153
154 ns = ((todval >> 32) << 23) * 125;
155 ns += ((todval & 0xffffffff) * 125) >> 9;
156 return ns;
157}
158
131#endif 159#endif
diff --git a/arch/s390/include/uapi/asm/unistd.h b/arch/s390/include/uapi/asm/unistd.h
index 63e6078699f1..864f693c237f 100644
--- a/arch/s390/include/uapi/asm/unistd.h
+++ b/arch/s390/include/uapi/asm/unistd.h
@@ -279,7 +279,8 @@
279#define __NR_process_vm_writev 341 279#define __NR_process_vm_writev 341
280#define __NR_s390_runtime_instr 342 280#define __NR_s390_runtime_instr 342
281#define __NR_kcmp 343 281#define __NR_kcmp 343
282#define NR_syscalls 344 282#define __NR_finit_module 344
283#define NR_syscalls 345
283 284
284/* 285/*
285 * There are some system calls that are not present on 64 bit, some 286 * There are some system calls that are not present on 64 bit, some
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index 827e094a2f49..9b9a805656b5 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -1659,3 +1659,9 @@ ENTRY(sys_kcmp_wrapper)
1659 llgfr %r5,%r5 # unsigned long 1659 llgfr %r5,%r5 # unsigned long
1660 llgfr %r6,%r6 # unsigned long 1660 llgfr %r6,%r6 # unsigned long
1661 jg sys_kcmp 1661 jg sys_kcmp
1662
1663ENTRY(sys_finit_module_wrapper)
1664 lgfr %r2,%r2 # int
1665 llgtr %r3,%r3 # const char __user *
1666 lgfr %r4,%r4 # int
1667 jg sys_finit_module
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index ba500d8dc392..4e8215e0d4b6 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -1127,13 +1127,14 @@ debug_register_view(debug_info_t * id, struct debug_view *view)
1127 if (i == DEBUG_MAX_VIEWS) { 1127 if (i == DEBUG_MAX_VIEWS) {
1128 pr_err("Registering view %s/%s would exceed the maximum " 1128 pr_err("Registering view %s/%s would exceed the maximum "
1129 "number of views %i\n", id->name, view->name, i); 1129 "number of views %i\n", id->name, view->name, i);
1130 debugfs_remove(pde);
1131 rc = -1; 1130 rc = -1;
1132 } else { 1131 } else {
1133 id->views[i] = view; 1132 id->views[i] = view;
1134 id->debugfs_entries[i] = pde; 1133 id->debugfs_entries[i] = pde;
1135 } 1134 }
1136 spin_unlock_irqrestore(&id->lock, flags); 1135 spin_unlock_irqrestore(&id->lock, flags);
1136 if (rc)
1137 debugfs_remove(pde);
1137out: 1138out:
1138 return rc; 1139 return rc;
1139} 1140}
@@ -1146,9 +1147,9 @@ EXPORT_SYMBOL(debug_register_view);
1146int 1147int
1147debug_unregister_view(debug_info_t * id, struct debug_view *view) 1148debug_unregister_view(debug_info_t * id, struct debug_view *view)
1148{ 1149{
1149 int rc = 0; 1150 struct dentry *dentry = NULL;
1150 int i;
1151 unsigned long flags; 1151 unsigned long flags;
1152 int i, rc = 0;
1152 1153
1153 if (!id) 1154 if (!id)
1154 goto out; 1155 goto out;
@@ -1160,10 +1161,12 @@ debug_unregister_view(debug_info_t * id, struct debug_view *view)
1160 if (i == DEBUG_MAX_VIEWS) 1161 if (i == DEBUG_MAX_VIEWS)
1161 rc = -1; 1162 rc = -1;
1162 else { 1163 else {
1163 debugfs_remove(id->debugfs_entries[i]); 1164 dentry = id->debugfs_entries[i];
1164 id->views[i] = NULL; 1165 id->views[i] = NULL;
1166 id->debugfs_entries[i] = NULL;
1165 } 1167 }
1166 spin_unlock_irqrestore(&id->lock, flags); 1168 spin_unlock_irqrestore(&id->lock, flags);
1169 debugfs_remove(dentry);
1167out: 1170out:
1168 return rc; 1171 return rc;
1169} 1172}
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c
index bf24293970ce..9df824ea1667 100644
--- a/arch/s390/kernel/irq.c
+++ b/arch/s390/kernel/irq.c
@@ -24,43 +24,65 @@
24#include <asm/irq.h> 24#include <asm/irq.h>
25#include "entry.h" 25#include "entry.h"
26 26
27DEFINE_PER_CPU_SHARED_ALIGNED(struct irq_stat, irq_stat);
28EXPORT_PER_CPU_SYMBOL_GPL(irq_stat);
29
27struct irq_class { 30struct irq_class {
28 char *name; 31 char *name;
29 char *desc; 32 char *desc;
30}; 33};
31 34
32static const struct irq_class intrclass_names[] = { 35/*
36 * The list of "main" irq classes on s390. This is the list of interrrupts
37 * that appear both in /proc/stat ("intr" line) and /proc/interrupts.
38 * Historically only external and I/O interrupts have been part of /proc/stat.
39 * We can't add the split external and I/O sub classes since the first field
40 * in the "intr" line in /proc/stat is supposed to be the sum of all other
41 * fields.
42 * Since the external and I/O interrupt fields are already sums we would end
43 * up with having a sum which accounts each interrupt twice.
44 */
45static const struct irq_class irqclass_main_desc[NR_IRQS] = {
33 [EXTERNAL_INTERRUPT] = {.name = "EXT"}, 46 [EXTERNAL_INTERRUPT] = {.name = "EXT"},
34 [IO_INTERRUPT] = {.name = "I/O"}, 47 [IO_INTERRUPT] = {.name = "I/O"}
35 [EXTINT_CLK] = {.name = "CLK", .desc = "[EXT] Clock Comparator"}, 48};
36 [EXTINT_EXC] = {.name = "EXC", .desc = "[EXT] External Call"}, 49
37 [EXTINT_EMS] = {.name = "EMS", .desc = "[EXT] Emergency Signal"}, 50/*
38 [EXTINT_TMR] = {.name = "TMR", .desc = "[EXT] CPU Timer"}, 51 * The list of split external and I/O interrupts that appear only in
39 [EXTINT_TLA] = {.name = "TAL", .desc = "[EXT] Timing Alert"}, 52 * /proc/interrupts.
40 [EXTINT_PFL] = {.name = "PFL", .desc = "[EXT] Pseudo Page Fault"}, 53 * In addition this list contains non external / I/O events like NMIs.
41 [EXTINT_DSD] = {.name = "DSD", .desc = "[EXT] DASD Diag"}, 54 */
42 [EXTINT_VRT] = {.name = "VRT", .desc = "[EXT] Virtio"}, 55static const struct irq_class irqclass_sub_desc[NR_ARCH_IRQS] = {
43 [EXTINT_SCP] = {.name = "SCP", .desc = "[EXT] Service Call"}, 56 [IRQEXT_CLK] = {.name = "CLK", .desc = "[EXT] Clock Comparator"},
44 [EXTINT_IUC] = {.name = "IUC", .desc = "[EXT] IUCV"}, 57 [IRQEXT_EXC] = {.name = "EXC", .desc = "[EXT] External Call"},
45 [EXTINT_CMS] = {.name = "CMS", .desc = "[EXT] CPU-Measurement: Sampling"}, 58 [IRQEXT_EMS] = {.name = "EMS", .desc = "[EXT] Emergency Signal"},
46 [EXTINT_CMC] = {.name = "CMC", .desc = "[EXT] CPU-Measurement: Counter"}, 59 [IRQEXT_TMR] = {.name = "TMR", .desc = "[EXT] CPU Timer"},
47 [EXTINT_CMR] = {.name = "CMR", .desc = "[EXT] CPU-Measurement: RI"}, 60 [IRQEXT_TLA] = {.name = "TAL", .desc = "[EXT] Timing Alert"},
48 [IOINT_CIO] = {.name = "CIO", .desc = "[I/O] Common I/O Layer Interrupt"}, 61 [IRQEXT_PFL] = {.name = "PFL", .desc = "[EXT] Pseudo Page Fault"},
49 [IOINT_QAI] = {.name = "QAI", .desc = "[I/O] QDIO Adapter Interrupt"}, 62 [IRQEXT_DSD] = {.name = "DSD", .desc = "[EXT] DASD Diag"},
50 [IOINT_DAS] = {.name = "DAS", .desc = "[I/O] DASD"}, 63 [IRQEXT_VRT] = {.name = "VRT", .desc = "[EXT] Virtio"},
51 [IOINT_C15] = {.name = "C15", .desc = "[I/O] 3215"}, 64 [IRQEXT_SCP] = {.name = "SCP", .desc = "[EXT] Service Call"},
52 [IOINT_C70] = {.name = "C70", .desc = "[I/O] 3270"}, 65 [IRQEXT_IUC] = {.name = "IUC", .desc = "[EXT] IUCV"},
53 [IOINT_TAP] = {.name = "TAP", .desc = "[I/O] Tape"}, 66 [IRQEXT_CMS] = {.name = "CMS", .desc = "[EXT] CPU-Measurement: Sampling"},
54 [IOINT_VMR] = {.name = "VMR", .desc = "[I/O] Unit Record Devices"}, 67 [IRQEXT_CMC] = {.name = "CMC", .desc = "[EXT] CPU-Measurement: Counter"},
55 [IOINT_LCS] = {.name = "LCS", .desc = "[I/O] LCS"}, 68 [IRQEXT_CMR] = {.name = "CMR", .desc = "[EXT] CPU-Measurement: RI"},
56 [IOINT_CLW] = {.name = "CLW", .desc = "[I/O] CLAW"}, 69 [IRQIO_CIO] = {.name = "CIO", .desc = "[I/O] Common I/O Layer Interrupt"},
57 [IOINT_CTC] = {.name = "CTC", .desc = "[I/O] CTC"}, 70 [IRQIO_QAI] = {.name = "QAI", .desc = "[I/O] QDIO Adapter Interrupt"},
58 [IOINT_APB] = {.name = "APB", .desc = "[I/O] AP Bus"}, 71 [IRQIO_DAS] = {.name = "DAS", .desc = "[I/O] DASD"},
59 [IOINT_ADM] = {.name = "ADM", .desc = "[I/O] EADM Subchannel"}, 72 [IRQIO_C15] = {.name = "C15", .desc = "[I/O] 3215"},
60 [IOINT_CSC] = {.name = "CSC", .desc = "[I/O] CHSC Subchannel"}, 73 [IRQIO_C70] = {.name = "C70", .desc = "[I/O] 3270"},
61 [IOINT_PCI] = {.name = "PCI", .desc = "[I/O] PCI Interrupt" }, 74 [IRQIO_TAP] = {.name = "TAP", .desc = "[I/O] Tape"},
62 [IOINT_MSI] = {.name = "MSI", .desc = "[I/O] MSI Interrupt" }, 75 [IRQIO_VMR] = {.name = "VMR", .desc = "[I/O] Unit Record Devices"},
76 [IRQIO_LCS] = {.name = "LCS", .desc = "[I/O] LCS"},
77 [IRQIO_CLW] = {.name = "CLW", .desc = "[I/O] CLAW"},
78 [IRQIO_CTC] = {.name = "CTC", .desc = "[I/O] CTC"},
79 [IRQIO_APB] = {.name = "APB", .desc = "[I/O] AP Bus"},
80 [IRQIO_ADM] = {.name = "ADM", .desc = "[I/O] EADM Subchannel"},
81 [IRQIO_CSC] = {.name = "CSC", .desc = "[I/O] CHSC Subchannel"},
82 [IRQIO_PCI] = {.name = "PCI", .desc = "[I/O] PCI Interrupt" },
83 [IRQIO_MSI] = {.name = "MSI", .desc = "[I/O] MSI Interrupt" },
63 [NMI_NMI] = {.name = "NMI", .desc = "[NMI] Machine Check"}, 84 [NMI_NMI] = {.name = "NMI", .desc = "[NMI] Machine Check"},
85 [CPU_RST] = {.name = "RST", .desc = "[CPU] CPU Restart"},
64}; 86};
65 87
66/* 88/*
@@ -68,30 +90,34 @@ static const struct irq_class intrclass_names[] = {
68 */ 90 */
69int show_interrupts(struct seq_file *p, void *v) 91int show_interrupts(struct seq_file *p, void *v)
70{ 92{
71 int i = *(loff_t *) v, j; 93 int irq = *(loff_t *) v;
94 int cpu;
72 95
73 get_online_cpus(); 96 get_online_cpus();
74 if (i == 0) { 97 if (irq == 0) {
75 seq_puts(p, " "); 98 seq_puts(p, " ");
76 for_each_online_cpu(j) 99 for_each_online_cpu(cpu)
77 seq_printf(p, "CPU%d ",j); 100 seq_printf(p, "CPU%d ", cpu);
78 seq_putc(p, '\n'); 101 seq_putc(p, '\n');
79 } 102 }
80 103 if (irq < NR_IRQS) {
81 if (i < NR_IRQS) { 104 seq_printf(p, "%s: ", irqclass_main_desc[irq].name);
82 seq_printf(p, "%s: ", intrclass_names[i].name); 105 for_each_online_cpu(cpu)
83#ifndef CONFIG_SMP 106 seq_printf(p, "%10u ", kstat_cpu(cpu).irqs[irq]);
84 seq_printf(p, "%10u ", kstat_irqs(i)); 107 seq_putc(p, '\n');
85#else 108 goto skip_arch_irqs;
86 for_each_online_cpu(j) 109 }
87 seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); 110 for (irq = 0; irq < NR_ARCH_IRQS; irq++) {
88#endif 111 seq_printf(p, "%s: ", irqclass_sub_desc[irq].name);
89 if (intrclass_names[i].desc) 112 for_each_online_cpu(cpu)
90 seq_printf(p, " %s", intrclass_names[i].desc); 113 seq_printf(p, "%10u ", per_cpu(irq_stat, cpu).irqs[irq]);
91 seq_putc(p, '\n'); 114 if (irqclass_sub_desc[irq].desc)
92 } 115 seq_printf(p, " %s", irqclass_sub_desc[irq].desc);
116 seq_putc(p, '\n');
117 }
118skip_arch_irqs:
93 put_online_cpus(); 119 put_online_cpus();
94 return 0; 120 return 0;
95} 121}
96 122
97/* 123/*
@@ -222,7 +248,7 @@ void __irq_entry do_extint(struct pt_regs *regs, struct ext_code ext_code,
222 /* Serve timer interrupts first. */ 248 /* Serve timer interrupts first. */
223 clock_comparator_work(); 249 clock_comparator_work();
224 } 250 }
225 kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; 251 kstat_incr_irqs_this_cpu(EXTERNAL_INTERRUPT, NULL);
226 if (ext_code.code != 0x1004) 252 if (ext_code.code != 0x1004)
227 __get_cpu_var(s390_idle).nohz_delay = 1; 253 __get_cpu_var(s390_idle).nohz_delay = 1;
228 254
diff --git a/arch/s390/kernel/nmi.c b/arch/s390/kernel/nmi.c
index a6daa5c5cdb0..7918fbea36bb 100644
--- a/arch/s390/kernel/nmi.c
+++ b/arch/s390/kernel/nmi.c
@@ -254,7 +254,7 @@ void notrace s390_do_machine_check(struct pt_regs *regs)
254 int umode; 254 int umode;
255 255
256 nmi_enter(); 256 nmi_enter();
257 kstat_cpu(smp_processor_id()).irqs[NMI_NMI]++; 257 inc_irq_stat(NMI_NMI);
258 mci = (struct mci *) &S390_lowcore.mcck_interruption_code; 258 mci = (struct mci *) &S390_lowcore.mcck_interruption_code;
259 mcck = &__get_cpu_var(cpu_mcck); 259 mcck = &__get_cpu_var(cpu_mcck);
260 umode = user_mode(regs); 260 umode = user_mode(regs);
diff --git a/arch/s390/kernel/perf_cpum_cf.c b/arch/s390/kernel/perf_cpum_cf.c
index c4e7269d4a09..86ec7447e1f5 100644
--- a/arch/s390/kernel/perf_cpum_cf.c
+++ b/arch/s390/kernel/perf_cpum_cf.c
@@ -229,7 +229,7 @@ static void cpumf_measurement_alert(struct ext_code ext_code,
229 if (!(alert & CPU_MF_INT_CF_MASK)) 229 if (!(alert & CPU_MF_INT_CF_MASK))
230 return; 230 return;
231 231
232 kstat_cpu(smp_processor_id()).irqs[EXTINT_CMC]++; 232 inc_irq_stat(IRQEXT_CMC);
233 cpuhw = &__get_cpu_var(cpu_hw_events); 233 cpuhw = &__get_cpu_var(cpu_hw_events);
234 234
235 /* Measurement alerts are shared and might happen when the PMU 235 /* Measurement alerts are shared and might happen when the PMU
diff --git a/arch/s390/kernel/runtime_instr.c b/arch/s390/kernel/runtime_instr.c
index 61066f6f71a5..077a99389b07 100644
--- a/arch/s390/kernel/runtime_instr.c
+++ b/arch/s390/kernel/runtime_instr.c
@@ -71,7 +71,7 @@ static void runtime_instr_int_handler(struct ext_code ext_code,
71 if (!(param32 & CPU_MF_INT_RI_MASK)) 71 if (!(param32 & CPU_MF_INT_RI_MASK))
72 return; 72 return;
73 73
74 kstat_cpu(smp_processor_id()).irqs[EXTINT_CMR]++; 74 inc_irq_stat(IRQEXT_CMR);
75 75
76 if (!current->thread.ri_cb) 76 if (!current->thread.ri_cb)
77 return; 77 return;
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 2568590973ad..a5360de85ec7 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -16,7 +16,7 @@
16#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt 16#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
17 17
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/module.h> 19#include <linux/export.h>
20#include <linux/sched.h> 20#include <linux/sched.h>
21#include <linux/kernel.h> 21#include <linux/kernel.h>
22#include <linux/memblock.h> 22#include <linux/memblock.h>
@@ -289,6 +289,7 @@ void machine_power_off(void)
289 * Dummy power off function. 289 * Dummy power off function.
290 */ 290 */
291void (*pm_power_off)(void) = machine_power_off; 291void (*pm_power_off)(void) = machine_power_off;
292EXPORT_SYMBOL_GPL(pm_power_off);
292 293
293static int __init early_parse_mem(char *p) 294static int __init early_parse_mem(char *p)
294{ 295{
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index ea431e551c6b..7433a2f9e5cc 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -433,9 +433,9 @@ static void do_ext_call_interrupt(struct ext_code ext_code,
433 433
434 cpu = smp_processor_id(); 434 cpu = smp_processor_id();
435 if (ext_code.code == 0x1202) 435 if (ext_code.code == 0x1202)
436 kstat_cpu(cpu).irqs[EXTINT_EXC]++; 436 inc_irq_stat(IRQEXT_EXC);
437 else 437 else
438 kstat_cpu(cpu).irqs[EXTINT_EMS]++; 438 inc_irq_stat(IRQEXT_EMS);
439 /* 439 /*
440 * handle bit signal external calls 440 * handle bit signal external calls
441 */ 441 */
@@ -623,9 +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 __cpuinit smp_add_present_cpu(int cpu);
627 627
628static int __devinit __smp_rescan_cpus(struct sclp_cpu_info *info, 628static int __cpuinit __smp_rescan_cpus(struct sclp_cpu_info *info,
629 int sysfs_add) 629 int sysfs_add)
630{ 630{
631 struct pcpu *pcpu; 631 struct pcpu *pcpu;
@@ -709,6 +709,7 @@ static void __cpuinit smp_start_secondary(void *cpuvoid)
709 pfault_init(); 709 pfault_init();
710 notify_cpu_starting(smp_processor_id()); 710 notify_cpu_starting(smp_processor_id());
711 set_cpu_online(smp_processor_id(), true); 711 set_cpu_online(smp_processor_id(), true);
712 inc_irq_stat(CPU_RST);
712 local_irq_enable(); 713 local_irq_enable();
713 /* cpu_idle will call schedule for us */ 714 /* cpu_idle will call schedule for us */
714 cpu_idle(); 715 cpu_idle();
@@ -986,7 +987,7 @@ static int __cpuinit smp_cpu_notify(struct notifier_block *self,
986 return notifier_from_errno(err); 987 return notifier_from_errno(err);
987} 988}
988 989
989static int __devinit smp_add_present_cpu(int cpu) 990static int __cpuinit smp_add_present_cpu(int cpu)
990{ 991{
991 struct cpu *c = &pcpu_devices[cpu].cpu; 992 struct cpu *c = &pcpu_devices[cpu].cpu;
992 struct device *s = &c->dev; 993 struct device *s = &c->dev;
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index 48174850f3b0..6a6c61f94dd3 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -352,3 +352,4 @@ SYSCALL(sys_process_vm_readv,sys_process_vm_readv,compat_sys_process_vm_readv_wr
352SYSCALL(sys_process_vm_writev,sys_process_vm_writev,compat_sys_process_vm_writev_wrapper) 352SYSCALL(sys_process_vm_writev,sys_process_vm_writev,compat_sys_process_vm_writev_wrapper)
353SYSCALL(sys_ni_syscall,sys_s390_runtime_instr,sys_s390_runtime_instr_wrapper) 353SYSCALL(sys_ni_syscall,sys_s390_runtime_instr,sys_s390_runtime_instr_wrapper)
354SYSCALL(sys_kcmp,sys_kcmp,sys_kcmp_wrapper) 354SYSCALL(sys_kcmp,sys_kcmp,sys_kcmp_wrapper)
355SYSCALL(sys_finit_module,sys_finit_module,sys_finit_module_wrapper)
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 7fcd690d42c7..a5f4f5a1d24b 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -63,7 +63,7 @@ static DEFINE_PER_CPU(struct clock_event_device, comparators);
63 */ 63 */
64unsigned long long notrace __kprobes sched_clock(void) 64unsigned long long notrace __kprobes sched_clock(void)
65{ 65{
66 return (get_clock_monotonic() * 125) >> 9; 66 return tod_to_ns(get_clock_monotonic());
67} 67}
68 68
69/* 69/*
@@ -168,7 +168,7 @@ static void clock_comparator_interrupt(struct ext_code ext_code,
168 unsigned int param32, 168 unsigned int param32,
169 unsigned long param64) 169 unsigned long param64)
170{ 170{
171 kstat_cpu(smp_processor_id()).irqs[EXTINT_CLK]++; 171 inc_irq_stat(IRQEXT_CLK);
172 if (S390_lowcore.clock_comparator == -1ULL) 172 if (S390_lowcore.clock_comparator == -1ULL)
173 set_clock_comparator(S390_lowcore.clock_comparator); 173 set_clock_comparator(S390_lowcore.clock_comparator);
174} 174}
@@ -179,7 +179,7 @@ static void stp_timing_alert(struct stp_irq_parm *);
179static void timing_alert_interrupt(struct ext_code ext_code, 179static void timing_alert_interrupt(struct ext_code ext_code,
180 unsigned int param32, unsigned long param64) 180 unsigned int param32, unsigned long param64)
181{ 181{
182 kstat_cpu(smp_processor_id()).irqs[EXTINT_TLA]++; 182 inc_irq_stat(IRQEXT_TLA);
183 if (param32 & 0x00c40000) 183 if (param32 & 0x00c40000)
184 etr_timing_alert((struct etr_irq_parm *) &param32); 184 etr_timing_alert((struct etr_irq_parm *) &param32);
185 if (param32 & 0x00038000) 185 if (param32 & 0x00038000)
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index f1aba87cceb8..4b2e3e317004 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -10,6 +10,7 @@
10#include <linux/bootmem.h> 10#include <linux/bootmem.h>
11#include <linux/cpuset.h> 11#include <linux/cpuset.h>
12#include <linux/device.h> 12#include <linux/device.h>
13#include <linux/export.h>
13#include <linux/kernel.h> 14#include <linux/kernel.h>
14#include <linux/sched.h> 15#include <linux/sched.h>
15#include <linux/init.h> 16#include <linux/init.h>
@@ -42,6 +43,7 @@ static struct mask_info socket_info;
42static struct mask_info book_info; 43static struct mask_info book_info;
43 44
44struct cpu_topology_s390 cpu_topology[NR_CPUS]; 45struct cpu_topology_s390 cpu_topology[NR_CPUS];
46EXPORT_SYMBOL_GPL(cpu_topology);
45 47
46static cpumask_t cpu_group_map(struct mask_info *info, unsigned int cpu) 48static cpumask_t cpu_group_map(struct mask_info *info, unsigned int cpu)
47{ 49{
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index c30615e605ac..82c481ddef76 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -408,7 +408,7 @@ int kvm_s390_handle_wait(struct kvm_vcpu *vcpu)
408 return 0; 408 return 0;
409 } 409 }
410 410
411 sltime = ((vcpu->arch.sie_block->ckc - now)*125)>>9; 411 sltime = tod_to_ns(vcpu->arch.sie_block->ckc - now);
412 412
413 hrtimer_start(&vcpu->arch.ckc_timer, ktime_set (0, sltime) , HRTIMER_MODE_REL); 413 hrtimer_start(&vcpu->arch.ckc_timer, ktime_set (0, sltime) , HRTIMER_MODE_REL);
414 VCPU_EVENT(vcpu, 5, "enabled wait via clock comparator: %llx ns", sltime); 414 VCPU_EVENT(vcpu, 5, "enabled wait via clock comparator: %llx ns", sltime);
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index c9011bfaabbe..f090e819bf71 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -613,7 +613,9 @@ static int __vcpu_run(struct kvm_vcpu *vcpu)
613 kvm_s390_deliver_pending_interrupts(vcpu); 613 kvm_s390_deliver_pending_interrupts(vcpu);
614 614
615 vcpu->arch.sie_block->icptcode = 0; 615 vcpu->arch.sie_block->icptcode = 0;
616 preempt_disable();
616 kvm_guest_enter(); 617 kvm_guest_enter();
618 preempt_enable();
617 VCPU_EVENT(vcpu, 6, "entering sie flags %x", 619 VCPU_EVENT(vcpu, 6, "entering sie flags %x",
618 atomic_read(&vcpu->arch.sie_block->cpuflags)); 620 atomic_read(&vcpu->arch.sie_block->cpuflags));
619 trace_kvm_s390_sie_enter(vcpu, 621 trace_kvm_s390_sie_enter(vcpu,
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 42601d6e166f..2fb9e63b8fc4 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -569,7 +569,7 @@ static void pfault_interrupt(struct ext_code ext_code,
569 subcode = ext_code.subcode; 569 subcode = ext_code.subcode;
570 if ((subcode & 0xff00) != __SUBCODE_MASK) 570 if ((subcode & 0xff00) != __SUBCODE_MASK)
571 return; 571 return;
572 kstat_cpu(smp_processor_id()).irqs[EXTINT_PFL]++; 572 inc_irq_stat(IRQEXT_PFL);
573 /* Get the token (= pid of the affected task). */ 573 /* Get the token (= pid of the affected task). */
574 pid = sizeof(void *) == 4 ? param32 : param64; 574 pid = sizeof(void *) == 4 ? param32 : param64;
575 rcu_read_lock(); 575 rcu_read_lock();
diff --git a/arch/s390/oprofile/hwsampler.c b/arch/s390/oprofile/hwsampler.c
index 0cb385da202c..b5b2916895e0 100644
--- a/arch/s390/oprofile/hwsampler.c
+++ b/arch/s390/oprofile/hwsampler.c
@@ -233,7 +233,7 @@ static void hws_ext_handler(struct ext_code ext_code,
233 if (!(param32 & CPU_MF_INT_SF_MASK)) 233 if (!(param32 & CPU_MF_INT_SF_MASK))
234 return; 234 return;
235 235
236 kstat_cpu(smp_processor_id()).irqs[EXTINT_CMS]++; 236 inc_irq_stat(IRQEXT_CMS);
237 atomic_xchg(&cb->ext_params, atomic_read(&cb->ext_params) | param32); 237 atomic_xchg(&cb->ext_params, atomic_read(&cb->ext_params) | param32);
238 238
239 if (hws_wq) 239 if (hws_wq)
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c
index 8fa416b8775f..60e0372545d2 100644
--- a/arch/s390/pci/pci.c
+++ b/arch/s390/pci/pci.c
@@ -160,35 +160,6 @@ int pci_proc_domain(struct pci_bus *bus)
160} 160}
161EXPORT_SYMBOL_GPL(pci_proc_domain); 161EXPORT_SYMBOL_GPL(pci_proc_domain);
162 162
163/* Store PCI function information block */
164static int zpci_store_fib(struct zpci_dev *zdev, u8 *fc)
165{
166 struct zpci_fib *fib;
167 u8 status, cc;
168
169 fib = (void *) get_zeroed_page(GFP_KERNEL);
170 if (!fib)
171 return -ENOMEM;
172
173 do {
174 cc = __stpcifc(zdev->fh, 0, fib, &status);
175 if (cc == 2) {
176 msleep(ZPCI_INSN_BUSY_DELAY);
177 memset(fib, 0, PAGE_SIZE);
178 }
179 } while (cc == 2);
180
181 if (cc)
182 pr_err_once("%s: cc: %u status: %u\n",
183 __func__, cc, status);
184
185 /* Return PCI function controls */
186 *fc = fib->fc;
187
188 free_page((unsigned long) fib);
189 return (cc) ? -EIO : 0;
190}
191
192/* Modify PCI: Register adapter interruptions */ 163/* Modify PCI: Register adapter interruptions */
193static int zpci_register_airq(struct zpci_dev *zdev, unsigned int aisb, 164static int zpci_register_airq(struct zpci_dev *zdev, unsigned int aisb,
194 u64 aibv) 165 u64 aibv)
@@ -385,7 +356,7 @@ unsigned int probe_irq_mask(unsigned long val)
385} 356}
386EXPORT_SYMBOL_GPL(probe_irq_mask); 357EXPORT_SYMBOL_GPL(probe_irq_mask);
387 358
388void __devinit pcibios_fixup_bus(struct pci_bus *bus) 359void pcibios_fixup_bus(struct pci_bus *bus)
389{ 360{
390} 361}
391 362
@@ -469,7 +440,7 @@ static void zpci_irq_handler(void *dont, void *need)
469 int rescan = 0, max = aisb_max; 440 int rescan = 0, max = aisb_max;
470 struct zdev_irq_map *imap; 441 struct zdev_irq_map *imap;
471 442
472 kstat_cpu(smp_processor_id()).irqs[IOINT_PCI]++; 443 inc_irq_stat(IRQIO_PCI);
473 sbit = start; 444 sbit = start;
474 445
475scan: 446scan:
@@ -481,7 +452,7 @@ scan:
481 /* find vector bit */ 452 /* find vector bit */
482 imap = bucket->imap[sbit]; 453 imap = bucket->imap[sbit];
483 for_each_set_bit_left(mbit, &imap->aibv, imap->msi_vecs) { 454 for_each_set_bit_left(mbit, &imap->aibv, imap->msi_vecs) {
484 kstat_cpu(smp_processor_id()).irqs[IOINT_MSI]++; 455 inc_irq_stat(IRQIO_MSI);
485 clear_bit(63 - mbit, &imap->aibv); 456 clear_bit(63 - mbit, &imap->aibv);
486 457
487 spin_lock(&imap->lock); 458 spin_lock(&imap->lock);
diff --git a/arch/s390/pci/pci_dma.c b/arch/s390/pci/pci_dma.c
index 6138468b420f..a547419907c3 100644
--- a/arch/s390/pci/pci_dma.c
+++ b/arch/s390/pci/pci_dma.c
@@ -13,8 +13,6 @@
13#include <linux/pci.h> 13#include <linux/pci.h>
14#include <asm/pci_dma.h> 14#include <asm/pci_dma.h>
15 15
16static enum zpci_ioat_dtype zpci_ioat_dt = ZPCI_IOTA_RTTO;
17
18static struct kmem_cache *dma_region_table_cache; 16static struct kmem_cache *dma_region_table_cache;
19static struct kmem_cache *dma_page_table_cache; 17static struct kmem_cache *dma_page_table_cache;
20 18
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/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index 3fede4556c91..a0fa5791cd44 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -70,6 +70,16 @@
70 * OFF-ON : MMC 70 * OFF-ON : MMC
71 */ 71 */
72 72
73/*
74 * FSI - DA7210
75 *
76 * it needs amixer settings for playing
77 *
78 * amixer set 'HeadPhone' 80
79 * amixer set 'Out Mixer Left DAC Left' on
80 * amixer set 'Out Mixer Right DAC Right' on
81 */
82
73/* Heartbeat */ 83/* Heartbeat */
74static unsigned char led_pos[] = { 0, 1, 2, 3 }; 84static unsigned char led_pos[] = { 0, 1, 2, 3 };
75 85
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/sh/include/asm/elf.h b/arch/sh/include/asm/elf.h
index 37924afa8d8a..bf9f44f17c29 100644
--- a/arch/sh/include/asm/elf.h
+++ b/arch/sh/include/asm/elf.h
@@ -203,9 +203,9 @@ extern void __kernel_vsyscall;
203 if (vdso_enabled) \ 203 if (vdso_enabled) \
204 NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE); \ 204 NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE); \
205 else \ 205 else \
206 NEW_AUX_ENT(AT_IGNORE, 0); 206 NEW_AUX_ENT(AT_IGNORE, 0)
207#else 207#else
208#define VSYSCALL_AUX_ENT 208#define VSYSCALL_AUX_ENT NEW_AUX_ENT(AT_IGNORE, 0)
209#endif /* CONFIG_VSYSCALL */ 209#endif /* CONFIG_VSYSCALL */
210 210
211#ifdef CONFIG_SH_FPU 211#ifdef CONFIG_SH_FPU
diff --git a/arch/sh/include/asm/processor_32.h b/arch/sh/include/asm/processor_32.h
index b1320d55ca30..e699a12cdcca 100644
--- a/arch/sh/include/asm/processor_32.h
+++ b/arch/sh/include/asm/processor_32.h
@@ -39,7 +39,7 @@
39/* This decides where the kernel will search for a free chunk of vm 39/* This decides where the kernel will search for a free chunk of vm
40 * space during mmap's. 40 * space during mmap's.
41 */ 41 */
42#define TASK_UNMAPPED_BASE (TASK_SIZE / 3) 42#define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE / 3)
43 43
44/* 44/*
45 * Bit of SR register 45 * Bit of SR register
diff --git a/arch/sh/include/asm/processor_64.h b/arch/sh/include/asm/processor_64.h
index 1ee8946f0952..1cc7d3197143 100644
--- a/arch/sh/include/asm/processor_64.h
+++ b/arch/sh/include/asm/processor_64.h
@@ -47,7 +47,7 @@ pc; })
47/* This decides where the kernel will search for a free chunk of vm 47/* This decides where the kernel will search for a free chunk of vm
48 * space during mmap's. 48 * space during mmap's.
49 */ 49 */
50#define TASK_UNMAPPED_BASE (TASK_SIZE / 3) 50#define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE / 3)
51 51
52/* 52/*
53 * Bit of SR register 53 * Bit of SR register
diff --git a/arch/sh/include/uapi/asm/unistd_32.h b/arch/sh/include/uapi/asm/unistd_32.h
index 9e465f246dc1..d13a1d623736 100644
--- a/arch/sh/include/uapi/asm/unistd_32.h
+++ b/arch/sh/include/uapi/asm/unistd_32.h
@@ -379,7 +379,8 @@
379#define __NR_process_vm_readv 365 379#define __NR_process_vm_readv 365
380#define __NR_process_vm_writev 366 380#define __NR_process_vm_writev 366
381#define __NR_kcmp 367 381#define __NR_kcmp 367
382#define __NR_finit_module 368
382 383
383#define NR_syscalls 368 384#define NR_syscalls 369
384 385
385#endif /* __ASM_SH_UNISTD_32_H */ 386#endif /* __ASM_SH_UNISTD_32_H */
diff --git a/arch/sh/include/uapi/asm/unistd_64.h b/arch/sh/include/uapi/asm/unistd_64.h
index 8e3a2edd284e..e6820c86e8c7 100644
--- a/arch/sh/include/uapi/asm/unistd_64.h
+++ b/arch/sh/include/uapi/asm/unistd_64.h
@@ -399,7 +399,8 @@
399#define __NR_process_vm_readv 376 399#define __NR_process_vm_readv 376
400#define __NR_process_vm_writev 377 400#define __NR_process_vm_writev 377
401#define __NR_kcmp 378 401#define __NR_kcmp 378
402#define __NR_finit_module 379
402 403
403#define NR_syscalls 379 404#define NR_syscalls 380
404 405
405#endif /* __ASM_SH_UNISTD_64_H */ 406#endif /* __ASM_SH_UNISTD_64_H */
diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S
index fe97ae5e56f1..734234be2f01 100644
--- a/arch/sh/kernel/syscalls_32.S
+++ b/arch/sh/kernel/syscalls_32.S
@@ -385,3 +385,4 @@ ENTRY(sys_call_table)
385 .long sys_process_vm_readv /* 365 */ 385 .long sys_process_vm_readv /* 365 */
386 .long sys_process_vm_writev 386 .long sys_process_vm_writev
387 .long sys_kcmp 387 .long sys_kcmp
388 .long sys_finit_module
diff --git a/arch/sh/kernel/syscalls_64.S b/arch/sh/kernel/syscalls_64.S
index 5c7b1c67bdc1..579fcb9a896b 100644
--- a/arch/sh/kernel/syscalls_64.S
+++ b/arch/sh/kernel/syscalls_64.S
@@ -405,3 +405,4 @@ sys_call_table:
405 .long sys_process_vm_readv 405 .long sys_process_vm_readv
406 .long sys_process_vm_writev 406 .long sys_process_vm_writev
407 .long sys_kcmp 407 .long sys_kcmp
408 .long sys_finit_module
diff --git a/arch/sh/lib/mcount.S b/arch/sh/lib/mcount.S
index 60164e65d665..52aa2011d753 100644
--- a/arch/sh/lib/mcount.S
+++ b/arch/sh/lib/mcount.S
@@ -294,6 +294,8 @@ stack_panic:
294 .align 2 294 .align 2
295.L_init_thread_union: 295.L_init_thread_union:
296 .long init_thread_union 296 .long init_thread_union
297.L_ebss:
298 .long __bss_stop
297.Lpanic: 299.Lpanic:
298 .long panic 300 .long panic
299.Lpanic_s: 301.Lpanic_s:
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/include/uapi/asm/unistd.h b/arch/sparc/include/uapi/asm/unistd.h
index cac719d1bc5c..62ced589bcf7 100644
--- a/arch/sparc/include/uapi/asm/unistd.h
+++ b/arch/sparc/include/uapi/asm/unistd.h
@@ -407,8 +407,9 @@
407#define __NR_process_vm_writev 339 407#define __NR_process_vm_writev 339
408#define __NR_kern_features 340 408#define __NR_kern_features 340
409#define __NR_kcmp 341 409#define __NR_kcmp 341
410#define __NR_finit_module 342
410 411
411#define NR_syscalls 342 412#define NR_syscalls 343
412 413
413/* Bitmask values returned from kern_features system call. */ 414/* Bitmask values returned from kern_features system call. */
414#define KERN_FEATURE_MIXED_MODE_STACK 0x00000001 415#define KERN_FEATURE_MIXED_MODE_STACK 0x00000001
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..baf4366e2d6a 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,9 @@ 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,
382 struct pci_bus *bus, 382 struct pci_bus *bus,
383 struct pci_pbm_info *pbm) 383 struct pci_pbm_info *pbm)
384{ 384{
385 struct pci_bus_region region; 385 struct pci_bus_region region;
386 struct resource *res; 386 struct resource *res;
@@ -404,15 +404,15 @@ static void __devinit apb_fake_ranges(struct pci_dev *dev,
404 pcibios_bus_to_resource(dev, res, &region); 404 pcibios_bus_to_resource(dev, res, &region);
405} 405}
406 406
407static void __devinit pci_of_scan_bus(struct pci_pbm_info *pbm, 407static void pci_of_scan_bus(struct pci_pbm_info *pbm,
408 struct device_node *node, 408 struct device_node *node,
409 struct pci_bus *bus); 409 struct pci_bus *bus);
410 410
411#define GET_64BIT(prop, i) ((((u64) (prop)[(i)]) << 32) | (prop)[(i)+1]) 411#define GET_64BIT(prop, i) ((((u64) (prop)[(i)]) << 32) | (prop)[(i)+1])
412 412
413static void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm, 413static void of_scan_pci_bridge(struct pci_pbm_info *pbm,
414 struct device_node *node, 414 struct device_node *node,
415 struct pci_dev *dev) 415 struct pci_dev *dev)
416{ 416{
417 struct pci_bus *bus; 417 struct pci_bus *bus;
418 const u32 *busrange, *ranges; 418 const u32 *busrange, *ranges;
@@ -503,9 +503,9 @@ after_ranges:
503 pci_of_scan_bus(pbm, node, bus); 503 pci_of_scan_bus(pbm, node, bus);
504} 504}
505 505
506static void __devinit pci_of_scan_bus(struct pci_pbm_info *pbm, 506static void pci_of_scan_bus(struct pci_pbm_info *pbm,
507 struct device_node *node, 507 struct device_node *node,
508 struct pci_bus *bus) 508 struct pci_bus *bus)
509{ 509{
510 struct device_node *child; 510 struct device_node *child;
511 const u32 *reg; 511 const u32 *reg;
@@ -564,7 +564,7 @@ show_pciobppath_attr(struct device * dev, struct device_attribute * attr, char *
564 564
565static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH, show_pciobppath_attr, NULL); 565static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH, show_pciobppath_attr, NULL);
566 566
567static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus) 567static void pci_bus_register_of_sysfs(struct pci_bus *bus)
568{ 568{
569 struct pci_dev *dev; 569 struct pci_dev *dev;
570 struct pci_bus *child_bus; 570 struct pci_bus *child_bus;
@@ -585,8 +585,8 @@ static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus)
585 pci_bus_register_of_sysfs(child_bus); 585 pci_bus_register_of_sysfs(child_bus);
586} 586}
587 587
588struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm, 588struct pci_bus *pci_scan_one_pbm(struct pci_pbm_info *pbm,
589 struct device *parent) 589 struct device *parent)
590{ 590{
591 LIST_HEAD(resources); 591 LIST_HEAD(resources);
592 struct device_node *node = pbm->op->dev.of_node; 592 struct device_node *node = pbm->op->dev.of_node;
@@ -618,7 +618,7 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm,
618 return bus; 618 return bus;
619} 619}
620 620
621void __devinit pcibios_fixup_bus(struct pci_bus *pbus) 621void pcibios_fixup_bus(struct pci_bus *pbus)
622{ 622{
623} 623}
624 624
@@ -949,8 +949,7 @@ static int __init pcibios_init(void)
949subsys_initcall(pcibios_init); 949subsys_initcall(pcibios_init);
950 950
951#ifdef CONFIG_SYSFS 951#ifdef CONFIG_SYSFS
952static void __devinit pci_bus_slot_names(struct device_node *node, 952static void pci_bus_slot_names(struct device_node *node, struct pci_bus *bus)
953 struct pci_bus *bus)
954{ 953{
955 const struct pci_slot_names { 954 const struct pci_slot_names {
956 u32 slot_mask; 955 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..c647634ead2b 100644
--- a/arch/sparc/kernel/pci_psycho.c
+++ b/arch/sparc/kernel/pci_psycho.c
@@ -366,8 +366,8 @@ 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,
370 struct device *parent) 370 struct device *parent)
371{ 371{
372 pbm_config_busmastering(pbm); 372 pbm_config_busmastering(pbm);
373 pbm->is_66mhz_capable = 0; 373 pbm->is_66mhz_capable = 0;
@@ -483,15 +483,15 @@ static void psycho_pbm_strbuf_init(struct pci_pbm_info *pbm,
483#define PSYCHO_MEMSPACE_B 0x180000000UL 483#define PSYCHO_MEMSPACE_B 0x180000000UL
484#define PSYCHO_MEMSPACE_SIZE 0x07fffffffUL 484#define PSYCHO_MEMSPACE_SIZE 0x07fffffffUL
485 485
486static void __devinit psycho_pbm_init(struct pci_pbm_info *pbm, 486static void psycho_pbm_init(struct pci_pbm_info *pbm,
487 struct platform_device *op, int is_pbm_a) 487 struct platform_device *op, int is_pbm_a)
488{ 488{
489 psycho_pbm_init_common(pbm, op, "PSYCHO", PBM_CHIP_TYPE_PSYCHO); 489 psycho_pbm_init_common(pbm, op, "PSYCHO", PBM_CHIP_TYPE_PSYCHO);
490 psycho_pbm_strbuf_init(pbm, is_pbm_a); 490 psycho_pbm_strbuf_init(pbm, is_pbm_a);
491 psycho_scan_bus(pbm, &op->dev); 491 psycho_scan_bus(pbm, &op->dev);
492} 492}
493 493
494static struct pci_pbm_info * __devinit psycho_find_sibling(u32 upa_portid) 494static struct pci_pbm_info *psycho_find_sibling(u32 upa_portid)
495{ 495{
496 struct pci_pbm_info *pbm; 496 struct pci_pbm_info *pbm;
497 497
@@ -504,7 +504,7 @@ static struct pci_pbm_info * __devinit psycho_find_sibling(u32 upa_portid)
504 504
505#define PSYCHO_CONFIGSPACE 0x001000000UL 505#define PSYCHO_CONFIGSPACE 0x001000000UL
506 506
507static int __devinit psycho_probe(struct platform_device *op) 507static int psycho_probe(struct platform_device *op)
508{ 508{
509 const struct linux_prom64_registers *pr_regs; 509 const struct linux_prom64_registers *pr_regs;
510 struct device_node *dp = op->dev.of_node; 510 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..6f00d27e8dac 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,8 @@ 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,
447 struct platform_device *op) 446 struct platform_device *op)
448{ 447{
449 psycho_pbm_init_common(pbm, op, "SABRE", PBM_CHIP_TYPE_SABRE); 448 psycho_pbm_init_common(pbm, op, "SABRE", PBM_CHIP_TYPE_SABRE);
450 pbm->pci_afsr = pbm->controller_regs + SABRE_PIOAFSR; 449 pbm->pci_afsr = pbm->controller_regs + SABRE_PIOAFSR;
@@ -454,7 +453,7 @@ static void __devinit sabre_pbm_init(struct pci_pbm_info *pbm,
454} 453}
455 454
456static const struct of_device_id sabre_match[]; 455static const struct of_device_id sabre_match[];
457static int __devinit sabre_probe(struct platform_device *op) 456static int sabre_probe(struct platform_device *op)
458{ 457{
459 const struct of_device_id *match; 458 const struct of_device_id *match;
460 const struct linux_prom64_registers *pr_regs; 459 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..8f76f23dac38 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,9 @@ 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,
1311 struct platform_device *op, u32 portid, 1310 struct platform_device *op, u32 portid,
1312 int chip_type) 1311 int chip_type)
1313{ 1312{
1314 const struct linux_prom64_registers *regs; 1313 const struct linux_prom64_registers *regs;
1315 struct device_node *dp = op->dev.of_node; 1314 struct device_node *dp = op->dev.of_node;
@@ -1400,8 +1399,7 @@ static inline int portid_compare(u32 x, u32 y, int chip_type)
1400 return (x == y); 1399 return (x == y);
1401} 1400}
1402 1401
1403static struct pci_pbm_info * __devinit schizo_find_sibling(u32 portid, 1402static struct pci_pbm_info *schizo_find_sibling(u32 portid, int chip_type)
1404 int chip_type)
1405{ 1403{
1406 struct pci_pbm_info *pbm; 1404 struct pci_pbm_info *pbm;
1407 1405
@@ -1412,7 +1410,7 @@ static struct pci_pbm_info * __devinit schizo_find_sibling(u32 portid,
1412 return NULL; 1410 return NULL;
1413} 1411}
1414 1412
1415static int __devinit __schizo_init(struct platform_device *op, unsigned long chip_type) 1413static int __schizo_init(struct platform_device *op, unsigned long chip_type)
1416{ 1414{
1417 struct device_node *dp = op->dev.of_node; 1415 struct device_node *dp = op->dev.of_node;
1418 struct pci_pbm_info *pbm; 1416 struct pci_pbm_info *pbm;
@@ -1460,7 +1458,7 @@ out_err:
1460} 1458}
1461 1459
1462static const struct of_device_id schizo_match[]; 1460static const struct of_device_id schizo_match[];
1463static int __devinit schizo_probe(struct platform_device *op) 1461static int schizo_probe(struct platform_device *op)
1464{ 1462{
1465 const struct of_device_id *match; 1463 const struct of_device_id *match;
1466 1464
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/systbls_32.S b/arch/sparc/kernel/systbls_32.S
index 5147f574f125..6ac43c36bbbf 100644
--- a/arch/sparc/kernel/systbls_32.S
+++ b/arch/sparc/kernel/systbls_32.S
@@ -85,4 +85,4 @@ sys_call_table:
85/*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init 85/*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init
86/*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime 86/*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime
87/*335*/ .long sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev 87/*335*/ .long sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev
88/*340*/ .long sys_ni_syscall, sys_kcmp 88/*340*/ .long sys_ni_syscall, sys_kcmp, sys_finit_module
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S
index cdbd9b817751..1009ecb92678 100644
--- a/arch/sparc/kernel/systbls_64.S
+++ b/arch/sparc/kernel/systbls_64.S
@@ -86,7 +86,7 @@ sys_call_table32:
86 .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init 86 .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init
87/*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime 87/*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime
88 .word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev 88 .word sys_syncfs, compat_sys_sendmmsg, sys_setns, compat_sys_process_vm_readv, compat_sys_process_vm_writev
89/*340*/ .word sys_kern_features, sys_kcmp 89/*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module
90 90
91#endif /* CONFIG_COMPAT */ 91#endif /* CONFIG_COMPAT */
92 92
@@ -164,4 +164,4 @@ sys_call_table:
164 .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init 164 .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init
165/*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime 165/*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime
166 .word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev 166 .word sys_syncfs, sys_sendmmsg, sys_setns, sys_process_vm_readv, sys_process_vm_writev
167/*340*/ .word sys_kern_features, sys_kcmp 167/*340*/ .word sys_kern_features, sys_kcmp, sys_finit_module
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/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index b1942e222768..18e329ca108e 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -302,7 +302,7 @@ static efi_status_t setup_efi_pci(struct boot_params *params)
302 if (status != EFI_SUCCESS) 302 if (status != EFI_SUCCESS)
303 continue; 303 continue;
304 304
305 if (!attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM) 305 if (!(attributes & EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM))
306 continue; 306 continue;
307 307
308 if (!pci->romimage || !pci->romsize) 308 if (!pci->romimage || !pci->romsize)
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.c b/arch/x86/kernel/cpu/perf_event.c
index 4428fd178bce..6774c17a5576 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -340,9 +340,6 @@ int x86_setup_perfctr(struct perf_event *event)
340 /* BTS is currently only allowed for user-mode. */ 340 /* BTS is currently only allowed for user-mode. */
341 if (!attr->exclude_kernel) 341 if (!attr->exclude_kernel)
342 return -EOPNOTSUPP; 342 return -EOPNOTSUPP;
343
344 if (!attr->exclude_guest)
345 return -EOPNOTSUPP;
346 } 343 }
347 344
348 hwc->config |= config; 345 hwc->config |= config;
@@ -385,9 +382,6 @@ int x86_pmu_hw_config(struct perf_event *event)
385 if (event->attr.precise_ip) { 382 if (event->attr.precise_ip) {
386 int precise = 0; 383 int precise = 0;
387 384
388 if (!event->attr.exclude_guest)
389 return -EOPNOTSUPP;
390
391 /* Support for constant skid */ 385 /* Support for constant skid */
392 if (x86_pmu.pebs_active && !x86_pmu.pebs_broken) { 386 if (x86_pmu.pebs_active && !x86_pmu.pebs_broken) {
393 precise++; 387 precise++;
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/entry_32.S b/arch/x86/kernel/entry_32.S
index ff84d5469d77..6ed91d9980e2 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -1065,7 +1065,6 @@ ENTRY(xen_failsafe_callback)
1065 lea 16(%esp),%esp 1065 lea 16(%esp),%esp
1066 CFI_ADJUST_CFA_OFFSET -16 1066 CFI_ADJUST_CFA_OFFSET -16
1067 jz 5f 1067 jz 5f
1068 addl $16,%esp
1069 jmp iret_exc 1068 jmp iret_exc
10705: pushl_cfi $-1 /* orig_ax = -1 => not a system call */ 10695: pushl_cfi $-1 /* orig_ax = -1 => not a system call */
1071 SAVE_ALL 1070 SAVE_ALL
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index 08b973f64032..9c2bd8bd4b4c 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -43,6 +43,7 @@
43#include <asm/apicdef.h> 43#include <asm/apicdef.h>
44#include <asm/hypervisor.h> 44#include <asm/hypervisor.h>
45#include <asm/kvm_guest.h> 45#include <asm/kvm_guest.h>
46#include <asm/context_tracking.h>
46 47
47static int kvmapf = 1; 48static int kvmapf = 1;
48 49
@@ -121,6 +122,8 @@ void kvm_async_pf_task_wait(u32 token)
121 struct kvm_task_sleep_node n, *e; 122 struct kvm_task_sleep_node n, *e;
122 DEFINE_WAIT(wait); 123 DEFINE_WAIT(wait);
123 124
125 rcu_irq_enter();
126
124 spin_lock(&b->lock); 127 spin_lock(&b->lock);
125 e = _find_apf_task(b, token); 128 e = _find_apf_task(b, token);
126 if (e) { 129 if (e) {
@@ -128,6 +131,8 @@ void kvm_async_pf_task_wait(u32 token)
128 hlist_del(&e->link); 131 hlist_del(&e->link);
129 kfree(e); 132 kfree(e);
130 spin_unlock(&b->lock); 133 spin_unlock(&b->lock);
134
135 rcu_irq_exit();
131 return; 136 return;
132 } 137 }
133 138
@@ -152,13 +157,16 @@ void kvm_async_pf_task_wait(u32 token)
152 /* 157 /*
153 * We cannot reschedule. So halt. 158 * We cannot reschedule. So halt.
154 */ 159 */
160 rcu_irq_exit();
155 native_safe_halt(); 161 native_safe_halt();
162 rcu_irq_enter();
156 local_irq_disable(); 163 local_irq_disable();
157 } 164 }
158 } 165 }
159 if (!n.halted) 166 if (!n.halted)
160 finish_wait(&n.wq, &wait); 167 finish_wait(&n.wq, &wait);
161 168
169 rcu_irq_exit();
162 return; 170 return;
163} 171}
164EXPORT_SYMBOL_GPL(kvm_async_pf_task_wait); 172EXPORT_SYMBOL_GPL(kvm_async_pf_task_wait);
@@ -252,10 +260,10 @@ do_async_page_fault(struct pt_regs *regs, unsigned long error_code)
252 break; 260 break;
253 case KVM_PV_REASON_PAGE_NOT_PRESENT: 261 case KVM_PV_REASON_PAGE_NOT_PRESENT:
254 /* page is swapped out by the host. */ 262 /* page is swapped out by the host. */
255 rcu_irq_enter(); 263 exception_enter(regs);
256 exit_idle(); 264 exit_idle();
257 kvm_async_pf_task_wait((u32)read_cr2()); 265 kvm_async_pf_task_wait((u32)read_cr2());
258 rcu_irq_exit(); 266 exception_exit(regs);
259 break; 267 break;
260 case KVM_PV_REASON_PAGE_READY: 268 case KVM_PV_REASON_PAGE_READY:
261 rcu_irq_enter(); 269 rcu_irq_enter();
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/kernel/setup.c b/arch/x86/kernel/setup.c
index 23ddd558fbd5..00f6c1472b85 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -610,6 +610,83 @@ static __init void reserve_ibft_region(void)
610 610
611static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10; 611static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10;
612 612
613static bool __init snb_gfx_workaround_needed(void)
614{
615#ifdef CONFIG_PCI
616 int i;
617 u16 vendor, devid;
618 static const __initconst u16 snb_ids[] = {
619 0x0102,
620 0x0112,
621 0x0122,
622 0x0106,
623 0x0116,
624 0x0126,
625 0x010a,
626 };
627
628 /* Assume no if something weird is going on with PCI */
629 if (!early_pci_allowed())
630 return false;
631
632 vendor = read_pci_config_16(0, 2, 0, PCI_VENDOR_ID);
633 if (vendor != 0x8086)
634 return false;
635
636 devid = read_pci_config_16(0, 2, 0, PCI_DEVICE_ID);
637 for (i = 0; i < ARRAY_SIZE(snb_ids); i++)
638 if (devid == snb_ids[i])
639 return true;
640#endif
641
642 return false;
643}
644
645/*
646 * Sandy Bridge graphics has trouble with certain ranges, exclude
647 * them from allocation.
648 */
649static void __init trim_snb_memory(void)
650{
651 static const __initconst unsigned long bad_pages[] = {
652 0x20050000,
653 0x20110000,
654 0x20130000,
655 0x20138000,
656 0x40004000,
657 };
658 int i;
659
660 if (!snb_gfx_workaround_needed())
661 return;
662
663 printk(KERN_DEBUG "reserving inaccessible SNB gfx pages\n");
664
665 /*
666 * Reserve all memory below the 1 MB mark that has not
667 * already been reserved.
668 */
669 memblock_reserve(0, 1<<20);
670
671 for (i = 0; i < ARRAY_SIZE(bad_pages); i++) {
672 if (memblock_reserve(bad_pages[i], PAGE_SIZE))
673 printk(KERN_WARNING "failed to reserve 0x%08lx\n",
674 bad_pages[i]);
675 }
676}
677
678/*
679 * Here we put platform-specific memory range workarounds, i.e.
680 * memory known to be corrupt or otherwise in need to be reserved on
681 * specific platforms.
682 *
683 * If this gets used more widely it could use a real dispatch mechanism.
684 */
685static void __init trim_platform_memory_ranges(void)
686{
687 trim_snb_memory();
688}
689
613static void __init trim_bios_range(void) 690static void __init trim_bios_range(void)
614{ 691{
615 /* 692 /*
@@ -630,6 +707,7 @@ static void __init trim_bios_range(void)
630 * take them out. 707 * take them out.
631 */ 708 */
632 e820_remove_range(BIOS_BEGIN, BIOS_END - BIOS_BEGIN, E820_RAM, 1); 709 e820_remove_range(BIOS_BEGIN, BIOS_END - BIOS_BEGIN, E820_RAM, 1);
710
633 sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); 711 sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map);
634} 712}
635 713
@@ -908,6 +986,8 @@ void __init setup_arch(char **cmdline_p)
908 986
909 setup_real_mode(); 987 setup_real_mode();
910 988
989 trim_platform_memory_ranges();
990
911 init_gbpages(); 991 init_gbpages();
912 992
913 /* max_pfn_mapped is updated here */ 993 /* max_pfn_mapped is updated here */
diff --git a/arch/x86/kernel/step.c b/arch/x86/kernel/step.c
index cd3b2438a980..9b4d51d0c0d0 100644
--- a/arch/x86/kernel/step.c
+++ b/arch/x86/kernel/step.c
@@ -165,10 +165,11 @@ void set_task_blockstep(struct task_struct *task, bool on)
165 * Ensure irq/preemption can't change debugctl in between. 165 * Ensure irq/preemption can't change debugctl in between.
166 * Note also that both TIF_BLOCKSTEP and debugctl should 166 * Note also that both TIF_BLOCKSTEP and debugctl should
167 * be changed atomically wrt preemption. 167 * be changed atomically wrt preemption.
168 * FIXME: this means that set/clear TIF_BLOCKSTEP is simply 168 *
169 * wrong if task != current, SIGKILL can wakeup the stopped 169 * NOTE: this means that set/clear TIF_BLOCKSTEP is only safe if
170 * tracee and set/clear can play with the running task, this 170 * task is current or it can't be running, otherwise we can race
171 * can confuse the next __switch_to_xtra(). 171 * with __switch_to_xtra(). We rely on ptrace_freeze_traced() but
172 * PTRACE_KILL is not safe.
172 */ 173 */
173 local_irq_disable(); 174 local_irq_disable();
174 debugctl = get_debugctlmsr(); 175 debugctl = get_debugctlmsr();
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 76f54461f7cb..c243b81e3c74 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -120,7 +120,7 @@ struct kvm_shared_msrs {
120}; 120};
121 121
122static struct kvm_shared_msrs_global __read_mostly shared_msrs_global; 122static struct kvm_shared_msrs_global __read_mostly shared_msrs_global;
123static DEFINE_PER_CPU(struct kvm_shared_msrs, shared_msrs); 123static struct kvm_shared_msrs __percpu *shared_msrs;
124 124
125struct kvm_stats_debugfs_item debugfs_entries[] = { 125struct kvm_stats_debugfs_item debugfs_entries[] = {
126 { "pf_fixed", VCPU_STAT(pf_fixed) }, 126 { "pf_fixed", VCPU_STAT(pf_fixed) },
@@ -191,10 +191,10 @@ static void kvm_on_user_return(struct user_return_notifier *urn)
191 191
192static void shared_msr_update(unsigned slot, u32 msr) 192static void shared_msr_update(unsigned slot, u32 msr)
193{ 193{
194 struct kvm_shared_msrs *smsr;
195 u64 value; 194 u64 value;
195 unsigned int cpu = smp_processor_id();
196 struct kvm_shared_msrs *smsr = per_cpu_ptr(shared_msrs, cpu);
196 197
197 smsr = &__get_cpu_var(shared_msrs);
198 /* only read, and nobody should modify it at this time, 198 /* only read, and nobody should modify it at this time,
199 * so don't need lock */ 199 * so don't need lock */
200 if (slot >= shared_msrs_global.nr) { 200 if (slot >= shared_msrs_global.nr) {
@@ -226,7 +226,8 @@ static void kvm_shared_msr_cpu_online(void)
226 226
227void kvm_set_shared_msr(unsigned slot, u64 value, u64 mask) 227void kvm_set_shared_msr(unsigned slot, u64 value, u64 mask)
228{ 228{
229 struct kvm_shared_msrs *smsr = &__get_cpu_var(shared_msrs); 229 unsigned int cpu = smp_processor_id();
230 struct kvm_shared_msrs *smsr = per_cpu_ptr(shared_msrs, cpu);
230 231
231 if (((value ^ smsr->values[slot].curr) & mask) == 0) 232 if (((value ^ smsr->values[slot].curr) & mask) == 0)
232 return; 233 return;
@@ -242,7 +243,8 @@ EXPORT_SYMBOL_GPL(kvm_set_shared_msr);
242 243
243static void drop_user_return_notifiers(void *ignore) 244static void drop_user_return_notifiers(void *ignore)
244{ 245{
245 struct kvm_shared_msrs *smsr = &__get_cpu_var(shared_msrs); 246 unsigned int cpu = smp_processor_id();
247 struct kvm_shared_msrs *smsr = per_cpu_ptr(shared_msrs, cpu);
246 248
247 if (smsr->registered) 249 if (smsr->registered)
248 kvm_on_user_return(&smsr->urn); 250 kvm_on_user_return(&smsr->urn);
@@ -5233,9 +5235,16 @@ int kvm_arch_init(void *opaque)
5233 goto out; 5235 goto out;
5234 } 5236 }
5235 5237
5238 r = -ENOMEM;
5239 shared_msrs = alloc_percpu(struct kvm_shared_msrs);
5240 if (!shared_msrs) {
5241 printk(KERN_ERR "kvm: failed to allocate percpu kvm_shared_msrs\n");
5242 goto out;
5243 }
5244
5236 r = kvm_mmu_module_init(); 5245 r = kvm_mmu_module_init();
5237 if (r) 5246 if (r)
5238 goto out; 5247 goto out_free_percpu;
5239 5248
5240 kvm_set_mmio_spte_mask(); 5249 kvm_set_mmio_spte_mask();
5241 kvm_init_msr_list(); 5250 kvm_init_msr_list();
@@ -5258,6 +5267,8 @@ int kvm_arch_init(void *opaque)
5258 5267
5259 return 0; 5268 return 0;
5260 5269
5270out_free_percpu:
5271 free_percpu(shared_msrs);
5261out: 5272out:
5262 return r; 5273 return r;
5263} 5274}
@@ -5275,6 +5286,7 @@ void kvm_arch_exit(void)
5275#endif 5286#endif
5276 kvm_x86_ops = NULL; 5287 kvm_x86_ops = NULL;
5277 kvm_mmu_module_exit(); 5288 kvm_mmu_module_exit();
5289 free_percpu(shared_msrs);
5278} 5290}
5279 5291
5280int kvm_emulate_halt(struct kvm_vcpu *vcpu) 5292int kvm_emulate_halt(struct kvm_vcpu *vcpu)
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
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index 4f7d2599b484..34bc4cee8887 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -432,13 +432,6 @@ static void __cpuinit xen_play_dead(void) /* used only with HOTPLUG_CPU */
432 play_dead_common(); 432 play_dead_common();
433 HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL); 433 HYPERVISOR_vcpu_op(VCPUOP_down, smp_processor_id(), NULL);
434 cpu_bringup(); 434 cpu_bringup();
435 /*
436 * Balance out the preempt calls - as we are running in cpu_idle
437 * loop which has been called at bootup from cpu_bringup_and_idle.
438 * The cpucpu_bringup_and_idle called cpu_bringup which made a
439 * preempt_disable() So this preempt_enable will balance it out.
440 */
441 preempt_enable();
442} 435}
443 436
444#else /* !CONFIG_HOTPLUG_CPU */ 437#else /* !CONFIG_HOTPLUG_CPU */